earthsdk3 3.0.6-beta.9 → 3.0.7-beta.2

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 (516) hide show
  1. package/dist/earthsdk3.iife.js +797 -0
  2. package/dist/earthsdk3.js +29613 -57228
  3. package/dist/earthsdk3.umd.cjs +567 -0
  4. package/dist/types/ESJTypes/index.d.ts +4 -3
  5. package/dist/types/ESJTypes/index.d.ts.map +1 -0
  6. package/dist/types/ESJTypes/pickedInfos/index.d.ts +36 -35
  7. package/dist/types/ESJTypes/pickedInfos/index.d.ts.map +1 -0
  8. package/dist/types/ESJTypes/properties/ClockType.d.ts +3 -2
  9. package/dist/types/ESJTypes/properties/ClockType.d.ts.map +1 -0
  10. package/dist/types/ESJTypes/properties/DataType.d.ts +35 -34
  11. package/dist/types/ESJTypes/properties/DataType.d.ts.map +1 -0
  12. package/dist/types/ESJTypes/properties/ESJArcType.d.ts +2 -1
  13. package/dist/types/ESJTypes/properties/ESJArcType.d.ts.map +1 -0
  14. package/dist/types/ESJTypes/properties/ESJEditingMode.d.ts +20 -19
  15. package/dist/types/ESJTypes/properties/ESJEditingMode.d.ts.map +1 -0
  16. package/dist/types/ESJTypes/properties/ESJEnvironmentMapManager.d.ts +13 -12
  17. package/dist/types/ESJTypes/properties/ESJEnvironmentMapManager.d.ts.map +1 -0
  18. package/dist/types/ESJTypes/properties/ESJInstances.d.ts +7 -6
  19. package/dist/types/ESJTypes/properties/ESJInstances.d.ts.map +1 -0
  20. package/dist/types/ESJTypes/properties/ESJMaterialType.d.ts +25 -24
  21. package/dist/types/ESJTypes/properties/ESJMaterialType.d.ts.map +1 -0
  22. package/dist/types/ESJTypes/properties/ESJResource.d.ts +12 -11
  23. package/dist/types/ESJTypes/properties/ESJResource.d.ts.map +1 -0
  24. package/dist/types/ESJTypes/properties/FillStyleType.d.ts +12 -11
  25. package/dist/types/ESJTypes/properties/FillStyleType.d.ts.map +1 -0
  26. package/dist/types/ESJTypes/properties/FlyParamType.d.ts +30 -29
  27. package/dist/types/ESJTypes/properties/FlyParamType.d.ts.map +1 -0
  28. package/dist/types/ESJTypes/properties/ParticleEmitterJsonType.d.ts +14 -13
  29. package/dist/types/ESJTypes/properties/ParticleEmitterJsonType.d.ts.map +1 -0
  30. package/dist/types/ESJTypes/properties/PointStyleType.d.ts +14 -13
  31. package/dist/types/ESJTypes/properties/PointStyleType.d.ts.map +1 -0
  32. package/dist/types/ESJTypes/properties/StrokeStyleType.d.ts +18 -17
  33. package/dist/types/ESJTypes/properties/StrokeStyleType.d.ts.map +1 -0
  34. package/dist/types/ESJTypes/properties/Viewer.d.ts +85 -84
  35. package/dist/types/ESJTypes/properties/Viewer.d.ts.map +1 -0
  36. package/dist/types/ESJTypes/properties/index.d.ts +116 -115
  37. package/dist/types/ESJTypes/properties/index.d.ts.map +1 -0
  38. package/dist/types/ESJTypes/props/ColorProperty.d.ts +5 -4
  39. package/dist/types/ESJTypes/props/ColorProperty.d.ts.map +1 -0
  40. package/dist/types/ESJTypes/props/ColorRgbProperty.d.ts +5 -4
  41. package/dist/types/ESJTypes/props/ColorRgbProperty.d.ts.map +1 -0
  42. package/dist/types/ESJTypes/props/DashPatternProperty.d.ts +5 -4
  43. package/dist/types/ESJTypes/props/DashPatternProperty.d.ts.map +1 -0
  44. package/dist/types/ESJTypes/props/DateProperty.d.ts +5 -4
  45. package/dist/types/ESJTypes/props/DateProperty.d.ts.map +1 -0
  46. package/dist/types/ESJTypes/props/DatesProperty.d.ts +5 -4
  47. package/dist/types/ESJTypes/props/DatesProperty.d.ts.map +1 -0
  48. package/dist/types/ESJTypes/props/EnumProperty.d.ts +10 -9
  49. package/dist/types/ESJTypes/props/EnumProperty.d.ts.map +1 -0
  50. package/dist/types/ESJTypes/props/EnumStringsProperty.d.ts +10 -9
  51. package/dist/types/ESJTypes/props/EnumStringsProperty.d.ts.map +1 -0
  52. package/dist/types/ESJTypes/props/EvalStringProperty.d.ts +10 -9
  53. package/dist/types/ESJTypes/props/EvalStringProperty.d.ts.map +1 -0
  54. package/dist/types/ESJTypes/props/FunctionProperty.d.ts +14 -13
  55. package/dist/types/ESJTypes/props/FunctionProperty.d.ts.map +1 -0
  56. package/dist/types/ESJTypes/props/GroupProperty.d.ts +8 -7
  57. package/dist/types/ESJTypes/props/GroupProperty.d.ts.map +1 -0
  58. package/dist/types/ESJTypes/props/JsonProperty.d.ts +10 -9
  59. package/dist/types/ESJTypes/props/JsonProperty.d.ts.map +1 -0
  60. package/dist/types/ESJTypes/props/LongStringProperty.d.ts +10 -9
  61. package/dist/types/ESJTypes/props/LongStringProperty.d.ts.map +1 -0
  62. package/dist/types/ESJTypes/props/MinmaxProperty.d.ts +5 -4
  63. package/dist/types/ESJTypes/props/MinmaxProperty.d.ts.map +1 -0
  64. package/dist/types/ESJTypes/props/NativeProperty.d.ts +86 -85
  65. package/dist/types/ESJTypes/props/NativeProperty.d.ts.map +1 -0
  66. package/dist/types/ESJTypes/props/NearFarScalerProperty.d.ts +5 -4
  67. package/dist/types/ESJTypes/props/NearFarScalerProperty.d.ts.map +1 -0
  68. package/dist/types/ESJTypes/props/NonreactiveJsonStringProperty.d.ts +13 -12
  69. package/dist/types/ESJTypes/props/NonreactiveJsonStringProperty.d.ts.map +1 -0
  70. package/dist/types/ESJTypes/props/NumberRangeProperty.d.ts +5 -4
  71. package/dist/types/ESJTypes/props/NumberRangeProperty.d.ts.map +1 -0
  72. package/dist/types/ESJTypes/props/NumberSliderProperty.d.ts +23 -22
  73. package/dist/types/ESJTypes/props/NumberSliderProperty.d.ts.map +1 -0
  74. package/dist/types/ESJTypes/props/ParamsProperty.d.ts +12 -11
  75. package/dist/types/ESJTypes/props/ParamsProperty.d.ts.map +1 -0
  76. package/dist/types/ESJTypes/props/PlayerProperty.d.ts +27 -26
  77. package/dist/types/ESJTypes/props/PlayerProperty.d.ts.map +1 -0
  78. package/dist/types/ESJTypes/props/PositionProperty.d.ts +5 -4
  79. package/dist/types/ESJTypes/props/PositionProperty.d.ts.map +1 -0
  80. package/dist/types/ESJTypes/props/PositionsProperty.d.ts +5 -4
  81. package/dist/types/ESJTypes/props/PositionsProperty.d.ts.map +1 -0
  82. package/dist/types/ESJTypes/props/PositionsSetPropety.d.ts +5 -4
  83. package/dist/types/ESJTypes/props/PositionsSetPropety.d.ts.map +1 -0
  84. package/dist/types/ESJTypes/props/Property.d.ts +13 -12
  85. package/dist/types/ESJTypes/props/Property.d.ts.map +1 -0
  86. package/dist/types/ESJTypes/props/ReactVarProperty.d.ts +8 -7
  87. package/dist/types/ESJTypes/props/ReactVarProperty.d.ts.map +1 -0
  88. package/dist/types/ESJTypes/props/RotationProperty.d.ts +5 -4
  89. package/dist/types/ESJTypes/props/RotationProperty.d.ts.map +1 -0
  90. package/dist/types/ESJTypes/props/UriProperty.d.ts +5 -4
  91. package/dist/types/ESJTypes/props/UriProperty.d.ts.map +1 -0
  92. package/dist/types/ESJTypes/props/ViewPlayerProperty.d.ts +23 -22
  93. package/dist/types/ESJTypes/props/ViewPlayerProperty.d.ts.map +1 -0
  94. package/dist/types/ESJTypes/props/WithUndefinedProperty.d.ts +16 -15
  95. package/dist/types/ESJTypes/props/WithUndefinedProperty.d.ts.map +1 -0
  96. package/dist/types/ESJTypes/props/index.d.ts +30 -29
  97. package/dist/types/ESJTypes/props/index.d.ts.map +1 -0
  98. package/dist/types/ESObjectManager/ESPlyarAndPathTime.d.ts +7 -6
  99. package/dist/types/ESObjectManager/ESPlyarAndPathTime.d.ts.map +1 -0
  100. package/dist/types/ESObjectManager/PathAnimationManager.d.ts +19 -18
  101. package/dist/types/ESObjectManager/PathAnimationManager.d.ts.map +1 -0
  102. package/dist/types/ESObjectManager/SceneObjectEditingManager.d.ts +18 -17
  103. package/dist/types/ESObjectManager/SceneObjectEditingManager.d.ts.map +1 -0
  104. package/dist/types/ESObjectManager/SceneObjectsListening.d.ts +17 -16
  105. package/dist/types/ESObjectManager/SceneObjectsListening.d.ts.map +1 -0
  106. package/dist/types/ESObjectManager/SceneObjectsManager.d.ts +18 -17
  107. package/dist/types/ESObjectManager/SceneObjectsManager.d.ts.map +1 -0
  108. package/dist/types/ESObjectManager/ViewersManager.d.ts +18 -17
  109. package/dist/types/ESObjectManager/ViewersManager.d.ts.map +1 -0
  110. package/dist/types/ESObjectManager/index.d.ts +126 -118
  111. package/dist/types/ESObjectManager/index.d.ts.map +1 -0
  112. package/dist/types/ESObjectManager/propTreeCallback.d.ts +15 -14
  113. package/dist/types/ESObjectManager/propTreeCallback.d.ts.map +1 -0
  114. package/dist/types/ESObjectManager/utils.d.ts +10 -9
  115. package/dist/types/ESObjectManager/utils.d.ts.map +1 -0
  116. package/dist/types/ESObjects/base/ESGeoVector.d.ts +132 -131
  117. package/dist/types/ESObjects/base/ESGeoVector.d.ts.map +1 -0
  118. package/dist/types/ESObjects/base/ESLabel.d.ts +66 -65
  119. package/dist/types/ESObjects/base/ESLabel.d.ts.map +1 -0
  120. package/dist/types/ESObjects/base/ESLocalVector.d.ts +106 -105
  121. package/dist/types/ESObjects/base/ESLocalVector.d.ts.map +1 -0
  122. package/dist/types/ESObjects/base/ESLocalVector2D.d.ts +57 -56
  123. package/dist/types/ESObjects/base/ESLocalVector2D.d.ts.map +1 -0
  124. package/dist/types/ESObjects/base/ESObjectWithLocation.d.ts +108 -107
  125. package/dist/types/ESObjects/base/ESObjectWithLocation.d.ts.map +1 -0
  126. package/dist/types/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts +86 -85
  127. package/dist/types/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts.map +1 -0
  128. package/dist/types/ESObjects/base/ESSceneObject/RefsManager.d.ts +17 -16
  129. package/dist/types/ESObjects/base/ESSceneObject/RefsManager.d.ts.map +1 -0
  130. package/dist/types/ESObjects/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts +3 -2
  131. package/dist/types/ESObjects/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts.map +1 -0
  132. package/dist/types/ESObjects/base/ESSceneObject/funcs/replaceStrWithEnv.d.ts +2 -1
  133. package/dist/types/ESObjects/base/ESSceneObject/funcs/replaceStrWithEnv.d.ts.map +1 -0
  134. package/dist/types/ESObjects/base/ESSceneObject/index.d.ts +117 -117
  135. package/dist/types/ESObjects/base/ESSceneObject/index.d.ts.map +1 -0
  136. package/dist/types/ESObjects/base/ESVisualObject.d.ts +117 -115
  137. package/dist/types/ESObjects/base/ESVisualObject.d.ts.map +1 -0
  138. package/dist/types/ESObjects/base/index.d.ts +8 -7
  139. package/dist/types/ESObjects/base/index.d.ts.map +1 -0
  140. package/dist/types/ESObjects/general/ES3DTileset/index.d.ts +314 -305
  141. package/dist/types/ESObjects/general/ES3DTileset/index.d.ts.map +1 -0
  142. package/dist/types/ESObjects/general/ES3DTileset/type.d.ts +41 -40
  143. package/dist/types/ESObjects/general/ES3DTileset/type.d.ts.map +1 -0
  144. package/dist/types/ESObjects/general/ESAlarm.d.ts +85 -84
  145. package/dist/types/ESObjects/general/ESAlarm.d.ts.map +1 -0
  146. package/dist/types/ESObjects/general/ESApertureEffect.d.ts +73 -72
  147. package/dist/types/ESObjects/general/ESApertureEffect.d.ts.map +1 -0
  148. package/dist/types/ESObjects/general/ESAreaMeasurement.d.ts +77 -76
  149. package/dist/types/ESObjects/general/ESAreaMeasurement.d.ts.map +1 -0
  150. package/dist/types/ESObjects/general/ESBlastParticleSystem.d.ts +75 -74
  151. package/dist/types/ESObjects/general/ESBlastParticleSystem.d.ts.map +1 -0
  152. package/dist/types/ESObjects/general/ESBoxClipping.d.ts +92 -92
  153. package/dist/types/ESObjects/general/ESBoxClipping.d.ts.map +1 -0
  154. package/dist/types/ESObjects/general/ESCameraView.d.ts +96 -94
  155. package/dist/types/ESObjects/general/ESCameraView.d.ts.map +1 -0
  156. package/dist/types/ESObjects/general/ESCameraViewCollection/ViewWrapper.d.ts +15 -14
  157. package/dist/types/ESObjects/general/ESCameraViewCollection/ViewWrapper.d.ts.map +1 -0
  158. package/dist/types/ESObjects/general/ESCameraViewCollection/index.d.ts +178 -173
  159. package/dist/types/ESObjects/general/ESCameraViewCollection/index.d.ts.map +1 -0
  160. package/dist/types/ESObjects/general/ESCameraVisibleRange.d.ts +84 -83
  161. package/dist/types/ESObjects/general/ESCameraVisibleRange.d.ts.map +1 -0
  162. package/dist/types/ESObjects/general/ESCar.d.ts +74 -73
  163. package/dist/types/ESObjects/general/ESCar.d.ts.map +1 -0
  164. package/dist/types/ESObjects/general/ESCityBasePoint.d.ts +62 -61
  165. package/dist/types/ESObjects/general/ESCityBasePoint.d.ts.map +1 -0
  166. package/dist/types/ESObjects/general/ESClassification.d.ts +83 -82
  167. package/dist/types/ESObjects/general/ESClassification.d.ts.map +1 -0
  168. package/dist/types/ESObjects/general/ESClippingPlane.d.ts +82 -82
  169. package/dist/types/ESObjects/general/ESClippingPlane.d.ts.map +1 -0
  170. package/dist/types/ESObjects/general/ESCustomDiv/index.d.ts +75 -74
  171. package/dist/types/ESObjects/general/ESCustomDiv/index.d.ts.map +1 -0
  172. package/dist/types/ESObjects/general/ESCustomDiv/instance.d.ts +18 -17
  173. package/dist/types/ESObjects/general/ESCustomDiv/instance.d.ts.map +1 -0
  174. package/dist/types/ESObjects/general/ESCzml.d.ts +167 -166
  175. package/dist/types/ESObjects/general/ESCzml.d.ts.map +1 -0
  176. package/dist/types/ESObjects/general/ESDataMesh.d.ts +82 -81
  177. package/dist/types/ESObjects/general/ESDataMesh.d.ts.map +1 -0
  178. package/dist/types/ESObjects/general/ESDatasmithRuntimeModel.d.ts +81 -80
  179. package/dist/types/ESObjects/general/ESDatasmithRuntimeModel.d.ts.map +1 -0
  180. package/dist/types/ESObjects/general/ESDirectionMeasurement.d.ts +77 -76
  181. package/dist/types/ESObjects/general/ESDirectionMeasurement.d.ts.map +1 -0
  182. package/dist/types/ESObjects/general/ESDistanceMeasurement.d.ts +75 -74
  183. package/dist/types/ESObjects/general/ESDistanceMeasurement.d.ts.map +1 -0
  184. package/dist/types/ESObjects/general/ESDynamicWater.d.ts +132 -131
  185. package/dist/types/ESObjects/general/ESDynamicWater.d.ts.map +1 -0
  186. package/dist/types/ESObjects/general/ESEntityCluster.d.ts +116 -115
  187. package/dist/types/ESObjects/general/ESEntityCluster.d.ts.map +1 -0
  188. package/dist/types/ESObjects/general/ESExcavate.d.ts +91 -89
  189. package/dist/types/ESObjects/general/ESExcavate.d.ts.map +1 -0
  190. package/dist/types/ESObjects/general/ESFireParticleSystem.d.ts +73 -72
  191. package/dist/types/ESObjects/general/ESFireParticleSystem.d.ts.map +1 -0
  192. package/dist/types/ESObjects/general/ESForestTileset.d.ts +90 -89
  193. package/dist/types/ESObjects/general/ESForestTileset.d.ts.map +1 -0
  194. package/dist/types/ESObjects/general/ESGaussianSplatting.d.ts +72 -71
  195. package/dist/types/ESObjects/general/ESGaussianSplatting.d.ts.map +1 -0
  196. package/dist/types/ESObjects/general/ESGeoDiv/index.d.ts +99 -102
  197. package/dist/types/ESObjects/general/ESGeoDiv/index.d.ts.map +1 -0
  198. package/dist/types/ESObjects/general/ESGeoDiv/mds.d.ts +14 -13
  199. package/dist/types/ESObjects/general/ESGeoDiv/mds.d.ts.map +1 -0
  200. package/dist/types/ESObjects/general/ESGeoDivTextPoi.d.ts +102 -101
  201. package/dist/types/ESObjects/general/ESGeoDivTextPoi.d.ts.map +1 -0
  202. package/dist/types/ESObjects/general/ESGeoExtrudedPolygon.d.ts +92 -91
  203. package/dist/types/ESObjects/general/ESGeoExtrudedPolygon.d.ts.map +1 -0
  204. package/dist/types/ESObjects/general/ESGeoJson/index.d.ts +239 -238
  205. package/dist/types/ESObjects/general/ESGeoJson/index.d.ts.map +1 -0
  206. package/dist/types/ESObjects/general/ESGeoJson/type.d.ts +39 -38
  207. package/dist/types/ESObjects/general/ESGeoJson/type.d.ts.map +1 -0
  208. package/dist/types/ESObjects/general/ESGeoLineString.d.ts +87 -86
  209. package/dist/types/ESObjects/general/ESGeoLineString.d.ts.map +1 -0
  210. package/dist/types/ESObjects/general/ESGeoPolygon.d.ts +81 -80
  211. package/dist/types/ESObjects/general/ESGeoPolygon.d.ts.map +1 -0
  212. package/dist/types/ESObjects/general/ESGeoRectangle.d.ts +87 -86
  213. package/dist/types/ESObjects/general/ESGeoRectangle.d.ts.map +1 -0
  214. package/dist/types/ESObjects/general/ESGeoWater.d.ts +125 -124
  215. package/dist/types/ESObjects/general/ESGeoWater.d.ts.map +1 -0
  216. package/dist/types/ESObjects/general/ESGltfModel.d.ts +152 -146
  217. package/dist/types/ESObjects/general/ESGltfModel.d.ts.map +1 -0
  218. package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts +86 -85
  219. package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts.map +1 -0
  220. package/dist/types/ESObjects/general/ESHeightMeasurement.d.ts +75 -74
  221. package/dist/types/ESObjects/general/ESHeightMeasurement.d.ts.map +1 -0
  222. package/dist/types/ESObjects/general/ESHole.d.ts +87 -75
  223. package/dist/types/ESObjects/general/ESHole.d.ts.map +1 -0
  224. package/dist/types/ESObjects/general/ESHuman.d.ts +100 -99
  225. package/dist/types/ESObjects/general/ESHuman.d.ts.map +1 -0
  226. package/dist/types/ESObjects/general/ESHumanPoi.d.ts +100 -99
  227. package/dist/types/ESObjects/general/ESHumanPoi.d.ts.map +1 -0
  228. package/dist/types/ESObjects/general/ESImageLabel.d.ts +104 -103
  229. package/dist/types/ESObjects/general/ESImageLabel.d.ts.map +1 -0
  230. package/dist/types/ESObjects/general/ESImageryLayer/index.d.ts +116 -115
  231. package/dist/types/ESObjects/general/ESImageryLayer/index.d.ts.map +1 -0
  232. package/dist/types/ESObjects/general/ESImageryLayer/types.d.ts +107 -106
  233. package/dist/types/ESObjects/general/ESImageryLayer/types.d.ts.map +1 -0
  234. package/dist/types/ESObjects/general/ESLevelRuntimeModel.d.ts +79 -78
  235. package/dist/types/ESObjects/general/ESLevelRuntimeModel.d.ts.map +1 -0
  236. package/dist/types/ESObjects/general/ESLocalCircle.d.ts +96 -95
  237. package/dist/types/ESObjects/general/ESLocalCircle.d.ts.map +1 -0
  238. package/dist/types/ESObjects/general/ESLocalPolygon.d.ts +89 -88
  239. package/dist/types/ESObjects/general/ESLocalPolygon.d.ts.map +1 -0
  240. package/dist/types/ESObjects/general/ESLocalPolygonZ.d.ts +65 -64
  241. package/dist/types/ESObjects/general/ESLocalPolygonZ.d.ts.map +1 -0
  242. package/dist/types/ESObjects/general/ESLocalRectangle.d.ts +82 -82
  243. package/dist/types/ESObjects/general/ESLocalRectangle.d.ts.map +1 -0
  244. package/dist/types/ESObjects/general/ESLocalRegularPolygon.d.ts +1 -0
  245. package/dist/types/ESObjects/general/ESLocalRegularPolygon.d.ts.map +1 -0
  246. package/dist/types/ESObjects/general/ESLocalSkyBox.d.ts +88 -87
  247. package/dist/types/ESObjects/general/ESLocalSkyBox.d.ts.map +1 -0
  248. package/dist/types/ESObjects/general/ESLocationMeasurement.d.ts +61 -61
  249. package/dist/types/ESObjects/general/ESLocationMeasurement.d.ts.map +1 -0
  250. package/dist/types/ESObjects/general/ESMsTileset/index.d.ts +145 -144
  251. package/dist/types/ESObjects/general/ESMsTileset/index.d.ts.map +1 -0
  252. package/dist/types/ESObjects/general/ESMsTileset/types.d.ts +8 -7
  253. package/dist/types/ESObjects/general/ESMsTileset/types.d.ts.map +1 -0
  254. package/dist/types/ESObjects/general/ESNavigator.d.ts +44 -43
  255. package/dist/types/ESObjects/general/ESNavigator.d.ts.map +1 -0
  256. package/dist/types/ESObjects/general/ESParticleSystemPrimitive.d.ts +143 -142
  257. package/dist/types/ESObjects/general/ESParticleSystemPrimitive.d.ts.map +1 -0
  258. package/dist/types/ESObjects/general/ESPath/ESPathImpl/CurrentInfoType.d.ts +7 -6
  259. package/dist/types/ESObjects/general/ESPath/ESPathImpl/CurrentInfoType.d.ts.map +1 -0
  260. package/dist/types/ESObjects/general/ESPath/ESPathImpl/GetCurrentFuncType.d.ts +4 -3
  261. package/dist/types/ESObjects/general/ESPath/ESPathImpl/GetCurrentFuncType.d.ts.map +1 -0
  262. package/dist/types/ESObjects/general/ESPath/ESPathImpl/PolylineResetting.d.ts +6 -5
  263. package/dist/types/ESObjects/general/ESPath/ESPathImpl/PolylineResetting.d.ts.map +1 -0
  264. package/dist/types/ESObjects/general/ESPath/ESPathImpl/RotLerpModeType.d.ts +2 -1
  265. package/dist/types/ESObjects/general/ESPath/ESPathImpl/RotLerpModeType.d.ts.map +1 -0
  266. package/dist/types/ESObjects/general/ESPath/ESPathImpl/computeRotIfUndefined.d.ts +13 -12
  267. package/dist/types/ESObjects/general/ESPath/ESPathImpl/computeRotIfUndefined.d.ts.map +1 -0
  268. package/dist/types/ESObjects/general/ESPath/ESPathImpl/dataTextMd.d.ts +2 -1
  269. package/dist/types/ESObjects/general/ESPath/ESPathImpl/dataTextMd.d.ts.map +1 -0
  270. package/dist/types/ESObjects/general/ESPath/ESPathImpl/getCurrent.d.ts +19 -18
  271. package/dist/types/ESObjects/general/ESPath/ESPathImpl/getCurrent.d.ts.map +1 -0
  272. package/dist/types/ESObjects/general/ESPath/ESPathImpl/index.d.ts +113 -112
  273. package/dist/types/ESObjects/general/ESPath/ESPathImpl/index.d.ts.map +1 -0
  274. package/dist/types/ESObjects/general/ESPath/ESPathImpl/parseData.d.ts +3 -2
  275. package/dist/types/ESObjects/general/ESPath/ESPathImpl/parseData.d.ts.map +1 -0
  276. package/dist/types/ESObjects/general/ESPath/ESPathImpl/subPath.d.ts +3 -2
  277. package/dist/types/ESObjects/general/ESPath/ESPathImpl/subPath.d.ts.map +1 -0
  278. package/dist/types/ESObjects/general/ESPath/ESPathImpl/subdivide.d.ts +1 -0
  279. package/dist/types/ESObjects/general/ESPath/ESPathImpl/subdivide.d.ts.map +1 -0
  280. package/dist/types/ESObjects/general/ESPath/ESPathImpl/timePosRotsMd.d.ts +2 -1
  281. package/dist/types/ESObjects/general/ESPath/ESPathImpl/timePosRotsMd.d.ts.map +1 -0
  282. package/dist/types/ESObjects/general/ESPath/index.d.ts +114 -113
  283. package/dist/types/ESObjects/general/ESPath/index.d.ts.map +1 -0
  284. package/dist/types/ESObjects/general/ESPipeFence.d.ts +101 -100
  285. package/dist/types/ESObjects/general/ESPipeFence.d.ts.map +1 -0
  286. package/dist/types/ESObjects/general/ESPipeline.d.ts +117 -116
  287. package/dist/types/ESObjects/general/ESPipeline.d.ts.map +1 -0
  288. package/dist/types/ESObjects/general/ESPipeserTileset.d.ts +120 -119
  289. package/dist/types/ESObjects/general/ESPipeserTileset.d.ts.map +1 -0
  290. package/dist/types/ESObjects/general/ESPit.d.ts +102 -98
  291. package/dist/types/ESObjects/general/ESPit.d.ts.map +1 -0
  292. package/dist/types/ESObjects/general/ESPlayer/AbsolutePlayer.d.ts +30 -29
  293. package/dist/types/ESObjects/general/ESPlayer/AbsolutePlayer.d.ts.map +1 -0
  294. package/dist/types/ESObjects/general/ESPlayer/index.d.ts +60 -59
  295. package/dist/types/ESObjects/general/ESPlayer/index.d.ts.map +1 -0
  296. package/dist/types/ESObjects/general/ESPoi2D.d.ts +119 -118
  297. package/dist/types/ESObjects/general/ESPoi2D.d.ts.map +1 -0
  298. package/dist/types/ESObjects/general/ESPoi3D.d.ts +80 -79
  299. package/dist/types/ESObjects/general/ESPoi3D.d.ts.map +1 -0
  300. package/dist/types/ESObjects/general/ESPoiTileset.d.ts +69 -68
  301. package/dist/types/ESObjects/general/ESPoiTileset.d.ts.map +1 -0
  302. package/dist/types/ESObjects/general/ESPolygonFence.d.ts +89 -88
  303. package/dist/types/ESObjects/general/ESPolygonFence.d.ts.map +1 -0
  304. package/dist/types/ESObjects/general/ESPolygonFlattenedPlane.d.ts +87 -86
  305. package/dist/types/ESObjects/general/ESPolygonFlattenedPlane.d.ts.map +1 -0
  306. package/dist/types/ESObjects/general/ESPolygonWithHole.d.ts +83 -82
  307. package/dist/types/ESObjects/general/ESPolygonWithHole.d.ts.map +1 -0
  308. package/dist/types/ESObjects/general/ESRectangle.d.ts +98 -97
  309. package/dist/types/ESObjects/general/ESRectangle.d.ts.map +1 -0
  310. package/dist/types/ESObjects/general/ESRefVoxels.d.ts +1 -0
  311. package/dist/types/ESObjects/general/ESRefVoxels.d.ts.map +1 -0
  312. package/dist/types/ESObjects/general/ESRtsFeatureEditing/index.d.ts +132 -131
  313. package/dist/types/ESObjects/general/ESRtsFeatureEditing/index.d.ts.map +1 -0
  314. package/dist/types/ESObjects/general/ESRtsFeatureEditing/types.d.ts +7 -6
  315. package/dist/types/ESObjects/general/ESRtsFeatureEditing/types.d.ts.map +1 -0
  316. package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts +166 -165
  317. package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts.map +1 -0
  318. package/dist/types/ESObjects/general/ESRtsTileset/types.d.ts +52 -51
  319. package/dist/types/ESObjects/general/ESRtsTileset/types.d.ts.map +1 -0
  320. package/dist/types/ESObjects/general/ESScale.d.ts +42 -41
  321. package/dist/types/ESObjects/general/ESScale.d.ts.map +1 -0
  322. package/dist/types/ESObjects/general/ESSeparateFoliage/CallFunc.d.ts +67 -66
  323. package/dist/types/ESObjects/general/ESSeparateFoliage/CallFunc.d.ts.map +1 -0
  324. package/dist/types/ESObjects/general/ESSeparateFoliage/index.d.ts +110 -109
  325. package/dist/types/ESObjects/general/ESSeparateFoliage/index.d.ts.map +1 -0
  326. package/dist/types/ESObjects/general/ESSkylineAnalysis/index.d.ts +73 -0
  327. package/dist/types/ESObjects/general/ESSkylineAnalysis/index.d.ts.map +1 -0
  328. package/dist/types/ESObjects/general/ESStaticMesh.d.ts +70 -69
  329. package/dist/types/ESObjects/general/ESStaticMesh.d.ts.map +1 -0
  330. package/dist/types/ESObjects/general/ESSubmergingAnalysis/bufferUtils.d.ts +7 -6
  331. package/dist/types/ESObjects/general/ESSubmergingAnalysis/bufferUtils.d.ts.map +1 -0
  332. package/dist/types/ESObjects/general/ESSubmergingAnalysis/index.d.ts +122 -121
  333. package/dist/types/ESObjects/general/ESSubmergingAnalysis/index.d.ts.map +1 -0
  334. package/dist/types/ESObjects/general/ESSubmergingAnalysis/parseGlb.d.ts +9 -8
  335. package/dist/types/ESObjects/general/ESSubmergingAnalysis/parseGlb.d.ts.map +1 -0
  336. package/dist/types/ESObjects/general/ESSunshineAnalysis/index.d.ts +95 -94
  337. package/dist/types/ESObjects/general/ESSunshineAnalysis/index.d.ts.map +1 -0
  338. package/dist/types/ESObjects/general/ESSurfaceAreaMeasurement.d.ts +81 -80
  339. package/dist/types/ESObjects/general/ESSurfaceAreaMeasurement.d.ts.map +1 -0
  340. package/dist/types/ESObjects/general/ESTerrainLayer.d.ts +85 -77
  341. package/dist/types/ESObjects/general/ESTerrainLayer.d.ts.map +1 -0
  342. package/dist/types/ESObjects/general/ESTextLabel.d.ts +137 -136
  343. package/dist/types/ESObjects/general/ESTextLabel.d.ts.map +1 -0
  344. package/dist/types/ESObjects/general/ESUEWidget.d.ts +118 -117
  345. package/dist/types/ESObjects/general/ESUEWidget.d.ts.map +1 -0
  346. package/dist/types/ESObjects/general/ESUnrealActor.d.ts +86 -85
  347. package/dist/types/ESObjects/general/ESUnrealActor.d.ts.map +1 -0
  348. package/dist/types/ESObjects/general/ESVideoFusion.d.ts +102 -101
  349. package/dist/types/ESObjects/general/ESVideoFusion.d.ts.map +1 -0
  350. package/dist/types/ESObjects/general/ESViewShed.d.ts +90 -89
  351. package/dist/types/ESObjects/general/ESViewShed.d.ts.map +1 -0
  352. package/dist/types/ESObjects/general/ESViewerStatusBar.d.ts +45 -44
  353. package/dist/types/ESObjects/general/ESViewerStatusBar.d.ts.map +1 -0
  354. package/dist/types/ESObjects/general/ESViewerStatusBarScale.d.ts +45 -44
  355. package/dist/types/ESObjects/general/ESViewerStatusBarScale.d.ts.map +1 -0
  356. package/dist/types/ESObjects/general/ESVisibilityAnalysis.d.ts +93 -92
  357. package/dist/types/ESObjects/general/ESVisibilityAnalysis.d.ts.map +1 -0
  358. package/dist/types/ESObjects/general/ESVolumeMeasurement.d.ts +92 -91
  359. package/dist/types/ESObjects/general/ESVolumeMeasurement.d.ts.map +1 -0
  360. package/dist/types/ESObjects/general/ESWidget.d.ts +117 -116
  361. package/dist/types/ESObjects/general/ESWidget.d.ts.map +1 -0
  362. package/dist/types/ESObjects/general/index.d.ts +87 -85
  363. package/dist/types/ESObjects/general/index.d.ts.map +1 -0
  364. package/dist/types/ESObjects/index.d.ts +3 -2
  365. package/dist/types/ESObjects/index.d.ts.map +1 -0
  366. package/dist/types/ESViewer/ContainerStyleController.d.ts +9 -8
  367. package/dist/types/ESViewer/ContainerStyleController.d.ts.map +1 -0
  368. package/dist/types/ESViewer/ESViewer.d.ts +413 -390
  369. package/dist/types/ESViewer/ESViewer.d.ts.map +1 -0
  370. package/dist/types/ESViewer/Resetting/index.d.ts +15 -14
  371. package/dist/types/ESViewer/Resetting/index.d.ts.map +1 -0
  372. package/dist/types/ESViewer/StatusContainer.d.ts +11 -10
  373. package/dist/types/ESViewer/StatusContainer.d.ts.map +1 -0
  374. package/dist/types/ESViewer/ViewerContainer.d.ts +16 -15
  375. package/dist/types/ESViewer/ViewerContainer.d.ts.map +1 -0
  376. package/dist/types/ESViewer/ViewerContext.d.ts +10 -9
  377. package/dist/types/ESViewer/ViewerContext.d.ts.map +1 -0
  378. package/dist/types/ESViewer/ViewerCustomInteraction.d.ts +10 -9
  379. package/dist/types/ESViewer/ViewerCustomInteraction.d.ts.map +1 -0
  380. package/dist/types/ESViewer/getContainer.d.ts +3 -2
  381. package/dist/types/ESViewer/getContainer.d.ts.map +1 -0
  382. package/dist/types/ESViewer/index.d.ts +3 -2
  383. package/dist/types/ESViewer/index.d.ts.map +1 -0
  384. package/dist/types/EngineObject/EditingObjectContext.d.ts +14 -13
  385. package/dist/types/EngineObject/EditingObjectContext.d.ts.map +1 -0
  386. package/dist/types/EngineObject/EngineObjectsContext.d.ts +14 -13
  387. package/dist/types/EngineObject/EngineObjectsContext.d.ts.map +1 -0
  388. package/dist/types/EngineObject/index.d.ts +22 -21
  389. package/dist/types/EngineObject/index.d.ts.map +1 -0
  390. package/dist/types/copyright.d.ts +14 -13
  391. package/dist/types/copyright.d.ts.map +1 -0
  392. package/dist/types/index.d.ts +8 -7
  393. package/dist/types/index.d.ts.map +1 -0
  394. package/dist/types/utils/PropTrees/PropTree.d.ts +7 -6
  395. package/dist/types/utils/PropTrees/PropTree.d.ts.map +1 -0
  396. package/dist/types/utils/PropTrees/PropTreeItem.d.ts +16 -15
  397. package/dist/types/utils/PropTrees/PropTreeItem.d.ts.map +1 -0
  398. package/dist/types/utils/PropTrees/PropUiTreeManager.d.ts +18 -17
  399. package/dist/types/utils/PropTrees/PropUiTreeManager.d.ts.map +1 -0
  400. package/dist/types/utils/PropTrees/index.d.ts +4 -3
  401. package/dist/types/utils/PropTrees/index.d.ts.map +1 -0
  402. package/dist/types/utils/SceneTrees/SceneTree.d.ts +108 -107
  403. package/dist/types/utils/SceneTrees/SceneTree.d.ts.map +1 -0
  404. package/dist/types/utils/SceneTrees/SceneTreeContextMenu.d.ts +20 -19
  405. package/dist/types/utils/SceneTrees/SceneTreeContextMenu.d.ts.map +1 -0
  406. package/dist/types/utils/SceneTrees/SceneTreeItem.d.ts +47 -46
  407. package/dist/types/utils/SceneTrees/SceneTreeItem.d.ts.map +1 -0
  408. package/dist/types/utils/SceneTrees/SceneTreeItemDragDrop.d.ts +7 -6
  409. package/dist/types/utils/SceneTrees/SceneTreeItemDragDrop.d.ts.map +1 -0
  410. package/dist/types/utils/SceneTrees/SceneTreeJsonLoading.d.ts +20 -19
  411. package/dist/types/utils/SceneTrees/SceneTreeJsonLoading.d.ts.map +1 -0
  412. package/dist/types/utils/SceneTrees/defaultCreateSceneObject.d.ts +5 -4
  413. package/dist/types/utils/SceneTrees/defaultCreateSceneObject.d.ts.map +1 -0
  414. package/dist/types/utils/SceneTrees/defaultCreateTreeItemDragDrop.d.ts +4 -3
  415. package/dist/types/utils/SceneTrees/defaultCreateTreeItemDragDrop.d.ts.map +1 -0
  416. package/dist/types/utils/SceneTrees/defaultLight122FromEnvironmentMapManager.d.ts +9 -8
  417. package/dist/types/utils/SceneTrees/defaultLight122FromEnvironmentMapManager.d.ts.map +1 -0
  418. package/dist/types/utils/SceneTrees/defaultShowSceneObject.d.ts +4 -3
  419. package/dist/types/utils/SceneTrees/defaultShowSceneObject.d.ts.map +1 -0
  420. package/dist/types/utils/SceneTrees/index.d.ts +7 -6
  421. package/dist/types/utils/SceneTrees/index.d.ts.map +1 -0
  422. package/dist/types/utils/SceneTrees/preload.d.ts +9 -8
  423. package/dist/types/utils/SceneTrees/preload.d.ts.map +1 -0
  424. package/dist/types/utils/base/DragStartDataManager.d.ts +16 -15
  425. package/dist/types/utils/base/DragStartDataManager.d.ts.map +1 -0
  426. package/dist/types/utils/base/TreeItemDragDrop.d.ts +12 -11
  427. package/dist/types/utils/base/TreeItemDragDrop.d.ts.map +1 -0
  428. package/dist/types/utils/base/bindCustomEditing.d.ts +4 -3
  429. package/dist/types/utils/base/bindCustomEditing.d.ts.map +1 -0
  430. package/dist/types/utils/base/defaultInitSceneObjectOnCreatingFunc.d.ts +3 -2
  431. package/dist/types/utils/base/defaultInitSceneObjectOnCreatingFunc.d.ts.map +1 -0
  432. package/dist/types/utils/base/defaultUpdateSceneObjectOnPickingFunc.d.ts +4 -3
  433. package/dist/types/utils/base/defaultUpdateSceneObjectOnPickingFunc.d.ts.map +1 -0
  434. package/dist/types/utils/base/getDefaultValue.d.ts +2 -1
  435. package/dist/types/utils/base/getDefaultValue.d.ts.map +1 -0
  436. package/dist/types/utils/base/hasSameTags.d.ts +3 -2
  437. package/dist/types/utils/base/hasSameTags.d.ts.map +1 -0
  438. package/dist/types/utils/base/inOrderRunning.d.ts +2 -1
  439. package/dist/types/utils/base/inOrderRunning.d.ts.map +1 -0
  440. package/dist/types/utils/base/index.d.ts +13 -12
  441. package/dist/types/utils/base/index.d.ts.map +1 -0
  442. package/dist/types/utils/base/lerpAngle.d.ts +5 -4
  443. package/dist/types/utils/base/lerpAngle.d.ts.map +1 -0
  444. package/dist/types/utils/base/rpToap.d.ts +7 -6
  445. package/dist/types/utils/base/rpToap.d.ts.map +1 -0
  446. package/dist/types/utils/base/sceneObjectTreeItem.d.ts +5 -4
  447. package/dist/types/utils/base/sceneObjectTreeItem.d.ts.map +1 -0
  448. package/dist/types/utils/base/utils.d.ts +7 -6
  449. package/dist/types/utils/base/utils.d.ts.map +1 -0
  450. package/dist/types/utils/components/ESSceneObjectWithId.d.ts +39 -38
  451. package/dist/types/utils/components/ESSceneObjectWithId.d.ts.map +1 -0
  452. package/dist/types/utils/components/Player.d.ts +33 -32
  453. package/dist/types/utils/components/Player.d.ts.map +1 -0
  454. package/dist/types/utils/components/Watcher.d.ts +35 -34
  455. package/dist/types/utils/components/Watcher.d.ts.map +1 -0
  456. package/dist/types/utils/components/WatcherTools/index.d.ts +2 -1
  457. package/dist/types/utils/components/WatcherTools/index.d.ts.map +1 -0
  458. package/dist/types/utils/components/WatcherTools/toolsForWatcher.d.ts +16 -15
  459. package/dist/types/utils/components/WatcherTools/toolsForWatcher.d.ts.map +1 -0
  460. package/dist/types/utils/components/index.d.ts +5 -4
  461. package/dist/types/utils/components/index.d.ts.map +1 -0
  462. package/dist/types/utils/index.d.ts +10 -9
  463. package/dist/types/utils/index.d.ts.map +1 -0
  464. package/dist/types/utils/proj4/getDistancesFromPositions.d.ts +4 -3
  465. package/dist/types/utils/proj4/getDistancesFromPositions.d.ts.map +1 -0
  466. package/dist/types/utils/proj4/getXyzFromPostion.d.ts +2 -1
  467. package/dist/types/utils/proj4/getXyzFromPostion.d.ts.map +1 -0
  468. package/dist/types/utils/proj4/index.d.ts +4 -3
  469. package/dist/types/utils/proj4/index.d.ts.map +1 -0
  470. package/dist/types/utils/proj4/lbhToXyz.d.ts +5 -4
  471. package/dist/types/utils/proj4/lbhToXyz.d.ts.map +1 -0
  472. package/dist/types/utils/react.d.ts +4 -3
  473. package/dist/types/utils/react.d.ts.map +1 -0
  474. package/dist/types/utils/registerCreatedEventUpdate.d.ts +4 -3
  475. package/dist/types/utils/registerCreatedEventUpdate.d.ts.map +1 -0
  476. package/dist/types/utils/registerEventUpdate.d.ts +3 -2
  477. package/dist/types/utils/registerEventUpdate.d.ts.map +1 -0
  478. package/dist/types/utils/turf/booleanPointInPolygon.d.ts +9 -8
  479. package/dist/types/utils/turf/booleanPointInPolygon.d.ts.map +1 -0
  480. package/dist/types/utils/turf/geoAlong.d.ts +9 -8
  481. package/dist/types/utils/turf/geoAlong.d.ts.map +1 -0
  482. package/dist/types/utils/turf/geoArea.d.ts +8 -7
  483. package/dist/types/utils/turf/geoArea.d.ts.map +1 -0
  484. package/dist/types/utils/turf/geoCenterOfMass.d.ts +8 -7
  485. package/dist/types/utils/turf/geoCenterOfMass.d.ts.map +1 -0
  486. package/dist/types/utils/turf/geoDestination.d.ts +11 -10
  487. package/dist/types/utils/turf/geoDestination.d.ts.map +1 -0
  488. package/dist/types/utils/turf/geoDistance.d.ts +9 -8
  489. package/dist/types/utils/turf/geoDistance.d.ts.map +1 -0
  490. package/dist/types/utils/turf/geoHeading.d.ts +9 -8
  491. package/dist/types/utils/turf/geoHeading.d.ts.map +1 -0
  492. package/dist/types/utils/turf/geoLineIntersect.d.ts +9 -8
  493. package/dist/types/utils/turf/geoLineIntersect.d.ts.map +1 -0
  494. package/dist/types/utils/turf/geoMidpoint.d.ts +3 -2
  495. package/dist/types/utils/turf/geoMidpoint.d.ts.map +1 -0
  496. package/dist/types/utils/turf/geoNearestPointOnLine.d.ts +20 -19
  497. package/dist/types/utils/turf/geoNearestPointOnLine.d.ts.map +1 -0
  498. package/dist/types/utils/turf/geoPointToLineDistance.d.ts +9 -8
  499. package/dist/types/utils/turf/geoPointToLineDistance.d.ts.map +1 -0
  500. package/dist/types/utils/turf/geoRhumbDestination.d.ts +11 -10
  501. package/dist/types/utils/turf/geoRhumbDestination.d.ts.map +1 -0
  502. package/dist/types/utils/turf/geoRhumbDistance.d.ts +9 -8
  503. package/dist/types/utils/turf/geoRhumbDistance.d.ts.map +1 -0
  504. package/dist/types/utils/turf/geoRhumbHeading.d.ts +9 -8
  505. package/dist/types/utils/turf/geoRhumbHeading.d.ts.map +1 -0
  506. package/dist/types/utils/turf/geoTools.d.ts +48 -47
  507. package/dist/types/utils/turf/geoTools.d.ts.map +1 -0
  508. package/dist/types/utils/turf/getGeoBoundingSphereFromPositions.d.ts +6 -5
  509. package/dist/types/utils/turf/getGeoBoundingSphereFromPositions.d.ts.map +1 -0
  510. package/dist/types/utils/turf/getMinMaxCorner.d.ts +6 -5
  511. package/dist/types/utils/turf/getMinMaxCorner.d.ts.map +1 -0
  512. package/dist/types/utils/turf/index.d.ts +18 -17
  513. package/dist/types/utils/turf/index.d.ts.map +1 -0
  514. package/package.json +51 -45
  515. package/dist/earthsdk3.cjs +0 -58283
  516. package/dist/earthsdk3.mjs +0 -57973
@@ -0,0 +1,797 @@
1
+ var EarthSDK3=function(X){"use strict";var zC=Object.defineProperty;var UC=(X,ki,Ju)=>ki in X?zC(X,ki,{enumerable:!0,configurable:!0,writable:!0,value:Ju}):X[ki]=Ju;var D=(X,ki,Ju)=>UC(X,typeof ki!="symbol"?ki+"":ki,Ju);function ki(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Ju(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?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(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var Xc={exports:{}};/*! For license information please see xbsj-base.js.LICENSE.txt */var h0=Xc.exports,tp;function f0(){return tp||(tp=1,function(r,e){(function(t,n){r.exports=n()})(h0,()=>(()=>{var t={109:function(o,s,a){var c,f=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(h[u]=d[u])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function h(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(h.prototype=y.prototype,new h)}),m=this&&this.__read||function(_,y){var h=typeof Symbol=="function"&&_[Symbol.iterator];if(!h)return _;var d,u,l=h.call(_),v=[];try{for(;(y===void 0||y-- >0)&&!(d=l.next()).done;)v.push(d.value)}catch(b){u={error:b}}finally{try{d&&!d.done&&(h=l.return)&&h.call(l)}finally{if(u)throw u.error}}return v};Object.defineProperty(s,"__esModule",{value:!0}),s.DebouncingDeprecated=void 0;var p=a(6891),g=a(1662),w=function(_){function y(h){h===void 0&&(h=300);var d=_.call(this,function(u){var l=u.progressFunc,v=(u.completeFunc,u.errorFunc,m((0,g.debounce)(function(){if(!d._lastDebounceValue)throw new Error("!this._lastDebounceValue");l([d._lastDebounceValue,d._debouncTimes]),d._debouncTimes=0},d._delayTime),2)),b=v[0],E=v[1];return d._d=b,function(){E()}})||this;return d._delayTime=h,d._debouncTimes=0,d}return f(y,_),Object.defineProperty(y.prototype,"delayTime",{get:function(){return this._delayTime},enumerable:!1,configurable:!0}),y.prototype.debounce=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];this.isRunning?(++this._debouncTimes,this._lastDebounceValue=h,this._d&&this._d()):console.warn("Debouncing is not running!")},y}(p.ProcessingDeprecated);s.DebouncingDeprecated=w},146:function(o,s,a){var c,f=this&&this.__extends||(c=function(v,b){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,S){E.__proto__=S}||function(E,S){for(var P in S)Object.prototype.hasOwnProperty.call(S,P)&&(E[P]=S[P])},c(v,b)},function(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function E(){this.constructor=v}c(v,b),v.prototype=b===null?Object.create(b):(E.prototype=b.prototype,new E)}),m=this&&this.__read||function(v,b){var E=typeof Symbol=="function"&&v[Symbol.iterator];if(!E)return v;var S,P,C=E.call(v),x=[];try{for(;(b===void 0||b-- >0)&&!(S=C.next()).done;)x.push(S.value)}catch(O){P={error:O}}finally{try{S&&!S.done&&(E=C.return)&&E.call(C)}finally{if(P)throw P.error}}return x};Object.defineProperty(s,"__esModule",{value:!0}),s.SceneObjectWithId=s.SceneObjectIdWatching=s.getSceneObjectReactFromId=s.SceneObjectFromId=void 0;var p=a(1662),g=a(2220),w=a(7372),_=a(3815),y=function(v){function b(E){var S=v.call(this)||this;S._id=E,S._sceneObject=S.disposeVar((0,w.react)(void 0)),S.dispose(function(){S._sceneObject.value=void 0});var P=g.SceneObject.getSceneObjById(S._id);return P&&(S._sceneObject.value=P),S.dispose(g.SceneObject.context.sceneObjCreatedEvent.disposableOn(function(C){C.id===S._id&&(S._sceneObject.value=C)})),S.dispose(g.SceneObject.context.sceneObjToDestroyEvent.disposableOn(function(C){C.id===S._id&&(S._sceneObject.value=void 0)})),S}return f(b,v),Object.defineProperty(b.prototype,"sceneObject",{get:function(){return this._sceneObject.value},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"sceneObjectChanged",{get:function(){return this._sceneObject.changed},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),b}(w.Destroyable);function h(v){var b=m((0,p.getReactFuncs)(v),3),E=b[0],S=(b[1],b[2]),P=(0,w.react)(void 0);return P.disposeVar(new _.ObjResettingWithEvent(S,function(){var C=E();if(C){var x=new y(C),O=function(){P.value=x.sceneObject};return O(),x.dispose(x.sceneObjectChanged.disposableOn(O)),x}P.value=void 0})),P}s.SceneObjectFromId=y,s.getSceneObjectReactFromId=h;var d=function(v){function b(E,S){var P=v.call(this)||this,C=P.disposeVar(h(E));return P.disposeVar(new _.ObjResettingWithEvent(C.changed,function(){var x=C.value;if(x)return S(x)})),P}return f(b,v),b}(w.Destroyable);s.SceneObjectIdWatching=d;var u=function(v){function b(E,S){var P=v.call(this)||this;P._id=E,P._sofi=P.disposeVar(new y(P._id));var C=function(){S.sceneObject=P._sofi.sceneObject};return C(),P.dispose(P._sofi.sceneObjectChanged.disposableOn(C)),P}return f(b,v),b}(w.Destroyable),l=function(v){function b(){var E=v.call(this)||this;return E._id=E.disposeVar((0,w.react)(void 0)),E._sceneObject=E.disposeVar((0,w.react)(void 0)),E._resetting=E.disposeVar(new _.ObjResettingWithEvent(E.idChanged,function(){var S=E.id;if(S!==void 0&&S!=="")return new u(S,E);E.sceneObject=void 0})),E}return f(b,v),Object.defineProperty(b.prototype,"id",{get:function(){return this._id.value},set:function(E){this._id.value=E},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"idChanged",{get:function(){return this._id.changed},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"sceneObject",{get:function(){return this._sceneObject.value},set:function(E){this._sceneObject.value=E},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"sceneObjectChanged",{get:function(){return this._sceneObject.changed},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"resetting",{get:function(){return this._resetting},enumerable:!1,configurable:!0}),b}(w.Destroyable);s.SceneObjectWithId=l},172:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(6928),s),f(a(7445),s)},200:function(o,s,a){var c,f=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(h[u]=d[u])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function h(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(h.prototype=y.prototype,new h)});Object.defineProperty(s,"__esModule",{value:!0}),s.DivPoi=void 0;var m=a(7372),p=a(7372),g=a(7324),w=function(_){function y(h,d){var u=_.call(this)||this;return u._customDivClass=h,u._divContainer=d,u._show=!1,u.dispose(function(){u.show=!1}),u}return f(y,_),y.prototype._updateDivPoi=function(){if(this._show){var h=this.floatDiv;h.element.parentElement||this._divContainer.appendChild(h.element)}else{var d=this._floatDiv;d&&d.element.parentElement&&this._divContainer.removeChild(d.element)}},Object.defineProperty(y.prototype,"show",{get:function(){return this._show},set:function(h){this._show!==h&&(this._show=h,this._updateDivPoi(),this._showChanged&&this._showChanged.emit(h))},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"floatDiv",{get:function(){var h=this;if(!this._floatDiv){var d=(0,g.getFloatDivPool)(this._customDivClass).create();this.dispose(function(){(0,g.getFloatDivPool)(h._customDivClass).destroy(d)}),this._floatDiv=d}return this._floatDiv},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"showChanged",{get:function(){return this._showChanged||(this._showChanged=new m.Event),this._showChanged},enumerable:!1,configurable:!0}),y}(p.Destroyable);s.DivPoi=w},312:(o,s)=>{var a;Object.defineProperty(s,"__esModule",{value:!0}),s.Intersect=void 0,(a=s.Intersect||(s.Intersect={})).OUTSIDE=-1,a.INTERSECTING=0,a.INSIDE=1},345:(o,s)=>{function a(c){var f=0|+c;if(f.toString()===c)return f}Object.defineProperty(s,"__esModule",{value:!0}),s.observeArray=void 0,s.observeArray=function(c,f){if(!Array.isArray(c))throw new Error("!Array.isArray(array)");return new Proxy(c,{set:function(m,p,g,w){var _=m;if(typeof p!="string")throw new Error("typeof key !== string");var y=a(p);if(y===void 0)return Reflect.set(_,p,g,w);if(y<0)throw new Error("n < 0 || n >= array.length");return!!f({type:_[y]===void 0?"insert":"update",index:y,oldValue:_[y],value:g})&&Reflect.set(m,p,g,w)},deleteProperty:function(m,p){var g=m;if(typeof p!="string")throw new Error("typeof key !== string");var w=a(p);if(w===void 0)return Reflect.deleteProperty(m,p);if(w<0||w>=g.length)throw new Error("n < 0 || n >= array.length");return!!f({type:"delete",index:w,oldValue:g[w],value:void 0})&&Reflect.deleteProperty(m,p)}})}},433:function(o,s){var a=this&&this.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var g,w,_=p.call(f),y=[];try{for(;(m===void 0||m-- >0)&&!(g=_.next()).done;)y.push(g.value)}catch(h){w={error:h}}finally{try{g&&!g.done&&(p=_.return)&&p.call(_)}finally{if(w)throw w.error}}return y},c=this&&this.__spreadArray||function(f,m,p){if(p||arguments.length===2)for(var g,w=0,_=m.length;w<_;w++)!g&&w in m||(g||(g=Array.prototype.slice.call(m,0,w)),g[w]=m[w]);return f.concat(g||Array.prototype.slice.call(m))};Object.defineProperty(s,"__esModule",{value:!0}),s.magicStrToUint32=void 0,s.magicStrToUint32=function(f){if(f.length>4)throw new Error("getMagic error! str.length > 4");return function(m){return c([],a(m),!1).reverse().reduce(function(p,g){return(p<<=8)+g.codePointAt(0)},0)}(f)}},476:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.some=void 0;var c=a(6301);s.some=function(f,m){return(0,c.forEachWithBreak)(f,function(p,g){return m(p,g)})}},507:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)}),m=this&&this.__read||function(h,d){var u=typeof Symbol=="function"&&h[Symbol.iterator];if(!u)return h;var l,v,b=u.call(h),E=[];try{for(;(d===void 0||d-- >0)&&!(l=b.next()).done;)E.push(l.value)}catch(S){v={error:S}}finally{try{l&&!l.done&&(u=b.return)&&u.call(b)}finally{if(v)throw v.error}}return E};Object.defineProperty(s,"__esModule",{value:!0}),s.PointerClickDeprecated=void 0;var p=a(109),g=a(7372),w=a(2299),_=a(7372),y=function(h){function d(u){var l=h.call(this)||this;l._clickEvent=new _.Event,l._dbclickEvent=new _.Event,l._downEvent=new _.Event,l._upEvent=new _.Event,l._moveEvent=new _.Event,l._debouncing=new p.DebouncingDeprecated(300),l.dispose(function(){l._clickEvent.destroy(),l._dbclickEvent.destroy(),l._downEvent.destroy(),l._upEvent.destroy(),l._moveEvent.destroy(),l._debouncing.destroy()});var v=!1,b=[0,0],E=!1;l._debouncing.progressFunc=function(O){var I=m(O,2),N=m(I[0],3),T=N[0],R=N[1],A=N[2],B=I[1];B===1?l._clickEvent.emit(T,R,A):B>=2?l._dbclickEvent.emit(T,R,A):console.error("point click should not be here!")},l._debouncing.start(),l.dispose(function(){l._debouncing.isRunning&&l._debouncing.cancel(),l._debouncing.destroy()});var S=function(O){v=!0;var I=m((0,w.getDomEventCurrentTargetPos)(O),2),N=I[0],T=I[1];b[0]=N,b[1]=T,l._downEvent.emit(N,T,O)},P=function(O){var I=m((0,w.getDomEventCurrentTargetPos)(O),2),N=I[0],T=I[1];v&&!E&&l._debouncing.debounce(N,T,O),v=!1,E=!1,l._upEvent.emit(N,T,O)},C=function(O){var I=m((0,w.getDomEventCurrentTargetPos)(O),2),N=I[0],T=I[1];if(v&&!E){var R=m(b,2),A=R[0],B=R[1];(Math.abs(N-A)>3||Math.abs(T-B)>3)&&(E=!0)}l._moveEvent.emit(N,T,O)},x=function(){v=!1,E=!1};return u.addEventListener("pointerdown",S),u.addEventListener("pointerup",P),u.addEventListener("pointermove",C),u.addEventListener("pointerout",x),l.dispose(function(){u.removeEventListener("pointerdown",S),u.removeEventListener("pointerup",P),u.removeEventListener("pointermove",C),u.removeEventListener("pointerout",x)}),l}return f(d,h),Object.defineProperty(d.prototype,"clickEvent",{get:function(){return this._clickEvent},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"dbclickEvent",{get:function(){return this._dbclickEvent},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"downEvent",{get:function(){return this._downEvent},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"upEvent",{get:function(){return this._upEvent},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"moveEvent",{get:function(){return this._moveEvent},enumerable:!1,configurable:!0}),d}(g.Destroyable);s.PointerClickDeprecated=y},602:(o,s)=>{var a,c,f,m,p,g,w,_,y;Object.defineProperty(s,"__esModule",{value:!0}),s.Tween=void 0,(a=s.Tween||(s.Tween={})).Linear=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),u*h/l+d},(y=a.Quad||(a.Quad={})).easeIn=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),u*(h/=l)*h+d},y.easeOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),-u*(h/=l)*(h-2)+d},y.easeInOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),(h/=l/2)<1?u/2*h*h+d:-u/2*(--h*(h-2)-1)+d},(_=a.Cubic||(a.Cubic={})).easeIn=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),u*(h/=l)*h*h+d},_.easeOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),u*((h=h/l-1)*h*h+1)+d},_.easeInOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),(h/=l/2)<1?u/2*h*h*h+d:u/2*((h-=2)*h*h+2)+d},(w=a.Quart||(a.Quart={})).easeIn=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),u*(h/=l)*h*h*h+d},w.easeOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),-u*((h=h/l-1)*h*h*h-1)+d},w.easeInOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),(h/=l/2)<1?u/2*h*h*h*h+d:-u/2*((h-=2)*h*h*h-2)+d},(g=a.Quint||(a.Quint={})).easeIn=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),u*(h/=l)*h*h*h*h+d},g.easeOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),u*((h=h/l-1)*h*h*h*h+1)+d},g.easeInOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),(h/=l/2)<1?u/2*h*h*h*h*h+d:u/2*((h-=2)*h*h*h*h+2)+d},(p=a.Sine||(a.Sine={})).easeIn=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),-u*Math.cos(h/l*(Math.PI/2))+u+d},p.easeOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),u*Math.sin(h/l*(Math.PI/2))+d},p.easeInOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),-u/2*(Math.cos(Math.PI*h/l)-1)+d},(m=a.Expo||(a.Expo={})).easeIn=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),h==0?d:u*Math.pow(2,10*(h/l-1))+d},m.easeOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),h==l?d+u:u*(1-Math.pow(2,-10*h/l))+d},m.easeInOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),h==0?d:h==l?d+u:(h/=l/2)<1?u/2*Math.pow(2,10*(h-1))+d:u/2*(2-Math.pow(2,-10*--h))+d},(f=a.Circ||(a.Circ={})).easeIn=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),-u*(Math.sqrt(1-(h/=l)*h)-1)+d},f.easeOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),u*Math.sqrt(1-(h=h/l-1)*h)+d},f.easeInOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),(h/=l/2)<1?-u/2*(Math.sqrt(1-h*h)-1)+d:u/2*(Math.sqrt(1-(h-=2)*h)+1)+d},(c=a.Bounce||(a.Bounce={})).easeIn=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),u-a.Bounce.easeOut(l-h,0,u,l)+d},c.easeOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),(h/=l)<.36363636363636365?u*(7.5625*h*h)+d:h<.7272727272727273?u*(7.5625*(h-=.5454545454545454)*h+.75)+d:h<.9090909090909091?u*(7.5625*(h-=.8181818181818182)*h+.9375)+d:u*(7.5625*(h-=.9545454545454546)*h+.984375)+d},c.easeInOut=function(h,d,u,l){return d===void 0&&(d=0),u===void 0&&(u=1),l===void 0&&(l=1),h<l/2?.5*a.Bounce.easeIn(2*h,0,u,l)+d:.5*a.Bounce.easeOut(2*h-l,0,u,l)+.5*u+d}},643:function(o,s,a){var c=this&&this.__read||function(g,w){var _=typeof Symbol=="function"&&g[Symbol.iterator];if(!_)return g;var y,h,d=_.call(g),u=[];try{for(;(w===void 0||w-- >0)&&!(y=d.next()).done;)u.push(y.value)}catch(l){h={error:l}}finally{try{y&&!y.done&&(_=d.return)&&_.call(d)}finally{if(h)throw h.error}}return u},f=this&&this.__spreadArray||function(g,w,_){if(_||arguments.length===2)for(var y,h=0,d=w.length;h<d;h++)!y&&h in w||(y||(y=Array.prototype.slice.call(w,0,h)),y[h]=w[h]);return g.concat(y||Array.prototype.slice.call(w))};Object.defineProperty(s,"__esModule",{value:!0}),s.cancelableFetchDeprecated=void 0;var m=a(5726);function p(g,w){for(var _=[],y=2;y<arguments.length;y++)_[y-2]=arguments[y];var h=new AbortController,d=h.signal,u=c(_,2),l=u[0],v=u[1];if(v!=null&&v.signal)throw console.error("init?.signal"),new Error("init?.signal");(v=v||{}).signal=d;var b=!1;(0,m._executeSetCancelFuncOrCancelResult)(g,function(){b=!0,h.abort()});var E=fetch(l,v);return w&&(E=E.then(function(S){if(!S.ok)return S;if(!S.body)throw Error("ReadableStream not yet supported in this browser.");var P=S.headers.get("content-length"),C=P?parseInt(P,10):0,x=0;return new Response(new ReadableStream({start:function(O){if(!S.body)throw new Error("!response.body");var I=S.body.getReader();(function N(){I.read().then(function(T){var R=T.done,A=T.value;if(R)O.close();else{if(!A)throw new Error("!value");if(!w)throw new Error("!progressFunc");x+=A.byteLength,w(x,C),O.enqueue(A),N()}}).catch(function(T){O.error(T)})})()}}),{status:S.status,statusText:S.statusText,headers:S.headers})}).catch(function(S){throw b?(S instanceof Error&&S.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new m.CancelError("fetching cancelled!")):(S instanceof Error&&S.code===20&&console.error("error.code === 20"),S)})),E}s.cancelableFetchDeprecated=function(){for(var g=[],w=0;w<arguments.length;w++)g[w]=arguments[w];if(g.length>=1){if(typeof g[0]=="function"||g[0]===void 0){var _={},y=p.apply(void 0,f([_],c(g),!1)),h=_.cancelFunc;if(!h)throw new Error("!cancelResult.cancelFunc");return[h,y]}return p.apply(void 0,f([],c(g),!1))}throw new Error("cancelableFetch args error!")}},709:(o,s,a)=>{a.r(s),a.d(s,{Observable:()=>z});const c="insert",f="update",m="delete",p="reverse",g="shuffle",w=Symbol("observable-meta-key"),_={async:1},y={path:1,pathsOf:1,pathsFrom:1},h={[w]:{value:null},observe:{value:function(j,L){if(typeof j!="function")throw new Error(`observer MUST be a function, got '${j}'`);const F=this[w].observers;if(F.some(G=>G[0]===j))console.warn("observer may be bound to an observable only once; will NOT rebind");else{let G;G=L?function(W){const V={};if(W.path!==void 0){if(typeof W.path!="string"||W.path==="")throw new Error('"path" option, if/when provided, MUST be a non-empty string');V.path=W.path}if(W.pathsOf!==void 0){if(W.path)throw new Error('"pathsOf" option MAY NOT be specified together with "path" option');if(typeof W.pathsOf!="string")throw new Error('"pathsOf" option, if/when provided, MUST be a string (MAY be empty)');V.pathsOf=W.pathsOf.split(".").filter(q=>q)}if(W.pathsFrom!==void 0){if(W.path||W.pathsOf)throw new Error('"pathsFrom" option MAY NOT be specified together with "path"/"pathsOf" option/s');if(typeof W.pathsFrom!="string"||W.pathsFrom==="")throw new Error('"pathsFrom" option, if/when provided, MUST be a non-empty string');V.pathsFrom=W.pathsFrom}const U=Object.keys(W).filter(q=>!y.hasOwnProperty(q));if(U.length)throw new Error(`'${U.join(", ")}' is/are not a valid observer option/s`);return V}(L):{},F.push([j,G])}}},unobserve:{value:function(){const j=this[w].observers;let L=j.length;if(L){let F=arguments.length;if(F)for(;F--;){let G=L;for(;G--;)j[G][0]===arguments[F]&&(j.splice(G,1),L--)}else j.splice(0)}}}},d=function(j,L){h[w].value=L;const F=Object.defineProperties({},h);for(const G of Object.keys(j))F[G]=P(j[G],G,L);return F},u=function(j,L){let F=0,G=j.length;h[w].value=L;const W=Object.defineProperties(new Array(G),h);for(;F<G;F++)W[F]=P(j[F],F,L);return W},l=function(j,L){return h[w].value=L,Object.defineProperties(j,h),j},v=function(j,L){let F=L;if(j.path){const G=j.path;F=L.filter(W=>W.path.join(".")===G)}else if(j.pathsOf){const G=j.pathsOf;F=L.filter(W=>W.path.length===G.length+1||W.path.length===G.length&&(W.type===p||W.type===g))}else if(j.pathsFrom){const G=j.pathsFrom;F=L.filter(W=>W.path.join(".").startsWith(G))}return F},b=function(j,L){try{j(L)}catch(F){console.error(`failed to notify listener ${j} with ${L}`,F)}},E=function(){const j=this.batches;this.batches=null;for(const[L,F]of j)b(L,F)},S=function(j,L){let F,G,W,V,U,q,J,Y=j;const re=L.length;do{for(F=Y.observers,U=F.length;U--;)if([G,W]=F[U],V=v(W,L),V.length)if(Y.options.async){Y.batches||(Y.batches=[],queueMicrotask(E.bind(Y)));let te=Y.batches.find(me=>me[0]===G);te||(te=[G,[]],Y.batches.push(te)),Array.prototype.push.apply(te[1],V)}else b(G,V);let oe;if(Y.parent){oe=new Array(re);for(let te=0;te<re;te++)J=L[te],q=[Y.ownKey,...J.path],oe[te]={type:J.type,path:q,value:J.value,oldValue:J.oldValue,object:J.object};L=oe,Y=Y.parent}else Y=null}while(Y)},P=function(j,L,F){return j&&typeof j=="object"?Array.isArray(j)?new B({target:j,ownKey:L,parent:F}).proxy:ArrayBuffer.isView(j)?new k({target:j,ownKey:L,parent:F}).proxy:j instanceof Date||j instanceof Blob||j instanceof Error?j:new A({target:j,ownKey:L,parent:F}).proxy:j},C=function(){const j=this[w],L=j.target;let F,G,W;for(L.reverse(),F=0,G=L.length;F<G;F++)if(W=L[F],W&&typeof W=="object"){const V=W[w];V&&(V.ownKey=F)}return S(j,[{type:p,path:[],object:this}]),this},x=function(j){const L=this[w],F=L.target;let G,W,V;for(F.sort(j),G=0,W=F.length;G<W;G++)if(V=F[G],V&&typeof V=="object"){const U=V[w];U&&(U.ownKey=G)}return S(L,[{type:g,path:[],object:this}]),this},O=function(j,L,F){const G=this[w],W=G.target,V=[],U=W.length,q=W.slice(0);if(L=L===void 0?0:L<0?Math.max(U+L,0):Math.min(L,U),F=F===void 0?U:F<0?Math.max(U+F,0):Math.min(F,U),L<U&&F>L){let J;W.fill(j,L,F);for(let Y,re,oe=L;oe<F;oe++)Y=W[oe],W[oe]=P(Y,oe,G),q.hasOwnProperty(oe)?(re=q[oe],re&&typeof re=="object"&&(J=re[w],J&&(re=J.detach())),V.push({type:f,path:[oe],value:W[oe],oldValue:re,object:this})):V.push({type:c,path:[oe],value:W[oe],object:this});S(G,V)}return this},I=function(j,L,F){const G=this[w],W=G.target,V=W.length;j=j<0?Math.max(V+j,0):j,L=L===void 0?0:L<0?Math.max(V+L,0):Math.min(L,V),F=F===void 0?V:F<0?Math.max(V+F,0):Math.min(F,V);const U=Math.min(F-L,V-j);if(j<V&&j!==L&&U>0){const q=W.slice(0),J=[];W.copyWithin(j,L,F);for(let Y,re,oe,te=j;te<j+U;te++)Y=W[te],Y&&typeof Y=="object"&&(Y=P(Y,te,G),W[te]=Y),re=q[te],re&&typeof re=="object"&&(oe=re[w],oe&&(re=oe.detach())),typeof Y!="object"&&Y===re||J.push({type:f,path:[te],value:Y,oldValue:re,object:this});S(G,J)}return this},N={pop:function(){const j=this[w],L=j.target,F=L.length-1;let G=L.pop();if(G&&typeof G=="object"){const W=G[w];W&&(G=W.detach())}return S(j,[{type:m,path:[F],oldValue:G,object:this}]),G},push:function(){const j=this[w],L=j.target,F=arguments.length,G=new Array(F),W=L.length;for(let q=0;q<F;q++)G[q]=P(arguments[q],W+q,j);const V=Reflect.apply(L.push,L,G),U=[];for(let q=W,J=L.length;q<J;q++)U[q-W]={type:c,path:[q],value:L[q],object:this};return S(j,U),V},shift:function(){const j=this[w],L=j.target;let F,G,W,V,U;for(F=L.shift(),F&&typeof F=="object"&&(U=F[w],U&&(F=U.detach())),G=0,W=L.length;G<W;G++)V=L[G],V&&typeof V=="object"&&(U=V[w],U&&(U.ownKey=G));return S(j,[{type:m,path:[0],oldValue:F,object:this}]),F},unshift:function(){const j=this[w],L=j.target,F=arguments.length,G=new Array(F);for(let q=0;q<F;q++)G[q]=P(arguments[q],q,j);const W=Reflect.apply(L.unshift,L,G);for(let q,J=0,Y=L.length;J<Y;J++)if(q=L[J],q&&typeof q=="object"){const re=q[w];re&&(re.ownKey=J)}const V=G.length,U=new Array(V);for(let q=0;q<V;q++)U[q]={type:c,path:[q],value:L[q],object:this};return S(j,U),W},reverse:C,sort:x,fill:O,copyWithin:I,splice:function(){const j=this[w],L=j.target,F=arguments.length,G=new Array(F),W=L.length;for(let fe=0;fe<F;fe++)G[fe]=P(arguments[fe],fe,j);const V=F===0?0:G[0]<0?W+G[0]:G[0],U=F<2?W-V:G[1],q=Math.max(F-2,0),J=Reflect.apply(L.splice,L,G),Y=L.length;let re,oe,te,me;for(let fe,Ce=0;Ce<Y;Ce++)fe=L[Ce],fe&&typeof fe=="object"&&(re=fe[w],re&&(re.ownKey=Ce));for(oe=0,te=J.length;oe<te;oe++)me=J[oe],me&&typeof me=="object"&&(re=me[w],re&&(J[oe]=re.detach()));const be=[];let ne;for(ne=0;ne<U;ne++)ne<q?be.push({type:f,path:[V+ne],value:L[V+ne],oldValue:J[ne],object:this}):be.push({type:m,path:[V+ne],oldValue:J[ne],object:this});for(;ne<q;ne++)be.push({type:c,path:[V+ne],value:L[V+ne],object:this});return S(j,be),J}},T={reverse:C,sort:x,fill:O,copyWithin:I,set:function(j,L){const F=this[w],G=F.target,W=j.length,V=G.slice(0);L=L||0,G.set(j,L);const U=new Array(W);for(let q=L;q<W+L;q++)U[q-L]={type:f,path:[q],value:G[q],oldValue:V[q],object:this};S(F,U)}};class R{constructor(L,F){const{target:G,parent:W,ownKey:V}=L;W&&V!==void 0?(this.parent=W,this.ownKey=V):(this.parent=null,this.ownKey=null);const U=F(G,this);this.observers=[],this.revocable=Proxy.revocable(U,this),this.proxy=this.revocable.proxy,this.target=U,this.options=this.processOptions(L.options)}processOptions(L){if(L){if(typeof L!="object")throw new Error(`Observable options if/when provided, MAY only be an object, got '${L}'`);const F=Object.keys(L).filter(G=>!_.hasOwnProperty(G));if(F.length)throw new Error(`'${F.join(", ")}' is/are not a valid Observable option/s`);return Object.assign({},L)}return{}}detach(){return this.parent=null,this.target}set(L,F,G){let W=L[F];if(G!==W){const V=P(G,F,this);if(L[F]=V,W&&typeof W=="object"){const q=W[w];q&&(W=q.detach())}const U=W===void 0?[{type:c,path:[F],value:V,object:this.proxy}]:[{type:f,path:[F],value:V,oldValue:W,object:this.proxy}];S(this,U)}return!0}deleteProperty(L,F){let G=L[F];if(delete L[F],G&&typeof G=="object"){const V=G[w];V&&(G=V.detach())}const W=[{type:m,path:[F],oldValue:G,object:this.proxy}];return S(this,W),!0}}class A extends R{constructor(L){super(L,d)}}class B extends R{constructor(L){super(L,u)}get(L,F){return N.hasOwnProperty(F)?N[F]:L[F]}}class k extends R{constructor(L){super(L,l)}get(L,F){return T.hasOwnProperty(F)?T[F]:L[F]}}class z{constructor(){throw new Error('Observable MAY NOT be created via constructor, see "Observable.from" API')}static from(L,F){if(L&&typeof L=="object"){if(L[w])return L;if(Array.isArray(L))return new B({target:L,ownKey:null,parent:null,options:F}).proxy;if(ArrayBuffer.isView(L))return new k({target:L,ownKey:null,parent:null,options:F}).proxy;if(L instanceof Date||L instanceof Blob||L instanceof Error)throw new Error(`${L} found to be one of a on-observable types`);return new A({target:L,ownKey:null,parent:null,options:F}).proxy}throw new Error("observable MAY ONLY be created from a non-null object")}static isObservable(L){return!(!L||!L[w])}}Object.freeze(z)},723:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s._inverseTransformation=void 0;var c=a(2731);s._inverseTransformation=function(f,m){var p=f[0],g=f[1],w=f[2],_=f[4],y=f[5],h=f[6],d=f[8],u=f[9],l=f[10],v=f[12],b=f[13],E=f[14],S=-p*v-g*b-w*E,P=-_*v-y*b-h*E,C=-d*v-u*b-l*E;return(m=m||(0,c.createNumbers)(16))[0]=p,m[1]=_,m[2]=d,m[3]=0,m[4]=g,m[5]=y,m[6]=u,m[7]=0,m[8]=w,m[9]=h,m[10]=l,m[11]=0,m[12]=S,m[13]=P,m[14]=C,m[15]=1,m}},733:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.readBits=s.readArray=s.readUnsigned=s.readString=s.peekBytes=s.readBytes=s.peekByte=s.readByte=s.buildStream=void 0,s.buildStream=function(c){return{data:c,pos:0}},s.readByte=function(){return function(c){return c.data[c.pos++]}},s.peekByte=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(f){return f.data[f.pos+c]}};var a=function(c){return function(f){return f.data.subarray(f.pos,f.pos+=c)}};s.readBytes=a,s.peekBytes=function(c){return function(f){return f.data.subarray(f.pos,f.pos+c)}},s.readString=function(c){return function(f){return Array.from(a(c)(f)).map(function(m){return String.fromCharCode(m)}).join("")}},s.readUnsigned=function(c){return function(f){var m=a(2)(f);return c?(m[1]<<8)+m[0]:(m[0]<<8)+m[1]}},s.readArray=function(c,f){return function(m,p,g){for(var w=typeof f=="function"?f(m,p,g):f,_=a(c),y=new Array(w),h=0;h<w;h++)y[h]=_(m);return y}},s.readBits=function(c){return function(f){for(var m=function(w){return w.data[w.pos++]}(f),p=new Array(8),g=0;g<8;g++)p[7-g]=!!(m&1<<g);return Object.keys(c).reduce(function(w,_){var y=c[_];return y.length?w[_]=function(h,d,u){for(var l=0,v=0;v<u;v++)l+=h[d+v]&&Math.pow(2,u-v-1);return l}(p,y.index,y.length):w[_]=p[y.index],w},{})}}},773:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.defaultStartUpdateFunc=s.requestAnimationFrameTimeStampTest=void 0,s.requestAnimationFrameTimeStampTest=function(){return new Promise(function(a,c){var f=performance.now();requestAnimationFrame(function(m){return a(m>f)})})},s.defaultStartUpdateFunc=function(a){var c,f;return f=function(m){m=performance.now(),c=requestAnimationFrame(f),a(m)},c=requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}},921:function(o,s,a){var c=this&&this.__read||function(w,_){var y=typeof Symbol=="function"&&w[Symbol.iterator];if(!y)return w;var h,d,u=y.call(w),l=[];try{for(;(_===void 0||_-- >0)&&!(h=u.next()).done;)l.push(h.value)}catch(v){d={error:v}}finally{try{h&&!h.done&&(y=u.return)&&y.call(u)}finally{if(d)throw d.error}}return l},f=this&&this.__spreadArray||function(w,_,y){if(y||arguments.length===2)for(var h,d=0,u=_.length;d<u;d++)!h&&d in _||(h||(h=Array.prototype.slice.call(_,0,d)),h[d]=_[d]);return w.concat(h||Array.prototype.slice.call(_))};Object.defineProperty(s,"__esModule",{value:!0}),s.createProcessingFromAsyncFuncWithStartValues=s.createProcessingFromAsyncFunc=s.asyncFuncToCancelablePromise=s.cancelFuncToCancelablePromise=s.createProcessingFromPromiseCreateFuncWithStartValues=s.createProcessingFromPromiseCreateFunc=void 0;var m=a(1101),p=a(1148),g=a(9651);s.createProcessingFromPromiseCreateFunc=function(w){return _=function(){for(var y=[],h=0;h<arguments.length;h++)y[h]=arguments[h];var d=w.apply(void 0,f([],c(y),!1));return(0,g.isPromiseCancelable)(d)?d:(0,g.createCancelablePromise)(d)},new p.Processing((0,p.createStartFuncFromAsyncFunc)(function(y){for(var h=[],d=1;d<arguments.length;d++)h[d-1]=arguments[d];return y.promise(_.apply(void 0,f([],c(h),!1)))}));var _},s.createProcessingFromPromiseCreateFuncWithStartValues=function(w){for(var _=[],y=1;y<arguments.length;y++)_[y-1]=arguments[y];return function(h){for(var d=[],u=1;u<arguments.length;u++)d[u-1]=arguments[u];return new p.Processing((0,p.createStartFuncFromAsyncFunc)(function(l){return l.promise(h.apply(void 0,f([],c(d),!1)))}))}(function(){var h=w.apply(void 0,f([],c(_),!1));return(0,g.isPromiseCancelable)(h)?h:(0,g.createCancelablePromise)(h)})},s.cancelFuncToCancelablePromise=function(w){var _,y=new Promise(function(h,d){_=function(){w(),d()}});return(0,g.setPromiseCancel)(y,_),y},s.asyncFuncToCancelablePromise=function(w){for(var _=[],y=1;y<arguments.length;y++)_[y-1]=arguments[y];var h=new m.CancelsManager,d=w.apply(void 0,f([h],c(_),!1)).finally(function(){return h.destroy()});return(0,g.setPromiseCancel)(d,h.cancel.bind(h)),d},s.createProcessingFromAsyncFunc=function(w){return new p.Processing((0,p.createStartFuncFromAsyncFunc)(w))},s.createProcessingFromAsyncFuncWithStartValues=function(w){for(var _=[],y=1;y<arguments.length;y++)_[y-1]=arguments[y];return new p.Processing((0,p.createStartFuncFromAsyncFunc)(function(h){return w.apply(void 0,f([h],c(_),!1))}))}},985:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(8466),s),f(a(3983),s),f(a(6424),s)},1023:function(o,s,a){var c,f=this&&this.__extends||(c=function(u,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(v[E]=b[E])},c(u,l)},function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function v(){this.constructor=u}c(u,l),u.prototype=l===null?Object.create(l):(v.prototype=l.prototype,new v)}),m=this&&this.__read||function(u,l){var v=typeof Symbol=="function"&&u[Symbol.iterator];if(!v)return u;var b,E,S=v.call(u),P=[];try{for(;(l===void 0||l-- >0)&&!(b=S.next()).done;)P.push(b.value)}catch(C){E={error:C}}finally{try{b&&!b.done&&(v=S.return)&&v.call(S)}finally{if(E)throw E.error}}return P};Object.defineProperty(s,"__esModule",{value:!0}),s.PickColorMananger=s.uint8sToUint32=s.uint32ToUint8s=void 0;var p=a(7372),g=new ArrayBuffer(4),w=new Uint32Array(g),_=new Uint8Array(g);function y(u){if(u>=16777215)throw new Error("uint32 > 0xFFFFFF");return w[0]=u,[_[0],_[1],_[2]]}function h(u,l,v){return _[0]=u,_[1]=l,_[2]=v,_[3]=0,w[0]}s.uint32ToUint8s=y,s.uint8sToUint32=h;var d=function(u){function l(){var v=u!==null&&u.apply(this,arguments)||this;return v._pickColors=new Array(16777215),v._pickColorIndex=0,v}return f(l,u),l.prototype.reset=function(){for(var v=0;v<this._pickColorIndex;++v){var b=this._pickColors[v];if(!b)throw console.error("this._pickColors[i] should not be undefined!"),new Error("this._pickColors[i] should not be undefined!");b.poi=null,b.tag=""}this._pickColorIndex=0},l.prototype.createPickColor=function(v,b){var E=this._pickColorIndex;++this._pickColorIndex;var S=this._pickColors[E];S?(S.poi=v,S.tag=b):this._pickColors[E]={poi:v,tag:b};var P=m(y(E),3);return[P[0],P[1],P[2]]},l.prototype.getPickInfoFromColor=function(v,b,E){var S=h(v,b,E);if(S>=this._pickColorIndex)console.error("index >= this._pickColorIndex");else{var P=this._pickColors[S];if(P)return P;console.error("!this._pickColors[index]")}},l.prototype.destroyImp=function(){this.reset()},l}(p.Destroyable);s.PickColorMananger=d},1047:function(o,s,a){var c=this&&this.__values||function(g){var w=typeof Symbol=="function"&&Symbol.iterator,_=w&&g[w],y=0;if(_)return _.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&y>=g.length&&(g=void 0),{value:g&&g[y++],done:!g}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")},f=this&&this.__read||function(g,w){var _=typeof Symbol=="function"&&g[Symbol.iterator];if(!_)return g;var y,h,d=_.call(g),u=[];try{for(;(w===void 0||w-- >0)&&!(y=d.next()).done;)u.push(y.value)}catch(l){h={error:l}}finally{try{y&&!y.done&&(_=d.return)&&_.call(d)}finally{if(h)throw h.error}}return u};Object.defineProperty(s,"__esModule",{value:!0}),s.createProps=void 0;var m=a(9359),p=a(3915);s.createProps=function(g){var w,_,y=new m.Destroyable,h=function(v,b){var E,S=y.disposeVar(b instanceof p.ReactiveVariable?b:(0,p.react)(b));Object.defineProperties(y,((E={})[v]={get:function(){return S.value},set:function(P){S.value=P}},E["".concat(v,"Changed")]={get:function(){return S.changed}},E))};try{for(var d=c(Object.entries(g)),u=d.next();!u.done;u=d.next()){var l=f(u.value,2);h(l[0],l[1])}}catch(v){w={error:v}}finally{try{u&&!u.done&&(_=d.return)&&_.call(d)}finally{if(w)throw w.error}}return y}},1085:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ObjPool=void 0;var a=function(){function c(f,m,p){p===void 0&&(p=!1),this._createDefaultFunc=f,this._destroyFunc=m,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],p&&(this._usedElements=[])}return Object.defineProperty(c.prototype,"usedElementsCount",{get:function(){return this._usedElementsCount},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"freeElementsCount",{get:function(){return this._freeElements.length},enumerable:!1,configurable:!0}),c.prototype._getCreateID=function(){return this._nextCreateID++},c.prototype._create=function(){var f;return(f=this._freeElements.length>0?this._freeElements.pop():this._createDefaultFunc&&this._createDefaultFunc()||{})._cid=this._getCreateID(),f},c.prototype.create=function(){return this._create()},c.prototype.multiCreate=function(f){this._scratchObjs.length=0;for(var m=0;m<f;++m)this._scratchObjs.push(this._create());return this._scratchObjs},c.prototype._destroy=function(f){this._destroyFunc&&this._destroyFunc(f),f._cid=void 0},c.prototype.destroy=function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];for(var p=f.length,g=0;g<p;++g)this._destroy(f[g])},c}();s.ObjPool=a},1101:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)}),m=this&&this.__values||function(h){var d=typeof Symbol=="function"&&Symbol.iterator,u=d&&h[d],l=0;if(u)return u.call(h);if(h&&typeof h.length=="number")return{next:function(){return h&&l>=h.length&&(h=void 0),{value:h&&h[l++],done:!h}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.CancelsManager=void 0;var p=a(7372),g=a(1662),w=a(4206),_=a(9651),y=function(h){function d(){var u=h.call(this)||this;return u._cancelled=!1,u._promiseSet=new Set,u}return f(d,h),Object.defineProperty(d.prototype,"disposer",{get:function(){return this._disposer=this._disposer||new p.Destroyable,this._disposer},enumerable:!1,configurable:!0}),d.prototype.destroyImp=function(){this.finally()},d.prototype.cancel=function(u){var l,v,b;if(!this._cancelled){this._cancelled=!0,(b=this._disposer)===null||b===void 0||b.destroy(),this._cancelError=u;try{for(var E=m(this._promiseSet),S=E.next();!S.done;S=E.next()){var P=S.value;(0,_.cancelPromise)(P)}}catch(C){l={error:C}}finally{try{S&&!S.done&&(v=E.return)&&v.call(E)}finally{if(l)throw l.error}}this._promiseSet.clear()}},Object.defineProperty(d.prototype,"cancelFuncsNum",{get:function(){return(0,g.reduce)(this._promiseSet,function(u){return u+1},0)},enumerable:!1,configurable:!0}),d.prototype.finally=function(){this._disposer&&!this._disposer.isDestroyed()&&this._disposer.destroy(),this._promiseSet.clear()},d.prototype.check=function(){var u;if(this._cancelled)throw(u=this._cancelError)!==null&&u!==void 0?u:new w.CancelError("cancel from CancelManager!")},d.prototype.promise=function(u){var l=this;return this._promiseSet.add(u),u.finally(function(){return l._promiseSet.delete(u),l.check()})},d.prototype.promiseAny=function(u){var l=this,v=[],b=u.map(function(E){return l._promiseSet.add(E),(0,_.isPromiseCancelable)(E)&&v.push((0,_.getPromiseCancel)(E)),E.finally(function(){return l._promiseSet.delete(E)})});return Promise.any(b).finally(function(){return v.forEach(function(E){return E(new w.CancelError("cancel from promiseAny!"))}),v.length=0})},d.prototype.promiseAll=function(u){var l=this,v=[],b=u.map(function(E){return l._promiseSet.add(E),(0,_.isPromiseCancelable)(E)&&v.push((0,_.getPromiseCancel)(E)),E.finally(function(){return l._promiseSet.delete(E)})});return Promise.all(b).finally(function(){return v.forEach(function(E){return E(new w.CancelError("cancel from promiseAll!"))}),v.length=0})},d.prototype.promiseRace=function(u){var l=this,v=[],b=u.map(function(E){return l._promiseSet.add(E),(0,_.isPromiseCancelable)(E)&&v.push((0,_.getPromiseCancel)(E)),E.finally(function(){return l._promiseSet.delete(E)})});return Promise.race(b).finally(function(){return v.forEach(function(E){return E(new w.CancelError("cancel from promiseRace!"))}),v.length=0})},d}(p.Destroyable);s.CancelsManager=y},1148:function(o,s,a){var c,f=this&&this.__extends||(c=function(u,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(v[E]=b[E])},c(u,l)},function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function v(){this.constructor=u}c(u,l),u.prototype=l===null?Object.create(l):(v.prototype=l.prototype,new v)}),m=this&&this.__read||function(u,l){var v=typeof Symbol=="function"&&u[Symbol.iterator];if(!v)return u;var b,E,S=v.call(u),P=[];try{for(;(l===void 0||l-- >0)&&!(b=S.next()).done;)P.push(b.value)}catch(C){E={error:C}}finally{try{b&&!b.done&&(v=S.return)&&v.call(S)}finally{if(E)throw E.error}}return P},p=this&&this.__spreadArray||function(u,l,v){if(v||arguments.length===2)for(var b,E=0,S=l.length;E<S;E++)!b&&E in l||(b||(b=Array.prototype.slice.call(l,0,E)),b[E]=l[E]);return u.concat(b||Array.prototype.slice.call(l))};Object.defineProperty(s,"__esModule",{value:!0}),s.createStartFuncFromAsyncFunc=s.Processing=void 0;var g=a(7372),w=a(7372),_=a(4206),y=a(1101),h=a(9651),d=function(u){function l(v){var b=u.call(this)||this;return b._startFunc=v,b._status="Initial",b._runningId=-1,b.dispose(function(){return b.isRunning&&b.cancel()}),b}return f(l,u),Object.defineProperty(l.prototype,"errorEvent",{get:function(){return this._errorEvent||(this._errorEvent=new w.Event),this._errorEvent},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"completeEvent",{get:function(){return this._completeEvent||(this._completeEvent=new w.Event),this._completeEvent},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"errorFunc",{get:function(){return this._errorFunc},set:function(v){this._errorFunc!==v&&(this._errorFunc=v)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"completeFunc",{get:function(){return this._completeFunc},set:function(v){this._completeFunc!==v&&(this._completeFunc=v)},enumerable:!1,configurable:!0}),l.prototype.start=function(){for(var v=this,b=[],E=0;E<arguments.length;E++)b[E]=arguments[E];if(this._status==="Initial"){var S=++this._runningId;this._status="Running",this._cancelFunc=this._startFunc.apply(this,p([{completeFunc:function(P){var C;S===v._runningId&&v._status==="Running"&&(v._status="Completed",v._completeFunc&&v._completeFunc(P),(C=v._completeEvent)===null||C===void 0||C.emit(P))},errorFunc:function(P){var C;S===v._runningId&&v._status==="Running"&&(v._status="Error",v._errorFunc&&v._errorFunc(P),(C=v._errorEvent)===null||C===void 0||C.emit(P))},runningingID:S}],m(b),!1))}},l.prototype.cancel=function(v){var b;if(v===void 0&&(v=new _.CancelError("")),this._status==="Running"){if(!this._cancelFunc)throw new Error("!this._cancelFunc");this._status="Error",this._errorFunc&&this._errorFunc(v),(b=this._errorEvent)===null||b===void 0||b.emit(v),this._cancelFunc(v),this._cancelFunc=void 0}},l.prototype.reset=function(){this._status==="Running"&&console.error("processing cannot reset while running. you can first cancel it!"),this._status!=="Completed"&&this._status!=="Error"||(this._status="Initial")},Object.defineProperty(l.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isInitial",{get:function(){return this._status==="Initial"},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isRunning",{get:function(){return this._status==="Running"},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isCompleted",{get:function(){return this._status==="Completed"},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isError",{get:function(){return this._status==="Error"},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"runningId",{get:function(){return this._runningId},enumerable:!1,configurable:!0}),l.prototype.restart=function(v){v===void 0&&(v=new _.CancelError(""));for(var b=[],E=1;E<arguments.length;E++)b[E-1]=arguments[E];this.isRunning&&this.cancel(v),this.reset(),this.start.apply(this,p([],m(b),!1))},l.prototype.restartIfNotRunning=function(){for(var v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];this.isRunning||(this.reset(),this.start.apply(this,p([],m(v),!1)))},l}(g.Destroyable);s.Processing=d,s.createStartFuncFromAsyncFunc=function(u){return function(l){for(var v=[],b=1;b<arguments.length;b++)v[b-1]=arguments[b];var E=new y.CancelsManager,S=l.completeFunc,P=l.errorFunc,C=u.apply(void 0,p([E],m(v),!1)).then(S).catch(P).finally(function(){return E.destroy()});return(0,h.setPromiseCancel)(C,E.cancel.bind(E)),function(x){return(0,h.cancelPromise)(C,x)}}}},1233:(o,s,a)=>{a.r(s),a.d(s,{LRUMap:()=>m});const c=Symbol("newer"),f=Symbol("older");function m(y,h){typeof y!="number"&&(h=y,y=0),this.size=0,this.limit=y,this.oldest=this.newest=void 0,this._keymap=new Map,h&&(this.assign(h),y<1&&(this.limit=this.size))}function p(y,h){this.key=y,this.value=h,this[c]=void 0,this[f]=void 0}function g(y){this.entry=y}function w(y){this.entry=y}function _(y){this.entry=y}m.prototype._markEntryAsUsed=function(y){y!==this.newest&&(y[c]&&(y===this.oldest&&(this.oldest=y[c]),y[c][f]=y[f]),y[f]&&(y[f][c]=y[c]),y[c]=void 0,y[f]=this.newest,this.newest&&(this.newest[c]=y),this.newest=y)},m.prototype.assign=function(y){let h,d=this.limit||Number.MAX_VALUE;this._keymap.clear();let u=y[Symbol.iterator]();for(let l=u.next();!l.done;l=u.next()){let v=new p(l.value[0],l.value[1]);if(this._keymap.set(v.key,v),h?(h[c]=v,v[f]=h):this.oldest=v,h=v,d--==0)throw new Error("overflow")}this.newest=h,this.size=this._keymap.size},m.prototype.get=function(y){var h=this._keymap.get(y);if(h)return this._markEntryAsUsed(h),h.value},m.prototype.set=function(y,h){var d=this._keymap.get(y);return d?(d.value=h,this._markEntryAsUsed(d),this):(this._keymap.set(y,d=new p(y,h)),this.newest?(this.newest[c]=d,d[f]=this.newest):this.oldest=d,this.newest=d,++this.size,this.size>this.limit&&this.shift(),this)},m.prototype.shift=function(){var y=this.oldest;if(y)return this.oldest[c]?(this.oldest=this.oldest[c],this.oldest[f]=void 0):(this.oldest=void 0,this.newest=void 0),y[c]=y[f]=void 0,this._keymap.delete(y.key),--this.size,[y.key,y.value]},m.prototype.find=function(y){let h=this._keymap.get(y);return h?h.value:void 0},m.prototype.has=function(y){return this._keymap.has(y)},m.prototype.delete=function(y){var h=this._keymap.get(y);if(h)return this._keymap.delete(h.key),h[c]&&h[f]?(h[f][c]=h[c],h[c][f]=h[f]):h[c]?(h[c][f]=void 0,this.oldest=h[c]):h[f]?(h[f][c]=void 0,this.newest=h[f]):this.oldest=this.newest=void 0,this.size--,h.value},m.prototype.clear=function(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()},g.prototype[Symbol.iterator]=function(){return this},g.prototype.next=function(){let y=this.entry;return y?(this.entry=y[c],{done:!1,value:[y.key,y.value]}):{done:!0,value:void 0}},w.prototype[Symbol.iterator]=function(){return this},w.prototype.next=function(){let y=this.entry;return y?(this.entry=y[c],{done:!1,value:y.key}):{done:!0,value:void 0}},_.prototype[Symbol.iterator]=function(){return this},_.prototype.next=function(){let y=this.entry;return y?(this.entry=y[c],{done:!1,value:y.value}):{done:!0,value:void 0}},m.prototype.keys=function(){return new w(this.oldest)},m.prototype.values=function(){return new _(this.oldest)},m.prototype.entries=function(){return this},m.prototype[Symbol.iterator]=function(){return new g(this.oldest)},m.prototype.forEach=function(y,h){typeof h!="object"&&(h=this);let d=this.oldest;for(;d;)y.call(h,d.value,d.key,this),d=d[c]},m.prototype.toJSON=function(){for(var y=new Array(this.size),h=0,d=this.oldest;d;)y[h++]={key:d.key,value:d.value},d=d[c];return y},m.prototype.toString=function(){for(var y="",h=this.oldest;h;)y+=String(h.key)+":"+h.value,(h=h[c])&&(y+=" < ");return y}},1291:function(o,s,a){var c,f=this&&this.__extends||(c=function(v,b){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,S){E.__proto__=S}||function(E,S){for(var P in S)Object.prototype.hasOwnProperty.call(S,P)&&(E[P]=S[P])},c(v,b)},function(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function E(){this.constructor=v}c(v,b),v.prototype=b===null?Object.create(b):(E.prototype=b.prototype,new E)}),m=this&&this.__awaiter||function(v,b,E,S){return new(E||(E=Promise))(function(P,C){function x(N){try{I(S.next(N))}catch(T){C(T)}}function O(N){try{I(S.throw(N))}catch(T){C(T)}}function I(N){var T;N.done?P(N.value):(T=N.value,T instanceof E?T:new E(function(R){R(T)})).then(x,O)}I((S=S.apply(v,b||[])).next())})},p=this&&this.__generator||function(v,b){var E,S,P,C,x={label:0,sent:function(){if(1&P[0])throw P[1];return P[1]},trys:[],ops:[]};return C={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function O(I){return function(N){return function(T){if(E)throw new TypeError("Generator is already executing.");for(;C&&(C=0,T[0]&&(x=0)),x;)try{if(E=1,S&&(P=2&T[0]?S.return:T[0]?S.throw||((P=S.return)&&P.call(S),0):S.next)&&!(P=P.call(S,T[1])).done)return P;switch(S=0,P&&(T=[2&T[0],P.value]),T[0]){case 0:case 1:P=T;break;case 4:return x.label++,{value:T[1],done:!1};case 5:x.label++,S=T[1],T=[0];continue;case 7:T=x.ops.pop(),x.trys.pop();continue;default:if(!((P=(P=x.trys).length>0&&P[P.length-1])||T[0]!==6&&T[0]!==2)){x=0;continue}if(T[0]===3&&(!P||T[1]>P[0]&&T[1]<P[3])){x.label=T[1];break}if(T[0]===6&&x.label<P[1]){x.label=P[1],P=T;break}if(P&&x.label<P[2]){x.label=P[2],x.ops.push(T);break}P[2]&&x.ops.pop(),x.trys.pop();continue}T=b.call(v,x)}catch(R){T=[6,R],S=0}finally{E=P=0}if(5&T[0])throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}([I,N])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.FlvProcessing=s.FlvJsLoading=void 0;var g=a(1662),w=a(8106),_=a(2220),y=a(5819),h=function(v){function b(){var E=v.call(this)||this;return E._loading=!1,E._loadedEvent=E.disposeVar(new g.Event),E._loaded=!1,E._loadedPromise=new Promise(function(S){E._loadedPromiseResolve=S}),E._processing=E.disposeVar((0,y.createProcessingFromAsyncFunc)(function(S){return m(E,void 0,void 0,function(){var P;return p(this,function(C){switch(C.label){case 0:return this._loading=!0,window.flvjs?(console.info("可能系统已经加载flvjs,此处不再加载!"),[3,3]):[3,1];case 1:return P=_.SceneObject.context.getStrFromEnv(b.path),[4,S.promise((0,g.loadJs)(P))];case 2:C.sent(),C.label=3;case 3:return this._loading=!1,this._loaded=!0,this._loadedEvent.emit(),this._loadedPromiseResolve(),[2]}})})})),E._processingStart=E._processing.start(),E}return f(b,v),Object.defineProperty(b.prototype,"loading",{get:function(){return this._loading},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"loadedEvent",{get:function(){return this._loadedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"loaded",{get:function(){return this._loaded},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"loadedPromise",{get:function(){return this._loadedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"processing",{get:function(){return this._processing},enumerable:!1,configurable:!0}),b.instance=function(){return b._instance=b._instance||new b,b._instance},b.path="${xr-utils-script-dir}/xr-static/xr-utils/flvjs/1.6.2/flv.min.js",b}(g.Destroyable);s.FlvJsLoading=h;var d=function(v){function b(E,S){var P=v.call(this)||this;P._complexImage=E,P._videoSrc=S;var C,x=document.createElement("video");return x.src=P._videoSrc,x.style.position="absolute",x.style.top="0px",x.style.left="0px",x.style.zIndex="-100",x.style.visibility="hidden",(C=function(){x.crossOrigin=P._complexImage.crossOrigin})(),P.dispose(P._complexImage.crossOriginChanged.disposableOn(C)),(C=function(){x.autoplay=P._complexImage.autoplay})(),P.dispose(P._complexImage.autoplayChanged.disposableOn(C)),(C=function(){x.loop=P._complexImage.loop})(),P.dispose(P._complexImage.loopChanged.disposableOn(C)),x.muted=!0,document.body.appendChild(x),P._element=x,P.dispose(function(){return document.body.removeChild(x)}),P}return f(b,v),Object.defineProperty(b.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),b}(g.Destroyable),u=function(v){function b(E,S){var P=v.call(this)||this;return P._complexImage=E,P._videoSrc=S,P._videoDom=P.disposeVar(new d(P._complexImage,"")),P._processing=P.disposeVar((0,y.createProcessingFromAsyncFunc)(function(C){return m(P,void 0,void 0,function(){var x,O,I,N;return p(this,function(T){switch(T.label){case 0:return x=this.videoSrc,O=h.instance(),[4,C.promise(O.loadedPromise)];case 1:return T.sent(),I=window.flvjs,N=this.element,[4,(0,w.step)(C,function(){return new Promise(function(R,A){if(I.isSupported()){var B=I.createPlayer({type:"flv",url:x});B.attachMediaElement(N),B.load(),B.play(),N.xbsjFlvPlayer=B}else A("flvjs不支持!")})})];case 2:return T.sent(),[2]}})})})),P._processingStartup=P._processing.start(),P}return f(b,v),Object.defineProperty(b.prototype,"videoSrc",{get:function(){return this._videoSrc},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"videoDom",{get:function(){return this._videoDom},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"element",{get:function(){return this.videoDom.element},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"processing",{get:function(){return this._processing},enumerable:!1,configurable:!0}),b}(g.Destroyable),l=function(v){function b(E,S){var P=v.call(this)||this;return P._complexImage=E,P._imageUri=S,P._videoDom=P.disposeVar(new u(P._complexImage,P._imageUri)),P._update=P.disposeVar((0,w.createAnimateFrameWithStartValues)(function(){return P.update()})),P._updateStart=P._update.start(),P}return f(b,v),Object.defineProperty(b.prototype,"videoDom",{get:function(){return this._videoDom},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"videoElement",{get:function(){return this._videoDom.element},enumerable:!1,configurable:!0}),b.prototype.update=function(){if(!(this.videoElement.readyState<2)){var E=this._complexImage,S=this.videoElement,P=S.videoWidth,C=S.videoHeight;E.size=[P,C],E.pixelFormat="RGBA",E.copyTexture({source:this.videoElement})}},b}(g.Destroyable);s.FlvProcessing=l},1354:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.forEach=void 0;var c=a(8144);s.forEach=function(f,m){for(var p=(0,c.getIterator)(f),g=0;;){var w=p.next(),_=w.done,y=w.value;if(_)break;m(y,g++)}}},1378:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)});Object.defineProperty(s,"__esModule",{value:!0}),s.DivBoxPicker=s.BoxPicker=void 0;var m=a(7372),p=a(7372),g=a(507),w=a(7372),_=function(h){function d(){var u=h.call(this)||this;u._pickRectEvent=u.disposeVar(new p.Event),u._updateRectEvent=u.disposeVar(new p.Event),u._pointerActionEvent=u.disposeVar(new p.Event),u._active=u.disposeVar((0,w.react)(!1)),u._pickRect={left0:0,top0:0,left1:0,top1:0};var l=0,v=0,b=0,E=0;return u.dispose(u._pointerActionEvent.disposableOn(function(S){var P=S.type,C=S.left,x=S.top;P==="PointerDown"?(u._active.value=!0,l=C,v=x,b=C,E=x,u._setPickRect({left0:l,top0:v,left1:b,top1:E}),u._updateRectEvent.emit(u._pickRect)):P==="PointerMove"?u._active.value&&(b=C,E=x,u._setPickRect({left0:l,top0:v,left1:b,top1:E}),u._updateRectEvent.emit(u._pickRect)):P==="PointerUp"&&u._active.value&&(u._active.value=!1,b=C,E=x,u._setPickRect({left0:l,top0:v,left1:b,top1:E}),u._updateRectEvent.emit(u._pickRect),u._pickRectEvent.emit(u._pickRect))})),u}return f(d,h),d.prototype._setPickRect=function(u){var l=u.left0,v=u.left1,b=u.top0,E=u.top1;this._pickRect.left0=l,this._pickRect.left1=v,this._pickRect.top0=b,this._pickRect.top1=E},d.prototype.pointerDown=function(u,l){this._pointerActionEvent.emit({type:"PointerDown",left:u,top:l})},d.prototype.pointerMove=function(u,l){this._pointerActionEvent.emit({type:"PointerMove",left:u,top:l})},d.prototype.pointerUp=function(u,l){this._pointerActionEvent.emit({type:"PointerUp",left:u,top:l})},d.prototype.reset=function(){this._setPickRect({left0:0,top0:0,left1:0,top1:0}),this._updateRectEvent.emit(this._pickRect),this._pickRectEvent.emit(this._pickRect)},Object.defineProperty(d.prototype,"activeEvent",{get:function(){return this._active.changed},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"updateRectEvent",{get:function(){return this._updateRectEvent},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"pickRectEvent",{get:function(){return this._pickRectEvent},enumerable:!1,configurable:!0}),d.getLeftTopAndSize=function(u,l){l=l||{left:0,top:0,width:0,height:0,forward:!0};var v=u.left0,b=u.top0,E=u.left1,S=u.top1;return l.width=Math.abs(v-E),l.height=Math.abs(b-S),l.left=Math.min(v,E),l.top=Math.min(b,S),l.forward=E>v,l},d.contains=function(u,l,v){var b=v.left,E=v.top,S=v.width,P=v.height;return u>b&&u<=b+S&&l>=E&&l<=E+P},d}(m.Destroyable);s.BoxPicker=_;var y=function(h){function d(u){var l=h.call(this)||this,v=l.disposeVar(new g.PointerClickDeprecated(u));l.dispose(v.downEvent.disposableOn(function(P,C,x){return x.altKey&&l.pointerDown(P,C)})),l.dispose(v.moveEvent.disposableOn(function(P,C){return l.pointerMove(P,C)})),l.dispose(v.upEvent.disposableOn(function(P,C){return l.pointerUp(P,C)}));var b=document.createElement("div");b.style.backgroundColor="rgba(0, 0, 0, 0)",b.style.border="2px dashed red",b.style.position="absolute",b.style.boxSizing="border-box",b.style.pointerEvents="none",b.style.height="0px",b.style.width="0px",b.style.left="0px",b.style.top="0px",b.style.display="none",u.appendChild(b),l.dispose(function(){return u.removeChild(b)}),l.dispose(l.activeEvent.disposableOn(function(P){b.style.display=P?"block":"none"}));var E=function(){l.reset()};u.addEventListener("contextmenu",E),l.dispose(function(){return u.removeEventListener("contextmenu",E)});var S={left:0,top:0,width:0,height:0,forward:!1};return l.dispose(l.updateRectEvent.disposableOn(function(P){if(_.getLeftTopAndSize(P,S)){var C=S.left,x=S.top,O=S.width,I=S.height;b.style.height="".concat(0|I,"px"),b.style.width="".concat(0|O,"px"),b.style.left="".concat(0|C,"px"),b.style.top="".concat(0|x,"px")}})),l}return f(d,h),d}(_);s.DivBoxPicker=y},1412:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(7963),s),f(a(1851),s),f(a(9409),s),f(a(3022),s),f(a(7014),s),f(a(3096),s),f(a(5925),s),f(a(5210),s),f(a(1291),s)},1545:function(o,s,a){var c,f=this&&this.__extends||(c=function(g,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,y){_.__proto__=y}||function(_,y){for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&(_[h]=y[h])},c(g,w)},function(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function _(){this.constructor=g}c(g,w),g.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)});Object.defineProperty(s,"__esModule",{value:!0}),s.RefsManager=void 0;var m=a(1662),p=function(g){function w(_){var y=g.call(this)||this;y._sceneObjRefs=new Map,y._refs={},y._refsChagned=y.disposeVar(new m.Event);var h=function(d,u,l){if(l){var v=y.getLastSceneObject(l);if(S=y._sceneObjRefs.get(l)){var b=S.indexOf(d);b===-1?console.warn("this._sceneObjRefs中不存在当前对象(id: ".concat(d.id," type: ").concat(d.typeName,")!可能系统存在逻辑问题")):(S.splice(b,1),S.length===0&&y._sceneObjRefs.delete(l))}else console.warn("this._sceneObjRefs中不存在ref(".concat(l,"), 可能系统存在逻辑问题"));var E=y.getLastSceneObject(l);y._refs[l]=E,y._refsChagned.emit(E,v)}var S;u&&(v=y.getLastSceneObject(u),(S=y._sceneObjRefs.get(u))?(S.push(d),S.length>0&&console.warn("同时存在多个ref".concat(u,`相同的场景对象!
2
+ `).concat(S.map(function(P){return"".concat(P.id," ").concat(P.typeName,`
3
+ `)}).join(" ")))):y._sceneObjRefs.set(u,[d]),E=y.getLastSceneObject(u),y._refs[u]=E,y._refsChagned.emit(E,v))};return y.dispose(_.sceneObjCreatedEvent.disposableOn(function(d){var u=function(l,v){return h(d,l,v)};d.ref&&u(d.ref,void 0),d.refChanged.disposableOn(u)})),y.dispose(_.sceneObjToDestroyEvent.disposableOn(function(d){d.ref&&h(d,void 0,d.ref)})),y}return f(w,g),Object.defineProperty(w.prototype,"sceneObjRefs",{get:function(){return this._sceneObjRefs},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"refs",{get:function(){return this._refs},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"refsChanged",{get:function(){return this._refsChagned},enumerable:!1,configurable:!0}),w.prototype.getLastSceneObject=function(_){var y=this.getSceneObjects(_);if(y)return y[y.length-1]},w.prototype.getSceneObjects=function(_){var y=this._sceneObjRefs.get(_);if(y&&y.length!==0)return y},w}(m.Destroyable);s.RefsManager=p},1662:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(9359),s),f(a(5600),s),f(a(6555),s),f(a(7941),s),f(a(1085),s),f(a(709),s),f(a(2520),s),f(a(3915),s),f(a(9910),s),f(a(5745),s),f(a(773),s),f(a(7132),s),f(a(8835),s),f(a(7793),s),f(a(1047),s),f(a(4775),s),f(a(2967),s),f(a(5785),s),f(a(5505),s),f(a(5986),s),f(a(9631),s),f(a(6469),s),f(a(5236),s),f(a(6301),s),f(a(2267),s),f(a(5015),s),f(a(3457),s),f(a(2968),s),f(a(8144),s),f(a(3735),s),f(a(6655),s),f(a(2168),s),f(a(7418),s),f(a(1662),s),f(a(7427),s),f(a(1354),s),f(a(4969),s),f(a(3280),s),f(a(9131),s),f(a(1233),s),f(a(433),s),f(a(7008),s),f(a(6362),s),f(a(3009),s),f(a(9970),s),f(a(3804),s),f(a(345),s),f(a(6583),s),f(a(4899),s),f(a(2882),s),f(a(3249),s),f(a(1803),s),f(a(9528),s),f(a(6138),s),f(a(9038),s),f(a(476),s),f(a(8992),s),f(a(6558),s),f(a(6432),s),f(a(2999),s),a(3428)},1801:function(o,s,a){var c=this&&this.__read||function(_,y){var h=typeof Symbol=="function"&&_[Symbol.iterator];if(!h)return _;var d,u,l=h.call(_),v=[];try{for(;(y===void 0||y-- >0)&&!(d=l.next()).done;)v.push(d.value)}catch(b){u={error:b}}finally{try{d&&!d.done&&(h=l.return)&&h.call(l)}finally{if(u)throw u.error}}return v},f=this&&this.__spreadArray||function(_,y,h){if(h||arguments.length===2)for(var d,u=0,l=y.length;u<l;u++)!d&&u in y||(d||(d=Array.prototype.slice.call(y,0,u)),d[u]=y[u]);return _.concat(d||Array.prototype.slice.call(y))};Object.defineProperty(s,"__esModule",{value:!0}),s.createSleepingWithStartValues=s.createSleeping=s.sleep=void 0;var m=a(5726),p=a(921),g=a(9651);function w(_){for(var y,h=[],d=1;d<arguments.length;d++)h[d-1]=arguments[d];var u=void 0,l=new Promise(function(v,b){u=b,y=globalThis.setTimeout(function(){y=void 0,v(h)},_)});return(0,g.setPromiseCancel)(l,function(v){y&&(clearTimeout(y),y=void 0),u&&u(v??new m.CancelError("sleep cancel error!"))}),l}s.sleep=w,s.createSleeping=function(){return(0,p.createProcessingFromPromiseCreateFunc)(w)},s.createSleepingWithStartValues=function(_){for(var y=[],h=1;h<arguments.length;h++)y[h-1]=arguments[h];return p.createProcessingFromPromiseCreateFuncWithStartValues.apply(void 0,f([w,_],c(y),!1))}},1803:function(o,s){var a=this&&this.__values||function(c){var f=typeof Symbol=="function"&&Symbol.iterator,m=f&&c[f],p=0;if(m)return m.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&p>=c.length&&(c=void 0),{value:c&&c[p++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.setValueFromProps=s.getValueFromProps=void 0,s.getValueFromProps=function(c,f){var m,p,g=c;try{for(var w=a(f),_=w.next();!_.done;_=w.next())g=g[_.value]}catch(y){m={error:y}}finally{try{_&&!_.done&&(p=w.return)&&p.call(w)}finally{if(m)throw m.error}}return g},s.setValueFromProps=function(c,f,m){if(f.length===0)throw new Error("props的数量必须大于0");for(var p=f.length-1,g=f[p],w=c,_=0;_<p;++_){var y=f[_];w[y]===void 0&&(w[y]={}),w=w[y]}w[g]=m}},1851:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.complexImageTypes=void 0,s.complexImageTypes=["img","gif","video","flv","hls"]},1895:function(o,s,a){var c=this&&this.__generator||function(_,y){var h,d,u,l,v={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(E){return function(S){return function(P){if(h)throw new TypeError("Generator is already executing.");for(;l&&(l=0,P[0]&&(v=0)),v;)try{if(h=1,d&&(u=2&P[0]?d.return:P[0]?d.throw||((u=d.return)&&u.call(d),0):d.next)&&!(u=u.call(d,P[1])).done)return u;switch(d=0,u&&(P=[2&P[0],u.value]),P[0]){case 0:case 1:u=P;break;case 4:return v.label++,{value:P[1],done:!1};case 5:v.label++,d=P[1],P=[0];continue;case 7:P=v.ops.pop(),v.trys.pop();continue;default:if(!((u=(u=v.trys).length>0&&u[u.length-1])||P[0]!==6&&P[0]!==2)){v=0;continue}if(P[0]===3&&(!u||P[1]>u[0]&&P[1]<u[3])){v.label=P[1];break}if(P[0]===6&&v.label<u[1]){v.label=u[1],u=P;break}if(u&&v.label<u[2]){v.label=u[2],v.ops.push(P);break}u[2]&&v.ops.pop(),v.trys.pop();continue}P=y.call(_,v)}catch(C){P=[6,C],d=0}finally{h=u=0}if(5&P[0])throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}([E,S])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.DoublyLinkedList=void 0;var f=new(a(1085)).ObjPool(function(){return{item:void 0,previous:void 0,next:void 0}},function(_){_.item=void 0,_.previous=void 0,_.next=void 0},!0);function m(_,y,h){var d=f.create();return d.item=_,d.previous=y,d.next=h,d}function p(_){if(!_)throw new Error("node is undefined!");f.destroy(_)}function g(_,y){y.previous&&y.next?(y.previous.next=y.next,y.next.previous=y.previous):y.previous?(y.previous.next=void 0,_.tail=y.previous):y.next?(y.next.previous=void 0,_.head=y.next):(_.head=void 0,_.tail=void 0),y.next=void 0,y.previous=void 0}var w=function(){function _(y){var h=(y||{needLength:!0}).needLength;this.head=void 0,this.tail=void 0,h&&(this._length=0)}return _.prototype._incrementLength=function(){typeof this._length=="number"&&++this._length},_.prototype._decrementLength=function(){typeof this._length=="number"&&--this._length},_.prototype._setLength=function(y){typeof this._length=="number"&&(this._length=y)},Object.defineProperty(_.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"empty",{get:function(){return!this.head},enumerable:!1,configurable:!0}),_.prototype[Symbol.iterator]=function(){var y;return c(this,function(h){switch(h.label){case 0:y=this.head,h.label=1;case 1:return y?[4,y]:[3,3];case 2:return h.sent(),y=y.next,[3,1];case 3:return[2]}})},_.prototype.remove=function(y){if(!y)throw new Error("node is undefined!");g(this,y),this._decrementLength(),p(y)},_.prototype.getNode=function(y){for(var h=this.head;h!==null;){if(!h)throw new Error("current is undefined!");if(h.item===y)return h;h=h.next}},_.prototype.moveAfter=function(y,h){if(y!==h){g(this,h);var d=y.next;y.next=h,this.tail===y?this.tail=h:d&&(d.previous=h),h.next=d,h.previous=y}},_.prototype.moveBefore=function(y,h){if(y!==h){g(this,h);var d=y.previous;y.previous=h,this.head===y?this.head=h:d&&(d.next=h),h.previous=d,h.next=y}},_.prototype.insertBefore=function(y,h){var d=m(h,y.previous,y);return y.previous&&(y.previous.next=d),y.previous=d,this.head===y&&(this.head=d),this._incrementLength(),d},_.prototype.insertAfter=function(y,h){var d=m(h,y,y.next);return y.next&&(y.next.previous=d),y.next=d,this.tail===y&&(this.tail=d),this._incrementLength(),d},_.prototype._setFirstNode=function(y){if(this.head||this.tail)throw new Error("_setFirstNode error!");var h=m(y,void 0,void 0);if(this.head=h,this.tail=h,this._incrementLength(),this._length!==1)throw new Error("_setFirstNode error! this._length !== 1");return h},_.prototype.push=function(y){return this.tail?this.insertAfter(this.tail,y):this._setFirstNode(y)},_.prototype.pop=function(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");var y=this.tail.item;return this.remove(this.tail),y},_.prototype.shift=function(){if(!this.head)throw new Error("DoublyLinkedList is empty!");var y=this.head.item;return this.remove(this.head),y},_.prototype.unshift=function(y){return this.head?this.insertBefore(this.head,y):this._setFirstNode(y)},_.prototype.removeAll=function(){for(var y=this.head;y;){var h=y.next;p(y),y=h}this.head=void 0,this.tail=void 0,this._setLength(0)},_}();s.DoublyLinkedList=w},1943:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)}),m=this&&this.__read||function(h,d){var u=typeof Symbol=="function"&&h[Symbol.iterator];if(!u)return h;var l,v,b=u.call(h),E=[];try{for(;(d===void 0||d-- >0)&&!(l=b.next()).done;)E.push(l.value)}catch(S){v={error:S}}finally{try{l&&!l.done&&(u=b.return)&&u.call(b)}finally{if(v)throw v.error}}return E},p=this&&this.__spreadArray||function(h,d,u){if(u||arguments.length===2)for(var l,v=0,b=d.length;v<b;v++)!l&&v in d||(l||(l=Array.prototype.slice.call(d,0,v)),l[v]=d[v]);return h.concat(l||Array.prototype.slice.call(d))};Object.defineProperty(s,"__esModule",{value:!0}),s.ThrottlingWithStartValues=s.Throttling=void 0;var g=a(1662),w=a(1148),_=function(h){function d(){var u=h.call(this,function(l,v,b){var E=l.errorFunc;try{var S=m((0,g.throttle)(v,b),2),P=S[0],C=S[1];return u._doFunc=P,C}catch(x){return E(x),function(){}}})||this;return u}return f(d,h),d.prototype.do=function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];this._doFunc&&this._doFunc.apply(this,p([],m(u),!1))},d}(w.Processing);s.Throttling=_;var y=function(h){function d(u,l){var v=h.call(this,function(b){var E=b.errorFunc;try{var S=m((0,g.throttle)(u,l),2),P=S[0],C=S[1];return v._doFunc=P,C}catch(x){return E(x),function(){}}})||this;return v}return f(d,h),d.prototype.do=function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];this._doFunc&&this._doFunc.apply(this,p([],m(u),!1))},d}(w.Processing);s.ThrottlingWithStartValues=y},1968:function(o,s,a){var c,f=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(h[u]=d[u])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function h(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(h.prototype=y.prototype,new h)});Object.defineProperty(s,"__esModule",{value:!0}),s.PointerHover=void 0;var m=a(7372),p=a(7372),g=a(8106),w=function(_){function y(){var h=_.call(this)||this;h._hoverEvent=h.disposeVar(new p.Event),h._hoverOutEvent=h.disposeVar(new p.Event),h._pointerdownEvent=h.disposeVar(new p.Event),h._pointerupEvent=h.disposeVar(new p.Event),h._pointermoveEvent=h.disposeVar(new p.Event),h._pointeroutEvent=h.disposeVar(new p.Event),h.delayTime=800;var d,u=h.disposeVar((0,g.createTimeout)()),l=function(){d?h._hoverEvent.emit(d):console.warn("!lastPointerEvent")};return h.dispose(h._pointerdownEvent.disposableOn(function(v){h._hoverOutEvent.emit()})),h.dispose(h._pointerupEvent.disposableOn(function(v){h._hoverOutEvent.emit()})),h.dispose(h._pointermoveEvent.disposableOn(function(v){d=v,u.restart(void 0,l,h.delayTime),h._hoverOutEvent.emit()})),h.dispose(h._pointeroutEvent.disposableOn(function(v){u.cancel(),h._hoverOutEvent.emit()})),h}return f(y,_),Object.defineProperty(y.prototype,"hoverEvent",{get:function(){return this._hoverEvent},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"hoverOutEvent",{get:function(){return this._hoverOutEvent},enumerable:!1,configurable:!0}),y.prototype.pointerDown=function(h){this._pointerdownEvent.emit(h)},y.prototype.pointerUp=function(h){this._pointerupEvent.emit(h)},y.prototype.pointerMove=function(h){this._pointermoveEvent.emit(h)},y.prototype.pointerOut=function(h){this._pointeroutEvent.emit(h)},y}(m.Destroyable);s.PointerHover=w},2002:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.sleepDeprecated=void 0;var c=a(5726);s.sleepDeprecated=function(f,m){var p,g=void 0,w=new Promise(function(y,h){g=h,p=globalThis.setTimeout(function(){p=void 0,y()},f)}),_=function(y){p&&(clearTimeout(p),p=void 0),g&&g(y??new c.CancelError("sleep cancel error!"))};return typeof m=="boolean"&&m?[_,w]:m?((0,c._executeSetCancelFuncOrCancelResult)(m,_),w):void 0}},2051:function(o,s,a){var c,f=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(h[u]=d[u])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function h(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(h.prototype=y.prototype,new h)});Object.defineProperty(s,"__esModule",{value:!0}),s.Transition=void 0;var m=a(7372),p=a(7372),g=a(2127),w=function(_){function y(h){var d=_.call(this)||this;return d._stop=d.disposeVar((0,p.react)(0)),d._current=d.disposeVar((0,p.react)(0)),d._start=d.disposeVar((0,p.react)(0)),d._player=d.disposeVar(new g.Player(200)),d.dispose(d._player.currentTimeChangedEvent.disposableOn(function(u){var l=u/d._player.duration;l=l>1?1:l<0?0:l;var v=d._start.value,b=d._stop.value;d._current.value=v+(b-v)*l})),d.duration=h,d}return f(y,_),Object.defineProperty(y.prototype,"current",{get:function(){return this._current.value},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"currentChanged",{get:function(){return this._current.changed},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"source",{get:function(){return this._start.value},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"sourceChanged",{get:function(){return this._start.changed},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"target",{get:function(){return this._stop.value},set:function(h){this._start.value=this._current.value,this._stop.value=h,this._player.currentTime=0,this._player.playing=!0},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"targetChanged",{get:function(){return this._stop.changed},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"duration",{get:function(){return this._player.duration},set:function(h){this._player.duration=h},enumerable:!1,configurable:!0}),y.prototype.reset=function(h){this._start.value=h,this._current.value=h,this._stop.value=h,this._player.playing=!1},y}(m.Destroyable);s.Transition=w},2075:(o,s,a)=>{a.r(s),a.d(s,{TaskProcessor:()=>u});var c=a(1662),f=a(2243);function m(v,b){return v??b}const p=Error,g=Error;function w(){if(!(0,f.defined)(u._canTransferArrayBuffer)){var v=new Worker(y("transferTypedArrayTest.js"));v.postMessage=m(v.webkitPostMessage,v.postMessage);var b=new Int8Array([99]);try{v.postMessage({array:b},[b.buffer])}catch{return u._canTransferArrayBuffer=!1,u._canTransferArrayBuffer}var E=f.when.defer();v.onmessage=function(S){var P=S.data.array,C=(0,f.defined)(P)&&P[0]===99;E.resolve(C),v.terminate(),u._canTransferArrayBuffer=C},u._canTransferArrayBuffer=E.promise}return u._canTransferArrayBuffer}function _(v,b){--v._activeTasks;var E=b.id;if((0,f.defined)(E)){var S=v._deferreds,P=S[E];if((0,f.defined)(b.error)){var C=b.error;C.name==="RuntimeError"?(C=new g(b.error.message)).stack=b.error.stack:C.name==="DeveloperError"&&((C=new p(b.error.message)).stack=b.error.stack),P.reject(C)}else P.resolve(b.result);delete S[E]}}function y(v){var b=function(C){return C=C.endsWith(".js")?C:C+".js",(0,c.getFinalUri)(C,u.workerBaseAbsoluteUri)}(v);if((0,c.isCrossOriginUrl)(b)){var E,S='importScripts("'+b+'");';try{E=new Blob([S],{type:"application/javascript"})}catch{var P=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);P.append(S),E=P.getBlob("application/javascript")}b=(window.URL||window.webkitURL).createObjectURL(E)}return b}var h;function d(v){var b=new Worker(((0,f.defined)(h)||(h=y("cesiumWorkerBootstrapper.js")),h));b.postMessage=m(b.webkitPostMessage,b.postMessage);const E=(0,c.isAbsoluteUri)(u.workerBaseAbsoluteUri)?u.workerBaseAbsoluteUri:"";var S={loaderConfig:{paths:{Workers:E},baseUrl:E},workerModule:v._workerName};return b.postMessage(S),b.onmessage=function(P){_(v,P.data)},b}function u(v,b){this._workerName=v,this._maximumActiveTasks=m(b,5),this._activeTasks=0,this._deferreds={},this._nextID=0}var l=[];u.prototype.scheduleTask=function(v,b){if((0,f.defined)(this._worker)||(this._worker=d(this)),!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var E=this;return(0,f.when)(w(),function(S){(0,f.defined)(b)?S||(b.length=0):b=l;var P=E._nextID++,C=f.when.defer();return E._deferreds[P]=C,E._worker.postMessage({id:P,parameters:v,canTransferArrayBuffer:S},b),C.promise})}},u.prototype.initWebAssemblyModule=function(v){(0,f.defined)(this._worker)||(this._worker=d(this));var b=f.when.defer(),E=this,S=this._worker;return getWebAssemblyLoaderConfig(this,v).then(function(P){return(0,f.when)(w(),function(C){var x,O=P.wasmBinary;(0,f.defined)(O)&&C&&(x=[O]),S.onmessage=function(I){S.onmessage=function(N){_(E,N.data)},b.resolve(I.data)},S.postMessage({webAssemblyConfig:P},x)})}),b},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){return(0,f.defined)(this._worker)&&this._worker.terminate(),(0,c.destroyObject)(this)},u._defaultWorkerModulePrefix="Workers/",u._workerModulePrefix=u._defaultWorkerModulePrefix,u._canTransferArrayBuffer=void 0,u.workerBaseAbsoluteUri="xr-static/workers/core"},2082:(o,s)=>{function a(){return!0}function c(){throw new Error("throwOnDestroyed")}Object.defineProperty(s,"__esModule",{value:!0}),s.destroyObject=void 0,s.destroyObject=function(f){for(var m in f)typeof f[m]=="function"&&(f[m]=c);f.isDestroyed=a}},2127:function(o,s,a){var c,f=this&&this.__extends||(c=function(y,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(d[l]=u[l])},c(y,h)},function(y,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function d(){this.constructor=y}c(y,h),y.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)});Object.defineProperty(s,"__esModule",{value:!0}),s.Player=void 0;var m=a(7372),p=a(7372),g=a(7372),w=a(1662),_=function(y){function h(d,u){d===void 0&&(d=1e3),u===void 0&&(u=w.defaultStartUpdateFunc);var l=y.call(this)||this;return l._currentTime=l.disposeVar((0,g.react)(0)),l._speed=1,l._duration=d,l._loop=!1,l.startUpdateFunc=u,l._updateBindThis=l._update.bind(l),l.dispose(function(){l._cancelStartUpdateFunc&&(l._cancelStartUpdateFunc(),l._cancelStartUpdateFunc=void 0)}),l._startTimeStamp=Number.NaN,l.dispose(function(){l._startPlayingEvent&&l._startPlayingEvent.reset(),l._stopPlayingEvent&&l._stopPlayingEvent.reset()}),l}return f(h,y),Object.defineProperty(h.prototype,"startPlayingEvent",{get:function(){return this._startPlayingEvent=this._startPlayingEvent||new p.Event,this._startPlayingEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"stopPlayingEvent",{get:function(){return this._stopPlayingEvent=this._stopPlayingEvent||new p.Event,this._stopPlayingEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"currentTimeChangedEvent",{get:function(){return this._currentTime.changed},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"loopChangedEvent",{get:function(){return this._loopChangedEvent=this._loopChangedEvent||new p.Event,this._loopChangedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"loop",{get:function(){return this._loop},set:function(d){this._loop!==d&&(this._loop=d,this._loopChangedEvent&&this._loopChangedEvent.emit(this._loop))},enumerable:!1,configurable:!0}),h.prototype._update=function(d){if(Number.isNaN(this._startTimeStamp))console.warn("Number.isNaN(this._startTimeStamp)");else{var u=(d-this._startTimeStamp)*this._speed;this._setCurrentTimeInner(u)}},Object.defineProperty(h.prototype,"currentTime",{get:function(){return this._currentTime.value},set:function(d){this._setCurrentTimeInner(d),this._resetStartTime()},enumerable:!1,configurable:!0}),h.prototype._setCurrentTimeInner=function(d){this._currentTime.value!==d&&(this._duration<=0?this._currentTime.value=0:d<0?this.loop?this._currentTime.value=this._duration+d%this._duration:(this._currentTime.value=0,this.playing&&this._stopPlaying()):d>this._duration?this.loop?this._currentTime.value=d%this._duration:(this._currentTime.value=this._duration,this.playing&&this._stopPlaying()):this._currentTime.value=d)},Object.defineProperty(h.prototype,"durationChangedEvent",{get:function(){return this._durationChangedEvent||(this._durationChangedEvent=new p.Event),this._durationChangedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"duration",{get:function(){return this._duration},set:function(d){var u;if(d<0)console.warn("duration sholud greater than 0!");else if(this._duration!==d){var l=this._duration;this._duration=d,this._currentTime.value>this._duration&&(this._currentTime.value=this._duration),(u=this._durationChangedEvent)===null||u===void 0||u.emit(this._duration,l)}},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"speedChangedEvent",{get:function(){return this._speedChangedEvent||(this._speedChangedEvent=new p.Event),this._speedChangedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"speed",{get:function(){return this._speed},set:function(d){var u;if(this._speed!==d&&d!==0){var l=this._speed;this._speed=d,this._resetStartTime(),(u=this._speedChangedEvent)===null||u===void 0||u.emit(this._speed,l)}},enumerable:!1,configurable:!0}),h.prototype._resetStartTime=function(){this._startTimeStamp=performance.now()-this._currentTime.value/this._speed},h.prototype._startPlaying=function(){var d,u;this._resetStartTime(),this._cancelStartUpdateFunc=this.startUpdateFunc(this._updateBindThis),(d=this._startPlayingEvent)===null||d===void 0||d.emit(this._currentTime.value),(u=this._playingChangedEvent)===null||u===void 0||u.emit(!0)},h.prototype._stopPlaying=function(){var d,u;if(!this._cancelStartUpdateFunc)throw new Error("this._cancelStartUpdateFunc is undefined!");this._cancelStartUpdateFunc(),this._cancelStartUpdateFunc=void 0,(d=this._stopPlayingEvent)===null||d===void 0||d.emit(this._currentTime.value),(u=this._playingChangedEvent)===null||u===void 0||u.emit(!1)},Object.defineProperty(h.prototype,"playingChangedEvent",{get:function(){return this._playingChangedEvent||(this._playingChangedEvent=new p.Event),this._playingChangedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"playing",{get:function(){return!!this._cancelStartUpdateFunc},set:function(d){!!this._cancelStartUpdateFunc!==d&&(d?this._startPlaying():this._stopPlaying())},enumerable:!1,configurable:!0}),h}(m.Destroyable);s.Player=_},2168:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getReactFuncs=void 0;var c=a(8835),f=a(6583);s.getReactFuncs=function(m){var p=(0,c.getCompleteReactParams)(m);return[function(){return p[0][p[1]]},function(g){try{p[0][p[1]]=g}catch(w){(0,f.oneTimeWarning)("setValue error, obj(".concat(p[0].constructor.name,") prop(").concat(p[1],") error(").concat(w,")"))}},p[0][p[2]]]}},2217:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)}),m=this&&this.__read||function(h,d){var u=typeof Symbol=="function"&&h[Symbol.iterator];if(!u)return h;var l,v,b=u.call(h),E=[];try{for(;(d===void 0||d-- >0)&&!(l=b.next()).done;)E.push(l.value)}catch(S){v={error:S}}finally{try{l&&!l.done&&(u=b.return)&&u.call(b)}finally{if(v)throw v.error}}return E};Object.defineProperty(s,"__esModule",{value:!0}),s.PointerHoverDeprecated=void 0;var p=a(7372),g=a(7372),w=a(109),_=a(2299),y=function(h){function d(u,l){l===void 0&&(l=1500);var v=h.call(this)||this;v._hoverEvent=new g.Event,v._hoverOutEvent=new g.Event;var b=new w.DebouncingDeprecated(l);v.dispose(function(){return b.destroy()});var E,S=0,P=0;b.progressFunc=function(){return v._hoverEvent.emit(S,P,E)};var C=function(N){var T;!b.isRunning&&b.restart(),E=N,T=m((0,_.getDomEventCurrentTargetPos)(N),2),S=T[0],P=T[1],b.debounce(),v._hoverOutEvent.emit()},x=function(N){var T;!b.isRunning&&b.restart(),E=N,T=m((0,_.getDomEventCurrentTargetPos)(E),2),S=T[0],P=T[1],b.debounce(),v._hoverOutEvent.emit()},O=function(N){var T;!b.isRunning&&b.restart(),E=N,T=m((0,_.getDomEventCurrentTargetPos)(E),2),S=T[0],P=T[1],b.debounce(),v._hoverOutEvent.emit()},I=function(N){b.isRunning&&b.cancel(),v._hoverOutEvent.emit()};return u.addEventListener("pointerdown",C),u.addEventListener("pointerup",x),u.addEventListener("pointermove",O),u.addEventListener("pointerout",I),v.dispose(function(){u.removeEventListener("pointerdown",C),u.removeEventListener("pointerup",x),u.removeEventListener("pointermove",O),u.removeEventListener("pointerout",I)}),v}return f(d,h),Object.defineProperty(d.prototype,"hoverEvent",{get:function(){return this._hoverEvent},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"hoverOutEvent",{get:function(){return this._hoverOutEvent},enumerable:!1,configurable:!0}),d}(p.Destroyable);s.PointerHoverDeprecated=y},2220:function(o,s,a){var c,f=this&&this.__extends||(c=function(l,v){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var S in E)Object.prototype.hasOwnProperty.call(E,S)&&(b[S]=E[S])},c(l,v)},function(l,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function b(){this.constructor=l}c(l,v),l.prototype=v===null?Object.create(v):(b.prototype=v.prototype,new b)}),m=this&&this.__createBinding||(Object.create?function(l,v,b,E){E===void 0&&(E=b);var S=Object.getOwnPropertyDescriptor(v,b);S&&!("get"in S?!v.__esModule:S.writable||S.configurable)||(S={enumerable:!0,get:function(){return v[b]}}),Object.defineProperty(l,E,S)}:function(l,v,b,E){E===void 0&&(E=b),l[E]=v[b]}),p=this&&this.__exportStar||function(l,v){for(var b in l)b==="default"||Object.prototype.hasOwnProperty.call(v,b)||m(v,l,b)},g=this&&this.__values||function(l){var v=typeof Symbol=="function"&&Symbol.iterator,b=v&&l[v],E=0;if(b)return b.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&E>=l.length&&(l=void 0),{value:l&&l[E++],done:!l}}};throw new TypeError(v?"Object is not iterable.":"Symbol.iterator is not defined.")},w=this&&this.__read||function(l,v){var b=typeof Symbol=="function"&&l[Symbol.iterator];if(!b)return l;var E,S,P=b.call(l),C=[];try{for(;(v===void 0||v-- >0)&&!(E=P.next()).done;)C.push(E.value)}catch(x){S={error:x}}finally{try{E&&!E.done&&(b=P.return)&&b.call(P)}finally{if(S)throw S.error}}return C},_=this&&this.__spreadArray||function(l,v,b){if(b||arguments.length===2)for(var E,S=0,P=v.length;S<P;S++)!E&&S in v||(E||(E=Array.prototype.slice.call(v,0,S)),E[S]=v[S]);return l.concat(E||Array.prototype.slice.call(v))};Object.defineProperty(s,"__esModule",{value:!0}),s.SceneObject=void 0;var y=a(1662),h=a(3815),d=a(2723),u=function(l){function v(b){var E=l.call(this)||this;return E._components=E.disposeVar(new h.ObservableSet),b!==void 0&&(typeof b!="string"?console.warn("场景对象创建时的ID必须是字符串类型,而这里是id的类型是".concat(typeof b,",值为").concat(b)):b.trim()===""?console.warn("场景对象创建时的ID不能是空字符串!"):b.trim()!==b&&console.warn("id前后有空字符串!id: ".concat(b))),E._id=b??(0,y.createGuid)(),E._setDefaultName(),E}return f(v,l),Object.defineProperty(v,"sceneObjs",{get:function(){return v.context.sceneObjs},enumerable:!1,configurable:!0}),v.getSceneObjById=function(b){return v.context.getSceneObjectById(b)},v.getSceneObjsByDevTags=function(b){return v.context.getSceneObjectsByDevTags(b)},Object.defineProperty(v,"$refs",{get:function(){return v.context.refsManager.refs},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"defaultProps",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"id",{get:function(){return this._id},set:function(b){console.error("当前正在试图修改场景对象(".concat(this.name,"/").concat(this.typeName,")的ID,只有在创建时才可以设置ID!后期修改无效!!!"))},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"components",{get:function(){return this._components},enumerable:!1,configurable:!0}),v.prototype._setDefaultName=function(){this.name="".concat(this.typeName,"_").concat((""+this.id).slice(-4))},v.prototype._innerGetJson=function(b){var E,S;b===void 0&&(b=!0);var P={id:this.id,type:this.typeName};try{for(var C=g(Object.keys(this.defaultProps)),x=C.next();!x.done;x=C.next()){var O=x.value;if(b){var I=this.defaultProps[O];(I instanceof y.ReactiveVariable?I.equals(this[O]):I===this[O])||(P[O]=this[O])}else P[O]=this[O]}}catch(N){E={error:N}}finally{try{x&&!x.done&&(S=C.return)&&S.call(C)}finally{if(E)throw E.error}}return P},v.prototype._innerSetJson=function(b,E,S){var P,C;if(b instanceof Object&&(!b.type||b.type===this.typeName)){b.id&&b.id!==this.id&&console.warn("value.id === undefined || value.id".concat(b.id," !== this.id(").concat(this.id,")"));var x=E||[];x.push("id","type");var O=Object.keys(this.defaultProps).filter(function(A){return!x.includes(A)});try{for(var I=g(O),N=I.next();!N.done;N=I.next()){var T=N.value;if(T in b)this[T]=b[T]===null?void 0:b[T];else if(S==null||!S){var R=this.defaultProps[T];R instanceof y.ReactiveVariable&&(R=R.value),this[T]=R}}}catch(A){P={error:A}}finally{try{N&&!N.done&&(C=I.return)&&C.call(I)}finally{if(P)throw P.error}}}else console.error("value.type && value.type".concat(b.type," !== this.typeName").concat(this.typeName))},v.prototype.setJsonWithoutDefaults=function(b){this._innerSetJson(b,void 0,!0)},v.prototype.setJsonWithDefaults=function(b){this._innerSetJson(b,void 0,!1)},v.prototype.getJsonWithDefaults=function(){return this._innerGetJson(!1)},v.prototype.getJsonWithoutDefaults=function(){return this._innerGetJson(!0)},Object.defineProperty(v.prototype,"jsonStr",{get:function(){return JSON.stringify(this.json,void 0," ")},set:function(b){try{this.json=b&&JSON.parse(b)||{}}catch(E){console.error("SceneObject解析json数据时发生错误!error: ".concat(E))}},enumerable:!1,configurable:!0}),v.prototype.addDevTag=function(){for(var b=this,E=[],S=0;S<arguments.length;S++)E[S]=arguments[S];if(this.devTags){var P=E.filter(function(C){return!b.devTags.includes(C)});P.length>0&&(this.devTags=_(_([],w(this.devTags),!1),w(P),!1))}else this.devTags=E},v.prototype.deleteDevTag=function(){for(var b=[],E=0;E<arguments.length;E++)b[E]=arguments[E];if(this.devTags){var S=this.devTags.filter(function(P){return!b.includes(P)});this.devTags=S}},Object.defineProperty(v.prototype,"selfCreatedEvent",{get:function(){var b=this;return this._selfCreatedEvent||(this._selfCreatedEvent=this.disposeVar(new y.Event),this.dispose(v.context.sceneObjCreatedEvent.disposableOn(function(E){if(!b._selfCreatedEvent)throw new Error("!this._createdEvent");E===b&&b._selfCreatedEvent.emit()}))),this._selfCreatedEvent},enumerable:!1,configurable:!0}),v.context=new d.SceneObjectsContext,v.register=v.context.register.bind(v.context),v.create=v.context.createSceneObject.bind(v.context),v.createFromClass=v.context.createSceneObjectFromClass.bind(v.context),v.createFromJson=v.context.createSceneObjectFromJson.bind(v.context),v}(y.Destroyable);s.SceneObject=u,function(l){l.createDefaultProps=function(){return{name:"未命名场景对象",ref:void 0,devTags:(0,y.reactArrayWithUndefined)(void 0),extras:(0,y.reactJson)(void 0)}}}(u=s.SceneObject||(s.SceneObject={})),s.SceneObject=u,(0,y.extendClassProps)(u.prototype,u.createDefaultProps),p(a(146),s)},2228:(o,s)=>{function a(C,x){return x===void 0&&(x=[0,0]),x[0]=-C[1],x[1]=C[0],x}function c(C,x,O){return O===void 0&&(O=[0,0]),O[0]=C[0]-x[0],O[1]=C[1]-x[1],O}function f(C,x){x===void 0&&(x=[0,0]);var O=function(I){return Math.sqrt(function(N){return N[0]*N[0]+N[1]*N[1]}(I))}(C);return x[0]=C[0]/O,x[1]=C[1]/O,x}function m(C,x){return x===void 0&&(x=[0,0]),x[0]=-C[0],x[1]=-C[1],x}function p(C,x,O){return O===void 0&&(O=[0,0]),O[0]=C[0]*x,O[1]=C[1]*x,O}function g(C,x,O){return O===void 0&&(O=[0,0]),O[0]=C[0]+x[0],O[1]=C[1]+x[1],O}function w(C,x){var O,I,N=(I=x,(O=C)[0]*I[0]+O[1]*I[1]),T=Math.acos(N);return 1/Math.cos(T/2)}function _(C,x,O){return O===void 0&&(O=[0,0]),O[0]=C,O[1]=x,O}Object.defineProperty(s,"__esModule",{value:!0}),s.extrudePolyline=void 0;var y=[0,0],h=[0,0],d=[0,0],u=[0,0],l=[0,0],v=[0,0],b=[0,0],E=[0,0];function S(C,x,O,I,N,T){var R=c(C,x,E),A=a(f(R,R),u),B=c(O,C,E),k=a(f(B,B),v),z=m(A,l),j=m(k,b),L=g(A,k);f(L,L);var F,G,W=(G=k,(F=A)[0]*G[1]-F[1]*G[0]);if(Math.abs(W)<.1)g(q=p(L,I,E),C,q),T.push(q[0],q[1]),N.push(T.length/2),T.push(C[0],C[1]),N.push(T.length/2),p(J=m(L,E),I,J),g(J,C,J),T.push(J[0],J[1]),N.push(T.length/2);else if(W<0){g(q=p(A,I,E),C,q),T.push(q[0],q[1]);var V=p(L,I,E);g(V,C,V),T.push(V[0],V[1]),g(J=p(k,I,E),C,J),T.push(J[0],J[1]),N.push(T.length/2),T.push(C[0],C[1]),N.push(T.length/2),U=(U=w(j,z))>3?3:U,p(Y=m(L,E),U*I,Y),g(Y,C,Y),T.push(Y[0],Y[1]),N.push(T.length/2)}else{var U,q,J;g(q=p(L,(U=(U=w(A,k))>3?3:U)*I,E),C,q),T.push(q[0],q[1]),N.push(T.length/2),T.push(C[0],C[1]),N.push(T.length/2),g(J=p(z,I,E),C,J),T.push(J[0],J[1]);var Y,re=m(L,E);p(re,I,re),g(re,C,re),T.push(re[0],re[1]),g(Y=p(j,I,E),C,Y),T.push(Y[0],Y[1]),N.push(T.length/2)}}var P=[];s.extrudePolyline=function(C,x,O,I,N,T){O===void 0&&(O=!1),I=I??[],N=N??[],T=T??[];var R=P;R.length=0,function(A,B,k,z,j){if(k===void 0&&(k=!1),A.length%2!=0)throw new Error("positions.length % 2 !== 0");z=z??[],j=j??[];var L=A,F=L.length/2;if(!(F<2)){if(k){if(!(F>=3))throw new Error("loop should have >= 3 vertex!");var G=_(L[0],L[1],y),W=_(L[2],L[3],d);S(G,_(L[2*(F-1)+0],L[2*(F-1)+1],h),W,B,j,z)}else{G=_(L[0],L[1],y);var V=c(W=_(L[2],L[3],d),G,E),U=a(f(V,V),v);g(J=p(U,B,E),G,J),z.push(J[0],J[1]),j.push(z.length/2),z.push(G[0],G[1]),j.push(z.length/2),p(Y=m(U,E),B,Y),g(Y,G,Y),z.push(Y[0],Y[1]),j.push(z.length/2)}if(F>=3)for(var q=1;q<F-1;++q)G=_(L[2*q+0],L[2*q+1],y),W=_(L[2*(q+1)+0],L[2*(q+1)+1],d),S(G,_(L[2*(q-1)+0],L[2*(q-1)+1],h),W,B,j,z);if(k){if(!(F>=3))throw new Error("loop should have >= 3 vertex!");G=_(L[2*(F-1)+0],L[2*(F-1)+1],y),W=_(L[0],L[1],d),S(G,_(L[2*(F-2)+0],L[2*(F-2)*1],h),W,B,j,z)}else{var J,Y,re=c(G=_(L[2*(F-1)+0],L[2*(F-1)+1],y),_(L[2*(F-2)+0],L[2*(F-2)+1],h),E),oe=a(f(re,re),u);g(J=p(oe,B,E),G,J),z.push(J[0],J[1]),j.push(z.length/2),z.push(G[0],G[1]),j.push(z.length/2),p(Y=m(oe,E),B,Y),g(Y,G,Y),z.push(Y[0],Y[1]),j.push(z.length/2)}}}(C,.5*x,O,I,R),function(A,B,k,z,j){if(z=z||[],j=j||[],A.length%2!=0)throw new Error("extrudedPositions.length % 2 !== 0");if(k.length%3!=0)throw new Error("extrudesSegments.length % 3 !== 0");for(var L=k.length/3,F=0,G=0;G<L;++G){for(var W=k[3*G+0],V=k[3*G+1],U=k[3*G+2],q=F;q<W;++q)z.push(0,0);if(W-F>=2)for(var J=F+1;J<W;++J)j.push(W,J,J-1);z.push(0,.5);for(var Y=V;Y<U;++Y)z.push(0,1);if(U-V>=2)for(var re=V+1;re<U;++re)j.push(W,re-1,re);F=U}for(F=0,G=0;G<L-1;++G){var oe=k[3*G+0]-1,te=k[3*G+1]-1,me=k[3*G+2]-1,be=k[3*G+2],ne=k[3*(G+1)+0],fe=k[3*(G+1)+1];j.push(oe,te,ne),j.push(oe,ne,be),j.push(te,me,fe),j.push(te,fe,ne)}B&&(oe=k[3*(L-1)+0]-1,te=k[3*(L-1)+1]-1,me=k[3*(L-1)+2]-1,be=0,ne=k[0],fe=k[1],j.push(oe,te,ne),j.push(oe,ne,be),j.push(te,me,fe),j.push(te,fe,ne))}(I,O,R,N,T)}},2243:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(5486),s),f(a(3631),s)},2267:(o,s)=>{function a(c,f){return(new Array(f).join("0")+c).slice(-f)}Object.defineProperty(s,"__esModule",{value:!0}),s.getDateTime=s.formatInterger=void 0,s.formatInterger=a,s.getDateTime=function(){var c=function(h){return a(h,2)},f=new Date,m=f.getFullYear(),p=f.getMonth()+1,g=f.getDate(),w=f.getHours(),_=f.getMinutes(),y=f.getSeconds();return"".concat(m,"-").concat(c(p),"-").concat(c(g)," ").concat(c(w),":").concat(c(_),":").concat(c(y))}},2277:function(o,s,a){var c,f=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(h[u]=d[u])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function h(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(h.prototype=y.prototype,new h)});Object.defineProperty(s,"__esModule",{value:!0}),s.CanvasPrimitive=void 0;var m=a(1662),p=a(7372),g=a(7372),w=function(_){function y(h,d){d===void 0&&(d={});var u=_.call(this)||this;u._canvasPrimitivesContext=h,u._id=(0,m.createGuid)(),u._actived=!1,u._hovered=!1,u._selected=!1,u._opacity=1,u._show=!0;var l=d.needRedraw,v=l===void 0||l,b=d.needPickRedraw,E=b===void 0||b;return v&&(u._needRedrawEvent=new g.Event),E&&(u._needPickRedrawEvent=new g.Event),u._canvasPrimitivesContext.addPoi(u),u.dispose(function(){return u._canvasPrimitivesContext.removePoi(u)}),u.dispose(u.showChanged.disposableOn(function(){u.needRedraw(),u.needPickRedraw()})),u.dispose(u.opacityChanged.disposableOn(function(){return u.needRedraw()})),u}return f(y,_),Object.defineProperty(y.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"context",{get:function(){return this._canvasPrimitivesContext},enumerable:!1,configurable:!0}),y.prototype.needRedraw=function(){this._needRedrawEvent?this._needRedrawEvent.emit():console.warn("no needRedrawEvent!")},y.prototype.needPickRedraw=function(){this._needPickRedrawEvent?this._needPickRedrawEvent.emit():console.warn("no needPickRedrawEvent!")},y.prototype.hasClickEvent=function(){return!!this._clickEvent},Object.defineProperty(y.prototype,"clickEvent",{get:function(){return this._clickEvent=this._clickEvent||new g.Event,this._clickEvent},enumerable:!1,configurable:!0}),y.prototype.hasClickOutEvent=function(){return!!this._clickOutEvent},Object.defineProperty(y.prototype,"clickOutEvent",{get:function(){return this._clickOutEvent=this._clickOutEvent||new g.Event,this._clickOutEvent},enumerable:!1,configurable:!0}),y.prototype.hasDbclickEvent=function(){return!!this._dbclickEvent},Object.defineProperty(y.prototype,"dbclickEvent",{get:function(){return this._dbclickEvent=this._dbclickEvent||new g.Event,this._dbclickEvent},enumerable:!1,configurable:!0}),y.prototype.hasDbclickOutEvent=function(){return!!this._dbclickOutEvent},Object.defineProperty(y.prototype,"dbclickOutEvent",{get:function(){return this._dbclickOutEvent=this._dbclickOutEvent||new g.Event,this._dbclickOutEvent},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"actived",{get:function(){return this._actived},set:function(h){this._actived!==h&&(this._actived=h,this._activedChanged&&this._activedChanged.emit(h,this))},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"activedChanged",{get:function(){return this._activedChanged=this._activedChanged||new g.Event,this._activedChanged},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"hovered",{get:function(){return this._hovered},set:function(h){this._hovered!==h&&(this._hovered=h,this._hoveredChanged&&this._hoveredChanged.emit(h,this))},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"hoveredChanged",{get:function(){return this._hoveredChanged=this._hoveredChanged||new g.Event,this._hoveredChanged},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"selected",{get:function(){return this._selected},set:function(h){this._selected!==h&&(this._selected=h,this._selectedChanged&&this._selectedChanged.emit(h,this))},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"selectedChanged",{get:function(){return this._selectedChanged=this._selectedChanged||new g.Event,this._selectedChanged},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"opacity",{get:function(){return this._opacity},set:function(h){this._opacity!==h&&(this._opacity=h,this._opacityChanged&&this._opacityChanged.emit(h,this))},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"opacityChanged",{get:function(){return this._opacityChanged=this._opacityChanged||new g.Event,this._opacityChanged},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"show",{get:function(){return this._show},set:function(h){this._show!==h&&(this._show=h,this._showChanged&&this._showChanged.emit(h,this))},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"showChanged",{get:function(){return this._showChanged=this._showChanged||new g.Event,this._showChanged},enumerable:!1,configurable:!0}),y}(p.Destroyable);s.CanvasPrimitive=w},2299:(o,s)=>{function a(f,m){m=m||[];var p=f.parentNode;return p?a(p,m.concat(p)):m}function c(f){var m=f.composedPath&&f.composedPath()||f.path,p=f.target;if(m!=null)return m.indexOf(window)<0?m.concat(window):m;if(p===window)return[window];if(p===null)throw new Error("target === null");return[p].concat(a(p),window)}Object.defineProperty(s,"__esModule",{value:!0}),s.getDomEventCurrentTargetPos=void 0,s.getDomEventCurrentTargetPos=function(f,m){m===void 0&&(m=!1);for(var p=f.offsetX,g=f.offsetY,w=c(f),_=0;_<w.length;++_){var y=w[_];if(!(y!==f.currentTarget&&y instanceof HTMLElement))break;p+=y.clientLeft,g+=y.clientTop,p+=y.offsetLeft,g+=y.offsetTop}return m?[p*window.devicePixelRatio,g*window.devicePixelRatio]:[p,g]}},2429:function(o,s,a){var c,f=this&&this.__extends||(c=function(d,u){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,v){l.__proto__=v}||function(l,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(l[b]=v[b])},c(d,u)},function(d,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function l(){this.constructor=d}c(d,u),d.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}),m=this&&this.__values||function(d){var u=typeof Symbol=="function"&&Symbol.iterator,l=u&&d[u],v=0;if(l)return l.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&v>=d.length&&(d=void 0),{value:d&&d[v++],done:!d}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.destroyAnimationWithChildren=s.Animation=s.Channel=void 0;var p=a(7372),g=a(1662),w=a(7372),_=0,y=function(d){function u(l,v){l===void 0&&(l=0),v===void 0&&(v=1e3);var b=d.call(this)||this;return b._startTime=Number.NaN,b._enabled=!0,b._animation=new h(v),b.dispose(function(){return b._animation.destroy()}),b.dispose(function(){b._changedEvent&&(b._changedEvent.reset(),b._changedEvent=void 0)}),b.startTime=l,b.dispose(b._animation.changedEvent.disposableOn(function(){b.changedEvent&&b.changedEvent.emit(b)})),b}return f(u,d),Object.defineProperty(u.prototype,"changedEvent",{get:function(){return this._changedEvent||(this._changedEvent=new w.Event),this._changedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"animation",{get:function(){return this._animation},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"startTime",{get:function(){return this._startTime},set:function(l){this._startTime!==l&&(this._startTime=l,this.changedEvent&&this.changedEvent.emit(this))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"enabled",{get:function(){return this._enabled},set:function(l){this._enabled!==l&&(this._enabled=l,this.changedEvent&&this.changedEvent.emit(this))},enumerable:!1,configurable:!0}),u}(p.Destroyable);s.Channel=y;var h=function(d){function u(l){l===void 0&&(l=0);var v=d.call(this)||this;return v._duration=l,v._currentTime=Number.NaN,v.dispose(function(){v._channels&&(v._channels.destroy(),v._channels=void 0),v.enterFunc=void 0,v.leaveFunc=void 0,v.progressFunc=void 0,v._changedEvent&&(v._changedEvent.reset(),v._changedEvent=void 0)}),v}return f(u,d),Object.defineProperty(u.prototype,"changedEvent",{get:function(){return this._changedEvent||(this._changedEvent=new w.Event),this._changedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"name",{get:function(){return this._name||(this._name="Unknown".concat(++_)),this._name},set:function(l){this._name!==l&&(this._name=l,this._changedEvent&&this._changedEvent.emit(this))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"hasChannels",{get:function(){return!(!this._channels||this._channels.length===0)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"channels",{get:function(){var l=this;if(!this._channels){var v=new WeakMap,b=new g.ObservableArray;this.dispose(b.toChangeEvent.disposableOn(function(E,S){for(var P=E.length,C=0;C<P;++C){var x=E[C];if(x.deleteCount>0)for(var O=x.start;O<x.deleteCount;++O){var I=S.get(O);if(!(B=v.get(I)))throw console.error("!disposeFunc"),new Error("!disposeFunc");B(),v.delete(I)}if(x.items.length>0)for(var N=x.items,T=N.length,R=0;R<T;++R){var A=N[R],B=A.changedEvent.disposableOn(function(k){l.recomputeDurationFromChildren(!1),l._changedEvent&&l._changedEvent.emit(l)});v.set(A,B)}}return!0})),this.dispose(b.changedEvent.disposableOn(function(){l.recomputeDurationFromChildren(!1),l._changedEvent&&l._changedEvent.emit(l)})),this._channels=b}return this._channels},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"duration",{get:function(){return this._duration},set:function(l){this._duration!==l&&(this._duration,this._duration=l,this._changedEvent&&this._changedEvent.emit(this))},enumerable:!1,configurable:!0}),u.prototype.recomputeDurationFromChildren=function(l){l===void 0&&(l=!1);var v=this._channels;if(v&&v.length>0){for(var b=0,E=v.length,S=0;S<E;++S){var P=v.get(S),C=P.animation,x=P.startTime;l&&C.recomputeDurationFromChildren();var O=x+C.duration;b<O&&(b=O)}this.duration=b}},u.prototype.valid=function(l){return(l=l??this._currentTime)>=0&&l<=this.duration},Object.defineProperty(u.prototype,"currentTime",{get:function(){return this._currentTime},set:function(l){if(this.valid(l)||(l=Number.NaN),!(Number.isNaN(l)&&Number.isNaN(this._currentTime))){if(this._currentTime!==l){var v=this._currentTime;if(Number.isNaN(l)?this.leaveFunc&&this.leaveFunc(v):Number.isNaN(this._currentTime)&&this.enterFunc&&this.enterFunc(l),this._currentTime=l,Number.isNaN(l)||this.progressFunc&&this.progressFunc(l,v),this._channels)for(var b=this._channels.length,E=0;E<b;++E){var S=this._channels.get(E),P=S.animation,C=S.startTime;if(S.enabled)if(Number.isNaN(l))P.currentTime=Number.NaN;else if(Number.isNaN(v)){var x=l-C;P.currentTime=x}else{var O=C+P.duration;x=l-C,l>v?(l<=C&&(P.currentTime=x),C>v&&C<=l&&(P.currentTime=0),l>C&&l<=O&&(P.currentTime=x),O>v&&O<=l&&(P.currentTime=P.duration),l>O&&(P.currentTime=x)):l<v&&(l>O&&(P.currentTime=x),O>v&&O<=l&&(P.currentTime=P.duration),l>C&&l<=O&&(P.currentTime=x),C>v&&C<=l&&(P.currentTime=0),l<=C&&(P.currentTime=x))}}}}},enumerable:!1,configurable:!0}),u}(p.Destroyable);s.Animation=h,s.destroyAnimationWithChildren=function d(u){var l,v;if(u.hasChannels)try{for(var b=m(u.channels),E=b.next();!E.done;E=b.next())d(E.value.animation)}catch(S){l={error:S}}finally{try{E&&!E.done&&(v=b.return)&&v.call(b)}finally{if(l)throw l.error}}u.destroy()}},2452:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.SmartListenerHandler=void 0;var a=function(){function c(){}return c.prototype._reset=function(f,m){this._listenerHandler=f,this._cid=m},c.prototype.clone=function(f){return(f=f??new c)._reset(this._listenerHandler,this._cid),f},Object.defineProperty(c.prototype,"valid",{get:function(){if(this._listenerHandler!==void 0&&typeof this._cid=="number"){var f=this._listenerHandler._cid;if(f!==void 0&&this._cid===f)return!0}return!1},enumerable:!1,configurable:!0}),c}();s.SmartListenerHandler=a},2520:function(o,s,a){var c,f=this&&this.__extends||(c=function(y,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(d[l]=u[l])},c(y,h)},function(y,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function d(){this.constructor=y}c(y,h),y.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}),m=this&&this.__read||function(y,h){var d=typeof Symbol=="function"&&y[Symbol.iterator];if(!d)return y;var u,l,v=d.call(y),b=[];try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)b.push(u.value)}catch(E){l={error:E}}finally{try{u&&!u.done&&(d=v.return)&&d.call(v)}finally{if(l)throw l.error}}return b},p=this&&this.__spreadArray||function(y,h,d){if(d||arguments.length===2)for(var u,l=0,v=h.length;l<v;l++)!u&&l in h||(u||(u=Array.prototype.slice.call(h,0,l)),u[l]=h[l]);return y.concat(u||Array.prototype.slice.call(h))};Object.defineProperty(s,"__esModule",{value:!0}),s.ObservableArray=void 0;var g=a(9359),w=a(4899),_=function(y){function h(){var d=y.call(this)||this;return d._innerObj=[],d.dispose(function(){if(d.length=0,d._innerObj.length>0)throw new Error("this._innerObj.length > 0");d._toChangeEvent&&d._toChangeEvent.reset(),d._innerObj=void 0}),d}return f(h,y),Object.defineProperty(h.prototype,"toChangeEvent",{get:function(){return this._toChangeEvent||(this._toChangeEvent=new w.Event),this._toChangeEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"changedEvent",{get:function(){return this._changedEvent||(this._changedEvent=new w.Event),this._changedEvent},enumerable:!1,configurable:!0}),h.prototype._resetArray=function(d){this._toChangeEvent&&this._toChangeEvent.emit([{start:0,deleteCount:this._innerObj.length,items:d}],this);var u=d.length;this._innerObj.length=u;for(var l=0;l<u;++l)this._innerObj[l]=d[l];this._changedEvent&&this._changedEvent.emit(this)},h.prototype.splice=function(d,u){for(var l,v=[],b=2;b<arguments.length;b++)v[b-2]=arguments[b];var E=this._innerObj.length;(d=d>this._innerObj.length?this._innerObj.length:d)>E?d=E:d<0&&(d+=E)<0&&(d=0);var S=this._innerObj.length-d;if(u>S?u=S:u<0&&(u=0),arguments.length===1){this._toChangeEvent&&this._toChangeEvent.emit([{start:d,deleteCount:this._innerObj.length-d,items:[]}],this);var P=this._innerObj.splice(d);return this._changedEvent&&this._changedEvent.emit(this),P}return arguments.length===2?(this._toChangeEvent&&this._toChangeEvent.emit([{start:d,deleteCount:u,items:[]}],this),P=this._innerObj.splice(d,u),this._changedEvent&&this._changedEvent.emit(this),P):(this._toChangeEvent&&this._toChangeEvent.emit([{start:d,deleteCount:u,items:v}],this),P=(l=this._innerObj).splice.apply(l,p([d,u],m(v),!1)),this._changedEvent&&this._changedEvent.emit(this),P)},h.prototype.pop=function(){if(this._innerObj.length!==0){if(this._toChangeEvent){var d=this._innerObj.length-1;this._toChangeEvent.emit([{start:d,deleteCount:1,items:[]}],this)}var u=this._innerObj.pop();return this._changedEvent&&this._changedEvent.emit(this),u}},h.prototype.push=function(){for(var d,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];if(this._toChangeEvent){var v=this._innerObj.length;this._toChangeEvent.emit([{start:v,deleteCount:0,items:u}],this)}var b=(d=this._innerObj).push.apply(d,p([],m(u),!1));return this._changedEvent&&this._changedEvent.emit(this),b},Object.defineProperty(h.prototype,"length",{get:function(){return this._innerObj.length},set:function(d){if(d<0)throw new Error("value < 0");var u=this._innerObj.length;if(u!==d){if(this._toChangeEvent){var l=void 0,v=void 0,b=void 0;u>d?(l=d,v=u-d,b=[]):(l=u,v=0,b=new Array(d-u)),this._toChangeEvent.emit([{start:l,deleteCount:v,items:b}],this)}this._innerObj.length=d,this._changedEvent&&this._changedEvent.emit(this)}},enumerable:!1,configurable:!0}),h.prototype.get=function(d){return this._innerObj[d]},h.prototype.set=function(d,u){var l=this._innerObj.length;if(d<0||d>=l)throw new Error("index < 0 || index >= length");this._toChangeEvent&&this._toChangeEvent.emit([{start:d,deleteCount:1,items:[u]}],this),this._innerObj[d]=u,this._changedEvent&&this._changedEvent.emit(this)},h.prototype.indexOf=function(d){return this._innerObj.indexOf(d)},h.prototype[Symbol.iterator]=function(){return this._innerObj[Symbol.iterator]()},h}(g.Destroyable);s.ObservableArray=_},2601:function(o,s,a){var c=this&&this.__read||function(_,y){var h=typeof Symbol=="function"&&_[Symbol.iterator];if(!h)return _;var d,u,l=h.call(_),v=[];try{for(;(y===void 0||y-- >0)&&!(d=l.next()).done;)v.push(d.value)}catch(b){u={error:b}}finally{try{d&&!d.done&&(h=l.return)&&h.call(l)}finally{if(u)throw u.error}}return v},f=this&&this.__spreadArray||function(_,y,h){if(h||arguments.length===2)for(var d,u=0,l=y.length;u<l;u++)!d&&u in y||(d||(d=Array.prototype.slice.call(y,0,u)),d[u]=y[u]);return _.concat(d||Array.prototype.slice.call(y))};Object.defineProperty(s,"__esModule",{value:!0}),s.wrapAsyncFuncToCancelablePromise=s.cancelablePromise=s._executeSetCancelFuncOrCancelResult=void 0;var m=a(8055);function p(_,y){typeof _=="function"?_(y):_.cancelFunc=y}function g(_,y){return y instanceof Promise?function(h,d){var u=void 0,l=d.then(function(v){if(u)throw u;return v});return p(h,function(v){u=v??new m.CancelError("_revocablePromise_forPromise cancel error!")}),l}(_,y):function(h,d){return new Promise(function(u,l){p(h,function(v){l(v??new m.CancelError("_revocablePromise_forExecutor cancel error!"))});try{d(u,l)}catch(v){l(v)}})}(_,y)}function w(_,y){for(var h=[],d=2;d<arguments.length;d++)h[d-2]=arguments[d];var u,l=void 0,v=y.apply(void 0,f([{cancelCheck:function(){if(l)throw l},registerCancelFunc:function(b){(u=u||[]).push(b)}}],c(h),!1));return p(_,function(b){if(l=b??new m.CancelError("wrapAsyncFuncToRevocablePromise cancel error!"),u)for(var E=u.length-1;E>=0;--E)(0,u[E])(b)}),v}s._executeSetCancelFuncOrCancelResult=p,s.cancelablePromise=function(){for(var _=[],y=0;y<arguments.length;y++)_[y]=arguments[y];if(_.length===1){if(_[0]instanceof Promise){var h=g(u={},_[0]),d=u.cancelFunc;if(!d)throw new Error("!cancelResult.cancelFunc");return[d,h]}}else if(_.length===2){var u;if(_[0]instanceof Object)return g(u=_[0],_[1])}throw new Error("args wrong!")},s.wrapAsyncFuncToCancelablePromise=function(){for(var _=[],y=0;y<arguments.length;y++)_[y]=arguments[y];if(_.length>=1){if(typeof _[0]=="function"){var h={},d=w.apply(void 0,f([h],c(_),!1)),u=h.cancelFunc;if(!u)throw new Error("!cancelResult.cancelFunc");return[u,d]}return w.apply(void 0,f([],c(_),!1))}throw new Error("wrapAsyncFuncToCancelablePromise args error!")}},2723:function(o,s,a){var c,f=this&&this.__extends||(c=function(d,u){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,v){l.__proto__=v}||function(l,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(l[b]=v[b])},c(d,u)},function(d,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function l(){this.constructor=d}c(d,u),d.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}),m=this&&this.__values||function(d){var u=typeof Symbol=="function"&&Symbol.iterator,l=u&&d[u],v=0;if(l)return l.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&v>=d.length&&(d=void 0),{value:d&&d[v++],done:!d}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},p=this&&this.__read||function(d,u){var l=typeof Symbol=="function"&&d[Symbol.iterator];if(!l)return d;var v,b,E=l.call(d),S=[];try{for(;(u===void 0||u-- >0)&&!(v=E.next()).done;)S.push(v.value)}catch(P){b={error:P}}finally{try{v&&!v.done&&(l=E.return)&&l.call(E)}finally{if(b)throw b.error}}return S};Object.defineProperty(s,"__esModule",{value:!0}),s.SceneObjectsContext=void 0;var g=a(1662),w=a(9367),_=a(9026),y=a(1545),h=function(d){function u(){var l=d.call(this)||this;return l._sceneObjConstructorsMap=new Map,l._sceneObjs=new Map,l._sceneObjCreatedEvent=new g.Event,l._sceneObjToDestroyEvent=new g.Event,l._refsManager=l.disposeVar(new y.RefsManager(l)),l._environmentVariables={"xr-static":"xr-static"},l._environmentVariablesChanged=l.disposeVar(new g.Event),l}return f(u,d),Object.defineProperty(u.prototype,"typeNames",{get:function(){return this._sceneObjConstructorsMap.keys()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"sceneObjs",{get:function(){return this._sceneObjs.values()},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"sceneObjCreatedEvent",{get:function(){return this._sceneObjCreatedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"sceneObjToDestroyEvent",{get:function(){return this._sceneObjToDestroyEvent},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"refsManager",{get:function(){return this._refsManager},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"$refs",{get:function(){return this._refsManager.refs},enumerable:!1,configurable:!0}),u.prototype.register=function(l,v,b){return this._sceneObjConstructorsMap.has(l)&&(console.warn("register warn: ".concat(l," has registered, object is: ")),console.warn(this._sceneObjConstructorsMap.get(l))),this._sceneObjConstructorsMap.set(l,v),b&&this.setProps(l,b),l},u.prototype._getSceneObjConstructor=function(l){return this._sceneObjConstructorsMap.get(l)||void 0},u.prototype.getProps=function(l){var v=this._getSceneObjConstructor(l);if(v)return(0,g.getExtProp)(v,"__sceneObjExtraInfo");console.warn("cannot get constructor from type: ".concat(l))},u.prototype.setProps=function(l,v){var b=this._getSceneObjConstructor(l);if(b){var E=(0,g.getExtProp)(b,"__sceneObjExtraInfo");E||(E={},(0,g.setExtProp)(b,"__sceneObjExtraInfo",E)),Object.assign(E,v)}else console.warn("cannot get constructor from type: ".concat(l))},u.prototype.getProp=function(l,v){var b=this.getProps(l);return b&&b[v]},u.prototype.setProp=function(l,v,b){var E;this.setProps(l,((E={})[v]=b,E))},u.prototype._addSceneObject=function(l){var v=this;this._sceneObjs.set(l.id,l),this._sceneObjCreatedEvent.emit(l),l.dispose(function(){return v._deleteSceneObject(l)})},u.prototype._deleteSceneObject=function(l){this._sceneObjToDestroyEvent.emit(l),this._sceneObjs.delete(l.id)},u.prototype.createSceneObjectFromClass=function(l,v){if(!v||this._sceneObjs.has(v)){var b=(0,g.createGuid)();v&&console.warn("已存在相同id的对象!id自动变更!".concat(v," -> ").concat(b," 请注意:id变更可能导致引用失效!")),v=b}if(!v)throw new Error("id不能为空!");var E=new l(v);return E.id!==v&&(console.warn("sceneObj.id(".concat(E.id,") !== id(").concat(v,") sceneObjectType: ").concat(E.typeName)),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class MySceneObj extends ESSceneObject { constructor(id) { super(id); } }")),this._addSceneObject(E),E},u.prototype.createSceneObject=function(l,v){if(typeof l=="string"){var b=this._getSceneObjConstructor(l);return b?this.createSceneObjectFromClass(b,v):void console.warn("Cannot find SceneObjectType: ".concat(l))}return this.createSceneObjectFromClass(l,v)},u.prototype.createSceneObjectFromJson=function(l){var v=this.createSceneObject(l.type,l.id);return v&&(v.json=l),v},u.prototype.getSceneObjectById=function(l){return this._sceneObjs.get(l)},u.prototype.getSceneObjectsByDevTags=function(l){var v,b,E=[],S=function(x){l.some(function(O){return x.devTags&&x.devTags.includes(O)})&&E.push(x)};try{for(var P=m(this.sceneObjs),C=P.next();!C.done;C=P.next())S(C.value)}catch(x){v={error:x}}finally{try{C&&!C.done&&(b=P.return)&&b.call(P)}finally{if(v)throw v.error}}return E},Object.defineProperty(u.prototype,"environmentVariables",{get:function(){return this._environmentVariables},set:function(l){var v,b;try{for(var E=m(Object.entries(l)),S=E.next();!S.done;S=E.next()){var P=p(S.value,2),C=P[0],x=P[1];this.setEnv(C,x)}}catch(O){v={error:O}}finally{try{S&&!S.done&&(b=E.return)&&b.call(E)}finally{if(v)throw v.error}}},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"environmentVariablesChanged",{get:function(){return this._environmentVariablesChanged},enumerable:!1,configurable:!0}),u.prototype.setEnv=function(l,v){if(this._environmentVariables[l]!==v){var b=this._environmentVariables[l];this._environmentVariables[l]=v,this._environmentVariablesChanged.emit(l,v,b)}},u.prototype.getEnv=function(l){return this._environmentVariables[l]},u.prototype.getStrFromEnv=function(l){return(0,_.replaceStrWithEnv)(l)},u.prototype.createEnvStrReact=function(l,v){return(0,w.createEnvEvalStrReact)(l,v)},u.prototype.createEvnStrReact=function(l,v){return(0,w.createEnvEvalStrReact)(l,v)},u}(g.Destroyable);s.SceneObjectsContext=h},2731:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ary2Ns=s.xyzw2N4=s.xyz2N3=s.xyz2N2=s.Xyzw2Ns=s.createNumbers=void 0,s.createNumbers=function(f){for(var m,p=[],g=1;g<arguments.length;g++)p[g-1]=arguments[g];if(f>16)throw new Error("length > 16");for(var w=new Array(f),_=0;_<f;++_)w[_]=(m=p[_])!==null&&m!==void 0?m:0;return w};var a=function(){function f(m,p){this._xyzw=m,this._length=p}return Object.defineProperty(f.prototype,0,{get:function(){var m;return(m=this._xyzw.x)!==null&&m!==void 0?m:0},set:function(m){this._xyzw.x=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,1,{get:function(){var m;return(m=this._xyzw.y)!==null&&m!==void 0?m:0},set:function(m){this._xyzw.y=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,2,{get:function(){var m;return(m=this._xyzw.z)!==null&&m!==void 0?m:0},set:function(m){this._xyzw.z=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,3,{get:function(){var m;return(m=this._xyzw.w)!==null&&m!==void 0?m:0},set:function(m){this._xyzw.w=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),f}();s.Xyzw2Ns=a,s.xyz2N2=function(f){return new a(f,2)},s.xyz2N3=function(f){return new a(f,3)},s.xyzw2N4=function(f){return new a(f,4)};var c=function(){function f(m,p,g,w){this._array=m,this._length=p,this._start=g,this._stride=w}return Object.defineProperty(f.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,0,{get:function(){return this._array[this._start+0*this._stride]},set:function(m){this._array[this._start+0*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,1,{get:function(){return this._array[this._start+1*this._stride]},set:function(m){this._array[this._start+1*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,2,{get:function(){return this._array[this._start+2*this._stride]},set:function(m){this._array[this._start+2*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,3,{get:function(){return this._array[this._start+3*this._stride]},set:function(m){this._array[this._start+3*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,4,{get:function(){return this._array[this._start+4*this._stride]},set:function(m){this._array[this._start+4*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,5,{get:function(){return this._array[this._start+5*this._stride]},set:function(m){this._array[this._start+5*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,6,{get:function(){return this._array[this._start+6*this._stride]},set:function(m){this._array[this._start+6*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,7,{get:function(){return this._array[this._start+7*this._stride]},set:function(m){this._array[this._start+7*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,8,{get:function(){return this._array[this._start+8*this._stride]},set:function(m){this._array[this._start+8*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,9,{get:function(){return this._array[this._start+9*this._stride]},set:function(m){this._array[this._start+9*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,10,{get:function(){return this._array[this._start+10*this._stride]},set:function(m){this._array[this._start+10*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,11,{get:function(){return this._array[this._start+11*this._stride]},set:function(m){this._array[this._start+11*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,12,{get:function(){return this._array[this._start+12*this._stride]},set:function(m){this._array[this._start+12*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,13,{get:function(){return this._array[this._start+13*this._stride]},set:function(m){this._array[this._start+13*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,14,{get:function(){return this._array[this._start+14*this._stride]},set:function(m){this._array[this._start+14*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,15,{get:function(){return this._array[this._start+15*this._stride]},set:function(m){this._array[this._start+15*this._stride]=m},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,16,{get:function(){return this._array[this._start+16*this._stride]},set:function(m){this._array[this._start+16*this._stride]=m},enumerable:!1,configurable:!0}),f}();s.ary2Ns=function(f,m,p,g){return p===void 0&&(p=0),g===void 0&&(g=1),new c(f,m,p,g)}},2789:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(2228),s)},2811:function(o,s,a){var c,f=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(h[u]=d[u])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function h(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(h.prototype=y.prototype,new h)});Object.defineProperty(s,"__esModule",{value:!0}),s.TimingDeprecated=void 0;var m=a(5726),p=a(1662),g=function(){function _(y,h,d,u,l){y===void 0&&(y=0),h===void 0&&(h=0),d===void 0&&(d=0),this.startTime=y,this.duration=h,this.delay=d,this.proccessFunc=u,this.completeFunc=l,this._lastUpdateTimeStamp=0,this._processData={ratio:0,timeStamp:0,timeStampFromStart:0,timeStampFromLastUpdate:0}}return _.prototype.update=function(y){var h=(y-this.startTime)/this.duration;h>=0&&(this._processData.ratio=h,this._processData.timeStamp=y,this._processData.timeStampFromStart=y-this.startTime,this._processData.timeStampFromLastUpdate=y-this._lastUpdateTimeStamp,this._lastUpdateTimeStamp=y,this.proccessFunc&&this.proccessFunc(this._processData),h>=1&&this.completeFunc&&this.completeFunc())},_.prototype.start=function(){this.startTime=performance.now()+this.delay,this._lastUpdateTimeStamp=this.startTime},_}(),w=function(_){function y(h,d,u){h===void 0&&(h=1e3),d===void 0&&(d=0),u===void 0&&(u=p.defaultStartUpdateFunc);var l,v=this;function b(){l&&l()}return(v=_.call(this,function(E){var S=E.progressFunc,P=E.completeFunc,C=(E.errorFunc,v.startUpdateFunc&&v.startUpdateFunc(v._base.update.bind(v._base))||void 0);return v._base.startTime=performance.now(),v._base.duration=v.duration,v._base.delay=v.delay,v._base.proccessFunc=S,v._base.completeFunc=function(){C&&C(),P()},v._base.start(),l=C,b})||this)._base=new g,v.duration=h,v.delay=d,v.startUpdateFunc=u,v}return f(y,_),Object.defineProperty(y.prototype,"startTime",{get:function(){return this._base.startTime},enumerable:!1,configurable:!0}),y}(m.ProcessingDeprecated);s.TimingDeprecated=w},2830:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s._setTranslation=s._getTranslation=void 0;var c=a(2731);s._getTranslation=function(f,m){return(m=m||(0,c.createNumbers)(3))[0]=f[12],m[1]=f[13],m[2]=f[14],m},s._setTranslation=function(f,m,p){return f!==(p=p||(0,c.createNumbers)(16))&&(p[0]=f[0],p[1]=f[1],p[2]=f[2],p[3]=f[3],p[4]=f[4],p[5]=f[5],p[6]=f[6],p[7]=f[7],p[8]=f[8],p[9]=f[9],p[10]=f[10],p[11]=f[11],p[15]=f[15]),p[12]=m[0],p[13]=m[1],p[14]=m[2],p}},2882:function(o,s){var a=this&&this.__values||function(c){var f=typeof Symbol=="function"&&Symbol.iterator,m=f&&c[f],p=0;if(m)return m.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&p>=c.length&&(c=void 0),{value:c&&c[p++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.pluckProperty=void 0,s.pluckProperty=function(c,f){for(var m,p,g=[],w=2;w<arguments.length;w++)g[w-2]=arguments[w];var _=c;try{for(var y=a(g),h=y.next();!h.done;h=y.next()){var d=h.value;if(!_[d]){if(!f)return;_[d]={}}_=_[d]}}catch(u){m={error:u}}finally{try{h&&!h.done&&(p=y.return)&&p.call(y)}finally{if(m)throw m.error}}return _}},2921:function(o,s,a){var c,f=this&&this.__extends||(c=function(y,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(d[l]=u[l])},c(y,h)},function(y,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function d(){this.constructor=y}c(y,h),y.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}),m=this&&this.__read||function(y,h){var d=typeof Symbol=="function"&&y[Symbol.iterator];if(!d)return y;var u,l,v=d.call(y),b=[];try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)b.push(u.value)}catch(E){l={error:E}}finally{try{u&&!u.done&&(d=v.return)&&d.call(v)}finally{if(l)throw l.error}}return b},p=this&&this.__spreadArray||function(y,h,d){if(d||arguments.length===2)for(var u,l=0,v=h.length;l<v;l++)!u&&l in h||(u||(u=Array.prototype.slice.call(h,0,l)),u[l]=h[l]);return y.concat(u||Array.prototype.slice.call(h))};Object.defineProperty(s,"__esModule",{value:!0}),s.Fetching=void 0;var g=a(643),w=a(5726),_=function(y){function h(d){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var v=y.call(this,function(b){for(var E=b.progressFunc,S=b.completeFunc,P=b.errorFunc,C=[],x=1;x<arguments.length;x++)C[x-1]=arguments[x];var O={},I={loaded:0,total:0},N=v._fetchArgs||C;if(N.length===0)throw new Error("fetchArgs.length === 0");if(g.cancelableFetchDeprecated.apply(void 0,p([O,function(T,R){I.loaded=T,I.total=R,E(I)}],m(N),!1)).then(d).then(S).catch(function(T){T instanceof w.CancelError||P(T)}),!O.cancelFunc)throw new Error("!cancelResult.cancelFunc");return O.cancelFunc})||this;return u.length>0&&(v._fetchArgs=u),v}return f(h,y),Object.defineProperty(h.prototype,"fetchArgs",{get:function(){return this._fetchArgs},enumerable:!1,configurable:!0}),h}(a(6891).ProcessingDeprecated);s.Fetching=_},2967:(o,s)=>{var a,c;Object.defineProperty(s,"__esModule",{value:!0}),s.encodeString=void 0,s.encodeString=function(f,m){var p,g=a=a||new TextEncoder,w=0;if(g.encodeInto){var _=void 0;m?_=m:(p=3*f.length,(!c||c.byteLength<p)&&(c=new Uint8Array(2*p)),_=new Uint8Array(c.buffer,0,p));var y=g.encodeInto(f,_);if(y.written===void 0)throw new Error("encodedResults.written === 'undefined'");w=y.written}else{var h=g.encode(f);m&&m.set(h),w=h.byteLength}return w}},2968:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getFinalUri=void 0;var c=a(6432);s.getFinalUri=function(f,m){var p=(0,c.isAbsoluteUri)(f),g=f;return(0,c.isBase64Uri)(f)||p||m&&(g=m+"/"+f),g}},2999:function(o,s,a){var c=this&&this.__read||function(g,w){var _=typeof Symbol=="function"&&g[Symbol.iterator];if(!_)return g;var y,h,d=_.call(g),u=[];try{for(;(w===void 0||w-- >0)&&!(y=d.next()).done;)u.push(y.value)}catch(l){h={error:l}}finally{try{y&&!y.done&&(_=d.return)&&_.call(d)}finally{if(h)throw h.error}}return u};Object.defineProperty(s,"__esModule",{value:!0}),s.withoutUndefinedArray=s.withoutUndefined=void 0;var f=a(2168),m=a(3915);function p(g,w,_,y){var h=c((0,f.getReactFuncs)(g),3),d=h[0],u=h[1],l=h[2],v=(0,m.react)(w,_,y);return v.dispose(v.changed.dwon(function(){v.value!==w?u(v.value):u(void 0)})),d()!==void 0&&(v.value=d()),v.dispose(l.don(function(b){v.value=b!==void 0?b:w})),v}s.withoutUndefined=p,s.withoutUndefinedArray=function(g,w,_,y){return p(g,w,function(h,d){return h.length===d.length&&h.every(function(u,l){return _&&_(u,d[l])||u===d[l]})},function(h,d){for(var u=d||new Array(h.length),l=0;l<h.length;++l)u[l]=y?y(h[l]):h[l];return u.length=h.length,u})}},3009:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.nextPow2=void 0,s.nextPow2=function(a){return a|=0,a--,a|=a>>1,a|=a>>2,a|=a>>4,a|=a>>8,a|=a>>16,++a}},3022:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0})},3096:function(o,s,a){var c,f=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(h[u]=d[u])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function h(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(h.prototype=y.prototype,new h)});Object.defineProperty(s,"__esModule",{value:!0}),s.VideoProcessing=void 0;var m=a(1662),p=a(8106),g=function(_){function y(h,d){var u=_.call(this)||this;u._complexImage=h,u._videoSrc=d;var l,v=document.createElement("video");return v.src=u._videoSrc,v.style.position="absolute",v.style.top="0px",v.style.left="0px",v.style.zIndex="-100",v.style.visibility="hidden",v.style.width="0px",v.style.height="0px",(l=function(){v.crossOrigin=u._complexImage.crossOrigin})(),u.dispose(u._complexImage.crossOriginChanged.disposableOn(l)),(l=function(){v.autoplay=u._complexImage.autoplay})(),u.dispose(u._complexImage.autoplayChanged.disposableOn(l)),(l=function(){v.loop=u._complexImage.loop})(),u.dispose(u._complexImage.loopChanged.disposableOn(l)),v.muted=!0,document.body.appendChild(v),u._element=v,u.dispose(function(){return document.body.removeChild(v)}),u}return f(y,_),Object.defineProperty(y.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),y}(m.Destroyable),w=function(_){function y(h,d){var u=_.call(this)||this;return u._complexImage=h,u._imageUri=d,u._videoDom=u.disposeVar(new g(u._complexImage,u._imageUri)),u._update=u.disposeVar((0,p.createAnimateFrameWithStartValues)(function(){return u.update()})),u._updateStart=u._update.start(),u}return f(y,_),Object.defineProperty(y.prototype,"videoDom",{get:function(){return this._videoDom},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"videoElement",{get:function(){return this._videoDom.element},enumerable:!1,configurable:!0}),y.prototype.update=function(){if(!(this.videoElement.readyState<2)){var h=this._complexImage,d=this.videoElement,u=d.videoWidth,l=d.videoHeight;h.size=[u,l],h.pixelFormat="RGBA",h.copyTexture({source:this.videoElement})}},y}(m.Destroyable);s.VideoProcessing=w},3207:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.defineReactiveProp=void 0;var c=a(7372);s.defineReactiveProp=function(f,m,p,g){var w,_="_"+m,y="_"+m+"Changed",h=m+"Changed";Object.defineProperties(f.prototype,((w={})[m]={get:function(){return this[_]===void 0&&p!==void 0&&(this[_]=p),this[_]},set:function(d){if(this[_]===void 0&&p!==void 0&&(this[_]=p),g?!g(this[_],d):this[_]!==d){var u=this[_];this[_]=d,this[y]&&this[y].emit(d,u)}}},w[h]={get:function(){var d=this;return this[y]===void 0&&(this[y]=new c.Event,this.dispose!==void 0&&this.dispose(function(){return d[y].destroy()})),this[y]}},w))}},3249:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.prevPow2=void 0,s.prevPow2=function(a){return a|=0,a|=a>>1,a|=a>>2,a|=a>>4,a|=a>>8,a|=a>>16,++a>>1}},3280:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.length=void 0;var c=a(6138),f=function(m){return++m};s.length=function(m){return(0,c.reduce)(m,f,0)}},3281:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(4416),s),f(a(9122),s),f(a(9812),s),f(a(312),s),f(a(4833),s),f(a(5590),s),f(a(4915),s),f(a(8089),s),f(a(2731),s),f(a(6172),s),f(a(7215),s),f(a(7665),s),f(a(9549),s),f(a(5873),s),f(a(602),s),f(a(9898),s),f(a(5985),s),f(a(7500),s),f(a(7413),s)},3300:function(o,s,a){var c=this&&this.__read||function(h,d){var u=typeof Symbol=="function"&&h[Symbol.iterator];if(!u)return h;var l,v,b=u.call(h),E=[];try{for(;(d===void 0||d-- >0)&&!(l=b.next()).done;)E.push(l.value)}catch(S){v={error:S}}finally{try{l&&!l.done&&(u=b.return)&&u.call(b)}finally{if(v)throw v.error}}return E},f=this&&this.__spreadArray||function(h,d,u){if(u||arguments.length===2)for(var l,v=0,b=d.length;v<b;v++)!l&&v in d||(l||(l=Array.prototype.slice.call(d,0,v)),l[v]=d[v]);return h.concat(l||Array.prototype.slice.call(d))};Object.defineProperty(s,"__esModule",{value:!0}),s._getMaximumScale=s._setScale=s._getScale=void 0;var m=a(2731),p=a(9898),g=a(6021);function w(h,d){return(d=d||(0,m.createNumbers)(3))[0]=p.Vector.magnitude([h[0],h[1],h[2]]),d[1]=p.Vector.magnitude([h[4],h[5],h[6]]),d[2]=p.Vector.magnitude([h[8],h[9],h[10]]),d}s._getScale=w;var _=(0,m.createNumbers)(3);s._setScale=function(h,d,u){var l=w(h,_),v=p.Vector.divide(d,l,_);return(0,g._multiplyByScale)(h,v,u)};var y=(0,m.createNumbers)(3);s._getMaximumScale=function(h){var d=w(h,y);return Math.max.apply(Math,f([],c(p.Vector.itr(d)),!1))}},3315:function(o,s,a){var c,f=this&&this.__extends||(c=function(y,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(d[l]=u[l])},c(y,h)},function(y,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function d(){this.constructor=y}c(y,h),y.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}),m=this&&this.__generator||function(y,h){var d,u,l,v,b={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return v={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function E(S){return function(P){return function(C){if(d)throw new TypeError("Generator is already executing.");for(;v&&(v=0,C[0]&&(b=0)),b;)try{if(d=1,u&&(l=2&C[0]?u.return:C[0]?u.throw||((l=u.return)&&l.call(u),0):u.next)&&!(l=l.call(u,C[1])).done)return l;switch(u=0,l&&(C=[2&C[0],l.value]),C[0]){case 0:case 1:l=C;break;case 4:return b.label++,{value:C[1],done:!1};case 5:b.label++,u=C[1],C=[0];continue;case 7:C=b.ops.pop(),b.trys.pop();continue;default:if(!((l=(l=b.trys).length>0&&l[l.length-1])||C[0]!==6&&C[0]!==2)){b=0;continue}if(C[0]===3&&(!l||C[1]>l[0]&&C[1]<l[3])){b.label=C[1];break}if(C[0]===6&&b.label<l[1]){b.label=l[1],l=C;break}if(l&&b.label<l[2]){b.label=l[2],b.ops.push(C);break}l[2]&&b.ops.pop(),b.trys.pop();continue}C=h.call(y,b)}catch(x){C=[6,x],u=0}finally{d=l=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}([S,P])}}},p=this&&this.__values||function(y){var h=typeof Symbol=="function"&&Symbol.iterator,d=h&&y[h],u=0;if(d)return d.call(y);if(y&&typeof y.length=="number")return{next:function(){return y&&u>=y.length&&(y=void 0),{value:y&&y[u++],done:!y}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.UiTree=void 0;var g=a(1662),w=a(8106),_=function(y){function h(d){var u=y.call(this)||this;u._tree=d,u._redrawEvent=u.disposeVar(new g.Event),u._containerScrollTop=u.disposeVar((0,g.react)(0)),u._containerClientHeight=u.disposeVar((0,g.react)(-1)),u._container=u.disposeVar((0,g.react)(void 0)),u._redrawInfo={topFreeSpaceHeight:0,topUnvisibleItemNum:0,middleTreeItems:[],bottomFreeSpaceHeight:0,bottomUnvisibleItemNum:0};var l,v=u._containerClientHeight,b=u._containerScrollTop,E=u._tree._forceRedrawEvent,S=u.disposeVar((0,g.createNextAnimateFrameEvent)(u._tree.itemDivHeightChanged,u._tree.itemChildrenChanged,u._tree.itemsChanged,v.changed,b.changed,E)),P=u.redrawInfo,C=function(x){var O=x.uiTreeObject;return!(!x.children||O&&O.collapsed)};return u.dispose(S.disposableOn(function(){var x,O,I,N;if(P.topFreeSpaceHeight=0,P.topUnvisibleItemNum=0,P.middleTreeItems.length=0,P.bottomFreeSpaceHeight=0,P.bottomUnvisibleItemNum=0,u._containerClientHeight.value>=0){var T=(0,g.length)(u._tree.getDescendants(C)),R=u._tree.itemDivHeight,A=R*T,B=(0,g.max)([(0,g.min)([(0,g.max)([A-v.value,0]),b.value]),0]),k=B/R|0,z=0|Math.ceil((B-k*R+v.value)/R);k>0&&(P.topUnvisibleItemNum=k,P.topFreeSpaceHeight=k*u._tree.itemDivHeight);var j=k+z,L=0;try{for(var F=p(u._tree.getDescendants(C)),G=F.next();!G.done;G=F.next()){var W=G.value;if(L>=j)break;L>=k&&P.middleTreeItems.push(W),++L}}catch(J){x={error:J}}finally{try{G&&!G.done&&(O=F.return)&&O.call(F)}finally{if(x)throw x.error}}var V=T-k-z;V>0&&(P.bottomUnvisibleItemNum=V,P.bottomFreeSpaceHeight=V*u._tree.itemDivHeight)}else try{for(var U=p(u._tree.getDescendants(C)),q=U.next();!q.done;q=U.next())W=q.value,P.middleTreeItems.push(W)}catch(J){I={error:J}}finally{try{q&&!q.done&&(N=U.return)&&N.call(U)}finally{if(I)throw I.error}}u._redrawEvent.emit(P)})),u.dispose(function(){return l&&(l.destroy(),l=void 0)}),u.dispose(u.containerChanged.disposableOn(function(x){l&&(l.destroy(),l=void 0),x&&(l=(0,w.createAnimateFrame)()).start(function(){var O=x,I=O.scrollTop,N=O.clientHeight;I===void 0||N===void 0?(0,g.oneTimeWarning)("createUiTreeWithContainer error: conainter has no scrollTop or clientHeight property!"):(u.containerScrollTop=I,u.containerClientHeight=N)})})),u}return f(h,y),Object.defineProperty(h.prototype,"container",{get:function(){return this._container.value},set:function(d){this._container.value=d},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"containerChanged",{get:function(){return this._container.changed},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"redrawInfo",{get:function(){return this._redrawInfo},enumerable:!1,configurable:!0}),h.prototype.getTreeItemPos=function(d){var u,l,v=0,b=!1;try{for(var E=p(this._tree.getDescendants(function(P){var C=P.uiTreeObject;return!(!P.children||C&&C.collapsed)})),S=E.next();!S.done;S=E.next()){if(S.value===d){b=!0;break}++v}}catch(P){u={error:P}}finally{try{S&&!S.done&&(l=E.return)&&l.call(E)}finally{if(u)throw u.error}}return b?[v,v*this._tree.itemDivHeight]:void 0},h.prototype.collapseAll=function(){var d,u;console.log("collapseAll");try{for(var l=p(this.tree.root.getDescendants()),v=l.next();!v.done;v=l.next())v.value.uiTreeObject.collapsed=!0}catch(b){d={error:b}}finally{try{v&&!v.done&&(u=l.return)&&u.call(l)}finally{if(d)throw d.error}}},Object.defineProperty(h.prototype,"tree",{get:function(){return this._tree},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"redrawEvent",{get:function(){return this._redrawEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"containerScrollTop",{get:function(){return this._containerScrollTop.value},set:function(d){this._containerScrollTop.value=d},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"containerScrollTopChanged",{get:function(){return this._containerScrollTop.changed},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"containerClientHeight",{get:function(){return this._containerClientHeight.value},set:function(d){this._containerClientHeight.value=d},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"containerClientHeightChanged",{get:function(){return this._containerClientHeight.changed},enumerable:!1,configurable:!0}),h.prototype.getAllItems=function(d){var u,l,v,b,E,S;return m(this,function(P){switch(P.label){case 0:P.trys.push([0,5,6,7]),u=p(this._tree.getDescendants()),l=u.next(),P.label=1;case 1:return l.done?[3,4]:(v=l.value,d&&!d(v)?[3,3]:[4,v]);case 2:P.sent(),P.label=3;case 3:return l=u.next(),[3,1];case 4:return[3,7];case 5:return b=P.sent(),E={error:b},[3,7];case 6:try{l&&!l.done&&(S=u.return)&&S.call(u)}finally{if(E)throw E.error}return[7];case 7:return[2]}})},h.prototype.getAllSelectedItems=function(){return this.getAllItems(function(d){return d.uiTreeObject.selected})},h.prototype.getAllCheckedLeafItems=function(){return this.getAllItems(function(d){return!d.children&&d.uiTreeObject.checkedStatus==="checked"})},h.prototype.clearAllSelectedItems=function(d){var u,l;try{for(var v=p(this.getAllSelectedItems()),b=v.next();!b.done;b=v.next()){var E=b.value;d&&d.includes(E)||(E.uiTreeObject.selected=!1)}}catch(S){u={error:S}}finally{try{b&&!b.done&&(l=v.return)&&l.call(v)}finally{if(u)throw u.error}}},h}(g.Destroyable);s.UiTree=_},3428:()=>{ArrayBuffer.transfer||(ArrayBuffer.transfer=function(o,s){o=Object(o);var a=new ArrayBuffer(s);if(!(o instanceof ArrayBuffer&&a instanceof ArrayBuffer))throw new TypeError("Source and destination must be ArrayBuffer instances");if(a.byteLength>=o.byteLength){var c=0,f=o.byteLength;[8,4,2,1].forEach(function(m){if(f>=m){var p=function(g,w,_,y,h){var d=Uint8Array;switch(g){case 8:d=Float64Array;break;case 4:d=Float32Array;break;case 2:d=Uint16Array;break;default:d=Uint8Array}for(var u=new d(w,y,Math.trunc(h/g)),l=new d(_,y,Math.trunc(h/g)),v=0;v<l.length;v++)l[v]=u[v];return{nextOffset:u.byteOffset+u.byteLength,leftBytes:w.byteLength-(u.byteOffset+u.byteLength)}}(m,o,a,c,f);c=p.nextOffset,f=p.leftBytes}})}return a})},3457:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getBaseUri=void 0,s.getBaseUri=function(a){return a.substr(0,a.lastIndexOf("/"))}},3526:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0})},3631:(o,s)=>{function a(c,f){return c instanceof Promise?c.then(f):Promise.resolve(c).then(f)}Object.defineProperty(s,"__esModule",{value:!0}),s.when=void 0,s.when=a,a.defer=function(){var c={},f=new Promise(function(m,p){c.resolve=m,c.reject=p});return c.promise=f,c},a.resolve=function(c){return Promise.resolve(c)}},3639:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)}),m=this&&this.__values||function(h){var d=typeof Symbol=="function"&&Symbol.iterator,u=d&&h[d],l=0;if(u)return u.call(h);if(h&&typeof h.length=="number")return{next:function(){return h&&l>=h.length&&(h=void 0),{value:h&&h[l++],done:!h}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.AnimationPlayer=void 0;var p=a(2429),g=a(7372),w=a(7372),_=a(2127),y=function(h){function d(u){u===void 0&&(u=5e3);var l=h.call(this)||this;return l._animation=new p.Animation(u),l.dispose(function(){l.destroyAllChannels(),l._animation.destroy()}),l._player=new _.Player(u),l.dispose(function(){return l._player.destroy()}),l._initAnimation(),l._selectedChannelChanged=new w.Event,l}return f(d,h),Object.defineProperty(d.prototype,"animation",{get:function(){return this._animation},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"player",{get:function(){return this._player},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"selectedChannelChanged",{get:function(){return this._selectedChannelChanged||(this._selectedChannelChanged=new w.Event),this._selectedChannelChanged},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"selectedChannel",{get:function(){return this._selectedChannel},set:function(u){if(this._selectedChannel!==u){var l=this._selectedChannel;this._selectedChannel=u,this._selectedChannelChanged&&this._selectedChannelChanged.emit(u,l)}},enumerable:!1,configurable:!0}),d.prototype._initAnimation=function(){var u=this,l=this._animation,v=this._player;l.progressFunc=function(b){},this.dispose(function(){l.progressFunc=void 0,l.enterFunc=void 0,l.leaveFunc=void 0}),this.dispose(v.currentTimeChangedEvent.disposableOn(function(b,E){v.playing?l.currentTime=b:(l.currentTime=b,l.currentTime=Number.NaN)})),this.dispose(v.startPlayingEvent.disposableOn(function(b){l.currentTime=b})),this.dispose(v.stopPlayingEvent.disposableOn(function(b){l.currentTime=Number.NaN})),this.dispose(this._animation.changedEvent.disposableOn(function(b){u._player.duration=b.duration}))},d.prototype.addChannel=function(){var u=new p.Channel(1e3,2e3);if(this._selectedChannel){var l=this._animation.channels.indexOf(this._selectedChannel);this._animation.channels.splice(l+1,0,u)}else this._animation.channels.push(u);return u},d.prototype.removeChannel=function(){if(this._selectedChannel){var u=this._animation.channels.indexOf(this._selectedChannel);u!==-1&&(this._animation.channels.splice(u,1),this._selectedChannel.destroy()),this._selectedChannel=void 0}else console.warn("请先选择需要删除的Channel.")},d.prototype.raiseChannel=function(u){var l=this._animation.channels.indexOf(u);if(l===-1)console.warn("-1 === index");else if(l===0)console.warn("cannot raise current channel!");else{if(!(l>0))throw new Error("should not be here!");this._animation.channels.splice(l,1),this._animation.channels.splice(l-1,0,u)}},d.prototype.lowerChannel=function(u){var l=this._animation.channels.indexOf(u);if(l===-1)console.warn("-1 === index");else if(l===this._animation.channels.length-1)console.warn("cannot lower current channel!");else{if(!(l>=0))throw new Error("should not be here!");this._animation.channels.splice(l,1),this._animation.channels.splice(l+1,0,u)}},d.prototype.destroyAllChannels=function(){var u,l,v=this._animation;if(v.hasChannels){try{for(var b=m(v.channels),E=b.next();!E.done;E=b.next()){var S=E.value;(0,p.destroyAnimationWithChildren)(S.animation)}}catch(P){u={error:P}}finally{try{E&&!E.done&&(l=b.return)&&l.call(b)}finally{if(u)throw u.error}}v.channels.length=0,this._selectedChannel=void 0}},d}(g.Destroyable);s.AnimationPlayer=y},3735:function(o,s,a){var c=this&&this.__generator||function(m,p){var g,w,_,y,h={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return y={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function d(u){return function(l){return function(v){if(g)throw new TypeError("Generator is already executing.");for(;y&&(y=0,v[0]&&(h=0)),h;)try{if(g=1,w&&(_=2&v[0]?w.return:v[0]?w.throw||((_=w.return)&&_.call(w),0):w.next)&&!(_=_.call(w,v[1])).done)return _;switch(w=0,_&&(v=[2&v[0],_.value]),v[0]){case 0:case 1:_=v;break;case 4:return h.label++,{value:v[1],done:!1};case 5:h.label++,w=v[1],v=[0];continue;case 7:v=h.ops.pop(),h.trys.pop();continue;default:if(!((_=(_=h.trys).length>0&&_[_.length-1])||v[0]!==6&&v[0]!==2)){h=0;continue}if(v[0]===3&&(!_||v[1]>_[0]&&v[1]<_[3])){h.label=v[1];break}if(v[0]===6&&h.label<_[1]){h.label=_[1],_=v;break}if(_&&h.label<_[2]){h.label=_[2],h.ops.push(v);break}_[2]&&h.ops.pop(),h.trys.pop();continue}v=p.call(m,h)}catch(b){v=[6,b],w=0}finally{g=_=0}if(5&v[0])throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}([u,l])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.getMinMaxPosition=void 0;var f=a(6362);s.getMinMaxPosition=function(m,p){var g,w,_,y,h,d,u,l;if(m.length%3!=0)throw new Error("positions.length % 3 !== 0");var v=m.length/3;function b(P){var C;return c(this,function(x){switch(x.label){case 0:C=0,x.label=1;case 1:return C<v?[4,m[3*C+P]]:[3,4];case 2:x.sent(),x.label=3;case 3:return++C,[3,1];case 4:return[2]}})}var E=(g=p==null?void 0:p.min)!==null&&g!==void 0?g:[NaN,NaN,NaN],S=(w=p==null?void 0:p.max)!==null&&w!==void 0?w:[NaN,NaN,NaN];return E[0]=(_=(0,f.min)(b(0)))!==null&&_!==void 0?_:NaN,E[1]=(y=(0,f.min)(b(1)))!==null&&y!==void 0?y:NaN,E[2]=(h=(0,f.min)(b(2)))!==null&&h!==void 0?h:NaN,S[0]=(d=(0,f.max)(b(0)))!==null&&d!==void 0?d:NaN,S[1]=(u=(0,f.max)(b(1)))!==null&&u!==void 0?u:NaN,S[2]=(l=(0,f.max)(b(2)))!==null&&l!==void 0?l:NaN,{min:E,max:S}}},3804:function(o,s,a){var c=this&&this.__generator||function(p,g){var w,_,y,h,d={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]};return h={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function u(l){return function(v){return function(b){if(w)throw new TypeError("Generator is already executing.");for(;h&&(h=0,b[0]&&(d=0)),d;)try{if(w=1,_&&(y=2&b[0]?_.return:b[0]?_.throw||((y=_.return)&&y.call(_),0):_.next)&&!(y=y.call(_,b[1])).done)return y;switch(_=0,y&&(b=[2&b[0],y.value]),b[0]){case 0:case 1:y=b;break;case 4:return d.label++,{value:b[1],done:!1};case 5:d.label++,_=b[1],b=[0];continue;case 7:b=d.ops.pop(),d.trys.pop();continue;default:if(!((y=(y=d.trys).length>0&&y[y.length-1])||b[0]!==6&&b[0]!==2)){d=0;continue}if(b[0]===3&&(!y||b[1]>y[0]&&b[1]<y[3])){d.label=b[1];break}if(b[0]===6&&d.label<y[1]){d.label=y[1],y=b;break}if(y&&d.label<y[2]){d.label=y[2],d.ops.push(b);break}y[2]&&d.ops.pop(),d.trys.pop();continue}b=g.call(p,d)}catch(E){b=[6,E],_=0}finally{w=y=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([l,v])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.objsIterator=void 0;var f=a(1803),m=a(8144);s.objsIterator=function(p,g){var w,_,y,h;return c(this,function(d){switch(d.label){case 0:w=(0,m.getIterator)(p),d.label=1;case 1:return _=w.next(),y=_.done,h=_.value,y?[3,3]:[4,(0,f.getValueFromProps)(h,g)];case 2:return d.sent(),[3,1];case 3:return[2]}})}},3815:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(9355),s),f(a(4344),s)},3915:function(o,s,a){var c,f=this&&this.__extends||(c=function(v,b){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,S){E.__proto__=S}||function(E,S){for(var P in S)Object.prototype.hasOwnProperty.call(S,P)&&(E[P]=S[P])},c(v,b)},function(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function E(){this.constructor=v}c(v,b),v.prototype=b===null?Object.create(b):(E.prototype=b.prototype,new E)}),m=this&&this.__assign||function(){return m=Object.assign||function(v){for(var b,E=1,S=arguments.length;E<S;E++)for(var P in b=arguments[E])Object.prototype.hasOwnProperty.call(b,P)&&(v[P]=b[P]);return v},m.apply(this,arguments)},p=this&&this.__read||function(v,b){var E=typeof Symbol=="function"&&v[Symbol.iterator];if(!E)return v;var S,P,C=E.call(v),x=[];try{for(;(b===void 0||b-- >0)&&!(S=C.next()).done;)x.push(S.value)}catch(O){P={error:O}}finally{try{S&&!S.done&&(E=C.return)&&E.call(C)}finally{if(P)throw P.error}}return x},g=this&&this.__spreadArray||function(v,b,E){if(E||arguments.length===2)for(var S,P=0,C=b.length;P<C;P++)!S&&P in b||(S||(S=Array.prototype.slice.call(b,0,P)),S[P]=b[P]);return v.concat(S||Array.prototype.slice.call(b))};Object.defineProperty(s,"__esModule",{value:!0}),s.reactPosition2DsSet=s.reactPositionsSet=s.reactPositions=s.reactJsonCollectionWithUndefined=s.reactJsonCollection=s.reactArrayCollectionWithUndefined=s.reactArrayCollection=s.reactPlainObjectWithUndefined=s.reactPlainObject=s.reactJsonWithUndefined=s.reactJson=s.reactDeepArrayWithUndefined=s.reactDeepArray=s.reactArrayWithUndefined=s.reactArray=s.react=s.ReactiveVariable=void 0;var w=a(9359),_=a(4899),y=function(v){function b(E,S,P){var C=v.call(this)||this;return C._equalsFunc=S,C._assignFunc=P,C._value=C._assignFunc&&C._assignFunc(E,void 0)||E,C}return f(b,v),Object.defineProperty(b.prototype,"assignFunc",{get:function(){return this._assignFunc},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"equalsFunc",{get:function(){return this._equalsFunc},enumerable:!1,configurable:!0}),b.prototype.equals=function(E){return this._equalsFunc?this._equalsFunc(this._value,E):this._value===E},Object.defineProperty(b.prototype,"value",{get:function(){return this._value},set:function(E){if(this._equalsFunc?!this._equalsFunc(this._value,E):this._value!==E){if(this.toChangeFunc&&!this.toChangeFunc(E,this._value))return;this._assignFunc?(this._oldValue=this._assignFunc(this._value,this._oldValue),this._value=this._assignFunc(E,this._value)):(this._oldValue=this._value,this._value=E),this._changed&&this._changed.emit(E,this._oldValue)}},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"changed",{get:function(){return this._changed||(this._changed=this.disposeVar(new _.Event)),this._changed},enumerable:!1,configurable:!0}),b.prototype.forceChange=function(){this._changed&&this._changed.emit(this._value,this._value)},b}(w.Destroyable);function h(v,b,E){return new y(v,b,E)}function d(v,b,E){return h(v,function(S,P){return S.length===P.length&&S.every(function(C,x){return b&&b(C,P[x])||C===P[x]})},function(S,P){var C=P||new Array(S.length);return C.length=S.length,S.forEach(function(x,O){C[O]=E?E(x):x}),C})}function u(v,b,E){return h(v,function(S,P){return S===void 0||P===void 0?S===void 0&&P===void 0:S.length===P.length&&S.every(function(C,x){return b&&b(C,P[x])||C===P[x]})},function(S,P){if(S){var C=P||new Array(S.length);return C.length=S.length,S.forEach(function(x,O){C[O]=E?E(x):x}),C}})}function l(v){return u(v,function(b,E){return b.every(function(S,P){return S===E[P]})},function(b){return g([],p(b),!1)})}s.ReactiveVariable=y,s.react=h,s.reactArray=function(v){return new y(v,function(b,E){return b.length===E.length&&b.every(function(S,P){return S===E[P]})},function(b,E){var S=E||new Array(b.length);return S.length=b.length,b.forEach(function(P,C){return S[C]=P}),S})},s.reactArrayWithUndefined=function(v){return h(v,function(b,E){return b===void 0||E===void 0?b===void 0&&E===void 0:b.length===E.length&&b.every(function(S,P){return S===E[P]})},function(b,E){if(b){var S=E||new Array(b.length);return S.length=b.length,b.forEach(function(P,C){return S[C]=P}),S}})},s.reactDeepArray=d,s.reactDeepArrayWithUndefined=u,s.reactJson=function(v){return new y(v,function(b,E){return b===E||b!==void 0&&E!==void 0&&JSON.stringify(b)===JSON.stringify(E)},function(b,E){if(b!==void 0)return JSON.parse(JSON.stringify(b))})},s.reactJsonWithUndefined=function(v){return new y(v,function(b,E){return b===E||b!==void 0&&E!==void 0&&JSON.stringify(b)===JSON.stringify(E)},function(b,E){if(b!==void 0)return JSON.parse(JSON.stringify(b))})},s.reactPlainObject=function(v){return new y(v,function(b,E){if(b===E)return!0;if(b===void 0||E===void 0)return!1;var S=Object.keys(b),P=Object.keys(E);return S.length===P.length&&S.every(function(C,x){return C===P[x]&&b[C]===E[C]})},function(b,E){return b&&m({},b)})},s.reactPlainObjectWithUndefined=function(v){return new y(v,function(b,E){if(b===E)return!0;if(b===void 0||E===void 0)return!1;var S=Object.keys(b),P=Object.keys(E);return S.length===P.length&&S.every(function(C,x){return C===P[x]&&b[C]===E[C]})},function(b,E){return b&&m({},b)})},s.reactArrayCollection=function(v){return d(v,function(b,E){return b.every(function(S,P){return S===E[P]})},function(b){return g([],p(b),!1)})},s.reactArrayCollectionWithUndefined=l,s.reactJsonCollection=function(v){return d(v,function(b,E){return JSON.stringify(b)===JSON.stringify(E)},function(b){return JSON.parse(JSON.stringify(b))})},s.reactJsonCollectionWithUndefined=function(v){return u(v,function(b,E){return JSON.stringify(b)===JSON.stringify(E)},function(b){return JSON.parse(JSON.stringify(b))})},s.reactPositions=function(v){return l(v)},s.reactPositionsSet=function(v){return u(v,function(b,E){return b.length===E.length&&b.every(function(S,P){return S.every(function(C,x){return C===E[P][x]})})},function(b){return b.map(function(E){return g([],p(E),!1)})})},s.reactPosition2DsSet=function(v){return u(v,function(b,E){return b.length===E.length&&b.every(function(S,P){return S.every(function(C,x){return C===E[P][x]})})},function(b){return b.map(function(E){return g([],p(E),!1)})})}},3951:function(o,s,a){var c,f=this&&this.__extends||(c=function(g,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,y){_.__proto__=y}||function(_,y){for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&(_[h]=y[h])},c(g,w)},function(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function _(){this.constructor=g}c(g,w),g.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)});Object.defineProperty(s,"__esModule",{value:!0}),s.IFrameBorderedPosFloatDiv=void 0;var m=a(7372),p=function(g){function w(){var _=g.call(this)||this,y=document.createElement("iframe");y.style.cssText="width: 100%; height: 100%; border-width: 0px; border-radius: 5px; display: block;",y.src="http://www.weather.com.cn/live/index.shtml",_._iframe=y,_.innerContentDiv.appendChild(y);var h=function(d){d.source===_._iframe.contentWindow&&(_._iframeMessageEvent?_._iframeMessageEvent.emit(d):console.warn("iframe消息接收到未处理!data: ".concat(d.data)))};return window.addEventListener("message",h),_.dispose(function(){window.removeEventListener("message",h)}),_}return f(w,g),w.prototype.reset=function(){g.prototype.reset.call(this),this.src=""},Object.defineProperty(w.prototype,"src",{get:function(){return this._iframe.src},set:function(_){this._iframe.src!==_&&(this._iframe.src=_)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"iframe",{get:function(){return this._iframe},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"iframeMessageEvent",{get:function(){return this._iframeMessageEvent=this._iframeMessageEvent||new m.Event,this._iframeMessageEvent},enumerable:!1,configurable:!0}),w}(a(4143).BorderedPosFloatDiv);s.IFrameBorderedPosFloatDiv=p},3983:(o,s)=>{function a(c,f,m){for(var p=0;p<m;++p)if(c[p]!==f[p])return!1;return!0}Object.defineProperty(s,"__esModule",{value:!0}),s.equalsPenSplineVertexType=void 0,s.equalsPenSplineVertexType=function(c,f,m){return a(c.position,f.position,m)&&(c.leftPosition===f.leftPosition===void 0||c.leftPosition&&f.leftPosition&&a(c.leftPosition,f.leftPosition,m)||!1)&&(c.rightPosition===f.rightPosition===void 0||c.rightPosition&&f.rightPosition&&a(c.rightPosition,f.rightPosition,m)||!1)}},4123:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)}),m=this&&this.__read||function(h,d){var u=typeof Symbol=="function"&&h[Symbol.iterator];if(!u)return h;var l,v,b=u.call(h),E=[];try{for(;(d===void 0||d-- >0)&&!(l=b.next()).done;)E.push(l.value)}catch(S){v={error:S}}finally{try{l&&!l.done&&(u=b.return)&&u.call(b)}finally{if(v)throw v.error}}return E};Object.defineProperty(s,"__esModule",{value:!0}),s.CursorInfo=s.CursorFloatDiv=void 0;var p=a(7372),g=a(4621),w=a(7445),_=function(h){function d(){var u=h.call(this)||this;return u.contentDiv.style.backgroundColor="rgba(0, 0, 0, 0.8)",u.contentDiv.style.borderRadius="3px",u.contentDiv.style.color="rgb(255, 255, 255)",u.contentDiv.style.padding="1px 5px 1px 5px",u.contentDiv.style.fontSize="12px",u.contentDiv.style.whiteSpace="nowrap",u.contentDiv.innerText="未定义光标信息!",u.originRatioX=0,u.originRatioY=0,u.originOffsetX=-16,u}return f(d,h),d}(w.PosFloatDiv);s.CursorFloatDiv=_;var y=function(h){function d(u,l){var v=h.call(this)||this;v._pointerOut=v.disposeVar((0,p.react)(!1)),v._show=v.disposeVar((0,p.react)(!0)),v._cursorDiv=new w.DivPoi(l,u),v.dispose(function(){return v._cursorDiv.destroy()});var b=function(S){var P=m((0,g.getDomEventCurrentTargetPos)(S),2),C=P[0],x=P[1];v._cursorDiv.floatDiv.winPos=[C,x]};u.addEventListener("pointermove",b),v.dispose(function(){return u.removeEventListener("pointermove",b)});var E=function(){v._cursorDiv.show=v.show&&v._pointerOut.value};return E(),v.dispose(v.showChanged.disposableOn(E)),v.dispose(v._pointerOut.changed.disposableOn(E)),v}return f(d,h),Object.defineProperty(d.prototype,"show",{get:function(){return this._show.value},set:function(u){this._show.value=u},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"showChanged",{get:function(){return this._show.changed},enumerable:!1,configurable:!0}),d.prototype.reset=function(){this._pointerOut.value=!1},Object.defineProperty(d.prototype,"cursorDiv",{get:function(){return this._cursorDiv},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"text",{get:function(){return this._cursorDiv.floatDiv.contentDiv.innerText},set:function(u){this._cursorDiv.floatDiv.contentDiv.innerText=u},enumerable:!1,configurable:!0}),d}(p.Destroyable);s.CursorInfo=y},4143:function(o,s,a){var c,f=this&&this.__extends||(c=function(d,u){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,v){l.__proto__=v}||function(l,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(l[b]=v[b])},c(d,u)},function(d,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function l(){this.constructor=d}c(d,u),d.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}),m=this&&this.__read||function(d,u){var l=typeof Symbol=="function"&&d[Symbol.iterator];if(!l)return d;var v,b,E=l.call(d),S=[];try{for(;(u===void 0||u-- >0)&&!(v=E.next()).done;)S.push(v.value)}catch(P){b={error:P}}finally{try{v&&!v.done&&(l=E.return)&&l.call(E)}finally{if(b)throw b.error}}return S};Object.defineProperty(s,"__esModule",{value:!0}),s.BorderedPosFloatDiv=s.createBottomTriangleElement=s.createCloseDiv=void 0;var p=a(7372),g=a(9986),w=["top","bottom","left","right"];function _(d,u,l){var v,b=document.createElement("div");return b.style.cssText="position: absolute; ".concat((v=l,Object.entries(v).map(function(E){var S=m(E,2),P=S[0],C=S[1];return w.includes(P)?"".concat(P,": ").concat(C,"px; "):""}).join(""))," background-color: ").concat(d,"; border-radius: ").concat(u,"px;"),b.innerHTML='<svg viewBox="0 0 1024 1024" style="display: block;" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2420" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M512 128C300.8 128 128 300.8 128 512s172.8 384 384 384 384-172.8 384-384S723.2 128 512 128zM512 832c-179.2 0-320-140.8-320-320s140.8-320 320-320 320 140.8 320 320S691.2 832 512 832z" p-id="2421" fill="#ffffff"></path><path d="M672 352c-12.8-12.8-32-12.8-44.8 0L512 467.2 396.8 352C384 339.2 364.8 339.2 352 352S339.2 384 352 396.8L467.2 512 352 627.2c-12.8 12.8-12.8 32 0 44.8s32 12.8 44.8 0L512 556.8l115.2 115.2c12.8 12.8 32 12.8 44.8 0s12.8-32 0-44.8L556.8 512l115.2-115.2C684.8 384 684.8 364.8 672 352z" p-id="2422" fill="#ffffff"></path></svg>',b}function y(d,u,l){l===void 0&&(l="rgba(0,0,0,0.7)");var v=document.createElement("div");v.style.cssText="margin: 0 auto; width: ".concat(d,"px; height: ").concat(u,"px; position: relative; pointer-events: none;");var b=document.createElement("div");return b.style.cssText="position: absolute; left: 0px; top: 0px; width: 0; height: 0; border-left: ".concat(.5*d,"px solid transparent; border-right: ").concat(.5*d,"px solid transparent; border-top: ").concat(u,"px solid ").concat(l,";"),v.appendChild(b),[v,b]}s.createCloseDiv=_,s.createBottomTriangleElement=y;var h=function(d){function u(){var l=d.call(this)||this;l._colorStr="rgba(0, 0, 0, 0.7)",l._divColorChanged=new p.Event,l._borderRadius=10;var v=document.createElement("div");v.style.cssText="position: relative; background-color: ".concat(l._colorStr,"; border-radius: ").concat(l._borderRadius,"px; padding: 5px; pointer-events: all;"),l._borderDiv=v;var b=_(l._colorStr,10,{top:3,right:3}),E=m(y(2*l._borderRadius,2*l._borderRadius,l._colorStr),2),S=E[0],P=E[1],C=document.createElement("div");l._innerContentDiv=C,v.appendChild(C),v.appendChild(b),l.contentDiv.appendChild(v),l.contentDiv.appendChild(S),b.style.opacity="0.1",b.onmouseenter=function(){b.style.opacity="1.0"},b.onmouseleave=function(){b.style.opacity="0.1"},b.onclick=function(){l._closeEvent&&l._closeEvent.emit()},l._closeDiv=b,l.dispose(l._divColorChanged.disposableOn(function(){P.style.borderTopColor=l._colorStr,v.style.backgroundColor=l._colorStr,S.style.width="".concat(2*l._borderRadius,"px"),S.style.height="".concat(2*l._borderRadius,"px"),P.style.borderLeft="".concat(l._borderRadius,"px"),P.style.borderRight="".concat(l._borderRadius,"px"),P.style.borderTop="".concat(2*l._borderRadius,"px")}));var x=function(O){O.key==="Escape"&&l._closeEvent&&l._closeEvent.emit()};return document.body.addEventListener("keydown",x,!0),l.dispose(function(){document.removeEventListener("keydown",x,!0)}),l}return f(u,d),Object.defineProperty(u.prototype,"borderDiv",{get:function(){return this._borderDiv},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"innerContentDiv",{get:function(){return this._innerContentDiv},enumerable:!1,configurable:!0}),u.prototype.reset=function(){this.show=!1,this.opacity=0,this._closeDiv.style.opacity="0.1",d.prototype.reset.call(this)},Object.defineProperty(u.prototype,"colorStr",{get:function(){return this._colorStr},set:function(l){this._colorStr!==l&&(this._colorStr=l,this._divColorChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"borderRadius",{get:function(){return this._borderRadius},set:function(l){this._borderRadius!==l&&(this._borderRadius=l,this._divColorChanged.emit())},enumerable:!1,configurable:!0}),u}(g.PosFloatDiv);s.BorderedPosFloatDiv=h},4206:function(o,s){var a,c=this&&this.__extends||(a=function(m,p){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,w){g.__proto__=w}||function(g,w){for(var _ in w)Object.prototype.hasOwnProperty.call(w,_)&&(g[_]=w[_])},a(m,p)},function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=m}a(m,p),m.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)});Object.defineProperty(s,"__esModule",{value:!0}),s.CancelError=void 0;var f=function(m){function p(){return m!==null&&m.apply(this,arguments)||this}return c(p,m),p}(Error);s.CancelError=f},4209:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.inverse=void 0;var c=a(8089),f=a(2731),m=a(9898),p=(0,f.createNumbers)(9),g=(0,f.createNumbers)(9),w=(0,f.createNumbers)(4),_=(0,f.createNumbers)(4,0,0,0,1);s.inverse=function(y,h){var d=y[0],u=y[4],l=y[8],v=y[12],b=y[1],E=y[5],S=y[9],P=y[13],C=y[2],x=y[6],O=y[10],I=y[14],N=y[3],T=y[7],R=y[11],A=y[15],B=O*A,k=I*R,z=x*A,j=I*T,L=x*R,F=O*T,G=C*A,W=I*N,V=C*R,U=O*N,q=C*T,J=x*N,Y=B*E+j*S+L*P-(k*E+z*S+F*P),re=k*b+G*S+U*P-(B*b+W*S+V*P),oe=z*b+W*E+q*P-(j*b+G*E+J*P),te=F*b+V*E+J*S-(L*b+U*E+q*S),me=k*u+z*l+F*v-(B*u+j*l+L*v),be=B*d+W*l+V*v-(k*d+G*l+U*v),ne=j*d+G*u+J*v-(z*d+W*u+q*v),fe=L*d+U*u+q*l-(F*d+V*u+J*l),Ce=(B=l*P)*T+(j=v*E)*R+(L=u*S)*A-((k=v*S)*T+(z=u*P)*R+(F=l*E)*A),Te=k*N+(G=d*P)*R+(U=l*b)*A-(B*N+(W=v*b)*R+(V=d*S)*A),Ie=z*N+W*T+(q=d*E)*A-(j*N+G*T+(J=u*b)*A),ve=F*N+V*T+J*R-(L*N+U*T+q*R),Ne=z*O+F*I+k*x-(L*I+B*x+j*O),Le=V*I+B*C+W*O-(G*O+U*I+k*C),Ve=G*x+J*I+j*C-(q*I+z*C+W*x),Ye=q*O+L*C+U*x-(V*x+J*O+F*C),je=d*Y+u*re+l*oe+v*te;if(h=h||(0,f.createNumbers)(16),Math.abs(je)<1e-21){if(m.Vector.equalsEpsilon(c.Matrix4.getMatrix3(y,p),g,1e-7)&&m.Vector.equals(c.Matrix4.getRow(y,3,w),_))return h[0]=0,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=0,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=0,h[11]=0,h[12]=-y[12],h[13]=-y[13],h[14]=-y[14],h[15]=1,h;throw new Error("matrix is not invertible because its determinate is zero.")}return je=1/je,h[0]=Y*je,h[1]=re*je,h[2]=oe*je,h[3]=te*je,h[4]=me*je,h[5]=be*je,h[6]=ne*je,h[7]=fe*je,h[8]=Ce*je,h[9]=Te*je,h[10]=Ie*je,h[11]=ve*je,h[12]=Ne*je,h[13]=Le*je,h[14]=Ve*je,h[15]=Ye*je,h}},4221:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(4292),s),f(a(1662),s),f(a(3281),s),f(a(6356),s)},4235:(o,s,a)=>{s.A=void 0;var c=a(4638),f=a(733),m={blocks:function(d){for(var u=[],l=d.data.length,v=0,b=(0,f.readByte)()(d);b!==0&&b;b=(0,f.readByte)()(d)){if(d.pos+b>=l){var E=l-d.pos;u.push((0,f.readBytes)(E)(d)),v+=E;break}u.push((0,f.readBytes)(b)(d)),v+=b}for(var S=new Uint8Array(v),P=0,C=0;C<u.length;C++)S.set(u[C],P),P+=u[C].length;return S}},p=(0,c.conditional)({gce:[{codes:(0,f.readBytes)(2)},{byteSize:(0,f.readByte)()},{extras:(0,f.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,f.readUnsigned)(!0)},{transparentColorIndex:(0,f.readByte)()},{terminator:(0,f.readByte)()}]},function(d){var u=(0,f.peekBytes)(2)(d);return u[0]===33&&u[1]===249}),g=(0,c.conditional)({image:[{code:(0,f.readByte)()},{descriptor:[{left:(0,f.readUnsigned)(!0)},{top:(0,f.readUnsigned)(!0)},{width:(0,f.readUnsigned)(!0)},{height:(0,f.readUnsigned)(!0)},{lct:(0,f.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,c.conditional)({lct:(0,f.readArray)(3,function(d,u,l){return Math.pow(2,l.descriptor.lct.size+1)})},function(d,u,l){return l.descriptor.lct.exists}),{data:[{minCodeSize:(0,f.readByte)()},m]}]},function(d){return(0,f.peekByte)()(d)===44}),w=(0,c.conditional)({text:[{codes:(0,f.readBytes)(2)},{blockSize:(0,f.readByte)()},{preData:function(d,u,l){return(0,f.readBytes)(l.text.blockSize)(d)}},m]},function(d){var u=(0,f.peekBytes)(2)(d);return u[0]===33&&u[1]===1}),_=(0,c.conditional)({application:[{codes:(0,f.readBytes)(2)},{blockSize:(0,f.readByte)()},{id:function(d,u,l){return(0,f.readString)(l.blockSize)(d)}},m]},function(d){var u=(0,f.peekBytes)(2)(d);return u[0]===33&&u[1]===255}),y=(0,c.conditional)({comment:[{codes:(0,f.readBytes)(2)},m]},function(d){var u=(0,f.peekBytes)(2)(d);return u[0]===33&&u[1]===254}),h=[{header:[{signature:(0,f.readString)(3)},{version:(0,f.readString)(3)}]},{lsd:[{width:(0,f.readUnsigned)(!0)},{height:(0,f.readUnsigned)(!0)},{gct:(0,f.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,f.readByte)()},{pixelAspectRatio:(0,f.readByte)()}]},(0,c.conditional)({gct:(0,f.readArray)(3,function(d,u){return Math.pow(2,u.lsd.gct.size+1)})},function(d,u){return u.lsd.gct.exists}),{frames:(0,c.loop)([p,_,y,g,w],function(d){var u=(0,f.peekByte)()(d);return u===33||u===44})}];s.A=h},4292:(o,s)=>{var a;Object.defineProperty(s,"__esModule",{value:!0}),s.copyright=void 0;var c=(a="".concat("xbsj-base"))!==null&&a!==void 0?a:"-",f="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",m=((Date.now()-1743502596e3)/36e5).toFixed(1),p="%c🌏 ".concat(c,"%c ").concat("1.0.1"," ").concat("6a6f3869f41c8db67af383a267b45147c29ee2b5".slice(0,8)," ").concat("2025-04-01T10:16:36.000Z"," (距今").concat(m,`个小时)
4
+ %c`).concat(f+`
5
+ `,"当前网站正在使用").concat(c,",此开发包版权归").concat("北京西部世界科技有限公司","所有。");s.copyright=Object.seal({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get info(){return p},get date(){return"2025-04-01T10:16:36.000Z"},get author(){return"vtxf,suplyang"},get version(){return"1.0.1"},get name(){return"xbsj-base"},get commitId(){return"6a6f3869f41c8db67af383a267b45147c29ee2b5"},print:function(){console.info(this.info,`
6
+ font-size: 18px;
7
+ font-weight: 1000;
8
+ line-height: 1;
9
+ color: rgb(0, 120, 215);
10
+ padding-top: 20px;
11
+ padding-bottom: 10px;
12
+ `,`
13
+ font-size: 10px;
14
+ font-weight: 1000;
15
+ color: rgb(0, 120, 215);
16
+ `,`
17
+ font-size: 10px;
18
+ line-height: 1.5;
19
+ color: rgb(0, 120, 215);
20
+ padding-bottom: 2px;
21
+ padding-left: 35px;
22
+ `)}})},4344:function(o,s,a){var c,f=this&&this.__extends||(c=function(y,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(d[l]=u[l])},c(y,h)},function(y,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function d(){this.constructor=y}c(y,h),y.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}),m=this&&this.__values||function(y){var h=typeof Symbol=="function"&&Symbol.iterator,d=h&&y[h],u=0;if(d)return d.call(y);if(y&&typeof y.length=="number")return{next:function(){return y&&u>=y.length&&(y=void 0),{value:y&&y[u++],done:!y}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},p=this&&this.__read||function(y,h){var d=typeof Symbol=="function"&&y[Symbol.iterator];if(!d)return y;var u,l,v=d.call(y),b=[];try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)b.push(u.value)}catch(E){l={error:E}}finally{try{u&&!u.done&&(d=v.return)&&d.call(v)}finally{if(l)throw l.error}}return b},g=this&&this.__spreadArray||function(y,h,d){if(d||arguments.length===2)for(var u,l=0,v=h.length;l<v;l++)!u&&l in h||(u||(u=Array.prototype.slice.call(h,0,l)),u[l]=h[l]);return y.concat(u||Array.prototype.slice.call(h))};Object.defineProperty(s,"__esModule",{value:!0}),s.ObservableSet=void 0;var w=a(1662),_=function(y){function h(){var d=y.call(this)||this;return d._set=new Set,d._toChangeEvent=d.disposeVar(new w.Event),d._changedEvent=d.disposeVar(new w.Event),d.dispose(function(){d._set.size!==0&&(h.warnOnDestroying&&console.warn("this._set.size > 0"),d.clear())}),d}return f(h,y),Object.defineProperty(h.prototype,"toChange",{get:function(){return this._toChangeEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"changed",{get:function(){return this._changedEvent},enumerable:!1,configurable:!0}),h.prototype.add=function(){for(var d,u,l=[],v=0;v<arguments.length;v++)l[v]=arguments[v];try{for(var b=m(l),E=b.next();!E.done;E=b.next()){var S=E.value;this._toChangeEvent.emit([],[S]),this._set.add(S),this._changedEvent.emit([],[S])}}catch(P){d={error:P}}finally{try{E&&!E.done&&(u=b.return)&&u.call(b)}finally{if(d)throw d.error}}},h.prototype.delete=function(){for(var d,u,l=[],v=0;v<arguments.length;v++)l[v]=arguments[v];try{for(var b=m(l),E=b.next();!E.done;E=b.next()){var S=E.value;this._toChangeEvent.emit([S],[]),this._set.delete(S),this._changedEvent.emit([S],[])}}catch(P){d={error:P}}finally{try{E&&!E.done&&(u=b.return)&&u.call(b)}finally{if(d)throw d.error}}},h.prototype.disposableAdd=function(){for(var d=this,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return this.add.apply(this,g([],p(u),!1)),function(){return d.delete.apply(d,g([],p(u),!1))}},Object.defineProperty(h.prototype,"size",{get:function(){return this._set.size},enumerable:!1,configurable:!0}),h.prototype.clear=function(){var d=g([],p(this._set),!1);this._toChangeEvent.emit([],d),this._set.clear(),this._changedEvent.emit([],d)},h.prototype.values=function(){return this._set.values()},h.warnOnDestroying=!0,h}(w.Destroyable);s.ObservableSet=_},4416:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BoundingSphere=void 0;var c=a(312),f=a(8089),m=a(2731),p=a(7215),g=a(9898);(function(w){function _(x,O){return O=O||(0,m.createNumbers)(3),g.Vector.set(O,x[0],x[1],x[2]),O}function y(x){return x[3]}function h(x,O){return x[0]=O[0],x[1]=O[1],x[2]=O[2],x}function d(x,O){x[3]=O}w.getCenter=_,w.getRadius=y,w.setCenter=h,w.setRadius=d,w.fromCenterRadius=function(x,O,I){return g.Vector.set(I,x[0],x[1],x[2],O)};var u=(0,m.createNumbers)(3),l=(0,m.createNumbers)(3);w.intersectPlane=function(x,O){var I=_(x,u),N=y(x),T=p.Plane.getNormal(O,l),R=g.Vector.dot(T,I)+p.Plane.getDistance(O);return R<-N?c.Intersect.OUTSIDE:R<N?c.Intersect.INTERSECTING:c.Intersect.INSIDE};var v=(0,m.createNumbers)(3);w.transform=function(x,O,I){I=I||(0,m.createNumbers)(4);var N=_(x,v),T=y(x);return f.Matrix4.affineMultiplyByPoint(O,N,N),T*=f.Matrix4.getMaximumScale(O),h(I,N),d(I,T),I};var b=(0,m.createNumbers)(3),E=(0,m.createNumbers)(3),S=(0,m.createNumbers)(3),P=(0,m.createNumbers)(3);w.union=function(x,O,I){I=I||(0,m.createNumbers)(4);var N=g.Vector.set(b,x[0],x[1],x[2]),T=x[3],R=g.Vector.set(E,O[0],O[1],O[2]),A=O[3],B=g.Vector.subtract(R,N,S),k=g.Vector.magnitude(B);if(T>=k+A)return g.Vector.clone(x,I),I;if(A>=k+T)return g.Vector.clone(O,I),I;var z=.5*(T+k+A),j=g.Vector.multiplyByScalar(B,(-T+z)/k,P);return g.Vector.add(j,N,j),g.Vector.set(I,j[0],j[1],j[2],z),I};var C=(0,m.createNumbers)(3);w.fromCornerPoints=function(x,O,I){var N=g.Vector.lerp(x,O,.5,C),T=g.Vector.distance(N,O);return g.Vector.set(I,N[0],N[1],N[2],T)}})(s.BoundingSphere||(s.BoundingSphere={}))},4471:function(o,s,a){var c=this&&this.__read||function(w,_){var y=typeof Symbol=="function"&&w[Symbol.iterator];if(!y)return w;var h,d,u=y.call(w),l=[];try{for(;(_===void 0||_-- >0)&&!(h=u.next()).done;)l.push(h.value)}catch(v){d={error:v}}finally{try{h&&!h.done&&(y=u.return)&&y.call(u)}finally{if(d)throw d.error}}return l},f=this&&this.__spreadArray||function(w,_,y){if(y||arguments.length===2)for(var h,d=0,u=_.length;d<u;d++)!h&&d in _||(h||(h=Array.prototype.slice.call(_,0,d)),h[d]=_[d]);return w.concat(h||Array.prototype.slice.call(_))};Object.defineProperty(s,"__esModule",{value:!0}),s.ListenerPipe=void 0;var m=a(1895),p=new(a(1085)).ObjPool(function(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}},function(w){w.func=void 0,w.scope=void 0,w._hasRemoved=!1,w._once=!1},!0),g=function(){function w(){}return Object.defineProperty(w.prototype,"_dll",{get:function(){var _;return this.__dll=(_=this.__dll)!==null&&_!==void 0?_:new m.DoublyLinkedList({needLength:!0}),this.__dll},enumerable:!1,configurable:!0}),w.prototype._pushCurrentListener=function(_){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(_):this.__currentListenerStack=[this.__currentListenerStack,_]:this.__currentListenerStack=_},w.prototype._popCurrentListener=function(){if(!this.__currentListenerStack)throw new Error("cannot pop!");Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0},w.prototype._hasCurrentListener=function(_){return!!this.__currentListenerStack&&(Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(_)!==-1:this.__currentListenerStack===_)},w.prototype.do=function(){for(var _,y=[],h=0;h<arguments.length;h++)y[h]=arguments[h];if(this.__dll&&!this._dll.empty)for(var d=this._dll.head;d;){var u=d.item;u._hasRemoved||(this._pushCurrentListener(u),(_=u.func).call.apply(_,f([u.scope],c(y),!1)),this._popCurrentListener());var l=d.next;u._once&&!u._hasRemoved&&(this.remove(d),d=void 0),d&&this._clearHasRemoved(d),d=l}},Object.defineProperty(w.prototype,"empty",{get:function(){if(!this.__dll||this._dll.empty)return!0;for(var _=!0,y=this._dll.head;y;){if(!y.item._hasRemoved){_=!1;break}y=y.next}return _},enumerable:!1,configurable:!0}),w.prototype.isHandlerValid=function(_){return!_.item._hasRemoved},w.prototype.nextHandler=function(_){if(!_.item._hasRemoved)throw new Error("handler has removed!");for(var y=_.next;y&&y.item._hasRemoved;)y=y.next;return y},w.prototype.prevHandler=function(_){if(!_.item._hasRemoved)throw new Error("handler has removed!");for(var y=_.previous;y&&y.item._hasRemoved;)y=y.previous;return y},w.prototype.moveAfter=function(_,y){if(_.item._hasRemoved||y.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(_,y)},w.prototype.moveBefore=function(_,y){if(_.item._hasRemoved||y.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(_,y)},w.prototype.insertBefore=function(_,y,h,d){if(d===void 0&&(d=!1),_.item._hasRemoved)throw new Error("handler has removed!");var u=p.create();return u.func=y,u.scope=h,u._once=d,this._dll.insertBefore(_,u)},w.prototype.insertAfter=function(_,y,h,d){if(d===void 0&&(d=!1),_.item._hasRemoved)throw new Error("handler has removed!");var u=p.create();return u.func=y,u.scope=h,u._once=d,this._dll.insertAfter(_,u)},w.prototype._clearHasRemoved=function(_){_.item._hasRemoved&&!this._hasCurrentListener(_.item)&&(p.destroy(_.item),this._dll.remove(_))},w.prototype.remove=function(_){if(!_.item||_.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(_.item)?_.item._hasRemoved=!0:(p.destroy(_.item),this._dll.remove(_))},w.prototype.removeAll=function(){if(this.__dll&&!this._dll.empty)for(var _=this._dll.head;_;){var y=_.next;_.item._hasRemoved||this.remove(_),_=y}},w.prototype.destroy=function(){if(this.__dll){for(var _=this._dll.head;_;){var y=_.next,h=_;this._hasCurrentListener(h.item)||(console.warn("Event has remove item that on current stack!"),console.warn("".concat(h.item.func.toString()))),p.destroy(h.item),this._dll.remove(h),_=y}this.__dll=void 0,this.__currentListenerStack=void 0}},w.prototype.push=function(_,y,h){h===void 0&&(h=!1);var d=p.create();return d.func=_,d.scope=y,d._once=h,this._dll.push(d)},w.prototype.pop=function(){var _=this.tail;if(!_)throw new Error("pop error!");this.remove(_)},w.prototype.shift=function(){var _=this.head;if(!_)throw new Error("shift error!");this.remove(_)},w.prototype.unshift=function(_,y,h){h===void 0&&(h=!1);var d=p.create();return d.func=_,d.scope=y,d._once=h,this._dll.unshift(d)},Object.defineProperty(w.prototype,"tail",{get:function(){for(var _=this._dll.tail;_&&_.item._hasRemoved;)_=_.previous;return _},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"head",{get:function(){for(var _=this._dll.head;_&&_.item._hasRemoved;)_=_.previous;return _},enumerable:!1,configurable:!0}),w}();s.ListenerPipe=g},4499:function(o,s){var a=this&&this.__read||function(p,g){var w=typeof Symbol=="function"&&p[Symbol.iterator];if(!w)return p;var _,y,h=w.call(p),d=[];try{for(;(g===void 0||g-- >0)&&!(_=h.next()).done;)d.push(_.value)}catch(u){y={error:u}}finally{try{_&&!_.done&&(w=h.return)&&w.call(h)}finally{if(y)throw y.error}}return d};function c(p,g,w,_){var y=a(p,2),h=y[0],d=y[1],u=a(_,4),l=u[0],v=u[1],b=u[2],E=u[3],S=g[0]*w[0],P=g[1]*w[1],C=h-(S*l+b),x=d-(P*v+E);return{left:C,top:x,right:C+S,bottom:x+P}}function f(p,g,w,_,y,h){p.beginPath(),p.moveTo(g+h,w),p.lineTo(g+_-h,w),p.arcTo(g+_,w,g+_,w+h,h),p.lineTo(g+_,w+y-h),p.arcTo(g+_,w+y,g+_-h,w+y,h),p.lineTo(g+h,w+y),p.arcTo(g,w+y,g,w+y-h,h),p.lineTo(g,w+h),p.arcTo(g,w,g+h,w,h)}function m(p){return("00"+p.toString(16).toUpperCase()).substr(-2)}Object.defineProperty(s,"__esModule",{value:!0}),s.getColorHexStr=s.uint8ToHexStr=s.drawTextBlock=s.setCanvasUniformColor=s.imageToCanvas=s.drawText=s.drawRoundRectPath=s.drawPoint=s.getDrawRect=void 0,s.getDrawRect=c,s.drawPoint=function(p,g,w,_,y){p.beginPath(),p.moveTo(g,w),p.lineTo(g-.5*_,w-.5*_),p.arc(g,w-_,.7071067811865475*_,.75*Math.PI,.25*Math.PI),p.lineTo(g,w),p.fillStyle=y,p.fill()},s.drawRoundRectPath=f,s.drawText=function(p,g,w,_,y,h){p.font=y;var d=p.measureText(_),u=d.actualBoundingBoxLeft+d.actualBoundingBoxRight,l=Number.isFinite(d.fontBoundingBoxAscent)?d.fontBoundingBoxAscent:d.actualBoundingBoxAscent,v=Number.isFinite(d.fontBoundingBoxDescent)?d.fontBoundingBoxDescent:d.actualBoundingBoxDescent,b=l+v;p.fillStyle=h,p.fillText(_,g-.5*u,w+.5*b-v)},s.imageToCanvas=function(p){var g=p.width,w=p.height,_=g instanceof SVGAnimatedLength?g.baseVal.SVG_LENGTHTYPE_PX:g,y=w instanceof SVGAnimatedLength?w.baseVal.SVG_LENGTHTYPE_PX:w,h=document.createElement("canvas");h.width=_,h.height=y;var d=h.getContext("2d");if(!d)throw new Error("!cavnasCtx");return d.drawImage(p,0,0,_,y),h},s.setCanvasUniformColor=function(p,g){var w=p.width,_=p.height,y=p.getContext("2d");if(!y)throw new Error("!cavnasCtx");for(var h=a(g.map(function(S){return 255*S|0}),3),d=h[0],u=h[1],l=h[2],v=y.getImageData(0,0,w,_),b=v.data,E=0;E<b.length;E+=4)b[E]=d,b[E+1]=u,b[E+2]=l;y.putImageData(v,0,0)},s.drawTextBlock=function(p,g,w,_,y,h,d,u,l){_===void 0&&(_=[.5,1,0,0]),h===void 0&&(h="12px Arial"),d===void 0&&(d=2),u===void 0&&(u="#FFF"),l===void 0&&(l="#000A"),p.font=h;var v=p.measureText(y),b=v.actualBoundingBoxLeft+v.actualBoundingBoxRight+2*d,E=v.fontBoundingBoxAscent+v.fontBoundingBoxDescent+2*d,S=c([g,w],[b,E],[1,1],_),P=S.left,C=S.top,x=S.bottom;p.fillStyle=l,f(p,P,C,b,E,d),p.fill(),p.fillStyle=u,p.fillText(y,P+d,x-d-v.fontBoundingBoxDescent)},s.uint8ToHexStr=m,s.getColorHexStr=function(p){var g=a(p.map(function(d){return 255*d|0}),4),w=g[0],_=g[1],y=g[2],h=g[3];return"#".concat(m(w)).concat(m(_)).concat(m(y)).concat(m(h))}},4601:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s._setRow=s._getRow=void 0;var c=a(2731),f=a(9898);s._getRow=function(m,p,g){if(p<0||p>3)throw new Error("index < 0 || index > 3");g=g||(0,c.createNumbers)(4);var w=m[p],_=m[p+4],y=m[p+8],h=m[p+12];return g[0]=w,g[1]=_,g[2]=y,g[3]=h,g},s._setRow=function(m,p,g,w){if(p<0||p>3)throw new Error("index < 0 || index > 3");return(w=f.Vector.clone(m,w))[p]=g[0],w[p+4]=g[1],w[p+8]=g[2],w[p+12]=g[3],w}},4621:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(1378),s),f(a(9369),s),f(a(9597),s),f(a(5010),s),f(a(507),s),f(a(1968),s),f(a(2217),s),f(a(2299),s)},4638:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.loop=s.conditional=s.parse=void 0,s.parse=function a(c,f){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:m;if(Array.isArray(f))f.forEach(function(w){return a(c,w,m,p)});else if(typeof f=="function")f(c,m,p,a);else{var g=Object.keys(f)[0];Array.isArray(f[g])?(p[g]={},a(c,f[g],m,p[g])):p[g]=f[g](c,m,p,a)}return m},s.conditional=function(a,c){return function(f,m,p,g){c(f,m,p)&&g(f,a,m,p)}},s.loop=function(a,c){return function(f,m,p,g){for(var w=[],_=f.pos;c(f,m,p);){var y={};if(g(f,a,m,y),f.pos===_)break;_=f.pos,w.push(y)}return w}}},4661:function(o,s,a){var c=this&&this.__read||function(g,w){var _=typeof Symbol=="function"&&g[Symbol.iterator];if(!_)return g;var y,h,d=_.call(g),u=[];try{for(;(w===void 0||w-- >0)&&!(y=d.next()).done;)u.push(y.value)}catch(l){h={error:l}}finally{try{y&&!y.done&&(_=d.return)&&_.call(d)}finally{if(h)throw h.error}}return u},f=this&&this.__spreadArray||function(g,w,_){if(_||arguments.length===2)for(var y,h=0,d=w.length;h<d;h++)!y&&h in w||(y||(y=Array.prototype.slice.call(w,0,h)),y[h]=w[h]);return g.concat(y||Array.prototype.slice.call(w))};Object.defineProperty(s,"__esModule",{value:!0}),s.stepProcessing=void 0;var m=a(5819),p=a(9374);s.stepProcessing=function(g,w){for(var _=[],y=2;y<arguments.length;y++)_[y-2]=arguments[y];return g.promise((0,m.pairToPromise)(p.getPromiseFromProcessing.apply(void 0,f([w],c(_),!1))))}},4775:function(o,s){var a=this&&this.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var g,w,_=p.call(f),y=[];try{for(;(m===void 0||m-- >0)&&!(g=_.next()).done;)y.push(g.value)}catch(h){w={error:h}}finally{try{g&&!g.done&&(p=_.return)&&p.call(_)}finally{if(w)throw w.error}}return y},c=this&&this.__spreadArray||function(f,m,p){if(p||arguments.length===2)for(var g,w=0,_=m.length;w<_;w++)!g&&w in m||(g||(g=Array.prototype.slice.call(m,0,w)),g[w]=m[w]);return f.concat(g||Array.prototype.slice.call(m))};Object.defineProperty(s,"__esModule",{value:!0}),s.debounce=void 0,s.debounce=function(f,m){if(!window||!window.setTimeout||!window.clearTimeout)throw new Error("目前只适合在浏览器中使用!");var p=0;function g(){p>0&&(window.clearTimeout(p),p=0)}return[function(){for(var w=[],_=0;_<arguments.length;_++)w[_]=arguments[_];g(),p=window.setTimeout.apply(window,c([f,m],a(w),!1))},g]}},4833:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.InverseViewMatrix=void 0;var c=a(9898),f=function(){function m(){}return m.getDirection=function(p,g){return c.Vector.set(g,-p[8],-p[9],-p[10])},m.getRight=function(p,g){return c.Vector.set(g,p[0],p[1],p[2])},m.getUp=function(p,g){return c.Vector.set(g,p[4],p[5],p[6])},m.getEye=function(p,g){return c.Vector.set(g,p[12],p[13],p[14])},m}();s.InverseViewMatrix=f},4899:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(1895),s),f(a(9067),s),f(a(4471),s),f(a(2452),s),f(a(5774),s)},4915:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Matrix3=void 0;var c,f=a(2731),m=a(9898);(c=s.Matrix3||(s.Matrix3={})).multiply=function(p,g,w){var _=p[0]*g[0]+p[3]*g[1]+p[6]*g[2],y=p[1]*g[0]+p[4]*g[1]+p[7]*g[2],h=p[2]*g[0]+p[5]*g[1]+p[8]*g[2],d=p[0]*g[3]+p[3]*g[4]+p[6]*g[5],u=p[1]*g[3]+p[4]*g[4]+p[7]*g[5],l=p[2]*g[3]+p[5]*g[4]+p[8]*g[5],v=p[0]*g[6]+p[3]*g[7]+p[6]*g[8],b=p[1]*g[6]+p[4]*g[7]+p[7]*g[8],E=p[2]*g[6]+p[5]*g[7]+p[8]*g[8];return(w=w||(0,f.createNumbers)(9))[0]=_,w[1]=y,w[2]=h,w[3]=d,w[4]=u,w[5]=l,w[6]=v,w[7]=b,w[8]=E,w},c.multiplyByVector=function(p,g,w){var _=g[0],y=g[1],h=g[2],d=p[0]*_+p[3]*y+p[6]*h,u=p[1]*_+p[4]*y+p[7]*h,l=p[2]*_+p[5]*y+p[8]*h;return m.Vector.set(w,d,u,l)},c.fromQuaternion=function(p,g){var w=p[0]*p[0],_=p[0]*p[1],y=p[0]*p[2],h=p[0]*p[3],d=p[1]*p[1],u=p[1]*p[2],l=p[1]*p[3],v=p[2]*p[2],b=p[2]*p[3],E=p[3]*p[3],S=w-d-v+E,P=2*(_-b),C=2*(y+l),x=2*(_+b),O=-w+d-v+E,I=2*(u-h),N=2*(y-l),T=2*(u+h),R=-w-d+v+E;return g=g||(0,f.createNumbers)(9),m.Vector.set(g,S,x,N,P,O,T,C,I,R),g},c.getScale=function(p,g){return(g=g||(0,f.createNumbers)(3))[0]=m.Vector.magnitude([p[0],p[1],p[2]]),g[1]=m.Vector.magnitude([p[3],p[4],p[5]]),g[2]=m.Vector.magnitude([p[6],p[7],p[8]]),g},c.getElementIndex=function(p,g){return 3*p+g},c.IDENTITY=Object.freeze([1,0,0,0,1,0,0,0,1]),c.COLUMN0ROW0=0,c.COLUMN0ROW1=1,c.COLUMN0ROW2=2,c.COLUMN1ROW0=3,c.COLUMN1ROW1=4,c.COLUMN1ROW2=5,c.COLUMN2ROW0=6,c.COLUMN2ROW1=7,c.COLUMN2ROW2=8},4969:(o,s)=>{function a(c){return JSON.stringify(c,void 0," ")}Object.defineProperty(s,"__esModule",{value:!0}),s.printJson=s.toJsonStr=void 0,s.toJsonStr=a,s.printJson=function(c){console.log(a(c))}},4990:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.loadCRN=void 0;var c=a(9928),f=a(2075),m=a(3631),p=a(5486),g=a(1662),w=Error,_=new f.TaskProcessor("transcodeCRNToDXT",Number.POSITIVE_INFINITY);s.loadCRN=function(y){if(!(0,p.defined)(y))throw new w("resourceOrUrlOrBuffer is required.");var h;if(h=y instanceof ArrayBuffer||ArrayBuffer.isView(y)?m.when.resolve(y):(0,g.fetchArrayBuffer)(y),(0,p.defined)(h))return h.then(function(d){if((0,p.defined)(d)){var u=[];return d instanceof ArrayBuffer?u.push(d):(d.byteOffset===0&&d.byteLength===d.buffer.byteLength||(d=d.slice(0,d.length)),u.push(d.buffer)),_.scheduleTask(d,u)}}).then(function(d){return d||console.error("compressedTextureBuffer is undefined!"),c.CompressedTextureBuffer.clone(d)})}},5010:function(o,s,a){var c,f=this&&this.__extends||(c=function(b,E){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,P){S.__proto__=P}||function(S,P){for(var C in P)Object.prototype.hasOwnProperty.call(P,C)&&(S[C]=P[C])},c(b,E)},function(b,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function S(){this.constructor=b}c(b,E),b.prototype=E===null?Object.create(E):(S.prototype=E.prototype,new S)}),m=this&&this.__awaiter||function(b,E,S,P){return new(S||(S=Promise))(function(C,x){function O(T){try{N(P.next(T))}catch(R){x(R)}}function I(T){try{N(P.throw(T))}catch(R){x(R)}}function N(T){var R;T.done?C(T.value):(R=T.value,R instanceof S?R:new S(function(A){A(R)})).then(O,I)}N((P=P.apply(b,E||[])).next())})},p=this&&this.__generator||function(b,E){var S,P,C,x,O={label:0,sent:function(){if(1&C[0])throw C[1];return C[1]},trys:[],ops:[]};return x={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function I(N){return function(T){return function(R){if(S)throw new TypeError("Generator is already executing.");for(;x&&(x=0,R[0]&&(O=0)),O;)try{if(S=1,P&&(C=2&R[0]?P.return:R[0]?P.throw||((C=P.return)&&C.call(P),0):P.next)&&!(C=C.call(P,R[1])).done)return C;switch(P=0,C&&(R=[2&R[0],C.value]),R[0]){case 0:case 1:C=R;break;case 4:return O.label++,{value:R[1],done:!1};case 5:O.label++,P=R[1],R=[0];continue;case 7:R=O.ops.pop(),O.trys.pop();continue;default:if(!((C=(C=O.trys).length>0&&C[C.length-1])||R[0]!==6&&R[0]!==2)){O=0;continue}if(R[0]===3&&(!C||R[1]>C[0]&&R[1]<C[3])){O.label=R[1];break}if(R[0]===6&&O.label<C[1]){O.label=C[1],C=R;break}if(C&&O.label<C[2]){O.label=C[2],O.ops.push(R);break}C[2]&&O.ops.pop(),O.trys.pop();continue}R=E.call(b,O)}catch(A){R=[6,A],P=0}finally{S=C=0}if(5&R[0])throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}([N,T])}}},g=this&&this.__read||function(b,E){var S=typeof Symbol=="function"&&b[Symbol.iterator];if(!S)return b;var P,C,x=S.call(b),O=[];try{for(;(E===void 0||E-- >0)&&!(P=x.next()).done;)O.push(P.value)}catch(I){C={error:I}}finally{try{P&&!P.done&&(S=x.return)&&S.call(x)}finally{if(C)throw C.error}}return O};Object.defineProperty(s,"__esModule",{value:!0}),s.PointerClick=void 0;var w=a(7372),_=a(7372),y=a(7372),h=a(8106),d=a(5819),u=a(9597),l=a(2299),v=function(b){function E(){var S=b.call(this)||this;S._clickEvent=S.disposeVar(new _.Event),S._dbclickEvent=S.disposeVar(new _.Event),S._pointerdownEvent=S.disposeVar(new _.Event),S._pointerupEvent=S.disposeVar(new _.Event),S._pointermoveEvent=S.disposeVar(new _.Event),S._pointeroutEvent=S.disposeVar(new _.Event),S.dbClickDelayTime=300,S.nativeClickDelayTime=500,S.clickMovementTolerantPixelSize=3,S.debugging=!1,S._enabled=S.disposeVar((0,y.react)(!0));var P=S.disposeVar((0,d.createProcessingFromAsyncFunc)(function(x){return m(S,void 0,void 0,function(){var O,I,N=this;return p(this,function(T){switch(T.label){case 0:O=function(){var R,A,B;return p(this,function(k){switch(k.label){case 0:return[4,(0,h.step)(x,function(z){return new Promise(function(j,L){z.disposer.dispose(L),z.disposer.dispose(u.DomElementEvent.on(N._pointerdownEvent,j))})})];case 1:return R=k.sent(),A=(0,l.getDomEventCurrentTargetPos)(R),I.debugging&&console.log("鼠标按下 ".concat(A.toString())),[4,(0,h.step)(x,function(z){return new Promise(function(j,L){z.disposer.dispose(L);var F=setTimeout(function(){return j(!0)},N.nativeClickDelayTime);z.disposer.dispose(function(){return clearTimeout(F)}),z.disposer.dispose(u.DomElementEvent.on(N._pointermoveEvent,function(G){var W=g((0,l.getDomEventCurrentTargetPos)(G),2),V=W[0],U=W[1],q=g(A,2),J=q[0],Y=q[1];(Math.abs(V-J)>3||Math.abs(U-Y)>3)&&j(!1)})),z.disposer.dispose(u.DomElementEvent.on(N._pointeroutEvent,function(){return j(!1)})),z.disposer.dispose(u.DomElementEvent.on(N._pointerupEvent,function(){return j(!0)}))})})];case 2:return k.sent()?[4,(0,h.step)(x,function(z){return new Promise(function(j,L){z.disposer.dispose(L);var F=setTimeout(function(){return j("timeout")},N.dbClickDelayTime);z.disposer.dispose(function(){return clearTimeout(F)}),z.disposer.dispose(u.DomElementEvent.on(N._pointermoveEvent,function(G){var W=g((0,l.getDomEventCurrentTargetPos)(G),2),V=W[0],U=W[1],q=g(A,2),J=q[0],Y=q[1];(Math.abs(V-J)>3||Math.abs(U-Y)>3)&&j("moved")})),z.disposer.dispose(u.DomElementEvent.on(N._pointerdownEvent,j)),z.disposer.dispose(u.DomElementEvent.on(N._pointeroutEvent,function(){return j("pointouted")})),z.disposer.dispose(u.DomElementEvent.on(N._pointerupEvent,function(){return j("pointuped")}))})})]:(I.debugging&&console.log("取消1"),[2,"continue"]);case 3:return typeof(B=k.sent())=="string"?(I.debugging&&console.log("触发单击事件!取消双击监听!error: ".concat(B)),I._clickEvent.emit(R),[2,"continue"]):[4,(0,h.step)(x,function(z){return new Promise(function(j,L){z.disposer.dispose(L);var F=setTimeout(function(){return j(!1)},N.nativeClickDelayTime);z.disposer.dispose(function(){return clearTimeout(F)}),z.disposer.dispose(u.DomElementEvent.on(N._pointermoveEvent,function(G){var W=g((0,l.getDomEventCurrentTargetPos)(G),2),V=W[0],U=W[1],q=g(A,2),J=q[0],Y=q[1];(Math.abs(V-J)>3||Math.abs(U-Y)>3)&&j(!1)})),z.disposer.dispose(u.DomElementEvent.on(N._pointeroutEvent,function(){return j(!1)})),z.disposer.dispose(u.DomElementEvent.on(N._pointerupEvent,function(){return j(!0)}))})})];case 4:return k.sent()?(I.debugging&&console.log("触发双击事件!"),I._dbclickEvent.emit(B),[2]):(I.debugging&&console.log("取消2"),[2,"continue"])}})},I=this,T.label=1;case 1:return[5,O()];case 2:T.sent(),T.label=3;case 3:return[3,1];case 4:return[2]}})})})),C=function(x){x?P.restart():P.isRunning&&P.cancel()};return C(S.enabled),S.dispose(S.enabledChanged.disposableOn(C)),S}return f(E,b),Object.defineProperty(E.prototype,"clickEvent",{get:function(){return this._clickEvent},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"dbclickEvent",{get:function(){return this._dbclickEvent},enumerable:!1,configurable:!0}),E.prototype.pointerDown=function(S){this._pointerdownEvent.emit(S)},E.prototype.pointerUp=function(S){this._pointerupEvent.emit(S)},E.prototype.pointerMove=function(S){this._pointermoveEvent.emit(S)},E.prototype.pointerOut=function(S){this._pointeroutEvent.emit(S)},Object.defineProperty(E.prototype,"enabled",{get:function(){return this._enabled.value},set:function(S){this._enabled.value=S},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"enabledChanged",{get:function(){return this._enabled.changed},enumerable:!1,configurable:!0}),E}(w.Destroyable);s.PointerClick=v},5015:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getBase64UriData=void 0;var a=/^data:(.*?)(;base64)?,(.*)$/;function c(p,g){var w=decodeURIComponent(g);return p?atob(w):w}function f(p,g){for(var w=c(p,g),_=new ArrayBuffer(w.length),y=new Uint8Array(_),h=0;h<w.length;h++)y[h]=w.charCodeAt(h);return _}function m(p,g){g===void 0&&(g="text");var w=p[1],_=!!p[2],y=p[3];switch(g){case"text":return[c(_,y),w];case"arraybuffer":return[f(_,y),w];case"blob":var h=f(_,y);return[new Blob([h],{type:w}),w];case"document":return[new DOMParser().parseFromString(c(_,y),w),w];case"json":return[JSON.parse(c(_,y)),w];default:throw new Error("Unhandled responseType: "+g)}}s.getBase64UriData=function(p,g){g===void 0&&(g="text");var w=a.exec(p);if(w!==null){if(g==="document"||g==="blob"||g==="arraybuffer"||g==="text"||g==="json")return m(w,g);throw new Error("responseType error!")}}},5210:function(o,s,a){var c,f=this&&this.__extends||(c=function(v,b){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,S){E.__proto__=S}||function(E,S){for(var P in S)Object.prototype.hasOwnProperty.call(S,P)&&(E[P]=S[P])},c(v,b)},function(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function E(){this.constructor=v}c(v,b),v.prototype=b===null?Object.create(b):(E.prototype=b.prototype,new E)}),m=this&&this.__awaiter||function(v,b,E,S){return new(E||(E=Promise))(function(P,C){function x(N){try{I(S.next(N))}catch(T){C(T)}}function O(N){try{I(S.throw(N))}catch(T){C(T)}}function I(N){var T;N.done?P(N.value):(T=N.value,T instanceof E?T:new E(function(R){R(T)})).then(x,O)}I((S=S.apply(v,b||[])).next())})},p=this&&this.__generator||function(v,b){var E,S,P,C,x={label:0,sent:function(){if(1&P[0])throw P[1];return P[1]},trys:[],ops:[]};return C={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function O(I){return function(N){return function(T){if(E)throw new TypeError("Generator is already executing.");for(;C&&(C=0,T[0]&&(x=0)),x;)try{if(E=1,S&&(P=2&T[0]?S.return:T[0]?S.throw||((P=S.return)&&P.call(S),0):S.next)&&!(P=P.call(S,T[1])).done)return P;switch(S=0,P&&(T=[2&T[0],P.value]),T[0]){case 0:case 1:P=T;break;case 4:return x.label++,{value:T[1],done:!1};case 5:x.label++,S=T[1],T=[0];continue;case 7:T=x.ops.pop(),x.trys.pop();continue;default:if(!((P=(P=x.trys).length>0&&P[P.length-1])||T[0]!==6&&T[0]!==2)){x=0;continue}if(T[0]===3&&(!P||T[1]>P[0]&&T[1]<P[3])){x.label=T[1];break}if(T[0]===6&&x.label<P[1]){x.label=P[1],P=T;break}if(P&&x.label<P[2]){x.label=P[2],x.ops.push(T);break}P[2]&&x.ops.pop(),x.trys.pop();continue}T=b.call(v,x)}catch(R){T=[6,R],S=0}finally{E=P=0}if(5&T[0])throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}([I,N])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.HlsProcessing=s.HlsJsLoading=void 0;var g=a(1662),w=a(8106),_=a(2220),y=a(5819),h=function(v){function b(){var E=v.call(this)||this;return E._loading=!1,E._loadedEvent=E.disposeVar(new g.Event),E._loaded=!1,E._loadedPromise=new Promise(function(S){E._loadedPromiseResolve=S}),E._processing=E.disposeVar((0,y.createProcessingFromAsyncFunc)(function(S){return m(E,void 0,void 0,function(){var P;return p(this,function(C){switch(C.label){case 0:return this._loading=!0,window.Hls?(console.info("可能系统已经加载hlsjs,此处不再加载!"),[3,3]):[3,1];case 1:return P=_.SceneObject.context.getStrFromEnv(b.path),[4,S.promise((0,g.loadJs)(P))];case 2:C.sent(),C.label=3;case 3:return this._loading=!1,this._loaded=!0,this._loadedEvent.emit(),this._loadedPromiseResolve(),[2]}})})})),E._processingStart=E._processing.start(),E}return f(b,v),Object.defineProperty(b.prototype,"loading",{get:function(){return this._loading},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"loadedEvent",{get:function(){return this._loadedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"loaded",{get:function(){return this._loaded},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"loadedPromise",{get:function(){return this._loadedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"processing",{get:function(){return this._processing},enumerable:!1,configurable:!0}),b.instance=function(){return b._instance=b._instance||new b,b._instance},b.path="${xr-utils-script-dir}/xr-static/xr-utils/hlsjs/1.4.12/hls.min.js",b}(g.Destroyable);s.HlsJsLoading=h;var d=function(v){function b(E,S){var P=v.call(this)||this;P._complexImage=E,P._videoSrc=S;var C,x=document.createElement("video");return x.src=P._videoSrc,x.style.position="absolute",x.style.top="0px",x.style.left="0px",x.style.zIndex="-100",x.style.visibility="hidden",(C=function(){x.crossOrigin=P._complexImage.crossOrigin})(),P.dispose(P._complexImage.crossOriginChanged.disposableOn(C)),(C=function(){x.autoplay=P._complexImage.autoplay})(),P.dispose(P._complexImage.autoplayChanged.disposableOn(C)),(C=function(){x.loop=P._complexImage.loop})(),P.dispose(P._complexImage.loopChanged.disposableOn(C)),x.muted=!0,document.body.appendChild(x),P._element=x,P.dispose(function(){return document.body.removeChild(x)}),P}return f(b,v),Object.defineProperty(b.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),b}(g.Destroyable),u=function(v){function b(E,S){var P=v.call(this)||this;return P._complexImage=E,P._videoSrc=S,P._videoDom=P.disposeVar(new d(P._complexImage,"")),P._processing=P.disposeVar((0,y.createProcessingFromAsyncFunc)(function(C){return m(P,void 0,void 0,function(){var x,O,I,N,T;return p(this,function(R){switch(R.label){case 0:return x=this.videoSrc,O=h.instance(),[4,C.promise(O.loadedPromise)];case 1:return R.sent(),I=window.Hls,N=new I,T=this.element,[4,(0,w.step)(C,function(){return new Promise(function(A,B){T.xbsjHLS=N,N.attachMedia(T),N.on(I.Events.MEDIA_ATTACHED,function(){N.loadSource(x),N.on(I.Events.MANIFEST_PARSED,function(k,z){T.play(),A()})}),N.on(I.Events.ERROR,function(k,z){z.type;var j=z.details;z.fatal&&(N.destroy(),B(j))})})})];case 2:return R.sent(),[2]}})})})),P._processingStartup=P._processing.start(),P}return f(b,v),Object.defineProperty(b.prototype,"videoSrc",{get:function(){return this._videoSrc},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"videoDom",{get:function(){return this._videoDom},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"element",{get:function(){return this.videoDom.element},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"processing",{get:function(){return this._processing},enumerable:!1,configurable:!0}),b}(g.Destroyable),l=function(v){function b(E,S){var P=v.call(this)||this;return P._complexImage=E,P._imageUri=S,P._videoDom=P.disposeVar(new u(P._complexImage,P._imageUri)),P._update=P.disposeVar((0,w.createAnimateFrameWithStartValues)(function(){return P.update()})),P._updateStart=P._update.start(),P}return f(b,v),Object.defineProperty(b.prototype,"videoDom",{get:function(){return this._videoDom},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"videoElement",{get:function(){return this._videoDom.element},enumerable:!1,configurable:!0}),b.prototype.update=function(){if(!(this.videoElement.readyState<2)){var E=this._complexImage,S=this.videoElement,P=S.videoWidth,C=S.videoHeight;E.size=[P,C],E.pixelFormat="RGBA",E.copyTexture({source:this.videoElement})}},b}(g.Destroyable);s.HlsProcessing=l},5236:function(o,s){var a=this&&this.__awaiter||function(f,m,p,g){return new(p||(p=Promise))(function(w,_){function y(u){try{d(g.next(u))}catch(l){_(l)}}function h(u){try{d(g.throw(u))}catch(l){_(l)}}function d(u){var l;u.done?w(u.value):(l=u.value,l instanceof p?l:new p(function(v){v(l)})).then(y,h)}d((g=g.apply(f,m||[])).next())})},c=this&&this.__generator||function(f,m){var p,g,w,_,y={label:0,sent:function(){if(1&w[0])throw w[1];return w[1]},trys:[],ops:[]};return _={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function h(d){return function(u){return function(l){if(p)throw new TypeError("Generator is already executing.");for(;_&&(_=0,l[0]&&(y=0)),y;)try{if(p=1,g&&(w=2&l[0]?g.return:l[0]?g.throw||((w=g.return)&&w.call(g),0):g.next)&&!(w=w.call(g,l[1])).done)return w;switch(g=0,w&&(l=[2&l[0],w.value]),l[0]){case 0:case 1:w=l;break;case 4:return y.label++,{value:l[1],done:!1};case 5:y.label++,g=l[1],l=[0];continue;case 7:l=y.ops.pop(),y.trys.pop();continue;default:if(!((w=(w=y.trys).length>0&&w[w.length-1])||l[0]!==6&&l[0]!==2)){y=0;continue}if(l[0]===3&&(!w||l[1]>w[0]&&l[1]<w[3])){y.label=l[1];break}if(l[0]===6&&y.label<w[1]){y.label=w[1],w=l;break}if(w&&y.label<w[2]){y.label=w[2],y.ops.push(l);break}w[2]&&y.ops.pop(),y.trys.pop();continue}l=m.call(f,y)}catch(v){l=[6,v],g=0}finally{p=w=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([d,u])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.fetchJson=void 0,s.fetchJson=function(f,m){return m===void 0&&(m=fetch),a(this,void 0,void 0,function(){var p;return c(this,function(g){switch(g.label){case 0:return[4,m(f)];case 1:return(p=g.sent()).ok?[4,p.json()]:[2,void 0];case 2:return[2,g.sent()]}})})}},5252:function(o,s,a){var c,f=this&&this.__extends||(c=function(g,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,y){_.__proto__=y}||function(_,y){for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&(_[h]=y[h])},c(g,w)},function(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function _(){this.constructor=g}c(g,w),g.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)});Object.defineProperty(s,"__esModule",{value:!0}),s.CanvasPoi=void 0;var m=a(7372),p=function(g){function w(_,y,h){y===void 0&&(y=[0,0]),h===void 0&&(h=0);var d=g.call(this,_)||this;return d._winPos=y,d._depth=h,d.dispose(d.winPosAndDepthChanged.disposableOn(function(){d.needRedraw(),d.needPickRedraw()})),d}return f(w,g),Object.defineProperty(w.prototype,"winPos",{get:function(){return this._winPos},set:function(_){this._winPos[0]===_[0]&&this._winPos[1]===_[1]||(this._winPos[0]=_[0],this._winPos[1]=_[1],this._winPosAndDepthChanged&&this._winPosAndDepthChanged.emit(this._winPos,this._depth))},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"depth",{get:function(){return this._depth},set:function(_){this._depth!==_&&(this._depth=_,this._winPosAndDepthChanged&&this._winPosAndDepthChanged.emit(this._winPos,this._depth))},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"winPosAndDepthChanged",{get:function(){return this._winPosAndDepthChanged||(this._winPosAndDepthChanged=new m.Event),this._winPosAndDepthChanged},enumerable:!1,configurable:!0}),w}(a(2277).CanvasPrimitive);s.CanvasPoi=p},5260:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)}),m=this&&this.__read||function(h,d){var u=typeof Symbol=="function"&&h[Symbol.iterator];if(!u)return h;var l,v,b=u.call(h),E=[];try{for(;(d===void 0||d-- >0)&&!(l=b.next()).done;)E.push(l.value)}catch(S){v={error:S}}finally{try{l&&!l.done&&(u=b.return)&&u.call(b)}finally{if(v)throw v.error}}return E};Object.defineProperty(s,"__esModule",{value:!0}),s.CanvasPointPoi=void 0;var p=a(8106),g=a(7372),w=a(5252),_=a(4499),y=function(h){function d(u){var l=h.call(this,u)||this;l._width=16,l._text="",l._fillStyle="#0F0",l._scale=1,l.dispose(l.scaleChanged.disposableOn(function(S){l.needRedraw(),l.needPickRedraw()}));var v=l.disposeVar(new p.Transition(100)),b=l.disposeVar(new p.Transition(100)),E=function(){l._clickEvent&&!l._clickEvent.empty&&(l.scale=(1+.1*b.current)*(1+.2*v.current))};return l.dispose(b.currentChanged.disposableOn(E)),l.dispose(v.currentChanged.disposableOn(E)),l.dispose(l.activedChanged.disposableOn(function(S){b.target=S?1:0,l.needRedraw()})),l.dispose(l.hoveredChanged.disposableOn(function(S){v.target=S?1:0,l.needRedraw()})),l.dispose(l.selectedChanged.disposableOn(function(S){l.needRedraw()})),l}return f(d,h),Object.defineProperty(d.prototype,"scale",{get:function(){return this._scale},set:function(u){this._scale!==u&&(this._scale=u,this._scaleChanged&&this._scaleChanged.emit(u,this))},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"scaleChanged",{get:function(){return this._scaleChanged||(this._scaleChanged=new g.Event),this._scaleChanged},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"width",{get:function(){return this._width},set:function(u){this._width!==u&&(this._width=u,this.needRedraw(),this.needPickRedraw())},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"text",{get:function(){return this._text},set:function(u){this._text!==u&&(this._text=u,this.needRedraw())},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fillStyle",{get:function(){return this._fillStyle},set:function(u){this._fillStyle!==u&&(this._fillStyle=u,this.needRedraw())},enumerable:!1,configurable:!0}),d.prototype.draw=function(u){if(this._show){var l=m(this._winPos,2),v=l[0],b=l[1],E=u.globalAlpha;u.globalAlpha=this.opacity;var S=this._width*this._scale;this.selected&&(0,_.drawPoint)(u,v,b+3,S+3,"#F00"),this.actived&&this._clickEvent&&!this._clickEvent.empty&&(0,_.drawPoint)(u,v,b+5,S+5,"#FFF"),this.hovered?(0,_.drawPoint)(u,v,b+3,S+3,"#000A"):(0,_.drawPoint)(u,v,b+1,S+1,"#000A"),(0,_.drawPoint)(u,v,b,S,this._fillStyle);var P=this._scale>1.2?"bold 14px Arial":"bold 10px Arial";(0,_.drawText)(u,v,b-S,this._text,P,"#000"),u.globalAlpha=E}},d.prototype.drawForPick=function(u,l){if(this._show){var v=m(this._winPos,2),b=v[0],E=v[1],S=this._width*this._scale,P=l("default");(0,_.drawPoint)(u,b,E,S,P)}},d}(w.CanvasPoi);s.CanvasPointPoi=y},5281:function(o,s,a){var c=this&&this.__awaiter||function(p,g,w,_){return new(w||(w=Promise))(function(y,h){function d(v){try{l(_.next(v))}catch(b){h(b)}}function u(v){try{l(_.throw(v))}catch(b){h(b)}}function l(v){var b;v.done?y(v.value):(b=v.value,b instanceof w?b:new w(function(E){E(b)})).then(d,u)}l((_=_.apply(p,g||[])).next())})},f=this&&this.__generator||function(p,g){var w,_,y,h,d={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]};return h={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function u(l){return function(v){return function(b){if(w)throw new TypeError("Generator is already executing.");for(;h&&(h=0,b[0]&&(d=0)),d;)try{if(w=1,_&&(y=2&b[0]?_.return:b[0]?_.throw||((y=_.return)&&y.call(_),0):_.next)&&!(y=y.call(_,b[1])).done)return y;switch(_=0,y&&(b=[2&b[0],y.value]),b[0]){case 0:case 1:y=b;break;case 4:return d.label++,{value:b[1],done:!1};case 5:d.label++,_=b[1],b=[0];continue;case 7:b=d.ops.pop(),d.trys.pop();continue;default:if(!((y=(y=d.trys).length>0&&y[y.length-1])||b[0]!==6&&b[0]!==2)){d=0;continue}if(b[0]===3&&(!y||b[1]>y[0]&&b[1]<y[3])){d.label=b[1];break}if(b[0]===6&&d.label<y[1]){d.label=y[1],y=b;break}if(y&&d.label<y[2]){d.label=y[2],d.ops.push(b);break}y[2]&&d.ops.pop(),d.trys.pop();continue}b=g.call(p,d)}catch(E){b=[6,E],_=0}finally{w=y=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([l,v])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.loadGifFrames=void 0;var m=a(9704);s.loadGifFrames=function(p){return c(this,void 0,void 0,function(){var g,w,_;return f(this,function(y){switch(y.label){case 0:return[4,fetch(p)];case 1:return[4,y.sent().arrayBuffer()];case 2:return g=y.sent(),w=(0,m.parseGIF)(g),_=(0,m.decompressFrames)(w,!0),[2,{gif:w,gifFrames:_,arrayBuffer:g}]}})})}},5486:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.defined=void 0,s.defined=function(a){return a!=null}},5505:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.every=void 0;var c=a(6301);s.every=function(f,m){return!(0,c.forEachWithBreak)(f,function(p,g){return!m(p,g)})}},5544:function(o,s,a){var c,f=this&&this.__extends||(c=function(g,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,y){_.__proto__=y}||function(_,y){for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&(_[h]=y[h])},c(g,w)},function(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function _(){this.constructor=g}c(g,w),g.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)});Object.defineProperty(s,"__esModule",{value:!0}),s.IntervalDeprecated=void 0;var m=a(3207),p=function(g){function w(_,y){y===void 0&&(y=!0);var h=g.call(this,function(d){var u=d.progressFunc;return d.completeFunc,d.errorFunc,h._intervalFunc=u,h._intervalID&&console.error("this._intervalID should be undefined!"),h.leading&&u(),h._intervalID=setInterval(u,h.intervalTime),function(){if(!h._intervalID)throw console.error("this._intervalID should not be undefined!"),new Error("this._intervalID should not be undefined!");clearInterval(h._intervalID),h._intervalID=void 0}})||this;return h.intervalTime=_,h.leading=y,h.dispose(h.intervalTimeChanged.disposableOn(function(){h._intervalID&&h._intervalFunc&&(clearInterval(h._intervalID),h._intervalID=setInterval(h._intervalFunc,h.intervalTime))})),h}return f(w,g),w}(a(6891).ProcessingDeprecated);s.IntervalDeprecated=p,(0,m.defineReactiveProp)(p,"leading",!0),(0,m.defineReactiveProp)(p,"intervalTime",500)},5582:function(o,s,a){var c=this&&this.__awaiter||function(_,y,h,d){return new(h||(h=Promise))(function(u,l){function v(S){try{E(d.next(S))}catch(P){l(P)}}function b(S){try{E(d.throw(S))}catch(P){l(P)}}function E(S){var P;S.done?u(S.value):(P=S.value,P instanceof h?P:new h(function(C){C(P)})).then(v,b)}E((d=d.apply(_,y||[])).next())})},f=this&&this.__generator||function(_,y){var h,d,u,l,v={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(E){return function(S){return function(P){if(h)throw new TypeError("Generator is already executing.");for(;l&&(l=0,P[0]&&(v=0)),v;)try{if(h=1,d&&(u=2&P[0]?d.return:P[0]?d.throw||((u=d.return)&&u.call(d),0):d.next)&&!(u=u.call(d,P[1])).done)return u;switch(d=0,u&&(P=[2&P[0],u.value]),P[0]){case 0:case 1:u=P;break;case 4:return v.label++,{value:P[1],done:!1};case 5:v.label++,d=P[1],P=[0];continue;case 7:P=v.ops.pop(),v.trys.pop();continue;default:if(!((u=(u=v.trys).length>0&&u[u.length-1])||P[0]!==6&&P[0]!==2)){v=0;continue}if(P[0]===3&&(!u||P[1]>u[0]&&P[1]<u[3])){v.label=P[1];break}if(P[0]===6&&v.label<u[1]){v.label=u[1],u=P;break}if(u&&v.label<u[2]){v.label=u[2],v.ops.push(P);break}u[2]&&v.ops.pop(),v.trys.pop();continue}P=y.call(_,v)}catch(C){P=[6,C],d=0}finally{h=u=0}if(5&P[0])throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}([E,S])}}},m=this&&this.__read||function(_,y){var h=typeof Symbol=="function"&&_[Symbol.iterator];if(!h)return _;var d,u,l=h.call(_),v=[];try{for(;(y===void 0||y-- >0)&&!(d=l.next()).done;)v.push(d.value)}catch(b){u={error:b}}finally{try{d&&!d.done&&(h=l.return)&&h.call(l)}finally{if(u)throw u.error}}return v},p=this&&this.__spreadArray||function(_,y,h){if(h||arguments.length===2)for(var d,u=0,l=y.length;u<l;u++)!d&&u in y||(d||(d=Array.prototype.slice.call(y,0,u)),d[u]=y[u]);return _.concat(d||Array.prototype.slice.call(y))};Object.defineProperty(s,"__esModule",{value:!0}),s.step=void 0;var g=a(5819),w=a(9374);s.step=function(_,y){for(var h=this,d=[],u=2;u<arguments.length;u++)d[u-2]=arguments[u];return _.promise((0,g.pairToPromise)(w.getPromiseFromProcessing.apply(void 0,p([(0,g.createProcessingFromAsyncFunc)(function(l){for(var v=[],b=1;b<arguments.length;b++)v[b-1]=arguments[b];return c(h,void 0,void 0,function(){return f(this,function(E){switch(E.label){case 0:return _.disposer.dispose(function(){l.isDestroyed()||l.cancel()}),[4,y.apply(void 0,p([l],m(v),!1))];case 1:return[2,E.sent()]}})})})],m(d),!1))))}},5590:function(o,s,a){this&&this.__read,this&&this.__spreadArray,Object.defineProperty(s,"__esModule",{value:!0}),s.Kriging=void 0;var c=a(1662);function f(C,x){return C.resize(8*x),new Float64Array(C.arrayBuffer,0,x)}function m(C,x,O){var I=O;if(I.length!==x*x)throw new Error("Z.length !== n * n");I.fill(0);for(var N=0;N<x;N++)I[N*x+N]=C;return I}function p(C,x,O,I,N){var T,R,A=N;if(A.length!==O*I)throw new Error("Z.length !== n * m");for(T=0;T<O;T++)for(R=0;R<I;R++)A[T*I+R]=C[T*I+R]+x[T*I+R];return A}function g(C,x,O,I,N,T){var R,A,B,k=T;if(k.length!==O*N)throw new Error("Z.length !== n * p");for(R=0;R<O;R++)for(A=0;A<N;A++)for(k[R*N+A]=0,B=0;B<I;B++)k[R*N+A]+=C[R*I+B]*x[B*N+A];return k}var w=new c.ScalableBuffer;function _(C,x){var O,I,N,T=f(w,x);for(O=0;O<x;O++)T[O]=C[O*x+O];for(O=0;O<x;O++){for(I=0;I<O;I++)T[O]-=C[O*x+I]*C[O*x+I];if(T[O]<=0)return!1;for(T[O]=Math.sqrt(T[O]),I=O+1;I<x;I++){for(N=0;N<O;N++)C[I*x+O]-=C[I*x+N]*C[O*x+N];C[I*x+O]/=T[O]}}for(O=0;O<x;O++)C[O*x+O]=T[O];return!0}function y(C,x){var O,I,N,T;for(O=0;O<x;O++)for(C[O*x+O]=1/C[O*x+O],I=O+1;I<x;I++){for(T=0,N=O;N<I;N++)T-=C[I*x+N]*C[N*x+O];C[I*x+O]=T/C[I*x+I]}for(O=0;O<x;O++)for(I=O+1;I<x;I++)C[O*x+I]=0;for(O=0;O<x;O++){for(C[O*x+O]*=C[O*x+O],N=O+1;N<x;N++)C[O*x+O]+=C[N*x+O]*C[N*x+O];for(I=O+1;I<x;I++)for(N=I;N<x;N++)C[O*x+I]+=C[N*x+O]*C[N*x+I]}for(O=0;O<x;O++)for(I=0;I<O;I++)C[O*x+I]=C[I*x+O]}var h=new c.ScalableBuffer,d=new c.ScalableBuffer,u=new c.ScalableBuffer,l=new c.ScalableBuffer;function v(C,x){var O,I,N,T,R,A,B,k,z,j=x,L=f(h,x*x),F=f(d,x),G=f(u,x),W=f(l,x),V=0,U=0;for(O=0;O<x;O++)for(I=0;I<x;I++)L[O*x+I]=O==I?1:0;for(I=0;I<x;I++)W[I]=0;for(O=0;O<x;O++){for(A=0,I=0;I<x;I++)if(W[I]!=1)for(N=0;N<x;N++)W[N]==0&&Math.abs(C[I*x+N])>=A&&(A=Math.abs(C[I*x+N]),U=I,V=N);if(++W[V],U!=V){for(T=0;T<x;T++)z=C[U*x+T],C[U*x+T]=C[V*x+T],C[V*x+T]=z;for(T=0;T<j;T++)z=L[U*x+T],L[U*x+T]=L[V*x+T],L[V*x+T]=z}if(G[O]=U,F[O]=V,C[V*x+V]==0)return!1;for(k=1/C[V*x+V],C[V*x+V]=1,T=0;T<x;T++)C[V*x+T]*=k;for(T=0;T<j;T++)L[V*x+T]*=k;for(R=0;R<x;R++)if(R!=V){for(B=C[R*x+V],C[R*x+V]=0,T=0;T<x;T++)C[R*x+T]-=C[V*x+T]*B;for(T=0;T<j;T++)L[R*x+T]-=L[V*x+T]*B}}for(T=x-1;T>=0;T--)if(G[T]!=F[T])for(N=0;N<x;N++)z=C[N*x+G[T]],C[N*x+G[T]]=C[N*x+F[T]],C[N*x+F[T]]=z;return!0}function b(C,x,O,I,N){return x+(I-x)/O*(1-Math.exp(-1/N*Math.pow(C/O,2)))}function E(C,x,O,I,N){return x+(I-x)/O*(1-Math.exp(-1/N*(C/O)))}function S(C,x,O,I,N){return C>O?x+(I-x)/O:x+(I-x)/O*(C/O*1.5-.5*Math.pow(C/O,3))}function P(C,x){var O=C[0]-x[0],I=C[1]-x[1],N=C[2]-x[2];return Math.sqrt(O*O+I*I+N*N)}(function(C){var x=new c.ScalableBuffer,O=new c.ScalableBuffer,I=new c.ScalableBuffer,N=new c.ScalableBuffer,T=new c.ScalableBuffer,R=new c.ScalableBuffer,A=new c.ScalableBuffer,B=new c.ScalableBuffer,k=new c.ScalableBuffer,z=new c.ScalableBuffer,j=new c.ScalableBuffer,L=new c.ScalableBuffer,F=new c.ScalableBuffer,G=[];C.train=function(U,q,J,Y,re,oe,te,me){var be;switch(re){case"gaussian":be=b;break;case"exponential":be=E;break;case"spherical":be=S}var ne,fe,Ce,Te,Ie={t:U,x:q,y:J,z:Y,nugget:0,range:0,sill:0,A:1/3,n:0,model:be},ve=U.length,Ne=G;for(Ne.length=(ve*ve-ve)/2,ne=0,Ce=0;ne<ve;ne++)for(fe=0;fe<ne;fe++,Ce++)Ne[Ce]=Ne[Ce]||[0,0],Ne[Ce][0]=P([q[ne],J[ne],Y[ne]],[q[fe],J[fe],Y[fe]]),Ne[Ce][1]=Math.abs(U[ne]-U[fe]);Ne.sort(function(jo,li){return jo[0]-li[0]}),Ie.range=Ne[(ve*ve-ve)/2-1][0];var Le=(ve*ve-ve)/2>30?30:(ve*ve-ve)/2,Ve=Ie.range/Le,Ye=f(L,Le);Ye.fill(0);var je=f(F,Le);if(je.fill(0),Le<30)for(Te=0;Te<Le;Te++)Ye[Te]=Ne[Te][0],je[Te]=Ne[Te][1];else{for(ne=0,fe=0,Ce=0,Te=0;ne<Le&&fe<(ve*ve-ve)/2;ne++,Ce=0){for(;Ne[fe][0]<=(ne+1)*Ve&&(Ye[Te]+=Ne[fe][0],je[Te]+=Ne[fe][1],Ce++,!(++fe>=(ve*ve-ve)/2)););Ce>0&&(Ye[Te]/=Ce,je[Te]/=Ce,Te++)}if(Te<2)return Ie}ve=Te,Ie.range=Ye[ve-1]-Ye[0];var Gt=f(x,2*ve);Gt.fill(1);var Gn=f(O,ve),ys=Ie.A;for(ne=0;ne<ve;ne++){switch(re){case"gaussian":Gt[2*ne+1]=1-Math.exp(-1/ys*Math.pow(Ye[ne]/Ie.range,2));break;case"exponential":Gt[2*ne+1]=1-Math.exp(-1/ys*Ye[ne]/Ie.range);break;case"spherical":Gt[2*ne+1]=Ye[ne]/Ie.range*1.5-.5*Math.pow(Ye[ne]/Ie.range,3)}Gn[ne]=je[ne]}var tn=function(jo,li,ko,Yu){var Fi,ji,Js=Yu;if(Js.length!==2*li)throw new Error("Z.length !== m * n");for(Fi=0;Fi<li;Fi++)for(ji=0;ji<2;ji++)Js[ji*li+Fi]=jo[2*Fi+ji];return Js}(Gt,ve,0,f(I,2*ve)),We=g(tn,Gt,2,ve,2,f(N,4)),Or=(We=p(We,m(1/te,2,f(A,4)),2,2,f(T,4))).slice(0);_(We,2)?y(We,2):(v(Or,2),We=Or);var nr=g(g(We,tn,2,2,ve,f(k,2*ve)),Gn,2,ve,1,f(B,2));Ie.nugget=nr[0],Ie.sill=nr[1]*Ie.range+Ie.nugget,Ie.n=q.length,ve=q.length;var Jt=f(R,ve*ve);for(ne=0;ne<ve;ne++){for(fe=0;fe<ne;fe++)Jt[ne*ve+fe]=Ie.model(Math.pow(Math.pow(q[ne]-q[fe],2)+Math.pow(J[ne]-J[fe],2),.5),Ie.nugget,Ie.range,Ie.sill,Ie.A),Jt[fe*ve+ne]=Jt[ne*ve+fe];Jt[ne*ve+ne]=Ie.model(0,Ie.nugget,Ie.range,Ie.sill,Ie.A)}var ir=p(Jt,m(oe,ve,f(j,ve*ve)),ve,ve,f(z,ve*ve)),Xu=ir.slice(0);if(_(ir,ve)?y(ir,ve):(v(Xu,ve),ir=Xu),me.length!==ve)throw new Error("mResult.length !== n");return Ie.M=g(ir,U,ve,ve,1,me),Ie};var W=new c.ScalableBuffer,V=new c.ScalableBuffer;C.predict=function(U,q,J,Y){var re,oe=f(W,Y.n);for(re=0;re<Y.n;re++){var te=P([U,q,J],[Y.x[re],Y.y[re],Y.z[re]]);oe[re]=Y.model(te,Y.nugget,Y.range,Y.sill,Y.A)}if(!Y.M)throw new Error("!variogram.M");return g(oe,Y.M,1,Y.n,1,f(V,1))[0]}})(s.Kriging||(s.Kriging={}))},5600:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getExtProp=s.setExtProp=void 0;var a=new WeakMap;s.setExtProp=function(c,f,m){a.has(c)||a.set(c,{}),a.get(c)[f]=m},s.getExtProp=function(c,f){if(a.has(c))return a.get(c)[f]}},5675:function(o,s,a){var c=this&&this.__read||function(g,w){var _=typeof Symbol=="function"&&g[Symbol.iterator];if(!_)return g;var y,h,d=_.call(g),u=[];try{for(;(w===void 0||w-- >0)&&!(y=d.next()).done;)u.push(y.value)}catch(l){h={error:l}}finally{try{y&&!y.done&&(_=d.return)&&_.call(d)}finally{if(h)throw h.error}}return u},f=this&&this.__spreadArray||function(g,w,_){if(_||arguments.length===2)for(var y,h=0,d=w.length;h<d;h++)!y&&h in w||(y||(y=Array.prototype.slice.call(w,0,h)),y[h]=w[h]);return g.concat(y||Array.prototype.slice.call(w))};Object.defineProperty(s,"__esModule",{value:!0}),s.createProcessing=void 0;var m=a(6891),p=a(8196);s.createProcessing=function(g){return new m.ProcessingDeprecated(function(w){for(var _=[],y=1;y<arguments.length;y++)_[y-1]=arguments[y];var h=new p.ProcessingStarter(w);return g.apply(void 0,f([h],c(_),!1)).then(h.complete.bind(h)).catch(h.error.bind(h)),h.cancel.bind(h)})}},5726:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(5675),s),f(a(6891),s),f(a(8196),s),f(a(8055),s),f(a(8995),s),f(a(2601),s)},5745:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.scalableBufferPool=s.ScalableBuffer=void 0;var c=a(3009),f=a(1085);a(3428);var m=function(){function p(){this._arrayBuffer=new ArrayBuffer(1024)}return Object.defineProperty(p.prototype,"byteLength",{get:function(){return this._arrayBuffer.byteLength},enumerable:!1,configurable:!0}),p.prototype.resize=function(g){if(this._arrayBuffer.byteLength<g){var w=(0,c.nextPow2)(g);this._arrayBuffer=ArrayBuffer.transfer(this._arrayBuffer,w)}},Object.defineProperty(p.prototype,"arrayBuffer",{get:function(){return this._arrayBuffer},enumerable:!1,configurable:!0}),p}();s.ScalableBuffer=m,s.scalableBufferPool=new f.ObjPool(function(){return new m})},5774:function(o,s,a){var c=this&&this.__read||function(_,y){var h=typeof Symbol=="function"&&_[Symbol.iterator];if(!h)return _;var d,u,l=h.call(_),v=[];try{for(;(y===void 0||y-- >0)&&!(d=l.next()).done;)v.push(d.value)}catch(b){u={error:b}}finally{try{d&&!d.done&&(h=l.return)&&h.call(l)}finally{if(u)throw u.error}}return v},f=this&&this.__spreadArray||function(_,y,h){if(h||arguments.length===2)for(var d,u=0,l=y.length;u<l;u++)!d&&u in y||(d||(d=Array.prototype.slice.call(y,0,u)),d[u]=y[u]);return _.concat(d||Array.prototype.slice.call(y))};Object.defineProperty(s,"__esModule",{value:!0}),s.SmartListenerPipe=void 0;var m=a(4471),p=a(2452);function g(_,y){return(y=y??new p.SmartListenerHandler)._reset(_,_._cid),y}var w=function(){function _(){}return Object.defineProperty(_.prototype,"_pipe",{get:function(){var y;return this.__pipe=(y=this.__pipe)!==null&&y!==void 0?y:new m.ListenerPipe,this.__pipe},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"empty",{get:function(){return!this.__pipe||this._pipe.empty},enumerable:!1,configurable:!0}),_.prototype.do=function(){for(var y,h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];return(y=this._pipe).do.apply(y,f([],c(h),!1))},_.prototype.isHandlerValid=function(y){return!!y.valid&&this._pipe.isHandlerValid(y._listenerHandler)},_.prototype.moveAfter=function(y,h){if(!y.valid||!h.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(y._listenerHandler,h._listenerHandler)},_.prototype.moveBefore=function(y,h){if(!y.valid||!h.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(y._listenerHandler,h._listenerHandler)},_.prototype.insertBefore=function(y,h,d,u,l){if(u===void 0&&(u=!1),!y.valid)throw new Error("handler is not valid!");return g(this._pipe.insertBefore(y._listenerHandler,h,d,u),l)},_.prototype.insertAfter=function(y,h,d,u,l){if(u===void 0&&(u=!1),!y.valid)throw new Error("handler is not valid!");return g(this._pipe.insertAfter(y._listenerHandler,h,d,u),l)},_.prototype.remove=function(y){if(!y.valid)throw new Error("handler is not valid!");return this._pipe.remove(y._listenerHandler)},_.prototype.removeAll=function(){return this._pipe.removeAll()},_.prototype.push=function(y,h,d,u){return d===void 0&&(d=!1),g(this._pipe.push(y,h,d),u)},_.prototype.pop=function(){return this._pipe.pop()},_.prototype.shift=function(){return this._pipe.shift()},_.prototype.unshift=function(y,h,d,u){return d===void 0&&(d=!1),g(this._pipe.unshift(y,h,d),u)},_.prototype.getTail=function(y){var h=this._pipe.tail;return h?g(h,y):void 0},_.prototype.getHead=function(y){var h=this._pipe.head;return h?g(h,y):void 0},_}();s.SmartListenerPipe=w},5785:function(o,s,a){var c,f=this&&this.__extends||(c=function(l,v){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var S in E)Object.prototype.hasOwnProperty.call(E,S)&&(b[S]=E[S])},c(l,v)},function(l,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function b(){this.constructor=l}c(l,v),l.prototype=v===null?Object.create(v):(b.prototype=v.prototype,new b)}),m=this&&this.__read||function(l,v){var b=typeof Symbol=="function"&&l[Symbol.iterator];if(!b)return l;var E,S,P=b.call(l),C=[];try{for(;(v===void 0||v-- >0)&&!(E=P.next()).done;)C.push(E.value)}catch(x){S={error:x}}finally{try{E&&!E.done&&(b=P.return)&&b.call(P)}finally{if(S)throw S.error}}return C},p=this&&this.__spreadArray||function(l,v,b){if(b||arguments.length===2)for(var E,S=0,P=v.length;S<P;S++)!E&&S in v||(E||(E=Array.prototype.slice.call(v,0,S)),E[S]=v[S]);return l.concat(E||Array.prototype.slice.call(v))};Object.defineProperty(s,"__esModule",{value:!0}),s.createNextAnimateFrameWeakEvent=s.NextAnimateFrameWeakEvent=s.createNextAnimateFrameEvent=s.NextAnimateFrameEvent=s.createNextMicroTaskWeakEvent=s.NextMicroTaskWeakEvent=s.createNextMicroTaskEvent=s.NextMicroTaskEvent=void 0;var g=a(4899),w=a(6558),_=function(l){function v(b,E){for(var S=[],P=2;P<arguments.length;P++)S[P-2]=arguments[P];var C=l.call(this)||this;return C._nextFunc=b,C.dispose(function(){C._cancellFunc&&(C._cancellFunc(),C._cancellFunc=void 0)}),S.forEach(function(x){return C.dispose(x[E?"dwon":"don"](function(){C.next()}))}),C}return f(v,l),v.prototype.next=function(){var b=this;this._cancellFunc||(this._cancellFunc=this._nextFunc(function(){return b._cancellFunc=void 0,b.emit()}))},v.prototype.flush=function(){this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0,this.emit())},v}(g.Event),y=function(l){function v(){for(var b=[],E=0;E<arguments.length;E++)b[E]=arguments[E];return l.apply(this,p([w.nextMicroTask,!1],m(b),!1))||this}return f(v,l),v}(_);s.NextMicroTaskEvent=y,s.createNextMicroTaskEvent=function(){for(var l=[],v=0;v<arguments.length;v++)l[v]=arguments[v];return new(y.bind.apply(y,p([void 0],m(l),!1)))};var h=function(l){function v(){for(var b=[],E=0;E<arguments.length;E++)b[E]=arguments[E];return l.apply(this,p([w.nextMicroTask,!0],m(b),!1))||this}return f(v,l),v}(_);s.NextMicroTaskWeakEvent=h,s.createNextMicroTaskWeakEvent=function(){for(var l=[],v=0;v<arguments.length;v++)l[v]=arguments[v];return new(y.bind.apply(y,p([void 0],m(l),!1)))};var d=function(l){function v(){for(var b=[],E=0;E<arguments.length;E++)b[E]=arguments[E];return l.apply(this,p([w.nextAnimateFrame,!1],m(b),!1))||this}return f(v,l),v}(_);s.NextAnimateFrameEvent=d,s.createNextAnimateFrameEvent=function(){for(var l=[],v=0;v<arguments.length;v++)l[v]=arguments[v];return new(d.bind.apply(d,p([void 0],m(l),!1)))};var u=function(l){function v(){for(var b=[],E=0;E<arguments.length;E++)b[E]=arguments[E];return l.apply(this,p([w.nextAnimateFrame,!0],m(b),!1))||this}return f(v,l),v}(_);s.NextAnimateFrameWeakEvent=u,s.createNextAnimateFrameWeakEvent=function(){for(var l=[],v=0;v<arguments.length;v++)l[v]=arguments[v];return new(u.bind.apply(u,p([void 0],m(l),!1)))}},5819:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(9651),s),f(a(921),s),f(a(1148),s),f(a(1101),s),f(a(4206),s)},5873:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Ray=void 0;var c,f=a(9898);(c=s.Ray||(s.Ray={})).getOrigin=function(m,p){return f.Vector.set(p,m[0],m[1],m[2])},c.getDirection=function(m,p){return f.Vector.set(p,m[3],m[4],m[5])}},5925:function(o,s,a){var c,f=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(h[u]=d[u])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function h(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(h.prototype=y.prototype,new h)});Object.defineProperty(s,"__esModule",{value:!0}),s.GifProcessing=void 0;var m=a(7029),p=a(7372),g=a(8106),w=function(_){function y(h,d){var u=_.call(this)||this;return u._complexImage=h,u._imageUri=d,u._gif=u.disposeVar(new m.Gif),u._update=u.disposeVar((0,g.createAnimateFrameWithStartValues)(function(){return u.update()})),u._updateStart=u._update.start(),u._gif.url=u._imageUri,u}return f(y,_),Object.defineProperty(y.prototype,"gif",{get:function(){return this._gif},enumerable:!1,configurable:!0}),y.prototype.update=function(){var h=this,d=this._gif.player;if(d.gifFrames){var u,l=this._complexImage,v=d.gifCanvas,b=v.width,E=v.height;l.size=[b,E],l.pixelFormat="RGBA",l.copyTexture({source:d.gifCanvas}),(u=function(){d.autoPlayOnLoad=h._complexImage.autoplay})(),this.dispose(this._complexImage.autoplayChanged.disposableOn(u)),(u=function(){d.loop=h._complexImage.loop})(),this.dispose(this._complexImage.loopChanged.disposableOn(u))}},y}(p.Destroyable);s.GifProcessing=w},5985:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Vector3=void 0;var c,f=a(2731),m=a(9898);(c=s.Vector3||(s.Vector3={})).cross=function(p,g,w){var _=p[0],y=p[1],h=p[2],d=g[0],u=g[1],l=g[2],v=y*l-h*u,b=h*d-_*l,E=_*u-y*d;return m.Vector.set(w,v,b,E)},c.getOrthogonalityVector=function(p,g,w,_){if(!m.Vector.isNormalized(p))throw new Error("!Vector.isNormalized(constVector)");if(!(w=m.Vector.isNormalized(g)?m.Vector.clone(g,w):m.Vector.normalize(g,w)))throw new Error("vectorToFix is [0, 0, 0]!");return w=c.cross(p,w,w),m.Vector.normalize(w,w),_&&m.Vector.clone(w,_),c.cross(w,p,w),m.Vector.normalize(w,w)},c.UNIT_X=Object.freeze([1,0,0]),c.UNIT_Y=Object.freeze([0,1,0]),c.UNIT_Z=Object.freeze([0,0,1]),c.ZERO=Object.freeze([0,0,0]),c.ONE=Object.freeze([1,1,1]),c.SCRATCH0=(0,f.createNumbers)(3),c.SCRATCH1=(0,f.createNumbers)(3),c.SCRATCH2=(0,f.createNumbers)(3),c.SCRATCH3=(0,f.createNumbers)(3),c.SCRATCH4=(0,f.createNumbers)(3),c.SCRATCH5=(0,f.createNumbers)(3),c.SCRATCH6=(0,f.createNumbers)(3),c.SCRATCH7=(0,f.createNumbers)(3),c.SCRATCH8=(0,f.createNumbers)(3),c.SCRATCH9=(0,f.createNumbers)(3)},5986:function(o,s,a){var c=this&&this.__read||function(g,w){var _=typeof Symbol=="function"&&g[Symbol.iterator];if(!_)return g;var y,h,d=_.call(g),u=[];try{for(;(w===void 0||w-- >0)&&!(y=d.next()).done;)u.push(y.value)}catch(l){h={error:l}}finally{try{y&&!y.done&&(_=d.return)&&_.call(d)}finally{if(h)throw h.error}}return u},f=this&&this.__values||function(g){var w=typeof Symbol=="function"&&Symbol.iterator,_=w&&g[w],y=0;if(_)return _.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&y>=g.length&&(g=void 0),{value:g&&g[y++],done:!g}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.extendClassProps=void 0;var m=a(3915);function p(g,w,_,y){var h=g;if(!h[w]){var d=y(),u=Object.fromEntries(Object.entries(d).filter(function(l){var v=c(l,2),b=v[0],E=v[1],S=b in Object.getPrototypeOf(_);if(S){var P=E instanceof m.ReactiveVariable?E.value:E;g[b]=P}return!S}).map(function(l){var v=c(l,2),b=v[0],E=v[1];return E instanceof m.ReactiveVariable?[b,E]:[b,Array.isArray(E)?(0,m.reactArrayWithUndefined)(E):(0,m.react)(E)]}));h[w]=u}return h[w]}s.extendClassProps=function(g,w){var _,y,h,d=Symbol("".concat((h=g==null?void 0:g.constructor)===null||h===void 0?void 0:h.name,"-createDefaultProps"));g.constructor.__xbsj_dpSymbol=d,g.constructor.__xbsj_createDefaultProps=w;var u=function(S,P){var C;if(!Reflect.has(g,S)){var x=function(O){var I,N;if(!O[d]){for(var T=[],R=Object.getPrototypeOf(O);R;)T.push(R),R=Object.getPrototypeOf(R);T.reverse();try{for(var A=f(T),B=A.next();!B.done;B=A.next()){var k=B.value,z=k.constructor.__xbsj_dpSymbol;if(z){var j=k.constructor.__xbsj_createDefaultProps;j&&p(O,z,k,j)}}}catch(L){I={error:L}}finally{try{B&&!B.done&&(N=A.return)&&N.call(A)}finally{if(I)throw I.error}}}};Object.defineProperties(g,((C={})[S]={get:function(){return x(this),p(this,d,g,w)[S].value},set:function(O){x(this);var I=p(this,d,g,w)[S];I||console.error("!propObj"),I.value=O}},C["".concat(S,"Changed")]={get:function(){return x(this),p(this,d,g,w)[S].changed}},C["".concat(S,"React")]={get:function(){return x(this),p(this,d,g,w)[S]}},C))}};try{for(var l=f(Object.entries(w())),v=l.next();!v.done;v=l.next()){var b=c(v.value,2),E=b[0];b[1],u(E)}}catch(S){_={error:S}}finally{try{v&&!v.done&&(y=l.return)&&y.call(l)}finally{if(_)throw _.error}}}},6021:function(o,s,a){var c=this&&this.__read||function(h,d){var u=typeof Symbol=="function"&&h[Symbol.iterator];if(!u)return h;var l,v,b=u.call(h),E=[];try{for(;(d===void 0||d-- >0)&&!(l=b.next()).done;)E.push(l.value)}catch(S){v={error:S}}finally{try{l&&!l.done&&(u=b.return)&&u.call(b)}finally{if(v)throw v.error}}return E};Object.defineProperty(s,"__esModule",{value:!0}),s._continuousMultiply=s._multiplyByPoint=s._affineMultiplyByPoint=s._multiplyByPointAsVector=s._multiplyByVector=s._multiplyByScale=s._multiplyByUniformScale=s._multiplyByTranslation=s._multiplyByMatrix3=s._multiplyTransformation=s._multiply=void 0;var f=a(2731),m=a(9898);function p(h,d,u){var l=h[0],v=h[1],b=h[2],E=h[3],S=h[4],P=h[5],C=h[6],x=h[7],O=h[8],I=h[9],N=h[10],T=h[11],R=h[12],A=h[13],B=h[14],k=h[15],z=d[0],j=d[1],L=d[2],F=d[3],G=d[4],W=d[5],V=d[6],U=d[7],q=d[8],J=d[9],Y=d[10],re=d[11],oe=d[12],te=d[13],me=d[14],be=d[15],ne=l*z+S*j+O*L+R*F,fe=v*z+P*j+I*L+A*F,Ce=b*z+C*j+N*L+B*F,Te=E*z+x*j+T*L+k*F,Ie=l*G+S*W+O*V+R*U,ve=v*G+P*W+I*V+A*U,Ne=b*G+C*W+N*V+B*U,Le=E*G+x*W+T*V+k*U,Ve=l*q+S*J+O*Y+R*re,Ye=v*q+P*J+I*Y+A*re,je=b*q+C*J+N*Y+B*re,Gt=E*q+x*J+T*Y+k*re,Gn=l*oe+S*te+O*me+R*be,ys=v*oe+P*te+I*me+A*be,tn=b*oe+C*te+N*me+B*be,We=E*oe+x*te+T*me+k*be;return(u=u||(0,f.createNumbers)(16))[0]=ne,u[1]=fe,u[2]=Ce,u[3]=Te,u[4]=Ie,u[5]=ve,u[6]=Ne,u[7]=Le,u[8]=Ve,u[9]=Ye,u[10]=je,u[11]=Gt,u[12]=Gn,u[13]=ys,u[14]=tn,u[15]=We,u}s._multiply=p,s._multiplyTransformation=function(h,d,u){var l=h[0],v=h[1],b=h[2],E=h[4],S=h[5],P=h[6],C=h[8],x=h[9],O=h[10],I=h[12],N=h[13],T=h[14],R=d[0],A=d[1],B=d[2],k=d[4],z=d[5],j=d[6],L=d[8],F=d[9],G=d[10],W=d[12],V=d[13],U=d[14],q=l*R+E*A+C*B,J=v*R+S*A+x*B,Y=b*R+P*A+O*B,re=l*k+E*z+C*j,oe=v*k+S*z+x*j,te=b*k+P*z+O*j,me=l*L+E*F+C*G,be=v*L+S*F+x*G,ne=b*L+P*F+O*G,fe=l*W+E*V+C*U+I,Ce=v*W+S*V+x*U+N,Te=b*W+P*V+O*U+T;return(u=u||(0,f.createNumbers)(16))[0]=q,u[1]=J,u[2]=Y,u[3]=0,u[4]=re,u[5]=oe,u[6]=te,u[7]=0,u[8]=me,u[9]=be,u[10]=ne,u[11]=0,u[12]=fe,u[13]=Ce,u[14]=Te,u[15]=1,u},s._multiplyByMatrix3=function(h,d,u){var l=h[0],v=h[1],b=h[2],E=h[4],S=h[5],P=h[6],C=h[8],x=h[9],O=h[10],I=d[0],N=d[1],T=d[2],R=d[3],A=d[4],B=d[5],k=d[6],z=d[7],j=d[8],L=l*I+E*N+C*T,F=v*I+S*N+x*T,G=b*I+P*N+O*T,W=l*R+E*A+C*B,V=v*R+S*A+x*B,U=b*R+P*A+O*B,q=l*k+E*z+C*j,J=v*k+S*z+x*j,Y=b*k+P*z+O*j;return(u=u||(0,f.createNumbers)(16))[0]=L,u[1]=F,u[2]=G,u[3]=0,u[4]=W,u[5]=V,u[6]=U,u[7]=0,u[8]=q,u[9]=J,u[10]=Y,u[11]=0,u[12]=h[12],u[13]=h[13],u[14]=h[14],u[15]=h[15],u},s._multiplyByTranslation=function(h,d,u){var l=d[0],v=d[1],b=d[2],E=l*h[0]+v*h[4]+b*h[8]+h[12],S=l*h[1]+v*h[5]+b*h[9]+h[13],P=l*h[2]+v*h[6]+b*h[10]+h[14];return(u=u||(0,f.createNumbers)(16))[0]=h[0],u[1]=h[1],u[2]=h[2],u[3]=h[3],u[4]=h[4],u[5]=h[5],u[6]=h[6],u[7]=h[7],u[8]=h[8],u[9]=h[9],u[10]=h[10],u[11]=h[11],u[12]=E,u[13]=S,u[14]=P,u[15]=h[15],u};var g=(0,f.createNumbers)(3);function w(h,d,u){if(h[15]!==1)throw new Error("_multiplyByScale error: it should be affine matrix!");var l=d[0],v=d[1],b=d[2];return u=u||(0,f.createNumbers)(16),l===1&&v===1&&b===1?h!==u?m.Vector.clone(h,u):h:(u[0]=l*h[0],u[1]=l*h[1],u[2]=l*h[2],u[3]=0,u[4]=v*h[4],u[5]=v*h[5],u[6]=v*h[6],u[7]=0,u[8]=b*h[8],u[9]=b*h[9],u[10]=b*h[10],u[11]=0,u[12]=h[12],u[13]=h[13],u[14]=h[14],u[15]=1,u)}function _(h,d,u){var l=d[0],v=d[1],b=d[2],E=d[3],S=h[0]*l+h[4]*v+h[8]*b+h[12]*E,P=h[1]*l+h[5]*v+h[9]*b+h[13]*E,C=h[2]*l+h[6]*v+h[10]*b+h[14]*E,x=h[3]*l+h[7]*v+h[11]*b+h[15]*E;return(u=u||(0,f.createNumbers)(4))[0]=S,u[1]=P,u[2]=C,u[3]=x,u}s._multiplyByUniformScale=function(h,d,u){return g[0]=d,g[1]=d,g[2]=d,w(h,g,u)},s._multiplyByScale=w,s._multiplyByVector=_,s._multiplyByPointAsVector=function(h,d,u){var l=d[0],v=d[1],b=d[2],E=h[0]*l+h[4]*v+h[8]*b,S=h[1]*l+h[5]*v+h[9]*b,P=h[2]*l+h[6]*v+h[10]*b;return(u=u||(0,f.createNumbers)(3))[0]=E,u[1]=S,u[2]=P,u},s._affineMultiplyByPoint=function(h,d,u){if(h[15]!==1)throw new Error("matrix[15] !== 1");var l=d[0],v=d[1],b=d[2],E=h[0]*l+h[4]*v+h[8]*b+h[12],S=h[1]*l+h[5]*v+h[9]*b+h[13],P=h[2]*l+h[6]*v+h[10]*b+h[14];return(u=u||(0,f.createNumbers)(3))[0]=E,u[1]=S,u[2]=P,u};var y=(0,f.createNumbers)(4);s._multiplyByPoint=function(h,d,u){m.Vector.set(y,d[0],d[1],d[2],1),_(h,y,y),u=u||(0,f.createNumbers)(3);var l=c(m.Vector.itr(y),4),v=l[0],b=l[1],E=l[2],S=l[3];return m.Vector.set(u,v/S,b/S,E/S),u},s._continuousMultiply=function(h,d){for(var u=[],l=2;l<arguments.length;l++)u[l-2]=arguments[l];var v=u.length;h!==d&&m.Vector.clone(d,h);for(var b=0;b<v;++b)Array.isArray(u[b])&&typeof u[b][0]=="function"?(0,u[b][0])(h,u[b][1],h):u[b].length===16&&p(h,u[b],h);return h}},6138:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.reduce=void 0;var c=a(8144);s.reduce=function(f,m,p){for(var g=(0,c.getIterator)(f),w=p,_=0;;){var y=g.next(),h=y.done,d=y.value;if(h)break;w=m(w,d,_++)}return w}},6148:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)}),m=this&&this.__read||function(h,d){var u=typeof Symbol=="function"&&h[Symbol.iterator];if(!u)return h;var l,v,b=u.call(h),E=[];try{for(;(d===void 0||d-- >0)&&!(l=b.next()).done;)E.push(l.value)}catch(S){v={error:S}}finally{try{l&&!l.done&&(u=b.return)&&u.call(b)}finally{if(v)throw v.error}}return E},p=this&&this.__spreadArray||function(h,d,u){if(u||arguments.length===2)for(var l,v=0,b=d.length;v<b;v++)!l&&v in d||(l||(l=Array.prototype.slice.call(d,0,v)),l[v]=d[v]);return h.concat(l||Array.prototype.slice.call(d))};Object.defineProperty(s,"__esModule",{value:!0}),s.DebouncingWithStartValues=s.Debouncing=void 0;var g=a(1662),w=a(1148),_=function(h){function d(){var u=h.call(this,function(l,v,b){var E=l.errorFunc;try{var S=m((0,g.debounce)(v,b),2),P=S[0],C=S[1];return u._doFunc=P,C}catch(x){return E(x),function(){}}})||this;return u}return f(d,h),d.prototype.do=function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];this._doFunc&&this._doFunc.apply(this,p([],m(u),!1))},d}(w.Processing);s.Debouncing=_;var y=function(h){function d(u,l){var v=h.call(this,function(b){var E=b.errorFunc;try{var S=m((0,g.debounce)(u,l),2),P=S[0],C=S[1];return v._doFunc=P,C}catch(x){return E(x),function(){}}})||this;return v}return f(d,h),d.prototype.do=function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];this._doFunc&&this._doFunc.apply(this,p([],m(u),!1))},d}(w.Processing);s.DebouncingWithStartValues=y},6172:function(o,s,a){var c=this&&this.__read||function(y,h){var d=typeof Symbol=="function"&&y[Symbol.iterator];if(!d)return y;var u,l,v=d.call(y),b=[];try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)b.push(u.value)}catch(E){l={error:E}}finally{try{u&&!u.done&&(d=v.return)&&d.call(v)}finally{if(l)throw l.error}}return b},f=this&&this.__spreadArray||function(y,h,d){if(d||arguments.length===2)for(var u,l=0,v=h.length;l<v;l++)!u&&l in h||(u||(u=Array.prototype.slice.call(h,0,l)),u[l]=h[l]);return y.concat(u||Array.prototype.slice.call(h))};Object.defineProperty(s,"__esModule",{value:!0}),s.OrientedBoundingBox=void 0;var m=a(2731),p=a(9898),g=a(7215),w=a(312),_=a(4915);(function(y){function h(P,C){return C=C||(0,m.createNumbers)(3),p.Vector.set(C,P[0],P[1],P[2]),C}function d(P,C){C=C||(0,m.createNumbers)(9);var x=P;return p.Vector.set(C,x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11]),C}y.getCenter=h,y.getHalfAxes=d,y.setCenter=function(P,C){for(var x=0;x<3;++x)P[x]=C[x];return P},y.setHalfAxes=function(P,C){for(var x=0;x<9;++x)P[x+3]=C[x];return P};var u=(0,m.createNumbers)(3),l=(0,m.createNumbers)(9);y.getModelMatrix=function(P,C){var x=d(P,l),O=h(P,u);return p.Vector.set(C,x[0],x[1],x[2],0,x[3],x[4],x[5],0,x[6],x[7],x[8],0,O[0],O[1],O[2],1)};var v=(0,m.createNumbers)(3),b=(0,m.createNumbers)(3),E=(0,m.createNumbers)(9);y.intersectPlane=function(P,C){var x=h(P,v),O=g.Plane.getNormal(C,b),I=g.Plane.getDistance(C),N=d(P,E),T=O[0],R=O[1],A=O[2],B=Math.abs(T*N[0]+R*N[1]+A*N[2])+Math.abs(T*N[3]+R*N[4]+A*N[5])+Math.abs(T*N[6]+R*N[7]+A*N[8]),k=p.Vector.dot(O,x)+I;return k<=-B?w.Intersect.OUTSIDE:k>=B?w.Intersect.INSIDE:w.Intersect.INTERSECTING};var S=(0,m.createNumbers)(3);y.getBoundingSphere=function(P,C){C=C||(0,m.createNumbers)(4);var x=d(P,E),O=_.Matrix3.getScale(x,S),I=Math.max.apply(Math,f([],c(p.Vector.itr(O)),!1));return C[0]=P[0],C[1]=P[1],C[2]=P[2],C[3]=I,C}})(s.OrientedBoundingBox||(s.OrientedBoundingBox={}))},6270:function(o,s,a){var c=this&&this.__read||function(_,y){var h=typeof Symbol=="function"&&_[Symbol.iterator];if(!h)return _;var d,u,l=h.call(_),v=[];try{for(;(y===void 0||y-- >0)&&!(d=l.next()).done;)v.push(d.value)}catch(b){u={error:b}}finally{try{d&&!d.done&&(h=l.return)&&h.call(l)}finally{if(u)throw u.error}}return v},f=this&&this.__spreadArray||function(_,y,h){if(h||arguments.length===2)for(var d,u=0,l=y.length;u<l;u++)!d&&u in y||(d||(d=Array.prototype.slice.call(y,0,u)),d[u]=y[u]);return _.concat(d||Array.prototype.slice.call(y))};Object.defineProperty(s,"__esModule",{value:!0}),s.ColorStops=void 0;var m=a(3281),p=a(7372),g=[0,0,0,0],w=function(){function _(){this._value=[],this._valueStr="[]",this.value=[{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]}]}return Object.defineProperty(_.prototype,"valueChanged",{get:function(){return this._valueChanged||(this._valueChanged=new p.Event),this._valueChanged},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"value",{get:function(){return JSON.parse(JSON.stringify(this._value))},set:function(y){if(y.length!==0){var h;if(this._value.length===y.length){var d=f([],c(y),!1).sort(function(l,v){return l.ratio-v.ratio});if(h=JSON.stringify(d),this._valueStr===h)return}h=h||JSON.stringify(f([],c(y),!1).sort(function(l,v){return l.ratio-v.ratio}));var u=this._value;if(this._value=JSON.parse(h),this._value.length===0)throw console.error("this._colorStops.length === 0"),new Error("this._colorStops.length === 0");this._valueChanged&&this._valueChanged.emit(this._value,u)}else console.error("value.length === 0")},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"valueStr",{get:function(){return this._valueStr},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"minRatio",{get:function(){return this._value[0].ratio},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"maxRatio",{get:function(){return this._value[this._value.length-1].ratio},enumerable:!1,configurable:!0}),_.prototype._getRatioIndex=function(y){if(y<this._value[0].ratio||y>this._value[this._value.length-1].ratio)throw console.error("ratio <= this._colorStops[0].ratio || ratio >= this._colorStops[this._colorStops.length - 1].ratio"),new Error("ratio <= this._colorStops[0].ratio || ratio >= this._colorStops[this._colorStops.length - 1].ratio");for(var h=this._value.length,d=0;d<h-1;++d)if(y>=this._value[d].ratio&&y<=this._value[d+1].ratio)return d;throw console.error("shoud not be here!"),new Error("shoud not be here!")},_.prototype.getRatioColor=function(y,h){y=(0,m.clamp)(y,this.minRatio,this.maxRatio);for(var d=this._getRatioIndex(y),u=this._value[d],l=this._value[d+1],v=(y-u.ratio)/(l.ratio-u.ratio),b=0;b<4;++b)h[b]=u.rgba[b]*(1-v)+l.rgba[b]*v;if(!h.some(Number.isNaN))return h;console.error("result NaN")},_.prototype.getColorsInUint8=function(y){if(y.length%4!=0)throw console.error("result.length % 4 !== 0"),new Error("result.length % 4 !== 0");for(var h=y.length/4,d=1/h,u=0;u<h;++u){var l=g;this.getRatioColor((u+.5)*d,l)||l.splice(0,4,0,0,0,0);for(var v=0;v<4;++v)y[4*u+v]=255*l[v]|0}return y},_}();s.ColorStops=w},6301:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.forEachWithBreak=void 0;var c=a(8144);s.forEachWithBreak=function(f,m){for(var p=!1,g=(0,c.getIterator)(f),w=-1;;){var _=g.next(),y=_.done,h=_.value;if(y)break;if(m(h,++w)){p=!0;break}}return p}},6356:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(2429),s),f(a(3639),s),f(a(6613),s),f(a(6270),s),f(a(2127),s),f(a(4621),s),f(a(8106),s),f(a(6405),s),f(a(5819),s),f(a(1148),s),f(a(2220),s),f(a(3815),s),f(a(2243),s),f(a(8576),s),f(a(8453),s),f(a(4990),s),f(a(172),s),f(a(2075),s),f(a(7529),s),f(a(1412),s),f(a(8997),s),f(a(8421),s),f(a(2789),s),f(a(985),s),f(a(9412),s),f(a(7029),s)},6362:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.min=s.max=void 0;var c=a(6138);s.max=function(f){return(0,c.reduce)(f,function(m,p){return m>p?m:p},Number.NEGATIVE_INFINITY)},s.min=function(f){return(0,c.reduce)(f,function(m,p){return m<p?m:p},Number.POSITIVE_INFINITY)}},6405:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(109),s),f(a(2921),s),f(a(5544),s),f(a(2002),s),f(a(2811),s),f(a(6946),s),f(a(643),s)},6424:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.vertexArrayToBezierSpline3Positions=void 0;var c=a(8466),f=(0,c.computBezierSpline3BaseFactors)(20);s.vertexArrayToBezierSpline3Positions=function(m,p,g,w){var _,y,h=m.length;if(h<=1)return m.map(function(N){return N.position});for(var d=w===20?f:(0,c.computBezierSpline3BaseFactors)(w),u=g?h:h-1,l=new Array(u*w+1),v=0;v<u;++v){var b=m[v],E=m[v+1===h?0:v+1],S=b.position,P=(_=b.rightPosition)!==null&&_!==void 0?_:b.position,C=(y=E.leftPosition)!==null&&y!==void 0?y:E.position,x=E.position,O=v*w;l[O]=S;for(var I=1;I<w;++I)l[O+I]=(0,c.bezierSpline3WithBaseFactor)(d[I],p,S,P,C,x)}return l[u*w]=m[g?0:h-1].position,l}},6432:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.isBase64Uri=s.isAbsoluteUri=void 0,s.isAbsoluteUri=function(a){return a.startsWith("http:")||a.startsWith("https:")},s.isBase64Uri=function(a){return a.startsWith("data:")}},6469:function(o,s){var a=this&&this.__awaiter||function(f,m,p,g){return new(p||(p=Promise))(function(w,_){function y(u){try{d(g.next(u))}catch(l){_(l)}}function h(u){try{d(g.throw(u))}catch(l){_(l)}}function d(u){var l;u.done?w(u.value):(l=u.value,l instanceof p?l:new p(function(v){v(l)})).then(y,h)}d((g=g.apply(f,m||[])).next())})},c=this&&this.__generator||function(f,m){var p,g,w,_,y={label:0,sent:function(){if(1&w[0])throw w[1];return w[1]},trys:[],ops:[]};return _={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function h(d){return function(u){return function(l){if(p)throw new TypeError("Generator is already executing.");for(;_&&(_=0,l[0]&&(y=0)),y;)try{if(p=1,g&&(w=2&l[0]?g.return:l[0]?g.throw||((w=g.return)&&w.call(g),0):g.next)&&!(w=w.call(g,l[1])).done)return w;switch(g=0,w&&(l=[2&l[0],w.value]),l[0]){case 0:case 1:w=l;break;case 4:return y.label++,{value:l[1],done:!1};case 5:y.label++,g=l[1],l=[0];continue;case 7:l=y.ops.pop(),y.trys.pop();continue;default:if(!((w=(w=y.trys).length>0&&w[w.length-1])||l[0]!==6&&l[0]!==2)){y=0;continue}if(l[0]===3&&(!w||l[1]>w[0]&&l[1]<w[3])){y.label=l[1];break}if(l[0]===6&&y.label<w[1]){y.label=w[1],w=l;break}if(w&&y.label<w[2]){y.label=w[2],y.ops.push(l);break}w[2]&&y.ops.pop(),y.trys.pop();continue}l=m.call(f,y)}catch(v){l=[6,v],g=0}finally{p=w=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([d,u])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.fetchImage=void 0,s.fetchImage=function(f,m){return m===void 0&&(m=""),a(this,void 0,void 0,function(){return c(this,function(p){return[2,new Promise(function(g,w){var _=new Image;_.crossOrigin=m,_.src=f,_.onload=function(){return g(_)},_.onerror=function(y){return w(y)}})]})})}},6555:function(o,s,a){var c,f=this&&this.__extends||(c=function(p,g){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,_){w.__proto__=_}||function(w,_){for(var y in _)Object.prototype.hasOwnProperty.call(_,y)&&(w[y]=_[y])},c(p,g)},function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function w(){this.constructor=p}c(p,g),p.prototype=g===null?Object.create(g):(w.prototype=g.prototype,new w)});Object.defineProperty(s,"__esModule",{value:!0}),s.HasOwner=void 0;var m=function(p){function g(w){var _=p.call(this)||this;return _._owner=w,_}return f(g,p),Object.defineProperty(g.prototype,"owner",{get:function(){return this._owner},enumerable:!1,configurable:!0}),g}(a(9359).Destroyable);s.HasOwner=m},6558:function(o,s){var a=this&&this.__read||function(f,m){var p=typeof Symbol=="function"&&f[Symbol.iterator];if(!p)return f;var g,w,_=p.call(f),y=[];try{for(;(m===void 0||m-- >0)&&!(g=_.next()).done;)y.push(g.value)}catch(h){w={error:h}}finally{try{g&&!g.done&&(p=_.return)&&p.call(_)}finally{if(w)throw w.error}}return y},c=this&&this.__spreadArray||function(f,m,p){if(p||arguments.length===2)for(var g,w=0,_=m.length;w<_;w++)!g&&w in m||(g||(g=Array.prototype.slice.call(m,0,w)),g[w]=m[w]);return f.concat(g||Array.prototype.slice.call(m))};Object.defineProperty(s,"__esModule",{value:!0}),s.nextMicroTask=s.nextAnimateFrame=s.animateFrame=s.timeout=s.interval=void 0,s.interval=function(f,m){for(var p=[],g=2;g<arguments.length;g++)p[g-2]=arguments[g];var w=setInterval.apply(void 0,c([f,m],a(p),!1));return function(){return clearInterval(w)}},s.timeout=function(f,m){for(var p=[],g=2;g<arguments.length;g++)p[g-2]=arguments[g];var w=setTimeout.apply(void 0,c([f,m],a(p),!1));return function(){return clearTimeout(w)}},s.animateFrame=function(f){for(var m,p=[],g=1;g<arguments.length;g++)p[g-1]=arguments[g];var w=function(){var _=performance.now();f.apply(void 0,c([_],a(p),!1)),m=requestAnimationFrame(w)};return w(),function(){return m!==void 0&&(cancelAnimationFrame(m),m=void 0)}},s.nextAnimateFrame=function(f){for(var m,p=[],g=1;g<arguments.length;g++)p[g-1]=arguments[g];return m=requestAnimationFrame(function(){var w=performance.now();f.apply(void 0,c([w],a(p),!1))}),function(){return m!==void 0&&(cancelAnimationFrame(m),m=void 0)}},s.nextMicroTask=function(f){for(var m=[],p=1;p<arguments.length;p++)m[p-1]=arguments[p];var g,w=!1;return new Promise(function(_,y){g=y,_()}).then(function(){!w&&f.apply(void 0,c([],a(m),!1))}).catch(function(_){console.error(_)}),function(){return(w=!0)&&g&&(g("nextMicroTask cancelled!"),g=void 0)}}},6583:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.oneTimeWarning=void 0;var a=new Set;s.oneTimeWarning=function(c,f){f===void 0&&(f=c),a.has(f)||(a.add(f),console.warn(c))}},6613:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0})},6655:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getPaddingByteLength=void 0,s.getPaddingByteLength=function(a,c){return c!==1&&c!==2&&c!==4&&c!==8&&console.warn("getPaddingByteLength boundaryByteLength(".concat(c,") is not 2^")),(c-a%c)%c}},6680:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s._fromDirectionUpRightAndTranslation=s._fromMatrix3AndTranslation=s._fromTranslation=void 0;var c=a(2731),f=a(9898),m=a(5985);s._fromTranslation=function(p,g){return(g=g||(0,c.createNumbers)(16))[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=p[0],g[13]=p[1],g[14]=p[2],g[15]=1,g},s._fromMatrix3AndTranslation=function(p,g,w){return g=g||m.Vector3.ZERO,(w=w||(0,c.createNumbers)(16))[0]=p[0],w[1]=p[1],w[2]=p[2],w[3]=0,w[4]=p[3],w[5]=p[4],w[6]=p[5],w[7]=0,w[8]=p[6],w[9]=p[7],w[10]=p[8],w[11]=0,w[12]=g[0],w[13]=g[1],w[14]=g[2],w[15]=1,w},s._fromDirectionUpRightAndTranslation=function(p,g,w,_,y){var h=_??m.Vector3.ZERO;return f.Vector.set(y,w[0],w[1],w[2],0,g[0],g[1],g[2],0,-p[0],-p[1],-p[2],0,h[0],h[1],h[2],1)}},6888:function(o,s,a){var c=this&&this.__read||function(w,_){var y=typeof Symbol=="function"&&w[Symbol.iterator];if(!y)return w;var h,d,u=y.call(w),l=[];try{for(;(_===void 0||_-- >0)&&!(h=u.next()).done;)l.push(h.value)}catch(v){d={error:v}}finally{try{h&&!h.done&&(y=u.return)&&y.call(u)}finally{if(d)throw d.error}}return l},f=this&&this.__spreadArray||function(w,_,y){if(y||arguments.length===2)for(var h,d=0,u=_.length;d<u;d++)!h&&d in _||(h||(h=Array.prototype.slice.call(_,0,d)),h[d]=_[d]);return w.concat(h||Array.prototype.slice.call(_))};Object.defineProperty(s,"__esModule",{value:!0}),s.createAnimateFrameWithStartValues=s.createAnimateFrame=s.createIntervalWithStartValues=s.createInterval=s.createTimeoutWithStartValues=s.createTimeout=s.createNextMicroTaskWithStartValues=s.createNextMicroTask=s.createNextAnimateFrameWithStartValues=s.createNextAnimateFrame=void 0;var m=a(1662),p=a(5819);function g(w,_){for(var y=[],h=2;h<arguments.length;h++)y[h-2]=arguments[h];try{return _.apply(void 0,f([],c(y),!1))}catch(d){w(d)}}s.createNextAnimateFrame=function(){return new p.Processing(function(w,_){var y=w.completeFunc,h=w.errorFunc;return(0,m.nextAnimateFrame)(function(){return g(h,function(){_&&_(),y()})})})},s.createNextAnimateFrameWithStartValues=function(w){return new p.Processing(function(_){var y=_.completeFunc,h=_.errorFunc;return(0,m.nextAnimateFrame)(function(){return g(h,function(){w&&w(),y()})})})},s.createNextMicroTask=function(){return new p.Processing(function(w,_){var y=w.completeFunc,h=w.errorFunc;return(0,m.nextMicroTask)(function(){g(h,function(){_&&_(),y()})})})},s.createNextMicroTaskWithStartValues=function(w){return new p.Processing(function(_){var y=_.completeFunc,h=_.errorFunc;return(0,m.nextMicroTask)(function(){g(h,function(){w&&w(),y()})})})},s.createTimeout=function(){return new p.Processing(function(w,_,y){var h=w.completeFunc,d=w.errorFunc;return(0,m.timeout)(function(){g(d,function(){_&&_(),h()})},y??1e3)})},s.createTimeoutWithStartValues=function(w,_){return new p.Processing(function(y){var h=y.completeFunc,d=y.errorFunc;return(0,m.timeout)(function(){g(d,function(){w&&w(),h()})},_??1e3)})},s.createInterval=function(){return new p.Processing(function(w,_,y){var h=w.errorFunc;return y===void 0&&(y=1e3),(0,m.interval)(function(){return g(h,_)},y)})},s.createIntervalWithStartValues=function(w,_){return _===void 0&&(_=1e3),new p.Processing(function(y){var h=y.errorFunc;return(0,m.interval)(function(){return g(h,w)},_)})},s.createAnimateFrame=function(){return new p.Processing(function(w,_){var y=w.errorFunc;return(0,m.animateFrame)(function(h){return g(y,_,h)})})},s.createAnimateFrameWithStartValues=function(w){return new p.Processing(function(_){var y=_.errorFunc;return(0,m.animateFrame)(function(h){return g(y,w,h)})})}},6891:function(o,s,a){var c,f=this&&this.__extends||(c=function(y,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(d[l]=u[l])},c(y,h)},function(y,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function d(){this.constructor=y}c(y,h),y.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}),m=this&&this.__read||function(y,h){var d=typeof Symbol=="function"&&y[Symbol.iterator];if(!d)return y;var u,l,v=d.call(y),b=[];try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)b.push(u.value)}catch(E){l={error:E}}finally{try{u&&!u.done&&(d=v.return)&&d.call(v)}finally{if(l)throw l.error}}return b},p=this&&this.__spreadArray||function(y,h,d){if(d||arguments.length===2)for(var u,l=0,v=h.length;l<v;l++)!u&&l in h||(u||(u=Array.prototype.slice.call(h,0,l)),u[l]=h[l]);return y.concat(u||Array.prototype.slice.call(h))};Object.defineProperty(s,"__esModule",{value:!0}),s.ProcessingDeprecated=void 0;var g=a(7372),w=a(7372),_=function(y){function h(d,u,l,v,b,E,S,P){var C=y.call(this)||this;return C._startProcessingFunc=d,C.startFunc=u,C.progressFunc=l,C.completeFunc=v,C.cancelFunc=b,C.cancelledFunc=E,C.errorFunc=S,C.finishedFunc=P,C._processingID=-1,C._status="Initial",C.dispose(function(){var x;return(x=C._statusChangedEvent)===null||x===void 0?void 0:x.destroy()}),C.dispose(function(){var x;return(x=C._startEvent)===null||x===void 0?void 0:x.destroy()}),C.dispose(function(){var x;return(x=C._progressEvent)===null||x===void 0?void 0:x.destroy()}),C.dispose(function(){var x;return(x=C._completeEvent)===null||x===void 0?void 0:x.destroy()}),C.dispose(function(){var x;return(x=C._cancelEvent)===null||x===void 0?void 0:x.destroy()}),C.dispose(function(){var x;return(x=C._cancelledEvent)===null||x===void 0?void 0:x.destroy()}),C.dispose(function(){var x;return(x=C._errorEvent)===null||x===void 0?void 0:x.destroy()}),C.dispose(function(){var x;return(x=C._finishedEvent)===null||x===void 0?void 0:x.destroy()}),C.dispose(function(){return C.reset()}),C}return f(h,y),Object.defineProperty(h.prototype,"startEvent",{get:function(){return this._startEvent=this._startEvent||new w.Event,this._startEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"progressEvent",{get:function(){return this._progressEvent=this._progressEvent||new w.Event,this._progressEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"completeEvent",{get:function(){return this._completeEvent=this._completeEvent||new w.Event,this._completeEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"cancelEvent",{get:function(){return this._cancelEvent=this._cancelEvent||new w.Event,this._cancelEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"cancelledEvent",{get:function(){return this._cancelledEvent=this._cancelledEvent||new w.Event,this._cancelledEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"errorEvent",{get:function(){return this._errorEvent=this._errorEvent||new w.Event,this._errorEvent},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"finishedEvent",{get:function(){return this._finishedEvent=this._finishedEvent||new w.Event,this._finishedEvent},enumerable:!1,configurable:!0}),h.prototype._completeFunc=function(d,u){this.processingID===d&&this._status==="Running"&&(this._status="Completed",this.completeFunc&&this.completeFunc(u),this._completeEvent&&this._completeEvent.emit(u),this.finishedFunc&&this.finishedFunc({status:"Completed",value:u}),this._finishedEvent&&this._finishedEvent.emit({status:"Completed",value:u}))},h.prototype._cancelFunc=function(d){this._status==="Running"&&(this._status="Cancelling",this.cancelFunc&&this.cancelFunc(d),this._cancelEvent&&this._cancelEvent.emit(d))},h.prototype._cancelledFunc=function(d){this._status==="Cancelling"&&(this._status="Cancelled",this.cancelledFunc&&this.cancelledFunc(d),this._cancelledEvent&&this._cancelledEvent.emit(d),this.finishedFunc&&this.finishedFunc({status:"Cancelled",cancelError:d}),this._finishedEvent&&this._finishedEvent.emit({status:"Cancelled",cancelError:d}))},h.prototype._errorFunc=function(d,u){this.processingID===d&&this._status==="Running"&&(this._status="Error",this.errorFunc&&this.errorFunc(u),this._errorEvent&&this._errorEvent.emit(u),this.finishedFunc&&this.finishedFunc({status:"Error",error:u}),this._finishedEvent&&this._finishedEvent.emit({status:"Error",error:u}))},h.prototype._progressFunc=function(d,u){this.processingID===d&&this._status==="Running"&&(this.progressFunc&&this.progressFunc(u),this._progressEvent&&this._progressEvent.emit(u))},h.prototype._startFunc=function(){for(var d,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];if(this._status==="Initial"){this._status="Running";var v=++this._processingID,b={completeFunc:this._completeFunc.bind(this,v),errorFunc:this._errorFunc.bind(this,v),progressFunc:this._progressFunc.bind(this,v),cancelFunc:this._cancel.bind(this,v),processingID:v},E=this._startProcessingFunc.apply(this,p([b],m(u),!1));return this._forceCancelFunc=E,this.startFunc&&this.startFunc.apply(this,p([],m(u),!1)),this._startEvent&&(d=this._startEvent).emit.apply(d,p([],m(u),!1)),v}return console.warn("this._status !== 'Initial' but start again!"),-1},Object.defineProperty(h.prototype,"_status",{get:function(){return this.__status},set:function(d){if(this.__status!==d){var u=this.__status;this.__status=d,this._statusChangedEvent&&this._statusChangedEvent.emit(d,u)}},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"processingID",{get:function(){return this._processingID},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"statusChangedEvent",{get:function(){return this._statusChangedEvent||(this._statusChangedEvent=new w.Event),this._statusChangedEvent},enumerable:!1,configurable:!0}),h.prototype.reset=function(d){this._status==="Running"&&this.cancel(d),this._status==="Cancelled"||this._status==="Error"||this._status==="Completed"?this._status="Initial":this._status==="Cancelling"&&console.warn("Cannot reset! (this._status === 'Cancelling')")},Object.defineProperty(h.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),h.prototype.cancel=function(d,u){return u===void 0&&(u=this.processingID),this._cancel(u,d)},h.prototype._cancel=function(d,u){var l=this;if(this.processingID===d)if(this._status==="Running"){if(!this._forceCancelFunc)throw new Error("this._forceCancelFunc is undefined!");this._cancelFunc(u);var v=this._forceCancelFunc(u);if(this._forceCancelFunc=void 0,v&&v instanceof Promise)return v.then(function(){l._cancelledFunc(u)});this._cancelledFunc(u)}else console.warn("this._status !== 'Running' but cancel")},h.prototype.start=function(){for(var d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];try{return this._startFunc.apply(this,p([],m(d),!1))}catch(l){console.error("processing start error: ".concat(l))}},h.prototype.restart=function(d){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];try{return this.isRunning&&this.cancel(d),this.isFinished&&this.reset(d),this.isInitial?this._startFunc.apply(this,p([],m(u),!1)):(console.warn("restart failed!"),-1)}catch(v){console.error("processing restart error: ".concat(v))}},Object.defineProperty(h.prototype,"isCompleted",{get:function(){return this._status==="Completed"},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isCancelled",{get:function(){return this._status==="Cancelled"},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isCancelling",{get:function(){return this._status==="Cancelling"},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isError",{get:function(){return this._status==="Error"},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isInitial",{get:function(){return this._status==="Initial"},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isRunning",{get:function(){return this._status==="Running"},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isFinished",{get:function(){return this.isCancelled||this.isCompleted||this.isError},enumerable:!1,configurable:!0}),h}(g.Destroyable);s.ProcessingDeprecated=_},6928:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(7521),s),f(a(5252),s),f(a(5260),s),f(a(2277),s),f(a(9181),s),f(a(4499),s),f(a(1023),s)},6946:function(o,s,a){var c,f=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(h[u]=d[u])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function h(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(h.prototype=y.prototype,new h)});Object.defineProperty(s,"__esModule",{value:!0}),s.TransitionDeprecated=void 0;var m=a(7372),p=a(7372),g=a(2811),w=function(_){function y(h){var d=_.call(this)||this;return d._duration=h,d._target=0,d._current=0,d._start=0,d._timing=new g.TimingDeprecated(Number.POSITIVE_INFINITY),d._timing.progressFunc=function(u){var l=u.ratio;l=l<0?0:l>1?1:l;var v=d._start*(1-l)+d._target*l;d._current=v,d._currentChanged&&d._currentChanged.emit(d._target,d._current)},d.dispose(function(){d._timing.isRunning&&d._timing.cancel(),d._timing.destroy()}),d}return f(y,_),y.prototype.reset=function(h,d){d===void 0&&(d=h),this._timing.isRunning&&this._timing.cancel(),this._target=h,this._current=d,this._start=h},Object.defineProperty(y.prototype,"target",{get:function(){return this._target},set:function(h){if(this._target!==h){this._target=h,this._timing.isRunning&&this._timing.cancel(),this._timing.reset(),this._start=this._current;var d=Math.abs(this._target-this._start);this._timing.duration=d*this._duration,this._timing.start()}},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"current",{get:function(){return this._current},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"currentChanged",{get:function(){return this._currentChanged||(this._currentChanged=new p.Event),this._currentChanged},enumerable:!1,configurable:!0}),y}(m.Destroyable);s.TransitionDeprecated=w},7008:(o,s,a)=>{function c(E,S){var P=(65535&E)+(65535&S);return(E>>16)+(S>>16)+(P>>16)<<16|65535&P}function f(E,S,P,C,x,O){return c((I=c(c(S,E),c(C,O)))<<(N=x)|I>>>32-N,P);var I,N}function m(E,S,P,C,x,O,I){return f(S&P|~S&C,E,S,x,O,I)}function p(E,S,P,C,x,O,I){return f(S&C|P&~C,E,S,x,O,I)}function g(E,S,P,C,x,O,I){return f(S^P^C,E,S,x,O,I)}function w(E,S,P,C,x,O,I){return f(P^(S|~C),E,S,x,O,I)}function _(E,S){var P,C,x,O,I;E[S>>5]|=128<<S%32,E[14+(S+64>>>9<<4)]=S;var N=1732584193,T=-271733879,R=-1732584194,A=271733878;for(P=0;P<E.length;P+=16)C=N,x=T,O=R,I=A,N=m(N,T,R,A,E[P],7,-680876936),A=m(A,N,T,R,E[P+1],12,-389564586),R=m(R,A,N,T,E[P+2],17,606105819),T=m(T,R,A,N,E[P+3],22,-1044525330),N=m(N,T,R,A,E[P+4],7,-176418897),A=m(A,N,T,R,E[P+5],12,1200080426),R=m(R,A,N,T,E[P+6],17,-1473231341),T=m(T,R,A,N,E[P+7],22,-45705983),N=m(N,T,R,A,E[P+8],7,1770035416),A=m(A,N,T,R,E[P+9],12,-1958414417),R=m(R,A,N,T,E[P+10],17,-42063),T=m(T,R,A,N,E[P+11],22,-1990404162),N=m(N,T,R,A,E[P+12],7,1804603682),A=m(A,N,T,R,E[P+13],12,-40341101),R=m(R,A,N,T,E[P+14],17,-1502002290),N=p(N,T=m(T,R,A,N,E[P+15],22,1236535329),R,A,E[P+1],5,-165796510),A=p(A,N,T,R,E[P+6],9,-1069501632),R=p(R,A,N,T,E[P+11],14,643717713),T=p(T,R,A,N,E[P],20,-373897302),N=p(N,T,R,A,E[P+5],5,-701558691),A=p(A,N,T,R,E[P+10],9,38016083),R=p(R,A,N,T,E[P+15],14,-660478335),T=p(T,R,A,N,E[P+4],20,-405537848),N=p(N,T,R,A,E[P+9],5,568446438),A=p(A,N,T,R,E[P+14],9,-1019803690),R=p(R,A,N,T,E[P+3],14,-187363961),T=p(T,R,A,N,E[P+8],20,1163531501),N=p(N,T,R,A,E[P+13],5,-1444681467),A=p(A,N,T,R,E[P+2],9,-51403784),R=p(R,A,N,T,E[P+7],14,1735328473),N=g(N,T=p(T,R,A,N,E[P+12],20,-1926607734),R,A,E[P+5],4,-378558),A=g(A,N,T,R,E[P+8],11,-2022574463),R=g(R,A,N,T,E[P+11],16,1839030562),T=g(T,R,A,N,E[P+14],23,-35309556),N=g(N,T,R,A,E[P+1],4,-1530992060),A=g(A,N,T,R,E[P+4],11,1272893353),R=g(R,A,N,T,E[P+7],16,-155497632),T=g(T,R,A,N,E[P+10],23,-1094730640),N=g(N,T,R,A,E[P+13],4,681279174),A=g(A,N,T,R,E[P],11,-358537222),R=g(R,A,N,T,E[P+3],16,-722521979),T=g(T,R,A,N,E[P+6],23,76029189),N=g(N,T,R,A,E[P+9],4,-640364487),A=g(A,N,T,R,E[P+12],11,-421815835),R=g(R,A,N,T,E[P+15],16,530742520),N=w(N,T=g(T,R,A,N,E[P+2],23,-995338651),R,A,E[P],6,-198630844),A=w(A,N,T,R,E[P+7],10,1126891415),R=w(R,A,N,T,E[P+14],15,-1416354905),T=w(T,R,A,N,E[P+5],21,-57434055),N=w(N,T,R,A,E[P+12],6,1700485571),A=w(A,N,T,R,E[P+3],10,-1894986606),R=w(R,A,N,T,E[P+10],15,-1051523),T=w(T,R,A,N,E[P+1],21,-2054922799),N=w(N,T,R,A,E[P+8],6,1873313359),A=w(A,N,T,R,E[P+15],10,-30611744),R=w(R,A,N,T,E[P+6],15,-1560198380),T=w(T,R,A,N,E[P+13],21,1309151649),N=w(N,T,R,A,E[P+4],6,-145523070),A=w(A,N,T,R,E[P+11],10,-1120210379),R=w(R,A,N,T,E[P+2],15,718787259),T=w(T,R,A,N,E[P+9],21,-343485551),N=c(N,C),T=c(T,x),R=c(R,O),A=c(A,I);return[N,T,R,A]}function y(E){var S,P="",C=32*E.length;for(S=0;S<C;S+=8)P+=String.fromCharCode(E[S>>5]>>>S%32&255);return P}function h(E){var S,P=[];for(P[(E.length>>2)-1]=void 0,S=0;S<P.length;S+=1)P[S]=0;var C=8*E.length;for(S=0;S<C;S+=8)P[S>>5]|=(255&E.charCodeAt(S/8))<<S%32;return P}function d(E){var S,P,C="0123456789abcdef",x="";for(P=0;P<E.length;P+=1)S=E.charCodeAt(P),x+=C.charAt(S>>>4&15)+C.charAt(15&S);return x}function u(E){return unescape(encodeURIComponent(E))}function l(E){return function(S){return y(_(h(S),8*S.length))}(u(E))}function v(E,S){return function(P,C){var x,O,I=h(P),N=[],T=[];for(N[15]=T[15]=void 0,I.length>16&&(I=_(I,8*P.length)),x=0;x<16;x+=1)N[x]=909522486^I[x],T[x]=1549556828^I[x];return O=_(N.concat(h(C)),512+8*C.length),y(_(T.concat(O),640))}(u(E),u(S))}function b(E,S,P){return S?P?v(S,E):d(v(S,E)):P?l(E):d(l(E))}a.r(s),a.d(s,{md5:()=>b})},7014:function(o,s,a){var c,f=this&&this.__extends||(c=function(y,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(d[l]=u[l])},c(y,h)},function(y,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function d(){this.constructor=y}c(y,h),y.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}),m=this&&this.__awaiter||function(y,h,d,u){return new(d||(d=Promise))(function(l,v){function b(P){try{S(u.next(P))}catch(C){v(C)}}function E(P){try{S(u.throw(P))}catch(C){v(C)}}function S(P){var C;P.done?l(P.value):(C=P.value,C instanceof d?C:new d(function(x){x(C)})).then(b,E)}S((u=u.apply(y,h||[])).next())})},p=this&&this.__generator||function(y,h){var d,u,l,v,b={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return v={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function E(S){return function(P){return function(C){if(d)throw new TypeError("Generator is already executing.");for(;v&&(v=0,C[0]&&(b=0)),b;)try{if(d=1,u&&(l=2&C[0]?u.return:C[0]?u.throw||((l=u.return)&&l.call(u),0):u.next)&&!(l=l.call(u,C[1])).done)return l;switch(u=0,l&&(C=[2&C[0],l.value]),C[0]){case 0:case 1:l=C;break;case 4:return b.label++,{value:C[1],done:!1};case 5:b.label++,u=C[1],C=[0];continue;case 7:C=b.ops.pop(),b.trys.pop();continue;default:if(!((l=(l=b.trys).length>0&&l[l.length-1])||C[0]!==6&&C[0]!==2)){b=0;continue}if(C[0]===3&&(!l||C[1]>l[0]&&C[1]<l[3])){b.label=C[1];break}if(C[0]===6&&b.label<l[1]){b.label=l[1],l=C;break}if(l&&b.label<l[2]){b.label=l[2],b.ops.push(C);break}l[2]&&b.ops.pop(),b.trys.pop();continue}C=h.call(y,b)}catch(x){C=[6,x],u=0}finally{d=l=0}if(5&C[0])throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}([S,P])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.ImageProcessing=void 0;var g=a(1662),w=a(5819),_=function(y){function h(d,u){var l=y.call(this)||this;return l._complexImage=d,l._imageUri=u,l._processing=l.disposeVar((0,w.createProcessingFromAsyncFunc)(function(v){return m(l,void 0,void 0,function(){var b,E;return p(this,function(S){switch(S.label){case 0:return b=this._complexImage,[4,v.promise((0,g.fetchImage)(this._imageUri,this._complexImage.crossOrigin))];case 1:return(E=S.sent())?(E instanceof HTMLImageElement&&(b.size=[E.naturalWidth,E.naturalHeight],b.pixelFormat="RGBA",b.copyTexture({source:E})),[2]):[2]}})})})),l._processingStart=l._processing.start(),l}return f(h,y),Object.defineProperty(h.prototype,"processing",{get:function(){return this._processing},enumerable:!1,configurable:!0}),h}(g.Destroyable);s.ImageProcessing=_},7029:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(5281),s),f(a(7118),s),f(a(9815),s)},7118:function(o,s,a){var c,f=this&&this.__extends||(c=function(y,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(d[l]=u[l])},c(y,h)},function(y,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function d(){this.constructor=y}c(y,h),y.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}),m=this&&this.__read||function(y,h){var d=typeof Symbol=="function"&&y[Symbol.iterator];if(!d)return y;var u,l,v=d.call(y),b=[];try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)b.push(u.value)}catch(E){l={error:E}}finally{try{u&&!u.done&&(d=v.return)&&d.call(v)}finally{if(l)throw l.error}}return b},p=this&&this.__spreadArray||function(y,h,d){if(d||arguments.length===2)for(var u,l=0,v=h.length;l<v;l++)!u&&l in h||(u||(u=Array.prototype.slice.call(h,0,l)),u[l]=h[l]);return y.concat(u||Array.prototype.slice.call(h))};Object.defineProperty(s,"__esModule",{value:!0}),s.GifPlayer=void 0;var g=a(1662);function w(y,h,d){return y<h?h:y>d?d:y}var _=function(y){function h(d,u,l){u===void 0&&(u=!0);var v=y.call(this)||this;v._container=d,v._gifFrames=v.disposeVar((0,g.react)(void 0)),v._gifDurations=[],v._gifDuration=v.disposeVar((0,g.react)(0)),v._gifSize=v.disposeVar((0,g.react)([0,0],function(C,x){return C.every(function(O,I){return O===x[I]})},function(C){return p([],m(C),!1)})),v._autoPlayOnLoad=v.disposeVar((0,g.react)(!0)),v.loop=!0;var b=document.createElement("canvas");v._gifCanvas=b,b.style.width="100%",b.style.height="100%";var E,S=b.getContext("2d");v._container&&v._container.appendChild(b),v.dispose(function(){return v._container&&v._container.removeChild(b)}),v.dispose(v._gifFrames.changed.disposableOn(function(C){if(!C||C.length===0)return b.width=0,void(b.height=0);var x=C[0].dims,O=x.width,I=x.height;v._gifSize.value=[O,I];var N=C.length,T=0;v._gifDurations.length=0;for(var R=0;R<N;++R)T+=C[R].delay,v._gifDurations.push(T);v._gifDuration.value=v._gifDurations[v._gifDurations.length-1],b.width=O,b.height=I,E=S.createImageData(O,I),v.currentTimeChangedEvent.emit(v.currentTime,v.currentTime),v._autoPlayOnLoad.value&&(v.currentTime=0,v.playing=!0)}));var P=-1;return v.dispose(v.currentTimeChangedEvent.disposableOn(function(C){var x=w(C/v.duration,0,1),O=v.gifDuration*x,I=v._gifFrames.value;if(I&&I.length>0){var N=v._getFrame(O);if(N===P)return;P=N;var T=I[N];if(T.disposalType!==0&&T.disposalType!==1&&T.disposalType!==2&&(0,g.oneTimeWarning)("gif parsed get disposalType ".concat(T.disposalType,"... frame: ").concat(N," size: ").concat(JSON.stringify(T.dims)),"gif parsed get disposalType ".concat(T.disposalType,"...")),!E||N!==0&&T.disposalType!==2||E.data.fill(0),E){var R=m(v._gifSize.value,2),A=R[0],B=R[1],k=T.dims,z=k.width,j=k.height,L=k.left,F=k.top;if(j>B)throw new Error("height > canvasHeight");for(var G=0;G<j;++G)for(var W=0;W<z;++W){var V=G*z+W,U=(F+G)*A+(L+W),q=E.data,J=T.patch,Y=J[4*V+3]/255;q[4*U+0]=q[4*U+0]*(1-Y)+J[4*V+0]*Y|0,q[4*U+1]=q[4*U+1]*(1-Y)+J[4*V+1]*Y|0,q[4*U+2]=q[4*U+2]*(1-Y)+J[4*V+2]*Y|0,q[4*U+3]=0|w(q[4*U+3]+J[4*V+3],0,255)}S.putImageData(E,0,0)}}else(0,g.oneTimeWarning)("gif资源未加载!无法播放!")})),v.dispose(v._gifDuration.changed.disposableOn(function(){v.duration=v.gifDuration})),v._autoPlayOnLoad.value=u,v._gifFrames.value=l,v}return f(h,y),Object.defineProperty(h.prototype,"gifCanvas",{get:function(){return this._gifCanvas},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"gifFrames",{get:function(){return this._gifFrames.value},set:function(d){this._gifFrames.value=d},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"gifFramesChanged",{get:function(){return this._gifFrames.changed},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"gifSize",{get:function(){return this._gifSize.value},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"gifSizeChanged",{get:function(){return this._gifSize.changed},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"gifDuration",{get:function(){return this._gifDuration.value},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"gifDurationChanged",{get:function(){return this._gifDuration.changed},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"autoPlayOnLoad",{get:function(){return this._autoPlayOnLoad.value},set:function(d){this._autoPlayOnLoad.value=d},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"autoPlayOnLoadChanged",{get:function(){return this._autoPlayOnLoad.changed},enumerable:!1,configurable:!0}),h.prototype._getFrame=function(d){for(var u=this._gifDurations.length,l=0;l<u;++l)if(d<=this._gifDurations[l])return l;throw new Error("should not be here")},h}(a(2127).Player);s.GifPlayer=_},7132:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addClassStyle=void 0,s.addClassStyle=function(a){var c=document.createElement("style");return c.innerText=a,document.head.appendChild(c)}},7215:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Plane=void 0;var c=a(2731),f=a(9898),m=a(5873),p=a(8089);(function(g){var w=(0,c.createNumbers)(3);function _(b,E){f.Vector.set(w,b[0],b[1],b[2]);var S=f.Vector.magnitudeSquared(w);if(Math.abs(S-1)>1e-9)throw new Error("plane必须是单位向量!");return f.Vector.dot(w,E)+b[3]}function y(b,E){return E=E||(0,c.createNumbers)(3),f.Vector.set(E,b[0],b[1],b[2]),E}g.distancePlaneToPoint=_,g.projectPointOntoPlane=function(b,E,S){S=S||(0,c.createNumbers)(3);var P=_(E,b);return f.Vector.set(w,E[0],E[1],E[2]),f.Vector.multiplyByScalar(w,-P,S),f.Vector.add(S,b,S),S},g.getNormal=y,g.getDistance=function(b){return b[3]},g.setNormal=function(b,E){for(var S=0;S<3;++S)b[S]=E[S];return b},g.setDistance=function(b,E){return b[3]=E,b};var h=(0,c.createNumbers)(3),d=(0,c.createNumbers)(3);g.distanceRayToPlane=function(b,E,S){S===void 0&&(S=1e-5);var P=m.Ray.getDirection(b,h),C=y(E,d),x=-f.Vector.dot(P,C);if(!(Math.abs(x)<S))return _(E,m.Ray.getOrigin(b,h))/x};var u=(0,c.createNumbers)(16),l=(0,c.createNumbers)(4),v=(0,c.createNumbers)(3);g.transform=function(b,E,S){S=S||(0,c.createNumbers)(4);var P=p.Matrix4.inverse(p.Matrix4.transpose(E,u),u),C=p.Matrix4.multiplyByVector(P,b,l),x=y(b,v);return f.Vector.multiplyByScalar(C,1/f.Vector.magnitude(x),S),S},g.fromPointNormal=function(b,E,S){if(Math.abs(1-f.Vector.magnitude(E))>1e-6)throw new Error("Math.abs(1 - Vector.magnitude(normal)) > 0.000001");var P=-f.Vector.dot(E,b);return S=S||(0,c.createNumbers)(4),f.Vector.set(S,E[0],E[1],E[2],P)},g.UNIT_X=(0,c.createNumbers)(4,1,0,0,0),g.UNIT_Y=(0,c.createNumbers)(4,0,1,0,0),g.UNIT_Z=(0,c.createNumbers)(4,0,0,1,0)})(s.Plane||(s.Plane={}))},7324:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)}),m=this&&this.__read||function(h,d){var u=typeof Symbol=="function"&&h[Symbol.iterator];if(!u)return h;var l,v,b=u.call(h),E=[];try{for(;(d===void 0||d-- >0)&&!(l=b.next()).done;)E.push(l.value)}catch(S){v={error:S}}finally{try{l&&!l.done&&(u=b.return)&&u.call(b)}finally{if(v)throw v.error}}return E};Object.defineProperty(s,"__esModule",{value:!0}),s.getFloatDivPool=s.FloatDiv=void 0;var p=a(7372),g=a(7372),w=a(7372),_=function(h){function d(){var u=h!==null&&h.apply(this,arguments)||this;return u._show=!0,u._opacity=1,u._winPos=[0,0],u}return f(d,h),Object.defineProperty(d.prototype,"winPos",{get:function(){return this._winPos},set:function(u){var l=m(u,2),v=l[0],b=l[1],E=m(this._winPos,2),S=E[0],P=E[1];v===S&&b===P||(this._winPos[0]=v,this._winPos[1]=b,this._winPosChanged&&this._winPosChanged.emit(this._winPos))},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"winPosChanged",{get:function(){return this._winPosChanged=this._winPosChanged||new p.Event,this._winPosChanged},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"opacity",{get:function(){return this._opacity},set:function(u){this._opacity!==u&&(this._opacity=u,this._opacityChanged&&this._opacityChanged.emit(this._opacity))},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"opacityChanged",{get:function(){return this._opacityChanged=this._opacityChanged||new p.Event,this._opacityChanged},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"show",{get:function(){return this._show},set:function(u){this._show!==u&&(this._show=u,this._showChanged&&this._showChanged.emit(this._show))},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"showChanged",{get:function(){return this._showChanged=this._showChanged||new p.Event,this._showChanged},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"closeEvent",{get:function(){return this._closeEvent||(this._closeEvent=new p.Event),this._closeEvent},enumerable:!1,configurable:!0}),d}(g.Destroyable);s.FloatDiv=_;var y=new WeakMap;s.getFloatDivPool=function(h){if(!y.has(h)){var d=new w.ObjPool(function(){return new h},function(u){return u.reset()});y.set(h,d)}return y.get(h)}},7372:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.SmartListenerPipe=s.SmartListenerHandler=s.ListenerPipe=s.Event=s.EventListenerHandler=s.DoublyLinkedList=s.react=s.ReactiveVariable=s.ObjPool=s.Destroyable=void 0;var c=a(1662);Object.defineProperty(s,"Destroyable",{enumerable:!0,get:function(){return c.Destroyable}});var f=a(1662);Object.defineProperty(s,"ObjPool",{enumerable:!0,get:function(){return f.ObjPool}});var m=a(1662);Object.defineProperty(s,"ReactiveVariable",{enumerable:!0,get:function(){return m.ReactiveVariable}}),Object.defineProperty(s,"react",{enumerable:!0,get:function(){return m.react}});var p=a(1662);Object.defineProperty(s,"DoublyLinkedList",{enumerable:!0,get:function(){return p.DoublyLinkedList}}),Object.defineProperty(s,"EventListenerHandler",{enumerable:!0,get:function(){return p.EventListenerHandler}}),Object.defineProperty(s,"Event",{enumerable:!0,get:function(){return p.Event}}),Object.defineProperty(s,"ListenerPipe",{enumerable:!0,get:function(){return p.ListenerPipe}}),Object.defineProperty(s,"SmartListenerHandler",{enumerable:!0,get:function(){return p.SmartListenerHandler}}),Object.defineProperty(s,"SmartListenerPipe",{enumerable:!0,get:function(){return p.SmartListenerPipe}})},7413:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ViewMatrix=void 0;var c=a(4915),f=a(8089),m=a(2731),p=a(9549),g=a(9898),w=a(5985),_=(0,m.createNumbers)(3),y=(0,m.createNumbers)(3),h=(0,m.createNumbers)(3);(function(d){function u(A,B,k,z,j){return(j=j||(0,m.createNumbers)(16))[0]=z[0],j[1]=k[0],j[2]=-B[0],j[3]=0,j[4]=z[1],j[5]=k[1],j[6]=-B[1],j[7]=0,j[8]=z[2],j[9]=k[2],j[10]=-B[2],j[11]=0,j[12]=-g.Vector.dot(z,A),j[13]=-g.Vector.dot(k,A),j[14]=g.Vector.dot(B,A),j[15]=1,j}d.computeView=u;var l=(0,m.createNumbers)(3),v=(0,m.createNumbers)(3),b=(0,m.createNumbers)(3);function E(A,B,k){var z=l,j=v,L=b,F=B;return g.Vector.set(z,-F[6],-F[7],-F[8]),g.Vector.set(j,F[3],F[4],F[5]),g.Vector.set(L,F[0],F[1],F[2]),u(A,z,j,L,k)}d.fromRotationMatrix3AndPosition=E;var S=(0,m.createNumbers)(9);d.fromRotationQuatAndPosition=function(A,B,k){return c.Matrix3.fromQuaternion(B,S),E(A,S,k)},d.lookAt=function(A,B,k,z){var j=g.Vector.subtract(B,A,_);if(!g.Vector.normalize(j,j))throw new Error("direction is undefined!");return w.Vector3.getOrthogonalityVector(j,k,h,y),d.computeView(A,j,h,y,z)},d.lookAtWithDirection=function(A,B,k,z){if(Math.abs(g.Vector.magnitudeSquared(B)-1)>1e-5)throw new Error("direction is not normalized!");return w.Vector3.getOrthogonalityVector(B,k,h,y),d.computeView(A,B,h,y,z)},d.getDirection=function(A,B){return g.Vector.set(B,-A[2],-A[6],-A[10])},d.getRight=function(A,B){return g.Vector.set(B,A[0],A[4],A[8])},d.getUp=function(A,B){return g.Vector.set(B,A[1],A[5],A[9])};var P=(0,m.createNumbers)(9);function C(A,B){(B=B||(0,m.createNumbers)(9))[0]=A[0],B[1]=A[4],B[2]=A[8],B[3]=A[1],B[4]=A[5],B[5]=A[9],B[6]=A[2],B[7]=A[6],B[8]=A[10]}d.getRotationQuat=function(A,B){return C(A,P),p.Quaternion.fromRotationMatrix3(P,B)},d.getRotationMatrix=C,d.getEye=function(A,B){var k=A,z=-k[0]*k[12]-k[1]*k[13]-k[2]*k[14],j=-k[4]*k[12]-k[5]*k[13]-k[6]*k[14],L=-k[8]*k[12]-k[9]*k[13]-k[10]*k[14];return g.Vector.set(B,z,j,L)};var x=(0,m.createNumbers)(3);d.distanceFromEye=function(A,B){return-f.Matrix4.affineMultiplyByPoint(A,B,x)[2]},d.ratioScreenToWorldSpace=function(A,B,k){return B[3]*A[5]*.5/k};var O=(0,m.createNumbers)(4),I=(0,m.createNumbers)(3),N=(0,m.createNumbers)(16),T=(0,m.createNumbers)(16),R=(0,m.createNumbers)(16);d.rotateWithAxis=function(A,B,k,z,j){return j=j||(0,m.createNumbers)(16),f.Matrix4.fromTranslation(B,N),g.Vector.negate(B,I),f.Matrix4.fromTranslation(I,T),p.Quaternion.fromAxisAngle(k,-z,O),f.Matrix4.fromRotateQuatAndTranslation(O,void 0,R),f.Matrix4.continuousMultiply(j,A,N,R,T)},d.computeOrthographicOffCenter=function(A,B,k,z,j,L,F){var G=1/(B-A),W=1/(z-k),V=1/(L-j),U=-(B+A)*G,q=-(z+k)*W,J=-(L+j)*V;return G*=2,W*=2,V*=-2,(F=F||(0,m.createNumbers)(16))[0]=G,F[1]=0,F[2]=0,F[3]=0,F[4]=0,F[5]=W,F[6]=0,F[7]=0,F[8]=0,F[9]=0,F[10]=V,F[11]=0,F[12]=U,F[13]=q,F[14]=J,F[15]=1,F}})(s.ViewMatrix||(s.ViewMatrix={}))},7418:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getValueFromRatio=s.defaultLerpFunc=void 0;var c=a(8144);s.defaultLerpFunc=function(f,m,p){return f*(1-p)+m*p},s.getValueFromRatio=function(f,m,p,g,w){for(var _,y,h,d,u=(0,c.getIterator)(m);;){var l=u.next(),v=l.done,b=l.value;if(v)break;if(b===void 0)throw new Error("typeof value === 'undefined'");var E=b.ratio,S=b.value;if(_=h,y=d&&g?g(d,w??y):d,h=E,d=S,(_===void 0||f>=_)&&(h===void 0||f<=h)){if(_===void 0)return d&&g?g(d,w):d;if(h===void 0||d===void 0)throw new Error("typeof rightRatio === 'undefined'");return p(y,d,(f-_)/(h-_),w)}d=d&&g?g(d,w):d}if(h===void 0)throw new Error("typeof rightRatio === 'undefined'");if(f>h)return d;throw new Error("!(ratio > rightRatio)")}},7427:(o,s)=>{var a;Object.defineProperty(s,"__esModule",{value:!0}),s.isCrossOriginUrl=void 0,s.isCrossOriginUrl=function(c){(a=a??document.createElement("a")).href=window.location.href;var f=a.host,m=a.protocol;return a.href=c,a.href=a.href,m!==a.protocol||f!==a.host}},7445:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(9986),s),f(a(200),s),f(a(7324),s),f(a(4143),s),f(a(3951),s),f(a(8193),s),f(a(4123),s)},7500:function(o,s,a){var c=this&&this.__read||function(h,d){var u=typeof Symbol=="function"&&h[Symbol.iterator];if(!u)return h;var l,v,b=u.call(h),E=[];try{for(;(d===void 0||d-- >0)&&!(l=b.next()).done;)E.push(l.value)}catch(S){v={error:S}}finally{try{l&&!l.done&&(u=b.return)&&u.call(b)}finally{if(v)throw v.error}}return E},f=this&&this.__spreadArray||function(h,d,u){if(u||arguments.length===2)for(var l,v=0,b=d.length;v<b;v++)!l&&v in d||(l||(l=Array.prototype.slice.call(d,0,v)),l[v]=d[v]);return h.concat(l||Array.prototype.slice.call(d))};Object.defineProperty(s,"__esModule",{value:!0}),s.Vector4=void 0;var m=a(2731),p=a(9898),g=(0,m.createNumbers)(4,1,255,65025,16581375),w=(0,m.createNumbers)(4,1/255,1/255,1/255,0),_=(0,m.createNumbers)(4,1,1/255,1/65025,1/16581375),y=(0,m.createNumbers)(4);(function(h){h.packDepth=function(l,v){if(l<0||l>1)throw new Error("depth < 0 || depth > 1");if(l===1)return p.Vector.set(v,1,0,0,0);v=p.Vector.multiplyByScalar(g,l,v),p.Vector.fract(v,v);var b=p.Vector.set(y,v[1],v[2],v[3],v[3]);return p.Vector.multiply(b,w,b),p.Vector.subtract(v,b,v)},h.unpackDepth=function(l){return p.Vector.dot(l,_)};var d=new Uint32Array(1),u=new Uint8Array(d.buffer);h.uint32ToFourUint8s=function(l,v){if(l>4294967295)throw new Error("uint32Number(".concat(l,") > 0xFFFFFFFF"));return d[0]=l,p.Vector.set.apply(p.Vector,f([v],c(u),!1))},h.fourUint8sToUint32=function(l){return p.Vector.clone(l,u),d[0]},h.ONE=(0,m.createNumbers)(4,1,1,1,1),h.ZERO=(0,m.createNumbers)(4,0,0,0,0)})(s.Vector4||(s.Vector4={}))},7521:function(o,s,a){var c,f=this&&this.__extends||(c=function(d,u){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,v){l.__proto__=v}||function(l,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(l[b]=v[b])},c(d,u)},function(d,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function l(){this.constructor=d}c(d,u),d.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}),m=this&&this.__read||function(d,u){var l=typeof Symbol=="function"&&d[Symbol.iterator];if(!l)return d;var v,b,E=l.call(d),S=[];try{for(;(u===void 0||u-- >0)&&!(v=E.next()).done;)S.push(v.value)}catch(P){b={error:P}}finally{try{v&&!v.done&&(l=E.return)&&l.call(E)}finally{if(b)throw b.error}}return S};Object.defineProperty(s,"__esModule",{value:!0}),s.CanvasImagePoi=void 0;var p=a(1662),g=a(8106),w=a(5252),_=a(4499);function y(d,u){var l=m(u,3),v=l[0],b=l[1],E=l[2],S="".concat(v,"-").concat(b,"-").concat(E),P=(0,p.getExtProp)(d,S);return P||(P=(0,_.imageToCanvas)(d),(0,_.setCanvasUniformColor)(P,u),(0,p.setExtProp)(d,S,P)),P}var h=function(d){function u(l,v,b,E,S){b===void 0&&(b=[32,32]),E===void 0&&(E=[.5,1,0,0]),S===void 0&&(S="#F00F");var P=d.call(this,l)||this;P._image=v,P._size=b,P._originRatioAndOffset=E,P._defaultColorStr=S,P._tooltip="",P._title="",P.__scale=[1,1],P._tooltipAlpha=0,P._bgColor=[.3,.3,.3,.8],P._bgColorHexStr=(0,_.getColorHexStr)(P._bgColor),P._fgColor=[1,1,1,1],P._fgColorHexStr=(0,_.getColorHexStr)(P._fgColor);var C=new g.Transition(100),x=new g.Transition(100);P.dispose(function(){C.destroy(),x.destroy()});var O=function(){if(P._clickEvent&&!P._clickEvent.empty){var I=(1+.08*x.current)*(1+.08*C.current);P._scale=[I,I],P._tooltipAlpha=C.current}};return P.dispose(P.activedChanged.disposableOn(function(I){x.target=I?1:0,P.needRedraw()})),P.dispose(P.hoveredChanged.disposableOn(function(I){C.target=I?1:0,P.needRedraw()})),P.dispose(P.selectedChanged.disposableOn(function(){P.needRedraw()})),P.dispose(x.currentChanged.disposableOn(O)),P.dispose(C.currentChanged.disposableOn(O)),P}return f(u,d),Object.defineProperty(u.prototype,"size",{get:function(){return this._size},set:function(l){var v=m(l,2),b=v[0],E=v[1],S=m(this._size,2),P=S[0],C=S[1];P===b&&C===E||(this._size[0]=b,this._size[1]=E,this.needRedraw(),this.needPickRedraw())},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"_scale",{get:function(){return this.__scale},set:function(l){var v=m(l,2),b=v[0],E=v[1],S=m(this.__scale,2),P=S[0],C=S[1];P===b&&C===E||(this.__scale[0]=b,this.__scale[1]=E,this.needRedraw(),this.needPickRedraw())},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"fgColor",{get:function(){return this._fgColor},set:function(l){if(!this._fgColor.every(function(C,x){return l[x]===C})){var v=m(l,4),b=v[0],E=v[1],S=v[2],P=v[3];this._fgColor.splice(0,4,b,E,S,P),this._fgColorHexStr=(0,_.getColorHexStr)(this._fgColor),this.needRedraw()}},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"bgColor",{get:function(){return this._bgColor},set:function(l){if(!this._bgColor.every(function(C,x){return l[x]===C})){var v=m(l,4),b=v[0],E=v[1],S=v[2],P=v[3];this._bgColor.splice(0,4,b,E,S,P),this._bgColorHexStr=(0,_.getColorHexStr)(this._bgColor),this.needRedraw()}},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"originRatioAndOffset",{get:function(){return this._originRatioAndOffset},set:function(l){var v=m(this._originRatioAndOffset,4),b=v[0],E=v[1],S=v[2],P=v[3],C=m(l,4),x=C[0],O=C[1],I=C[2],N=C[3];b===x&&E===O&&S===I&&P===N||(this._originRatioAndOffset.splice(0,4,x,O,I,N),this.needRedraw(),this.needPickRedraw())},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"image",{get:function(){return this._image},set:function(l){this._image!==l&&(this._image=l,this.needRedraw())},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"defaultColorStr",{get:function(){return this._defaultColorStr},set:function(l){this._defaultColorStr!==l&&(this._defaultColorStr=l,this.needRedraw())},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"tooltip",{get:function(){return this._tooltip},set:function(l){this._tooltip!==l&&(this._tooltip=l,this.needRedraw())},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"title",{get:function(){return this._title},set:function(l){this._title!==l&&(this._title=l,this.needRedraw())},enumerable:!1,configurable:!0}),u.prototype.draw=function(l){if(this._show){var v=m(this._winPos,2),b=v[0],E=v[1],S=this._size[0]*this.__scale[0],P=this._size[1]*this.__scale[1],C=(0,_.getDrawRect)([b,E],this._size,this.__scale,this._originRatioAndOffset),x=C.left,O=C.top,I=l.globalAlpha;if(l.globalAlpha=this.opacity,this._image){if(this.selected){var N=y(this._image,[1,0,0]),T=(0,_.getDrawRect)([b,E+3],[S+6,P+6],[1,1],this._originRatioAndOffset),R=T.left,A=T.top;l.drawImage(N,R,A,S+6,P+6)}if(this.actived){var B=m(this._fgColor,4),k=B[0],z=B[1],j=B[2],L=(B[3],N=y(this._image,[k,z,j]),(0,_.getDrawRect)([b,E+4],[S+8,P+8],[1,1],this._originRatioAndOffset)),F=L.left,G=L.top;l.drawImage(N,F,G,S+8,P+8)}if(this.hovered){var W=m(this._bgColor,4),V=(k=W[0],z=W[1],j=W[2],W[3],y(this._image,[k,z,j])),U=(0,_.getDrawRect)([b,E+2],[S+4,P+4],[1,1],this._originRatioAndOffset),q=U.left,J=U.top;l.drawImage(V,q,J,S+4,P+4)}l.drawImage(this._image,x,O,S,P)}else l.fillStyle=this._fgColorHexStr,l.fillRect(x,O,S,P);if(this._title!==""&&(0,_.drawTextBlock)(l,b+20,E-16,[0,.5,0,0],this._title,"14px Arial",4,this._fgColorHexStr,this._bgColorHexStr),l.globalAlpha=I,this._hovered&&this._tooltip!==""){var Y=l.globalAlpha;l.globalAlpha=this._tooltipAlpha,(0,_.drawTextBlock)(l,b,E-42,[.5,1,0,0],this._tooltip,"12px Arial",4,this._fgColorHexStr,this._bgColorHexStr),l.globalAlpha=Y}}},u.prototype.drawForPick=function(l,v){if(this._show){var b=m(this._winPos,2),E=b[0],S=b[1],P=v("default"),C=this._size[0]*this.__scale[0],x=this._size[1]*this.__scale[1],O=(0,_.getDrawRect)([E,S],this._size,this.__scale,this._originRatioAndOffset),I=O.left,N=O.top;l.fillStyle=P,l.fillRect(I,N,C,x)}},u}(w.CanvasPoi);s.CanvasImagePoi=h},7529:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(3526),s),f(a(8368),s),f(a(8614),s),f(a(8301),s),f(a(9082),s),f(a(3315),s),f(a(7720),s)},7665:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ProjectionMatrix=void 0;var c,f,m=a(2731);c=s.ProjectionMatrix||(s.ProjectionMatrix={}),(f=c.Perspective||(c.Perspective={})).compute=function(p,g,w,_,y){if(w<=0||_<=0||p<=0||p>=Math.PI)throw new Error("near <= 0 || far <= 0 || fovY <= 0 || fovY >= Math.PI");var h=1/Math.tan(.5*p),d=h/g,u=(_+w)/(w-_),l=2*_*w/(w-_);return(y=y||(0,m.createNumbers)(16))[0]=d,y[1]=0,y[2]=0,y[3]=0,y[4]=0,y[5]=h,y[6]=0,y[7]=0,y[8]=0,y[9]=0,y[10]=u,y[11]=-1,y[12]=0,y[13]=0,y[14]=l,y[15]=0,y},f.getSseDenominator=function(p){return 2/p[5]},f.getPerspectiveParams=function(p){var g=p,w=g[10],_=(w-1)/(w+1),y=g[14]*(_-1)/(-2*_),h=_*y,d=2*y/g[0],u=(d+g[8]*d)/2,l=u-d,v=2*y/g[5],b=(v+g[9]*v)/2;return{n:y,f:h,r:u,l,t:b,b:b-v}},f.resetNearFar=function(p,g,w,_,y,h,d,u){var l=p/d;return{l:w*=l,r:_*=l,b:y*=l,t:h*=l,n:d=p,f:g}},f.getFovAndAspectRatio=function(p,g,w,_,y,h){var d=(p+g)/2,u=(w+_)/2,l=g-d,v=_-u,b=2*Math.atan(l/y),E=2*Math.atan(v/y);return{xOffset:d,yOffset:u,fov:b>E?b:E,hFov:b,vFov:E,aspectRatio:l/v}}},7720:function(o,s,a){var c,f=this&&this.__extends||(c=function(y,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(d[l]=u[l])},c(y,h)},function(y,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function d(){this.constructor=y}c(y,h),y.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}),m=this&&this.__values||function(y){var h=typeof Symbol=="function"&&Symbol.iterator,d=h&&y[h],u=0;if(d)return d.call(y);if(y&&typeof y.length=="number")return{next:function(){return y&&u>=y.length&&(y=void 0),{value:y&&y[u++],done:!y}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.UiTreeObject=void 0;var p=a(1662),g={checked:1,unchecked:2,indeterminate:3},w=["checked","unchecked","indeterminate"],_=function(y){function h(d){var u=y.call(this)||this;u._treeItem=d,u._collapsed=u.disposeVar((0,p.react)(!1)),u._checkedStatus=u.disposeVar((0,p.react)("unchecked")),u._selected=u.disposeVar((0,p.react)(!1)),u._moveToPositionMode=u.disposeVar((0,p.react)("none")),u._updateCheckedStatusFromChildrenEvent=u.disposeVar(new p.Event);var l=function(){return u._treeItem.tree&&u._treeItem.tree.itemsChanged.emit([u._treeItem])};u.dispose(u._collapsed.changed.disposableOn(l)),u.dispose(u._checkedStatus.changed.disposableOn(l)),u.dispose(u._selected.changed.disposableOn(l)),u.dispose(u._moveToPositionMode.changed.disposableOn(l)),u.dispose(u._checkedStatus.changed.disposableOn(function(){return u._treeItem.parent&&u._treeItem.parent.uiTreeObject.updateCheckedStatusFromChildren()})),u.dispose(u._treeItem.childrenChangedEvent.disposableOn(function(){u.updateCheckedStatusFromChildren()}));var v=u.disposeVar((0,p.createNextAnimateFrameEvent)(u._updateCheckedStatusFromChildrenEvent));return u.dispose(v.disposableOn(function(){if(u._treeItem.children){var b=0;(0,p.forEachWithBreak)(u._treeItem.children,function(E){return(b|=g[E.uiTreeObject.checkedStatus])==3}),b>0&&(u._checkedStatus.value=w[b-1])}})),u.dispose(u._treeItem.childrenResetedEvent.disposableOn(function(b){b||u.checkedStatus!=="indeterminate"||(u._checkedStatus.value="unchecked")})),u.dispose(u._selected.changed.disposableOn(function(b){var E=u._treeItem.tree;E&&function(S,P,C){if(C===void 0&&(C=!0),P)S.selectedItems.push(u._treeItem);else{var x=S.selectedItems.indexOf(u._treeItem);x===-1?C&&console.error("selectedItems index -1"):S.selectedItems.splice(x,1)}}(E,b)})),u.dispose(function(){return u.selected=!1}),u}return f(h,y),Object.defineProperty(h.prototype,"treeItem",{get:function(){return this._treeItem},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"collapsed",{get:function(){return this._collapsed.value},set:function(d){this._collapsed.value=d},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"collapsedChanged",{get:function(){return this._collapsed.changed},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"checkedStatus",{get:function(){return this._checkedStatus.value},enumerable:!1,configurable:!0}),h.prototype.check=function(d){var u,l,v=d?"checked":"unchecked";if(this._checkedStatus.value!==v&&(this._checkedStatus.value=v,this._treeItem.children))try{for(var b=m(this._treeItem.children),E=b.next();!E.done;E=b.next())E.value.uiTreeObject.check(d)}catch(S){u={error:S}}finally{try{E&&!E.done&&(l=b.return)&&l.call(b)}finally{if(u)throw u.error}}},h.prototype.updateCheckedStatusFromChildren=function(){this._updateCheckedStatusFromChildrenEvent.emit()},Object.defineProperty(h.prototype,"checkedStatusChanged",{get:function(){return this._checkedStatus.changed},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"selected",{get:function(){return this._selected.value},set:function(d){this._selected.value=d},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"selectedChanged",{get:function(){return this._selected.changed},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"moveToPositionMode",{get:function(){return this._moveToPositionMode.value},set:function(d){this._moveToPositionMode.value=d},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"moveToPositionModeChanged",{get:function(){return this._moveToPositionMode.changed},enumerable:!1,configurable:!0}),h}(p.Destroyable);s.UiTreeObject=_},7793:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.createGuid=void 0,s.createGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var c=16*Math.random()|0;return(a==="x"?c:3&c|8).toString(16)})}},7941:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0})},7963:function(o,s,a){var c,f=this&&this.__extends||(c=function(E,S){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,C){P.__proto__=C}||function(P,C){for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(P[x]=C[x])},c(E,S)},function(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function P(){this.constructor=E}c(E,S),E.prototype=S===null?Object.create(S):(P.prototype=S.prototype,new P)});Object.defineProperty(s,"__esModule",{value:!0}),s.ComplexImage=s.getTypeFromImageUri=void 0;var m=a(1662),p=a(1662),g=a(3815),w=a(7014),_=a(9409),y=a(1851),h=a(3096),d=a(5925),u=a(5210),l=a(1291);function v(E){var S=E.substring(E.lastIndexOf(".")+1);return b.suffixTypes[S]}s.getTypeFromImageUri=v;var b=function(E){function S(){var P=E.call(this)||this;return P._enabled=P.disposeVar((0,p.react)(!1)),P._uri=P.disposeVar((0,p.react)("")),P._type=P.disposeVar((0,p.react)(void 0)),P._size=P.disposeVar((0,p.reactArrayWithUndefined)(void 0)),P._pixelFormat=P.disposeVar((0,p.react)("RGBA")),P._flipY=P.disposeVar((0,p.react)(!0)),P._crossOriginReact=P.disposeVar((0,p.react)("")),P._autoplayReact=P.disposeVar((0,p.react)(!0)),P._loopReact=P.disposeVar((0,p.react)(!0)),P._copyTextureEvent=P.disposeVar(new m.Event),P._imageProcessingResettingEvent=P.disposeVar((0,m.createNextAnimateFrameEvent)(P.enabledChanged,P.uriChanged,P.typeChanged)),P._imageProcessingResetting=P.disposeVar(new g.ObjResettingWithEvent(P._imageProcessingResettingEvent,function(){do{if(!P.enabled||!P.uri)break;var C=P.type;if(C||(C=v(P.uri)),!C)break;if(C==="img")return new w.ImageProcessing(P,P.uri);if(C==="video")return new h.VideoProcessing(P,P.uri);if(C==="gif")return new d.GifProcessing(P,P.uri);if(C==="hls")return new u.HlsProcessing(P,P.uri);if(C==="flv")return new l.FlvProcessing(P,P.uri)}while(!1)})),P._createNativeTextureEvent=P.disposeVar((0,m.createNextAnimateFrameEvent)(P.enabledChanged,P.sizeChanged,P.pixelFormatChanged,P.flipYChanged)),P}return f(S,E),Object.defineProperty(S.prototype,"enabled",{get:function(){return this._enabled.value},set:function(P){this._enabled.value=P},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"enabledChanged",{get:function(){return this._enabled.changed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"uri",{get:function(){return this._uri.value},set:function(P){this._uri.value=P},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"uriChanged",{get:function(){return this._uri.changed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"type",{get:function(){return this._type.value},set:function(P){this._type.value=P},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"typeChanged",{get:function(){return this._type.changed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"size",{get:function(){return this._size.value},set:function(P){this._size.value=P},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"sizeChanged",{get:function(){return this._size.changed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"pixelFormat",{get:function(){return this._pixelFormat.value},set:function(P){this._pixelFormat.value=P},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"pixelFormatChanged",{get:function(){return this._pixelFormat.changed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"flipY",{get:function(){return this._flipY.value},set:function(P){this._flipY.value=P},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"flipYChanged",{get:function(){return this._flipY.changed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"crossOrigin",{get:function(){return this._crossOriginReact.value},set:function(P){this._crossOriginReact.value=P},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"crossOriginChanged",{get:function(){return this._crossOriginReact.changed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"autoplay",{get:function(){return this._autoplayReact.value},set:function(P){this._autoplayReact.value=P},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"autoplayChanged",{get:function(){return this._autoplayReact.changed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"loop",{get:function(){return this._loopReact.value},set:function(P){this._loopReact.value=P},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"loopChanged",{get:function(){return this._loopReact.changed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"copyTextureEvent",{get:function(){return this._copyTextureEvent},enumerable:!1,configurable:!0}),S.prototype.copyTexture=function(P){this._createNativeTextureEvent.flush(),this._copyTextureEvent.emit(P)},Object.defineProperty(S.prototype,"imageProcessingResetting",{get:function(){return this._imageProcessingResetting},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"createNativeTextureEvent",{get:function(){return this._createNativeTextureEvent},enumerable:!1,configurable:!0}),S.prototype.copyFromCanvas=function(P){P.width<=0||P.height<=0?console.warn("canvas.width <= 0 || canvas.height <= 0"):(this.size=[P.width,P.height],this.pixelFormat="RGBA",this.copyTexture({source:P}))},S.types=y.complexImageTypes,S.czmPixelFormats=_.czmPixelFormats,S.suffixTypes={png:"img",jpg:"img",svg:"img",webp:"img",gif:"gif",mp4:"video",mov:"video",webm:"video",flv:"flv",m3u8:"hls"},S}(m.Destroyable);s.ComplexImage=b},8042:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s._transpose=void 0;var c=a(2731);s._transpose=function(f,m){var p=f[1],g=f[2],w=f[3],_=f[6],y=f[7],h=f[11];return(m=m||(0,c.createNumbers)(16))[0]=f[0],m[1]=f[4],m[2]=f[8],m[3]=f[12],m[4]=p,m[5]=f[5],m[6]=f[9],m[7]=f[13],m[8]=g,m[9]=_,m[10]=f[10],m[11]=f[14],m[12]=w,m[13]=y,m[14]=h,m[15]=f[15],m}},8055:function(o,s){var a,c=this&&this.__extends||(a=function(m,p){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,w){g.__proto__=w}||function(g,w){for(var _ in w)Object.prototype.hasOwnProperty.call(w,_)&&(g[_]=w[_])},a(m,p)},function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=m}a(m,p),m.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)});Object.defineProperty(s,"__esModule",{value:!0}),s.CancelError=void 0;var f=function(m){function p(){return m!==null&&m.apply(this,arguments)||this}return c(p,m),p}(Error);s.CancelError=f},8089:function(o,s,a){var c=this&&this.__read||function(P,C){var x=typeof Symbol=="function"&&P[Symbol.iterator];if(!x)return P;var O,I,N=x.call(P),T=[];try{for(;(C===void 0||C-- >0)&&!(O=N.next()).done;)T.push(O.value)}catch(R){I={error:R}}finally{try{O&&!O.done&&(x=N.return)&&x.call(N)}finally{if(I)throw I.error}}return T},f=this&&this.__spreadArray||function(P,C,x){if(x||arguments.length===2)for(var O,I=0,N=C.length;I<N;I++)!O&&I in C||(O||(O=Array.prototype.slice.call(C,0,I)),O[I]=C[I]);return P.concat(O||Array.prototype.slice.call(C))};Object.defineProperty(s,"__esModule",{value:!0}),s.Matrix4=void 0;var m=a(4915),p=a(2731),g=a(9549),w=a(9898),_=a(5985),y=a(8533),h=a(4209),d=a(6021),u=a(4601),l=a(2830),v=a(8042),b=a(6680),E=a(723),S=a(3300);(function(P){function C(R,A,B){return(0,b._fromMatrix3AndTranslation)(R,A,B)}P.getElementIndex=function(R,A){if(R<0||R>3||A<0||A>3)throw new Error("column < 0 || column > 3 || row < 0 || row > 3");return 4*R+A},P.getColumn=function(R,A,B){return(0,y._getColumn)(R,A,B)},P.setColumn=function(R,A,B,k){return(0,y._setColumn)(R,A,B,k)},P.getRow=function(R,A,B){return(0,u._getRow)(R,A,B)},P.setRow=function(R,A,B,k){(0,u._setRow)(R,A,B,k)},P.getTranslation=function(R,A){return(0,l._getTranslation)(R,A)},P.setTranslation=function(R,A,B){return(0,l._setTranslation)(R,A,B)},P.getScale=function(R,A){return(0,S._getScale)(R,A)},P.setScale=function(R,A,B){return(0,S._setScale)(R,A,B)},P.getMaximumScale=function(R){return(0,S._getMaximumScale)(R)},P.multiply=function(R,A,B){return(0,d._multiply)(R,A,B)},P.multiplyTransformation=function(R,A,B){return(0,d._multiplyTransformation)(R,A,B)},P.multiplyByMatrix3=function(R,A,B){return(0,d._multiplyByMatrix3)(R,A,B)},P.multiplyByTranslation=function(R,A,B){return(0,d._multiplyByTranslation)(R,A,B)},P.multiplyByUniformScale=function(R,A,B){(0,d._multiplyByUniformScale)(R,A,B)},P.multiplyByScale=function(R,A,B){return(0,d._multiplyByScale)(R,A,B)},P.multiplyByVector=function(R,A,B){return(0,d._multiplyByVector)(R,A,B)},P.multiplyByPointAsVector=function(R,A,B){return(0,d._multiplyByPointAsVector)(R,A,B)},P.affineMultiplyByPoint=function(R,A,B){return(0,d._affineMultiplyByPoint)(R,A,B)},P.multiplyByPoint=function(R,A,B){return(0,d._multiplyByPoint)(R,A,B)},P.continuousMultiply=function(R,A){for(var B=[],k=2;k<arguments.length;k++)B[k-2]=arguments[k];return d._continuousMultiply.apply(void 0,f([R,A],c(B),!1))},P.transpose=function(R,A){return(0,v._transpose)(R,A)},P.getMatrix3=function(R,A){return(A=A||(0,p.createNumbers)(9))[0]=R[0],A[1]=R[1],A[2]=R[2],A[3]=R[4],A[4]=R[5],A[5]=R[6],A[6]=R[8],A[7]=R[9],A[8]=R[10],A},P.setMatrix3=function(R,A){(A=A||w.Vector.clone(P.IDENTITY))[0]=R[0],A[1]=R[1],A[2]=R[2],A[4]=R[3],A[5]=R[4],A[6]=R[5],A[8]=R[6],A[9]=R[7],A[10]=R[8]},P.inverse=function(R,A){return(0,h.inverse)(R,A)},P.inverseTransformation=function(R,A){return(0,E._inverseTransformation)(R,A)},P.IDENTITY=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),P.ZERO=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),P.fromTranslation=function(R,A){return(0,b._fromTranslation)(R,A)},P.fromMatrix3AndTranslation=C;var x=(0,p.createNumbers)(9);P.fromRotateQuatAndTranslation=function(R,A,B){return m.Matrix3.fromQuaternion(R,x),C(x,A,B)},P.fromDirectionUpRightAndTranslation=function(R,A,B,k,z){return(0,b._fromDirectionUpRightAndTranslation)(R,A,B,k,z)},P.fromScale=function(R,A){return w.Vector.set(A,R[0],0,0,0,0,R[1],0,0,0,0,R[2],0,0,0,0,1)};var O=g.Quaternion.fromAxisAngle([1,0,0],.5*Math.PI),I=m.Matrix3.fromQuaternion(O);P.Z2NY=P.fromMatrix3AndTranslation(I);var N=(0,p.createNumbers)(4),T=(0,p.createNumbers)(9);P.fromAxisAngle=function(R,A,B){return g.Quaternion.fromAxisAngle(R,A,N),m.Matrix3.fromQuaternion(N,T),P.fromMatrix3AndTranslation(T,_.Vector3.ZERO,B)}})(s.Matrix4||(s.Matrix4={}))},8106:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(6148),s),f(a(9972),s),f(a(9374),s),f(a(6888),s),f(a(1801),s),f(a(5582),s),f(a(4661),s),f(a(1943),s),f(a(2051),s)},8144:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getIterator=void 0,s.getIterator=function(a){var c;if(typeof a.next=="function")c=a;else{if(typeof a[Symbol.iterator]!="function")throw new Error("iteratorOrIterable error!");c=a[Symbol.iterator]()}return c}},8193:function(o,s,a){var c,f=this&&this.__extends||(c=function(g,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,y){_.__proto__=y}||function(_,y){for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&(_[h]=y[h])},c(g,w)},function(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function _(){this.constructor=g}c(g,w),g.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)}),m=this&&this.__read||function(g,w){var _=typeof Symbol=="function"&&g[Symbol.iterator];if(!_)return g;var y,h,d=_.call(g),u=[];try{for(;(w===void 0||w-- >0)&&!(y=d.next()).done;)u.push(y.value)}catch(l){h={error:l}}finally{try{y&&!y.done&&(_=d.return)&&_.call(d)}finally{if(h)throw h.error}}return u};Object.defineProperty(s,"__esModule",{value:!0}),s.ToolTipDiv=void 0;var p=function(g){function w(){var _=g.call(this)||this;_._text="";var y=document.createElement("div");_._div=y,y.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible; transition: opacity 0.5s;";var h=document.createElement("div");h.style.cssText="position: absolute; left: 0px; bottom: 0px; transform: translateX(-50%); margin: 0; padding: 0; pointer-events: none;";var d=document.createElement("div");return d.style.cssText="position: relative; background-color: rgba(0, 0, 0, 0.7); border-radius: 5px; padding: 3px; pointer-events: all; color: white; white-space: nowrap;",d.innerText=_._text,_._div.appendChild(h),h.appendChild(d),_._contentContainer=d,_._div=y,_.dispose(_.winPosChanged.disposableOn(function(u){var l=m(u,2),v=l[0],b=l[1];_._div.style.left="".concat(v,"px"),_._div.style.top="".concat(b-50,"px")})),_.dispose(_.opacityChanged.disposableOn(function(u){_._div.style.opacity="".concat(u)})),_.dispose(_.showChanged.disposableOn(function(u){_._div.style.visibility=u?"visible":"hidden"})),_}return f(w,g),Object.defineProperty(w.prototype,"element",{get:function(){return this._div},enumerable:!1,configurable:!0}),w.prototype.reset=function(){this.opacity=1,this.show=!0},Object.defineProperty(w.prototype,"text",{get:function(){return this._text},set:function(_){this._text!==_&&(this._text=_,this._contentContainer.innerText=_)},enumerable:!1,configurable:!0}),w}(a(7324).FloatDiv);s.ToolTipDiv=p},8196:function(o,s,a){var c=this&&this.__values||function(_){var y=typeof Symbol=="function"&&Symbol.iterator,h=y&&_[y],d=0;if(h)return h.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&d>=_.length&&(_=void 0),{value:_&&_[d++],done:!_}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},f=this&&this.__read||function(_,y){var h=typeof Symbol=="function"&&_[Symbol.iterator];if(!h)return _;var d,u,l=h.call(_),v=[];try{for(;(y===void 0||y-- >0)&&!(d=l.next()).done;)v.push(d.value)}catch(b){u={error:b}}finally{try{d&&!d.done&&(h=l.return)&&h.call(l)}finally{if(u)throw u.error}}return v};Object.defineProperty(s,"__esModule",{value:!0}),s.ProcessingStarter=void 0;var m=a(7372),p=a(1662),g=a(8055),w=function(){function _(y){this._startParams=y,this._cancelled=!1,this._cancelsMap=new Map}return Object.defineProperty(_.prototype,"disposer",{get:function(){var y=this;return this._disposer||(this._disposer=new m.Destroyable,this._disposer.dispose(function(){return y._disposer=void 0})),this._disposer},enumerable:!1,configurable:!0}),_.prototype.cancel=function(y){var h,d,u;if(!this._cancelled){this._cancelled=!0,(u=this._disposer)===null||u===void 0||u.destroy(),this._cancelError=y;try{for(var l=c(this._cancelsMap.values()),v=l.next();!v.done;v=l.next())(0,v.value)(y)}catch(b){h={error:b}}finally{try{v&&!v.done&&(d=l.return)&&d.call(l)}finally{if(h)throw h.error}}this._cancelsMap.clear()}},_.prototype.check=function(){var y;if(this._cancelled)throw(y=this._cancelError)!==null&&y!==void 0?y:new g.CancelError("cancel from CancelManager!")},Object.defineProperty(_.prototype,"cancelFuncsNum",{get:function(){return(0,p.reduce)(this._cancelsMap.keys(),function(y){return y+1},0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"processingID",{get:function(){return this._startParams.processingID},enumerable:!1,configurable:!0}),_.prototype.promises=function(){for(var y=this,h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];return h.map(function(u){var l=f(u,2),v=l[0],b=l[1];return y._cancelsMap.set(b,v),b.finally(function(){return y._cancelsMap.delete(b)})})},_.prototype.promise=function(y){var h=this,d=f(y,2),u=d[0],l=d[1];return this._cancelsMap.set(l,u),l.finally(function(){return h._cancelsMap.delete(l)})},_.prototype.promiseAny=function(y){var h=this,d=[],u=y.map(function(l){var v=f(l,2),b=v[0],E=v[1];return h._cancelsMap.set(E,b),d.push(b),E.finally(function(){return h._cancelsMap.delete(E)})});return Promise.any(u).finally(function(){return d.forEach(function(l){return l(new g.CancelError("cancel from promiseAny!"))})})},_.prototype.promiseAll=function(y){var h=this,d=[],u=y.map(function(l){var v=f(l,2),b=v[0],E=v[1];return h._cancelsMap.set(E,b),d.push(b),E.finally(function(){return h._cancelsMap.delete(E)})});return Promise.all(u).finally(function(){return d.forEach(function(l){return l(new g.CancelError("cancel from promiseAll!"))})})},_.prototype.promiseRace=function(y){var h=this,d=[],u=y.map(function(l){var v=f(l,2),b=v[0],E=v[1];return h._cancelsMap.set(E,b),d.push(b),E.finally(function(){return h._cancelsMap.delete(E)})});return Promise.race(u).finally(function(){return d.forEach(function(l){return l(new g.CancelError("cancel from promiseRace!"))})})},_.prototype.checkAndPromises=function(){for(var y=this,h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];return h.map(function(u){var l=f(u,2),v=l[0],b=l[1];return y._cancelsMap.set(b,v),b.finally(function(){return y._cancelsMap.delete(b),y.check()})})},_.prototype.checkAndPromise=function(y){var h=this;return y instanceof Promise?y.finally(function(){return h.check()}):this.promise(y).finally(function(){return h.check()})},_.prototype.complete=function(y){var h;this.cancelFuncsNum!==0&&console.warn("complete: this.cancelFuncsNum(".concat(this.cancelFuncsNum,")不为0!")),(h=this._disposer)===null||h===void 0||h.destroy(),this._cancelsMap.clear(),this._startParams.completeFunc(y)},_.prototype.error=function(y){var h;(h=this._disposer)===null||h===void 0||h.destroy(),this._cancelsMap.clear(),this._startParams.errorFunc(y)},_.prototype.progressFunc=function(y){this._startParams.progressFunc(y)},_.prototype.forceCancel=function(y){return this._startParams.cancelFunc(y)},_}();s.ProcessingStarter=w},8301:function(o,s,a){var c,f=this&&this.__extends||(c=function(u,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(v[E]=b[E])},c(u,l)},function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function v(){this.constructor=u}c(u,l),u.prototype=l===null?Object.create(l):(v.prototype=l.prototype,new v)}),m=this&&this.__values||function(u){var l=typeof Symbol=="function"&&Symbol.iterator,v=l&&u[l],b=0;if(v)return v.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&b>=u.length&&(u=void 0),{value:u&&u[b++],done:!u}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},p=this&&this.__read||function(u,l){var v=typeof Symbol=="function"&&u[Symbol.iterator];if(!v)return u;var b,E,S=v.call(u),P=[];try{for(;(l===void 0||l-- >0)&&!(b=S.next()).done;)P.push(b.value)}catch(C){E={error:C}}finally{try{b&&!b.done&&(v=S.return)&&v.call(S)}finally{if(E)throw E.error}}return P},g=this&&this.__spreadArray||function(u,l,v){if(v||arguments.length===2)for(var b,E=0,S=l.length;E<S;E++)!b&&E in l||(b||(b=Array.prototype.slice.call(l,0,E)),b[E]=l[E]);return u.concat(b||Array.prototype.slice.call(l))};Object.defineProperty(s,"__esModule",{value:!0}),s.Tree=void 0;var w=a(1662),_=a(9082),y=a(3315),h=a(8368),d=function(u){function l(v){var b=u.call(this)||this;return b._root=b.disposeVar(new _.TreeItem(b,!0,"_ROOT")),b._itemChildrenChanged=b.disposeVar(new w.Event),b._itemChildrenToChange=b.disposeVar(new w.Event),b._itemsAdded=b.disposeVar(new w.Event),b._itemsDeleted=b.disposeVar(new w.Event),b._itemsChanged=b.disposeVar(new w.Event),b._transactionStack=0,b._addedItems=new Set,b._deletedItems=new Set,b._selectedItems=b.disposeVar(new w.ObservableArray),b._itemDivHeight=b.disposeVar((0,w.react)(l.defaultItemDivHeight)),b._forceRedrawEvent=b.disposeVar(new w.Event),b._uiTree=b.disposeVar(new y.UiTree(b)),b._root._tree.value=b,b.dispose(b._itemChildrenToChange.disposableOn(function(E,S){var P,C,x,O;if(E.children){try{for(var I=m(S),N=I.next();!N.done;N=I.next()){for(var T=N.value,R=T.start,A=T.deleteCount,B=T.items,k=R;k<R+A;++k){var z=E.children.get(k);b._deletedItems.has(z)?console.error("this._deletedItems.has(currentItem(".concat(z.id,"))")):b._deletedItems.add(z)}try{for(var j=(x=void 0,m(B)),L=j.next();!L.done;L=j.next())z=L.value,b._deletedItems.has(z)?b._deletedItems.delete(z):b._addedItems.add(z)}catch(F){x={error:F}}finally{try{L&&!L.done&&(O=j.return)&&O.call(j)}finally{if(x)throw x.error}}}}catch(F){P={error:F}}finally{try{N&&!N.done&&(C=I.return)&&C.call(I)}finally{if(P)throw P.error}}b._execTransaction()}else console.error("!item.children")})),v!==void 0&&(b.itemDivHeight=v),b}return f(l,u),Object.defineProperty(l.prototype,"selectedItems",{get:function(){return this._selectedItems},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"lastSelectedItem",{get:function(){return this._selectedItems.length>0?this._selectedItems.get(this._selectedItems.length-1):void 0},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"itemDivHeight",{get:function(){return this._itemDivHeight.value},set:function(v){this._itemDivHeight.value=v},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"itemDivHeightChanged",{get:function(){return this._itemDivHeight.changed},enumerable:!1,configurable:!0}),l.prototype.forceRedraw=function(){this._forceRedrawEvent.emit()},Object.defineProperty(l.prototype,"uiTree",{get:function(){return this._uiTree},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"root",{get:function(){return this._root},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"children",{get:function(){return this._root.children},enumerable:!1,configurable:!0}),l.prototype.getDescendants=function(v){return this._root.getDescendants(v)},l.prototype.getTreeItemFromId=function(v){var b,E,S=void 0;try{for(var P=m(this.getDescendants()),C=P.next();!C.done;C=P.next()){var x=C.value;if(x.id===v){S=x;break}}}catch(O){b={error:O}}finally{try{C&&!C.done&&(E=P.return)&&E.call(P)}finally{if(b)throw b.error}}return S},l.prototype._startTransaction=function(){this._transactionStack===0&&(this._deletedItems.size>0&&(console.warn("this._deletedItems.size > 0"),this._deletedItems.clear()),this._addedItems.size>0&&(console.warn("this._addedItems.size > 0"),this._addedItems.clear())),++this._transactionStack},l.prototype._stopTransaction=function(){--this._transactionStack,this._execTransaction()},l.prototype._execTransaction=function(){this._transactionStack===0&&(this._deletedItems.size>0&&(this._itemsDeleted.emit(g([],p(this._deletedItems),!1)),this._deletedItems.clear()),this._addedItems.size>0&&(this._itemsAdded.emit(g([],p(this._addedItems),!1)),this._addedItems.clear()))},Object.defineProperty(l.prototype,"itemChildrenChanged",{get:function(){return this._itemChildrenChanged},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"itemChildrenToChange",{get:function(){return this._itemChildrenToChange},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"itemsChanged",{get:function(){return this._itemsChanged},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"itemsAdded",{get:function(){return this._itemsAdded},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"itemsDeleted",{get:function(){return this._itemsDeleted},enumerable:!1,configurable:!0}),l.defaultItemDivHeight=24,l.canMoveToTreeItem=h.canMoveToTreeItem,l.moveToTreeItem=h.moveToTreeItem,l.canMoveToTreeItems=h.canMoveToTreeItems,l.moveToTreeItems=h.moveToTreeItems,l}(w.Destroyable);s.Tree=d},8368:function(o,s,a){var c=this&&this.__values||function(g){var w=typeof Symbol=="function"&&Symbol.iterator,_=w&&g[w],y=0;if(_)return _.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&y>=g.length&&(g=void 0),{value:g&&g[y++],done:!g}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.moveToTreeItems=s.canMoveToTreeItems=s.moveToTreeItem=s.canMoveToTreeItem=void 0;var f=a(1662);function m(g,w,_){if(g.tree!==w.tree||g===w||g.isAncestorOf(w)||g.tree!==w.tree||!g.parent)return!1;if(!g.parent.children)throw console.error("当前节点的父节点没有子节点?这是不可能的!"),new Error("当前节点的父节点没有子节点?这是不可能的!");return!(w===g||g.isAncestorOf(w)||_!=="inner"&&!w.parent||_==="inner"&&!w.children)}function p(g,w,_){if(g.tree&&w.tree&&g.tree===w.tree)if(g.parent){if(!g.parent.children)throw console.error("当前节点的父节点没有子节点?这是不可能的!"),new Error("当前节点的父节点没有子节点?这是不可能的!");if(w!==g)if(g.isAncestorOf(w))console.warn("当前节点不能拖放到它自身的后代节点之上!");else if(_==="inner"||w.parent)if(_!=="inner"||w.children){g.tree._startTransaction();var y=g.parent.children.indexOf(g);if(g.parent.children.splice(y,1),_!=="inner"){var h=w.parent;if(!h||!h.children)throw new Error("!parent");var d=h.children.indexOf(w);_==="before"?h.children.splice(d,0,g):_==="after"&&h.children.splice(d+1,0,g)}else w.children.push(g);g.tree._stopTransaction()}else console.warn("无法移动到目标节点的子节点中,因为目标节点不是组节点!");else console.warn("目标节点没有父节点,无法拖放!");else console.warn("自身不能拖放到自身!")}else console.warn("当前节点没有父节点,那么该节点无法被移动!")}s.canMoveToTreeItem=m,s.moveToTreeItem=p,s.canMoveToTreeItems=function(g,w,_){return(0,f.every)(g,function(y){return m(y,w,_)})},s.moveToTreeItems=function(g,w,_){var y,h;try{for(var d=c(g),u=d.next();!u.done;u=d.next()){var l=u.value;m(l,w,_)?p(l,w,_):console.warn("treeItem(id: ".concat(l.id,") cannot move..."))}}catch(v){y={error:v}}finally{try{u&&!u.done&&(h=d.return)&&h.call(d)}finally{if(y)throw y.error}}}},8421:function(o,s,a){var c,f=this&&this.__extends||(c=function(g,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,y){_.__proto__=y}||function(_,y){for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&(_[h]=y[h])},c(g,w)},function(g,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function _(){this.constructor=g}c(g,w),g.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)});Object.defineProperty(s,"__esModule",{value:!0}),s.unLoading=s.UnLoading=void 0;var m=a(1662),p=function(g){function w(){var _=g.call(this)||this;return _._unloadEvent=_.disposeVar(new m.Event),window.addEventListener("beforeunload",function(){_._unloadEvent.emit(),_.destroy()}),_}return f(w,g),w.prototype.unload=function(_){this.dispose(this._unloadEvent.disposableOn(_,unescape,!0))},w}(m.Destroyable);s.UnLoading=p,s.unLoading=new p},8453:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.loadBASIS=s.CompressedTextureBuffer=void 0;var c=a(9928);Object.defineProperty(s,"CompressedTextureBuffer",{enumerable:!0,get:function(){return c.CompressedTextureBuffer}});var f=a(2075),m=a(3631),p=a(5486),g=a(1662),w=Error,_=new f.TaskProcessor("transcodeBASISToTexture",Number.POSITIVE_INFINITY);s.loadBASIS=function(y,h){if(!y)throw new w("resourceOrUrlOrBuffer is required.");var d;if(d=y instanceof ArrayBuffer||ArrayBuffer.isView(y)?m.when.resolve(y):(0,g.fetchArrayBuffer)(y),(0,p.defined)(d))return d.then(function(u){if((0,p.defined)(u)){var l=[];u instanceof ArrayBuffer?l.push(u):(u.byteOffset===0&&u.byteLength===u.buffer.byteLength||(u=u.slice(0,u.length)),l.push(u.buffer));var v={data:u,textureFormat:h};return _.scheduleTask(v,l)}}).then(function(u){return u||console.error("compressedTextureBuffer is undefined!"),c.CompressedTextureBuffer.clone(u)})}},8466:(o,s)=>{function a(c,f){var m=c*c,p=m*c,g=c+c+c,w=m+m+m,_=p+p+p,y=1-g+w-p,h=g-(w+w)+_,d=w-_,u=p;return f?(f[0]=y,f[1]=h,f[2]=d,f[3]=u,f):[y,h,d,u]}Object.defineProperty(s,"__esModule",{value:!0}),s.computBezierSpline3BaseFactors=s.bezierSpline3=s.bezierSpline3WithBaseFactor=s.getBezierSpline3BaseFactor=void 0,s.getBezierSpline3BaseFactor=a,s.bezierSpline3WithBaseFactor=function(c,f,m,p,g,w,_){for(var y=_??new Array(f),h=0;h<f;++h)y[h]=c[0]*m[h]+c[1]*p[h]+c[2]*g[h]+c[3]*w[h];return y},s.bezierSpline3=function(c,f,m,p,g,w,_){for(var y=a(c),h=_??new Array(f),d=0;d<f;++d)h[d]=y[0]*m[d]+y[1]*p[d]+y[2]*g[d]+y[3]*w[d];return h},s.computBezierSpline3BaseFactors=function(c){for(var f=new Array(c+1),m=1/c,p=0,g=0;g<c;++g)f[g]=a(p),p+=m;return f}},8533:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s._setColumn=s._getColumn=void 0;var c=a(2731),f=a(9898);s._getColumn=function(m,p,g){if(p<0||p>3)throw new Error("index < 0 || index > 3");var w=4*p,_=m[w],y=m[w+1],h=m[w+2],d=m[w+3];return(g=g||(0,c.createNumbers)(4))[0]=_,g[1]=y,g[2]=h,g[3]=d,g},s._setColumn=function(m,p,g,w){if(p<0||p>3)throw new Error("index < 0 || index > 3");var _=4*p;return(w=f.Vector.clone(m,w))[_]=g[0],w[_+1]=g[1],w[_+2]=g[2],w[_+3]=g[3],w}},8576:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(3207),s)},8584:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.downloadLink=void 0,s.downloadLink=function(a,c){var f=document.createElement("a"),m=new MouseEvent("click");f.download=c||"下载",f.href=a,f.dispatchEvent(m)}},8614:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0})},8703:function(o,s,a){var c=this&&this.__values||function(_){var y=typeof Symbol=="function"&&Symbol.iterator,h=y&&_[y],d=0;if(h)return h.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&d>=_.length&&(_=void 0),{value:_&&_[d++],done:!_}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},f=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(s,"__esModule",{value:!0}),s._getCullingVolumeFromProjectionMatrix=void 0;var m=f(a(9812)),p=a(2731),g=a(9898);function w(_,y,h){return _[4*(h-1)+(y-1)]}s._getCullingVolumeFromProjectionMatrix=function(_,y){var h,d,u=_;if((y=y||new m.default([(0,p.createNumbers)(4),(0,p.createNumbers)(4),(0,p.createNumbers)(4),(0,p.createNumbers)(4),(0,p.createNumbers)(4),(0,p.createNumbers)(4)])).planes.length!==6)throw new Error("!target.planes || target.planes.length !== 6");g.Vector.set(y.planes[0],w(u,4,1)+w(u,1,1),w(u,4,2)+w(u,1,2),w(u,4,3)+w(u,1,3),w(u,4,4)+w(u,1,4)),g.Vector.set(y.planes[1],w(u,4,1)-w(u,1,1),w(u,4,2)-w(u,1,2),w(u,4,3)-w(u,1,3),w(u,4,4)-w(u,1,4)),g.Vector.set(y.planes[2],w(u,4,1)+w(u,2,1),w(u,4,2)+w(u,2,2),w(u,4,3)+w(u,2,3),w(u,4,4)+w(u,2,4)),g.Vector.set(y.planes[3],w(u,4,1)-w(u,2,1),w(u,4,2)-w(u,2,2),w(u,4,3)-w(u,2,3),w(u,4,4)-w(u,2,4)),g.Vector.set(y.planes[4],w(u,4,1)+w(u,3,1),w(u,4,2)+w(u,3,2),w(u,4,3)+w(u,3,3),w(u,4,4)+w(u,3,4)),g.Vector.set(y.planes[5],w(u,4,1)-w(u,3,1),w(u,4,2)-w(u,3,2),w(u,4,3)-w(u,3,3),w(u,4,4)-w(u,3,4));try{for(var l=c(y.planes),v=l.next();!v.done;v=l.next()){var b=v.value;g.Vector.normalize(b,b)}}catch(E){h={error:E}}finally{try{v&&!v.done&&(d=l.return)&&d.call(l)}finally{if(h)throw h.error}}return y}},8835:function(o,s,a){var c=this&&this.__read||function(y,h){var d=typeof Symbol=="function"&&y[Symbol.iterator];if(!d)return y;var u,l,v=d.call(y),b=[];try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)b.push(u.value)}catch(E){l={error:E}}finally{try{u&&!u.done&&(d=v.return)&&d.call(v)}finally{if(l)throw l.error}}return b},f=this&&this.__spreadArray||function(y,h,d){if(d||arguments.length===2)for(var u,l=0,v=h.length;l<v;l++)!u&&l in h||(u||(u=Array.prototype.slice.call(h,0,l)),u[l]=h[l]);return y.concat(u||Array.prototype.slice.call(h))};Object.defineProperty(s,"__esModule",{value:!0}),s.bindu=s.bind=s.track=s.getCompleteReactParams=void 0;var m=a(2168),p=a(3915);function g(y){var h=y instanceof p.ReactiveVariable?[y,"value","changed"]:f([],c(y),!1);return h[2]=h[2]||h[1]+"Changed",h}function w(y,h,d,u){u===void 0&&(u=!1),h[2]=h[2]||h[1]+"Changed";var l=function(){var v=h[0][h[1]];y[0][y[1]]=d?d(v):v};return l(),u?h[0][h[2]].disposableWeakOn(l):h[0][h[2]].disposableOn(l)}function _(y,h,d,u,l){return l===void 0&&(l=!1),function(v,b,E,S,P){P===void 0&&(P=!1);var C=w(v,b,E,P),x=w(b,v,S,P);return function(){return C(),x()}}(g(y),g(h),d,u,l)}s.getCompleteReactParams=g,s.track=function(y,h,d,u){return u===void 0&&(u=!1),w(y instanceof p.ReactiveVariable?[y,"value","changed"]:y,h instanceof p.ReactiveVariable?[h,"value","changed"]:h,d,u)},s.bind=_,s.bindu=function(y,h,d,u){u===void 0&&(u=!1);var l=c((0,m.getReactFuncs)(h),1)[0];return _(y,h,function(v){return v??d},function(v){return v===d&&l()===void 0?void 0:v},u)}},8992:function(o,s,a){var c=this&&this.__read||function(p,g){var w=typeof Symbol=="function"&&p[Symbol.iterator];if(!w)return p;var _,y,h=w.call(p),d=[];try{for(;(g===void 0||g-- >0)&&!(_=h.next()).done;)d.push(_.value)}catch(u){y={error:u}}finally{try{_&&!_.done&&(w=h.return)&&w.call(h)}finally{if(y)throw y.error}}return d},f=this&&this.__spreadArray||function(p,g,w){if(w||arguments.length===2)for(var _,y=0,h=g.length;y<h;y++)!_&&y in g||(_||(_=Array.prototype.slice.call(g,0,y)),_[y]=g[y]);return p.concat(_||Array.prototype.slice.call(g))};Object.defineProperty(s,"__esModule",{value:!0}),s.throttle=void 0;var m=a(773);s.throttle=function(p,g,w){w===void 0&&(w=m.defaultStartUpdateFunc);var _=Number.NEGATIVE_INFINITY,y=void 0;return[function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];y=h},w&&w(function(h){h-_>g&&y&&(p.apply(void 0,f([],c(y),!1)),y=void 0,_=h)})||void 0]}},8995:function(o,s,a){var c,f=this&&this.__extends||(c=function(b,E){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,P){S.__proto__=P}||function(S,P){for(var C in P)Object.prototype.hasOwnProperty.call(P,C)&&(S[C]=P[C])},c(b,E)},function(b,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function S(){this.constructor=b}c(b,E),b.prototype=E===null?Object.create(E):(S.prototype=E.prototype,new S)}),m=this&&this.__read||function(b,E){var S=typeof Symbol=="function"&&b[Symbol.iterator];if(!S)return b;var P,C,x=S.call(b),O=[];try{for(;(E===void 0||E-- >0)&&!(P=x.next()).done;)O.push(P.value)}catch(I){C={error:I}}finally{try{P&&!P.done&&(S=x.return)&&S.call(x)}finally{if(C)throw C.error}}return O},p=this&&this.__spreadArray||function(b,E,S){if(S||arguments.length===2)for(var P,C=0,x=E.length;C<x;C++)!P&&C in E||(P||(P=Array.prototype.slice.call(E,0,C)),P[C]=E[C]);return b.concat(P||Array.prototype.slice.call(E))},g=this&&this.__values||function(b){var E=typeof Symbol=="function"&&Symbol.iterator,S=E&&b[E],P=0;if(S)return S.call(b);if(b&&typeof b.length=="number")return{next:function(){return b&&P>=b.length&&(b=void 0),{value:b&&b[P++],done:!b}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.NextMicroTaskEvent=s.NextMicroTask=s.NextAnimationFrame=s.getPromiseFromAsyncFunc=s.getPromiseFromProcessing=s.getProcessingFromPromise=void 0;var w=a(7372),_=a(7372),y=a(5675),h=a(6891);function d(b){for(var E=[],S=1;S<arguments.length;S++)E[S-1]=arguments[S];var P=-1;return[function(C){return P===b.processingID&&b.isRunning&&b.cancel(C)},new Promise(function(C,x){b.isRunning&&b.cancel(),b.reset();var O=b.finishedEvent.disposableOn(function(I){I.status==="Error"?x(I.error):I.status==="Cancelled"?x(I.cancelError):I.status==="Completed"&&C(I.value),O()});b.start.apply(b,p([],m(E),!1)),P=b.processingID})]}s.getProcessingFromPromise=function(b){return new h.ProcessingDeprecated(function(E){var S=E.completeFunc,P=E.errorFunc,C=!1;return b.then(function(x){C||S(x)}).catch(function(x){C||P(x)}),function(){C=!0}})},s.getPromiseFromProcessing=d,s.getPromiseFromAsyncFunc=function(b){for(var E=[],S=1;S<arguments.length;S++)E[S-1]=arguments[S];var P=(0,y.createProcessing)(b),C=m(d.apply(void 0,p([P],m(E),!1)),2);return[C[0],C[1].finally(function(){return P.destroy()})]};var u=function(b){function E(S){return b.call(this,function(P){for(var C=P.completeFunc,x=P.errorFunc,O=[],I=1;I<arguments.length;I++)O[I-1]=arguments[I];var N=requestAnimationFrame(function(T){try{var R=S.apply(void 0,p([],m(O),!1));C(R)}catch(A){x(A)}});return function(){return cancelAnimationFrame(N)}})||this}return f(E,b),E}(h.ProcessingDeprecated);s.NextAnimationFrame=u;var l=function(b){function E(S){return b.call(this,function(P){for(var C,x=P.completeFunc,O=P.errorFunc,I=[],N=1;N<arguments.length;N++)I[N-1]=arguments[N];return new Promise(function(T,R){C=R,T()}).then(function(){x(S.apply(void 0,p([],m(I),!1)))}).catch(O),function(){C&&C()}})||this}return f(E,b),E}(h.ProcessingDeprecated);s.NextMicroTask=l;var v=function(b){function E(){for(var S,P,C=[],x=0;x<arguments.length;x++)C[x]=arguments[x];var O=b.call(this)||this;O._event=new _.Event;try{for(var I=g(C),N=I.next();!N.done;N=I.next()){var T=N.value;O.dispose(T.disposableOn(function(){!R.isRunning&&R.restart()}))}}catch(A){S={error:A}}finally{try{N&&!N.done&&(P=I.return)&&P.call(I)}finally{if(S)throw S.error}}var R=new l(function(){O._event.emit()});return O.dispose(function(){return R.destroy()}),O}return f(E,b),Object.defineProperty(E.prototype,"event",{get:function(){return this._event},enumerable:!1,configurable:!0}),E}(w.Destroyable);s.NextMicroTaskEvent=v},8997:function(o,s,a){var c,f=this&&this.__extends||(c=function(E,S){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,C){P.__proto__=C}||function(P,C){for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(P[x]=C[x])},c(E,S)},function(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function P(){this.constructor=E}c(E,S),E.prototype=S===null?Object.create(S):(P.prototype=S.prototype,new P)}),m=this&&this.__awaiter||function(E,S,P,C){return new(P||(P=Promise))(function(x,O){function I(R){try{T(C.next(R))}catch(A){O(A)}}function N(R){try{T(C.throw(R))}catch(A){O(A)}}function T(R){var A;R.done?x(R.value):(A=R.value,A instanceof P?A:new P(function(B){B(A)})).then(I,N)}T((C=C.apply(E,S||[])).next())})},p=this&&this.__generator||function(E,S){var P,C,x,O,I={label:0,sent:function(){if(1&x[0])throw x[1];return x[1]},trys:[],ops:[]};return O={next:N(0),throw:N(1),return:N(2)},typeof Symbol=="function"&&(O[Symbol.iterator]=function(){return this}),O;function N(T){return function(R){return function(A){if(P)throw new TypeError("Generator is already executing.");for(;O&&(O=0,A[0]&&(I=0)),I;)try{if(P=1,C&&(x=2&A[0]?C.return:A[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,A[1])).done)return x;switch(C=0,x&&(A=[2&A[0],x.value]),A[0]){case 0:case 1:x=A;break;case 4:return I.label++,{value:A[1],done:!1};case 5:I.label++,C=A[1],A=[0];continue;case 7:A=I.ops.pop(),I.trys.pop();continue;default:if(!((x=(x=I.trys).length>0&&x[x.length-1])||A[0]!==6&&A[0]!==2)){I=0;continue}if(A[0]===3&&(!x||A[1]>x[0]&&A[1]<x[3])){I.label=A[1];break}if(A[0]===6&&I.label<x[1]){I.label=x[1],x=A;break}if(x&&I.label<x[2]){I.label=x[2],I.ops.push(A);break}x[2]&&I.ops.pop(),I.trys.pop();continue}A=S.call(E,I)}catch(B){A=[6,B],C=0}finally{P=x=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([T,R])}}},g=this&&this.__asyncValues||function(E){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var S,P=E[Symbol.asyncIterator];return P?P.call(E):(E=typeof _=="function"?_(E):E[Symbol.iterator](),S={},C("next"),C("throw"),C("return"),S[Symbol.asyncIterator]=function(){return this},S);function C(x){S[x]=E[x]&&function(O){return new Promise(function(I,N){(function(T,R,A,B){Promise.resolve(B).then(function(k){T({value:k,done:A})},R)})(I,N,(O=E[x](O)).done,O.value)})}}},w=this&&this.__read||function(E,S){var P=typeof Symbol=="function"&&E[Symbol.iterator];if(!P)return E;var C,x,O=P.call(E),I=[];try{for(;(S===void 0||S-- >0)&&!(C=O.next()).done;)I.push(C.value)}catch(N){x={error:N}}finally{try{C&&!C.done&&(P=O.return)&&P.call(O)}finally{if(x)throw x.error}}return I},_=this&&this.__values||function(E){var S=typeof Symbol=="function"&&Symbol.iterator,P=S&&E[S],C=0;if(P)return P.call(E);if(E&&typeof E.length=="number")return{next:function(){return E&&C>=E.length&&(E=void 0),{value:E&&E[C++],done:!E}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.defaultGetLocalFilePath=s.defaultLocalFileServer=s.LocalFileServer=s.LocalRootDir=s.getFileArrayBuffer=s.getFileJson=s.getFileText=s.getSubEntriesFromDir=void 0;var y=a(7372);function h(E){var S,P,C,x;return m(this,void 0,void 0,function(){var O,I,N,T,R,A,B,k,z,j,L;return p(this,function(F){switch(F.label){case 0:O=[],I=[],N=E.entries(),F.label=1;case 1:F.trys.push([1,6,7,12]),T=!0,R=g(N),F.label=2;case 2:return[4,R.next()];case 3:if(A=F.sent(),S=A.done)return[3,5];x=A.value,T=!1;try{B=w(x,2),k=B[0],z=B[1],(j=z).kind==="file"?O.push(k):j.kind==="directory"&&I.push(k)}finally{T=!0}F.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return L=F.sent(),P={error:L},[3,12];case 7:return F.trys.push([7,,10,11]),T||S||!(C=R.return)?[3,9]:[4,C.call(R)];case 8:F.sent(),F.label=9;case 9:return[3,11];case 10:if(P)throw P.error;return[7];case 11:return[7];case 12:return[2,{files:O,dirs:I}]}})})}function d(E){return m(this,void 0,void 0,function(){return p(this,function(S){switch(S.label){case 0:return[4,E.getFile()];case 1:return[4,S.sent().text()];case 2:return[2,S.sent()]}})})}function u(E){return m(this,void 0,void 0,function(){var S;return p(this,function(P){switch(P.label){case 0:return[4,d(E)];case 1:S=P.sent();try{return[2,JSON.parse(S)]}catch{return[2,void 0]}return[2]}})})}function l(E){return m(this,void 0,void 0,function(){return p(this,function(S){switch(S.label){case 0:return[4,E.getFile()];case 1:return[4,S.sent().arrayBuffer()];case 2:return[2,S.sent()]}})})}s.getSubEntriesFromDir=h,s.getFileText=d,s.getFileJson=u,s.getFileArrayBuffer=l;var v=function(E){function S(P){var C=E.call(this)||this;return C._rootDirHandle=P,C}return f(S,E),Object.defineProperty(S.prototype,"rootDirHandle",{get:function(){return this._rootDirHandle},enumerable:!1,configurable:!0}),S.prototype.getSubFilesAndDirs=function(){return m(this,void 0,void 0,function(){return p(this,function(P){switch(P.label){case 0:return[4,h(this._rootDirHandle)];case 1:return[2,P.sent()]}})})},S.prototype.getDir=function(P){return m(this,void 0,void 0,function(){var C,x,O,I,N,T,R;return p(this,function(A){switch(A.label){case 0:C=this._rootDirHandle,A.label=1;case 1:A.trys.push([1,6,7,8]),x=_(P),O=x.next(),A.label=2;case 2:return O.done?[3,5]:(I=O.value,[4,C==null?void 0:C.getDirectoryHandle(I)]);case 3:if(!(C=A.sent()))return console.log("getDirectoryHandle ".concat(I," failed")),[2,void 0];A.label=4;case 4:return O=x.next(),[3,2];case 5:return[3,8];case 6:return N=A.sent(),T={error:N},[3,8];case 7:try{O&&!O.done&&(R=x.return)&&R.call(x)}finally{if(T)throw T.error}return[7];case 8:return[2,C]}})})},S.prototype.getFile=function(P,C){return m(this,void 0,void 0,function(){var x,O;return p(this,function(I){switch(I.label){case 0:return[4,this.getDir(P)];case 1:if(!(x=I.sent()))return[2,void 0];I.label=2;case 2:return I.trys.push([2,4,,5]),[4,x.getFileHandle(C)];case 3:return[2,I.sent()];case 4:return O=I.sent(),console.error("未能获取当前文件 ".concat(P.join("/"),"/").concat(C," error: ").concat(O),O),[2,void 0];case 5:return[2]}})})},S}(y.Destroyable);s.LocalRootDir=v;var b=function(E){function S(P){var C=E.call(this)||this;return C._prefix=P,C._startRootDirId=0,C._dirMap=new Map,C}return f(S,E),Object.defineProperty(S.prototype,"prefix",{get:function(){return this._prefix},enumerable:!1,configurable:!0}),S.prototype.getRootDirId=function(P){return m(this,void 0,void 0,function(){var C,x,O,I;return p(this,function(N){switch(N.label){case 0:return N.trys.push([0,2,,3]),console.log("window.showDirectoryPicker begin"),[4,window.showDirectoryPicker({id:P,mode:"read"})];case 1:return C=N.sent(),console.log("window.showDirectoryPicker end",C),[3,3];case 2:return x=N.sent(),console.error("LocalFileServer getRootDirId failed: ".concat(x),x),[2,void 0];case 3:return C?(O=++this._startRootDirId,I="".concat(this._prefix).concat(O),this._dirMap.set(I,new v(C)),[2,I]):[2]}})})},S.prototype.getRootDir=function(P){return this._dirMap.get(P)},S.prototype.getFile=function(P){return m(this,void 0,void 0,function(){var C,x,O,I,N,T;return p(this,function(R){switch(R.label){case 0:return(C=P.split("/")).length<2?(console.warn("LocalFileServer getFile failed: ".concat(P)),[2,void 0]):(x=C[0],(O=this._dirMap.get(x))?(I=C.slice(1,C.length-1),N=C[C.length-1],[4,O.getFile(I,N)]):(console.warn("LocalFileServer getFile failed: ".concat(P)),[2,void 0]));case 1:return(T=R.sent())?[2,T]:(console.warn("LocalFileServer getFile failed: ".concat(P)),[2,void 0])}})})},S.prototype.getText=function(P){return m(this,void 0,void 0,function(){var C;return p(this,function(x){switch(x.label){case 0:return[4,this.getFile(P)];case 1:return(C=x.sent())?[4,d(C)]:[2,void 0];case 2:return[2,x.sent()]}})})},S.prototype.getArrayBuffer=function(P){return m(this,void 0,void 0,function(){var C;return p(this,function(x){switch(x.label){case 0:return[4,this.getFile(P)];case 1:return(C=x.sent())?[4,l(C)]:[2,void 0];case 2:return[2,x.sent()]}})})},S.prototype.getJson=function(P){return m(this,void 0,void 0,function(){var C;return p(this,function(x){switch(x.label){case 0:return[4,this.getFile(P)];case 1:return(C=x.sent())?[4,u(C)]:[2,void 0];case 2:return[2,x.sent()]}})})},S.prototype.getLocalFilePath=function(P,C,x){return m(this,void 0,void 0,function(){var O,I,N,T;return p(this,function(R){switch(R.label){case 0:return[4,this.getRootDirId(C)];case 1:return(O=R.sent())?(I=this.getRootDir(O))?[4,I.getSubFilesAndDirs()]:(console.warn("getRootDir error!"),[2,void 0]):(console.warn("getRootDirId error!"),[2,void 0]);case 2:return(N=R.sent()).files?(T=P?N.files.filter(function(A){return P.some(function(B){return A.endsWith(B)})}):N.files).length===0?(console.warn("找不到符合要求的文件!"),[2,void 0]):[2,"https://".concat(O,"/").concat(T[0])]:(console.warn("getSubFilesAndDirs error! 找不到符合要求的文件!"),[2,void 0])}})})},S}(y.Destroyable);s.LocalFileServer=b,s.defaultLocalFileServer=new b("xe2_local"),s.defaultGetLocalFilePath=function(E,S,P){return m(this,void 0,void 0,function(){return p(this,function(C){switch(C.label){case 0:return[4,s.defaultLocalFileServer.getLocalFilePath(E,S,P)];case 1:return[2,C.sent()]}})})}},9026:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.replaceStrWithEnv=void 0;var c=a(2220);s.replaceStrWithEnv=function(f){for(;;){var m=f.replace(/\${(.*?)\}/,function(p,g){var w=c.SceneObject.context.getEnv(g);return w===void 0?(console.warn("环境变量(".concat(g,")不存在,无法进行转换")),"{env-error}"):w});if(m===f)break;f=m}return f}},9038:function(o,s,a){var c=this&&this.__createBinding||(Object.create?function(m,p,g,w){w===void 0&&(w=g);var _=Object.getOwnPropertyDescriptor(p,g);_&&!("get"in _?!p.__esModule:_.writable||_.configurable)||(_={enumerable:!0,get:function(){return p[g]}}),Object.defineProperty(m,w,_)}:function(m,p,g,w){w===void 0&&(w=g),m[w]=p[g]}),f=this&&this.__exportStar||function(m,p){for(var g in m)g==="default"||Object.prototype.hasOwnProperty.call(p,g)||c(p,m,g)};Object.defineProperty(s,"__esModule",{value:!0}),f(a(9486),s),f(a(8584),s)},9067:function(o,s,a){var c,f=this&&this.__extends||(c=function(d,u){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,v){l.__proto__=v}||function(l,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(l[b]=v[b])},c(d,u)},function(d,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function l(){this.constructor=d}c(d,u),d.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}),m=this&&this.__read||function(d,u){var l=typeof Symbol=="function"&&d[Symbol.iterator];if(!l)return d;var v,b,E=l.call(d),S=[];try{for(;(u===void 0||u-- >0)&&!(v=E.next()).done;)S.push(v.value)}catch(P){b={error:P}}finally{try{v&&!v.done&&(l=E.return)&&l.call(E)}finally{if(b)throw b.error}}return S},p=this&&this.__spreadArray||function(d,u,l){if(l||arguments.length===2)for(var v,b=0,E=u.length;b<E;b++)!v&&b in u||(v||(v=Array.prototype.slice.call(u,0,b)),v[b]=u[b]);return d.concat(v||Array.prototype.slice.call(u))};Object.defineProperty(s,"__esModule",{value:!0}),s.Event=s.EventListenerHandler=void 0;var g=a(9359),w=a(6583),_=a(4471),y=function(d){function u(){return d!==null&&d.apply(this,arguments)||this}return f(u,d),u}(a(2452).SmartListenerHandler);s.EventListenerHandler=y;var h=function(d){function u(){return d!==null&&d.apply(this,arguments)||this}return f(u,d),Object.defineProperty(u.prototype,"_pipe",{get:function(){var l;return this.__pipe=(l=this.__pipe)!==null&&l!==void 0?l:new _.ListenerPipe,this.__pipe},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"empty",{get:function(){return!this.__pipe||this._pipe.empty},enumerable:!1,configurable:!0}),u.prototype.emit=function(){for(var l,v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];!this.isDestroyed()&&this.beforeCallback&&this.beforeCallback.apply(this,p([],m(v),!1)),!this.isDestroyed()&&(l=this._pipe).do.apply(l,p([],m(v),!1)),!this.isDestroyed()&&this.afterCallback&&this.afterCallback.apply(this,p([],m(v),!1))},u.prototype.on=function(l,v,b,E){b===void 0&&(b=!1);var S=b?this._pipe.unshift(l,v,!1):this._pipe.push(l,v,!1);return(E=E??new y)._reset(S,S._cid),E},u.prototype.disposableOn=function(l,v,b,E){var S=this;b===void 0&&(b=!1);var P=this.on(l,v,b,E);return function(){P.valid&&S.off(P)}},u.prototype.don=function(l,v,b,E){return b===void 0&&(b=!1),this.disposableOn(l,v,b,E)},u.prototype.disposableWeakOn=function(l,v,b,E){b===void 0&&(b=!1);var S=new g.Destroyable,P=function(){!S.isDestroyed()&&S.destroy()};return S.dispose(this.disposableOn(l,v,b,E)),S.dispose(this.toDestroyEvent.disposableOn(P)),P},u.prototype.dwon=function(l,v,b,E){return b===void 0&&(b=!1),this.disposableWeakOn(l,v,b,E)},u.prototype.once=function(l,v,b,E){b===void 0&&(b=!1);var S=b?this._pipe.unshift(l,v,!0):this._pipe.push(l,v,!0);return(E=E??new y)._reset(S,S._cid),E},u.prototype.disposableOnce=function(l,v,b,E){var S=this;b===void 0&&(b=!1);var P=this.once(l,v,b,E);return function(){return P.valid&&S.off(P)}},u.prototype.donce=function(l,v,b,E){var S=this;b===void 0&&(b=!1);var P=this.once(l,v,b,E);return function(){return P.valid&&S.off(P)}},u.prototype.off=function(l){if(!l.valid)throw new Error("handler is not valid!");this._pipe.remove(l._listenerHandler),l._reset()},u.prototype.reset=function(){this._pipe.removeAll()},u.prototype.destroyImp=function(){this.empty||((0,w.oneTimeWarning)("The event is destroying with listeners!"),this._pipe.removeAll())},u}(g.Destroyable);s.Event=h},9082:function(o,s,a){var c,f=this&&this.__extends||(c=function(u,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(v[E]=b[E])},c(u,l)},function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function v(){this.constructor=u}c(u,l),u.prototype=l===null?Object.create(l):(v.prototype=l.prototype,new v)}),m=this&&this.__generator||function(u,l){var v,b,E,S,P={label:0,sent:function(){if(1&E[0])throw E[1];return E[1]},trys:[],ops:[]};return S={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function C(x){return function(O){return function(I){if(v)throw new TypeError("Generator is already executing.");for(;S&&(S=0,I[0]&&(P=0)),P;)try{if(v=1,b&&(E=2&I[0]?b.return:I[0]?b.throw||((E=b.return)&&E.call(b),0):b.next)&&!(E=E.call(b,I[1])).done)return E;switch(b=0,E&&(I=[2&I[0],E.value]),I[0]){case 0:case 1:E=I;break;case 4:return P.label++,{value:I[1],done:!1};case 5:P.label++,b=I[1],I=[0];continue;case 7:I=P.ops.pop(),P.trys.pop();continue;default:if(!((E=(E=P.trys).length>0&&E[E.length-1])||I[0]!==6&&I[0]!==2)){P=0;continue}if(I[0]===3&&(!E||I[1]>E[0]&&I[1]<E[3])){P.label=I[1];break}if(I[0]===6&&P.label<E[1]){P.label=E[1],E=I;break}if(E&&P.label<E[2]){P.label=E[2],P.ops.push(I);break}E[2]&&P.ops.pop(),P.trys.pop();continue}I=l.call(u,P)}catch(N){I=[6,N],b=0}finally{v=E=0}if(5&I[0])throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}([x,O])}}},p=this&&this.__values||function(u){var l=typeof Symbol=="function"&&Symbol.iterator,v=l&&u[l],b=0;if(v)return v.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&b>=u.length&&(u=void 0),{value:u&&u[b++],done:!u}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},g=this&&this.__read||function(u,l){var v=typeof Symbol=="function"&&u[Symbol.iterator];if(!v)return u;var b,E,S=v.call(u),P=[];try{for(;(l===void 0||l-- >0)&&!(b=S.next()).done;)P.push(b.value)}catch(C){E={error:C}}finally{try{b&&!b.done&&(v=S.return)&&v.call(S)}finally{if(E)throw E.error}}return P},w=this&&this.__spreadArray||function(u,l,v){if(v||arguments.length===2)for(var b,E=0,S=l.length;E<S;E++)!b&&E in l||(b||(b=Array.prototype.slice.call(l,0,E)),b[E]=l[E]);return u.concat(b||Array.prototype.slice.call(l))};Object.defineProperty(s,"__esModule",{value:!0}),s.TreeItem=void 0;var _=a(1662),y=a(8368),h=a(7720),d=function(u){function l(v,b,E){b===void 0&&(b=!1);var S=u.call(this)||this;return S._tree=v,S._hasChildren=b,S._parent=S.disposeVar((0,_.react)(void 0)),S._level=S.disposeVar((0,_.react)(0)),S._uiTreeObject=S.disposeVar(new h.UiTreeObject(S)),S._id=E??(0,_.createGuid)(),S._id!=="_ROOT"&&l.wm.has(S._id)&&console.warn("创建了id(".concat(S._id,")相同的树节点,会导致之前的树节点无法索引!")),l.wm.set(S._id,S),S.dispose(function(){S._id==="_ROOT"||l.wm.has(S._id)?l.wm.delete(S._id):console.warn("树节点(".concat(S._id,")不在wm树上!"))}),S.dispose(S._parent.changed.disposableOn(function(){S._updateLevel()})),S.dispose(S._level.changed.disposableOn(function(){var P,C;if(S.children)try{for(var x=p(S.children),O=x.next();!O.done;O=x.next())O.value._updateLevel()}catch(I){P={error:I}}finally{try{O&&!O.done&&(C=x.return)&&C.call(x)}finally{if(P)throw P.error}}})),l.allTreeItems.set(S._id,S),S.dispose(function(){l.allTreeItems.delete(S._id)}),S}return f(l,u),l.getFromId=function(v){return l.wm.get(v)},Object.defineProperty(l.prototype,"uiTreeObject",{get:function(){return this._uiTreeObject},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),l.prototype._updateLevel=function(){this.parent&&(this._level.value=this.parent.level+1)},Object.defineProperty(l.prototype,"parent",{get:function(){return this._parent.value},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"parentChanged",{get:function(){return this._parent.changed},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"children",{get:function(){var v=this;if(this._hasChildren){if(!this._children){var b=this.disposeVar(new _.ObservableArray);this._children=b,this.dispose(b.toChangeEvent.disposableOn(function(P,C){var x,O,I,N;try{for(var T=p(P),R=T.next();!R.done;R=T.next()){for(var A=R.value,B=A.start,k=A.deleteCount,z=A.items,j=B;j<B+k;++j)C.get(j)._parent.value=void 0;try{for(var L=(I=void 0,p(z)),F=L.next();!F.done;F=L.next()){var G=F.value;if(G.parent)throw console.error("请检查新增的treeItem是否正在使用!"),new Error("item.parent should not exist!");G._parent.value=v}}catch(W){I={error:W}}finally{try{F&&!F.done&&(N=L.return)&&N.call(L)}finally{if(I)throw I.error}}}}catch(W){x={error:W}}finally{try{R&&!R.done&&(O=T.return)&&O.call(T)}finally{if(x)throw x.error}}}));var E=new Set,S=new Set;this.dispose(b.toChangeEvent.disposableOn(function(P,C){var x,O,I,N,T,R,A;if(v.tree){E.clear(),S.clear();try{for(var B=p(P),k=B.next();!k.done;k=B.next()){for(var z=k.value,j=z.start,L=z.deleteCount,F=z.items,G=j;G<j+L;++G)E.add(C.get(G));try{for(var W=(I=void 0,p(F)),V=W.next();!V.done;V=W.next()){var U=V.value;S.add(U)}}catch(Y){I={error:Y}}finally{try{V&&!V.done&&(N=W.return)&&N.call(W)}finally{if(I)throw I.error}}}}catch(Y){x={error:Y}}finally{try{k&&!k.done&&(O=B.return)&&O.call(B)}finally{if(x)throw x.error}}try{for(var q=p(E),J=q.next();!J.done;J=q.next())U=J.value,S.has(U)&&(E.delete(U),S.delete(U))}catch(Y){T={error:Y}}finally{try{J&&!J.done&&(R=q.return)&&R.call(q)}finally{if(T)throw T.error}}(A=v.tree)===null||A===void 0||A.itemChildrenToChange.emit(v,P,E,S)}})),this.dispose(b.changedEvent.disposableOn(function(){var P;(P=v.tree)===null||P===void 0||P.itemChildrenChanged.emit(v)})),this.dispose(b.toChangeEvent.disposableOn(function(){for(var P,C=[],x=0;x<arguments.length;x++)C[x]=arguments[x];return v._childrenToChangeEvent&&(P=v._childrenToChangeEvent).emit.apply(P,w([],g(C),!1))})),this.dispose(b.changedEvent.disposableOn(function(){for(var P,C=[],x=0;x<arguments.length;x++)C[x]=arguments[x];return v._childrenChangedEvent&&(P=v._childrenChangedEvent).emit.apply(P,w([],g(C),!1))}))}return this._children}},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"childrenResetedEvent",{get:function(){return this._childrenResetedEvent||(this._childrenResetedEvent=new _.Event),this._childrenResetedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"childrenToChangeEvent",{get:function(){return this._childrenToChangeEvent||(this._childrenToChangeEvent=new _.Event),this._childrenToChangeEvent},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"childrenChangedEvent",{get:function(){return this._childrenChangedEvent||(this._childrenChangedEvent=new _.Event),this._childrenChangedEvent},enumerable:!1,configurable:!0}),l.prototype.resetChildren=function(v){v===void 0&&(v=!1),this._children&&(this._children.length=0),this._hasChildren=v,this._childrenResetedEvent&&this._childrenResetedEvent.emit(v)},l.prototype.getDescendants=function(v){var b,E,S,P,C,x;return m(this,function(O){switch(O.label){case 0:E=[],S=[],(b=this).children&&b.children.length>0&&(!v||v(b))&&(E.push(0),S.push(b.children)),O.label=1;case 1:return E.length>0?(P=E[E.length-1],C=S[S.length-1],[4,x=C.get(P)]):[3,3];case 2:return O.sent(),P<C.length-1?++E[E.length-1]:(S.pop(),E.pop()),x.children&&x.children.length>0&&(!v||v(x))&&(E.push(0),S.push(x.children)),[3,1];case 3:return[2]}})},l.prototype.getAncestors=function(v){var b;return m(this,function(E){switch(E.label){case 0:b=this.parent,E.label=1;case 1:return b?[4,b]:[3,3];case 2:return E.sent(),v&&!v(b)?[3,3]:(b=b.parent,[3,1]);case 3:return[2]}})},l.prototype.isDescendantOf=function(v){var b,E;try{for(var S=p(this.getAncestors()),P=S.next();!P.done;P=S.next())if(P.value===v)return!0}catch(C){b={error:C}}finally{try{P&&!P.done&&(E=S.return)&&E.call(S)}finally{if(b)throw b.error}}return!1},l.prototype.isAncestorOf=function(v){return v.isDescendantOf(this)},Object.defineProperty(l.prototype,"level",{get:function(){return this._level.value},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"levelChanged",{get:function(){return this._level.changed},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"tree",{get:function(){return this._tree},enumerable:!1,configurable:!0}),l.prototype.canMoveTo=function(v,b){return(0,y.canMoveToTreeItem)(this,v,b)},l.prototype.moveTo=function(v,b){(0,y.moveToTreeItem)(this,v,b)},l.prototype.detachFromParent=function(){if(this.parent&&this.parent.children){var v=this.parent.children.indexOf(this);this.parent.children.splice(v,1)}},l.prototype.insertNewTreeItem=function(v,b){if(b&&b.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&v.startsWith("Inner"))return b&&this.children.push(b),!0;if(v==="Inner")return!1;var E=this.parent;if(!E||!E.children)return!1;var S=E.children.indexOf(this);return v.endsWith("Before")?b&&E.children.splice(S,0,b):v.endsWith("After")&&b&&E.children.splice(S+1,0,b),!0},l.wm=new Map,l.allTreeItems=new Map,l}(_.Destroyable);s.TreeItem=d},9122:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.clamp=void 0,s.clamp=function(a,c,f){return c===void 0&&(c=0),f===void 0&&(f=1),a<c?c:a>f?f:a}},9131:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.loadJs=void 0;var a=[];function c(f,m,p){if(a.includes(f))return console.warn("_loadJs ".concat(f," has loaded before!")),void(m&&m());var g=document.getElementsByTagName("head")[0],w=document.createElement("script");w.setAttribute("type","text/javascript"),w.setAttribute("src",f),w.onload=w.onreadystatechange=function(){this.readyState&&this.readyState!=="complete"||(a.push(f),m&&m(),w.onload=w.onreadystatechange=null)},w.onerror=function(_,y,h,d,u){p(u)},g.appendChild(w)}s.loadJs=function(f,m){if(m===void 0&&(m=!0),m){var p=window.L;window.L&&(window.L=void 0);var g=window.define;return window.define&&(window.define=void 0),new Promise(function(w,_){c(f,w,_)}).then(function(){return window.define=g,window.L=p,Promise.resolve()})}return new Promise(function(w,_){c(f,w,_)})}},9181:function(o,s,a){var c,f=this&&this.__extends||(c=function(d,u){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,v){l.__proto__=v}||function(l,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(l[b]=v[b])},c(d,u)},function(d,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function l(){this.constructor=d}c(d,u),d.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}),m=this&&this.__read||function(d,u){var l=typeof Symbol=="function"&&d[Symbol.iterator];if(!l)return d;var v,b,E=l.call(d),S=[];try{for(;(u===void 0||u-- >0)&&!(v=E.next()).done;)S.push(v.value)}catch(P){b={error:P}}finally{try{v&&!v.done&&(l=E.return)&&l.call(E)}finally{if(b)throw b.error}}return S};Object.defineProperty(s,"__esModule",{value:!0}),s.CanvasPrimitivesContext=void 0;var p=a(1662),g=a(8106),w=a(7372),_=a(1023),y=function(d,u){return u.depth-d.depth},h=function(d){function u(){var l=d.call(this)||this;l._pois=[],l._size=[0,0],l._needRedraw=!1,l._needPickRedraw=!1,l._pickColorManager=new _.PickColorMananger;var v=document.createElement("canvas");v.style.width="100%",v.style.height="100%",l._canvasElement=v;var b=v.getContext("2d");if(b===null)throw new Error("cannot get context 2d!");return l._ctx=b,l._offscreenCanvasElement=document.createElement("canvas"),l._offscreenCtx=l._offscreenCanvasElement.getContext("2d"),l._offscreenCtx.imageSmoothingEnabled=!1,l._offscreenCanvasElement2=document.createElement("canvas"),l._offscreenCtx2=l._offscreenCanvasElement2.getContext("2d"),l._offscreenCtx2.imageSmoothingEnabled=!1,l.disposeVar((0,g.createAnimateFrameWithStartValues)(function(){var E=m(l._size,2),S=E[0],P=E[1],C=l._canvasElement,x=C.clientWidth,O=C.clientHeight;S===x&&P===O||(l._size[0]=x,l._size[1]=O,l._canvasElement.width=x,l._canvasElement.height=O,l._offscreenCanvasElement.width=x,l._offscreenCanvasElement.height=O,l._offscreenCanvasElement2.width=x,l._offscreenCanvasElement2.height=O,l._dirty()),l._needRedraw&&(l._needRedraw=!1,l._draw())})).start(),l}return f(u,d),Object.defineProperty(u.prototype,"element",{get:function(){return this._canvasElement},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"pois",{get:function(){return this._pois},enumerable:!1,configurable:!0}),u.prototype._dirty=function(){this._needRedraw=!0,this._needPickRedraw=!0},Object.defineProperty(u.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),u.prototype.addPoi=function(l){var v=this;if((0,p.getExtProp)(l,"listenHandler")===void 0)if(this._pois.indexOf(l)===-1){this._pois.push(l),this._dirty();var b=l._needRedrawEvent;if(b){var E=b.on(function(){v._needRedraw=!0});(0,p.setExtProp)(l,"needRedrawEventHandler",E)}var S=l._needPickRedrawEvent;if(S){var P=S.on(function(){v._needPickRedraw=!0});(0,p.setExtProp)(l,"needPickRedrawEventHandler",P)}}else console.error("同一个poi加了多次!");else console.error("可能有poi重复加载poiManager中!")},u.prototype.removePoi=function(l){var v=this._pois.indexOf(l);if(v!==-1){this._pois.splice(v,1),this._dirty();var b=l._needRedrawEvent;if(b){var E=(0,p.getExtProp)(l,"needRedrawEventHandler");E?b.off(E):console.error("poi没有listenHandler!")}var S=l._needPickRedrawEvent;if(S){var P=(0,p.getExtProp)(l,"needPickRedrawEventHandler");P?S.off(P):console.error("poi没有listenHandler!")}}else console.error("删除一个不存在的poi!")},u.prototype._draw=function(){var l=this;this._pois.sort(y);var v=m(this._size,2),b=v[0],E=v[1];this._ctx.clearRect(0,0,b,E),this._pois.forEach(function(S){return S.draw(l._ctx)})},u.prototype.pick=function(l,v,b,E){return this._needPickRedraw&&(this._needPickRedraw=!1,this._pickDraw()),this._getPickInfo(l,v,b,E)},u.prototype._pickDraw=function(){var l=this;this._pickColorManager.reset(),this._pois.sort(y);var v=m(this._size,2),b=v[0],E=v[1];this._offscreenCtx.clearRect(0,0,b,E),this._pois.forEach(function(S){S.drawForPick(l._offscreenCtx,function(P){var C=m(l._pickColorManager.createPickColor(S,P),3),x=C[0],O=C[1],I=C[2];return"rgb(".concat(x,", ").concat(O,", ").concat(I,")")})})},u.prototype._getPickInfo=function(l,v,b,E){for(var S=this._offscreenCtx.getImageData(l,v,b,E),P=[],C=S.data.length/4,x=0;x<C;++x){var O=S.data[4*x+0],I=S.data[4*x+1],N=S.data[4*x+2];if(S.data[4*x+3]===255){var T=this._pickColorManager.getPickInfoFromColor(O,I,N);if(T&&T.poi&&!P.includes(T)){var R=!0,A=m(this._size,2),B=A[0],k=A[1];this._offscreenCtx2.clearRect(0,0,B,k),T.poi.drawForPick(this._offscreenCtx2,function(G){return"rgb(255, 255, 255)"});var z=this._offscreenCtx2.getImageData(l,v,b,E),j=z.data[4*x+0],L=z.data[4*x+1],F=z.data[4*x+2];z.data[4*x+3],j===255&&L===255&&F===255||(R=!1),R&&P.push(T)}}}return P},u}(w.Destroyable);s.CanvasPrimitivesContext=h},9355:function(o,s,a){var c,f=this&&this.__extends||(c=function(y,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,u){d.__proto__=u}||function(d,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(d[l]=u[l])},c(y,h)},function(y,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function d(){this.constructor=y}c(y,h),y.prototype=h===null?Object.create(h):(d.prototype=h.prototype,new d)}),m=this&&this.__read||function(y,h){var d=typeof Symbol=="function"&&y[Symbol.iterator];if(!d)return y;var u,l,v=d.call(y),b=[];try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)b.push(u.value)}catch(E){l={error:E}}finally{try{u&&!u.done&&(d=v.return)&&d.call(v)}finally{if(l)throw l.error}}return b},p=this&&this.__spreadArray||function(y,h,d){if(d||arguments.length===2)for(var u,l=0,v=h.length;l<v;l++)!u&&l in h||(u||(u=Array.prototype.slice.call(h,0,l)),u[l]=h[l]);return y.concat(u||Array.prototype.slice.call(h))};Object.defineProperty(s,"__esModule",{value:!0}),s.ObjResetting=s.ObjResettingWithEvent=void 0;var g=a(1662),w=function(y){function h(d,u,l,v){l===void 0&&(l=!0);var b=y.call(this)||this;b._resetEvent=d,b._createFunc=u,b._obj=b.disposeVar((0,g.react)(void 0));var E=b._resetEvent,S=b._createFunc,P=function(){b._obj.value&&(b._obj.value.destroy(),b._obj.value=void 0)};return b.dispose(P),l&&(b._obj.value=v?S.apply(void 0,p([],m(v),!1)):S()),b.dispose(E.disposableOn(function(){for(var C=[],x=0;x<arguments.length;x++)C[x]=arguments[x];P(),b._obj.value=S.apply(void 0,p([],m(C),!1))})),b}return f(h,y),Object.defineProperty(h.prototype,"obj",{get:function(){return this._obj.value},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"objChanged",{get:function(){return this._obj.changed},enumerable:!1,configurable:!0}),h}(g.Destroyable);s.ObjResettingWithEvent=w;var _=function(y){function h(d,u,l){u===void 0&&(u=!0);var v=y.call(this)||this;return v._createFunc=d,v._execOnInit=u,v._initParams=l,v._event=v.disposeVar(new g.Event),v._objResettingWithEvent=v.disposeVar(new w(v._event,v._createFunc,v._execOnInit,v._initParams)),v}return f(h,y),Object.defineProperty(h.prototype,"obj",{get:function(){return this._objResettingWithEvent.obj},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"objChanged",{get:function(){return this._objResettingWithEvent.objChanged},enumerable:!1,configurable:!0}),h.prototype.reset=function(){for(var d,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];(d=this._event).emit.apply(d,p([],m(u),!1))},h}(g.Destroyable);s.ObjResetting=_},9359:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Destroyable=s.destroyObject=void 0;var c=a(2082);Object.defineProperty(s,"destroyObject",{enumerable:!0,get:function(){return c.destroyObject}});var f=function(){function p(){this._memId=++p._lastMemId}return Object.defineProperty(p.prototype,"__v_skip",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"memId",{get:function(){return this._memId},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"disposers",{get:function(){return this._disposers||(this._disposers=[]),this._disposers},enumerable:!1,configurable:!0}),p.prototype.dispose=function(g){return this.disposers.push(g),g},p.prototype.d=function(g){return this.dispose(g)},p.prototype.disposeVar=function(g){return this.disposers.push(function(){return g.destroy()}),g},p.prototype.dv=function(g){return this.disposeVar(g)},p.prototype.tryDisposeVar=function(g){return this.disposers.push(function(){return g.tryDestroy()}),g},p.prototype.tdv=function(g){return this.tryDisposeVar(g)},p.prototype.autoDispose=function(g){return typeof g=="function"?this.dispose(g):this.disposeVar(g)},p.prototype.ad=function(g){return typeof g=="function"?this.dispose(g):this.disposeVar(g)},p.prototype.isDestroyed=function(){return!1},p.prototype.destroyImp=function(){},p.prototype.destroy=function(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{for(var g=this._disposers,w=g.length-1;w>=0;--w)g[w]();g.length=0,this._disposers=void 0}catch(_){console.error("destroy get error! ".concat(_))}return(0,c.destroyObject)(this)},p.prototype.tryDestory=function(){if(!this.isDestroyed())return this.destroy()},p._lastMemId=-1,p}();s.Destroyable=f;var m=a(4899);Object.defineProperties(f.prototype,{toDestroyEvent:{get:function(){return this._toDestroyEvent===void 0&&(this._toDestroyEvent=this.disposeVar(new m.Event)),this._toDestroyEvent}}})},9367:function(o,s,a){var c=this&&this.__read||function(p,g){var w=typeof Symbol=="function"&&p[Symbol.iterator];if(!w)return p;var _,y,h=w.call(p),d=[];try{for(;(g===void 0||g-- >0)&&!(_=h.next()).done;)d.push(_.value)}catch(u){y={error:u}}finally{try{_&&!_.done&&(w=h.return)&&w.call(h)}finally{if(y)throw y.error}}return d};Object.defineProperty(s,"__esModule",{value:!0}),s.createEnvEvalStrReact=void 0;var f=a(1662),m=a(2220);s.createEnvEvalStrReact=function(p,g){var w=c((0,f.getReactFuncs)(p),3),_=w[0],y=(w[1],w[2]),h=(0,f.react)(void 0),d=function(){var u,l=(u=_())!==null&&u!==void 0?u:g;h.value=l&&m.SceneObject.context.getStrFromEnv(l)};return d(),y&&h.dispose(y.disposableOn(d)),h.dispose(m.SceneObject.context.environmentVariablesChanged.disposableOn(d)),h}},9369:function(o,s,a){var c,f=this&&this.__extends||(c=function(w,_){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,h){y.__proto__=h}||function(y,h){for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(y[d]=h[d])},c(w,_)},function(w,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function y(){this.constructor=w}c(w,_),w.prototype=_===null?Object.create(_):(y.prototype=_.prototype,new y)});Object.defineProperty(s,"__esModule",{value:!0}),s.DivPointerClick=void 0;var m=a(7372),p=a(5010),g=function(w){function _(y,h){var d=w.call(this)||this;d._div=y,d._pointerClick=d.disposeVar(new p.PointerClick);var u=d,l=u.div,v=u.pointerClick,b=function(C){return v.pointerDown(C)},E=function(C){return v.pointerMove(C)},S=function(C){return v.pointerOut(C)},P=function(C){return v.pointerUp(C)};return l.addEventListener("pointerdown",b,h),l.addEventListener("pointermove",E,h),l.addEventListener("pointerout",S,h),l.addEventListener("pointerup",P,h),d.dispose(function(){l.removeEventListener("pointerdown",b,h),l.removeEventListener("pointermove",E,h),l.removeEventListener("pointerout",S,h),l.removeEventListener("pointerup",P,h)}),d}return f(_,w),Object.defineProperty(_.prototype,"div",{get:function(){return this._div},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"pointerClick",{get:function(){return this._pointerClick},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"clickEvent",{get:function(){return this.pointerClick.clickEvent},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"dbclickEvent",{get:function(){return this.pointerClick.dbclickEvent},enumerable:!1,configurable:!0}),_}(m.Destroyable);s.DivPointerClick=g},9374:function(o,s,a){var c=this&&this.__read||function(p,g){var w=typeof Symbol=="function"&&p[Symbol.iterator];if(!w)return p;var _,y,h=w.call(p),d=[];try{for(;(g===void 0||g-- >0)&&!(_=h.next()).done;)d.push(_.value)}catch(u){y={error:u}}finally{try{_&&!_.done&&(w=h.return)&&w.call(h)}finally{if(y)throw y.error}}return d},f=this&&this.__spreadArray||function(p,g,w){if(w||arguments.length===2)for(var _,y=0,h=g.length;y<h;y++)!_&&y in g||(_||(_=Array.prototype.slice.call(g,0,y)),_[y]=g[y]);return p.concat(_||Array.prototype.slice.call(g))};Object.defineProperty(s,"__esModule",{value:!0}),s.getPromiseFromProcessing=void 0;var m=a(7372);s.getPromiseFromProcessing=function(p){for(var g=[],w=1;w<arguments.length;w++)g[w-1]=arguments[w];var _=-1;return[function(y){return _===p.runningId&&p.isRunning&&p.cancel(y)},new Promise(function(y,h){p.isRunning&&p.cancel(),p.reset();var d=new m.Destroyable;d.dispose(p.completeEvent.disposableOn(function(u){y(u),d.isDestroyed()?console.error("disposer is destroyed! ".concat(d)):d.destroy()})),d.dispose(p.errorEvent.disposableOn(function(u){h(u),d.isDestroyed()?console.error("disposer is destroyed! ".concat(d)):d.destroy()})),p.start.apply(p,f([],c(g),!1)),_=p.runningId})]}},9409:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.czmPixelFormats=void 0,s.czmPixelFormats=["DEPTH_COMPONENT","DEPTH_STENCIL","ALPHA","RED","RG","RGB","RGBA","LUMINANCE","LUMINANCE_ALPHA","RGB_DXT1","RGBA_DXT1","RGBA_DXT3","RGBA_DXT5","RGB_PVRTC_4BPPV1","RGB_PVRTC_2BPPV1","RGBA_PVRTC_4BPPV1","RGBA_PVRTC_2BPPV1","RGBA_ASTC","RGB_ETC1","RGB8_ETC2","RGBA8_ETC2_EAC","RGBA_BC7"]},9412:function(o,s,a){var c,f=this&&this.__extends||(c=function(u,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(v[E]=b[E])},c(u,l)},function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function v(){this.constructor=u}c(u,l),u.prototype=l===null?Object.create(l):(v.prototype=l.prototype,new v)}),m=this&&this.__values||function(u){var l=typeof Symbol=="function"&&Symbol.iterator,v=l&&u[l],b=0;if(v)return v.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&b>=u.length&&(u=void 0),{value:u&&u[b++],done:!u}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},p=this&&this.__read||function(u,l){var v=typeof Symbol=="function"&&u[Symbol.iterator];if(!v)return u;var b,E,S=v.call(u),P=[];try{for(;(l===void 0||l-- >0)&&!(b=S.next()).done;)P.push(b.value)}catch(C){E={error:C}}finally{try{b&&!b.done&&(v=S.return)&&v.call(S)}finally{if(E)throw E.error}}return P},g=this&&this.__spreadArray||function(u,l,v){if(v||arguments.length===2)for(var b,E=0,S=l.length;E<S;E++)!b&&E in l||(b||(b=Array.prototype.slice.call(l,0,E)),b[E]=l[E]);return u.concat(b||Array.prototype.slice.call(l))};Object.defineProperty(s,"__esModule",{value:!0}),s.SmartWorker=s.findTransferableObjectsFromArgs=void 0;var w=a(1662),_=a(7372);function y(u,l){var v,b,E,S,P,C,x,O;if(!(typeof u=="number"||typeof u=="string"||typeof u=="boolean"||u===void 0)){if(!(u instanceof String||u instanceof Boolean||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof File||u instanceof FileList)){if(u instanceof ArrayBuffer)l.indexOf(u)===-1&&l.push(u);else if(ArrayBuffer.isView(u))l.indexOf(u.buffer)===-1&&l.push(u.buffer);else if(u instanceof ImageBitmap)l.indexOf(u)===-1&&l.push(u);else if(!(u instanceof ImageData))if(u instanceof Map)try{for(var I=m(u),N=I.next();!N.done;N=I.next())y(N.value,l)}catch(L){v={error:L}}finally{try{N&&!N.done&&(b=I.return)&&b.call(I)}finally{if(v)throw v.error}}else if(u instanceof Set)try{for(var T=m(u),R=T.next();!R.done;R=T.next())y(R.value,l)}catch(L){E={error:L}}finally{try{R&&!R.done&&(S=T.return)&&S.call(T)}finally{if(E)throw E.error}}else if(Array.isArray(u))try{for(var A=m(u),B=A.next();!B.done;B=A.next())y(B.value,l)}catch(L){P={error:L}}finally{try{B&&!B.done&&(C=A.return)&&C.call(A)}finally{if(P)throw P.error}}else{if(!(u instanceof Object))throw console.error("有不可使用的传递的类型!"),new Error("有不可使用的传递的类型!");try{for(var k=m(Object.entries(u)),z=k.next();!z.done;z=k.next()){var j=p(z.value,2);j[0],y(j[1],l)}}catch(L){x={error:L}}finally{try{z&&!z.done&&(O=k.return)&&O.call(k)}finally{if(x)throw x.error}}}}}}function h(){for(var u,l,v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];try{var E=[];try{for(var S=m(v),P=S.next();!P.done;P=S.next())y(P.value,E)}catch(C){u={error:C}}finally{try{P&&!P.done&&(l=S.return)&&l.call(S)}finally{if(u)throw u.error}}return E}catch{return}}s.findTransferableObjectsFromArgs=h;var d=function(u){function l(){var v=u.call(this)||this;v._resultEvent=new w.Event,v._lastExecId=-1;var b=URL.createObjectURL(new Blob([`
23
+
24
+ function _findTransferableObjectsFromArg(arg, transferableObjects) {
25
+ if (typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'boolean' || typeof arg === 'undefined') {
26
+ }
27
+ else if (arg instanceof String ||
28
+ arg instanceof Boolean ||
29
+ arg instanceof Date ||
30
+ arg instanceof RegExp ||
31
+ arg instanceof Blob ||
32
+ arg instanceof File ||
33
+ arg instanceof FileList) {
34
+ }
35
+ else if (arg instanceof ArrayBuffer) {
36
+ if (-1 === transferableObjects.indexOf(arg)) {
37
+ transferableObjects.push(arg);
38
+ }
39
+ }
40
+ else if (ArrayBuffer.isView(arg)) {
41
+ if (-1 === transferableObjects.indexOf(arg.buffer)) {
42
+ transferableObjects.push(arg.buffer);
43
+ }
44
+ }
45
+ else if (arg instanceof ImageBitmap) {
46
+ if (-1 === transferableObjects.indexOf(arg)) {
47
+ transferableObjects.push(arg);
48
+ }
49
+ }
50
+ else if (arg instanceof ImageData) {
51
+ }
52
+ else if (arg instanceof Map) {
53
+ for (let a of arg) {
54
+ _findTransferableObjectsFromArg(a, transferableObjects);
55
+ }
56
+ }
57
+ else if (arg instanceof Set) {
58
+ for (let a of arg) {
59
+ _findTransferableObjectsFromArg(a, transferableObjects);
60
+ }
61
+ }
62
+ else if (Array.isArray(arg)) {
63
+ for (let a of arg) {
64
+ _findTransferableObjectsFromArg(a, transferableObjects);
65
+ }
66
+ }
67
+ else if (arg instanceof Object) {
68
+ for (let [k, v] of Object.entries(arg)) {
69
+ _findTransferableObjectsFromArg(v, transferableObjects);
70
+ }
71
+ }
72
+ else {
73
+ console.error(\`有不可使用的传递的类型!\`);
74
+ throw new Error(\`有不可使用的传递的类型!\`);
75
+ }
76
+ }
77
+
78
+ function findTransferableObjectsFromArgs(...args) {
79
+ try {
80
+ const transferableObjects = [];
81
+ for (let arg of args) {
82
+ _findTransferableObjectsFromArg(arg, transferableObjects);
83
+ }
84
+ return transferableObjects;
85
+ }
86
+ catch (error) {
87
+ return undefined;
88
+ }
89
+ }
90
+
91
+ function progressFunc(execId, value) {
92
+ // @ts-ignore
93
+ const workerGlobal = globalThis;
94
+ const transferableObjects = findTransferableObjectsFromArgs(value);
95
+ const finalResult = {
96
+ type: 'function_progress',
97
+ execId,
98
+ progress: value,
99
+ };
100
+ if (transferableObjects) {
101
+ workerGlobal.postMessage(finalResult, transferableObjects);
102
+ }
103
+ else {
104
+ workerGlobal.postMessage(finalResult);
105
+ }
106
+ }
107
+
108
+ onmessage = function onmessageFunc(messageEvent) {
109
+ // DedicatedWorkerGlobalScope
110
+ // @ts-ignore
111
+ const workerGlobal = globalThis;
112
+ const { execId, type, name, args } = messageEvent.data;
113
+ if (type === 'function' || type === 'progressFunc') {
114
+ try {
115
+ // @ts-ignore
116
+ const func = workerGlobal[name];
117
+ if (typeof func !== 'function') {
118
+ console.error(\`typeof func !== 'function'\`);
119
+ throw new Error(\`typeof func !== 'function'\`);
120
+ }
121
+ let resultOrResultPromise;
122
+ if (type === 'progressFunc') {
123
+ // @ts-ignore
124
+ workerGlobal._cancelFuncsMap = workerGlobal._cancelFuncsMap || new Map();
125
+ // @ts-ignore
126
+ const cancelFuncsMap = workerGlobal._cancelFuncsMap;
127
+ const localProgressFunc = (value) => {
128
+ progressFunc(execId, value);
129
+ };
130
+ let resolve_;
131
+ let reject_;
132
+ resultOrResultPromise = new Promise((resolve, reject) => {
133
+ resolve_ = resolve;
134
+ reject_ = reject;
135
+ });
136
+ let finished = false;
137
+ const completeFunc = (value) => {
138
+ finished = true;
139
+ if (cancelFuncsMap.has(execId)) {
140
+ cancelFuncsMap.delete(execId);
141
+ }
142
+ resolve_(value);
143
+ };
144
+ const errorFunc = (error) => {
145
+ finished = true;
146
+ if (cancelFuncsMap.has(execId)) {
147
+ cancelFuncsMap.delete(execId);
148
+ }
149
+ reject_(error);
150
+ };
151
+ const cancelFunc = func(localProgressFunc, completeFunc, errorFunc, ...args);
152
+ if (typeof cancelFunc === 'function') {
153
+ if (!finished) {
154
+ cancelFuncsMap.set(execId, cancelFunc);
155
+ }
156
+ }
157
+ else {
158
+ console.warn(\`typeof cancelFunc !== 'function'\`);
159
+ }
160
+ }
161
+ else if (type === 'function') {
162
+ resultOrResultPromise = func(...args);
163
+ }
164
+ if (resultOrResultPromise instanceof Promise) {
165
+ resultOrResultPromise.then(result => {
166
+ const transferableObjects = findTransferableObjectsFromArgs(result);
167
+ const finalResult = {
168
+ type: 'function_result',
169
+ execId,
170
+ result,
171
+ };
172
+ transferableObjects && workerGlobal.postMessage(finalResult, transferableObjects) || workerGlobal.postMessage(finalResult);
173
+ }).catch(error => {
174
+ const finalResult = {
175
+ type: 'function_result',
176
+ execId,
177
+ error,
178
+ };
179
+ workerGlobal.postMessage(finalResult);
180
+ });
181
+ }
182
+ else {
183
+ const result = resultOrResultPromise;
184
+ const finalResult = {
185
+ type: 'function_result',
186
+ execId,
187
+ result,
188
+ };
189
+ const transferableObjects = findTransferableObjectsFromArgs(result);
190
+ transferableObjects && workerGlobal.postMessage(finalResult, transferableObjects) || workerGlobal.postMessage(finalResult);
191
+ }
192
+ }
193
+ catch (error) {
194
+ const finalResult = {
195
+ type: 'function_result',
196
+ execId,
197
+ error,
198
+ };
199
+ workerGlobal.postMessage(finalResult);
200
+ }
201
+ }
202
+ else if (type === 'progressFunc_cancel') {
203
+ // @ts-ignore
204
+ workerGlobal._cancelFuncsMap = workerGlobal._cancelFuncsMap || new Map();
205
+ // @ts-ignore
206
+ const cancelFuncsMap = workerGlobal._cancelFuncsMap;
207
+ // const execId = args[0];
208
+ if (typeof execId !== 'number') {
209
+ console.error(\`typeof execId !== 'number'\`);
210
+ }
211
+ else {
212
+ const cancelFunc = cancelFuncsMap.get(execId);
213
+ if (cancelFunc) {
214
+ cancelFunc(\`progressFunc cancel execId: \${execId}\`);
215
+ }
216
+ else {
217
+ // 找不到的原因可能是:
218
+ // 1 进度函数的返回值不对,不是一个取消函数!
219
+ // 2 进度函数已经被取消,再次执行取消时,就会警告!
220
+ console.warn(\`cancelFuncsMap cannot find execId: \${execId}\`);
221
+ }
222
+ }
223
+ }
224
+ else {
225
+ console.error('未知type!');
226
+ }
227
+ }
228
+ `]));return v.dispose(function(){return URL.revokeObjectURL(b)}),v._worker=new Worker(b),v.dispose(function(){return v._worker.terminate()}),v._worker.onmessage=function(E){v._resultEvent.emit(E)},v}return f(l,u),l.prototype.execWorkerFunc=function(v){for(var b=[],E=1;E<arguments.length;E++)b[E-1]=arguments[E];var S=h(b);if(S)return this.execWorkerFuncWithTransferableObjects.apply(this,g([v,S],p(b),!1));throw console.error("存在无法传递的数据,请检查参数!"),new Error("存在无法传递的数据,请检查参数!")},l.prototype.execWorkerFuncWithTransferableObjects=function(v,b){var E=this;b===void 0&&(b=[]);for(var S=[],P=2;P<arguments.length;P++)S[P-2]=arguments[P];if(b)return new Promise(function(C,x){E._execWorkerFuncWithTransferableObjects.apply(E,g([v,C,x,b],p(S),!1))});throw console.error("存在无法传递的数据,请检查参数!"),new Error("存在无法传递的数据,请检查参数!")},l.prototype._execWorkerFuncWithTransferableObjects=function(v,b,E,S){S===void 0&&(S=[]);for(var P=[],C=4;C<arguments.length;C++)P[C-4]=arguments[C];var x=++this._lastExecId,O={execId:x,type:"function",name:v,args:P};this._worker.postMessage(O,S);var I=this._resultEvent.disposableOn(function(N){var T=N.data;T.execId===x&&(T.type==="function_result"?(I(),"error"in T?E(T.error):b(T.result)):T.type==="function_progress"&&console.error("messageData.type === 'function_progress'"))})},l.prototype.execWorkerProgressFunc=function(v,b,E,S){for(var P=[],C=4;C<arguments.length;C++)P[C-4]=arguments[C];var x=h(P);if(x)return this.execWorkerProgressFuncWithTransferableObjects.apply(this,g([v,b,E,S,x],p(P),!1));throw console.error("存在无法传递的数据,请检查参数!"),new Error("存在无法传递的数据,请检查参数!")},l.prototype.execWorkerProgressFuncWithTransferableObjects=function(v,b,E,S,P){P===void 0&&(P=[]);for(var C=[],x=5;x<arguments.length;x++)C[x-5]=arguments[x];return this._execWorkerProgressFuncWithTransferableObjects.apply(this,g([v,b,E,S,P],p(C),!1))},l.prototype._execWorkerProgressFuncWithTransferableObjects=function(v,b,E,S,P){var C=this;P===void 0&&(P=[]);for(var x=[],O=5;O<arguments.length;O++)x[O-5]=arguments[O];var I=++this._lastExecId,N={execId:I,type:"progressFunc",name:v,args:x};this._worker.postMessage(N,P);var T=this._resultEvent.disposableOn(function(R){var A=R.data;A.execId===I&&(A.type==="function_result"?(T&&(T(),T=void 0),"error"in A?S(A.error):E(A.result)):A.type==="function_progress"&&b&&b(A.progress))});return function(){T&&(T(),T=void 0),C._worker.postMessage({execId:I,type:"progressFunc_cancel",name:"funcName",args:[]})}},l.prototype.eval=function(v){return this.execWorkerFuncWithTransferableObjects("eval",[],v)},l.prototype.importScripts=function(v){return this.execWorkerFuncWithTransferableObjects("importScripts",[],v)},l.prototype.createGlobalFunc=function(v,b){return this.execWorkerFuncWithTransferableObjects("eval",[],"globalThis['".concat(b??v.name,"'] = ").concat(v.toString(),";undefined;"))},l}(_.Destroyable);s.SmartWorker=d},9486:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.saveOnBrowser=void 0,s.saveOnBrowser=function(a,c,f){f===void 0&&(c.endsWith(".gltf")?f="model/gltf+json":c.endsWith(".bin")?f="application/octet-stream":c.endsWith(".glb")?f="model/gltf-binary":c.endsWith(".jpg")||c.endsWith(".jpeg")?f="image/jpeg":c.endsWith(".png")?f="image/png":c.endsWith(".glsl")?f="text/plain":c.endsWith(".json")?f="application/json":c.endsWith(".b3dm")||c.endsWith(".i3dm")?f="application/octet-stream":console.warn("save ".concat(c,": MimeType无法确定!")));var m=new Blob([a],{type:f||""}),p=URL.createObjectURL(m),g=document.createElement("a"),w=new MouseEvent("click");g.download=c,g.href=p,g.dispatchEvent(w),URL.revokeObjectURL(p)}},9528:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.readFileFromBrowser=void 0,s.readFileFromBrowser=function(){return new Promise(function(a,c){var f=document.createElement("input");f.type="file",f.style.display="none";var m=new MouseEvent("click",{bubbles:!1,cancelable:!0,view:window});f.dispatchEvent(m),f.addEventListener("change",function(p){var g=f.files;g&&g.length>0?g[0].text().then(function(w){a(w)}):c()})})}},9549:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Quaternion=void 0;var c=a(2731),f=a(9898),m=a(5985),p=a(4915),g=a(8089);(function(w){var _=(0,c.createNumbers)(3);function y(C,x,O){var I=x/2,N=Math.sin(I);f.Vector.normalize(C,_);var T=_[0]*N,R=_[1]*N,A=_[2]*N,B=Math.cos(I);return O=O||(0,c.createNumbers)(4),f.Vector.clone([T,R,A,B],O),O}w.fromAxisAngle=y;var h=(0,c.createNumbers)(3,1,2,0),d=(0,c.createNumbers)(3);function u(C,x){var O,I,N,T,R,A=C[p.Matrix3.COLUMN0ROW0],B=C[p.Matrix3.COLUMN1ROW1],k=C[p.Matrix3.COLUMN2ROW2],z=A+B+k;if(z>0)R=.5*(O=Math.sqrt(z+1)),O=.5/O,I=(C[p.Matrix3.COLUMN1ROW2]-C[p.Matrix3.COLUMN2ROW1])*O,N=(C[p.Matrix3.COLUMN2ROW0]-C[p.Matrix3.COLUMN0ROW2])*O,T=(C[p.Matrix3.COLUMN0ROW1]-C[p.Matrix3.COLUMN1ROW0])*O;else{var j=h,L=0;B>A&&(L=1),k>A&&k>B&&(L=2);var F=j[L],G=j[F];O=Math.sqrt(C[p.Matrix3.getElementIndex(L,L)]-C[p.Matrix3.getElementIndex(F,F)]-C[p.Matrix3.getElementIndex(G,G)]+1);var W=d;W[L]=.5*O,O=.5/O,R=(C[p.Matrix3.getElementIndex(G,F)]-C[p.Matrix3.getElementIndex(F,G)])*O,W[F]=(C[p.Matrix3.getElementIndex(F,L)]+C[p.Matrix3.getElementIndex(L,F)])*O,W[G]=(C[p.Matrix3.getElementIndex(G,L)]+C[p.Matrix3.getElementIndex(L,G)])*O,I=-W[0],N=-W[1],T=-W[2]}return x?(x[0]=I,x[1]=N,x[2]=T,x[3]=R,x):(0,c.createNumbers)(4,I,N,T,R)}w.fromRotationMatrix3=u;var l=(0,c.createNumbers)(9);w.fromRotationMatrix4=function(C,x){return u(g.Matrix4.getMatrix3(C,l),x)},w.multiply=function(C,x,O){var I=C[0],N=C[1],T=C[2],R=C[3],A=x[0],B=x[1],k=x[2],z=x[3],j=R*A+I*z+N*k-T*B,L=R*B-I*k+N*z+T*A,F=R*k+I*B-N*A+T*z,G=R*z-I*A-N*B-T*k;return f.Vector.set(O,j,L,F,G)};var v=(0,c.createNumbers)(3);w.rotationTo=function(C,x,O){var I=f.Vector.dot(C,x);return I<-.999999?(m.Vector3.cross(m.Vector3.UNIT_X,C,v),f.Vector.magnitudeSquared(v)<.001&&m.Vector3.cross(m.Vector3.UNIT_Y,C,v),f.Vector.normalize(v,v),y(v,Math.PI,O)):I>.999999?f.Vector.set(O,0,0,0,1):(m.Vector3.cross(C,x,v),O=f.Vector.set(O,v[0],v[1],v[2],1+I),f.Vector.normalize(O,O))};var b=(0,c.createNumbers)(4);w.lerp=function(C,x,O,I){return f.Vector.multiplyByScalar(x,O,b),I=f.Vector.multiplyByScalar(C,1-O,I),f.Vector.add(b,I,I)};var E=(0,c.createNumbers)(4),S=(0,c.createNumbers)(4),P=(0,c.createNumbers)(4);w.slerp=function(C,x,O,I){var N=f.Vector.dot(C,x),T=x;if(N<0&&(N=-N,T=f.Vector.negate(x,E)),1-N<1e-6)return f.Vector.lerp(C,T,O,I);var R=Math.acos(N);return f.Vector.multiplyByScalar(C,Math.sin((1-O)*R),S),f.Vector.multiplyByScalar(T,Math.sin(O*R),P),I=f.Vector.add(S,P,I),f.Vector.multiplyByScalar(I,1/Math.sin(R),I)}})(s.Quaternion||(s.Quaternion={}))},9597:function(o,s,a){var c,f=this&&this.__extends||(c=function(w,_){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,h){y.__proto__=h}||function(y,h){for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(y[d]=h[d])},c(w,_)},function(w,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function y(){this.constructor=w}c(w,_),w.prototype=_===null?Object.create(_):(y.prototype=_.prototype,new y)});Object.defineProperty(s,"__esModule",{value:!0}),s.DomElementEvent=void 0;var m=a(7372),p=-1,g=function(w){function _(y,h,d,u){var l=w.call(this)||this;l._domElement=y,l._type=h,l.callback=u;var v=function(b){return b.__xbsj_listenerNo__=++p,b.__xbsj_listenerTime__=Date.now(),b.__xbsj_lastCurrentTarget__=b.currentTarget,l.emit(b),l.callback&&l.callback(b)};return l._domElement.addEventListener(l._type,v,d),l.dispose(function(){return l._domElement.removeEventListener(l._type,v,d)}),l}return f(_,w),_.getLastLisenNo=function(){return p},_.getCurrentTarget=function(y){return y.__xbsj_lastCurrentTarget__},_.getListenerNo=function(y){return y.__xbsj_listenerNo__},_.getListenerTime=function(y){return y.__xbsj_listenerTime__},_.on=function(y,h){var d=_.getLastLisenNo();return y.disposableOn(function(u){var l=_.getListenerNo(u);(l===void 0||l>d)&&h(u)})},Object.defineProperty(_.prototype,"element",{get:function(){return this._domElement},enumerable:!1,configurable:!0}),_.create=function(y,h,d){return new _(y,h,d)},_}(m.Event);s.DomElementEvent=g},9631:function(o,s){var a=this&&this.__awaiter||function(f,m,p,g){return new(p||(p=Promise))(function(w,_){function y(u){try{d(g.next(u))}catch(l){_(l)}}function h(u){try{d(g.throw(u))}catch(l){_(l)}}function d(u){var l;u.done?w(u.value):(l=u.value,l instanceof p?l:new p(function(v){v(l)})).then(y,h)}d((g=g.apply(f,m||[])).next())})},c=this&&this.__generator||function(f,m){var p,g,w,_,y={label:0,sent:function(){if(1&w[0])throw w[1];return w[1]},trys:[],ops:[]};return _={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function h(d){return function(u){return function(l){if(p)throw new TypeError("Generator is already executing.");for(;_&&(_=0,l[0]&&(y=0)),y;)try{if(p=1,g&&(w=2&l[0]?g.return:l[0]?g.throw||((w=g.return)&&w.call(g),0):g.next)&&!(w=w.call(g,l[1])).done)return w;switch(g=0,w&&(l=[2&l[0],w.value]),l[0]){case 0:case 1:w=l;break;case 4:return y.label++,{value:l[1],done:!1};case 5:y.label++,g=l[1],l=[0];continue;case 7:l=y.ops.pop(),y.trys.pop();continue;default:if(!((w=(w=y.trys).length>0&&w[w.length-1])||l[0]!==6&&l[0]!==2)){y=0;continue}if(l[0]===3&&(!w||l[1]>w[0]&&l[1]<w[3])){y.label=l[1];break}if(l[0]===6&&y.label<w[1]){y.label=w[1],w=l;break}if(w&&y.label<w[2]){y.label=w[2],y.ops.push(l);break}w[2]&&y.ops.pop(),y.trys.pop();continue}l=m.call(f,y)}catch(v){l=[6,v],g=0}finally{p=w=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([d,u])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.fetchArrayBuffer=void 0,s.fetchArrayBuffer=function(f,m){return m===void 0&&(m=fetch),a(this,void 0,void 0,function(){var p;return c(this,function(g){switch(g.label){case 0:return[4,m(f)];case 1:return(p=g.sent()).ok?[4,p.arrayBuffer()]:[2,void 0];case 2:return[2,g.sent()]}})})}},9651:function(o,s,a){var c=this&&this.__read||function(w,_){var y=typeof Symbol=="function"&&w[Symbol.iterator];if(!y)return w;var h,d,u=y.call(w),l=[];try{for(;(_===void 0||_-- >0)&&!(h=u.next()).done;)l.push(h.value)}catch(v){d={error:v}}finally{try{h&&!h.done&&(y=u.return)&&y.call(u)}finally{if(d)throw d.error}}return l};Object.defineProperty(s,"__esModule",{value:!0}),s.getEventFromPromise=s.getPromiseFromEvent=s.createCancelablePromise=s.pairToPromise=s.cancelPromise=s.isPromiseCancelable=s.getPromiseCancel=s.setPromiseCancel=void 0;var f=a(1662),m=a(7372);function p(w,_){(0,f.getExtProp)(w,"_promise_cancel")&&console.warn("setPromiseCancel warn: promise has cancelFunc!"),(0,f.setExtProp)(w,"_promise_cancel",_)}function g(w){return(0,f.getExtProp)(w,"_promise_cancel")}s.setPromiseCancel=p,s.getPromiseCancel=g,s.isPromiseCancelable=function(w){return!!g(w)},s.cancelPromise=function(w,_){var y=g(w);return!!y&&(y(_),!0)},s.pairToPromise=function(w){var _=c(w,2),y=_[0],h=_[1];return p(h,y),h},s.createCancelablePromise=function(w){var _,y=new Promise(function(h,d){_=d,w.then(h).catch(d)});return p(y,_),y},s.getPromiseFromEvent=function(w){var _,y,h=new Promise(function(d,u){y=w.disposableOn(function(){for(var l=[],v=0;v<arguments.length;v++)l[v]=arguments[v];y&&y(),d(l)}),_=function(l){y&&y(),u(l)}});return[_,h]},s.getEventFromPromise=function(w){var _=new m.Event,y=new m.Event;return w.then(function(h){_.isDestroyed()||_.emit(h)}).catch(function(h){y.isDestroyed()||y.emit(h)}),[_,y]}},9704:(o,s,a)=>{a.r(s),a.d(s,{decompressFrame:()=>g,decompressFrames:()=>w,parseGIF:()=>p});var c=a(4235),f=a(4638),m=a(733);const p=_=>{const y=new Uint8Array(_);return(0,f.parse)((0,m.buildStream)(y),c.A)},g=(_,y,h)=>{if(!_.image)return void console.warn("gif frame does not have associated image.");const{image:d}=_,u=d.descriptor.width*d.descriptor.height;var l=((b,E,S)=>{const C=S;var x,O,I,N,T,R,A,B,k,z;const j=new Array(S),L=new Array(4096),F=new Array(4096),G=new Array(4097);for(T=1+(O=1<<(z=b)),x=O+2,A=-1,I=(1<<(N=z+1))-1,B=0;B<O;B++)L[B]=0,F[B]=B;var W,V,U,q,J,Y;for(W=V=U=q=J=Y=0,k=0;k<C;){if(q===0){if(V<N){W+=E[Y]<<V,V+=8,Y++;continue}if(B=W&I,W>>=N,V-=N,B>x||B==T)break;if(B==O){I=(1<<(N=z+1))-1,x=O+2,A=-1;continue}if(A==-1){G[q++]=F[B],A=B,U=B;continue}for(R=B,B==x&&(G[q++]=U,B=A);B>O;)G[q++]=F[B],B=L[B];U=255&F[B],G[q++]=U,x<4096&&(L[x]=A,F[x]=U,!(++x&I)&&x<4096&&(N++,I+=x)),A=R}q--,j[J++]=G[q],k++}for(k=J;k<C;k++)j[k]=0;return j})(d.data.minCodeSize,d.data.blocks,u);d.descriptor.lct.interlaced&&(l=((b,E)=>{const S=new Array(b.length),P=b.length/E,C=function(R,A){const B=b.slice(A*E,(A+1)*E);S.splice.apply(S,[R*E,E].concat(B))},x=[0,4,2,1],O=[8,8,4,2];for(var I=0,N=0;N<4;N++)for(var T=x[N];T<P;T+=O[N])C(T,I),I++;return S})(l,d.descriptor.width));const v={pixels:l,dims:{top:_.image.descriptor.top,left:_.image.descriptor.left,width:_.image.descriptor.width,height:_.image.descriptor.height}};return d.descriptor.lct&&d.descriptor.lct.exists?v.colorTable=d.lct:v.colorTable=y,_.gce&&(v.delay=10*(_.gce.delay||10),v.disposalType=_.gce.extras.disposal,_.gce.extras.transparentColorGiven&&(v.transparentIndex=_.gce.transparentColorIndex)),h&&(v.patch=(b=>{const E=b.pixels.length,S=new Uint8ClampedArray(4*E);for(var P=0;P<E;P++){const C=4*P,x=b.pixels[P],O=b.colorTable[x]||[0,0,0];S[C]=O[0],S[C+1]=O[1],S[C+2]=O[2],S[C+3]=x!==b.transparentIndex?255:0}return S})(v)),v},w=(_,y)=>_.frames.filter(h=>h.image).map(h=>g(h,_.gct,y))},9812:function(o,s,a){var c=this&&this.__values||function(y){var h=typeof Symbol=="function"&&Symbol.iterator,d=h&&y[h],u=0;if(d)return d.call(y);if(y&&typeof y.length=="number")return{next:function(){return y&&u>=y.length&&(y=void 0),{value:y&&y[u++],done:!y}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.CullingVolume=void 0;var f=a(4416),m=a(312),p=a(6172),g=a(7215),w=a(8703),_=function(){function y(h){h===void 0&&(h=[]),this.planes=h}return y.fromProjectionMatrix=function(h,d){return(0,w._getCullingVolumeFromProjectionMatrix)(h,d)},y.prototype.computeVisibilityWithPlaneMask=function(h,d,u){if(u===y.MASK_OUTSIDE||u===y.MASK_INSIDE)return u;var l=y.MASK_INSIDE,v=this.planes;if(v)for(var b=0,E=v.length;b<E;++b){var S=b<31?1<<b:0;if(!(b<31)||u&S){var P=void 0;if(h==="box"?P=p.OrientedBoundingBox.intersectPlane(d,v[b]):h==="sphere"&&(P=f.BoundingSphere.intersectPlane(d,v[b])),P===m.Intersect.OUTSIDE)return y.MASK_OUTSIDE;P===m.Intersect.INTERSECTING&&(l|=S)}}return l},y.prototype.transform=function(h){var d,u;try{for(var l=c(this.planes),v=l.next();!v.done;v=l.next()){var b=v.value;g.Plane.transform(b,h,b)}}catch(E){d={error:E}}finally{try{v&&!v.done&&(u=l.return)&&u.call(l)}finally{if(d)throw d.error}}},y.MASK_OUTSIDE=4294967295,y.MASK_INSIDE=0,y.MASK_INDETERMINATE=2147483647,y}();s.CullingVolume=_,s.default=_},9815:function(o,s,a){var c,f=this&&this.__extends||(c=function(h,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(u[v]=l[v])},c(h,d)},function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function u(){this.constructor=h}c(h,d),h.prototype=d===null?Object.create(d):(u.prototype=d.prototype,new u)});Object.defineProperty(s,"__esModule",{value:!0}),s.Gif=void 0;var m=a(1662),p=a(5819),g=a(5819),w=a(7118),_=a(5281),y=function(h){function d(u){var l=h.call(this)||this;return l._url=l.disposeVar((0,m.react)("")),l._loadGifFramesProcessing=l.disposeVar((0,g.createProcessingFromPromiseCreateFunc)(function(v){return(0,p.createCancelablePromise)((0,_.loadGifFrames)(v))})),l._player=l.disposeVar(new w.GifPlayer(u)),l._player.autoPlayOnLoad=!0,l._loadGifFramesProcessing.completeFunc=function(v){var b=v.gifFrames;return l._player.gifFrames=b},l.dispose(l._url.changed.disposableOn(function(v){l._player.gifFrames=void 0,l._loadGifFramesProcessing.restart(new p.CancelError("reload gif(".concat(v,")")),v)})),l}return f(d,h),Object.defineProperty(d.prototype,"player",{get:function(){return this._player},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"url",{get:function(){return this._url.value},set:function(u){this._url.value=u},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"loadedEvent",{get:function(){return this._loadGifFramesProcessing.completeEvent},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"size",{get:function(){return this._player.gifSize},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"sizeChanged",{get:function(){return this._player.gifSizeChanged},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"duration",{get:function(){return this._player.gifDuration},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"durationChanged",{get:function(){return this._player.gifDurationChanged},enumerable:!1,configurable:!0}),d}(m.Destroyable);s.Gif=y},9898:function(o,s,a){var c=this&&this.__generator||function(m,p){var g,w,_,y,h={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return y={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function d(u){return function(l){return function(v){if(g)throw new TypeError("Generator is already executing.");for(;y&&(y=0,v[0]&&(h=0)),h;)try{if(g=1,w&&(_=2&v[0]?w.return:v[0]?w.throw||((_=w.return)&&_.call(w),0):w.next)&&!(_=_.call(w,v[1])).done)return _;switch(w=0,_&&(v=[2&v[0],_.value]),v[0]){case 0:case 1:_=v;break;case 4:return h.label++,{value:v[1],done:!1};case 5:h.label++,w=v[1],v=[0];continue;case 7:v=h.ops.pop(),h.trys.pop();continue;default:if(!((_=(_=h.trys).length>0&&_[_.length-1])||v[0]!==6&&v[0]!==2)){h=0;continue}if(v[0]===3&&(!_||v[1]>_[0]&&v[1]<_[3])){h.label=v[1];break}if(v[0]===6&&h.label<_[1]){h.label=_[1],_=v;break}if(_&&h.label<_[2]){h.label=_[2],h.ops.push(v);break}_[2]&&h.ops.pop(),h.trys.pop();continue}v=p.call(m,h)}catch(b){v=[6,b],w=0}finally{g=_=0}if(5&v[0])throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}([u,l])}}};Object.defineProperty(s,"__esModule",{value:!0}),s.Vector=void 0;var f=a(2731);(function(m){function p(V,U){for(var q=V.length,J=0;J<q;++J)if(!U(V[J],J))return!1;return!0}function g(V,U,q){for(var J=V.length,Y=q,re=0;re<J;++re)Y=U(Y,V[re],re);return Y}m.set=function(V){for(var U=[],q=1;q<arguments.length;q++)U[q-1]=arguments[q];if(V=V||(0,f.createNumbers)(U.length),U.length>V.length)throw new Error("args.length > target.length");return V instanceof Float64Array?V.set(U):N(U,V),V},m.every=p,m.reduce=g,m.itr=function(V){var U;return c(this,function(q){switch(q.label){case 0:U=0,q.label=1;case 1:return U<V.length?[4,V[U]]:[3,4];case 2:q.sent(),q.label=3;case 3:return++U,[3,1];case 4:return[2]}})};var w,_=function(V,U){return V+U*U};function y(V){return g(V,_,0)}m.magnitudeSquared=y,m.magnitude=function(V){var U=y(V);return Math.sqrt(U)},m.isNormalized=function(V,U){U===void 0&&(U=1e-5);var q=y(V);return Math.abs(q-1)<U};var h,d=function(V,U,q){return V+U*w[q]};m.dot=function(V,U){return C(V,U),w=U,g(V,d,0)};var u,l=function(V,U,q){return V+(U-h[q])*(U-h[q])};function v(V,U){return C(V,U),h=U,g(V,l,0)}m.distanceSquared=v,m.distance=function(V,U){return Math.sqrt(v(V,U))};var b,E,S=function(V,U){return V===u[U]};m.equals=function(V,U){return C(V,U),u=U,p(V,S)};var P=function(V,U){return Math.abs(V-b[U])<E};function C(V,U){if(V.length!==U.length)throw new Error("left.length !== right.length")}function x(V,U,q){var J=V.length;C(V,q=q||(0,f.createNumbers)(J));for(var Y=0;Y<J;++Y)q[Y]=U(V[Y],Y);return q}function O(V,U,q,J){C(V,U),J&&C(V,J);var Y=V.length;J=J||(0,f.createNumbers)(Y);for(var re=0;re<Y;++re)J[re]=q(V[re],U[re]);return J}m.equalsEpsilon=function(V,U,q){return q===void 0&&(q=0),C(V,U),b=U,E=q,p(V,P)},m.op1=x,m.op2=O;var I=function(V){return V};function N(V,U){return x(V,I,U)}m.clone=N;var T=0,R=function(V,U){return V*T};function A(V,U,q){return T=U,x(V,R,q)}m.multiplyByScalar=A,m.normalize=function(V,U,q){q===void 0&&(q=0);var J=y(V);if(!(J<=q))return A(V,1/Math.sqrt(J),U)},m.negate=function(V,U){return A(V,-1,U)};var B=function(V){return Math.abs(V)};m.abs=function(V,U){return x(V,B,U)};var k=function(V){return V-Math.floor(V)};m.fract=function(V,U){return x(V,k,U)};var z=function(V,U){return V-U};m.subtract=function(V,U,q){return O(V,U,z,q)};var j=function(V,U){return V+U};m.add=function(V,U,q){return O(V,U,j,q)};var L=function(V,U){return V*U};m.multiply=function(V,U,q){return O(V,U,L,q)};var F,G=function(V,U){return V/U};m.divide=function(V,U,q){return O(V,U,G,q)};var W=function(V,U){return V*(1-F)+U*F};m.lerp=function(V,U,q,J){return F=q,O(V,U,W,J)}})(s.Vector||(s.Vector={}))},9910:(o,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.destroyScalableArray=s.createScalableArray=void 0;var c=a(1085),f=function(){function g(){this._array=[]}return Object.defineProperty(g.prototype,"array",{get:function(){return this._array},enumerable:!1,configurable:!0}),g}(),m=new c.ObjPool(function(){return new f}),p=new WeakMap;s.createScalableArray=function(){var g=m.create();return p.set(g.array,g),g.array},s.destroyScalableArray=function(g){var w=p.get(g);if(!w)throw console.warn("!obj"),new Error("!obj");m.destroy(w)}},9928:(o,s,a)=>{function c(f,m,p,g,w){this._format=f,this._width=m,this._height=p,this._buffer=g,this._mipLevels=w}a.r(s),a.d(s,{CompressedTextureBuffer:()=>c}),Object.defineProperties(c.prototype,{internalFormat:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},mipLevels:{get:function(){return this._mipLevels}}}),c.clone=function(f){if(f)return new c(f._format,f._width,f._height,f._buffer,f._mipLevels)},c.prototype.clone=function(){return c.clone(this)}},9970:(o,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.nodeBufferToUint8Array=void 0,s.nodeBufferToUint8Array=function(a){return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}},9972:function(o,s,a){var c=this&&this.__read||function(y,h){var d=typeof Symbol=="function"&&y[Symbol.iterator];if(!d)return y;var u,l,v=d.call(y),b=[];try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)b.push(u.value)}catch(E){l={error:E}}finally{try{u&&!u.done&&(d=v.return)&&d.call(v)}finally{if(l)throw l.error}}return b},f=this&&this.__spreadArray||function(y,h,d){if(d||arguments.length===2)for(var u,l=0,v=h.length;l<v;l++)!u&&l in h||(u||(u=Array.prototype.slice.call(h,0,l)),u[l]=h[l]);return y.concat(u||Array.prototype.slice.call(h))};Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchingWithStartValues=s.createFetching=s.cancelableFetch=s.cancelableFetchWithProgress=void 0;var m=a(5726),p=a(9651),g=a(921);function w(y){for(var h=[],d=1;d<arguments.length;d++)h[d-1]=arguments[d];var u=new AbortController,l=u.signal,v=c(h,2),b=v[0],E=v[1];if(E!=null&&E.signal)throw console.error("init?.signal"),new Error("init?.signal");(E=E||{}).signal&&console.warn("revocableFetch error: init.signal would be override!"),E.signal=l;var S=!1,P=fetch(b,E);return y&&(P=P.then(function(C){if(!C.ok)return C;if(!C.body)throw Error("ReadableStream not yet supported in this browser.");var x=C.headers.get("content-length");x||console.warn("response.headers.get('content-length') is undefined... cannot get contentLength!");var O=x?parseInt(x,10):0,I=0;return new Response(new ReadableStream({start:function(N){if(!C.body)throw new Error("!response.body");var T=C.body.getReader();(function R(){T.read().then(function(A){var B=A.done,k=A.value;if(B)N.close();else{if(!k)throw new Error("!value");if(!y)throw new Error("!progressFunc");I+=k.byteLength,y(I,O),N.enqueue(k),R()}}).catch(function(A){N.error(A)})})()}}),{status:C.status,statusText:C.statusText,headers:C.headers})}).catch(function(C){throw S?(C instanceof Error&&C.code!==20&&console.error("error.code !== 20"),console.log("fetching cancelled!"),new m.CancelError("fetching cancelled! error: ".concat(C))):(C instanceof Error&&C.code===20&&console.error("error.code === 20"),C)})),(0,p.setPromiseCancel)(P,function(){S=!0,u.abort()}),P}function _(){for(var y=[],h=0;h<arguments.length;h++)y[h]=arguments[h];return w.apply(void 0,f([void 0],c(y),!1))}s.cancelableFetchWithProgress=function(y){for(var h=[],d=1;d<arguments.length;d++)h[d-1]=arguments[d];return w.apply(void 0,f([y],c(h),!1))},s.cancelableFetch=_,s.createFetching=function(){return(0,g.createProcessingFromPromiseCreateFunc)(_)},s.createFetchingWithStartValues=function(){for(var y=[],h=0;h<arguments.length;h++)y[h]=arguments[h];return g.createProcessingFromPromiseCreateFuncWithStartValues.apply(void 0,f([_],c(y),!1))}},9986:function(o,s,a){var c,f=this&&this.__extends||(c=function(w,_){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,h){y.__proto__=h}||function(y,h){for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(y[d]=h[d])},c(w,_)},function(w,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function y(){this.constructor=w}c(w,_),w.prototype=_===null?Object.create(_):(y.prototype=_.prototype,new y)}),m=this&&this.__read||function(w,_){var y=typeof Symbol=="function"&&w[Symbol.iterator];if(!y)return w;var h,d,u=y.call(w),l=[];try{for(;(_===void 0||_-- >0)&&!(h=u.next()).done;)l.push(h.value)}catch(v){d={error:v}}finally{try{h&&!h.done&&(y=u.return)&&y.call(u)}finally{if(d)throw d.error}}return l};Object.defineProperty(s,"__esModule",{value:!0}),s.PosFloatDiv=void 0;var p=a(7372),g=function(w){function _(){var y=w.call(this)||this;y._originOffsetX=0,y._originOffsetY=0,y._originRatioX=.5,y._originRatioY=1,y._divChanged=new p.Event;var h=document.createElement("div");h.style.cssText="width: 0px; height: 0px; position: absolute; opacity: 1.0; visibility: visible;";var d=document.createElement("div");d.style.cssText="position: absolute; left: ".concat(-y._originOffsetX,"px; top: ").concat(-y._originOffsetY,"px; transform: translateX(-").concat(100*y._originRatioX,"%) translateY(-").concat(100*y._originRatioY,"%); margin: 0; padding: 0; pointer-events: none;");var u=document.createElement("div");y._contentDiv=u,d.appendChild(u),h.appendChild(d);var l=function(v){v.stopPropagation()};return h.addEventListener("pointermove",l),h.addEventListener("pointerdown",l),h.addEventListener("pointerup",l),y.dispose(function(){h.removeEventListener("pointermove",l),h.removeEventListener("pointerdown",l),h.removeEventListener("pointerup",l)}),y._div=h,y.dispose(y._divChanged.disposableOn(function(){d.style.left="".concat(-y._originOffsetX,"px"),d.style.top="".concat(-y._originOffsetY,"px"),d.style.transform="translateX(-".concat(100*y._originRatioX,"%) translateY(-").concat(100*y._originRatioY,"%)")})),y.dispose(y.winPosChanged.disposableOn(function(v){var b=m(v,2),E=b[0],S=b[1];y._div.style.left="".concat(E,"px"),y._div.style.top="".concat(S,"px")})),y.dispose(y.opacityChanged.disposableOn(function(v){y._div.style.opacity="".concat(v)})),y.dispose(y.showChanged.disposableOn(function(v){y._div.style.visibility=v?"visible":"hidden"})),y}return f(_,w),Object.defineProperty(_.prototype,"contentDiv",{get:function(){return this._contentDiv},enumerable:!1,configurable:!0}),_.prototype.reset=function(){},Object.defineProperty(_.prototype,"originOffsetX",{get:function(){return this._originOffsetX},set:function(y){this._originOffsetX!==y&&(this._originOffsetX=y,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"originOffsetY",{get:function(){return this._originOffsetY},set:function(y){this._originOffsetY!==y&&(this._originOffsetY=y,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"originRatioX",{get:function(){return this._originRatioX},set:function(y){this._originRatioX!==y&&(this._originRatioX=y,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"originRatioY",{get:function(){return this._originRatioY},set:function(y){this._originRatioY!==y&&(this._originRatioY=y,this._divChanged.emit())},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"element",{get:function(){return this._div},enumerable:!1,configurable:!0}),_}(a(7324).FloatDiv);s.PosFloatDiv=g}},n={};function i(o){var s=n[o];if(s!==void 0)return s.exports;var a=n[o]={exports:{}};return t[o].call(a.exports,a,a.exports,i),a.exports}return i.n=o=>{var s=o&&o.__esModule?()=>o.default:()=>o;return i.d(s,{a:s}),s},i.d=(o,s)=>{for(var a in s)i.o(s,a)&&!i.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:s[a]})},i.o=(o,s)=>Object.prototype.hasOwnProperty.call(o,s),i.r=o=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i(4221)})())}(Xc)),Xc.exports}var M=f0();class d0 extends M.Destroyable{constructor(){super(...arguments);D(this,"registerEngines",{})}register(t,n,i){const o=this.registerEngines[t]||new Map;o.has(n)&&console.warn(`register warn:${t}中${n}的实现类已经被注册,再次注册会覆盖。`),o.set(n,i),this.registerEngines[t]=o}getEngineObjConstructor(t,n){const o=(this.registerEngines[n]||new Map).get(t);if(o)return o;console.warn(`未找到${t}在${n}中对应的实现类!`)}createEngineObject(t,n){const i=this.getEngineObjConstructor(t.typeName,n.typeName);if(i){const o=new i(t,n);return o.createdEvent.emit(),o}else{const o=new Go(t,n);return o.createdEvent.emit(),o}}}class p0 extends M.Destroyable{constructor(){super(...arguments);D(this,"registerEngines",{})}register(t,n,i){const o=this.registerEngines[t]||new Map;o.has(n)&&console.warn(`register warn:${t}中${n}的实现类已经被注册,再次注册会覆盖。`),o.set(n,i),this.registerEngines[t]=o}getEngineObjConstructor(t,n){const o=(this.registerEngines[n]||new Map).get(t);if(o)return o;console.warn(`未找到${t}在${n}中对应的实现类!`)}createEngineObject(t,n){const i=this.getEngineObjConstructor(t.typeName,n.typeName);if(i){const o=new i(t,n);return o.createdEvent.emit(),o}else{const o=new Go(t,n);return o.createdEvent.emit(),o}}}const ai=class ai extends M.Destroyable{constructor(t,n,i=!1){super();D(this,"_createdEvent",this.dv(new M.Event));D(this,"_id",++ai._accumId);this._sceneObject=t,this._viewer=n;{if(i)return;t.viewer=n,t.viewerChanged.emit(n);const o=(s,a)=>{for(let c of s)this._viewer.delete(c);for(let c of a)this._viewer.add(c)};o([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(o)),this.d(()=>o(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(ai,"context",new d0),D(ai,"contextEditing",new p0),D(ai,"register",ai.context.register.bind(ai.context)),D(ai,"registerEditing",ai.contextEditing.register.bind(ai.contextEditing)),D(ai,"_accumId",-1);let Go=ai;const sf=class sf extends M.Destroyable{constructor(t,n){super();D(this,"_id",++sf._accumId);this._name=t,this._description=n}get id(){return this._id}get name(){return this._name}get description(){return this._description}};D(sf,"_accumId",-1);let Ks=sf;class pf extends Ks{constructor(e,t,n,i,o){super(e,t),this._withUndefined=n,this._readonly=i,this._defaultValue=o}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class qe extends pf{constructor(e,t,n,i,o,s){super(e,t,n,i,s),this._reactVar=o}get reactVar(){return this._reactVar}}class $ extends qe{get type(){return"BooleanProperty"}}class de extends qe{get type(){return"StringProperty"}}class H extends qe{get type(){return"NumberProperty"}}class g0 extends qe{get type(){return"MaximumScreenSpaceErrorProperty"}}class rp extends qe{get type(){return"StringsProperty"}}class v0 extends qe{get type(){return"NumbersProperty"}}class y0 extends qe{get type(){return"BooleansProperty"}}class m0 extends qe{get type(){return"String2Property"}}class _0 extends qe{get type(){return"String3Property"}}class b0 extends qe{get type(){return"String4Property"}}class np extends qe{get type(){return"String2sProperty"}}class w0 extends qe{get type(){return"String3sProperty"}}class E0 extends qe{get type(){return"String4sProperty"}}class at extends qe{get type(){return"Number2Property"}}class Kt extends qe{get type(){return"Number3Property"}}class kr extends qe{get type(){return"Number4Property"}}class P0 extends qe{get type(){return"Number4WithUndefinedProperty"}}class ip extends qe{get type(){return"Number2sProperty"}}class gf extends qe{get type(){return"Number3sProperty"}}class S0 extends qe{get type(){return"Number4sProperty"}}class C0 extends qe{get type(){return"Boolean2Property"}}class x0 extends qe{get type(){return"Boolean3Property"}}class O0 extends qe{get type(){return"Boolean4Property"}}class M0 extends qe{get type(){return"Boolean2sProperty"}}class I0 extends qe{get type(){return"Boolean3sProperty"}}class T0 extends qe{get type(){return"Boolean4sProperty"}}class N0 extends qe{get type(){return"StringNumberProperty"}}class D0 extends qe{get type(){return"StringNumbersProperty"}}class ge extends kr{get type(){return"ColorProperty"}}class A0 extends Kt{get type(){return"ColorRgbProperty"}}class R0 extends H{get type(){return"DashPatternProperty"}}class ce extends qe{constructor(e,t,n,i,o,s,a){super(e,t,n,i,o,a),this._enums=s}get type(){return"EnumProperty"}get enums(){return this._enums}}class L0 extends qe{constructor(e,t,n,i,o,s,a){super(e,t,n,i,o,a),this._enums=s}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class Gi extends qe{constructor(e,t,n,i,o,s,a){super(e,t,n,i,o,s),this._sampleValue=a}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class sp extends qe{constructor(e,t,n,i,o){super(e,t,!1,!1,n,o),this._paramTypes=i}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class Se extends Ks{constructor(t,n,i,o,s){super(t,n);D(this,"_paramsProperty");D(this,"_getValueFunc");this._func=o;const a=this.disposeVar(M.reactJson(s));this._paramsProperty=this.disposeVar(new sp(t+"_params",t+"_params",a,i,s));const[c]=M.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=c}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class ee extends Ks{constructor(e,t,n){super(e,t),this._children=n}get type(){return"GroupProperty"}get children(){return this._children}}class ae extends qe{constructor(e,t,n,i,o,s,a){super(e,t,n,i,o,s),this._sampleValue=a}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class Yc extends qe{constructor(e,t,n,i,o,s,a){super(e,t,n,i,o,s),this._sampleValue=a}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class F0 extends at{get type(){return"MinmaxProperty"}}class j0 extends kr{get type(){return"NearFarScalerProperty"}}class op extends pf{constructor(e,t,n,i,o,s,a){super(e,t,n,i,a),this._getJsonStringFunc=o,this._setJsonStringFunc=s}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class k0 extends at{get type(){return"NumberRangeProperty"}}class ut extends qe{constructor(e,t,n,i,o,s,a,c){super(e,t,n,i,o,c),this._step=s,this._minMax=a}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function G0(r,e){const[t,n,i]=M.getReactFuncs(r),[o,s,a]=M.getReactFuncs(e),c=M.react((t()??0)/(o()??3e3)),f=()=>{const m=c.value,p=o()??3e3,g=t()??0;if(!Number.isFinite(p)||!Number.isFinite(g)){console.warn(`duration || currentTime error: duration: ${p} currentTime: ${g}`);return}Math.abs(m*p-g)<.001||(p<=0?c.value=0:c.value=g/p)};return c.dispose(i.disposableOn(f)),c.dispose(a.disposableOn(f)),c.dispose(c.changed.disposableOn(()=>{const m=c.value,p=o()??3e3,g=t()??0;if(!Number.isFinite(p)||!Number.isFinite(g)){console.warn(`duration || currentTime error: duration: ${p} currentTime: ${g}`);return}Math.abs(m*p-g)<.001||n(m*p)})),c}class Jc extends Ks{constructor(t,n,i,o,s,a){super(t,n);D(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=i,this._ratioReact=o,this._loopReact=s,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(Jc,"createPlayingRatio",G0);class ci extends Kt{get type(){return"PositionProperty"}}class Kc extends qe{get type(){return"PositionsProperty"}}class V0 extends qe{get type(){return"PositionsSetPropety"}}class Qc extends Kt{get type(){return"RotationProperty"}}class ql extends de{get type(){return"UriProperty"}}class ap extends Ks{constructor(t,n,i,o,s,a){super(t,n);D(this,"_defaults",{playing:!1,loop:!1});this._playingReact=i,this._stopFn=o,this._loopReact=s,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 vf extends qe{get type(){return"DatesProperty"}}class Vi extends qe{get type(){return"DateProperty"}}var xe=(r=>(r.Place="place",r.Translation="translation",r.Rotation="rotation",r.Scale="scale",r.DoublePointsAppend="doublePointsAppend",r.DoublePointsModify="doublePointsModify",r.CircularAppend="circularAppend",r.CircularInsert="circularInsert",r.LineStringAppend="lineStringAppend",r.LineStringInsert="lineStringInsert",r.ScatterAppend="scatterAppend",r.ScatterModify="scatterModify",r.VisibilityAppend="visibilityAppend",r.VisibilityModify="visibilityModify",r.HeightModify="heightModify",r))(xe||{}),up=(r=>(r.DECIMAL_DEGREE="DECIMAL_DEGREE",r.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",r.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",r))(up||{});class $c{constructor(e){this.childPickedInfo=e}static getFinalAttachedInfo(e){let t=e;for(;t.childPickedInfo;)t=t.childPickedInfo;if(t instanceof lp)return t.attachedInfo}}class lp extends $c{constructor(e,t){super(t),this.attachedInfo=e}}class B0{constructor(e,t){this.pickedInfo=e,this.attachedInfo=t}}class z0 extends $c{constructor(e,t){super(t),this.element=e}}class Zc extends $c{constructor(e,t){super(t),this.sceneObject=e}}class U0{constructor(e,t,n,i,o){this.pickResult=e,this.sceneObject=t,this.tilesetPickInfo=n,this.geojsonPickInfo=i,this.attachedInfo=o}}class W0 extends M.Destroyable{constructor(t){super();D(this,"_sceneObjRefs",new Map);D(this,"_refs",{});D(this,"_refsChanged",this.dv(new M.Event));const n=(i,o,s)=>{if(s){const a=this.getLastSceneObject(s),c=this._sceneObjRefs.get(s);if(!c)console.warn(`this._sceneObjRefs中不存在ref(${s}), 可能系统存在逻辑问题`);else{const m=c.indexOf(i);m===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(c.splice(m,1),c.length===0&&this._sceneObjRefs.delete(s))}const f=this.getLastSceneObject(s);this._refs[s]=f,this._refsChanged.emit(f,a)}if(o){const a=this.getLastSceneObject(o),c=this._sceneObjRefs.get(o);c?(c.push(i),c.length>0&&console.warn(`同时存在多个ref${o}相同的场景对象!
229
+ ${c.map(m=>`${m.id} ${m.typeName}
230
+ `).join(" ")}`)):this._sceneObjRefs.set(o,[i]);const f=this.getLastSceneObject(o);this._refs[o]=f,this._refsChanged.emit(f,a)}};this.d(t.sceneObjCreatedEvent.don(i=>{const o=(s,a)=>n(i,s,a);i.ref&&o(i.ref,void 0),i.refChanged.don(o)})),this.d(t.sceneObjToDestroyEvent.don(i=>{i.ref&&n(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(t){const n=this.getSceneObjects(t);if(n)return n[n.length-1]}getSceneObjects(t){const n=this._sceneObjRefs.get(t);if(!(!n||n.length===0))return n}}function cp(r,e){const[t,n,i]=M.getReactFuncs(r),o=M.react(void 0),s=()=>{const a=t()??e;o.value=a&&we.context.getStrFromEnv(a)};return s(),i&&o.d(i.don(s)),o.d(we.context.environmentVariablesChanged.don(s)),o}function q0(r){do{const e=r.replace(/\${(.*?)\}/,(t,n)=>{const i=we.context.getEnv(n);return i===void 0?(console.warn(`环境变量(${n})不存在,无法进行转换`),"{env-error}"):i});if(e===r)break;r=e}while(!0);return r}class H0 extends M.Destroyable{constructor(){super();D(this,"_esObjConstructors",new Map);D(this,"_sceneObjs",new Map);D(this,"_sceneObjCreatedEvent",new M.Event);D(this,"_sceneObjToDestroyEvent",new M.Event);D(this,"_refsManager",this.dv(new W0(this)));D(this,"_environmentVariables",window.ESSDK_ENV||{});D(this,"_environmentVariablesChanged",this.dv(new M.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,n,i){return this._esObjConstructors.has(t)&&console.warn(`register warn: ${t} has registered ! will be override!`),this._esObjConstructors.set(t,n),i&&M.setExtProp(n,"__sceneObjExtraInfo",i),t}_addSceneObject(t){this._sceneObjs.set(t.id,t),this._sceneObjCreatedEvent.emit(t),t.d(()=>this._deleteSceneObject(t))}_deleteSceneObject(t){this._sceneObjToDestroyEvent.emit(t),this._sceneObjs.delete(t.id)}createSceneObjectFromClass(t,n){if(!n||this._sceneObjs.has(n)){const o=M.createGuid();n&&console.warn(`已存在相同id的对象!id自动变更!${n} -> ${o} 请注意:id变更可能导致引用失效!`),n=o}if(!n)throw new Error("id不能为空!");const i=new t(n);return i.id!==n&&(console.warn(`sceneObj.id(${i.id}) !== id(${n}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(t,n){if(typeof t=="string"){const i=this._getSceneObjConstructor(t);if(!i){console.warn(`Cannot find SceneObjectType: ${t}`);return}return this.createSceneObjectFromClass(i,n)}else return this.createSceneObjectFromClass(t,n)}createSceneObjectFromJson(t){const n=this.createSceneObject(t.type,t.id);return n&&(n.json=t),n}destroySceneObject(t){return this._deleteSceneObject(t),t.destroy(),t.isDestroyed()}getSceneObjectById(t){return this._sceneObjs.get(t.split("_")[0])}getSceneObject(t){if(!t)return Array.from(this._sceneObjs.values());if(t.startsWith("ES")){const n=[];for(const i of this._sceneObjs.values())i.typeName===t&&n.push(i);return n}else return this._sceneObjs.get(t.split("_")[0])}_getSceneObjConstructor(t){const n=this._esObjConstructors.get(t);if(n)return n}getProps(t){const n=this._getSceneObjConstructor(t);if(!n){console.warn(`cannot get constructor from type: ${t}`);return}return M.getExtProp(n,"__sceneObjExtraInfo")}setProps(t,n){const i=this._getSceneObjConstructor(t);if(!i){console.warn(`cannot get constructor from type: ${t}`);return}let o=M.getExtProp(i,"__sceneObjExtraInfo");o||(o={},M.setExtProp(i,"__sceneObjExtraInfo",o)),Object.assign(o,n)}getProp(t,n){const i=this.getProps(t);return i&&i[n]}setProp(t,n,i){this.setProps(t,{[n]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(t){for(let[n,i]of Object.entries(t))this.setEnv(n,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(t,n){if(this._environmentVariables[t]!==n){const i=this._environmentVariables[t];this._environmentVariables[t]=n,this._environmentVariablesChanged.emit(t,n,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(t){return this._environmentVariables[t]}getStrFromEnv(t){return q0(t)}createEnvStrReact(t,n){return cp(t,n)}createEvnStrReact(t,n){return cp(t,n)}}const Be=class Be extends M.Destroyable{constructor(t){super();D(this,"_components",this.dv(new M.ObservableSet));D(this,"_viewerAttached",this.dv(new M.Event));D(this,"_viewerDetached",this.dv(new M.Event));D(this,"_attachedViewers",(()=>{const t=new Set;return this.d(this._viewerAttached.don(n=>{t.add(n)})),this.d(this._viewerDetached.don(n=>{t.delete(n)})),t})());D(this,"_createdEvent",this.dv(new M.Event));D(this,"_flushEvent",this.dv(new M.Event));D(this,"_id");D(this,"viewer");D(this,"viewerChanged",this.ad(new M.Event));D(this,"combinationClass",!1);D(this,"mainClass");D(this,"_updateFuncReact",this.dv(M.react(void 0)));D(this,"_toDestroyFuncReact",this.dv(M.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??M.createGuid(),this._initName();{const n=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};n(),this.d(this.execOnceFuncStrChanged.don(n))}{const n=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};n(),this.d(this.updateFuncStrChanged.don(n));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||M.createAnimateFrame(),i.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const n=()=>{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}};n(),this.d(this.toDestroyFuncStrChanged.don(n)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static get envs(){return Be.context.environmentVariables}static get $refs(){return Be.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 n=new Map;this.d(()=>{n.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const o=t(i);o&&n.set(i,o)})),this.d(this._viewerDetached.don(i=>{if(!n.has(i))return;const o=n.get(i);o&&(o.destroy(),n.delete(i))}))}createAttachedObject(t){const n=new Map,i=()=>{for(let[c,f]of n.entries())f.destroy();n.clear()},o=c=>{const f=t(c);f&&n.set(c,f)};for(let c of this.attachedViewers)o(c);const s=this._viewerAttached.don(o),a=this._viewerDetached.don(c=>{if(!n.has(c))return;const f=n.get(c);f&&(f.destroy(),n.delete(c))});return()=>{a(),s(),i()}}registerAttachedObjectForContainer(t){this.registerAttachedObject(n=>new X0(n,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 Be.createDefaultProps()}getMainClass(){return this.mainClass??this}_innerGetJson(t=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(t){let o,s=this.defaultProps[i];s instanceof M.ReactiveVariable?o=s.equals(this[i]):o=s===this[i],o||(n[i]=this[i])}else n[i]=this[i];return n}_innerSetJson(t,n,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 o=n||[];o.push("id","type");const s=Object.keys(this.defaultProps).filter(a=>!o.includes(a));for(let a of s)if(a in t)this[a]=t[a]===null?void 0:t[a];else if(!(i??!1)){let c=this.defaultProps[a];c instanceof M.ReactiveVariable&&(c=c.value),this[a]=c}}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}getProperties(t){return[new ee("ESSceneObject","ESSceneObject",[new de("对象类型","类型(type)",!1,!0,[this,"typeName"]),new de("对象id","唯一标识符(id)",!1,!0,[this,"id"]),new de("对象名称","名称(name)",!1,!1,[this,"name"]),new de("ref","标识(ref),可通过 ESSceneObject.$refs.xxx快速获取到对象",!0,!1,[this,"ref"]),new ae("extras","扩展属性,必须整体赋值(extras)",!0,!1,[this,"extras"]),new op("JSON","对象JSON数据动态更改导入导出。",!1,!1,()=>this._jsonStr,n=>n&&(this._jsonStr=n))])]}getESProperties(){return{defaultMenu:"basic",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[]}}};D(Be,"context",new H0),D(Be,"register",Be.context.register.bind(Be.context)),D(Be,"create",Be.context.createSceneObject.bind(Be.context)),D(Be,"createFromClass",Be.context.createSceneObjectFromClass.bind(Be.context)),D(Be,"createFromJson",Be.context.createSceneObjectFromJson.bind(Be.context)),D(Be,"destroySceneObject",Be.context.destroySceneObject.bind(Be.context)),D(Be,"getSceneObjById",Be.context.getSceneObjectById.bind(Be.context)),D(Be,"getSceneObj",Be.context.getSceneObject.bind(Be.context)),D(Be,"getEnv",Be.context.getEnv.bind(Be.context)),D(Be,"setEnv",Be.context.setEnv.bind(Be.context)),D(Be,"getStrFromEnv",Be.context.getStrFromEnv.bind(Be.context)),D(Be,"getSceneObjectById",Be.context.getSceneObjectById.bind(Be.context)),D(Be,"getSceneObject",Be.context.getSceneObject.bind(Be.context)),D(Be,"defaults",{});let we=Be;(r=>{r.createDefaultProps=()=>({name:"未命名场景对象",ref:void 0,extras:M.reactJson(void 0),devTags:M.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(we||(we={})),M.extendClassProps(we.prototype,we.createDefaultProps);class X0 extends M.Destroyable{constructor(e,t){super(),this.dv(new M.ObjResettingWithEvent(e.subContainerChanged,()=>{if(e.subContainer)return t(e,e.subContainer)}))}}function hp(r){return M.reactDeepArrayWithUndefined(r,(e,t)=>e[0]===t[0]&&e[1]===t[1],e=>[...e])}function fp(r,e){const t=new Array;for(let n of r)t.push(e(n));return t}function yf(r,e){return r===void 0&&e===void 0?!0:!r||!e?!1:r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}var pr=63710088e-1,dp={centimeters:pr*100,centimetres:pr*100,degrees:pr/111325,feet:pr*3.28084,inches:pr*39.37,kilometers:pr/1e3,kilometres:pr/1e3,meters:pr,metres:pr,miles:pr/1609.344,millimeters:pr*1e3,millimetres:pr*1e3,nauticalmiles:pr/1852,radians:1,yards:pr*1.0936};function hi(r,e,t){t===void 0&&(t={});var n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=r,n}function lt(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!pp(r[0])||!pp(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return hi(n,e,t)}function Mr(r,e,t){t===void 0&&(t={});for(var n=0,i=r;n<i.length;n++){var o=i[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:r};return hi(a,e,t)}function fi(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:r};return hi(n,e,t)}function Ku(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}function mf(r,e,t){t===void 0&&(t={});var n={type:"MultiPolygon",coordinates:r};return hi(n,e,t)}function _f(r,e){e===void 0&&(e="kilometers");var t=dp[e];if(!t)throw new Error(e+" units is invalid");return r*t}function bf(r,e){e===void 0&&(e="kilometers");var t=dp[e];if(!t)throw new Error(e+" units is invalid");return r/t}function eh(r){var e=r%(2*Math.PI);return e*180/Math.PI}function Ir(r){var e=r%360;return e*Math.PI/180}function wf(r,e,t){if(e===void 0&&(e="kilometers"),t===void 0&&(t="kilometers"),!(r>=0))throw new Error("length must be a positive number");return _f(bf(r,e),t)}function pp(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Qu(r,e,t){if(r!==null)for(var n,i,o,s,a,c,f,m=0,p=0,g,w=r.type,_=w==="FeatureCollection",y=w==="Feature",h=_?r.features.length:1,d=0;d<h;d++){f=_?r.features[d].geometry:y?r.geometry:r,g=f?f.type==="GeometryCollection":!1,a=g?f.geometries.length:1;for(var u=0;u<a;u++){var l=0,v=0;if(s=g?f.geometries[u]:f,s!==null){c=s.coordinates;var b=s.type;switch(m=t&&(b==="Polygon"||b==="MultiPolygon")?1:0,b){case null:break;case"Point":if(e(c,p,d,l,v)===!1)return!1;p++,l++;break;case"LineString":case"MultiPoint":for(n=0;n<c.length;n++){if(e(c[n],p,d,l,v)===!1)return!1;p++,b==="MultiPoint"&&l++}b==="LineString"&&l++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(i=0;i<c[n].length-m;i++){if(e(c[n][i],p,d,l,v)===!1)return!1;p++}b==="MultiLineString"&&l++,b==="Polygon"&&v++}b==="Polygon"&&l++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(v=0,i=0;i<c[n].length;i++){for(o=0;o<c[n][i].length-m;o++){if(e(c[n][i][o],p,d,l,v)===!1)return!1;p++}v++}l++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(Qu(s.geometries[n],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function th(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}function rh(r,e){var t,n,i,o,s,a,c,f,m,p,g=0,w=r.type==="FeatureCollection",_=r.type==="Feature",y=w?r.features.length:1;for(t=0;t<y;t++){for(a=w?r.features[t].geometry:_?r.geometry:r,f=w?r.features[t].properties:_?r.properties:{},m=w?r.features[t].bbox:_?r.bbox:void 0,p=w?r.features[t].id:_?r.id:void 0,c=a?a.type==="GeometryCollection":!1,s=c?a.geometries.length:1,i=0;i<s;i++){if(o=c?a.geometries[i]:a,o===null){if(e(null,g,f,m,p)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(o,g,f,m,p)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<o.geometries.length;n++)if(e(o.geometries[n],g,f,m,p)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}g++}}function Y0(r,e,t){var n=t;return rh(r,function(i,o,s,a,c){n=e(n,i,o,s,a,c)}),n}function Ef(r,e){rh(r,function(t,n,i,o,s){var a=t===null?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return e(hi(t,i,{bbox:o,id:s}),n,0)===!1?!1:void 0}var c;switch(a){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}for(var f=0;f<t.coordinates.length;f++){var m=t.coordinates[f],p={type:c,coordinates:m};if(e(hi(p,i),n,f)===!1)return!1}})}function J0(r,e){Ef(r,function(t,n,i){var o=0;if(t.geometry){var s=t.geometry.type;if(!(s==="Point"||s==="MultiPoint")){var a,c=0,f=0,m=0;if(Qu(t,function(p,g,w,_,y){if(a===void 0||n>c||_>f||y>m){a=p,c=n,f=_,m=y,o=0;return}var h=fi([a,p],t.properties);if(e(h,n,i,y,o)===!1)return!1;o++,a=p})===!1)return!1}}})}function di(r){var e=[1/0,1/0,-1/0,-1/0];return Qu(r,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}di.default=di;function Gr(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Vo(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function gp(r,e,t){if(!r)throw new Error("No feature passed");if(!t)throw new Error(".featureOf() requires a name");if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+t+", Feature with geometry required");if(!r.geometry||r.geometry.type!==e)throw new Error("Invalid input to "+t+": must be a "+e+", given "+r.geometry.type)}function En(r){return r.type==="Feature"?r.geometry:r}function K0(r,e){return r.type==="FeatureCollection"?"FeatureCollection":r.type==="GeometryCollection"?"GeometryCollection":r.type==="Feature"&&r.geometry!==null?r.geometry.type:r.type}var nh={exports:{}},ih={exports:{}},Q0=ih.exports,vp;function yp(){return vp||(vp=1,function(r,e){(function(t,n){r.exports=n()})(Q0,function(){function t(u,l,v,b,E){(function S(P,C,x,O,I){for(;O>x;){if(O-x>600){var N=O-x+1,T=C-x+1,R=Math.log(N),A=.5*Math.exp(2*R/3),B=.5*Math.sqrt(R*A*(N-A)/N)*(T-N/2<0?-1:1),k=Math.max(x,Math.floor(C-T*A/N+B)),z=Math.min(O,Math.floor(C+(N-T)*A/N+B));S(P,C,k,z,I)}var j=P[C],L=x,F=O;for(n(P,x,C),I(P[O],j)>0&&n(P,x,O);L<F;){for(n(P,L,F),L++,F--;I(P[L],j)<0;)L++;for(;I(P[F],j)>0;)F--}I(P[x],j)===0?n(P,x,F):n(P,++F,O),F<=C&&(x=F+1),C<=F&&(O=F-1)}})(u,l,v||0,b||u.length-1,E||i)}function n(u,l,v){var b=u[l];u[l]=u[v],u[v]=b}function i(u,l){return u<l?-1:u>l?1:0}var o=function(u){u===void 0&&(u=9),this._maxEntries=Math.max(4,u),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(u,l,v){if(!v)return l.indexOf(u);for(var b=0;b<l.length;b++)if(v(u,l[b]))return b;return-1}function a(u,l){c(u,0,u.children.length,l,u)}function c(u,l,v,b,E){E||(E=h(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var S=l;S<v;S++){var P=u.children[S];f(E,u.leaf?b(P):P)}return E}function f(u,l){return u.minX=Math.min(u.minX,l.minX),u.minY=Math.min(u.minY,l.minY),u.maxX=Math.max(u.maxX,l.maxX),u.maxY=Math.max(u.maxY,l.maxY),u}function m(u,l){return u.minX-l.minX}function p(u,l){return u.minY-l.minY}function g(u){return(u.maxX-u.minX)*(u.maxY-u.minY)}function w(u){return u.maxX-u.minX+(u.maxY-u.minY)}function _(u,l){return u.minX<=l.minX&&u.minY<=l.minY&&l.maxX<=u.maxX&&l.maxY<=u.maxY}function y(u,l){return l.minX<=u.maxX&&l.minY<=u.maxY&&l.maxX>=u.minX&&l.maxY>=u.minY}function h(u){return{children:u,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(u,l,v,b,E){for(var S=[l,v];S.length;)if(!((v=S.pop())-(l=S.pop())<=b)){var P=l+Math.ceil((v-l)/b/2)*b;t(u,P,l,v,E),S.push(l,P,P,v)}}return o.prototype.all=function(){return this._all(this.data,[])},o.prototype.search=function(u){var l=this.data,v=[];if(!y(u,l))return v;for(var b=this.toBBox,E=[];l;){for(var S=0;S<l.children.length;S++){var P=l.children[S],C=l.leaf?b(P):P;y(u,C)&&(l.leaf?v.push(P):_(u,C)?this._all(P,v):E.push(P))}l=E.pop()}return v},o.prototype.collides=function(u){var l=this.data;if(!y(u,l))return!1;for(var v=[];l;){for(var b=0;b<l.children.length;b++){var E=l.children[b],S=l.leaf?this.toBBox(E):E;if(y(u,S)){if(l.leaf||_(u,S))return!0;v.push(E)}}l=v.pop()}return!1},o.prototype.load=function(u){if(!u||!u.length)return this;if(u.length<this._minEntries){for(var l=0;l<u.length;l++)this.insert(u[l]);return this}var v=this._build(u.slice(),0,u.length-1,0);if(this.data.children.length)if(this.data.height===v.height)this._splitRoot(this.data,v);else{if(this.data.height<v.height){var b=this.data;this.data=v,v=b}this._insert(v,this.data.height-v.height-1,!0)}else this.data=v;return this},o.prototype.insert=function(u){return u&&this._insert(u,this.data.height-1),this},o.prototype.clear=function(){return this.data=h([]),this},o.prototype.remove=function(u,l){if(!u)return this;for(var v,b,E,S=this.data,P=this.toBBox(u),C=[],x=[];S||C.length;){if(S||(S=C.pop(),b=C[C.length-1],v=x.pop(),E=!0),S.leaf){var O=s(u,S.children,l);if(O!==-1)return S.children.splice(O,1),C.push(S),this._condense(C),this}E||S.leaf||!_(S,P)?b?(v++,S=b.children[v],E=!1):S=null:(C.push(S),x.push(v),v=0,b=S,S=S.children[0])}return this},o.prototype.toBBox=function(u){return u},o.prototype.compareMinX=function(u,l){return u.minX-l.minX},o.prototype.compareMinY=function(u,l){return u.minY-l.minY},o.prototype.toJSON=function(){return this.data},o.prototype.fromJSON=function(u){return this.data=u,this},o.prototype._all=function(u,l){for(var v=[];u;)u.leaf?l.push.apply(l,u.children):v.push.apply(v,u.children),u=v.pop();return l},o.prototype._build=function(u,l,v,b){var E,S=v-l+1,P=this._maxEntries;if(S<=P)return a(E=h(u.slice(l,v+1)),this.toBBox),E;b||(b=Math.ceil(Math.log(S)/Math.log(P)),P=Math.ceil(S/Math.pow(P,b-1))),(E=h([])).leaf=!1,E.height=b;var C=Math.ceil(S/P),x=C*Math.ceil(Math.sqrt(P));d(u,l,v,x,this.compareMinX);for(var O=l;O<=v;O+=x){var I=Math.min(O+x-1,v);d(u,O,I,C,this.compareMinY);for(var N=O;N<=I;N+=C){var T=Math.min(N+C-1,I);E.children.push(this._build(u,N,T,b-1))}}return a(E,this.toBBox),E},o.prototype._chooseSubtree=function(u,l,v,b){for(;b.push(l),!l.leaf&&b.length-1!==v;){for(var E=1/0,S=1/0,P=void 0,C=0;C<l.children.length;C++){var x=l.children[C],O=g(x),I=(N=u,T=x,(Math.max(T.maxX,N.maxX)-Math.min(T.minX,N.minX))*(Math.max(T.maxY,N.maxY)-Math.min(T.minY,N.minY))-O);I<S?(S=I,E=O<E?O:E,P=x):I===S&&O<E&&(E=O,P=x)}l=P||l.children[0]}var N,T;return l},o.prototype._insert=function(u,l,v){var b=v?u:this.toBBox(u),E=[],S=this._chooseSubtree(b,this.data,l,E);for(S.children.push(u),f(S,b);l>=0&&E[l].children.length>this._maxEntries;)this._split(E,l),l--;this._adjustParentBBoxes(b,E,l)},o.prototype._split=function(u,l){var v=u[l],b=v.children.length,E=this._minEntries;this._chooseSplitAxis(v,E,b);var S=this._chooseSplitIndex(v,E,b),P=h(v.children.splice(S,v.children.length-S));P.height=v.height,P.leaf=v.leaf,a(v,this.toBBox),a(P,this.toBBox),l?u[l-1].children.push(P):this._splitRoot(v,P)},o.prototype._splitRoot=function(u,l){this.data=h([u,l]),this.data.height=u.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},o.prototype._chooseSplitIndex=function(u,l,v){for(var b,E,S,P,C,x,O,I=1/0,N=1/0,T=l;T<=v-l;T++){var R=c(u,0,T,this.toBBox),A=c(u,T,v,this.toBBox),B=(E=R,S=A,P=void 0,C=void 0,x=void 0,O=void 0,P=Math.max(E.minX,S.minX),C=Math.max(E.minY,S.minY),x=Math.min(E.maxX,S.maxX),O=Math.min(E.maxY,S.maxY),Math.max(0,x-P)*Math.max(0,O-C)),k=g(R)+g(A);B<I?(I=B,b=T,N=k<N?k:N):B===I&&k<N&&(N=k,b=T)}return b||v-l},o.prototype._chooseSplitAxis=function(u,l,v){var b=u.leaf?this.compareMinX:m,E=u.leaf?this.compareMinY:p;this._allDistMargin(u,l,v,b)<this._allDistMargin(u,l,v,E)&&u.children.sort(b)},o.prototype._allDistMargin=function(u,l,v,b){u.children.sort(b);for(var E=this.toBBox,S=c(u,0,l,E),P=c(u,v-l,v,E),C=w(S)+w(P),x=l;x<v-l;x++){var O=u.children[x];f(S,u.leaf?E(O):O),C+=w(S)}for(var I=v-l-1;I>=l;I--){var N=u.children[I];f(P,u.leaf?E(N):N),C+=w(P)}return C},o.prototype._adjustParentBBoxes=function(u,l,v){for(var b=v;b>=0;b--)f(l[b],u)},o.prototype._condense=function(u){for(var l=u.length-1,v=void 0;l>=0;l--)u[l].children.length===0?l>0?(v=u[l-1].children).splice(v.indexOf(u[l]),1):this.clear():a(u[l],this.toBBox)},o})}(ih)),ih.exports}class $0{constructor(e=[],t=Z0){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}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:n}=this,i=t[e];for(;e>0;){const o=e-1>>1,s=t[o];if(n(i,s)>=0)break;t[e]=s,e=o}t[e]=i}_down(e){const{data:t,compare:n}=this,i=this.length>>1,o=t[e];for(;e<i;){let s=(e<<1)+1,a=t[s];const c=s+1;if(c<this.length&&n(t[c],a)<0&&(s=c,a=t[c]),n(a,o)>=0)break;t[e]=a,e=s}t[e]=o}}function Z0(r,e){return r<e?-1:r>e?1:0}const em=Ju(Object.freeze(Object.defineProperty({__proto__:null,default:$0},Symbol.toStringTag,{value:"Module"})));var Hl={exports:{}},Pf,mp;function tm(){return mp||(mp=1,Pf=function(e,t,n,i){var o=e[0],s=e[1],a=!1;n===void 0&&(n=0),i===void 0&&(i=t.length);for(var c=(i-n)/2,f=0,m=c-1;f<c;m=f++){var p=t[n+f*2+0],g=t[n+f*2+1],w=t[n+m*2+0],_=t[n+m*2+1],y=g>s!=_>s&&o<(w-p)*(s-g)/(_-g)+p;y&&(a=!a)}return a}),Pf}var Sf,_p;function rm(){return _p||(_p=1,Sf=function(e,t,n,i){var o=e[0],s=e[1],a=!1;n===void 0&&(n=0),i===void 0&&(i=t.length);for(var c=i-n,f=0,m=c-1;f<c;m=f++){var p=t[f+n][0],g=t[f+n][1],w=t[m+n][0],_=t[m+n][1],y=g>s!=_>s&&o<(w-p)*(s-g)/(_-g)+p;y&&(a=!a)}return a}),Sf}var bp;function nm(){if(bp)return Hl.exports;bp=1;var r=tm(),e=rm();return Hl.exports=function(n,i,o,s){return i.length>0&&Array.isArray(i[0])?e(n,i,o,s):r(n,i,o,s)},Hl.exports.nested=e,Hl.exports.flat=r,Hl.exports}var Xl={exports:{}},im=Xl.exports,wp;function sm(){return wp||(wp=1,function(r,e){(function(t,n){n(e)})(im,function(t){const i=33306690738754706e-32;function o(y,h,d,u,l){let v,b,E,S,P=h[0],C=u[0],x=0,O=0;C>P==C>-P?(v=P,P=h[++x]):(v=C,C=u[++O]);let I=0;if(x<y&&O<d)for(C>P==C>-P?(E=v-((b=P+v)-P),P=h[++x]):(E=v-((b=C+v)-C),C=u[++O]),v=b,E!==0&&(l[I++]=E);x<y&&O<d;)C>P==C>-P?(E=v-((b=v+P)-(S=b-v))+(P-S),P=h[++x]):(E=v-((b=v+C)-(S=b-v))+(C-S),C=u[++O]),v=b,E!==0&&(l[I++]=E);for(;x<y;)E=v-((b=v+P)-(S=b-v))+(P-S),P=h[++x],v=b,E!==0&&(l[I++]=E);for(;O<d;)E=v-((b=v+C)-(S=b-v))+(C-S),C=u[++O],v=b,E!==0&&(l[I++]=E);return v===0&&I!==0||(l[I++]=v),I}function s(y){return new Float64Array(y)}const a=33306690738754716e-32,c=22204460492503146e-32,f=11093356479670487e-47,m=s(4),p=s(8),g=s(12),w=s(16),_=s(4);t.orient2d=function(y,h,d,u,l,v){const b=(h-v)*(d-l),E=(y-l)*(u-v),S=b-E;if(b===0||E===0||b>0!=E>0)return S;const P=Math.abs(b+E);return Math.abs(S)>=a*P?S:-function(C,x,O,I,N,T,R){let A,B,k,z,j,L,F,G,W,V,U,q,J,Y,re,oe,te,me;const be=C-N,ne=O-N,fe=x-T,Ce=I-T;j=(re=(G=be-(F=(L=134217729*be)-(L-be)))*(V=Ce-(W=(L=134217729*Ce)-(L-Ce)))-((Y=be*Ce)-F*W-G*W-F*V))-(U=re-(te=(G=fe-(F=(L=134217729*fe)-(L-fe)))*(V=ne-(W=(L=134217729*ne)-(L-ne)))-((oe=fe*ne)-F*W-G*W-F*V))),m[0]=re-(U+j)+(j-te),j=(J=Y-((q=Y+U)-(j=q-Y))+(U-j))-(U=J-oe),m[1]=J-(U+j)+(j-oe),j=(me=q+U)-q,m[2]=q-(me-j)+(U-j),m[3]=me;let Te=function(Ve,Ye){let je=Ye[0];for(let Gt=1;Gt<Ve;Gt++)je+=Ye[Gt];return je}(4,m),Ie=c*R;if(Te>=Ie||-Te>=Ie||(A=C-(be+(j=C-be))+(j-N),k=O-(ne+(j=O-ne))+(j-N),B=x-(fe+(j=x-fe))+(j-T),z=I-(Ce+(j=I-Ce))+(j-T),A===0&&B===0&&k===0&&z===0)||(Ie=f*R+i*Math.abs(Te),(Te+=be*z+Ce*A-(fe*k+ne*B))>=Ie||-Te>=Ie))return Te;j=(re=(G=A-(F=(L=134217729*A)-(L-A)))*(V=Ce-(W=(L=134217729*Ce)-(L-Ce)))-((Y=A*Ce)-F*W-G*W-F*V))-(U=re-(te=(G=B-(F=(L=134217729*B)-(L-B)))*(V=ne-(W=(L=134217729*ne)-(L-ne)))-((oe=B*ne)-F*W-G*W-F*V))),_[0]=re-(U+j)+(j-te),j=(J=Y-((q=Y+U)-(j=q-Y))+(U-j))-(U=J-oe),_[1]=J-(U+j)+(j-oe),j=(me=q+U)-q,_[2]=q-(me-j)+(U-j),_[3]=me;const ve=o(4,m,4,_,p);j=(re=(G=be-(F=(L=134217729*be)-(L-be)))*(V=z-(W=(L=134217729*z)-(L-z)))-((Y=be*z)-F*W-G*W-F*V))-(U=re-(te=(G=fe-(F=(L=134217729*fe)-(L-fe)))*(V=k-(W=(L=134217729*k)-(L-k)))-((oe=fe*k)-F*W-G*W-F*V))),_[0]=re-(U+j)+(j-te),j=(J=Y-((q=Y+U)-(j=q-Y))+(U-j))-(U=J-oe),_[1]=J-(U+j)+(j-oe),j=(me=q+U)-q,_[2]=q-(me-j)+(U-j),_[3]=me;const Ne=o(ve,p,4,_,g);j=(re=(G=A-(F=(L=134217729*A)-(L-A)))*(V=z-(W=(L=134217729*z)-(L-z)))-((Y=A*z)-F*W-G*W-F*V))-(U=re-(te=(G=B-(F=(L=134217729*B)-(L-B)))*(V=k-(W=(L=134217729*k)-(L-k)))-((oe=B*k)-F*W-G*W-F*V))),_[0]=re-(U+j)+(j-te),j=(J=Y-((q=Y+U)-(j=q-Y))+(U-j))-(U=J-oe),_[1]=J-(U+j)+(j-oe),j=(me=q+U)-q,_[2]=q-(me-j)+(U-j),_[3]=me;const Le=o(Ne,g,4,_,w);return w[Le-1]}(y,h,d,u,l,v,P)},t.orient2dfast=function(y,h,d,u,l,v){return(h-v)*(d-l)-(y-l)*(u-v)},Object.defineProperty(t,"__esModule",{value:!0})})}(Xl,Xl.exports)),Xl.exports}var Ep;function om(){if(Ep)return nh.exports;Ep=1;var r=yp(),e=em,t=nm(),n=sm().orient2d;e.default&&(e=e.default),nh.exports=i,nh.exports.default=i;function i(v,b,E){b=Math.max(0,b===void 0?2:b),E=E||0;var S=w(v),P=new r(16);P.toBBox=function(F){return{minX:F[0],minY:F[1],maxX:F[0],maxY:F[1]}},P.compareMinX=function(F,G){return F[0]-G[0]},P.compareMinY=function(F,G){return F[1]-G[1]},P.load(v);for(var C=[],x=0,O;x<S.length;x++){var I=S[x];P.remove(I),O=_(I,O),C.push(O)}var N=new r(16);for(x=0;x<C.length;x++)N.insert(g(C[x]));for(var T=b*b,R=E*E;C.length;){var A=C.shift(),B=A.p,k=A.next.p,z=y(B,k);if(!(z<R)){var j=z/T;I=o(P,A.prev.p,B,k,A.next.next.p,j,N),I&&Math.min(y(I,B),y(I,k))<=j&&(C.push(A),C.push(_(I,A)),P.remove(I),N.remove(A),N.insert(g(A)),N.insert(g(A.next)))}}A=O;var L=[];do L.push(A.p),A=A.next;while(A!==O);return L.push(A.p),L}function o(v,b,E,S,P,C,x){for(var O=new e([],s),I=v.data;I;){for(var N=0;N<I.children.length;N++){var T=I.children[N],R=I.leaf?h(T,E,S):a(E,S,T);R>C||O.push({node:T,dist:R})}for(;O.length&&!O.peek().node.children;){var A=O.pop(),B=A.node,k=h(B,b,E),z=h(B,S,P);if(A.dist<k&&A.dist<z&&f(E,B,x)&&f(S,B,x))return B}I=O.pop(),I&&(I=I.node)}return null}function s(v,b){return v.dist-b.dist}function a(v,b,E){if(c(v,E)||c(b,E))return 0;var S=d(v[0],v[1],b[0],b[1],E.minX,E.minY,E.maxX,E.minY);if(S===0)return 0;var P=d(v[0],v[1],b[0],b[1],E.minX,E.minY,E.minX,E.maxY);if(P===0)return 0;var C=d(v[0],v[1],b[0],b[1],E.maxX,E.minY,E.maxX,E.maxY);if(C===0)return 0;var x=d(v[0],v[1],b[0],b[1],E.minX,E.maxY,E.maxX,E.maxY);return x===0?0:Math.min(S,P,C,x)}function c(v,b){return v[0]>=b.minX&&v[0]<=b.maxX&&v[1]>=b.minY&&v[1]<=b.maxY}function f(v,b,E){for(var S=Math.min(v[0],b[0]),P=Math.min(v[1],b[1]),C=Math.max(v[0],b[0]),x=Math.max(v[1],b[1]),O=E.search({minX:S,minY:P,maxX:C,maxY:x}),I=0;I<O.length;I++)if(p(O[I].p,O[I].next.p,v,b))return!1;return!0}function m(v,b,E){return n(v[0],v[1],b[0],b[1],E[0],E[1])}function p(v,b,E,S){return v!==S&&b!==E&&m(v,b,E)>0!=m(v,b,S)>0&&m(E,S,v)>0!=m(E,S,b)>0}function g(v){var b=v.p,E=v.next.p;return v.minX=Math.min(b[0],E[0]),v.minY=Math.min(b[1],E[1]),v.maxX=Math.max(b[0],E[0]),v.maxY=Math.max(b[1],E[1]),v}function w(v){for(var b=v[0],E=v[0],S=v[0],P=v[0],C=0;C<v.length;C++){var x=v[C];x[0]<b[0]&&(b=x),x[0]>S[0]&&(S=x),x[1]<E[1]&&(E=x),x[1]>P[1]&&(P=x)}var O=[b,E,S,P],I=O.slice();for(C=0;C<v.length;C++)t(v[C],O)||I.push(v[C]);return l(I)}function _(v,b){var E={p:v,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return b?(E.next=b.next,E.prev=b,b.next.prev=E,b.next=E):(E.prev=E,E.next=E),E}function y(v,b){var E=v[0]-b[0],S=v[1]-b[1];return E*E+S*S}function h(v,b,E){var S=b[0],P=b[1],C=E[0]-S,x=E[1]-P;if(C!==0||x!==0){var O=((v[0]-S)*C+(v[1]-P)*x)/(C*C+x*x);O>1?(S=E[0],P=E[1]):O>0&&(S+=C*O,P+=x*O)}return C=v[0]-S,x=v[1]-P,C*C+x*x}function d(v,b,E,S,P,C,x,O){var I=E-v,N=S-b,T=x-P,R=O-C,A=v-P,B=b-C,k=I*I+N*N,z=I*T+N*R,j=T*T+R*R,L=I*A+N*B,F=T*A+R*B,G=k*j-z*z,W,V,U,q,J=G,Y=G;G===0?(V=0,J=1,q=F,Y=j):(V=z*F-j*L,q=k*F-z*L,V<0?(V=0,q=F,Y=j):V>J&&(V=J,q=F+z,Y=j)),q<0?(q=0,-L<0?V=0:-L>k?V=J:(V=-L,J=k)):q>Y&&(q=Y,-L+z<0?V=0:-L+z>k?V=J:(V=-L+z,J=k)),W=V===0?0:V/J,U=q===0?0:q/Y;var re=(1-W)*v+W*E,oe=(1-W)*b+W*S,te=(1-U)*P+U*x,me=(1-U)*C+U*O,be=te-re,ne=me-oe;return be*be+ne*ne}function u(v,b){return v[0]===b[0]?v[1]-b[1]:v[0]-b[0]}function l(v){v.sort(u);for(var b=[],E=0;E<v.length;E++){for(;b.length>=2&&m(b[b.length-2],b[b.length-1],v[E])<=0;)b.pop();b.push(v[E])}for(var S=[],P=v.length-1;P>=0;P--){for(;S.length>=2&&m(S[S.length-2],S[S.length-1],v[P])<=0;)S.pop();S.push(v[P])}return S.pop(),b.pop(),b.concat(S)}return nh.exports}var am=om();const um=ki(am);function lm(r,e){e===void 0&&(e={}),e.concavity=e.concavity||1/0;var t=[];if(Qu(r,function(i){t.push([i[0],i[1]])}),!t.length)return null;var n=um(t,e.concavity);return n.length>3?Mr([n]):null}function Vn(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("point is required");if(!e)throw new Error("polygon is required");var n=Gr(r),i=En(e),o=i.type,s=e.bbox,a=i.coordinates;if(s&&cm(n,s)===!1)return!1;o==="Polygon"&&(a=[a]);for(var c=!1,f=0;f<a.length&&!c;f++)if(Pp(n,a[f][0],t.ignoreBoundary)){for(var m=!1,p=1;p<a[f].length&&!m;)Pp(n,a[f][p],!t.ignoreBoundary)&&(m=!0),p++;m||(c=!0)}return c}function Pp(r,e,t){var n=!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,o=e.length-1;i<e.length;o=i++){var s=e[i][0],a=e[i][1],c=e[o][0],f=e[o][1],m=r[1]*(s-c)+a*(c-r[0])+f*(r[0]-s)===0&&(s-r[0])*(c-r[0])<=0&&(a-r[1])*(f-r[1])<=0;if(m)return!t;var p=a>r[1]!=f>r[1]&&r[0]<(c-s)*(r[1]-a)/(f-a)+s;p&&(n=!n)}return n}function cm(r,e){return e[0]<=r[0]&&e[1]<=r[1]&&e[2]>=r[0]&&e[3]>=r[1]}function ms(r,e,t){t===void 0&&(t={});var n=Gr(r),i=Gr(e),o=Ir(i[1]-n[1]),s=Ir(i[0]-n[0]),a=Ir(n[1]),c=Ir(i[1]),f=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(c);return _f(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),t.units)}function $u(r,e,t,n){n===void 0&&(n={});var i=Gr(r),o=Ir(i[0]),s=Ir(i[1]),a=Ir(t),c=bf(e,n.units),f=Math.asin(Math.sin(s)*Math.cos(c)+Math.cos(s)*Math.sin(c)*Math.cos(a)),m=o+Math.atan2(Math.sin(a)*Math.sin(c)*Math.cos(s),Math.cos(c)-Math.sin(s)*Math.sin(f)),p=eh(m),g=eh(f);return lt([p,g],n.properties)}function hm(r,e,t){t===void 0&&(t={});for(var n=t.steps||64,i=t.properties?t.properties:!Array.isArray(r)&&r.type==="Feature"&&r.properties?r.properties:{},o=[],s=0;s<n;s++)o.push($u(r,e,s*-360/n,t).geometry.coordinates);return o.push(o[0]),Mr([o],i)}function Yl(r,e,t){if(t===void 0&&(t={}),t.final===!0)return fm(r,e);var n=Gr(r),i=Gr(e),o=Ir(n[0]),s=Ir(i[0]),a=Ir(n[1]),c=Ir(i[1]),f=Math.sin(s-o)*Math.cos(c),m=Math.cos(a)*Math.sin(c)-Math.sin(a)*Math.cos(c)*Math.cos(s-o);return eh(Math.atan2(f,m))}function fm(r,e){var t=Yl(e,r);return t=(t+180)%360,t}function dm(r,e){var t=ms(r,e),n=Yl(r,e),i=$u(r,t/2,n);return i}function pm(r,e){e===void 0&&(e={});var t=di(r),n=(t[0]+t[2])/2,i=(t[1]+t[3])/2;return lt([n,i],e.properties,e)}function Sp(r,e){e===void 0&&(e={});var t=0,n=0,i=0;return Qu(r,function(o){t+=o[0],n+=o[1],i++},!0),lt([t/i,n/i],e.properties)}function Cp(r,e){switch(e===void 0&&(e={}),K0(r)){case"Point":return lt(Gr(r),e.properties);case"Polygon":var t=[];Qu(r,function(v){t.push(v)});var n=Sp(r,{properties:e.properties}),i=n.geometry.coordinates,o=0,s=0,a=0,c,f,m,p,g,w,_,y,h=t.map(function(v){return[v[0]-i[0],v[1]-i[1]]});for(c=0;c<t.length-1;c++)f=h[c],p=f[0],w=f[1],m=h[c+1],g=m[0],_=m[1],y=p*_-g*w,a+=y,o+=(p+g)*y,s+=(w+_)*y;if(a===0)return n;var d=a*.5,u=1/(6*d);return lt([i[0]+u*o,i[1]+u*s],e.properties);default:var l=lm(r);return l?Cp(l,{properties:e.properties}):Sp(r,{properties:e.properties})}}function xp(r){if(!r)throw new Error("geojson is required");var e=[];return Ef(r,function(t){gm(t,e)}),Ku(e)}function gm(r,e){var t=[],n=r.geometry;if(n!==null){switch(n.type){case"Polygon":t=Vo(n);break;case"LineString":t=[Vo(n)]}t.forEach(function(i){var o=vm(i,r.properties);o.forEach(function(s){s.id=e.length,e.push(s)})})}}function vm(r,e){var t=[];return r.reduce(function(n,i){var o=fi([n,i],e);return o.bbox=ym(n,i),t.push(o),i}),t}function ym(r,e){var t=r[0],n=r[1],i=e[0],o=e[1],s=t<i?t:i,a=n<o?n:o,c=t>i?t:i,f=n>o?n:o;return[s,a,c,f]}var sh={exports:{}},Cf={},Op;function Mp(){return Op||(Op=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.earthRadius=63710088e-1,r.factors={centimeters:r.earthRadius*100,centimetres:r.earthRadius*100,degrees:r.earthRadius/111325,feet:r.earthRadius*3.28084,inches:r.earthRadius*39.37,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:r.earthRadius*1e3,millimetres:r.earthRadius*1e3,nauticalmiles:r.earthRadius/1852,radians:1,yards:r.earthRadius*1.0936},r.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/r.earthRadius,yards:1.0936133},r.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(O,I,N){N===void 0&&(N={});var T={type:"Feature"};return(N.id===0||N.id)&&(T.id=N.id),N.bbox&&(T.bbox=N.bbox),T.properties=I||{},T.geometry=O,T}r.feature=e;function t(O,I,N){switch(O){case"Point":return n(I).geometry;case"LineString":return a(I).geometry;case"Polygon":return o(I).geometry;case"MultiPoint":return p(I).geometry;case"MultiLineString":return m(I).geometry;case"MultiPolygon":return g(I).geometry;default:throw new Error(O+" is invalid")}}r.geometry=t;function n(O,I,N){if(N===void 0&&(N={}),!O)throw new Error("coordinates is required");if(!Array.isArray(O))throw new Error("coordinates must be an Array");if(O.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!S(O[0])||!S(O[1]))throw new Error("coordinates must contain numbers");var T={type:"Point",coordinates:O};return e(T,I,N)}r.point=n;function i(O,I,N){return N===void 0&&(N={}),f(O.map(function(T){return n(T,I)}),N)}r.points=i;function o(O,I,N){N===void 0&&(N={});for(var T=0,R=O;T<R.length;T++){var A=R[T];if(A.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var B=0;B<A[A.length-1].length;B++)if(A[A.length-1][B]!==A[0][B])throw new Error("First and last Position are not equivalent.")}var k={type:"Polygon",coordinates:O};return e(k,I,N)}r.polygon=o;function s(O,I,N){return N===void 0&&(N={}),f(O.map(function(T){return o(T,I)}),N)}r.polygons=s;function a(O,I,N){if(N===void 0&&(N={}),O.length<2)throw new Error("coordinates must be an array of two or more positions");var T={type:"LineString",coordinates:O};return e(T,I,N)}r.lineString=a;function c(O,I,N){return N===void 0&&(N={}),f(O.map(function(T){return a(T,I)}),N)}r.lineStrings=c;function f(O,I){I===void 0&&(I={});var N={type:"FeatureCollection"};return I.id&&(N.id=I.id),I.bbox&&(N.bbox=I.bbox),N.features=O,N}r.featureCollection=f;function m(O,I,N){N===void 0&&(N={});var T={type:"MultiLineString",coordinates:O};return e(T,I,N)}r.multiLineString=m;function p(O,I,N){N===void 0&&(N={});var T={type:"MultiPoint",coordinates:O};return e(T,I,N)}r.multiPoint=p;function g(O,I,N){N===void 0&&(N={});var T={type:"MultiPolygon",coordinates:O};return e(T,I,N)}r.multiPolygon=g;function w(O,I,N){N===void 0&&(N={});var T={type:"GeometryCollection",geometries:O};return e(T,I,N)}r.geometryCollection=w;function _(O,I){if(I===void 0&&(I=0),I&&!(I>=0))throw new Error("precision must be a positive number");var N=Math.pow(10,I||0);return Math.round(O*N)/N}r.round=_;function y(O,I){I===void 0&&(I="kilometers");var N=r.factors[I];if(!N)throw new Error(I+" units is invalid");return O*N}r.radiansToLength=y;function h(O,I){I===void 0&&(I="kilometers");var N=r.factors[I];if(!N)throw new Error(I+" units is invalid");return O/N}r.lengthToRadians=h;function d(O,I){return l(h(O,I))}r.lengthToDegrees=d;function u(O){var I=O%360;return I<0&&(I+=360),I}r.bearingToAzimuth=u;function l(O){var I=O%(2*Math.PI);return I*180/Math.PI}r.radiansToDegrees=l;function v(O){var I=O%360;return I*Math.PI/180}r.degreesToRadians=v;function b(O,I,N){if(I===void 0&&(I="kilometers"),N===void 0&&(N="kilometers"),!(O>=0))throw new Error("length must be a positive number");return y(h(O,I),N)}r.convertLength=b;function E(O,I,N){if(I===void 0&&(I="meters"),N===void 0&&(N="kilometers"),!(O>=0))throw new Error("area must be a positive number");var T=r.areaFactors[I];if(!T)throw new Error("invalid original units");var R=r.areaFactors[N];if(!R)throw new Error("invalid final units");return O/T*R}r.convertArea=E;function S(O){return!isNaN(O)&&O!==null&&!Array.isArray(O)}r.isNumber=S;function P(O){return!!O&&O.constructor===Object}r.isObject=P;function C(O){if(!O)throw new Error("bbox is required");if(!Array.isArray(O))throw new Error("bbox must be an Array");if(O.length!==4&&O.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");O.forEach(function(I){if(!S(I))throw new Error("bbox must only contain numbers")})}r.validateBBox=C;function x(O){if(!O)throw new Error("id is required");if(["string","number"].indexOf(typeof O)===-1)throw new Error("id must be a number or a string")}r.validateId=x}(Cf)),Cf}var Vt={},Ip;function Tp(){if(Ip)return Vt;Ip=1,Object.defineProperty(Vt,"__esModule",{value:!0});var r=Mp();function e(u,l,v){if(u!==null)for(var b,E,S,P,C,x,O,I=0,N=0,T,R=u.type,A=R==="FeatureCollection",B=R==="Feature",k=A?u.features.length:1,z=0;z<k;z++){O=A?u.features[z].geometry:B?u.geometry:u,T=O?O.type==="GeometryCollection":!1,C=T?O.geometries.length:1;for(var j=0;j<C;j++){var L=0,F=0;if(P=T?O.geometries[j]:O,P!==null){x=P.coordinates;var G=P.type;switch(I=v&&(G==="Polygon"||G==="MultiPolygon")?1:0,G){case null:break;case"Point":if(l(x,N,z,L,F)===!1)return!1;N++,L++;break;case"LineString":case"MultiPoint":for(b=0;b<x.length;b++){if(l(x[b],N,z,L,F)===!1)return!1;N++,G==="MultiPoint"&&L++}G==="LineString"&&L++;break;case"Polygon":case"MultiLineString":for(b=0;b<x.length;b++){for(E=0;E<x[b].length-I;E++){if(l(x[b][E],N,z,L,F)===!1)return!1;N++}G==="MultiLineString"&&L++,G==="Polygon"&&F++}G==="Polygon"&&L++;break;case"MultiPolygon":for(b=0;b<x.length;b++){for(F=0,E=0;E<x[b].length;E++){for(S=0;S<x[b][E].length-I;S++){if(l(x[b][E][S],N,z,L,F)===!1)return!1;N++}F++}L++}break;case"GeometryCollection":for(b=0;b<P.geometries.length;b++)if(e(P.geometries[b],l,v)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function t(u,l,v,b){var E=v;return e(u,function(S,P,C,x,O){P===0&&v===void 0?E=S:E=l(E,S,P,C,x,O)},b),E}function n(u,l){var v;switch(u.type){case"FeatureCollection":for(v=0;v<u.features.length&&l(u.features[v].properties,v)!==!1;v++);break;case"Feature":l(u.properties,0);break}}function i(u,l,v){var b=v;return n(u,function(E,S){S===0&&v===void 0?b=E:b=l(b,E,S)}),b}function o(u,l){if(u.type==="Feature")l(u,0);else if(u.type==="FeatureCollection")for(var v=0;v<u.features.length&&l(u.features[v],v)!==!1;v++);}function s(u,l,v){var b=v;return o(u,function(E,S){S===0&&v===void 0?b=E:b=l(b,E,S)}),b}function a(u){var l=[];return e(u,function(v){l.push(v)}),l}function c(u,l){var v,b,E,S,P,C,x,O,I,N,T=0,R=u.type==="FeatureCollection",A=u.type==="Feature",B=R?u.features.length:1;for(v=0;v<B;v++){for(C=R?u.features[v].geometry:A?u.geometry:u,O=R?u.features[v].properties:A?u.properties:{},I=R?u.features[v].bbox:A?u.bbox:void 0,N=R?u.features[v].id:A?u.id:void 0,x=C?C.type==="GeometryCollection":!1,P=x?C.geometries.length:1,E=0;E<P;E++){if(S=x?C.geometries[E]:C,S===null){if(l(null,T,O,I,N)===!1)return!1;continue}switch(S.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(l(S,T,O,I,N)===!1)return!1;break}case"GeometryCollection":{for(b=0;b<S.geometries.length;b++)if(l(S.geometries[b],T,O,I,N)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}T++}}function f(u,l,v){var b=v;return c(u,function(E,S,P,C,x){S===0&&v===void 0?b=E:b=l(b,E,S,P,C,x)}),b}function m(u,l){c(u,function(v,b,E,S,P){var C=v===null?null:v.type;switch(C){case null:case"Point":case"LineString":case"Polygon":return l(r.feature(v,E,{bbox:S,id:P}),b,0)===!1?!1:void 0}var x;switch(C){case"MultiPoint":x="Point";break;case"MultiLineString":x="LineString";break;case"MultiPolygon":x="Polygon";break}for(var O=0;O<v.coordinates.length;O++){var I=v.coordinates[O],N={type:x,coordinates:I};if(l(r.feature(N,E),b,O)===!1)return!1}})}function p(u,l,v){var b=v;return m(u,function(E,S,P){S===0&&P===0&&v===void 0?b=E:b=l(b,E,S,P)}),b}function g(u,l){m(u,function(v,b,E){var S=0;if(v.geometry){var P=v.geometry.type;if(!(P==="Point"||P==="MultiPoint")){var C,x=0,O=0,I=0;if(e(v,function(N,T,R,A,B){if(C===void 0||b>x||A>O||B>I){C=N,x=b,O=A,I=B,S=0;return}var k=r.lineString([C,N],v.properties);if(l(k,b,E,B,S)===!1)return!1;S++,C=N})===!1)return!1}}})}function w(u,l,v){var b=v,E=!1;return g(u,function(S,P,C,x,O){E===!1&&v===void 0?b=S:b=l(b,S,P,C,x,O),E=!0}),b}function _(u,l){if(!u)throw new Error("geojson is required");m(u,function(v,b,E){if(v.geometry!==null){var S=v.geometry.type,P=v.geometry.coordinates;switch(S){case"LineString":if(l(v,b,E,0,0)===!1)return!1;break;case"Polygon":for(var C=0;C<P.length;C++)if(l(r.lineString(P[C],v.properties),b,E,C)===!1)return!1;break}}})}function y(u,l,v){var b=v;return _(u,function(E,S,P,C){S===0&&v===void 0?b=E:b=l(b,E,S,P,C)}),b}function h(u,l){if(l=l||{},!r.isObject(l))throw new Error("options is invalid");var v=l.featureIndex||0,b=l.multiFeatureIndex||0,E=l.geometryIndex||0,S=l.segmentIndex||0,P=l.properties,C;switch(u.type){case"FeatureCollection":v<0&&(v=u.features.length+v),P=P||u.features[v].properties,C=u.features[v].geometry;break;case"Feature":P=P||u.properties,C=u.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":C=u;break;default:throw new Error("geojson is invalid")}if(C===null)return null;var x=C.coordinates;switch(C.type){case"Point":case"MultiPoint":return null;case"LineString":return S<0&&(S=x.length+S-1),r.lineString([x[S],x[S+1]],P,l);case"Polygon":return E<0&&(E=x.length+E),S<0&&(S=x[E].length+S-1),r.lineString([x[E][S],x[E][S+1]],P,l);case"MultiLineString":return b<0&&(b=x.length+b),S<0&&(S=x[b].length+S-1),r.lineString([x[b][S],x[b][S+1]],P,l);case"MultiPolygon":return b<0&&(b=x.length+b),E<0&&(E=x[b].length+E),S<0&&(S=x[b][E].length-S-1),r.lineString([x[b][E][S],x[b][E][S+1]],P,l)}throw new Error("geojson is invalid")}function d(u,l){if(l=l||{},!r.isObject(l))throw new Error("options is invalid");var v=l.featureIndex||0,b=l.multiFeatureIndex||0,E=l.geometryIndex||0,S=l.coordIndex||0,P=l.properties,C;switch(u.type){case"FeatureCollection":v<0&&(v=u.features.length+v),P=P||u.features[v].properties,C=u.features[v].geometry;break;case"Feature":P=P||u.properties,C=u.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":C=u;break;default:throw new Error("geojson is invalid")}if(C===null)return null;var x=C.coordinates;switch(C.type){case"Point":return r.point(x,P,l);case"MultiPoint":return b<0&&(b=x.length+b),r.point(x[b],P,l);case"LineString":return S<0&&(S=x.length+S),r.point(x[S],P,l);case"Polygon":return E<0&&(E=x.length+E),S<0&&(S=x[E].length+S),r.point(x[E][S],P,l);case"MultiLineString":return b<0&&(b=x.length+b),S<0&&(S=x[b].length+S),r.point(x[b][S],P,l);case"MultiPolygon":return b<0&&(b=x.length+b),E<0&&(E=x[b].length+E),S<0&&(S=x[b][E].length-S),r.point(x[b][E][S],P,l)}throw new Error("geojson is invalid")}return Vt.coordAll=a,Vt.coordEach=e,Vt.coordReduce=t,Vt.featureEach=o,Vt.featureReduce=s,Vt.findPoint=d,Vt.findSegment=h,Vt.flattenEach=m,Vt.flattenReduce=p,Vt.geomEach=c,Vt.geomReduce=f,Vt.lineEach=_,Vt.lineReduce=y,Vt.propEach=n,Vt.propReduce=i,Vt.segmentEach=g,Vt.segmentReduce=w,Vt}var oh={},Np;function mm(){if(Np)return oh;Np=1,Object.defineProperty(oh,"__esModule",{value:!0});var r=Tp();function e(t){var n=[1/0,1/0,-1/0,-1/0];return r.coordEach(t,function(i){n[0]>i[0]&&(n[0]=i[0]),n[1]>i[1]&&(n[1]=i[1]),n[2]<i[0]&&(n[2]=i[0]),n[3]<i[1]&&(n[3]=i[1])}),n}return e.default=e,oh.default=e,oh}var Dp;function _m(){if(Dp)return sh.exports;Dp=1;var r=yp(),e=Mp(),t=Tp(),n=mm().default,i=t.featureEach;t.coordEach,e.polygon;var o=e.featureCollection;function s(a){var c=new r(a);return c.insert=function(f){if(f.type!=="Feature")throw new Error("invalid feature");return f.bbox=f.bbox?f.bbox:n(f),r.prototype.insert.call(this,f)},c.load=function(f){var m=[];return Array.isArray(f)?f.forEach(function(p){if(p.type!=="Feature")throw new Error("invalid features");p.bbox=p.bbox?p.bbox:n(p),m.push(p)}):i(f,function(p){if(p.type!=="Feature")throw new Error("invalid features");p.bbox=p.bbox?p.bbox:n(p),m.push(p)}),r.prototype.load.call(this,m)},c.remove=function(f,m){if(f.type!=="Feature")throw new Error("invalid feature");return f.bbox=f.bbox?f.bbox:n(f),r.prototype.remove.call(this,f,m)},c.clear=function(){return r.prototype.clear.call(this)},c.search=function(f){var m=r.prototype.search.call(this,this.toBBox(f));return o(m)},c.collides=function(f){return r.prototype.collides.call(this,this.toBBox(f))},c.all=function(){var f=r.prototype.all.call(this);return o(f)},c.toJSON=function(){return r.prototype.toJSON.call(this)},c.fromJSON=function(f){return r.prototype.fromJSON.call(this,f)},c.toBBox=function(f){var m;if(f.bbox)m=f.bbox;else if(Array.isArray(f)&&f.length===4)m=f;else if(Array.isArray(f)&&f.length===6)m=[f[0],f[1],f[3],f[4]];else if(f.type==="Feature")m=n(f);else if(f.type==="FeatureCollection")m=n(f);else throw new Error("invalid geojson");return{minX:m[0],minY:m[1],maxX:m[2],maxY:m[3]}},c}return sh.exports=s,sh.exports.default=s,sh.exports}var bm=_m();const wm=ki(bm);function Ap(r,e){var t={},n=[];if(r.type==="LineString"&&(r=hi(r)),e.type==="LineString"&&(e=hi(e)),r.type==="Feature"&&e.type==="Feature"&&r.geometry!==null&&e.geometry!==null&&r.geometry.type==="LineString"&&e.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&e.geometry.coordinates.length===2){var i=Rp(r,e);return i&&n.push(i),Ku(n)}var o=wm();return o.load(xp(e)),th(xp(r),function(s){th(o.search(s),function(a){var c=Rp(s,a);if(c){var f=Vo(c).join(",");t[f]||(t[f]=!0,n.push(c))}})}),Ku(n)}function Rp(r,e){var t=Vo(r),n=Vo(e);if(t.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(n.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=t[0][0],o=t[0][1],s=t[1][0],a=t[1][1],c=n[0][0],f=n[0][1],m=n[1][0],p=n[1][1],g=(p-f)*(s-i)-(m-c)*(a-o),w=(m-c)*(o-f)-(p-f)*(i-c),_=(s-i)*(o-f)-(a-o)*(i-c);if(g===0)return null;var y=w/g,h=_/g;if(y>=0&&y<=1&&h>=0&&h<=1){var d=i+y*(s-i),u=o+y*(a-o);return lt([d,u])}return null}function Em(r,e,t){t===void 0&&(t={});var n=lt([1/0,1/0],{dist:1/0}),i=0;return Ef(r,function(o){for(var s=Vo(o),a=0;a<s.length-1;a++){var c=lt(s[a]);c.properties.dist=ms(e,c,t);var f=lt(s[a+1]);f.properties.dist=ms(e,f,t);var m=ms(c,f,t),p=Math.max(c.properties.dist,f.properties.dist),g=Yl(c,f),w=$u(e,p,g+90,t),_=$u(e,p,g-90,t),y=Ap(fi([w.geometry.coordinates,_.geometry.coordinates]),fi([c.geometry.coordinates,f.geometry.coordinates])),h=null;y.features.length>0&&(h=y.features[0],h.properties.dist=ms(e,h,t),h.properties.location=i+ms(c,h,t)),c.properties.dist<n.properties.dist&&(n=c,n.properties.index=a,n.properties.location=i),f.properties.dist<n.properties.dist&&(n=f,n.properties.index=a+1,n.properties.location=i+m),h&&h.properties.dist<n.properties.dist&&(n=h,n.properties.index=a),i+=m}}),n}function Lp(r,e,t){t===void 0&&(t={});var n=Gr(r),i=Gr(e);i[0]+=i[0]-n[0]>180?-360:n[0]-i[0]>180?360:0;var o=Pm(n,i),s=wf(o,"meters",t.units);return s}function Pm(r,e,t){t=t===void 0?pr:Number(t);var n=t,i=r[1]*Math.PI/180,o=e[1]*Math.PI/180,s=o-i,a=Math.abs(e[0]-r[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var c=Math.log(Math.tan(o/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),f=Math.abs(c)>1e-11?s/c:Math.cos(i),m=Math.sqrt(s*s+f*f*a*a),p=m*n;return p}function Sm(r,e,t){if(t===void 0&&(t={}),t.method||(t.method="geodesic"),t.units||(t.units="kilometers"),!r)throw new Error("pt is required");if(Array.isArray(r)?r=lt(r):r.type==="Point"?r=hi(r):gp(r,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=fi(e):e.type==="LineString"?e=hi(e):gp(e,"LineString","line");var n=1/0,i=r.geometry.coordinates;return J0(e,function(o){var s=o.geometry.coordinates[0],a=o.geometry.coordinates[1],c=Cm(i,s,a,t);c<n&&(n=c)}),wf(n,"degrees",t.units)}function Cm(r,e,t,n){var i=[t[0]-e[0],t[1]-e[1]],o=[r[0]-e[0],r[1]-e[1]],s=Fp(o,i);if(s<=0)return xf(r,e,{method:n.method,units:"degrees"});var a=Fp(i,i);if(a<=s)return xf(r,t,{method:n.method,units:"degrees"});var c=s/a,f=[e[0]+c*i[0],e[1]+c*i[1]];return xf(r,f,{method:n.method,units:"degrees"})}function Fp(r,e){return r[0]*e[0]+r[1]*e[1]}function xf(r,e,t){return t.method==="planar"?Lp(r,e,t):ms(r,e,t)}var jp=6378137;function xm(r){return Y0(r,function(e,t){return e+Om(t)},0)}function Om(r){var e=0,t;switch(r.type){case"Polygon":return kp(r.coordinates);case"MultiPolygon":for(t=0;t<r.coordinates.length;t++)e+=kp(r.coordinates[t]);return e;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function kp(r){var e=0;if(r&&r.length>0){e+=Math.abs(Gp(r[0]));for(var t=1;t<r.length;t++)e-=Math.abs(Gp(r[t]))}return e}function Gp(r){var e,t,n,i,o,s,a,c=0,f=r.length;if(f>2){for(a=0;a<f;a++)a===f-2?(i=f-2,o=f-1,s=0):a===f-1?(i=f-1,o=0,s=1):(i=a,o=a+1,s=a+2),e=r[i],t=r[o],n=r[s],c+=(Of(n[0])-Of(e[0]))*Math.sin(Of(t[1]));c=c*jp*jp/2}return c}function Of(r){return r*Math.PI/180}function Mm(r,e,t){t===void 0&&(t={});for(var n=En(r),i=n.coordinates,o=0,s=0;s<i.length&&!(e>=o&&s===i.length-1);s++)if(o>=e){var a=e-o;if(a){var c=Yl(i[s],i[s-1])-180,f=$u(i[s],a,c,t);return f}else return lt(i[s])}else o+=ms(i[s],i[s+1],t);return lt(i[i.length-1])}function _s(r,e,t){t===void 0&&(t={});for(var n=Gr(r),i=Vo(e),o=0;o<i.length-1;o++){var s=!1;if(t.ignoreEndVertices&&(o===0&&(s="start"),o===i.length-2&&(s="end"),o===0&&o+1===i.length-1&&(s="both")),Im(i[o],i[o+1],n,s,typeof t.epsilon>"u"?null:t.epsilon))return!0}return!1}function Im(r,e,t,n,i){var o=t[0],s=t[1],a=r[0],c=r[1],f=e[0],m=e[1],p=t[0]-a,g=t[1]-c,w=f-a,_=m-c,y=p*_-g*w;if(i!==null){if(Math.abs(y)>i)return!1}else if(y!==0)return!1;if(n){if(n==="start")return Math.abs(w)>=Math.abs(_)?w>0?a<o&&o<=f:f<=o&&o<a:_>0?c<s&&s<=m:m<=s&&s<c;if(n==="end")return Math.abs(w)>=Math.abs(_)?w>0?a<=o&&o<f:f<o&&o<=a:_>0?c<=s&&s<m:m<s&&s<=c;if(n==="both")return Math.abs(w)>=Math.abs(_)?w>0?a<o&&o<f:f<o&&o<a:_>0?c<s&&s<m:m<s&&s<c}else return Math.abs(w)>=Math.abs(_)?w>0?a<=o&&o<=f:f<=o&&o<=a:_>0?c<=s&&s<=m:m<=s&&s<=c;return!1}function Tm(r,e){var t=En(r),n=En(e),i=t.type,o=n.type;switch(i){case"Point":switch(o){case"MultiPoint":return Nm(t,n);case"LineString":return _s(t,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Vn(t,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"MultiPoint":return Dm(t,n);case"LineString":return Am(t,n);case"Polygon":case"MultiPolygon":return Rm(t,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"LineString":return Lm(t,n);case"Polygon":case"MultiPolygon":return Fm(t,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Polygon":case"MultiPolygon":return jm(t,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Nm(r,e){var t,n=!1;for(t=0;t<e.coordinates.length;t++)if(Bp(e.coordinates[t],r.coordinates)){n=!0;break}return n}function Dm(r,e){for(var t=0;t<r.coordinates.length;t++){for(var n=!1,i=0;i<e.coordinates.length;i++)Bp(r.coordinates[t],e.coordinates[i])&&(n=!0);if(!n)return!1}return!0}function Am(r,e){for(var t=!1,n=0;n<r.coordinates.length;n++){if(!_s(r.coordinates[n],e))return!1;t||(t=_s(r.coordinates[n],e,{ignoreEndVertices:!0}))}return t}function Rm(r,e){for(var t=!0,n=!1,i=0;i<r.coordinates.length;i++){if(n=Vn(r.coordinates[1],e),!n){t=!1;break}n=Vn(r.coordinates[1],e,{ignoreBoundary:!0})}return t&&n}function Lm(r,e){for(var t=0;t<r.coordinates.length;t++)if(!_s(r.coordinates[t],e))return!1;return!0}function Fm(r,e){var t=di(e),n=di(r);if(!Vp(t,n))return!1;for(var i=!1,o=0;o<r.coordinates.length-1;o++){if(!Vn(r.coordinates[o],e))return!1;if(i||(i=Vn(r.coordinates[o],e,{ignoreBoundary:!0})),!i){var s=km(r.coordinates[o],r.coordinates[o+1]);i=Vn(s,e,{ignoreBoundary:!0})}}return i}function jm(r,e){var t=di(r),n=di(e);if(!Vp(n,t))return!1;for(var i=0;i<r.coordinates[0].length;i++)if(!Vn(r.coordinates[0][i],e))return!1;return!0}function Vp(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function Bp(r,e){return r[0]===e[0]&&r[1]===e[1]}function km(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}function Gm(r,e,t){t===void 0&&(t={});var n;t.final?n=zp(Gr(e),Gr(r)):n=zp(Gr(r),Gr(e));var i=n>180?-(360-n):n;return i}function zp(r,e){var t=Ir(r[1]),n=Ir(e[1]),i=Ir(e[0]-r[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(n/2+Math.PI/4)/Math.tan(t/2+Math.PI/4)),s=Math.atan2(i,o);return(eh(s)+360)%360}function Vm(r,e,t,n){n===void 0&&(n={});var i=e<0,o=wf(Math.abs(e),n.units,"meters");i&&(o=-Math.abs(o));var s=Gr(r),a=Bm(s,o,t);return a[0]+=a[0]-s[0]>180?-360:s[0]-a[0]>180?360:0,lt(a,n.properties)}function Bm(r,e,t,n){n=n===void 0?pr:Number(n);var i=e/n,o=r[0]*Math.PI/180,s=Ir(r[1]),a=Ir(t),c=i*Math.cos(a),f=s+c;Math.abs(f)>Math.PI/2&&(f=f>0?Math.PI-f:-Math.PI-f);var m=Math.log(Math.tan(f/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),p=Math.abs(m)>1e-11?c/m:Math.cos(s),g=i*Math.sin(a)/p,w=o+g;return[(w*180/Math.PI+540)%360-180,f*180/Math.PI]}function zm(r,e){var t=En(r),n=En(e),i=t.type,o=n.type,s=t.coordinates,a=n.coordinates;switch(i){case"Point":switch(o){case"Point":return Mf(s,a);default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"Point":return Um(t,n);case"MultiPoint":return Wm(t,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"Point":return _s(n,t,{ignoreEndVertices:!0});case"LineString":return Xm(t,n);case"MultiPoint":return qm(t,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Point":return Vn(n,t,{ignoreBoundary:!0});case"LineString":return Ym(t,n);case"Polygon":return Jm(t,n);case"MultiPoint":return Hm(t,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Um(r,e){var t,n=!1;for(t=0;t<r.coordinates.length;t++)if(Mf(r.coordinates[t],e.coordinates)){n=!0;break}return n}function Wm(r,e){for(var t=0,n=e.coordinates;t<n.length;t++){for(var i=n[t],o=!1,s=0,a=r.coordinates;s<a.length;s++){var c=a[s];if(Mf(i,c)){o=!0;break}}if(!o)return!1}return!0}function qm(r,e){for(var t=!1,n=0,i=e.coordinates;n<i.length;n++){var o=i[n];if(_s(o,r,{ignoreEndVertices:!0})&&(t=!0),!_s(o,r))return!1}return!!t}function Hm(r,e){for(var t=0,n=e.coordinates;t<n.length;t++){var i=n[t];if(!Vn(i,r,{ignoreBoundary:!0}))return!1}return!0}function Xm(r,e){for(var t=!1,n=0,i=e.coordinates;n<i.length;n++){var o=i[n];if(_s({type:"Point",coordinates:o},r,{ignoreEndVertices:!0})&&(t=!0),!_s({type:"Point",coordinates:o},r,{ignoreEndVertices:!1}))return!1}return t}function Ym(r,e){var t=!1,n=0,i=di(r),o=di(e);if(!Up(i,o))return!1;for(n;n<e.coordinates.length-1;n++){var s=Km(e.coordinates[n],e.coordinates[n+1]);if(Vn({type:"Point",coordinates:s},r,{ignoreBoundary:!0})){t=!0;break}}return t}function Jm(r,e){if(r.type==="Feature"&&r.geometry===null||e.type==="Feature"&&e.geometry===null)return!1;var t=di(r),n=di(e);if(!Up(t,n))return!1;for(var i=En(e).coordinates,o=0,s=i;o<s.length;o++)for(var a=s[o],c=0,f=a;c<f.length;c++){var m=f[c];if(!Vn(m,r))return!1}return!0}function Up(r,e){return!(r[0]>e[0]||r[2]<e[2]||r[1]>e[1]||r[3]<e[3])}function Mf(r,e){return r[0]===e[0]&&r[1]===e[1]}function Km(r,e){return[(r[0]+e[0])/2,(r[1]+e[1])/2]}/**
231
+ * splaytree v3.1.2
232
+ * Fast Splay tree for Node and browser
233
+ *
234
+ * @author Alexander Milevski <info@w8r.name>
235
+ * @license MIT
236
+ * @preserve
237
+ *//*! *****************************************************************************
238
+ Copyright (c) Microsoft Corporation. All rights reserved.
239
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
240
+ this file except in compliance with the License. You may obtain a copy of the
241
+ License at http://www.apache.org/licenses/LICENSE-2.0
242
+
243
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
244
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
245
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
246
+ MERCHANTABLITY OR NON-INFRINGEMENT.
247
+
248
+ See the Apache Version 2.0 License for specific language governing permissions
249
+ and limitations under the License.
250
+ ***************************************************************************** */function Qm(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(f){return function(m){return c([f,m])}}function c(f){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(o=f[0]&2?i.return:f[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,f[1])).done)return o;switch(i=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return t.label++,{value:f[1],done:!1};case 5:t.label++,i=f[1],f=[0];continue;case 7:f=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){t=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){t.label=f[1];break}if(f[0]===6&&t.label<o[1]){t.label=o[1],o=f;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(f);break}o[2]&&t.ops.pop(),t.trys.pop();continue}f=e.call(r,t)}catch(m){f=[6,m],i=0}finally{n=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}var Qs=function(){function r(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return r}();function $m(r,e){return r>e?1:r<e?-1:0}function $s(r,e,t){for(var n=new Qs(null,null),i=n,o=n;;){var s=t(r,e.key);if(s<0){if(e.left===null)break;if(t(r,e.left.key)<0){var a=e.left;if(e.left=a.right,a.right=e,e=a,e.left===null)break}o.left=e,o=e,e=e.left}else if(s>0){if(e.right===null)break;if(t(r,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,o.left=e.right,e.left=n.right,e.right=n.left,e}function If(r,e,t,n){var i=new Qs(r,e);if(t===null)return i.left=i.right=null,i;t=$s(r,t,n);var o=n(r,t.key);return o<0?(i.left=t.left,i.right=t,t.left=null):o>=0&&(i.right=t.right,i.left=t,t.right=null),i}function Wp(r,e,t){var n=null,i=null;if(e){e=$s(r,e,t);var o=t(e.key,r);o===0?(n=e.left,i=e.right):o<0?(i=e.right,e.right=null,n=e):(n=e.left,e.left=null,i=e)}return{left:n,right:i}}function Zm(r,e,t){return e===null?r:(r===null||(e=$s(r.key,e,t),e.left=r),e)}function Tf(r,e,t,n,i){if(r){n(""+e+(t?"└── ":"├── ")+i(r)+`
251
+ `);var o=e+(t?" ":"│ ");r.left&&Tf(r.left,o,!1,n,i),r.right&&Tf(r.right,o,!0,n,i)}}var Nf=function(){function r(e){e===void 0&&(e=$m),this._root=null,this._size=0,this._comparator=e}return r.prototype.insert=function(e,t){return this._size++,this._root=If(e,t,this._root,this._comparator)},r.prototype.add=function(e,t){var n=new Qs(e,t);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,o=$s(e,this._root,i),s=i(e,o.key);return s===0?this._root=o:(s<0?(n.left=o.left,n.right=o,o.left=null):s>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},r.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},r.prototype._remove=function(e,t,n){var i;if(t===null)return null;t=$s(e,t,n);var o=n(e,t.key);return o===0?(t.left===null?i=t.right:(i=$s(e,t.left,n),i.right=t.right),this._size--,i):t},r.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=$s(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},r.prototype.findStatic=function(e){for(var t=this._root,n=this._comparator;t;){var i=n(e,t.key);if(i===0)return t;i<0?t=t.left:t=t.right}return null},r.prototype.find=function(e){return this._root&&(this._root=$s(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},r.prototype.contains=function(e){for(var t=this._root,n=this._comparator;t;){var i=n(e,t.key);if(i===0)return!0;i<0?t=t.left:t=t.right}return!1},r.prototype.forEach=function(e,t){for(var n=this._root,i=[],o=!1;!o;)n!==null?(i.push(n),n=n.left):i.length!==0?(n=i.pop(),e.call(t,n),n=n.right):o=!0;return this},r.prototype.range=function(e,t,n,i){for(var o=[],s=this._comparator,a=this._root,c;o.length!==0||a;)if(a)o.push(a),a=a.left;else{if(a=o.pop(),c=s(a.key,t),c>0)break;if(s(a.key,e)>=0&&n.call(i,a))return this;a=a.right}return this},r.prototype.keys=function(){var e=[];return this.forEach(function(t){var n=t.key;return e.push(n)}),e},r.prototype.values=function(){var e=[];return this.forEach(function(t){var n=t.data;return e.push(n)}),e},r.prototype.min=function(){return this._root?this.minNode(this._root).key:null},r.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},r.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},r.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},r.prototype.at=function(e){for(var t=this._root,n=!1,i=0,o=[];!n;)if(t)o.push(t),t=t.left;else if(o.length>0){if(t=o.pop(),i===e)return t;i++,t=t.right}else n=!0;return null},r.prototype.next=function(e){var t=this._root,n=null;if(e.right){for(n=e.right;n.left;)n=n.left;return n}for(var i=this._comparator;t;){var o=i(e.key,t.key);if(o===0)break;o<0?(n=t,t=t.left):t=t.right}return n},r.prototype.prev=function(e){var t=this._root,n=null;if(e.left!==null){for(n=e.left;n.right;)n=n.right;return n}for(var i=this._comparator;t;){var o=i(e.key,t.key);if(o===0)break;o<0?t=t.left:(n=t,t=t.right)}return n},r.prototype.clear=function(){return this._root=null,this._size=0,this},r.prototype.toList=function(){return t_(this._root)},r.prototype.load=function(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!1);var i=e.length,o=this._comparator;if(n&&Rf(e,t,0,i-1,o),this._root===null)this._root=Df(e,t,0,i),this._size=i;else{var s=r_(this.toList(),e_(e,t),o);i=this._size+i,this._root=Af({head:s},0,i)}return this},r.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),r.prototype.toString=function(e){e===void 0&&(e=function(n){return String(n.key)});var t=[];return Tf(this._root,"",!0,function(n){return t.push(n)},e),t.join("")},r.prototype.update=function(e,t,n){var i=this._comparator,o=Wp(e,this._root,i),s=o.left,a=o.right;i(e,t)<0?a=If(t,n,a,i):s=If(t,n,s,i),this._root=Zm(s,a,i)},r.prototype.split=function(e){return Wp(e,this._root,this._comparator)},r.prototype[Symbol.iterator]=function(){var e,t,n;return Qm(this,function(i){switch(i.label){case 0:e=this._root,t=[],n=!1,i.label=1;case 1:return n?[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:n=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},r}();function Df(r,e,t,n){var i=n-t;if(i>0){var o=t+Math.floor(i/2),s=r[o],a=e[o],c=new Qs(s,a);return c.left=Df(r,e,t,o),c.right=Df(r,e,o+1,n),c}return null}function e_(r,e){for(var t=new Qs(null,null),n=t,i=0;i<r.length;i++)n=n.next=new Qs(r[i],e[i]);return n.next=null,t.next}function t_(r){for(var e=r,t=[],n=!1,i=new Qs(null,null),o=i;!n;)e?(t.push(e),e=e.left):t.length>0?(e=o=o.next=t.pop(),e=e.right):n=!0;return o.next=null,i.next}function Af(r,e,t){var n=t-e;if(n>0){var i=e+Math.floor(n/2),o=Af(r,e,i),s=r.head;return s.left=o,r.head=r.head.next,s.right=Af(r,i+1,t),s}return null}function r_(r,e,t){for(var n=new Qs(null,null),i=n,o=r,s=e;o!==null&&s!==null;)t(o.key,s.key)<0?(i.next=o,o=o.next):(i.next=s,s=s.next),i=i.next;return o!==null?i.next=o:s!==null&&(i.next=s),n.next}function Rf(r,e,t,n,i){if(!(t>=n)){for(var o=r[t+n>>1],s=t-1,a=n+1;;){do s++;while(i(r[s],o)<0);do a--;while(i(r[a],o)>0);if(s>=a)break;var c=r[s];r[s]=r[a],r[a]=c,c=e[s],e[s]=e[a],e[a]=c}Rf(r,e,t,a,i),Rf(r,e,a+1,n,i)}}const bs=11102230246251565e-32,Tr=134217729,n_=(3+8*bs)*bs;function Lf(r,e,t,n,i){let o,s,a,c,f=e[0],m=n[0],p=0,g=0;m>f==m>-f?(o=f,f=e[++p]):(o=m,m=n[++g]);let w=0;if(p<r&&g<t)for(m>f==m>-f?(s=f+o,a=o-(s-f),f=e[++p]):(s=m+o,a=o-(s-m),m=n[++g]),o=s,a!==0&&(i[w++]=a);p<r&&g<t;)m>f==m>-f?(s=o+f,c=s-o,a=o-(s-c)+(f-c),f=e[++p]):(s=o+m,c=s-o,a=o-(s-c)+(m-c),m=n[++g]),o=s,a!==0&&(i[w++]=a);for(;p<r;)s=o+f,c=s-o,a=o-(s-c)+(f-c),f=e[++p],o=s,a!==0&&(i[w++]=a);for(;g<t;)s=o+m,c=s-o,a=o-(s-c)+(m-c),m=n[++g],o=s,a!==0&&(i[w++]=a);return(o!==0||w===0)&&(i[w++]=o),w}function i_(r,e){let t=e[0];for(let n=1;n<r;n++)t+=e[n];return t}function Jl(r){return new Float64Array(r)}const s_=(3+16*bs)*bs,o_=(2+12*bs)*bs,a_=(9+64*bs)*bs*bs,Zu=Jl(4),qp=Jl(8),Hp=Jl(12),Xp=Jl(16),Vr=Jl(4);function u_(r,e,t,n,i,o,s){let a,c,f,m,p,g,w,_,y,h,d,u,l,v,b,E,S,P;const C=r-i,x=t-i,O=e-o,I=n-o;v=C*I,g=Tr*C,w=g-(g-C),_=C-w,g=Tr*I,y=g-(g-I),h=I-y,b=_*h-(v-w*y-_*y-w*h),E=O*x,g=Tr*O,w=g-(g-O),_=O-w,g=Tr*x,y=g-(g-x),h=x-y,S=_*h-(E-w*y-_*y-w*h),d=b-S,p=b-d,Zu[0]=b-(d+p)+(p-S),u=v+d,p=u-v,l=v-(u-p)+(d-p),d=l-E,p=l-d,Zu[1]=l-(d+p)+(p-E),P=u+d,p=P-u,Zu[2]=u-(P-p)+(d-p),Zu[3]=P;let N=i_(4,Zu),T=o_*s;if(N>=T||-N>=T||(p=r-C,a=r-(C+p)+(p-i),p=t-x,f=t-(x+p)+(p-i),p=e-O,c=e-(O+p)+(p-o),p=n-I,m=n-(I+p)+(p-o),a===0&&c===0&&f===0&&m===0)||(T=a_*s+n_*Math.abs(N),N+=C*m+I*a-(O*f+x*c),N>=T||-N>=T))return N;v=a*I,g=Tr*a,w=g-(g-a),_=a-w,g=Tr*I,y=g-(g-I),h=I-y,b=_*h-(v-w*y-_*y-w*h),E=c*x,g=Tr*c,w=g-(g-c),_=c-w,g=Tr*x,y=g-(g-x),h=x-y,S=_*h-(E-w*y-_*y-w*h),d=b-S,p=b-d,Vr[0]=b-(d+p)+(p-S),u=v+d,p=u-v,l=v-(u-p)+(d-p),d=l-E,p=l-d,Vr[1]=l-(d+p)+(p-E),P=u+d,p=P-u,Vr[2]=u-(P-p)+(d-p),Vr[3]=P;const R=Lf(4,Zu,4,Vr,qp);v=C*m,g=Tr*C,w=g-(g-C),_=C-w,g=Tr*m,y=g-(g-m),h=m-y,b=_*h-(v-w*y-_*y-w*h),E=O*f,g=Tr*O,w=g-(g-O),_=O-w,g=Tr*f,y=g-(g-f),h=f-y,S=_*h-(E-w*y-_*y-w*h),d=b-S,p=b-d,Vr[0]=b-(d+p)+(p-S),u=v+d,p=u-v,l=v-(u-p)+(d-p),d=l-E,p=l-d,Vr[1]=l-(d+p)+(p-E),P=u+d,p=P-u,Vr[2]=u-(P-p)+(d-p),Vr[3]=P;const A=Lf(R,qp,4,Vr,Hp);v=a*m,g=Tr*a,w=g-(g-a),_=a-w,g=Tr*m,y=g-(g-m),h=m-y,b=_*h-(v-w*y-_*y-w*h),E=c*f,g=Tr*c,w=g-(g-c),_=c-w,g=Tr*f,y=g-(g-f),h=f-y,S=_*h-(E-w*y-_*y-w*h),d=b-S,p=b-d,Vr[0]=b-(d+p)+(p-S),u=v+d,p=u-v,l=v-(u-p)+(d-p),d=l-E,p=l-d,Vr[1]=l-(d+p)+(p-E),P=u+d,p=P-u,Vr[2]=u-(P-p)+(d-p),Vr[3]=P;const B=Lf(A,Hp,4,Vr,Xp);return Xp[B-1]}function l_(r,e,t,n,i,o){const s=(e-o)*(t-i),a=(r-i)*(n-o),c=s-a,f=Math.abs(s+a);return Math.abs(c)>=s_*f?c:-u_(r,e,t,n,i,o,f)}const Kl=(r,e)=>r.ll.x<=e.x&&e.x<=r.ur.x&&r.ll.y<=e.y&&e.y<=r.ur.y,Ff=(r,e)=>{if(e.ur.x<r.ll.x||r.ur.x<e.ll.x||e.ur.y<r.ll.y||r.ur.y<e.ll.y)return null;const t=r.ll.x<e.ll.x?e.ll.x:r.ll.x,n=r.ur.x<e.ur.x?r.ur.x:e.ur.x,i=r.ll.y<e.ll.y?e.ll.y:r.ll.y,o=r.ur.y<e.ur.y?r.ur.y:e.ur.y;return{ll:{x:t,y:i},ur:{x:n,y:o}}};let Zs=Number.EPSILON;Zs===void 0&&(Zs=Math.pow(2,-52));const c_=Zs*Zs,Yp=(r,e)=>{if(-Zs<r&&r<Zs&&-Zs<e&&e<Zs)return 0;const t=r-e;return t*t<c_*r*e?0:r<e?-1:1};class h_{constructor(){this.reset()}reset(){this.xRounder=new Jp,this.yRounder=new Jp}round(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}class Jp{constructor(){this.tree=new Nf,this.round(0)}round(e){const t=this.tree.add(e),n=this.tree.prev(t);if(n!==null&&Yp(t.key,n.key)===0)return this.tree.remove(e),n.key;const i=this.tree.next(t);return i!==null&&Yp(t.key,i.key)===0?(this.tree.remove(e),i.key):e}}const Ql=new h_,ah=(r,e)=>r.x*e.y-r.y*e.x,Kp=(r,e)=>r.x*e.x+r.y*e.y,Qp=(r,e,t)=>{const n=l_(r.x,r.y,e.x,e.y,t.x,t.y);return n>0?-1:n<0?1:0},uh=r=>Math.sqrt(Kp(r,r)),f_=(r,e,t)=>{const n={x:e.x-r.x,y:e.y-r.y},i={x:t.x-r.x,y:t.y-r.y};return ah(i,n)/uh(i)/uh(n)},d_=(r,e,t)=>{const n={x:e.x-r.x,y:e.y-r.y},i={x:t.x-r.x,y:t.y-r.y};return Kp(i,n)/uh(i)/uh(n)},$p=(r,e,t)=>e.y===0?null:{x:r.x+e.x/e.y*(t-r.y),y:t},Zp=(r,e,t)=>e.x===0?null:{x:t,y:r.y+e.y/e.x*(t-r.x)},p_=(r,e,t,n)=>{if(e.x===0)return Zp(t,n,r.x);if(n.x===0)return Zp(r,e,t.x);if(e.y===0)return $p(t,n,r.y);if(n.y===0)return $p(r,e,t.y);const i=ah(e,n);if(i==0)return null;const o={x:t.x-r.x,y:t.y-r.y},s=ah(o,e)/i,a=ah(o,n)/i,c=r.x+a*e.x,f=t.x+s*n.x,m=r.y+a*e.y,p=t.y+s*n.y,g=(c+f)/2,w=(m+p)/2;return{x:g,y:w}};class Bn{static compare(e,t){const n=Bn.comparePoints(e.point,t.point);return n!==0?n:(e.point!==t.point&&e.link(t),e.isLeft!==t.isLeft?e.isLeft?1:-1:eo.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 n=0,i=t.length;n<i;n++){const o=t[n];this.point.events.push(o),o.point=this.point}this.checkForConsuming()}checkForConsuming(){const e=this.point.events.length;for(let t=0;t<e;t++){const n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let i=t+1;i<e;i++){const o=this.point.events[i];o.consumedBy===void 0&&n.otherSE.point.events===o.otherSE.point.events&&n.segment.consume(o.segment)}}}getAvailableLinkedEvents(){const e=[];for(let t=0,n=this.point.events.length;t<n;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,n=i=>{const o=i.otherSE;t.set(i,{sine:f_(this.point,e.point,o.point),cosine:d_(this.point,e.point,o.point)})};return(i,o)=>{t.has(i)||n(i),t.has(o)||n(o);const{sine:s,cosine:a}=t.get(i),{sine:c,cosine:f}=t.get(o);return s>=0&&c>=0?a<f?1:a>f?-1:0:s<0&&c<0?a<f?-1:a>f?1:0:c<s?-1:c>s?1:0}}}let g_=0;class eo{static compare(e,t){const n=e.leftSE.point.x,i=t.leftSE.point.x,o=e.rightSE.point.x,s=t.rightSE.point.x;if(s<n)return 1;if(o<i)return-1;const a=e.leftSE.point.y,c=t.leftSE.point.y,f=e.rightSE.point.y,m=t.rightSE.point.y;if(n<i){if(c<a&&c<f)return 1;if(c>a&&c>f)return-1;const p=e.comparePoint(t.leftSE.point);if(p<0)return 1;if(p>0)return-1;const g=t.comparePoint(e.rightSE.point);return g!==0?g:-1}if(n>i){if(a<c&&a<m)return-1;if(a>c&&a>m)return 1;const p=t.comparePoint(e.leftSE.point);if(p!==0)return p;const g=e.comparePoint(t.rightSE.point);return g<0?1:g>0?-1:1}if(a<c)return-1;if(a>c)return 1;if(o<s){const p=t.comparePoint(e.rightSE.point);if(p!==0)return p}if(o>s){const p=e.comparePoint(t.rightSE.point);if(p<0)return 1;if(p>0)return-1}if(o!==s){const p=f-a,g=o-n,w=m-c,_=s-i;if(p>g&&w<_)return 1;if(p<g&&w>_)return-1}return o>s?1:o<s||f<m?-1:f>m?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,n,i){this.id=++g_,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=i}static fromRing(e,t,n){let i,o,s;const a=Bn.comparePoints(e,t);if(a<0)i=e,o=t,s=1;else if(a>0)i=t,o=e,s=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const c=new Bn(i,!0),f=new Bn(o,!1);return new eo(c,f,[n],[s])}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,n=this.rightSE.point,i=this.vector();if(t.x===n.x)return e.x===t.x?0:e.x<t.x?1:-1;const o=(e.y-t.y)/i.y,s=t.x+o*i.x;if(e.x===s)return 0;const a=(e.x-t.x)/i.x,c=t.y+a*i.y;return e.y===c?0:e.y<c?-1:1}getIntersection(e){const t=this.bbox(),n=e.bbox(),i=Ff(t,n);if(i===null)return null;const o=this.leftSE.point,s=this.rightSE.point,a=e.leftSE.point,c=e.rightSE.point,f=Kl(t,a)&&this.comparePoint(a)===0,m=Kl(n,o)&&e.comparePoint(o)===0,p=Kl(t,c)&&this.comparePoint(c)===0,g=Kl(n,s)&&e.comparePoint(s)===0;if(m&&f)return g&&!p?s:!g&&p?c:null;if(m)return p&&o.x===c.x&&o.y===c.y?null:o;if(f)return g&&s.x===a.x&&s.y===a.y?null:a;if(g&&p)return null;if(g)return s;if(p)return c;const w=p_(o,this.vector(),a,e.vector());return w===null||!Kl(i,w)?null:Ql.round(w.x,w.y)}split(e){const t=[],n=e.events!==void 0,i=new Bn(e,!0),o=new Bn(e,!1),s=this.rightSE;this.replaceRightSE(o),t.push(o),t.push(i);const a=new eo(i,s,this.rings.slice(),this.windings.slice());return Bn.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),Bn.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),o.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,n=this.windings.length;t<n;t++)this.windings[t]*=-1}consume(e){let t=this,n=e;for(;t.consumedBy;)t=t.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const i=eo.compare(t,n);if(i!==0){if(i>0){const o=t;t=n,n=o}if(t.prev===n){const o=t;t=n,n=o}for(let o=0,s=n.rings.length;o<s;o++){const a=n.rings[o],c=n.windings[o],f=t.rings.indexOf(a);f===-1?(t.rings.push(a),t.windings.push(c)):t.windings[f]+=c}n.rings=null,n.windings=null,n.consumedBy=t,n.leftSE.consumedBy=t.leftSE,n.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,n=this._afterState.windings,i=this._afterState.multiPolys;for(let a=0,c=this.rings.length;a<c;a++){const f=this.rings[a],m=this.windings[a],p=t.indexOf(f);p===-1?(t.push(f),n.push(m)):n[p]+=m}const o=[],s=[];for(let a=0,c=t.length;a<c;a++){if(n[a]===0)continue;const f=t[a],m=f.poly;if(s.indexOf(m)===-1)if(f.isExterior)o.push(m);else{s.indexOf(m)===-1&&s.push(m);const p=o.indexOf(f.poly);p!==-1&&o.splice(p,1)}}for(let a=0,c=o.length;a<c;a++){const f=o[a].multiPoly;i.indexOf(f)===-1&&i.push(f)}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(pi.type){case"union":{const n=e.length===0,i=t.length===0;this._isInResult=n!==i;break}case"intersection":{let n,i;e.length<t.length?(n=e.length,i=t.length):(n=t.length,i=e.length),this._isInResult=i===pi.numMultiPolys&&n<i;break}case"xor":{const n=Math.abs(e.length-t.length);this._isInResult=n%2===1;break}case"difference":{const n=i=>i.length===1&&i[0].isSubject;this._isInResult=n(e)!==n(t);break}default:throw new Error(`Unrecognized operation type found ${pi.type}`)}return this._isInResult}}class eg{constructor(e,t,n){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=n,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=Ql.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let o=i;for(let s=1,a=e.length;s<a;s++){if(typeof e[s][0]!="number"||typeof e[s][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let c=Ql.round(e[s][0],e[s][1]);c.x===o.x&&c.y===o.y||(this.segments.push(eo.fromRing(o,c,this)),c.x<this.bbox.ll.x&&(this.bbox.ll.x=c.x),c.y<this.bbox.ll.y&&(this.bbox.ll.y=c.y),c.x>this.bbox.ur.x&&(this.bbox.ur.x=c.x),c.y>this.bbox.ur.y&&(this.bbox.ur.y=c.y),o=c)}(i.x!==o.x||i.y!==o.y)&&this.segments.push(eo.fromRing(o,i,this))}getSweepEvents(){const e=[];for(let t=0,n=this.segments.length;t<n;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 eg(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 n=1,i=e.length;n<i;n++){const o=new eg(e[n],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=t}getSweepEvents(){const e=this.exteriorRing.getSweepEvents();for(let t=0,n=this.interiorRings.length;t<n;t++){const i=this.interiorRings[t].getSweepEvents();for(let o=0,s=i.length;o<s;o++)e.push(i[o])}return e}}class tg{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 n=0,i=e.length;n<i;n++){const o=new v_(e[n],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=t}getSweepEvents(){const e=[];for(let t=0,n=this.polys.length;t<n;t++){const i=this.polys[t].getSweepEvents();for(let o=0,s=i.length;o<s;o++)e.push(i[o])}return e}}class lh{static factory(e){const t=[];for(let n=0,i=e.length;n<i;n++){const o=e[n];if(!o.isInResult()||o.ringOut)continue;let s=null,a=o.leftSE,c=o.rightSE;const f=[a],m=a.point,p=[];for(;s=a,a=c,f.push(a),a.point!==m;)for(;;){const g=a.getAvailableLinkedEvents();if(g.length===0){const y=f[0].point,h=f[f.length-1].point;throw new Error(`Unable to complete output ring starting at [${y.x}, ${y.y}]. Last matching segment found ends at [${h.x}, ${h.y}].`)}if(g.length===1){c=g[0].otherSE;break}let w=null;for(let y=0,h=p.length;y<h;y++)if(p[y].point===a.point){w=y;break}if(w!==null){const y=p.splice(w)[0],h=f.splice(y.index);h.unshift(h[0].otherSE),t.push(new lh(h.reverse()));continue}p.push({index:f.length,point:a.point});const _=a.getLeftmostComparator(s);c=g.sort(_)[0].otherSE;break}t.push(new lh(f))}return t}constructor(e){this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point;const t=[e];for(let f=1,m=this.events.length-1;f<m;f++){const p=this.events[f].point,g=this.events[f+1].point;Qp(p,e,g)!==0&&(t.push(p),e=p)}if(t.length===1)return null;const n=t[0],i=t[1];Qp(n,e,i)===0&&t.shift(),t.push(t[0]);const o=this.isExteriorRing()?1:-1,s=this.isExteriorRing()?0:t.length-1,a=this.isExteriorRing()?t.length:-1,c=[];for(let f=s;f!=a;f+=o)c.push([t[f].x,t[f].y]);return c}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,o=this.events.length;i<o;i++){const s=this.events[i];Bn.compare(e,s)>0&&(e=s)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return n.ringOut.enclosingRing()!==t.ringOut?t.ringOut:t.ringOut.enclosingRing();t=n.prevInResult(),n=t?t.prevInResult():null}}}class rg{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,n=this.interiorRings.length;t<n;t++){const i=this.interiorRings[t].getGeom();i!==null&&e.push(i)}return e}}class y_{constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){const e=[];for(let t=0,n=this.polys.length;t<n;t++){const i=this.polys[t].getGeom();i!==null&&e.push(i)}return e}_composePolys(e){const t=[];for(let n=0,i=e.length;n<i;n++){const o=e[n];if(!o.poly)if(o.isExteriorRing())t.push(new rg(o));else{const s=o.enclosingRing();s.poly||t.push(new rg(s)),s.poly.addInterior(o)}}return t}}class m_{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:eo.compare;this.queue=e,this.tree=new Nf(t),this.segments=[]}process(e){const t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),n;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 o=i,s=i,a,c;for(;a===void 0;)o=this.tree.prev(o),o===null?a=null:o.key.consumedBy===void 0&&(a=o.key);for(;c===void 0;)s=this.tree.next(s),s===null?c=null:s.key.consumedBy===void 0&&(c=s.key);if(e.isLeft){let f=null;if(a){const p=a.getIntersection(t);if(p!==null&&(t.isAnEndpoint(p)||(f=p),!a.isAnEndpoint(p))){const g=this._splitSafely(a,p);for(let w=0,_=g.length;w<_;w++)n.push(g[w])}}let m=null;if(c){const p=c.getIntersection(t);if(p!==null&&(t.isAnEndpoint(p)||(m=p),!c.isAnEndpoint(p))){const g=this._splitSafely(c,p);for(let w=0,_=g.length;w<_;w++)n.push(g[w])}}if(f!==null||m!==null){let p=null;f===null?p=m:m===null?p=f:p=Bn.comparePoints(f,m)<=0?f:m,this.queue.remove(t.rightSE),n.push(t.rightSE);const g=t.split(p);for(let w=0,_=g.length;w<_;w++)n.push(g[w])}n.length>0?(this.tree.remove(t),n.push(e)):(this.segments.push(t),t.prev=a)}else{if(a&&c){const f=a.getIntersection(c);if(f!==null){if(!a.isAnEndpoint(f)){const m=this._splitSafely(a,f);for(let p=0,g=m.length;p<g;p++)n.push(m[p])}if(!c.isAnEndpoint(f)){const m=this._splitSafely(c,f);for(let p=0,g=m.length;p<g;p++)n.push(m[p])}}}this.tree.remove(t)}return n}_splitSafely(e,t){this.tree.remove(e);const n=e.rightSE;this.queue.remove(n);const i=e.split(t);return i.push(n),e.consumedBy===void 0&&this.tree.add(e),i}}const ng=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,__=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class b_{run(e,t,n){pi.type=e,Ql.reset();const i=[new tg(t,!0)];for(let p=0,g=n.length;p<g;p++)i.push(new tg(n[p],!1));if(pi.numMultiPolys=i.length,pi.type==="difference"){const p=i[0];let g=1;for(;g<i.length;)Ff(i[g].bbox,p.bbox)!==null?g++:i.splice(g,1)}if(pi.type==="intersection")for(let p=0,g=i.length;p<g;p++){const w=i[p];for(let _=p+1,y=i.length;_<y;_++)if(Ff(w.bbox,i[_].bbox)===null)return[]}const o=new Nf(Bn.compare);for(let p=0,g=i.length;p<g;p++){const w=i[p].getSweepEvents();for(let _=0,y=w.length;_<y;_++)if(o.insert(w[_]),o.size>ng)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const s=new m_(o);let a=o.size,c=o.pop();for(;c;){const p=c.key;if(o.size===a){const w=p.segment;throw new Error(`Unable to pop() ${p.isLeft?"left":"right"} SweepEvent [${p.point.x}, ${p.point.y}] from segment #${w.id} [${w.leftSE.point.x}, ${w.leftSE.point.y}] -> [${w.rightSE.point.x}, ${w.rightSE.point.y}] from queue.`)}if(o.size>ng)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(s.segments.length>__)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const g=s.process(p);for(let w=0,_=g.length;w<_;w++){const y=g[w];y.consumedBy===void 0&&o.insert(y)}a=o.size,c=o.pop()}Ql.reset();const f=lh.factory(s.segments);return new y_(f).getGeom()}}const pi=new b_;var jf={union:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return pi.run("union",r,t)},intersection:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return pi.run("intersection",r,t)},xor:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return pi.run("xor",r,t)},difference:function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return pi.run("difference",r,t)}};function w_(r,e){var t=En(r),n=En(e),i=r.properties||{},o=jf.difference(t.coordinates,n.coordinates);return o.length===0?null:o.length===1?Mr(o[0],i):mf(o,i)}"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),n=Math.max(Math.min(t.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(n+i,0):Math.min(i,n);var o=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:n;for(o=o<0?Math.max(n+arguments[2],0):Math.min(o,n);i<o;)t[i]=e,++i;return t},writable:!0}),Number.isFinite=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},Number.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(r){return r!==r},Math.trunc=Math.trunc||function(r){return r<0?Math.ceil(r):Math.floor(r)};var Bo=function(){};Bo.prototype.interfaces_=function(){return[]},Bo.prototype.getClass=function(){return Bo},Bo.prototype.equalsWithTolerance=function(e,t,n){return Math.abs(e-t)<=n};var ct=function(r){function e(t){r.call(this,t),this.name="IllegalArgumentException",this.message=t,this.stack=new r().stack}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e}(Error),De=function(){},ig={MAX_VALUE:{configurable:!0}};De.isNaN=function(e){return Number.isNaN(e)},De.doubleToLongBits=function(e){return e},De.longBitsToDouble=function(e){return e},De.isInfinite=function(e){return!Number.isFinite(e)},ig.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(De,ig);var rn=function(){},ch=function(){},el=function(){};function nn(){}var K=function r(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=r.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=r.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},zo={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};K.prototype.setOrdinate=function(e,t){switch(e){case K.X:this.x=t;break;case K.Y:this.y=t;break;case K.Z:this.z=t;break;default:throw new ct("Invalid ordinate index: "+e)}},K.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],n=arguments[1];return!(!Bo.equalsWithTolerance(this.x,t.x,n)||!Bo.equalsWithTolerance(this.y,t.y,n))}},K.prototype.getOrdinate=function(e){switch(e){case K.X:return this.x;case K.Y:return this.y;case K.Z:return this.z}throw new ct("Invalid ordinate index: "+e)},K.prototype.equals3D=function(e){return this.x===e.x&&this.y===e.y&&(this.z===e.z||De.isNaN(this.z))&&De.isNaN(e.z)},K.prototype.equals=function(e){return e instanceof K?this.equals2D(e):!1},K.prototype.equalInZ=function(e,t){return Bo.equalsWithTolerance(this.z,e.z,t)},K.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},K.prototype.clone=function(){},K.prototype.copy=function(){return new K(this)},K.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},K.prototype.distance3D=function(e){var t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return Math.sqrt(t*t+n*n+i*i)},K.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},K.prototype.hashCode=function(){var e=17;return e=37*e+K.hashCode(this.x),e=37*e+K.hashCode(this.y),e},K.prototype.setCoordinate=function(e){this.x=e.x,this.y=e.y,this.z=e.z},K.prototype.interfaces_=function(){return[rn,ch,nn]},K.prototype.getClass=function(){return K},K.hashCode=function(){if(arguments.length===1){var e=arguments[0],t=De.doubleToLongBits(e);return Math.trunc((t^t)>>>32)}},zo.DimensionalComparator.get=function(){return ws},zo.serialVersionUID.get=function(){return 6683108902428367e3},zo.NULL_ORDINATE.get=function(){return De.NaN},zo.X.get=function(){return 0},zo.Y.get=function(){return 1},zo.Z.get=function(){return 2},Object.defineProperties(K,zo);var ws=function(e){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t!==2&&t!==3)throw new ct("only 2 or 3 dimensions may be specified");this._dimensionsToTest=t}}};ws.prototype.compare=function(e,t){var n=e,i=t,o=ws.compare(n.x,i.x);if(o!==0)return o;var s=ws.compare(n.y,i.y);if(s!==0)return s;if(this._dimensionsToTest<=2)return 0;var a=ws.compare(n.z,i.z);return a},ws.prototype.interfaces_=function(){return[el]},ws.prototype.getClass=function(){return ws},ws.compare=function(e,t){return e<t?-1:e>t?1:De.isNaN(e)?De.isNaN(t)?0:-1:De.isNaN(t)?1:0};var tl=function(){};tl.prototype.create=function(){},tl.prototype.interfaces_=function(){return[]},tl.prototype.getClass=function(){return tl};var Q=function(){},$l={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};Q.prototype.interfaces_=function(){return[]},Q.prototype.getClass=function(){return Q},Q.toLocationSymbol=function(e){switch(e){case Q.EXTERIOR:return"e";case Q.BOUNDARY:return"b";case Q.INTERIOR:return"i";case Q.NONE:return"-"}throw new ct("Unknown location value: "+e)},$l.INTERIOR.get=function(){return 0},$l.BOUNDARY.get=function(){return 1},$l.EXTERIOR.get=function(){return 2},$l.NONE.get=function(){return-1},Object.defineProperties(Q,$l);var Me=function(r,e){return r.interfaces_&&r.interfaces_().indexOf(e)>-1},Br=function(){},sg={LOG_10:{configurable:!0}};Br.prototype.interfaces_=function(){return[]},Br.prototype.getClass=function(){return Br},Br.log10=function(e){var t=Math.log(e);return De.isInfinite(t)||De.isNaN(t)?t:t/Br.LOG_10},Br.min=function(e,t,n,i){var o=e;return t<o&&(o=t),n<o&&(o=n),i<o&&(o=i),o},Br.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],t=arguments[1],n=arguments[2];return e<t?t:e>n?n:e}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],o=arguments[1],s=arguments[2];return i<o?o:i>s?s:i}},Br.wrap=function(e,t){return e<0?t- -e%t:e%t},Br.max=function(){if(arguments.length===3){var e=arguments[0],t=arguments[1],n=arguments[2],i=e;return t>i&&(i=t),n>i&&(i=n),i}else if(arguments.length===4){var o=arguments[0],s=arguments[1],a=arguments[2],c=arguments[3],f=o;return s>f&&(f=s),a>f&&(f=a),c>f&&(f=c),f}},Br.average=function(e,t){return(e+t)/2},sg.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(Br,sg);var zn=function(e){this.str=e};zn.prototype.append=function(e){this.str+=e},zn.prototype.setCharAt=function(e,t){this.str=this.str.substr(0,e)+t+this.str.substr(e+1)},zn.prototype.toString=function(e){return this.str};var Un=function(e){this.value=e};Un.prototype.intValue=function(){return this.value},Un.prototype.compareTo=function(e){return this.value<e?-1:this.value>e?1:0},Un.isNaN=function(e){return Number.isNaN(e)};var Zl=function(){};Zl.isWhitespace=function(e){return e<=32&&e>=0||e===127},Zl.toUpperCase=function(e){return e.toUpperCase()};var Z=function r(){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 r){var t=arguments[0];this.init(t)}else if(typeof arguments[0]=="string"){var n=arguments[0];r.call(this,r.parse(n))}}else if(arguments.length===2){var i=arguments[0],o=arguments[1];this.init(i,o)}},Pn={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}};Z.prototype.le=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<=e._lo},Z.prototype.extractSignificantDigits=function(e,t){var n=this.abs(),i=Z.magnitude(n._hi),o=Z.TEN.pow(i);n=n.divide(o),n.gt(Z.TEN)?(n=n.divide(Z.TEN),i+=1):n.lt(Z.ONE)&&(n=n.multiply(Z.TEN),i-=1);for(var s=i+1,a=new zn,c=Z.MAX_PRINT_DIGITS-1,f=0;f<=c;f++){e&&f===s&&a.append(".");var m=Math.trunc(n._hi);if(m<0)break;var p=!1,g=0;m>9?(p=!0,g="9"):g="0"+m,a.append(g),n=n.subtract(Z.valueOf(m)).multiply(Z.TEN),p&&n.selfAdd(Z.TEN);var w=!0,_=Z.magnitude(n._hi);if(_<0&&Math.abs(_)>=c-f&&(w=!1),!w)break}return t[0]=i,a.toString()},Z.prototype.sqr=function(){return this.multiply(this)},Z.prototype.doubleValue=function(){return this._hi+this._lo},Z.prototype.subtract=function(){if(arguments[0]instanceof Z){var e=arguments[0];return this.add(e.negate())}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.add(-t)}},Z.prototype.equals=function(){if(arguments.length===1){var e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}},Z.prototype.isZero=function(){return this._hi===0&&this._lo===0},Z.prototype.selfSubtract=function(){if(arguments[0]instanceof Z){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)}},Z.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},Z.prototype.min=function(e){return this.le(e)?this:e},Z.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof Z){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 n=arguments[0],i=arguments[1],o=null,s=null,a=null,c=null,f=null,m=null,p=null,g=null;return f=this._hi/n,m=Z.SPLIT*f,o=m-f,g=Z.SPLIT*n,o=m-o,s=f-o,a=g-n,p=f*n,a=g-a,c=n-a,g=o*a-p+o*c+s*a+s*c,m=(this._hi-p-g+this._lo-f*i)/n,g=f+m,this._hi=g,this._lo=f-g+m,this}},Z.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},Z.prototype.divide=function(){if(arguments[0]instanceof Z){var e=arguments[0],t=null,n=null,i=null,o=null,s=null,a=null,c=null,f=null;s=this._hi/e._hi,a=Z.SPLIT*s,t=a-s,f=Z.SPLIT*e._hi,t=a-t,n=s-t,i=f-e._hi,c=s*e._hi,i=f-i,o=e._hi-i,f=t*i-c+t*o+n*i+n*o,a=(this._hi-c-f+this._lo-s*e._lo)/e._hi,f=s+a;var m=f,p=s-f+a;return new Z(m,p)}else if(typeof arguments[0]=="number"){var g=arguments[0];return De.isNaN(g)?Z.createNaN():Z.copy(this).selfDivide(g,0)}},Z.prototype.ge=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>=e._lo},Z.prototype.pow=function(e){if(e===0)return Z.valueOf(1);var t=new Z(this),n=Z.valueOf(1),i=Math.abs(e);if(i>1)for(;i>0;)i%2===1&&n.selfMultiply(t),i/=2,i>0&&(t=t.sqr());else n=t;return e<0?n.reciprocal():n},Z.prototype.ceil=function(){if(this.isNaN())return Z.NaN;var e=Math.ceil(this._hi),t=0;return e===this._hi&&(t=Math.ceil(this._lo)),new Z(e,t)},Z.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},Z.prototype.rint=function(){if(this.isNaN())return this;var e=this.add(.5);return e.floor()},Z.prototype.setValue=function(){if(arguments[0]instanceof Z){var e=arguments[0];return this.init(e),this}else if(typeof arguments[0]=="number"){var t=arguments[0];return this.init(t),this}},Z.prototype.max=function(e){return this.ge(e)?this:e},Z.prototype.sqrt=function(){if(this.isZero())return Z.valueOf(0);if(this.isNegative())return Z.NaN;var e=1/Math.sqrt(this._hi),t=this._hi*e,n=Z.valueOf(t),i=this.subtract(n.sqr()),o=i._hi*(e*.5);return n.add(o)},Z.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof Z){var e=arguments[0];return this.selfAdd(e._hi,e._lo)}else if(typeof arguments[0]=="number"){var t=arguments[0],n=null,i=null,o=null,s=null,a=null,c=null;return o=this._hi+t,a=o-this._hi,s=o-a,s=t-a+(this._hi-s),c=s+this._lo,n=o+c,i=c+(o-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(arguments.length===2){var f=arguments[0],m=arguments[1],p=null,g=null,w=null,_=null,y=null,h=null,d=null,u=null;y=this._hi+f,w=this._lo+m,d=y-this._hi,u=w-this._lo,h=y-d,_=w-u,h=f-d+(this._hi-h),_=m-u+(this._lo-_),d=h+w,p=y+d,g=d+(y-p),d=_+g;var l=p+d,v=d+(p-l);return this._hi=l,this._lo=v,this}},Z.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof Z){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 n=arguments[0],i=arguments[1],o=null,s=null,a=null,c=null,f=null,m=null;f=Z.SPLIT*this._hi,o=f-this._hi,m=Z.SPLIT*n,o=f-o,s=this._hi-o,a=m-n,f=this._hi*n,a=m-a,c=n-a,m=o*a-f+o*c+s*a+s*c+(this._hi*i+this._lo*n);var p=f+m;o=f-p;var g=m+o;return this._hi=p,this._lo=g,this}},Z.prototype.selfSqr=function(){return this.selfMultiply(this)},Z.prototype.floor=function(){if(this.isNaN())return Z.NaN;var e=Math.floor(this._hi),t=0;return e===this._hi&&(t=Math.floor(this._lo)),new Z(e,t)},Z.prototype.negate=function(){return this.isNaN()?this:new Z(-this._hi,-this._lo)},Z.prototype.clone=function(){},Z.prototype.multiply=function(){if(arguments[0]instanceof Z){var e=arguments[0];return e.isNaN()?Z.createNaN():Z.copy(this).selfMultiply(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return De.isNaN(t)?Z.createNaN():Z.copy(this).selfMultiply(t,0)}},Z.prototype.isNaN=function(){return De.isNaN(this._hi)},Z.prototype.intValue=function(){return Math.trunc(this._hi)},Z.prototype.toString=function(){var e=Z.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()},Z.prototype.toStandardNotation=function(){var e=this.getSpecialNumberString();if(e!==null)return e;var t=new Array(1).fill(null),n=this.extractSignificantDigits(!0,t),i=t[0]+1,o=n;if(n.charAt(0)===".")o="0"+n;else if(i<0)o="0."+Z.stringOfChar("0",-i)+n;else if(n.indexOf(".")===-1){var s=i-n.length,a=Z.stringOfChar("0",s);o=n+a+".0"}return this.isNegative()?"-"+o:o},Z.prototype.reciprocal=function(){var e=null,t=null,n=null,i=null,o=null,s=null,a=null,c=null;o=1/this._hi,s=Z.SPLIT*o,e=s-o,c=Z.SPLIT*this._hi,e=s-e,t=o-e,n=c-this._hi,a=o*this._hi,n=c-n,i=this._hi-n,c=e*n-a+e*i+t*n+t*i,s=(1-a-c-o*this._lo)/this._hi;var f=o+s,m=o-f+s;return new Z(f,m)},Z.prototype.toSciNotation=function(){if(this.isZero())return Z.SCI_NOT_ZERO;var e=this.getSpecialNumberString();if(e!==null)return e;var t=new Array(1).fill(null),n=this.extractSignificantDigits(!1,t),i=Z.SCI_NOT_EXPONENT_CHAR+t[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var o="";n.length>1&&(o=n.substring(1));var s=n.charAt(0)+"."+o;return this.isNegative()?"-"+s+i:s+i},Z.prototype.abs=function(){return this.isNaN()?Z.NaN:this.isNegative()?this.negate():new Z(this)},Z.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},Z.prototype.lt=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<e._lo},Z.prototype.add=function(){if(arguments[0]instanceof Z){var e=arguments[0];return Z.copy(this).selfAdd(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return Z.copy(this).selfAdd(t)}},Z.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 Z){var t=arguments[0];this._hi=t._hi,this._lo=t._lo}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},Z.prototype.gt=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>e._lo},Z.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},Z.prototype.trunc=function(){return this.isNaN()?Z.NaN:this.isPositive()?this.floor():this.ceil()},Z.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},Z.prototype.interfaces_=function(){return[nn,rn,ch]},Z.prototype.getClass=function(){return Z},Z.sqr=function(e){return Z.valueOf(e).selfMultiply(e)},Z.valueOf=function(){if(typeof arguments[0]=="string"){var e=arguments[0];return Z.parse(e)}else if(typeof arguments[0]=="number"){var t=arguments[0];return new Z(t)}},Z.sqrt=function(e){return Z.valueOf(e).sqrt()},Z.parse=function(e){for(var t=0,n=e.length;Zl.isWhitespace(e.charAt(t));)t++;var i=!1;if(t<n){var o=e.charAt(t);(o==="-"||o==="+")&&(t++,o==="-"&&(i=!0))}for(var s=new Z,a=0,c=0,f=0;!(t>=n);){var m=e.charAt(t);if(t++,Zl.isDigit(m)){var p=m-"0";s.selfMultiply(Z.TEN),s.selfAdd(p),a++;continue}if(m==="."){c=a;continue}if(m==="e"||m==="E"){var g=e.substring(t);try{f=Un.parseInt(g)}catch(d){throw d instanceof Error?new Error("Invalid exponent "+g+" in string "+e):d}finally{}break}throw new Error("Unexpected character '"+m+"' at position "+t+" in string "+e)}var w=s,_=a-c-f;if(_===0)w=s;else if(_>0){var y=Z.TEN.pow(_);w=s.divide(y)}else if(_<0){var h=Z.TEN.pow(-_);w=s.multiply(h)}return i?w.negate():w},Z.createNaN=function(){return new Z(De.NaN,De.NaN)},Z.copy=function(e){return new Z(e)},Z.magnitude=function(e){var t=Math.abs(e),n=Math.log(t)/Math.log(10),i=Math.trunc(Math.floor(n)),o=Math.pow(10,i);return o*10<=t&&(i+=1),i},Z.stringOfChar=function(e,t){for(var n=new zn,i=0;i<t;i++)n.append(e);return n.toString()},Pn.PI.get=function(){return new Z(3.141592653589793,12246467991473532e-32)},Pn.TWO_PI.get=function(){return new Z(6.283185307179586,24492935982947064e-32)},Pn.PI_2.get=function(){return new Z(1.5707963267948966,6123233995736766e-32)},Pn.E.get=function(){return new Z(2.718281828459045,14456468917292502e-32)},Pn.NaN.get=function(){return new Z(De.NaN,De.NaN)},Pn.EPS.get=function(){return 123259516440783e-46},Pn.SPLIT.get=function(){return 134217729},Pn.MAX_PRINT_DIGITS.get=function(){return 32},Pn.TEN.get=function(){return Z.valueOf(10)},Pn.ONE.get=function(){return Z.valueOf(1)},Pn.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},Pn.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(Z,Pn);var gr=function(){},og={DP_SAFE_EPSILON:{configurable:!0}};gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr},gr.orientationIndex=function(e,t,n){var i=gr.orientationIndexFilter(e,t,n);if(i<=1)return i;var o=Z.valueOf(t.x).selfAdd(-e.x),s=Z.valueOf(t.y).selfAdd(-e.y),a=Z.valueOf(n.x).selfAdd(-t.x),c=Z.valueOf(n.y).selfAdd(-t.y);return o.selfMultiply(c).selfSubtract(s.selfMultiply(a)).signum()},gr.signOfDet2x2=function(e,t,n,i){var o=e.multiply(i).selfSubtract(t.multiply(n));return o.signum()},gr.intersection=function(e,t,n,i){var o=Z.valueOf(i.y).selfSubtract(n.y).selfMultiply(Z.valueOf(t.x).selfSubtract(e.x)),s=Z.valueOf(i.x).selfSubtract(n.x).selfMultiply(Z.valueOf(t.y).selfSubtract(e.y)),a=o.subtract(s),c=Z.valueOf(i.x).selfSubtract(n.x).selfMultiply(Z.valueOf(e.y).selfSubtract(n.y)),f=Z.valueOf(i.y).selfSubtract(n.y).selfMultiply(Z.valueOf(e.x).selfSubtract(n.x)),m=c.subtract(f),p=m.selfDivide(a).doubleValue(),g=Z.valueOf(e.x).selfAdd(Z.valueOf(t.x).selfSubtract(e.x).selfMultiply(p)).doubleValue(),w=Z.valueOf(t.x).selfSubtract(e.x).selfMultiply(Z.valueOf(e.y).selfSubtract(n.y)),_=Z.valueOf(t.y).selfSubtract(e.y).selfMultiply(Z.valueOf(e.x).selfSubtract(n.x)),y=w.subtract(_),h=y.selfDivide(a).doubleValue(),d=Z.valueOf(n.y).selfAdd(Z.valueOf(i.y).selfSubtract(n.y).selfMultiply(h)).doubleValue();return new K(g,d)},gr.orientationIndexFilter=function(e,t,n){var i=null,o=(e.x-n.x)*(t.y-n.y),s=(e.y-n.y)*(t.x-n.x),a=o-s;if(o>0){if(s<=0)return gr.signum(a);i=o+s}else if(o<0){if(s>=0)return gr.signum(a);i=-o-s}else return gr.signum(a);var c=gr.DP_SAFE_EPSILON*i;return a>=c||-a>=c?gr.signum(a):2},gr.signum=function(e){return e>0?1:e<0?-1:0},og.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(gr,og);var He=function(){},ec={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};ec.X.get=function(){return 0},ec.Y.get=function(){return 1},ec.Z.get=function(){return 2},ec.M.get=function(){return 3},He.prototype.setOrdinate=function(e,t,n){},He.prototype.size=function(){},He.prototype.getOrdinate=function(e,t){},He.prototype.getCoordinate=function(){},He.prototype.getCoordinateCopy=function(e){},He.prototype.getDimension=function(){},He.prototype.getX=function(e){},He.prototype.clone=function(){},He.prototype.expandEnvelope=function(e){},He.prototype.copy=function(){},He.prototype.getY=function(e){},He.prototype.toCoordinateArray=function(){},He.prototype.interfaces_=function(){return[ch]},He.prototype.getClass=function(){return He},Object.defineProperties(He,ec);var ag=function(){},rl=function(r){function e(){r.call(this,"Projective point not representable on the Cartesian plane.")}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ag),Bt=function(){};Bt.arraycopy=function(e,t,n,i,o){for(var s=0,a=t;a<t+o;a++)n[i+s]=e[a],s++},Bt.getProperty=function(e){return{"line.separator":`
252
+ `}[e]};var Sn=function r(){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],n=arguments[1];this.x=t,this.y=n,this.w=1}else if(arguments[0]instanceof r&&arguments[1]instanceof r){var i=arguments[0],o=arguments[1];this.x=i.y*o.w-o.y*i.w,this.y=o.x*i.w-i.x*o.w,this.w=i.x*o.y-o.x*i.y}else if(arguments[0]instanceof K&&arguments[1]instanceof K){var s=arguments[0],a=arguments[1];this.x=s.y-a.y,this.y=a.x-s.x,this.w=s.x*a.y-a.x*s.y}}else if(arguments.length===3){var c=arguments[0],f=arguments[1],m=arguments[2];this.x=c,this.y=f,this.w=m}else if(arguments.length===4){var p=arguments[0],g=arguments[1],w=arguments[2],_=arguments[3],y=p.y-g.y,h=g.x-p.x,d=p.x*g.y-g.x*p.y,u=w.y-_.y,l=_.x-w.x,v=w.x*_.y-_.x*w.y;this.x=h*v-l*d,this.y=u*d-y*v,this.w=y*l-u*h}};Sn.prototype.getY=function(){var e=this.y/this.w;if(De.isNaN(e)||De.isInfinite(e))throw new rl;return e},Sn.prototype.getX=function(){var e=this.x/this.w;if(De.isNaN(e)||De.isInfinite(e))throw new rl;return e},Sn.prototype.getCoordinate=function(){var e=new K;return e.x=this.getX(),e.y=this.getY(),e},Sn.prototype.interfaces_=function(){return[]},Sn.prototype.getClass=function(){return Sn},Sn.intersection=function(e,t,n,i){var o=e.y-t.y,s=t.x-e.x,a=e.x*t.y-t.x*e.y,c=n.y-i.y,f=i.x-n.x,m=n.x*i.y-i.x*n.y,p=s*m-f*a,g=c*a-o*m,w=o*f-c*s,_=p/w,y=g/w;if(De.isNaN(_)||De.isInfinite(_)||De.isNaN(y)||De.isInfinite(y))throw new rl;return new K(_,y)};var Ee=function r(){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 K){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof r){var t=arguments[0];this.init(t)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var o=arguments[0],s=arguments[1],a=arguments[2],c=arguments[3];this.init(o,s,a,c)}},ug={serialVersionUID:{configurable:!0}};Ee.prototype.getArea=function(){return this.getWidth()*this.getHeight()},Ee.prototype.equals=function(e){if(!(e instanceof Ee))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()},Ee.prototype.intersection=function(e){if(this.isNull()||e.isNull()||!this.intersects(e))return new Ee;var t=this._minx>e._minx?this._minx:e._minx,n=this._miny>e._miny?this._miny:e._miny,i=this._maxx<e._maxx?this._maxx:e._maxx,o=this._maxy<e._maxy?this._maxy:e._maxy;return new Ee(t,i,n,o)},Ee.prototype.isNull=function(){return this._maxx<this._minx},Ee.prototype.getMaxX=function(){return this._maxx},Ee.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof K){var e=arguments[0];return this.covers(e.x,e.y)}else if(arguments[0]instanceof Ee){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 n=arguments[0],i=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},Ee.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof Ee){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 K){var t=arguments[0];return this.intersects(t.x,t.y)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}},Ee.prototype.getMinY=function(){return this._miny},Ee.prototype.getMinX=function(){return this._minx},Ee.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof K){var e=arguments[0];this.expandToInclude(e.x,e.y)}else if(arguments[0]instanceof Ee){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 n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},Ee.prototype.minExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e<t?e:t},Ee.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},Ee.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},Ee.prototype.translate=function(e,t){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+t,this.getMaxY()+t)},Ee.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Ee.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Ee.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Ee.prototype.maxExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e>t?e:t},Ee.prototype.expandBy=function(){if(arguments.length===1){var e=arguments[0];this.expandBy(e,e)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=t,this._maxx+=t,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Ee.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof Ee){var e=arguments[0];return this.covers(e)}else if(arguments[0]instanceof K){var t=arguments[0];return this.covers(t)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},Ee.prototype.centre=function(){return this.isNull()?null:new K((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Ee.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof K){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof Ee){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 n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var o=arguments[0],s=arguments[1],a=arguments[2],c=arguments[3];o<s?(this._minx=o,this._maxx=s):(this._minx=s,this._maxx=o),a<c?(this._miny=a,this._maxy=c):(this._miny=c,this._maxy=a)}},Ee.prototype.getMaxY=function(){return this._maxy},Ee.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 n=0;return this._maxy<e._miny?n=e._miny-this._maxy:this._miny>e._maxy&&(n=this._miny-e._maxy),t===0?n:n===0?t:Math.sqrt(t*t+n*n)},Ee.prototype.hashCode=function(){var e=17;return e=37*e+K.hashCode(this._minx),e=37*e+K.hashCode(this._maxx),e=37*e+K.hashCode(this._miny),e=37*e+K.hashCode(this._maxy),e},Ee.prototype.interfaces_=function(){return[rn,nn]},Ee.prototype.getClass=function(){return Ee},Ee.intersects=function(){if(arguments.length===3){var e=arguments[0],t=arguments[1],n=arguments[2];return n.x>=(e.x<t.x?e.x:t.x)&&n.x<=(e.x>t.x?e.x:t.x)&&n.y>=(e.y<t.y?e.y:t.y)&&n.y<=(e.y>t.y?e.y:t.y)}else if(arguments.length===4){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],c=Math.min(s.x,a.x),f=Math.max(s.x,a.x),m=Math.min(i.x,o.x),p=Math.max(i.x,o.x);return!(m>f||p<c||(c=Math.min(s.y,a.y),f=Math.max(s.y,a.y),m=Math.min(i.y,o.y),p=Math.max(i.y,o.y),m>f)||p<c)}},ug.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(Ee,ug);var Wn={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*$/},hh=function(e){this.geometryFactory=e||new Ge};hh.prototype.read=function(e){var t,n,i;e=e.replace(/[\n\r]/g," ");var o=Wn.typeStr.exec(e);if(e.search("EMPTY")!==-1&&(o=Wn.emptyTypeStr.exec(e),o[2]=void 0),o&&(n=o[1].toLowerCase(),i=o[2],nl[n]&&(t=nl[n].apply(this,[i]))),t===void 0)throw new Error("Could not parse WKT "+e);return t},hh.prototype.write=function(e){return this.extractGeometry(e)},hh.prototype.extractGeometry=function(e){var t=e.getGeometryType().toLowerCase();if(!Bi[t])return null;var n=t.toUpperCase(),i;return e.isEmpty()?i=n+" EMPTY":i=n+"("+Bi[t].apply(this,[e])+")",i};var Bi={coordinate:function(e){return e.x+" "+e.y},point:function(e){return Bi.coordinate.call(this,e._coordinates._coordinates[0])},multipoint:function(e){for(var t=this,n=[],i=0,o=e._geometries.length;i<o;++i)n.push("("+Bi.point.apply(t,[e._geometries[i]])+")");return n.join(",")},linestring:function(e){for(var t=this,n=[],i=0,o=e._points._coordinates.length;i<o;++i)n.push(Bi.coordinate.apply(t,[e._points._coordinates[i]]));return n.join(",")},linearring:function(e){for(var t=this,n=[],i=0,o=e._points._coordinates.length;i<o;++i)n.push(Bi.coordinate.apply(t,[e._points._coordinates[i]]));return n.join(",")},multilinestring:function(e){for(var t=this,n=[],i=0,o=e._geometries.length;i<o;++i)n.push("("+Bi.linestring.apply(t,[e._geometries[i]])+")");return n.join(",")},polygon:function(e){var t=this,n=[];n.push("("+Bi.linestring.apply(this,[e._shell])+")");for(var i=0,o=e._holes.length;i<o;++i)n.push("("+Bi.linestring.apply(t,[e._holes[i]])+")");return n.join(",")},multipolygon:function(e){for(var t=this,n=[],i=0,o=e._geometries.length;i<o;++i)n.push("("+Bi.polygon.apply(t,[e._geometries[i]])+")");return n.join(",")},geometrycollection:function(e){for(var t=this,n=[],i=0,o=e._geometries.length;i<o;++i)n.push(t.extractGeometry(e._geometries[i]));return n.join(",")}},nl={point:function(e){if(e===void 0)return this.geometryFactory.createPoint();var t=e.trim().split(Wn.spaces);return this.geometryFactory.createPoint(new K(Number.parseFloat(t[0]),Number.parseFloat(t[1])))},multipoint:function(e){var t=this;if(e===void 0)return this.geometryFactory.createMultiPoint();for(var n,i=e.trim().split(","),o=[],s=0,a=i.length;s<a;++s)n=i[s].replace(Wn.trimParens,"$1"),o.push(nl.point.apply(t,[n]));return this.geometryFactory.createMultiPoint(o)},linestring:function(e){if(e===void 0)return this.geometryFactory.createLineString();for(var t=e.trim().split(","),n=[],i,o=0,s=t.length;o<s;++o)i=t[o].trim().split(Wn.spaces),n.push(new K(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(n)},linearring:function(e){if(e===void 0)return this.geometryFactory.createLinearRing();for(var t=e.trim().split(","),n=[],i,o=0,s=t.length;o<s;++o)i=t[o].trim().split(Wn.spaces),n.push(new K(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(n)},multilinestring:function(e){var t=this;if(e===void 0)return this.geometryFactory.createMultiLineString();for(var n,i=e.trim().split(Wn.parenComma),o=[],s=0,a=i.length;s<a;++s)n=i[s].replace(Wn.trimParens,"$1"),o.push(nl.linestring.apply(t,[n]));return this.geometryFactory.createMultiLineString(o)},polygon:function(e){var t=this;if(e===void 0)return this.geometryFactory.createPolygon();for(var n,i,o,s=e.trim().split(Wn.parenComma),a,c=[],f=0,m=s.length;f<m;++f)n=s[f].replace(Wn.trimParens,"$1"),i=nl.linestring.apply(t,[n]),o=t.geometryFactory.createLinearRing(i._points),f===0?a=o:c.push(o);return this.geometryFactory.createPolygon(a,c)},multipolygon:function(e){var t=this;if(e===void 0)return this.geometryFactory.createMultiPolygon();for(var n,i=e.trim().split(Wn.doubleParenComma),o=[],s=0,a=i.length;s<a;++s)n=i[s].replace(Wn.trimParens,"$1"),o.push(nl.polygon.apply(t,[n]));return this.geometryFactory.createMultiPolygon(o)},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 n=e.trim().split("|"),i=[],o=0,s=n.length;o<s;++o)i.push(t.read(n[o]));return this.geometryFactory.createGeometryCollection(i)}},Cn=function(e){this.parser=new hh(e)};Cn.prototype.write=function(e){return this.parser.write(e)},Cn.toLineString=function(e,t){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+e.x+" "+e.y+", "+t.x+" "+t.y+" )"};var zi=function(r){function e(t){r.call(this,t),this.name="RuntimeException",this.message=t,this.stack=new r().stack}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e}(Error),fh=function(r){function e(){if(r.call(this),arguments.length===0)r.call(this);else if(arguments.length===1){var t=arguments[0];r.call(this,t)}}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(zi),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 fh("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 fh:new fh(t)},Fe.equals=function(){var e,t,n;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],n=arguments[2],!t.equals(e)))throw new fh("Expected "+e+" but encountered "+t+(n!==null?": "+n:""))};var ft=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 K,this._intPt[1]=new K,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Uo={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};ft.prototype.getIndexAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intLineIndex[e][t]},ft.prototype.getTopologySummary=function(){var e=new zn;return this.isEndPoint()&&e.append(" endpoint"),this._isProper&&e.append(" proper"),this.isCollinear()&&e.append(" collinear"),e.toString()},ft.prototype.computeIntersection=function(e,t,n,i){this._inputLines[0][0]=e,this._inputLines[0][1]=t,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(e,t,n,i)},ft.prototype.getIntersectionNum=function(){return this._result},ft.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),n=this.getEdgeDistance(e,1);t>n?(this._intLineIndex[e][0]=0,this._intLineIndex[e][1]=1):(this._intLineIndex[e][0]=1,this._intLineIndex[e][1]=0)}},ft.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},ft.prototype.setPrecisionModel=function(e){this._precisionModel=e},ft.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],n=0;n<this._result;n++)if(!(e._intPt[n].equals2D(e._inputLines[t][0])||e._intPt[n].equals2D(e._inputLines[t][1])))return!0;return!1}},ft.prototype.getIntersection=function(e){return this._intPt[e]},ft.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},ft.prototype.hasIntersection=function(){return this._result!==ft.NO_INTERSECTION},ft.prototype.getEdgeDistance=function(e,t){var n=ft.computeEdgeDistance(this._intPt[t],this._inputLines[e][0],this._inputLines[e][1]);return n},ft.prototype.isCollinear=function(){return this._result===ft.COLLINEAR_INTERSECTION},ft.prototype.toString=function(){return Cn.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Cn.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},ft.prototype.getEndpoint=function(e,t){return this._inputLines[e][t]},ft.prototype.isIntersection=function(e){for(var t=this,n=0;n<this._result;n++)if(t._intPt[n].equals2D(e))return!0;return!1},ft.prototype.getIntersectionAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[e][t]]},ft.prototype.interfaces_=function(){return[]},ft.prototype.getClass=function(){return ft},ft.computeEdgeDistance=function(e,t,n){var i=Math.abs(n.x-t.x),o=Math.abs(n.y-t.y),s=-1;if(e.equals(t))s=0;else if(e.equals(n))i>o?s=i:s=o;else{var a=Math.abs(e.x-t.x),c=Math.abs(e.y-t.y);i>o?s=a:s=c,s===0&&!e.equals(t)&&(s=Math.max(a,c))}return Fe.isTrue(!(s===0&&!e.equals(t)),"Bad distance calculation"),s},ft.nonRobustComputeEdgeDistance=function(e,t,n){var i=e.x-t.x,o=e.y-t.y,s=Math.sqrt(i*i+o*o);return Fe.isTrue(!(s===0&&!e.equals(t)),"Invalid distance calculation"),s},Uo.DONT_INTERSECT.get=function(){return 0},Uo.DO_INTERSECT.get=function(){return 1},Uo.COLLINEAR.get=function(){return 2},Uo.NO_INTERSECTION.get=function(){return 0},Uo.POINT_INTERSECTION.get=function(){return 1},Uo.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(ft,Uo);var to=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(n){var i=new Ee(this._inputLines[0][0],this._inputLines[0][1]),o=new Ee(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(n)&&o.contains(n)},e.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];if(this._isProper=!1,Ee.intersects(i,o,n)&&he.orientationIndex(i,o,n)===0&&he.orientationIndex(o,i,n)===0)return this._isProper=!0,(n.equals(i)||n.equals(o))&&(this._isProper=!1),this._result=r.POINT_INTERSECTION,null;this._result=r.NO_INTERSECTION}else return r.prototype.computeIntersection.apply(this,arguments)},e.prototype.normalizeToMinimum=function(n,i,o,s,a){a.x=this.smallestInAbsValue(n.x,i.x,o.x,s.x),a.y=this.smallestInAbsValue(n.y,i.y,o.y,s.y),n.x-=a.x,n.y-=a.y,i.x-=a.x,i.y-=a.y,o.x-=a.x,o.y-=a.y,s.x-=a.x,s.y-=a.y},e.prototype.safeHCoordinateIntersection=function(n,i,o,s){var a=null;try{a=Sn.intersection(n,i,o,s)}catch(c){if(c instanceof rl)a=e.nearestEndpoint(n,i,o,s);else throw c}finally{}return a},e.prototype.intersection=function(n,i,o,s){var a=this.intersectionWithNormalization(n,i,o,s);return this.isInSegmentEnvelopes(a)||(a=new K(e.nearestEndpoint(n,i,o,s))),this._precisionModel!==null&&this._precisionModel.makePrecise(a),a},e.prototype.smallestInAbsValue=function(n,i,o,s){var a=n,c=Math.abs(a);return Math.abs(i)<c&&(a=i,c=Math.abs(i)),Math.abs(o)<c&&(a=o,c=Math.abs(o)),Math.abs(s)<c&&(a=s),a},e.prototype.checkDD=function(n,i,o,s,a){var c=gr.intersection(n,i,o,s),f=this.isInSegmentEnvelopes(c);Bt.out.println("DD in env = "+f+" --------------------- "+c),a.distance(c)>1e-4&&Bt.out.println("Distance = "+a.distance(c))},e.prototype.intersectionWithNormalization=function(n,i,o,s){var a=new K(n),c=new K(i),f=new K(o),m=new K(s),p=new K;this.normalizeToEnvCentre(a,c,f,m,p);var g=this.safeHCoordinateIntersection(a,c,f,m);return g.x+=p.x,g.y+=p.y,g},e.prototype.computeCollinearIntersection=function(n,i,o,s){var a=Ee.intersects(n,i,o),c=Ee.intersects(n,i,s),f=Ee.intersects(o,s,n),m=Ee.intersects(o,s,i);return a&&c?(this._intPt[0]=o,this._intPt[1]=s,r.COLLINEAR_INTERSECTION):f&&m?(this._intPt[0]=n,this._intPt[1]=i,r.COLLINEAR_INTERSECTION):a&&f?(this._intPt[0]=o,this._intPt[1]=n,o.equals(n)&&!c&&!m?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):a&&m?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!c&&!f?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):c&&f?(this._intPt[0]=s,this._intPt[1]=n,s.equals(n)&&!a&&!m?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):c&&m?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!a&&!f?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):r.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(n,i,o,s,a){var c=n.x<i.x?n.x:i.x,f=n.y<i.y?n.y:i.y,m=n.x>i.x?n.x:i.x,p=n.y>i.y?n.y:i.y,g=o.x<s.x?o.x:s.x,w=o.y<s.y?o.y:s.y,_=o.x>s.x?o.x:s.x,y=o.y>s.y?o.y:s.y,h=c>g?c:g,d=m<_?m:_,u=f>w?f:w,l=p<y?p:y,v=(h+d)/2,b=(u+l)/2;a.x=v,a.y=b,n.x-=a.x,n.y-=a.y,i.x-=a.x,i.y-=a.y,o.x-=a.x,o.y-=a.y,s.x-=a.x,s.y-=a.y},e.prototype.computeIntersect=function(n,i,o,s){if(this._isProper=!1,!Ee.intersects(n,i,o,s))return r.NO_INTERSECTION;var a=he.orientationIndex(n,i,o),c=he.orientationIndex(n,i,s);if(a>0&&c>0||a<0&&c<0)return r.NO_INTERSECTION;var f=he.orientationIndex(o,s,n),m=he.orientationIndex(o,s,i);if(f>0&&m>0||f<0&&m<0)return r.NO_INTERSECTION;var p=a===0&&c===0&&f===0&&m===0;return p?this.computeCollinearIntersection(n,i,o,s):(a===0||c===0||f===0||m===0?(this._isProper=!1,n.equals2D(o)||n.equals2D(s)?this._intPt[0]=n:i.equals2D(o)||i.equals2D(s)?this._intPt[0]=i:a===0?this._intPt[0]=new K(o):c===0?this._intPt[0]=new K(s):f===0?this._intPt[0]=new K(n):m===0&&(this._intPt[0]=new K(i))):(this._isProper=!0,this._intPt[0]=this.intersection(n,i,o,s)),r.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(n,i,o,s){var a=n,c=he.distancePointLine(n,o,s),f=he.distancePointLine(i,o,s);return f<c&&(c=f,a=i),f=he.distancePointLine(o,n,i),f<c&&(c=f,a=o),f=he.distancePointLine(s,n,i),f<c&&(c=f,a=s),a},e}(ft),Wo=function(){};Wo.prototype.interfaces_=function(){return[]},Wo.prototype.getClass=function(){return Wo},Wo.orientationIndex=function(e,t,n){var i=t.x-e.x,o=t.y-e.y,s=n.x-t.x,a=n.y-t.y;return Wo.signOfDet2x2(i,o,s,a)},Wo.signOfDet2x2=function(e,t,n,i){var o=null,s=null,a=null;if(o=1,e===0||i===0)return t===0||n===0?0:t>0?n>0?-o:o:n>0?o:-o;if(t===0||n===0)return i>0?e>0?o:-o:e>0?-o:o;if(t>0?i>0?t<=i||(o=-o,s=e,e=n,n=s,s=t,t=i,i=s):t<=-i?(o=-o,n=-n,i=-i):(s=e,e=-n,n=s,s=t,t=-i,i=s):i>0?-t<=i?(o=-o,e=-e,t=-t):(s=-e,e=n,n=s,s=-t,t=i,i=s):t>=i?(e=-e,t=-t,n=-n,i=-i):(o=-o,s=-e,e=-n,n=s,s=-t,t=-i,i=s),e>0)if(n>0){if(!(e<=n))return o}else return o;else{if(n>0)return-o;if(e>=n)o=-o,e=-e,n=-n;else return-o}for(;;){if(a=Math.floor(n/e),n=n-a*e,i=i-a*t,i<0)return-o;if(i>t)return o;if(e>n+n){if(t<i+i)return o}else{if(t>i+i)return-o;n=e-n,i=t-i,o=-o}if(i===0)return n===0?0:-o;if(n===0||(a=Math.floor(e/n),e=e-a*n,t=t-a*i,t<0))return o;if(t>i)return-o;if(n>e+e){if(i<t+t)return-o}else{if(i>t+t)return o;e=n-e,t=i-t,o=-o}if(t===0)return e===0?0:o;if(e===0)return-o}};var qn=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var e=arguments[0];this._p=e};qn.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 n=e.x,i=t.x;return n>i&&(n=t.x,i=e.x),this._p.x>=n&&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 o=e.x-this._p.x,s=e.y-this._p.y,a=t.x-this._p.x,c=t.y-this._p.y,f=Wo.signOfDet2x2(o,s,a,c);if(f===0)return this._isPointOnSegment=!0,null;c<s&&(f=-f),f>0&&this._crossingCount++}},qn.prototype.isPointInPolygon=function(){return this.getLocation()!==Q.EXTERIOR},qn.prototype.getLocation=function(){return this._isPointOnSegment?Q.BOUNDARY:this._crossingCount%2===1?Q.INTERIOR:Q.EXTERIOR},qn.prototype.isOnSegment=function(){return this._isPointOnSegment},qn.prototype.interfaces_=function(){return[]},qn.prototype.getClass=function(){return qn},qn.locatePointInRing=function(){if(arguments[0]instanceof K&&Me(arguments[1],He)){for(var e=arguments[0],t=arguments[1],n=new qn(e),i=new K,o=new K,s=1;s<t.size();s++)if(t.getCoordinate(s,i),t.getCoordinate(s-1,o),n.countSegment(i,o),n.isOnSegment())return n.getLocation();return n.getLocation()}else if(arguments[0]instanceof K&&arguments[1]instanceof Array){for(var a=arguments[0],c=arguments[1],f=new qn(a),m=1;m<c.length;m++){var p=c[m],g=c[m-1];if(f.countSegment(p,g),f.isOnSegment())return f.getLocation()}return f.getLocation()}};var he=function(){},qo={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};he.prototype.interfaces_=function(){return[]},he.prototype.getClass=function(){return he},he.orientationIndex=function(e,t,n){return gr.orientationIndex(e,t,n)},he.signedArea=function(){if(arguments[0]instanceof Array){var e=arguments[0];if(e.length<3)return 0;for(var t=0,n=e[0].x,i=1;i<e.length-1;i++){var o=e[i].x-n,s=e[i+1].y,a=e[i-1].y;t+=o*(a-s)}return t/2}else if(Me(arguments[0],He)){var c=arguments[0],f=c.size();if(f<3)return 0;var m=new K,p=new K,g=new K;c.getCoordinate(0,p),c.getCoordinate(1,g);var w=p.x;g.x-=w;for(var _=0,y=1;y<f-1;y++)m.y=p.y,p.x=g.x,p.y=g.y,c.getCoordinate(y+1,g),g.x-=w,_+=p.x*(m.y-g.y);return _/2}},he.distanceLineLine=function(e,t,n,i){if(e.equals(t))return he.distancePointLine(e,n,i);if(n.equals(i))return he.distancePointLine(i,e,t);var o=!1;if(!Ee.intersects(e,t,n,i))o=!0;else{var s=(t.x-e.x)*(i.y-n.y)-(t.y-e.y)*(i.x-n.x);if(s===0)o=!0;else{var a=(e.y-n.y)*(i.x-n.x)-(e.x-n.x)*(i.y-n.y),c=(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y),f=c/s,m=a/s;(m<0||m>1||f<0||f>1)&&(o=!0)}}return o?Br.min(he.distancePointLine(e,n,i),he.distancePointLine(t,n,i),he.distancePointLine(n,e,t),he.distancePointLine(i,e,t)):0},he.isPointInRing=function(e,t){return he.locatePointInRing(e,t)!==Q.EXTERIOR},he.computeLength=function(e){var t=e.size();if(t<=1)return 0;var n=0,i=new K;e.getCoordinate(0,i);for(var o=i.x,s=i.y,a=1;a<t;a++){e.getCoordinate(a,i);var c=i.x,f=i.y,m=c-o,p=f-s;n+=Math.sqrt(m*m+p*p),o=c,s=f}return n},he.isCCW=function(e){var t=e.length-1;if(t<3)throw new ct("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=e[0],i=0,o=1;o<=t;o++){var s=e[o];s.y>n.y&&(n=s,i=o)}var a=i;do a=a-1,a<0&&(a=t);while(e[a].equals2D(n)&&a!==i);var c=i;do c=(c+1)%t;while(e[c].equals2D(n)&&c!==i);var f=e[a],m=e[c];if(f.equals2D(n)||m.equals2D(n)||f.equals2D(m))return!1;var p=he.computeOrientation(f,n,m),g=!1;return p===0?g=f.x>m.x:g=p>0,g},he.locatePointInRing=function(e,t){return qn.locatePointInRing(e,t)},he.distancePointLinePerpendicular=function(e,t,n){var i=(n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y),o=((t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y))/i;return Math.abs(o)*Math.sqrt(i)},he.computeOrientation=function(e,t,n){return he.orientationIndex(e,t,n)},he.distancePointLine=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];if(t.length===0)throw new ct("Line array must contain at least one vertex");for(var n=e.distance(t[0]),i=0;i<t.length-1;i++){var o=he.distancePointLine(e,t[i],t[i+1]);o<n&&(n=o)}return n}else if(arguments.length===3){var s=arguments[0],a=arguments[1],c=arguments[2];if(a.x===c.x&&a.y===c.y)return s.distance(a);var f=(c.x-a.x)*(c.x-a.x)+(c.y-a.y)*(c.y-a.y),m=((s.x-a.x)*(c.x-a.x)+(s.y-a.y)*(c.y-a.y))/f;if(m<=0)return s.distance(a);if(m>=1)return s.distance(c);var p=((a.y-s.y)*(c.x-a.x)-(a.x-s.x)*(c.y-a.y))/f;return Math.abs(p)*Math.sqrt(f)}},he.isOnLine=function(e,t){for(var n=new to,i=1;i<t.length;i++){var o=t[i-1],s=t[i];if(n.computeIntersection(e,o,s),n.hasIntersection())return!0}return!1},qo.CLOCKWISE.get=function(){return-1},qo.RIGHT.get=function(){return he.CLOCKWISE},qo.COUNTERCLOCKWISE.get=function(){return 1},qo.LEFT.get=function(){return he.COUNTERCLOCKWISE},qo.COLLINEAR.get=function(){return 0},qo.STRAIGHT.get=function(){return he.COLLINEAR},Object.defineProperties(he,qo);var Ui=function(){};Ui.prototype.filter=function(e){},Ui.prototype.interfaces_=function(){return[]},Ui.prototype.getClass=function(){return Ui};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()},gi={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 n=t;return this.equalsExact(n)}},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 n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,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 ct("This method does not support GeometryCollection arguments")},Oe.prototype.equal=function(e,t,n){return n===0?e.equals(t):e.distance(t)<=n},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 Ee(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 n=e.iterator(),i=t.iterator();n.hasNext()&&i.hasNext();){var o=n.next(),s=i.next(),a=o.compareTo(s);if(a!==0)return a}return n.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[ch,rn,nn]},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},gi.serialVersionUID.get=function(){return 8763622679187377e3},gi.SORTINDEX_POINT.get=function(){return 0},gi.SORTINDEX_MULTIPOINT.get=function(){return 1},gi.SORTINDEX_LINESTRING.get=function(){return 2},gi.SORTINDEX_LINEARRING.get=function(){return 3},gi.SORTINDEX_MULTILINESTRING.get=function(){return 4},gi.SORTINDEX_POLYGON.get=function(){return 5},gi.SORTINDEX_MULTIPOLYGON.get=function(){return 6},gi.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},gi.geometryChangedFilter.get=function(){return kf},Object.defineProperties(Oe,gi);var kf=function(){};kf.interfaces_=function(){return[Ui]},kf.filter=function(e){e.geometryChangedAction()};var vi=function(){};vi.prototype.filter=function(e){},vi.prototype.interfaces_=function(){return[]},vi.prototype.getClass=function(){return vi};var sn=function(){},Wi={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}};sn.prototype.isInBoundary=function(e){},sn.prototype.interfaces_=function(){return[]},sn.prototype.getClass=function(){return sn},Wi.Mod2BoundaryNodeRule.get=function(){return il},Wi.EndPointBoundaryNodeRule.get=function(){return sl},Wi.MultiValentEndPointBoundaryNodeRule.get=function(){return ol},Wi.MonoValentEndPointBoundaryNodeRule.get=function(){return al},Wi.MOD2_BOUNDARY_RULE.get=function(){return new il},Wi.ENDPOINT_BOUNDARY_RULE.get=function(){return new sl},Wi.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new ol},Wi.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new al},Wi.OGC_SFS_BOUNDARY_RULE.get=function(){return sn.MOD2_BOUNDARY_RULE},Object.defineProperties(sn,Wi);var il=function(){};il.prototype.isInBoundary=function(e){return e%2===1},il.prototype.interfaces_=function(){return[sn]},il.prototype.getClass=function(){return il};var sl=function(){};sl.prototype.isInBoundary=function(e){return e>0},sl.prototype.interfaces_=function(){return[sn]},sl.prototype.getClass=function(){return sl};var ol=function(){};ol.prototype.isInBoundary=function(e){return e>1},ol.prototype.interfaces_=function(){return[sn]},ol.prototype.getClass=function(){return ol};var al=function(){};al.prototype.isInBoundary=function(e){return e===1},al.prototype.interfaces_=function(){return[sn]},al.prototype.getClass=function(){return al};var Mt=function(){};Mt.prototype.add=function(){},Mt.prototype.addAll=function(){},Mt.prototype.isEmpty=function(){},Mt.prototype.iterator=function(){},Mt.prototype.size=function(){},Mt.prototype.toArray=function(){},Mt.prototype.remove=function(){};function Gf(r){this.message=r||""}Gf.prototype=new Error,Gf.prototype.name="IndexOutOfBoundsException";var ul=function(){};ul.prototype.hasNext=function(){},ul.prototype.next=function(){},ul.prototype.remove=function(){};var xn=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(Mt);function ll(r){this.message=r||""}ll.prototype=new Error,ll.prototype.name="NoSuchElementException";var ue=function(r){function e(){r.call(this),this.array_=[],arguments[0]instanceof Mt&&this.addAll(arguments[0])}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[r,Mt]},e.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(n){for(var i=this,o=n.iterator();o.hasNext();)i.add(o.next());return!0},e.prototype.set=function(n,i){var o=this.array_[n];return this.array_[n]=i,o},e.prototype.iterator=function(){return new E_(this)},e.prototype.get=function(n){if(n<0||n>=this.size())throw new Gf;return this.array_[n]},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var n=this,i=[],o=0,s=this.array_.length;o<s;o++)i.push(n.array_[o]);return i},e.prototype.remove=function(n){for(var i=this,o=!1,s=0,a=this.array_.length;s<a;s++)if(i.array_[s]===n){i.array_.splice(s,1),o=!0;break}return o},e}(xn),E_=function(r){function e(t){r.call(this),this.arrayList_=t,this.position_=0}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new ll;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(n){return this.arrayList_.set(this.position_-1,n)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(ul),tc=function(r){function e(){if(r.call(this),arguments.length!==0){if(arguments.length===1){var n=arguments[0];this.ensureCapacity(n.length),this.add(n,!0)}else if(arguments.length===2){var i=arguments[0],o=arguments[1];this.ensureCapacity(i.length),this.add(i,o)}}}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.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 o=arguments[0],s=arguments[1],a=!1,c=o.iterator();c.hasNext();)i.add(c.next(),s),a=!0;return a}else return r.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var i=this,o=r.prototype.clone.call(this),s=0;s<this.size();s++)o.add(s,i.get(s).copy());return o},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){var i=this;if(arguments.length===1){var o=arguments[0];r.prototype.add.call(this,o)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var s=arguments[0],a=arguments[1];return this.add(s,a,!0),!0}else if(arguments[0]instanceof K&&typeof arguments[1]=="boolean"){var c=arguments[0],f=arguments[1];if(!f&&this.size()>=1){var m=this.get(this.size()-1);if(m.equals2D(c))return null}r.prototype.add.call(this,c)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var p=arguments[0],g=arguments[1];return this.add(p,g),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var w=arguments[0],_=arguments[1],y=arguments[2];if(y)for(var h=0;h<w.length;h++)i.add(w[h],_);else for(var d=w.length-1;d>=0;d--)i.add(w[d],_);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof K){var u=arguments[0],l=arguments[1],v=arguments[2];if(!v){var b=this.size();if(b>0){if(u>0){var E=this.get(u-1);if(E.equals2D(l))return null}if(u<b){var S=this.get(u);if(S.equals2D(l))return null}}}r.prototype.add.call(this,u,l)}}else if(arguments.length===4){var P=arguments[0],C=arguments[1],x=arguments[2],O=arguments[3],I=1;x>O&&(I=-1);for(var N=x;N!==O;N+=I)i.add(P[N],C);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new K(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,t),e}(ue),ke=function(){},dh={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};dh.ForwardComparator.get=function(){return rc},dh.BidirectionalComparator.get=function(){return cl},dh.coordArrayType.get=function(){return new Array(0).fill(null)},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},ke.isRing=function(e){return!(e.length<4||!e[0].equals2D(e[e.length-1]))},ke.ptNotInList=function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(ke.indexOf(i,t)<0)return i}return null},ke.scroll=function(e,t){var n=ke.indexOf(t,e);if(n<0)return null;var i=new Array(e.length).fill(null);Bt.arraycopy(e,n,i,0,e.length-n),Bt.arraycopy(e,0,i,e.length-n,n),Bt.arraycopy(i,0,e,0,e.length)},ke.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 n=0;n<e.length;n++)if(!e[n].equals(t[n]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],o=arguments[1],s=arguments[2];if(i===o)return!0;if(i===null||o===null||i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(s.compare(i[a],o[a])!==0)return!1;return!0}},ke.intersection=function(e,t){for(var n=new tc,i=0;i<e.length;i++)t.intersects(e[i])&&n.add(e[i],!0);return n.toCoordinateArray()},ke.hasRepeatedPoints=function(e){for(var t=1;t<e.length;t++)if(e[t-1].equals(e[t]))return!0;return!1},ke.removeRepeatedPoints=function(e){if(!ke.hasRepeatedPoints(e))return e;var t=new tc(e,!1);return t.toCoordinateArray()},ke.reverse=function(e){for(var t=e.length-1,n=Math.trunc(t/2),i=0;i<=n;i++){var o=e[i];e[i]=e[t-i],e[t-i]=o}},ke.removeNull=function(e){for(var t=0,n=0;n<e.length;n++)e[n]!==null&&t++;var i=new Array(t).fill(null);if(t===0)return i;for(var o=0,s=0;s<e.length;s++)e[s]!==null&&(i[o++]=e[s]);return i},ke.copyDeep=function(){if(arguments.length===1){for(var e=arguments[0],t=new Array(e.length).fill(null),n=0;n<e.length;n++)t[n]=new K(e[n]);return t}else if(arguments.length===5)for(var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],c=arguments[4],f=0;f<c;f++)s[a+f]=new K(i[o+f])},ke.isEqualReversed=function(e,t){for(var n=0;n<e.length;n++){var i=e[n],o=t[e.length-n-1];if(i.compareTo(o)!==0)return!1}return!0},ke.envelope=function(e){for(var t=new Ee,n=0;n<e.length;n++)t.expandToInclude(e[n]);return t},ke.toCoordinateArray=function(e){return e.toArray(ke.coordArrayType)},ke.atLeastNCoordinatesOrNothing=function(e,t){return t.length>=e?t:[]},ke.indexOf=function(e,t){for(var n=0;n<t.length;n++)if(e.equals(t[n]))return n;return-1},ke.increasingDirection=function(e){for(var t=0;t<Math.trunc(e.length/2);t++){var n=e.length-1-t,i=e[t].compareTo(e[n]);if(i!==0)return i}return 1},ke.compare=function(e,t){for(var n=0;n<e.length&&n<t.length;){var i=e[n].compareTo(t[n]);if(i!==0)return i;n++}return n<t.length?-1:n<e.length?1:0},ke.minCoordinate=function(e){for(var t=null,n=0;n<e.length;n++)(t===null||t.compareTo(e[n])>0)&&(t=e[n]);return t},ke.extract=function(e,t,n){t=Br.clamp(t,0,e.length),n=Br.clamp(n,-1,e.length);var i=n-t+1;n<0&&(i=0),t>=e.length&&(i=0),n<t&&(i=0);var o=new Array(i).fill(null);if(i===0)return o;for(var s=0,a=t;a<=n;a++)o[s++]=e[a];return o},Object.defineProperties(ke,dh);var rc=function(){};rc.prototype.compare=function(e,t){var n=e,i=t;return ke.compare(n,i)},rc.prototype.interfaces_=function(){return[el]},rc.prototype.getClass=function(){return rc};var cl=function(){};cl.prototype.compare=function(e,t){var n=e,i=t;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;var o=ke.compare(n,i),s=ke.isEqualReversed(n,i);return s?0:o},cl.prototype.OLDcompare=function(e,t){var n=e,i=t;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;for(var o=ke.increasingDirection(n),s=ke.increasingDirection(i),a=o>0?0:n.length-1,c=s>0?0:n.length-1,f=0;f<n.length;f++){var m=n[a].compareTo(i[c]);if(m!==0)return m;a+=o,c+=s}return 0},cl.prototype.interfaces_=function(){return[el]},cl.prototype.getClass=function(){return cl};var Ho=function(){};Ho.prototype.get=function(){},Ho.prototype.put=function(){},Ho.prototype.size=function(){},Ho.prototype.values=function(){},Ho.prototype.entrySet=function(){};var P_=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e}(Ho);function nc(r){this.message=r||""}nc.prototype=new Error,nc.prototype.name="OperationNotSupported";function ph(){}ph.prototype=new Mt,ph.prototype.contains=function(){};var Vf=function(r){function e(){r.call(this),this.array_=[],arguments[0]instanceof Mt&&this.addAll(arguments[0])}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.contains=function(n){for(var i=this,o=0,s=this.array_.length;o<s;o++){var a=i.array_[o];if(a===n)return!0}return!1},e.prototype.add=function(n){return this.contains(n)?!1:(this.array_.push(n),!0)},e.prototype.addAll=function(n){for(var i=this,o=n.iterator();o.hasNext();)i.add(o.next());return!0},e.prototype.remove=function(n){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 n=this,i=[],o=0,s=this.array_.length;o<s;o++)i.push(n.array_[o]);return i},e.prototype.iterator=function(){return new S_(this)},e}(ph),S_=function(r){function e(t){r.call(this),this.hashSet_=t,this.position_=0}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new ll;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new nc},e}(ul),qi=0,ro=1;function lg(r){return r===null?qi:r.color}function rt(r){return r===null?null:r.parent}function Hi(r,e){r!==null&&(r.color=e)}function Bf(r){return r===null?null:r.left}function cg(r){return r===null?null:r.right}function Qt(){this.root_=null,this.size_=0}Qt.prototype=new P_,Qt.prototype.get=function(r){for(var e=this.root_;e!==null;){var t=r.compareTo(e.key);if(t<0)e=e.left;else if(t>0)e=e.right;else return e.value}return null},Qt.prototype.put=function(r,e){if(this.root_===null)return this.root_={key:r,value:e,left:null,right:null,parent:null,color:qi,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var t=this.root_,n,i;do if(n=t,i=r.compareTo(t.key),i<0)t=t.left;else if(i>0)t=t.right;else{var o=t.value;return t.value=e,o}while(t!==null);var s={key:r,left:null,right:null,value:e,parent:n,color:qi,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},Qt.prototype.fixAfterInsertion=function(r){var e=this;for(r.color=ro;r!=null&&r!==this.root_&&r.parent.color===ro;)if(rt(r)===Bf(rt(rt(r)))){var t=cg(rt(rt(r)));lg(t)===ro?(Hi(rt(r),qi),Hi(t,qi),Hi(rt(rt(r)),ro),r=rt(rt(r))):(r===cg(rt(r))&&(r=rt(r),e.rotateLeft(r)),Hi(rt(r),qi),Hi(rt(rt(r)),ro),e.rotateRight(rt(rt(r))))}else{var n=Bf(rt(rt(r)));lg(n)===ro?(Hi(rt(r),qi),Hi(n,qi),Hi(rt(rt(r)),ro),r=rt(rt(r))):(r===Bf(rt(r))&&(r=rt(r),e.rotateRight(r)),Hi(rt(r),qi),Hi(rt(rt(r)),ro),e.rotateLeft(rt(rt(r))))}this.root_.color=qi},Qt.prototype.values=function(){var r=new ue,e=this.getFirstEntry();if(e!==null)for(r.add(e.value);(e=Qt.successor(e))!==null;)r.add(e.value);return r},Qt.prototype.entrySet=function(){var r=new Vf,e=this.getFirstEntry();if(e!==null)for(r.add(e);(e=Qt.successor(e))!==null;)r.add(e);return r},Qt.prototype.rotateLeft=function(r){if(r!=null){var e=r.right;r.right=e.left,e.left!=null&&(e.left.parent=r),e.parent=r.parent,r.parent===null?this.root_=e:r.parent.left===r?r.parent.left=e:r.parent.right=e,e.left=r,r.parent=e}},Qt.prototype.rotateRight=function(r){if(r!=null){var e=r.left;r.left=e.right,e.right!=null&&(e.right.parent=r),e.parent=r.parent,r.parent===null?this.root_=e:r.parent.right===r?r.parent.right=e:r.parent.left=e,e.right=r,r.parent=e}},Qt.prototype.getFirstEntry=function(){var r=this.root_;if(r!=null)for(;r.left!=null;)r=r.left;return r},Qt.successor=function(r){if(r===null)return null;if(r.right!==null){for(var e=r.right;e.left!==null;)e=e.left;return e}else{for(var t=r.parent,n=r;t!==null&&n===t.right;)n=t,t=t.parent;return t}},Qt.prototype.size=function(){return this.size_};var ic=function(){};ic.prototype.interfaces_=function(){return[]},ic.prototype.getClass=function(){return ic};function hg(){}hg.prototype=new ph;function Hn(){this.array_=[],arguments[0]instanceof Mt&&this.addAll(arguments[0])}Hn.prototype=new hg,Hn.prototype.contains=function(r){for(var e=this,t=0,n=this.array_.length;t<n;t++){var i=e.array_[t];if(i.compareTo(r)===0)return!0}return!1},Hn.prototype.add=function(r){var e=this;if(this.contains(r))return!1;for(var t=0,n=this.array_.length;t<n;t++){var i=e.array_[t];if(i.compareTo(r)===1)return e.array_.splice(t,0,r),!0}return this.array_.push(r),!0},Hn.prototype.addAll=function(r){for(var e=this,t=r.iterator();t.hasNext();)e.add(t.next());return!0},Hn.prototype.remove=function(r){throw new nc},Hn.prototype.size=function(){return this.array_.length},Hn.prototype.isEmpty=function(){return this.array_.length===0},Hn.prototype.toArray=function(){for(var r=this,e=[],t=0,n=this.array_.length;t<n;t++)e.push(r.array_[t]);return e},Hn.prototype.iterator=function(){return new gh(this)};var gh=function(r){this.treeSet_=r,this.position_=0};gh.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new ll;return this.treeSet_.array_[this.position_++]},gh.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},gh.prototype.remove=function(){throw new nc};var no=function(){};no.sort=function(){var e=arguments[0],t,n,i,o;if(arguments.length===1)o=function(a,c){return a.compareTo(c)},e.sort(o);else if(arguments.length===2)i=arguments[1],o=function(a,c){return i.compare(a,c)},e.sort(o);else if(arguments.length===3){n=e.slice(arguments[1],arguments[2]),n.sort();var s=e.slice(0,arguments[1]).concat(n,e.slice(arguments[2],e.length));for(e.splice(0,e.length),t=0;t<s.length;t++)e.push(s[t])}else if(arguments.length===4)for(n=e.slice(arguments[1],arguments[2]),i=arguments[3],o=function(a,c){return i.compare(a,c)},n.sort(o),s=e.slice(0,arguments[1]).concat(n,e.slice(arguments[2],e.length)),e.splice(0,e.length),t=0;t<s.length;t++)e.push(s[t])},no.asList=function(e){for(var t=new ue,n=0,i=e.length;n<i;n++)t.add(e[n]);return t};var Je=function(){},On={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}};On.P.get=function(){return 0},On.L.get=function(){return 1},On.A.get=function(){return 2},On.FALSE.get=function(){return-1},On.TRUE.get=function(){return-2},On.DONTCARE.get=function(){return-3},On.SYM_FALSE.get=function(){return"F"},On.SYM_TRUE.get=function(){return"T"},On.SYM_DONTCARE.get=function(){return"*"},On.SYM_P.get=function(){return"0"},On.SYM_L.get=function(){return"1"},On.SYM_A.get=function(){return"2"},Je.prototype.interfaces_=function(){return[]},Je.prototype.getClass=function(){return Je},Je.toDimensionSymbol=function(e){switch(e){case Je.FALSE:return Je.SYM_FALSE;case Je.TRUE:return Je.SYM_TRUE;case Je.DONTCARE:return Je.SYM_DONTCARE;case Je.P:return Je.SYM_P;case Je.L:return Je.SYM_L;case Je.A:return Je.SYM_A}throw new ct("Unknown dimension value: "+e)},Je.toDimensionValue=function(e){switch(Zl.toUpperCase(e)){case Je.SYM_FALSE:return Je.FALSE;case Je.SYM_TRUE:return Je.TRUE;case Je.SYM_DONTCARE:return Je.DONTCARE;case Je.SYM_P:return Je.P;case Je.SYM_L:return Je.L;case Je.SYM_A:return Je.A}throw new ct("Unknown dimension symbol: "+e)},Object.defineProperties(Je,On);var Xn=function(){};Xn.prototype.filter=function(e){},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn};var Mn=function(){};Mn.prototype.filter=function(e,t){},Mn.prototype.isDone=function(){},Mn.prototype.isGeometryChanged=function(){},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn};var sr=function(r){function e(n,i){if(r.call(this,i),this._geometries=n||[],r.hasNullElements(this._geometries))throw new ct("geometries must not contain null elements")}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var i=this,o=new Ee,s=0;s<this._geometries.length;s++)o.expandToInclude(i._geometries[s].getEnvelopeInternal());return o},e.prototype.getGeometryN=function(i){return this._geometries[i]},e.prototype.getSortIndex=function(){return r.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var i=this,o=new Array(this.getNumPoints()).fill(null),s=-1,a=0;a<this._geometries.length;a++)for(var c=i._geometries[a].getCoordinates(),f=0;f<c.length;f++)s++,o[s]=c[f];return o},e.prototype.getArea=function(){for(var i=this,o=0,s=0;s<this._geometries.length;s++)o+=i._geometries[s].getArea();return o},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var o=arguments[0],s=arguments[1];if(!this.isEquivalentClass(o))return!1;var a=o;if(this._geometries.length!==a._geometries.length)return!1;for(var c=0;c<this._geometries.length;c++)if(!i._geometries[c].equalsExact(a._geometries[c],s))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var i=this,o=0;o<this._geometries.length;o++)i._geometries[o].normalize();no.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var i=this,o=Je.FALSE,s=0;s<this._geometries.length;s++)o=Math.max(o,i._geometries[s].getBoundaryDimension());return o},e.prototype.getDimension=function(){for(var i=this,o=Je.FALSE,s=0;s<this._geometries.length;s++)o=Math.max(o,i._geometries[s].getDimension());return o},e.prototype.getLength=function(){for(var i=this,o=0,s=0;s<this._geometries.length;s++)o+=i._geometries[s].getLength();return o},e.prototype.getNumPoints=function(){for(var i=this,o=0,s=0;s<this._geometries.length;s++)o+=i._geometries[s].getNumPoints();return o},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var i=this,o=this._geometries.length,s=new Array(o).fill(null),a=0;a<this._geometries.length;a++)s[a]=i._geometries[a].reverse();return this.getFactory().createGeometryCollection(s)},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var o=arguments[0],s=new Hn(no.asList(this._geometries)),a=new Hn(no.asList(o._geometries));return this.compare(s,a)}else if(arguments.length===2){for(var c=arguments[0],f=arguments[1],m=c,p=this.getNumGeometries(),g=m.getNumGeometries(),w=0;w<p&&w<g;){var _=i.getGeometryN(w),y=m.getGeometryN(w),h=_.compareToSameClass(y,f);if(h!==0)return h;w++}return w<p?1:w<g?-1:0}},e.prototype.apply=function(){var i=this;if(Me(arguments[0],vi))for(var o=arguments[0],s=0;s<this._geometries.length;s++)i._geometries[s].apply(o);else if(Me(arguments[0],Mn)){var a=arguments[0];if(this._geometries.length===0)return null;for(var c=0;c<this._geometries.length&&(i._geometries[c].apply(a),!a.isDone());c++);a.isGeometryChanged()&&this.geometryChanged()}else if(Me(arguments[0],Xn)){var f=arguments[0];f.filter(this);for(var m=0;m<this._geometries.length;m++)i._geometries[m].apply(f)}else if(Me(arguments[0],Ui)){var p=arguments[0];p.filter(this);for(var g=0;g<this._geometries.length;g++)i._geometries[g].apply(p)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),Fe.shouldNeverReachHere(),null},e.prototype.clone=function(){var i=this,o=r.prototype.clone.call(this);o._geometries=new Array(this._geometries.length).fill(null);for(var s=0;s<this._geometries.length;s++)o._geometries[s]=i._geometries[s].clone();return o},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var i=this,o=new Array(this._geometries.length).fill(null),s=0;s<o.length;s++)o[s]=i._geometries[s].copy();return new e(o,this._factory)},e.prototype.isEmpty=function(){for(var i=this,o=0;o<this._geometries.length;o++)if(!i._geometries[o].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),io=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.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],o=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,o):!1}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Je.FALSE:0},e.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var o=0;o<this._geometries.length;o++)if(!i._geometries[o].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var i=this,o=this._geometries.length,s=new Array(o).fill(null),a=0;a<this._geometries.length;a++)s[o-1-a]=i._geometries[a].reverse();return this.getFactory().createMultiLineString(s)},e.prototype.getBoundary=function(){return new on(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var i=this,o=new Array(this._geometries.length).fill(null),s=0;s<o.length;s++)o[s]=i._geometries[s].copy();return new e(o,this._factory)},e.prototype.interfaces_=function(){return[ic]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(e,t),e}(sr),on=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var e=arguments[0],t=sn.MOD2_BOUNDARY_RULE;this._geom=e,this._geomFact=e.getFactory(),this._bnRule=t}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};on.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)},on.prototype.getBoundary=function(){return this._geom instanceof vt?this.boundaryLineString(this._geom):this._geom instanceof io?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},on.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()])},on.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},on.prototype.computeBoundaryCoordinates=function(e){var t=this,n=new ue;this._endpointMap=new Qt;for(var i=0;i<e.getNumGeometries();i++){var o=e.getGeometryN(i);o.getNumPoints()!==0&&(t.addEndpoint(o.getCoordinateN(0)),t.addEndpoint(o.getCoordinateN(o.getNumPoints()-1)))}for(var s=this._endpointMap.entrySet().iterator();s.hasNext();){var a=s.next(),c=a.getValue(),f=c.count;t._bnRule.isInBoundary(f)&&n.add(a.getKey())}return ke.toCoordinateArray(n)},on.prototype.addEndpoint=function(e){var t=this._endpointMap.get(e);t===null&&(t=new vh,this._endpointMap.put(e,t)),t.count++},on.prototype.interfaces_=function(){return[]},on.prototype.getClass=function(){return on},on.getBoundary=function(){if(arguments.length===1){var e=arguments[0],t=new on(e);return t.getBoundary()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],o=new on(n,i);return o.getBoundary()}};var vh=function(){this.count=null};vh.prototype.interfaces_=function(){return[]},vh.prototype.getClass=function(){return vh};function C_(){}function x_(){}var O_=function(){};function M_(){}function I_(){}function T_(){}var an=function(){},zf={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};an.prototype.interfaces_=function(){return[]},an.prototype.getClass=function(){return an},an.chars=function(e,t){for(var n=new Array(t).fill(null),i=0;i<t;i++)n[i]=e;return String(n)},an.getStackTrace=function(){if(arguments.length===1){var e=arguments[0],t=new M_,n=new C_;return e.printStackTrace(n),t.toString()}else if(arguments.length===2){var i=arguments[0],o=arguments[1],s="";new x_(an.getStackTrace(i));for(var a=new T_,c=0;c<o;c++)try{s+=a.readLine()+an.NEWLINE}catch(f){if(f instanceof I_)Fe.shouldNeverReachHere();else throw f}finally{}return s}},an.split=function(e,t){for(var n=t.length,i=new ue,o=""+e,s=o.indexOf(t);s>=0;){var a=o.substring(0,s);i.add(a),o=o.substring(s+n),s=o.indexOf(t)}o.length>0&&i.add(o);for(var c=new Array(i.size()).fill(null),f=0;f<c.length;f++)c[f]=i.get(f);return c},an.toString=function(){if(arguments.length===1){var e=arguments[0];return an.SIMPLE_ORDINATE_FORMAT.format(e)}},an.spaces=function(e){return an.chars(" ",e)},zf.NEWLINE.get=function(){return Bt.getProperty("line.separator")},zf.SIMPLE_ORDINATE_FORMAT.get=function(){return new O_},Object.defineProperties(an,zf);var bt=function(){};bt.prototype.interfaces_=function(){return[]},bt.prototype.getClass=function(){return bt},bt.copyCoord=function(e,t,n,i){for(var o=Math.min(e.getDimension(),n.getDimension()),s=0;s<o;s++)n.setOrdinate(i,s,e.getOrdinate(t,s))},bt.isRing=function(e){var t=e.size();return t===0?!0:t<=3?!1:e.getOrdinate(0,He.X)===e.getOrdinate(t-1,He.X)&&e.getOrdinate(0,He.Y)===e.getOrdinate(t-1,He.Y)},bt.isEqual=function(e,t){var n=e.size(),i=t.size();if(n!==i)return!1;for(var o=Math.min(e.getDimension(),t.getDimension()),s=0;s<n;s++)for(var a=0;a<o;a++){var c=e.getOrdinate(s,a),f=t.getOrdinate(s,a);if(e.getOrdinate(s,a)!==t.getOrdinate(s,a)&&!(De.isNaN(c)&&De.isNaN(f)))return!1}return!0},bt.extend=function(e,t,n){var i=e.create(n,t.getDimension()),o=t.size();if(bt.copy(t,0,i,0,o),o>0)for(var s=o;s<n;s++)bt.copy(t,o-1,i,s,1);return i},bt.reverse=function(e){for(var t=e.size()-1,n=Math.trunc(t/2),i=0;i<=n;i++)bt.swap(e,i,t-i)},bt.swap=function(e,t,n){if(t===n)return null;for(var i=0;i<e.getDimension();i++){var o=e.getOrdinate(t,i);e.setOrdinate(t,i,e.getOrdinate(n,i)),e.setOrdinate(n,i,o)}},bt.copy=function(e,t,n,i,o){for(var s=0;s<o;s++)bt.copyCoord(e,t+s,n,i+s)},bt.toString=function(){if(arguments.length===1){var e=arguments[0],t=e.size();if(t===0)return"()";var n=e.getDimension(),i=new zn;i.append("(");for(var o=0;o<t;o++){o>0&&i.append(" ");for(var s=0;s<n;s++)s>0&&i.append(","),i.append(an.toString(e.getOrdinate(o,s)))}return i.append(")"),i.toString()}},bt.ensureValidRing=function(e,t){var n=t.size();if(n===0)return t;if(n<=3)return bt.createClosedRing(e,t,4);var i=t.getOrdinate(0,He.X)===t.getOrdinate(n-1,He.X)&&t.getOrdinate(0,He.Y)===t.getOrdinate(n-1,He.Y);return i?t:bt.createClosedRing(e,t,n+1)},bt.createClosedRing=function(e,t,n){var i=e.create(n,t.getDimension()),o=t.size();bt.copy(t,0,i,0,o);for(var s=o;s<n;s++)bt.copy(t,0,i,s,1);return i};var vt=function(r){function e(n,i){r.call(this,i),this._points=null,this.init(n)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new Ee:this._points.expandEnvelope(new Ee)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return r.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var o=arguments[0],s=arguments[1];if(!this.isEquivalentClass(o))return!1;var a=o;if(this._points.size()!==a._points.size())return!1;for(var c=0;c<this._points.size();c++)if(!i.equal(i._points.getCoordinate(c),a._points.getCoordinate(c),s))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var i=this,o=0;o<Math.trunc(this._points.size()/2);o++){var s=i._points.size()-1-o;if(!i._points.getCoordinate(o).equals(i._points.getCoordinate(s)))return i._points.getCoordinate(o).compareTo(i._points.getCoordinate(s))>0&&bt.reverse(i._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Je.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 he.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var i=this._points.copy();bt.reverse(i);var o=this.getFactory().createLineString(i);return o},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var o=arguments[0],s=o,a=0,c=0;a<this._points.size()&&c<s._points.size();){var f=i._points.getCoordinate(a).compareTo(s._points.getCoordinate(c));if(f!==0)return f;a++,c++}return a<this._points.size()?1:c<s._points.size()?-1:0}else if(arguments.length===2){var m=arguments[0],p=arguments[1],g=m;return p.compare(this._points,g._points)}},e.prototype.apply=function(){var i=this;if(Me(arguments[0],vi))for(var o=arguments[0],s=0;s<this._points.size();s++)o.filter(i._points.getCoordinate(s));else if(Me(arguments[0],Mn)){var a=arguments[0];if(this._points.size()===0)return null;for(var c=0;c<this._points.size()&&(a.filter(i._points,c),!a.isDone());c++);a.isGeometryChanged()&&this.geometryChanged()}else if(Me(arguments[0],Xn)){var f=arguments[0];f.filter(this)}else if(Me(arguments[0],Ui)){var m=arguments[0];m.filter(this)}},e.prototype.getBoundary=function(){return new on(this).getBoundary()},e.prototype.isEquivalentClass=function(i){return i instanceof e},e.prototype.clone=function(){var i=r.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 ct("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},e.prototype.isCoordinate=function(i){for(var o=this,s=0;s<this._points.size();s++)if(o._points.getCoordinate(s).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[ic]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,t),e}(Oe),sc=function(){};sc.prototype.interfaces_=function(){return[]},sc.prototype.getClass=function(){return sc};var Nr=function(r){function e(n,i){r.call(this,i),this._coordinates=n||null,this.init(this._coordinates)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new Ee;var i=new Ee;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},e.prototype.getSortIndex=function(){return r.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],o=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),o):!1}else return r.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 Je.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],o=i;return this.getCoordinate().compareTo(o.getCoordinate())}else if(arguments.length===2){var s=arguments[0],a=arguments[1],c=s;return a.compare(this._coordinates,c._coordinates)}},e.prototype.apply=function(){if(Me(arguments[0],vi)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(Me(arguments[0],Mn)){var o=arguments[0];if(this.isEmpty())return null;o.filter(this._coordinates,0),o.isGeometryChanged()&&this.geometryChanged()}else if(Me(arguments[0],Xn)){var s=arguments[0];s.filter(this)}else if(Me(arguments[0],Ui)){var a=arguments[0];a.filter(this)}},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var i=r.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[sc]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(e,t),e}(Oe),Es=function(){};Es.prototype.interfaces_=function(){return[]},Es.prototype.getClass=function(){return Es};var It=function(r){function e(n,i,o){if(r.call(this,o),this._shell=null,this._holes=null,n===null&&(n=this.getFactory().createLinearRing()),i===null&&(i=[]),r.hasNullElements(i))throw new ct("holes must not contain null elements");if(n.isEmpty()&&r.hasNonEmptyElements(i))throw new ct("shell is empty but holes are not");this._shell=n,this._holes=i}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return r.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var o=new Array(this.getNumPoints()).fill(null),s=-1,a=this._shell.getCoordinates(),c=0;c<a.length;c++)s++,o[s]=a[c];for(var f=0;f<this._holes.length;f++)for(var m=i._holes[f].getCoordinates(),p=0;p<m.length;p++)s++,o[s]=m[p];return o},e.prototype.getArea=function(){var i=this,o=0;o+=Math.abs(he.signedArea(this._shell.getCoordinateSequence()));for(var s=0;s<this._holes.length;s++)o-=Math.abs(he.signedArea(i._holes[s].getCoordinateSequence()));return o},e.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),o=this.getEnvelopeInternal(),s=0;s<5;s++){var a=i.getX(s);if(!(a===o.getMinX()||a===o.getMaxX()))return!1;var c=i.getY(s);if(!(c===o.getMinY()||c===o.getMaxY()))return!1}for(var f=i.getX(0),m=i.getY(0),p=1;p<=4;p++){var g=i.getX(p),w=i.getY(p),_=g!==f,y=w!==m;if(_===y)return!1;f=g,m=w}return!0},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var o=arguments[0],s=arguments[1];if(!this.isEquivalentClass(o))return!1;var a=o,c=this._shell,f=a._shell;if(!c.equalsExact(f,s)||this._holes.length!==a._holes.length)return!1;for(var m=0;m<this._holes.length;m++)if(!i._holes[m].equalsExact(a._holes[m],s))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var o=0;o<this._holes.length;o++)i.normalize(i._holes[o],!1);no.sort(this._holes)}else if(arguments.length===2){var s=arguments[0],a=arguments[1];if(s.isEmpty())return null;var c=new Array(s.getCoordinates().length-1).fill(null);Bt.arraycopy(s.getCoordinates(),0,c,0,c.length);var f=ke.minCoordinate(s.getCoordinates());ke.scroll(c,f),Bt.arraycopy(c,0,s.getCoordinates(),0,c.length),s.getCoordinates()[c.length]=c[0],he.isCCW(s.getCoordinates())===a&&ke.reverse(s.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,o=0;o+=this._shell.getLength();for(var s=0;s<this._holes.length;s++)o+=i._holes[s].getLength();return o},e.prototype.getNumPoints=function(){for(var i=this,o=this._shell.getNumPoints(),s=0;s<this._holes.length;s++)o+=i._holes[s].getNumPoints();return o},e.prototype.reverse=function(){var i=this,o=this.copy();o._shell=this._shell.copy().reverse(),o._holes=new Array(this._holes.length).fill(null);for(var s=0;s<this._holes.length;s++)o._holes[s]=i._holes[s].copy().reverse();return o},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var o=arguments[0],s=this._shell,a=o._shell;return s.compareToSameClass(a)}else if(arguments.length===2){var c=arguments[0],f=arguments[1],m=c,p=this._shell,g=m._shell,w=p.compareToSameClass(g,f);if(w!==0)return w;for(var _=this.getNumInteriorRing(),y=m.getNumInteriorRing(),h=0;h<_&&h<y;){var d=i.getInteriorRingN(h),u=m.getInteriorRingN(h),l=d.compareToSameClass(u,f);if(l!==0)return l;h++}return h<_?1:h<y?-1:0}},e.prototype.apply=function(i){var o=this;if(Me(i,vi)){this._shell.apply(i);for(var s=0;s<this._holes.length;s++)o._holes[s].apply(i)}else if(Me(i,Mn)){if(this._shell.apply(i),!i.isDone())for(var a=0;a<this._holes.length&&(o._holes[a].apply(i),!i.isDone());a++);i.isGeometryChanged()&&this.geometryChanged()}else if(Me(i,Xn))i.filter(this);else if(Me(i,Ui)){i.filter(this),this._shell.apply(i);for(var c=0;c<this._holes.length;c++)o._holes[c].apply(i)}},e.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var o=new Array(this._holes.length+1).fill(null);o[0]=this._shell;for(var s=0;s<this._holes.length;s++)o[s+1]=i._holes[s];return o.length<=1?this.getFactory().createLinearRing(o[0].getCoordinateSequence()):this.getFactory().createMultiLineString(o)},e.prototype.clone=function(){var i=this,o=r.prototype.clone.call(this);o._shell=this._shell.clone(),o._holes=new Array(this._holes.length).fill(null);for(var s=0;s<this._holes.length;s++)o._holes[s]=i._holes[s].clone();return o},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var i=this,o=this._shell.copy(),s=new Array(this._holes.length).fill(null),a=0;a<s.length;a++)s[a]=i._holes[a].copy();return new e(o,s,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[Es]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,t),e}(Oe),hl=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.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],o=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,o):!1}else return r.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return r.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return Je.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,o=new Array(this._geometries.length).fill(null),s=0;s<o.length;s++)o[s]=i._geometries[s].copy();return new e(o,this._factory)},e.prototype.interfaces_=function(){return[sc]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(e,t),e}(sr),yi=function(r){function e(n,i){n instanceof K&&i instanceof Ge&&(n=i.getCoordinateSequenceFactory().create(n)),r.call(this,n,i),this.validateConstruction()}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.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 Je.FALSE},e.prototype.isClosed=function(){return this.isEmpty()?!0:r.prototype.isClosed.call(this)},e.prototype.reverse=function(){var i=this._points.copy();bt.reverse(i);var o=this.getFactory().createLinearRing(i);return o},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!r.prototype.isClosed.call(this))throw new ct("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new ct("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}(vt),mi=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.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],o=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,o):!1}else return r.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,o=this._geometries.length,s=new Array(o).fill(null),a=0;a<this._geometries.length;a++)s[a]=i._geometries[a].reverse();return this.getFactory().createMultiPolygon(s)},e.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var o=new ue,s=0;s<this._geometries.length;s++)for(var a=i._geometries[s],c=a.getBoundary(),f=0;f<c.getNumGeometries();f++)o.add(c.getGeometryN(f));var m=new Array(o.size()).fill(null);return this.getFactory().createMultiLineString(o.toArray(m))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var i=this,o=new Array(this._geometries.length).fill(null),s=0;s<o.length;s++)o[s]=i._geometries[s].copy();return new e(o,this._factory)},e.prototype.interfaces_=function(){return[Es]},e.prototype.getClass=function(){return e},t.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,t),e}(sr),un=function(e){this._factory=e||null,this._isUserDataCopied=!1},yh={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};un.prototype.setCopyUserData=function(e){this._isUserDataCopied=e},un.prototype.edit=function(e,t){if(e===null)return null;var n=this.editInternal(e,t);return this._isUserDataCopied&&n.setUserData(e.getUserData()),n},un.prototype.editInternal=function(e,t){return this._factory===null&&(this._factory=e.getFactory()),e instanceof sr?this.editGeometryCollection(e,t):e instanceof It?this.editPolygon(e,t):e instanceof Nr?t.edit(e,this._factory):e instanceof vt?t.edit(e,this._factory):(Fe.shouldNeverReachHere("Unsupported Geometry class: "+e.getClass().getName()),null)},un.prototype.editGeometryCollection=function(e,t){for(var n=this,i=t.edit(e,this._factory),o=new ue,s=0;s<i.getNumGeometries();s++){var a=n.edit(i.getGeometryN(s),t);a===null||a.isEmpty()||o.add(a)}return i.getClass()===hl?this._factory.createMultiPoint(o.toArray([])):i.getClass()===io?this._factory.createMultiLineString(o.toArray([])):i.getClass()===mi?this._factory.createMultiPolygon(o.toArray([])):this._factory.createGeometryCollection(o.toArray([]))},un.prototype.editPolygon=function(e,t){var n=this,i=t.edit(e,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var o=this.edit(i.getExteriorRing(),t);if(o===null||o.isEmpty())return this._factory.createPolygon();for(var s=new ue,a=0;a<i.getNumInteriorRing();a++){var c=n.edit(i.getInteriorRingN(a),t);c===null||c.isEmpty()||s.add(c)}return this._factory.createPolygon(o,s.toArray([]))},un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.GeometryEditorOperation=function(){},yh.NoOpGeometryOperation.get=function(){return oc},yh.CoordinateOperation.get=function(){return ac},yh.CoordinateSequenceOperation.get=function(){return uc},Object.defineProperties(un,yh);var oc=function(){};oc.prototype.edit=function(e,t){return e},oc.prototype.interfaces_=function(){return[un.GeometryEditorOperation]},oc.prototype.getClass=function(){return oc};var ac=function(){};ac.prototype.edit=function(e,t){var n=this.editCoordinates(e.getCoordinates(),e);return n===null?e:e instanceof yi?t.createLinearRing(n):e instanceof vt?t.createLineString(n):e instanceof Nr?n.length>0?t.createPoint(n[0]):t.createPoint():e},ac.prototype.interfaces_=function(){return[un.GeometryEditorOperation]},ac.prototype.getClass=function(){return ac};var uc=function(){};uc.prototype.edit=function(e,t){return e instanceof yi?t.createLinearRing(this.edit(e.getCoordinateSequence(),e)):e instanceof vt?t.createLineString(this.edit(e.getCoordinateSequence(),e)):e instanceof Nr?t.createPoint(this.edit(e.getCoordinateSequence(),e)):e},uc.prototype.interfaces_=function(){return[un.GeometryEditorOperation]},uc.prototype.getClass=function(){return uc};var wt=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 n=0;n<t;n++)e._coordinates[n]=new K}else if(Me(arguments[0],He)){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 o=0;o<this._coordinates.length;o++)e._coordinates[o]=i.getCoordinateCopy(o)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var s=arguments[0],a=arguments[1];this._coordinates=s,this._dimension=a,s===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var c=arguments[0],f=arguments[1];this._coordinates=new Array(c).fill(null),this._dimension=f;for(var m=0;m<c;m++)e._coordinates[m]=new K}}},fg={serialVersionUID:{configurable:!0}};wt.prototype.setOrdinate=function(e,t,n){switch(t){case He.X:this._coordinates[e].x=n;break;case He.Y:this._coordinates[e].y=n;break;case He.Z:this._coordinates[e].z=n;break;default:throw new ct("invalid ordinateIndex")}},wt.prototype.size=function(){return this._coordinates.length},wt.prototype.getOrdinate=function(e,t){switch(t){case He.X:return this._coordinates[e].x;case He.Y:return this._coordinates[e].y;case He.Z:return this._coordinates[e].z}return De.NaN},wt.prototype.getCoordinate=function(){if(arguments.length===1){var e=arguments[0];return this._coordinates[e]}else if(arguments.length===2){var t=arguments[0],n=arguments[1];n.x=this._coordinates[t].x,n.y=this._coordinates[t].y,n.z=this._coordinates[t].z}},wt.prototype.getCoordinateCopy=function(e){return new K(this._coordinates[e])},wt.prototype.getDimension=function(){return this._dimension},wt.prototype.getX=function(e){return this._coordinates[e].x},wt.prototype.clone=function(){for(var e=this,t=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)t[n]=e._coordinates[n].clone();return new wt(t,this._dimension)},wt.prototype.expandEnvelope=function(e){for(var t=this,n=0;n<this._coordinates.length;n++)e.expandToInclude(t._coordinates[n]);return e},wt.prototype.copy=function(){for(var e=this,t=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)t[n]=e._coordinates[n].copy();return new wt(t,this._dimension)},wt.prototype.toString=function(){var e=this;if(this._coordinates.length>0){var t=new zn(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var n=1;n<this._coordinates.length;n++)t.append(", "),t.append(e._coordinates[n]);return t.append(")"),t.toString()}else return"()"},wt.prototype.getY=function(e){return this._coordinates[e].y},wt.prototype.toCoordinateArray=function(){return this._coordinates},wt.prototype.interfaces_=function(){return[He,nn]},wt.prototype.getClass=function(){return wt},fg.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(wt,fg);var _i=function(){},Uf={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};_i.prototype.readResolve=function(){return _i.instance()},_i.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new wt(e)}else if(Me(arguments[0],He)){var t=arguments[0];return new wt(t)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new wt(n):new wt(n,i)}},_i.prototype.interfaces_=function(){return[tl,nn]},_i.prototype.getClass=function(){return _i},_i.instance=function(){return _i.instanceObject},Uf.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},Uf.instanceObject.get=function(){return new _i},Object.defineProperties(_i,Uf);var dg=function(r){function e(){r.call(this),this.map_=new Map}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(n){return this.map_.get(n)||null},e.prototype.put=function(n,i){return this.map_.set(n,i),i},e.prototype.values=function(){for(var n=new ue,i=this.map_.values(),o=i.next();!o.done;)n.add(o.value),o=i.next();return n},e.prototype.entrySet=function(){var n=new Vf;return this.map_.entries().forEach(function(i){return n.add(i)}),n},e.prototype.size=function(){return this.map_.size()},e}(Ho),Ke=function r(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=r.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Yn){var e=arguments[0];this._modelType=e,e===r.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var t=arguments[0];this._modelType=r.FIXED,this.setScale(t)}else if(arguments[0]instanceof r){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}}},Wf={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Ke.prototype.equals=function(e){if(!(e instanceof Ke))return!1;var t=e;return this._modelType===t._modelType&&this._scale===t._scale},Ke.prototype.compareTo=function(e){var t=e,n=this.getMaximumSignificantDigits(),i=t.getMaximumSignificantDigits();return new Un(n).compareTo(new Un(i))},Ke.prototype.getScale=function(){return this._scale},Ke.prototype.isFloating=function(){return this._modelType===Ke.FLOATING||this._modelType===Ke.FLOATING_SINGLE},Ke.prototype.getType=function(){return this._modelType},Ke.prototype.toString=function(){var e="UNKNOWN";return this._modelType===Ke.FLOATING?e="Floating":this._modelType===Ke.FLOATING_SINGLE?e="Floating-Single":this._modelType===Ke.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e},Ke.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var e=arguments[0];if(De.isNaN(e))return e;if(this._modelType===Ke.FLOATING_SINGLE){var t=e;return t}return this._modelType===Ke.FIXED?Math.round(e*this._scale)/this._scale:e}else if(arguments[0]instanceof K){var n=arguments[0];if(this._modelType===Ke.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}},Ke.prototype.getMaximumSignificantDigits=function(){var e=16;return this._modelType===Ke.FLOATING?e=16:this._modelType===Ke.FLOATING_SINGLE?e=6:this._modelType===Ke.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e},Ke.prototype.setScale=function(e){this._scale=Math.abs(e)},Ke.prototype.interfaces_=function(){return[nn,rn]},Ke.prototype.getClass=function(){return Ke},Ke.mostPrecise=function(e,t){return e.compareTo(t)>=0?e:t},Wf.serialVersionUID.get=function(){return 7777263578777804e3},Wf.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Ke,Wf);var Yn=function r(e){this._name=e||null,r.nameToTypeMap.put(e,this)},qf={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Yn.prototype.readResolve=function(){return Yn.nameToTypeMap.get(this._name)},Yn.prototype.toString=function(){return this._name},Yn.prototype.interfaces_=function(){return[nn]},Yn.prototype.getClass=function(){return Yn},qf.serialVersionUID.get=function(){return-552860263173159e4},qf.nameToTypeMap.get=function(){return new dg},Object.defineProperties(Yn,qf),Ke.Type=Yn,Ke.FIXED=new Yn("FIXED"),Ke.FLOATING=new Yn("FLOATING"),Ke.FLOATING_SINGLE=new Yn("FLOATING SINGLE");var Ge=function r(){this._precisionModel=new Ke,this._SRID=0,this._coordinateSequenceFactory=r.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?Me(arguments[0],tl)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Ke&&(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]))},pg={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 K(e.getMinX(),e.getMinY())):e.getMinX()===e.getMaxX()||e.getMinY()===e.getMaxY()?this.createLineString([new K(e.getMinX(),e.getMinY()),new K(e.getMaxX(),e.getMaxY())]):this.createPolygon(this.createLinearRing([new K(e.getMinX(),e.getMinY()),new K(e.getMinX(),e.getMaxY()),new K(e.getMaxX(),e.getMaxY()),new K(e.getMaxX(),e.getMinY()),new K(e.getMinX(),e.getMinY())]),null)},Ge.prototype.createLineString=function(e){if(e){if(e instanceof Array)return new vt(this.getCoordinateSequenceFactory().create(e),this);if(Me(e,He))return new vt(e,this)}else return new vt(this.getCoordinateSequenceFactory().create([]),this)},Ge.prototype.createMultiLineString=function(){if(arguments.length===0)return new io(null,this);if(arguments.length===1){var e=arguments[0];return new io(e,this)}},Ge.prototype.buildGeometry=function(e){for(var t=null,n=!1,i=!1,o=e.iterator();o.hasNext();){var s=o.next(),a=s.getClass();t===null&&(t=a),a!==t&&(n=!0),s.isGeometryCollectionOrDerived()&&(i=!0)}if(t===null)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(Ge.toGeometryArray(e));var c=e.iterator().next(),f=e.size()>1;if(f){if(c instanceof It)return this.createMultiPolygon(Ge.toPolygonArray(e));if(c instanceof vt)return this.createMultiLineString(Ge.toLineStringArray(e));if(c instanceof Nr)return this.createMultiPoint(Ge.toPointArray(e));Fe.shouldNeverReachHere("Unhandled class: "+c.getClass().getName())}return c},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 K){var e=arguments[0];return this.createPoint(e!==null?this.getCoordinateSequenceFactory().create([e]):null)}else if(Me(arguments[0],He)){var t=arguments[0];return new Nr(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(Me(arguments[0],He)){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 yi){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var i=arguments[0],o=arguments[1];return new It(i,o,this)}},Ge.prototype.getSRID=function(){return this._SRID},Ge.prototype.createGeometryCollection=function(){if(arguments.length===0)return new sr(null,this);if(arguments.length===1){var e=arguments[0];return new sr(e,this)}},Ge.prototype.createGeometry=function(e){var t=new un(this);return t.edit(e,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})},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(Me(arguments[0],He)){var t=arguments[0];return new yi(t,this)}}},Ge.prototype.createMultiPolygon=function(){if(arguments.length===0)return new mi(null,this);if(arguments.length===1){var e=arguments[0];return new mi(e,this)}},Ge.prototype.createMultiPoint=function(){var e=this;if(arguments.length===0)return new hl(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new hl(t,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(Me(arguments[0],He)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var o=new Array(i.size()).fill(null),s=0;s<i.size();s++){var a=e.getCoordinateSequenceFactory().create(1,i.getDimension());bt.copy(i,s,a,0,1),o[s]=e.createPoint(a)}return this.createMultiPoint(o)}}},Ge.prototype.interfaces_=function(){return[nn]},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 _i.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)},pg.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(Ge,pg);var N_=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],mh=function(e){this.geometryFactory=e||new Ge};mh.prototype.read=function(e){var t;typeof e=="string"?t=JSON.parse(e):t=e;var n=t.type;if(!Jn[n])throw new Error("Unknown GeoJSON type: "+t.type);return N_.indexOf(n)!==-1?Jn[n].apply(this,[t.coordinates]):n==="GeometryCollection"?Jn[n].apply(this,[t.geometries]):Jn[n].apply(this,[t])},mh.prototype.write=function(e){var t=e.getGeometryType();if(!Xi[t])throw new Error("Geometry is not supported");return Xi[t].apply(this,[e])};var Jn={Feature:function(r){var e={};for(var t in r)e[t]=r[t];if(r.geometry){var n=r.geometry.type;if(!Jn[n])throw new Error("Unknown GeoJSON type: "+r.type);e.geometry=this.read(r.geometry)}return r.bbox&&(e.bbox=Jn.bbox.apply(this,[r.bbox])),e},FeatureCollection:function(r){var e=this,t={};if(r.features){t.features=[];for(var n=0;n<r.features.length;++n)t.features.push(e.read(r.features[n]))}return r.bbox&&(t.bbox=this.parse.bbox.apply(this,[r.bbox])),t},coordinates:function(r){for(var e=[],t=0;t<r.length;++t){var n=r[t];e.push(new K(n[0],n[1]))}return e},bbox:function(r){return this.geometryFactory.createLinearRing([new K(r[0],r[1]),new K(r[2],r[1]),new K(r[2],r[3]),new K(r[0],r[3]),new K(r[0],r[1])])},Point:function(r){var e=new K(r[0],r[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(r){for(var e=this,t=[],n=0;n<r.length;++n)t.push(Jn.Point.apply(e,[r[n]]));return this.geometryFactory.createMultiPoint(t)},LineString:function(r){var e=Jn.coordinates.apply(this,[r]);return this.geometryFactory.createLineString(e)},MultiLineString:function(r){for(var e=this,t=[],n=0;n<r.length;++n)t.push(Jn.LineString.apply(e,[r[n]]));return this.geometryFactory.createMultiLineString(t)},Polygon:function(r){for(var e=this,t=Jn.coordinates.apply(this,[r[0]]),n=this.geometryFactory.createLinearRing(t),i=[],o=1;o<r.length;++o){var s=r[o],a=Jn.coordinates.apply(e,[s]),c=e.geometryFactory.createLinearRing(a);i.push(c)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(r){for(var e=this,t=[],n=0;n<r.length;++n){var i=r[n];t.push(Jn.Polygon.apply(e,[i]))}return this.geometryFactory.createMultiPolygon(t)},GeometryCollection:function(r){for(var e=this,t=[],n=0;n<r.length;++n){var i=r[n];t.push(e.read(i))}return this.geometryFactory.createGeometryCollection(t)}},Xi={coordinate:function(r){return[r.x,r.y]},Point:function(r){var e=Xi.coordinate.apply(this,[r.getCoordinate()]);return{type:"Point",coordinates:e}},MultiPoint:function(r){for(var e=this,t=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],o=Xi.Point.apply(e,[i]);t.push(o.coordinates)}return{type:"MultiPoint",coordinates:t}},LineString:function(r){for(var e=this,t=[],n=r.getCoordinates(),i=0;i<n.length;++i){var o=n[i];t.push(Xi.coordinate.apply(e,[o]))}return{type:"LineString",coordinates:t}},MultiLineString:function(r){for(var e=this,t=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],o=Xi.LineString.apply(e,[i]);t.push(o.coordinates)}return{type:"MultiLineString",coordinates:t}},Polygon:function(r){var e=this,t=[],n=Xi.LineString.apply(this,[r._shell]);t.push(n.coordinates);for(var i=0;i<r._holes.length;++i){var o=r._holes[i],s=Xi.LineString.apply(e,[o]);t.push(s.coordinates)}return{type:"Polygon",coordinates:t}},MultiPolygon:function(r){for(var e=this,t=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],o=Xi.Polygon.apply(e,[i]);t.push(o.coordinates)}return{type:"MultiPolygon",coordinates:t}},GeometryCollection:function(r){for(var e=this,t=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],o=i.getGeometryType();t.push(Xi[o].apply(e,[i]))}return{type:"GeometryCollection",geometries:t}}},Hf=function(e){this.geometryFactory=e||new Ge,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new mh(this.geometryFactory)};Hf.prototype.read=function(e){var t=this.parser.read(e);return this.precisionModel.getType()===Ke.FIXED&&this.reducePrecision(t),t},Hf.prototype.reducePrecision=function(e){var t=this,n,i;if(e.coordinate)this.precisionModel.makePrecise(e.coordinate);else if(e.points)for(n=0,i=e.points.length;n<i;n++)t.precisionModel.makePrecise(e.points[n]);else if(e.geometries)for(n=0,i=e.geometries.length;n<i;n++)t.reducePrecision(e.geometries[n])};var gg=function(){this.parser=new mh(this.geometryFactory)};gg.prototype.write=function(e){return this.parser.write(e)};var ie=function(){},_h={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};ie.prototype.interfaces_=function(){return[]},ie.prototype.getClass=function(){return ie},ie.opposite=function(e){return e===ie.LEFT?ie.RIGHT:e===ie.RIGHT?ie.LEFT:e},_h.ON.get=function(){return 0},_h.LEFT.get=function(){return 1},_h.RIGHT.get=function(){return 2},Object.defineProperties(ie,_h);function bh(r){this.message=r||""}bh.prototype=new Error,bh.prototype.name="EmptyStackException";function Kn(){this.array_=[]}Kn.prototype=new xn,Kn.prototype.add=function(r){return this.array_.push(r),!0},Kn.prototype.get=function(r){if(r<0||r>=this.size())throw new Error;return this.array_[r]},Kn.prototype.push=function(r){return this.array_.push(r),r},Kn.prototype.pop=function(r){if(this.array_.length===0)throw new bh;return this.array_.pop()},Kn.prototype.peek=function(){if(this.array_.length===0)throw new bh;return this.array_[this.array_.length-1]},Kn.prototype.empty=function(){return this.array_.length===0},Kn.prototype.isEmpty=function(){return this.empty()},Kn.prototype.search=function(r){return this.array_.indexOf(r)},Kn.prototype.size=function(){return this.array_.length},Kn.prototype.toArray=function(){for(var r=this,e=[],t=0,n=this.array_.length;t<n;t++)e.push(r.array_[t]);return e};var Qn=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Qn.prototype.getCoordinate=function(){return this._minCoord},Qn.prototype.getRightmostSide=function(e,t){var n=this.getRightmostSideOfSegment(e,t);return n<0&&(n=this.getRightmostSideOfSegment(e,t-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(e)),n},Qn.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],n=e[this._minIndex+1],i=he.computeOrientation(this._minCoord,n,t),o=!1;(t.y<this._minCoord.y&&n.y<this._minCoord.y&&i===he.COUNTERCLOCKWISE||t.y>this._minCoord.y&&n.y>this._minCoord.y&&i===he.CLOCKWISE)&&(o=!0),o&&(this._minIndex=this._minIndex-1)},Qn.prototype.getRightmostSideOfSegment=function(e,t){var n=e.getEdge(),i=n.getCoordinates();if(t<0||t+1>=i.length||i[t].y===i[t+1].y)return-1;var o=ie.LEFT;return i[t].y<i[t+1].y&&(o=ie.RIGHT),o},Qn.prototype.getEdge=function(){return this._orientedDe},Qn.prototype.checkForRightmostCoordinate=function(e){for(var t=this,n=e.getEdge().getCoordinates(),i=0;i<n.length-1;i++)(t._minCoord===null||n[i].x>t._minCoord.x)&&(t._minDe=e,t._minIndex=i,t._minCoord=n[i])},Qn.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)},Qn.prototype.findEdge=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.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 o=this.getRightmostSide(this._minDe,this._minIndex);o===ie.LEFT&&(this._orientedDe=this._minDe.getSym())},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn};var Yi=function(r){function e(t,n){r.call(this,e.msgWithCoord(t,n)),this.pt=n?new K(n):null,this.name="TopologyException"}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.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(n,i){return i?n:n+" [ "+i+" ]"},e}(zi),wh=function(){this.array_=[]};wh.prototype.addLast=function(e){this.array_.push(e)},wh.prototype.removeFirst=function(){return this.array_.shift()},wh.prototype.isEmpty=function(){return this.array_.length===0};var or=function(){this._finder=null,this._dirEdgeList=new ue,this._nodes=new ue,this._rightMostCoord=null,this._env=null,this._finder=new Qn};or.prototype.clearVisitedEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.setVisited(!1)}},or.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},or.prototype.computeNodeDepth=function(e){for(var t=this,n=null,i=e.getEdges().iterator();i.hasNext();){var o=i.next();if(o.isVisited()||o.getSym().isVisited()){n=o;break}}if(n===null)throw new Yi("unable to find edge to compute depths at "+e.getCoordinate());e.getEdges().computeDepths(n);for(var s=e.getEdges().iterator();s.hasNext();){var a=s.next();a.setVisited(!0),t.copySymDepths(a)}},or.prototype.computeDepth=function(e){this.clearVisitedEdges();var t=this._finder.getEdge();t.setEdgeDepths(ie.RIGHT,e),this.copySymDepths(t),this.computeDepths(t)},or.prototype.create=function(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},or.prototype.findResultEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.getDepth(ie.RIGHT)>=1&&t.getDepth(ie.LEFT)<=0&&!t.isInteriorAreaEdge()&&t.setInResult(!0)}},or.prototype.computeDepths=function(e){var t=this,n=new Vf,i=new wh,o=e.getNode();for(i.addLast(o),n.add(o),e.setVisited(!0);!i.isEmpty();){var s=i.removeFirst();n.add(s),t.computeNodeDepth(s);for(var a=s.getEdges().iterator();a.hasNext();){var c=a.next(),f=c.getSym();if(!f.isVisited()){var m=f.getNode();n.contains(m)||(i.addLast(m),n.add(m))}}}},or.prototype.compareTo=function(e){var t=e;return this._rightMostCoord.x<t._rightMostCoord.x?-1:this._rightMostCoord.x>t._rightMostCoord.x?1:0},or.prototype.getEnvelope=function(){if(this._env===null){for(var e=new Ee,t=this._dirEdgeList.iterator();t.hasNext();)for(var n=t.next(),i=n.getEdge().getCoordinates(),o=0;o<i.length-1;o++)e.expandToInclude(i[o]);this._env=e}return this._env},or.prototype.addReachable=function(e){var t=this,n=new Kn;for(n.add(e);!n.empty();){var i=n.pop();t.add(i,n)}},or.prototype.copySymDepths=function(e){var t=e.getSym();t.setDepth(ie.LEFT,e.getDepth(ie.RIGHT)),t.setDepth(ie.RIGHT,e.getDepth(ie.LEFT))},or.prototype.add=function(e,t){var n=this;e.setVisited(!0),this._nodes.add(e);for(var i=e.getEdges().iterator();i.hasNext();){var o=i.next();n._dirEdgeList.add(o);var s=o.getSym(),a=s.getNode();a.isVisited()||t.push(a)}},or.prototype.getNodes=function(){return this._nodes},or.prototype.getDirectedEdges=function(){return this._dirEdgeList},or.prototype.interfaces_=function(){return[rn]},or.prototype.getClass=function(){return or};var nt=function r(){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 n=arguments[0];this.init(1),this.location[ie.ON]=n}else if(arguments[0]instanceof r){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var o=0;o<this.location.length;o++)e.location[o]=i.location[o]}}else if(arguments.length===3){var s=arguments[0],a=arguments[1],c=arguments[2];this.init(3),this.location[ie.ON]=s,this.location[ie.LEFT]=a,this.location[ie.RIGHT]=c}};nt.prototype.setAllLocations=function(e){for(var t=this,n=0;n<this.location.length;n++)t.location[n]=e},nt.prototype.isNull=function(){for(var e=this,t=0;t<this.location.length;t++)if(e.location[t]!==Q.NONE)return!1;return!0},nt.prototype.setAllLocationsIfNull=function(e){for(var t=this,n=0;n<this.location.length;n++)t.location[n]===Q.NONE&&(t.location[n]=e)},nt.prototype.isLine=function(){return this.location.length===1},nt.prototype.merge=function(e){var t=this;if(e.location.length>this.location.length){var n=new Array(3).fill(null);n[ie.ON]=this.location[ie.ON],n[ie.LEFT]=Q.NONE,n[ie.RIGHT]=Q.NONE,this.location=n}for(var i=0;i<this.location.length;i++)t.location[i]===Q.NONE&&i<e.location.length&&(t.location[i]=e.location[i])},nt.prototype.getLocations=function(){return this.location},nt.prototype.flip=function(){if(this.location.length<=1)return null;var e=this.location[ie.LEFT];this.location[ie.LEFT]=this.location[ie.RIGHT],this.location[ie.RIGHT]=e},nt.prototype.toString=function(){var e=new zn;return this.location.length>1&&e.append(Q.toLocationSymbol(this.location[ie.LEFT])),e.append(Q.toLocationSymbol(this.location[ie.ON])),this.location.length>1&&e.append(Q.toLocationSymbol(this.location[ie.RIGHT])),e.toString()},nt.prototype.setLocations=function(e,t,n){this.location[ie.ON]=e,this.location[ie.LEFT]=t,this.location[ie.RIGHT]=n},nt.prototype.get=function(e){return e<this.location.length?this.location[e]:Q.NONE},nt.prototype.isArea=function(){return this.location.length>1},nt.prototype.isAnyNull=function(){for(var e=this,t=0;t<this.location.length;t++)if(e.location[t]===Q.NONE)return!0;return!1},nt.prototype.setLocation=function(){if(arguments.length===1){var e=arguments[0];this.setLocation(ie.ON,e)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];this.location[t]=n}},nt.prototype.init=function(e){this.location=new Array(e).fill(null),this.setAllLocations(Q.NONE)},nt.prototype.isEqualOnSide=function(e,t){return this.location[t]===e.location[t]},nt.prototype.allPositionsEqual=function(e){for(var t=this,n=0;n<this.location.length;n++)if(t.location[n]!==e)return!1;return!0},nt.prototype.interfaces_=function(){return[]},nt.prototype.getClass=function(){return nt};var Ze=function r(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new nt(e),this.elt[1]=new nt(e)}else if(arguments[0]instanceof r){var t=arguments[0];this.elt[0]=new nt(t.elt[0]),this.elt[1]=new nt(t.elt[1])}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.elt[0]=new nt(Q.NONE),this.elt[1]=new nt(Q.NONE),this.elt[n].setLocation(i)}else if(arguments.length===3){var o=arguments[0],s=arguments[1],a=arguments[2];this.elt[0]=new nt(o,s,a),this.elt[1]=new nt(o,s,a)}else if(arguments.length===4){var c=arguments[0],f=arguments[1],m=arguments[2],p=arguments[3];this.elt[0]=new nt(Q.NONE,Q.NONE,Q.NONE),this.elt[1]=new nt(Q.NONE,Q.NONE,Q.NONE),this.elt[c].setLocations(f,m,p)}};Ze.prototype.getGeometryCount=function(){var e=0;return this.elt[0].isNull()||e++,this.elt[1].isNull()||e++,e},Ze.prototype.setAllLocations=function(e,t){this.elt[e].setAllLocations(t)},Ze.prototype.isNull=function(e){return this.elt[e].isNull()},Ze.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],n=arguments[1];this.elt[t].setAllLocationsIfNull(n)}},Ze.prototype.isLine=function(e){return this.elt[e].isLine()},Ze.prototype.merge=function(e){for(var t=this,n=0;n<2;n++)t.elt[n]===null&&e.elt[n]!==null?t.elt[n]=new nt(e.elt[n]):t.elt[n].merge(e.elt[n])},Ze.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Ze.prototype.getLocation=function(){if(arguments.length===1){var e=arguments[0];return this.elt[e].get(ie.ON)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return this.elt[t].get(n)}},Ze.prototype.toString=function(){var e=new zn;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()},Ze.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()}},Ze.prototype.isAnyNull=function(e){return this.elt[e].isAnyNull()},Ze.prototype.setLocation=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];this.elt[e].setLocation(ie.ON,t)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];this.elt[n].setLocation(i,o)}},Ze.prototype.isEqualOnSide=function(e,t){return this.elt[0].isEqualOnSide(e.elt[0],t)&&this.elt[1].isEqualOnSide(e.elt[1],t)},Ze.prototype.allPositionsEqual=function(e,t){return this.elt[e].allPositionsEqual(t)},Ze.prototype.toLine=function(e){this.elt[e].isArea()&&(this.elt[e]=new nt(this.elt[e].location[0]))},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze},Ze.toLineLabel=function(e){for(var t=new Ze(Q.NONE),n=0;n<2;n++)t.setLocation(n,e.getLocation(n));return t};var St=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new ue,this._pts=new ue,this._label=new Ze(Q.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new ue,this._geometryFactory=null;var e=arguments[0],t=arguments[1];this._geometryFactory=t,this.computePoints(e),this.computeRing()};St.prototype.computeRing=function(){var e=this;if(this._ring!==null)return null;for(var t=new Array(this._pts.size()).fill(null),n=0;n<this._pts.size();n++)t[n]=e._pts.get(n);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=he.isCCW(this._ring.getCoordinates())},St.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},St.prototype.computePoints=function(e){var t=this;this._startDe=e;var n=e,i=!0;do{if(n===null)throw new Yi("Found null DirectedEdge");if(n.getEdgeRing()===t)throw new Yi("Directed Edge visited twice during ring-building at "+n.getCoordinate());t._edges.add(n);var o=n.getLabel();Fe.isTrue(o.isArea()),t.mergeLabel(o),t.addPoints(n.getEdge(),n.isForward(),i),i=!1,t.setEdgeRing(n,t),n=t.getNext(n)}while(n!==this._startDe)},St.prototype.getLinearRing=function(){return this._ring},St.prototype.getCoordinate=function(e){return this._pts.get(e)},St.prototype.computeMaxNodeDegree=function(){var e=this;this._maxNodeDegree=0;var t=this._startDe;do{var n=t.getNode(),i=n.getEdges().getOutgoingDegree(e);i>e._maxNodeDegree&&(e._maxNodeDegree=i),t=e.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},St.prototype.addPoints=function(e,t,n){var i=this,o=e.getCoordinates();if(t){var s=1;n&&(s=0);for(var a=s;a<o.length;a++)i._pts.add(o[a])}else{var c=o.length-2;n&&(c=o.length-1);for(var f=c;f>=0;f--)i._pts.add(o[f])}},St.prototype.isHole=function(){return this._isHole},St.prototype.setInResult=function(){var e=this._startDe;do e.getEdge().setInResult(!0),e=e.getNext();while(e!==this._startDe)},St.prototype.containsPoint=function(e){var t=this.getLinearRing(),n=t.getEnvelopeInternal();if(!n.contains(e)||!he.isPointInRing(e,t.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var o=i.next();if(o.containsPoint(e))return!1}return!0},St.prototype.addHole=function(e){this._holes.add(e)},St.prototype.isShell=function(){return this._shell===null},St.prototype.getLabel=function(){return this._label},St.prototype.getEdges=function(){return this._edges},St.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},St.prototype.getShell=function(){return this._shell},St.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],n=arguments[1],i=t.getLocation(n,ie.RIGHT);if(i===Q.NONE)return null;if(this._label.getLocation(n)===Q.NONE)return this._label.setLocation(n,i),null}},St.prototype.setShell=function(e){this._shell=e,e!==null&&e.addHole(this)},St.prototype.toPolygon=function(e){for(var t=this,n=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)n[i]=t._holes.get(i).getLinearRing();var o=e.createPolygon(this.getLinearRing(),n);return o},St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St};var D_=function(r){function e(){var t=arguments[0],n=arguments[1];r.call(this,t,n)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(n,i){n.setMinEdgeRing(i)},e.prototype.getNext=function(n){return n.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(St),A_=function(r){function e(){var t=arguments[0],n=arguments[1];r.call(this,t,n)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var n=this,i=new ue,o=this._startDe;do{if(o.getMinEdgeRing()===null){var s=new D_(o,n._geometryFactory);i.add(s)}o=o.getNext()}while(o!==this._startDe);return i},e.prototype.setEdgeRing=function(n,i){n.setEdgeRing(i)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var n=this,i=this._startDe;do{var o=i.getNode();o.getEdges().linkMinimalDirectedEdges(n),i=i.getNext()}while(i!==this._startDe)},e.prototype.getNext=function(n){return n.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(St),zr=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}}};zr.prototype.setVisited=function(e){this._isVisited=e},zr.prototype.setInResult=function(e){this._isInResult=e},zr.prototype.isCovered=function(){return this._isCovered},zr.prototype.isCoveredSet=function(){return this._isCoveredSet},zr.prototype.setLabel=function(e){this._label=e},zr.prototype.getLabel=function(){return this._label},zr.prototype.setCovered=function(e){this._isCovered=e,this._isCoveredSet=!0},zr.prototype.updateIM=function(e){Fe.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(e)},zr.prototype.isInResult=function(){return this._isInResult},zr.prototype.isVisited=function(){return this._isVisited},zr.prototype.interfaces_=function(){return[]},zr.prototype.getClass=function(){return zr};var Eh=function(r){function e(){r.call(this),this._coord=null,this._edges=null;var t=arguments[0],n=arguments[1];this._coord=t,this._edges=n,this._label=new Ze(0,Q.NONE)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var i=n.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(n){n.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(n){},e.prototype.computeMergedLocation=function(n,i){var o=Q.NONE;if(o=this._label.getLocation(i),!n.isNull(i)){var s=n.getLocation(i);o!==Q.BOUNDARY&&(o=s)}return o},e.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];this._label===null?this._label=new Ze(n,i):this._label.setLocation(n,i)}else return r.prototype.setLabel.apply(this,arguments)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof e){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Ze)for(var o=arguments[0],s=0;s<2;s++){var a=n.computeMergedLocation(o,s),c=n._label.getLocation(s);c===Q.NONE&&n._label.setLocation(s,a)}},e.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},e.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var i=Q.NONE;this._label!==null&&(i=this._label.getLocation(n));var o=null;switch(i){case Q.BOUNDARY:o=Q.INTERIOR;break;case Q.INTERIOR:o=Q.BOUNDARY;break;default:o=Q.BOUNDARY;break}this._label.setLocation(n,o)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(zr),$n=function(){this.nodeMap=new Qt,this.nodeFact=null;var e=arguments[0];this.nodeFact=e};$n.prototype.find=function(e){return this.nodeMap.get(e)},$n.prototype.addNode=function(){if(arguments[0]instanceof K){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 Eh){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return i===null?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},$n.prototype.print=function(e){for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},$n.prototype.iterator=function(){return this.nodeMap.values().iterator()},$n.prototype.values=function(){return this.nodeMap.values()},$n.prototype.getBoundaryNodes=function(e){for(var t=new ue,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(e)===Q.BOUNDARY&&t.add(i)}return t},$n.prototype.add=function(e){var t=e.getCoordinate(),n=this.addNode(t);n.add(e)},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n};var et=function(){},lc={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.isNorthern=function(e){return e===et.NE||e===et.NW},et.isOpposite=function(e,t){if(e===t)return!1;var n=(e-t+4)%4;return n===2},et.commonHalfPlane=function(e,t){if(e===t)return e;var n=(e-t+4)%4;if(n===2)return-1;var i=e<t?e:t,o=e>t?e:t;return i===0&&o===3?3:i},et.isInHalfPlane=function(e,t){return t===et.SE?e===et.SE||e===et.SW:e===t||e===t+1},et.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 ct("Cannot compute the quadrant for point ( "+e+", "+t+" )");return e>=0?t>=0?et.NE:et.SE:t>=0?et.NW:et.SW}else if(arguments[0]instanceof K&&arguments[1]instanceof K){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new ct("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?et.NE:et.SE:i.y>=n.y?et.NW:et.SW}},lc.NE.get=function(){return 0},lc.NW.get=function(){return 1},lc.SW.get=function(){return 2},lc.SE.get=function(){return 3},Object.defineProperties(et,lc);var $t=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],n=arguments[1],i=arguments[2],o=null;this._edge=t,this.init(n,i),this._label=o}else if(arguments.length===4){var s=arguments[0],a=arguments[1],c=arguments[2],f=arguments[3];this._edge=s,this.init(a,c),this._label=f}};$t.prototype.compareDirection=function(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant<e._quadrant?-1:he.computeOrientation(e._p0,e._p1,this._p1)},$t.prototype.getDy=function(){return this._dy},$t.prototype.getCoordinate=function(){return this._p0},$t.prototype.setNode=function(e){this._node=e},$t.prototype.print=function(e){var t=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf("."),o=n.substring(i+1);e.print(" "+o+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label)},$t.prototype.compareTo=function(e){var t=e;return this.compareDirection(t)},$t.prototype.getDirectedCoordinate=function(){return this._p1},$t.prototype.getDx=function(){return this._dx},$t.prototype.getLabel=function(){return this._label},$t.prototype.getEdge=function(){return this._edge},$t.prototype.getQuadrant=function(){return this._quadrant},$t.prototype.getNode=function(){return this._node},$t.prototype.toString=function(){var e=Math.atan2(this._dy,this._dx),t=this.getClass().getName(),n=t.lastIndexOf("."),i=t.substring(n+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label},$t.prototype.computeLabel=function(e){},$t.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=et.quadrant(this._dx,this._dy),Fe.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},$t.prototype.interfaces_=function(){return[rn]},$t.prototype.getClass=function(){return $t};var Xf=function(r){function e(){var t=arguments[0],n=arguments[1];if(r.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=n,n)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 r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(n){return this._depth[n]},e.prototype.setVisited=function(n){this._isVisited=n},e.prototype.computeDirectedLabel=function(){this._label=new Ze(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(n,i){if(this._depth[n]!==-999&&this._depth[n]!==i)throw new Yi("assigned depths do not match",this.getCoordinate());this._depth[n]=i},e.prototype.isInteriorAreaEdge=function(){for(var n=this,i=!0,o=0;o<2;o++)n._label.isArea(o)&&n._label.getLocation(o,ie.LEFT)===Q.INTERIOR&&n._label.getLocation(o,ie.RIGHT)===Q.INTERIOR||(i=!1);return i},e.prototype.setNextMin=function(n){this._nextMin=n},e.prototype.print=function(n){r.prototype.print.call(this,n),n.print(" "+this._depth[ie.LEFT]+"/"+this._depth[ie.RIGHT]),n.print(" ("+this.getDepthDelta()+")"),this._isInResult&&n.print(" inResult")},e.prototype.setMinEdgeRing=function(n){this._minEdgeRing=n},e.prototype.isLineEdge=function(){var n=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,Q.EXTERIOR),o=!this._label.isArea(1)||this._label.allPositionsEqual(1,Q.EXTERIOR);return n&&i&&o},e.prototype.setEdgeRing=function(n){this._edgeRing=n},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var n=this._edge.getDepthDelta();return this._isForward||(n=-n),n},e.prototype.setInResult=function(n){this._isInResult=n},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(n){this.print(n),n.print(" "),this._isForward?this._edge.print(n):this._edge.printReverse(n)},e.prototype.setSym=function(n){this._sym=n},e.prototype.setVisitedEdge=function(n){this.setVisited(n),this._sym.setVisited(n)},e.prototype.setEdgeDepths=function(n,i){var o=this.getEdge().getDepthDelta();this._isForward||(o=-o);var s=1;n===ie.LEFT&&(s=-1);var a=ie.opposite(n),c=o*s,f=i+c;this.setDepth(n,i),this.setDepth(a,f)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(n){this._next=n},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(n,i){return n===Q.EXTERIOR&&i===Q.INTERIOR?1:n===Q.INTERIOR&&i===Q.EXTERIOR?-1:0},e}($t),fl=function(){};fl.prototype.createNode=function(e){return new Eh(e,null)},fl.prototype.interfaces_=function(){return[]},fl.prototype.getClass=function(){return fl};var dt=function(){if(this._edges=new ue,this._nodes=null,this._edgeEndList=new ue,arguments.length===0)this._nodes=new $n(new fl);else if(arguments.length===1){var e=arguments[0];this._nodes=new $n(e)}};dt.prototype.printEdges=function(e){var t=this;e.println("Edges:");for(var n=0;n<this._edges.size();n++){e.println("edge "+n+":");var i=t._edges.get(n);i.print(e),i.eiList.print(e)}},dt.prototype.find=function(e){return this._nodes.find(e)},dt.prototype.addNode=function(){if(arguments[0]instanceof Eh){var e=arguments[0];return this._nodes.addNode(e)}else if(arguments[0]instanceof K){var t=arguments[0];return this._nodes.addNode(t)}},dt.prototype.getNodeIterator=function(){return this._nodes.iterator()},dt.prototype.linkResultDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();){var t=e.next();t.getEdges().linkResultDirectedEdges()}},dt.prototype.debugPrintln=function(e){Bt.out.println(e)},dt.prototype.isBoundaryNode=function(e,t){var n=this._nodes.find(t);if(n===null)return!1;var i=n.getLabel();return i!==null&&i.getLocation(e)===Q.BOUNDARY},dt.prototype.linkAllDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();){var t=e.next();t.getEdges().linkAllDirectedEdges()}},dt.prototype.matchInSameDirection=function(e,t,n,i){return e.equals(n)?he.computeOrientation(e,t,i)===he.COLLINEAR&&et.quadrant(e,t)===et.quadrant(n,i):!1},dt.prototype.getEdgeEnds=function(){return this._edgeEndList},dt.prototype.debugPrint=function(e){Bt.out.print(e)},dt.prototype.getEdgeIterator=function(){return this._edges.iterator()},dt.prototype.findEdgeInSameDirection=function(e,t){for(var n=this,i=0;i<this._edges.size();i++){var o=n._edges.get(i),s=o.getCoordinates();if(n.matchInSameDirection(e,t,s[0],s[1])||n.matchInSameDirection(e,t,s[s.length-1],s[s.length-2]))return o}return null},dt.prototype.insertEdge=function(e){this._edges.add(e)},dt.prototype.findEdgeEnd=function(e){for(var t=this.getEdgeEnds().iterator();t.hasNext();){var n=t.next();if(n.getEdge()===e)return n}return null},dt.prototype.addEdges=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.next();t._edges.add(i);var o=new Xf(i,!0),s=new Xf(i,!1);o.setSym(s),s.setSym(o),t.add(o),t.add(s)}},dt.prototype.add=function(e){this._nodes.add(e),this._edgeEndList.add(e)},dt.prototype.getNodes=function(){return this._nodes.values()},dt.prototype.findEdge=function(e,t){for(var n=this,i=0;i<this._edges.size();i++){var o=n._edges.get(i),s=o.getCoordinates();if(e.equals(s[0])&&t.equals(s[1]))return o}return null},dt.prototype.interfaces_=function(){return[]},dt.prototype.getClass=function(){return dt},dt.linkResultDirectedEdges=function(e){for(var t=e.iterator();t.hasNext();){var n=t.next();n.getEdges().linkResultDirectedEdges()}};var Dr=function(){this._geometryFactory=null,this._shellList=new ue;var e=arguments[0];this._geometryFactory=e};Dr.prototype.sortShellsAndHoles=function(e,t,n){for(var i=e.iterator();i.hasNext();){var o=i.next();o.isHole()?n.add(o):t.add(o)}},Dr.prototype.computePolygons=function(e){for(var t=this,n=new ue,i=e.iterator();i.hasNext();){var o=i.next(),s=o.toPolygon(t._geometryFactory);n.add(s)}return n},Dr.prototype.placeFreeHoles=function(e,t){for(var n=this,i=t.iterator();i.hasNext();){var o=i.next();if(o.getShell()===null){var s=n.findEdgeRingContaining(o,e);if(s===null)throw new Yi("unable to assign hole to a shell",o.getCoordinate(0));o.setShell(s)}}},Dr.prototype.buildMinimalEdgeRings=function(e,t,n){for(var i=this,o=new ue,s=e.iterator();s.hasNext();){var a=s.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var c=a.buildMinimalRings(),f=i.findShell(c);f!==null?(i.placePolygonHoles(f,c),t.add(f)):n.addAll(c)}else o.add(a)}return o},Dr.prototype.containsPoint=function(e){for(var t=this._shellList.iterator();t.hasNext();){var n=t.next();if(n.containsPoint(e))return!0}return!1},Dr.prototype.buildMaximalEdgeRings=function(e){for(var t=this,n=new ue,i=e.iterator();i.hasNext();){var o=i.next();if(o.isInResult()&&o.getLabel().isArea()&&o.getEdgeRing()===null){var s=new A_(o,t._geometryFactory);n.add(s),s.setInResult()}}return n},Dr.prototype.placePolygonHoles=function(e,t){for(var n=t.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(e)}},Dr.prototype.getPolygons=function(){var e=this.computePolygons(this._shellList);return e},Dr.prototype.findEdgeRingContaining=function(e,t){for(var n=e.getLinearRing(),i=n.getEnvelopeInternal(),o=n.getCoordinateN(0),s=null,a=null,c=t.iterator();c.hasNext();){var f=c.next(),m=f.getLinearRing(),p=m.getEnvelopeInternal();s!==null&&(a=s.getLinearRing().getEnvelopeInternal());var g=!1;p.contains(i)&&he.isPointInRing(o,m.getCoordinates())&&(g=!0),g&&(s===null||a.contains(p))&&(s=f)}return s},Dr.prototype.findShell=function(e){for(var t=0,n=null,i=e.iterator();i.hasNext();){var o=i.next();o.isHole()||(n=o,t++)}return Fe.isTrue(t<=1,"found two shells in MinimalEdgeRing list"),n},Dr.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],n=arguments[1];dt.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(t),o=new ue,s=this.buildMinimalEdgeRings(i,this._shellList,o);this.sortShellsAndHoles(s,this._shellList,o),this.placeFreeHoles(this._shellList,o)}},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr};var dl=function(){};dl.prototype.getBounds=function(){},dl.prototype.interfaces_=function(){return[]},dl.prototype.getClass=function(){return dl};var In=function(){this._bounds=null,this._item=null;var e=arguments[0],t=arguments[1];this._bounds=e,this._item=t};In.prototype.getItem=function(){return this._item},In.prototype.getBounds=function(){return this._bounds},In.prototype.interfaces_=function(){return[dl,nn]},In.prototype.getClass=function(){return In};var Ji=function(){this._size=null,this._items=null,this._size=0,this._items=new ue,this._items.add(null)};Ji.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},Ji.prototype.size=function(){return this._size},Ji.prototype.reorder=function(e){for(var t=this,n=null,i=this._items.get(e);e*2<=this._size&&(n=e*2,n!==t._size&&t._items.get(n+1).compareTo(t._items.get(n))<0&&n++,t._items.get(n).compareTo(i)<0);e=n)t._items.set(e,t._items.get(n));this._items.set(e,i)},Ji.prototype.clear=function(){this._size=0,this._items.clear()},Ji.prototype.isEmpty=function(){return this._size===0},Ji.prototype.add=function(e){var t=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,e);e.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)t._items.set(n,t._items.get(Math.trunc(n/2)));this._items.set(n,e)},Ji.prototype.interfaces_=function(){return[]},Ji.prototype.getClass=function(){return Ji};var Ps=function(){};Ps.prototype.visitItem=function(e){},Ps.prototype.interfaces_=function(){return[]},Ps.prototype.getClass=function(){return Ps};var Xo=function(){};Xo.prototype.insert=function(e,t){},Xo.prototype.remove=function(e,t){},Xo.prototype.query=function(){},Xo.prototype.interfaces_=function(){return[]},Xo.prototype.getClass=function(){return Xo};var Tt=function(){if(this._childBoundables=new ue,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this._level=e}}},vg={serialVersionUID:{configurable:!0}};Tt.prototype.getLevel=function(){return this._level},Tt.prototype.size=function(){return this._childBoundables.size()},Tt.prototype.getChildBoundables=function(){return this._childBoundables},Tt.prototype.addChildBoundable=function(e){Fe.isTrue(this._bounds===null),this._childBoundables.add(e)},Tt.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Tt.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},Tt.prototype.interfaces_=function(){return[dl,nn]},Tt.prototype.getClass=function(){return Tt},vg.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(Tt,vg);var Tn=function(){};Tn.reverseOrder=function(){return{compare:function(t,n){return n.compareTo(t)}}},Tn.min=function(e){return Tn.sort(e),e.get(0)},Tn.sort=function(e,t){var n=e.toArray();t?no.sort(n,t):no.sort(n);for(var i=e.iterator(),o=0,s=n.length;o<s;o++)i.next(),i.set(n[o])},Tn.singletonList=function(e){var t=new ue;return t.add(e),t};var Ct=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var e=arguments[0],t=arguments[1],n=arguments[2];this._boundable1=e,this._boundable2=t,this._itemDistance=n,this._distance=this.distance()};Ct.prototype.expandToQueue=function(e,t){var n=Ct.isComposite(this._boundable1),i=Ct.isComposite(this._boundable2);if(n&&i)return Ct.area(this._boundable1)>Ct.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,e,t),null):(this.expand(this._boundable2,this._boundable1,e,t),null);if(n)return this.expand(this._boundable1,this._boundable2,e,t),null;if(i)return this.expand(this._boundable2,this._boundable1,e,t),null;throw new ct("neither boundable is composite")},Ct.prototype.isLeaves=function(){return!(Ct.isComposite(this._boundable1)||Ct.isComposite(this._boundable2))},Ct.prototype.compareTo=function(e){var t=e;return this._distance<t._distance?-1:this._distance>t._distance?1:0},Ct.prototype.expand=function(e,t,n,i){for(var o=this,s=e.getChildBoundables(),a=s.iterator();a.hasNext();){var c=a.next(),f=new Ct(c,t,o._itemDistance);f.getDistance()<i&&n.add(f)}},Ct.prototype.getBoundable=function(e){return e===0?this._boundable1:this._boundable2},Ct.prototype.getDistance=function(){return this._distance},Ct.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},Ct.prototype.interfaces_=function(){return[rn]},Ct.prototype.getClass=function(){return Ct},Ct.area=function(e){return e.getBounds().getArea()},Ct.isComposite=function(e){return e instanceof Tt};var Rt=function r(){if(this._root=null,this._built=!1,this._itemBoundables=new ue,this._nodeCapacity=null,arguments.length===0){var e=r.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}},Ph={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Rt.prototype.getNodeCapacity=function(){return this._nodeCapacity},Rt.prototype.lastNode=function(e){return e.get(e.size()-1)},Rt.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],n=0,i=t.getChildBoundables().iterator();i.hasNext();){var o=i.next();o instanceof Tt?n+=e.size(o):o instanceof In&&(n+=1)}return n}},Rt.prototype.removeItem=function(e,t){for(var n=null,i=e.getChildBoundables().iterator();i.hasNext();){var o=i.next();o instanceof In&&o.getItem()===t&&(n=o)}return n!==null?(e.getChildBoundables().remove(n),!0):!1},Rt.prototype.itemsTree=function(){var e=this;if(arguments.length===0){this.build();var t=this.itemsTree(this._root);return t===null?new ue:t}else if(arguments.length===1){for(var n=arguments[0],i=new ue,o=n.getChildBoundables().iterator();o.hasNext();){var s=o.next();if(s instanceof Tt){var a=e.itemsTree(s);a!==null&&i.add(a)}else s instanceof In?i.add(s.getItem()):Fe.shouldNeverReachHere()}return i.size()<=0?null:i}},Rt.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 In(e,t))},Rt.prototype.boundablesAtLevel=function(){var e=this;if(arguments.length===1){var t=arguments[0],n=new ue;return this.boundablesAtLevel(t,this._root,n),n}else if(arguments.length===3){var i=arguments[0],o=arguments[1],s=arguments[2];if(Fe.isTrue(i>-2),o.getLevel()===i)return s.add(o),null;for(var a=o.getChildBoundables().iterator();a.hasNext();){var c=a.next();c instanceof Tt?e.boundablesAtLevel(i,c,s):(Fe.isTrue(c instanceof In),i===-1&&s.add(c))}return null}},Rt.prototype.query=function(){var e=this;if(arguments.length===1){var t=arguments[0];this.build();var n=new ue;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,n),n}else if(arguments.length===2){var i=arguments[0],o=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,o)}else if(arguments.length===3){if(Me(arguments[2],Ps)&&arguments[0]instanceof Object&&arguments[1]instanceof Tt)for(var s=arguments[0],a=arguments[1],c=arguments[2],f=a.getChildBoundables(),m=0;m<f.size();m++){var p=f.get(m);e.getIntersectsOp().intersects(p.getBounds(),s)&&(p instanceof Tt?e.query(s,p,c):p instanceof In?c.visitItem(p.getItem()):Fe.shouldNeverReachHere())}else if(Me(arguments[2],xn)&&arguments[0]instanceof Object&&arguments[1]instanceof Tt)for(var g=arguments[0],w=arguments[1],_=arguments[2],y=w.getChildBoundables(),h=0;h<y.size();h++){var d=y.get(h);e.getIntersectsOp().intersects(d.getBounds(),g)&&(d instanceof Tt?e.query(g,d,_):d instanceof In?_.add(d.getItem()):Fe.shouldNeverReachHere())}}},Rt.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},Rt.prototype.getRoot=function(){return this.build(),this._root},Rt.prototype.remove=function(){var e=this;if(arguments.length===2){var t=arguments[0],n=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),t)?this.remove(t,this._root,n):!1}else if(arguments.length===3){var i=arguments[0],o=arguments[1],s=arguments[2],a=this.removeItem(o,s);if(a)return!0;for(var c=null,f=o.getChildBoundables().iterator();f.hasNext();){var m=f.next();if(e.getIntersectsOp().intersects(m.getBounds(),i)&&m instanceof Tt&&(a=e.remove(i,m,s),a)){c=m;break}}return c!==null&&c.getChildBoundables().isEmpty()&&o.getChildBoundables().remove(c),a}},Rt.prototype.createHigherLevels=function(e,t){Fe.isTrue(!e.isEmpty());var n=this.createParentBoundables(e,t+1);return n.size()===1?n.get(0):this.createHigherLevels(n,t+1)},Rt.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],n=0,i=t.getChildBoundables().iterator();i.hasNext();){var o=i.next();if(o instanceof Tt){var s=e.depth(o);s>n&&(n=s)}}return n+1}},Rt.prototype.createParentBoundables=function(e,t){var n=this;Fe.isTrue(!e.isEmpty());var i=new ue;i.add(this.createNode(t));var o=new ue(e);Tn.sort(o,this.getComparator());for(var s=o.iterator();s.hasNext();){var a=s.next();n.lastNode(i).getChildBoundables().size()===n.getNodeCapacity()&&i.add(n.createNode(t)),n.lastNode(i).addChildBoundable(a)}return i},Rt.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},Rt.prototype.interfaces_=function(){return[nn]},Rt.prototype.getClass=function(){return Rt},Rt.compareDoubles=function(e,t){return e>t?1:e<t?-1:0},Ph.IntersectsOp.get=function(){return R_},Ph.serialVersionUID.get=function(){return-3886435814360241e3},Ph.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(Rt,Ph);var R_=function(){},pl=function(){};pl.prototype.distance=function(e,t){},pl.prototype.interfaces_=function(){return[]},pl.prototype.getClass=function(){return pl};var yg=function(r){function e(n){n=n||e.DEFAULT_NODE_CAPACITY,r.call(this,n)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.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,o){var s=this;Fe.isTrue(i.length>0);for(var a=new ue,c=0;c<i.length;c++)a.addAll(s.createParentBoundablesFromVerticalSlice(i[c],o));return a},e.prototype.createNode=function(i){return new mg(i)},e.prototype.size=function(){return arguments.length===0?r.prototype.size.call(this):r.prototype.size.apply(this,arguments)},e.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],o=arguments[1];if(i.isNull())return null;r.prototype.insert.call(this,i,o)}else return r.prototype.insert.apply(this,arguments)},e.prototype.getIntersectsOp=function(){return e.intersectsOp},e.prototype.verticalSlices=function(i,o){for(var s=Math.trunc(Math.ceil(i.size()/o)),a=new Array(o).fill(null),c=i.iterator(),f=0;f<o;f++){a[f]=new ue;for(var m=0;c.hasNext()&&m<s;){var p=c.next();a[f].add(p),m++}}return a},e.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return r.prototype.query.call(this,i)}else if(arguments.length===2){var o=arguments[0],s=arguments[1];r.prototype.query.call(this,o,s)}else if(arguments.length===3){if(Me(arguments[2],Ps)&&arguments[0]instanceof Object&&arguments[1]instanceof Tt){var a=arguments[0],c=arguments[1],f=arguments[2];r.prototype.query.call(this,a,c,f)}else if(Me(arguments[2],xn)&&arguments[0]instanceof Object&&arguments[1]instanceof Tt){var m=arguments[0],p=arguments[1],g=arguments[2];r.prototype.query.call(this,m,p,g)}}},e.prototype.getComparator=function(){return e.yComparator},e.prototype.createParentBoundablesFromVerticalSlice=function(i,o){return r.prototype.createParentBoundables.call(this,i,o)},e.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],o=arguments[1];return r.prototype.remove.call(this,i,o)}else return r.prototype.remove.apply(this,arguments)},e.prototype.depth=function(){return arguments.length===0?r.prototype.depth.call(this):r.prototype.depth.apply(this,arguments)},e.prototype.createParentBoundables=function(i,o){Fe.isTrue(!i.isEmpty());var s=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new ue(i);Tn.sort(a,e.xComparator);var c=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(s))));return this.createParentBoundablesFromVerticalSlices(c,o)},e.prototype.nearestNeighbour=function(){if(arguments.length===1){if(Me(arguments[0],pl)){var i=arguments[0],o=new Ct(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(o)}else if(arguments[0]instanceof Ct){var s=arguments[0];return this.nearestNeighbour(s,De.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof e&&Me(arguments[1],pl)){var a=arguments[0],c=arguments[1],f=new Ct(this.getRoot(),a.getRoot(),c);return this.nearestNeighbour(f)}else if(arguments[0]instanceof Ct&&typeof arguments[1]=="number"){var m=arguments[0],p=arguments[1],g=p,w=null,_=new Ji;for(_.add(m);!_.isEmpty()&&g>0;){var y=_.poll(),h=y.getDistance();if(h>=g)break;y.isLeaves()?(g=h,w=y):y.expandToQueue(_,g)}return[w.getBoundable(0).getItem(),w.getBoundable(1).getItem()]}}else if(arguments.length===3){var d=arguments[0],u=arguments[1],l=arguments[2],v=new In(d,u),b=new Ct(this.getRoot(),v,l);return this.nearestNeighbour(b)[0]}},e.prototype.interfaces_=function(){return[Xo,nn]},e.prototype.getClass=function(){return e},e.centreX=function(i){return e.avg(i.getMinX(),i.getMaxX())},e.avg=function(i,o){return(i+o)/2},e.centreY=function(i){return e.avg(i.getMinY(),i.getMaxY())},t.STRtreeNode.get=function(){return mg},t.serialVersionUID.get=function(){return 0x39920f7d5f261e0},t.xComparator.get=function(){return{interfaces_:function(){return[el]},compare:function(n,i){return r.compareDoubles(e.centreX(n.getBounds()),e.centreX(i.getBounds()))}}},t.yComparator.get=function(){return{interfaces_:function(){return[el]},compare:function(n,i){return r.compareDoubles(e.centreY(n.getBounds()),e.centreY(i.getBounds()))}}},t.intersectsOp.get=function(){return{interfaces_:function(){return[r.IntersectsOp]},intersects:function(n,i){return n.intersects(i)}}},t.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,t),e}(Rt),mg=function(r){function e(){var t=arguments[0];r.call(this,t)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var n=null,i=this.getChildBoundables().iterator();i.hasNext();){var o=i.next();n===null?n=new Ee(o.getBounds()):n.expandToInclude(o.getBounds())}return n},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Tt),vr=function(){};vr.prototype.interfaces_=function(){return[]},vr.prototype.getClass=function(){return vr},vr.relativeSign=function(e,t){return e<t?-1:e>t?1:0},vr.compare=function(e,t,n){if(t.equals2D(n))return 0;var i=vr.relativeSign(t.x,n.x),o=vr.relativeSign(t.y,n.y);switch(e){case 0:return vr.compareValue(i,o);case 1:return vr.compareValue(o,i);case 2:return vr.compareValue(o,-i);case 3:return vr.compareValue(-i,o);case 4:return vr.compareValue(-i,-o);case 5:return vr.compareValue(-o,-i);case 6:return vr.compareValue(-o,i);case 7:return vr.compareValue(i,-o)}return Fe.shouldNeverReachHere("invalid octant value"),0},vr.compareValue=function(e,t){return e<0?-1:e>0?1:t<0?-1:t>0?1:0};var Ss=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this._segString=e,this.coord=new K(t),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!t.equals2D(e.getCoordinate(n))};Ss.prototype.getCoordinate=function(){return this.coord},Ss.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)},Ss.prototype.compareTo=function(e){var t=e;return this.segmentIndex<t.segmentIndex?-1:this.segmentIndex>t.segmentIndex?1:this.coord.equals2D(t.coord)?0:vr.compare(this._segmentOctant,this.coord,t.coord)},Ss.prototype.isEndPoint=function(e){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===e},Ss.prototype.isInterior=function(){return this._isInterior},Ss.prototype.interfaces_=function(){return[rn]},Ss.prototype.getClass=function(){return Ss};var ar=function(){this._nodeMap=new Qt,this._edge=null;var e=arguments[0];this._edge=e};ar.prototype.getSplitCoordinates=function(){var e=this,t=new tc;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var o=n.next();e.addEdgeCoordinates(i,o,t),i=o}return t.toCoordinateArray()},ar.prototype.addCollapsedNodes=function(){var e=this,t=new ue;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var n=t.iterator();n.hasNext();){var i=n.next().intValue();e.add(e._edge.getCoordinate(i),i)}},ar.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},ar.prototype.findCollapsesFromExistingVertices=function(e){for(var t=this,n=0;n<this._edge.size()-2;n++){var i=t._edge.getCoordinate(n),o=t._edge.getCoordinate(n+2);i.equals2D(o)&&e.add(new Un(n+1))}},ar.prototype.addEdgeCoordinates=function(e,t,n){var i=this,o=this._edge.getCoordinate(t.segmentIndex),s=t.isInterior()||!t.coord.equals2D(o);n.add(new K(e.coord),!1);for(var a=e.segmentIndex+1;a<=t.segmentIndex;a++)n.add(i._edge.getCoordinate(a));s&&n.add(new K(t.coord))},ar.prototype.iterator=function(){return this._nodeMap.values().iterator()},ar.prototype.addSplitEdges=function(e){var t=this;this.addEndpoints(),this.addCollapsedNodes();for(var n=this.iterator(),i=n.next();n.hasNext();){var o=n.next(),s=t.createSplitEdge(i,o);e.add(s),i=o}},ar.prototype.findCollapseIndex=function(e,t,n){if(!e.coord.equals2D(t.coord))return!1;var i=t.segmentIndex-e.segmentIndex;return t.isInterior()||i--,i===1?(n[0]=e.segmentIndex+1,!0):!1},ar.prototype.findCollapsesFromInsertedNodes=function(e){for(var t=this,n=new Array(1).fill(null),i=this.iterator(),o=i.next();i.hasNext();){var s=i.next(),a=t.findCollapseIndex(o,s,n);a&&e.add(new Un(n[0])),o=s}},ar.prototype.getEdge=function(){return this._edge},ar.prototype.addEndpoints=function(){var e=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(e),e)},ar.prototype.createSplitEdge=function(e,t){var n=this,i=t.segmentIndex-e.segmentIndex+2,o=this._edge.getCoordinate(t.segmentIndex),s=t.isInterior()||!t.coord.equals2D(o);s||i--;var a=new Array(i).fill(null),c=0;a[c++]=new K(e.coord);for(var f=e.segmentIndex+1;f<=t.segmentIndex;f++)a[c++]=n._edge.getCoordinate(f);return s&&(a[c]=new K(t.coord)),new Et(a,this._edge.getData())},ar.prototype.add=function(e,t){var n=new Ss(this._edge,e,t,this._edge.getSegmentOctant(t)),i=this._nodeMap.get(n);return i!==null?(Fe.isTrue(i.coord.equals2D(e),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)},ar.prototype.checkSplitEdgesCorrectness=function(e){var t=this._edge.getCoordinates(),n=e.get(0),i=n.getCoordinate(0);if(!i.equals2D(t[0]))throw new zi("bad split edge start point at "+i);var o=e.get(e.size()-1),s=o.getCoordinates(),a=s[s.length-1];if(!a.equals2D(t[t.length-1]))throw new zi("bad split edge end point at "+a)},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar};var Yo=function(){};Yo.prototype.interfaces_=function(){return[]},Yo.prototype.getClass=function(){return Yo},Yo.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 ct("Cannot compute the octant for point ( "+e+", "+t+" )");var n=Math.abs(e),i=Math.abs(t);return e>=0?t>=0?n>=i?0:1:n>=i?7:6:t>=0?n>=i?3:2:n>=i?4:5}else if(arguments[0]instanceof K&&arguments[1]instanceof K){var o=arguments[0],s=arguments[1],a=s.x-o.x,c=s.y-o.y;if(a===0&&c===0)throw new ct("Cannot compute the octant for two identical points "+o);return Yo.octant(a,c)}};var bi=function(){};bi.prototype.getCoordinates=function(){},bi.prototype.size=function(){},bi.prototype.getCoordinate=function(e){},bi.prototype.isClosed=function(){},bi.prototype.setData=function(e){},bi.prototype.getData=function(){},bi.prototype.interfaces_=function(){return[]},bi.prototype.getClass=function(){return bi};var cc=function(){};cc.prototype.addIntersection=function(e,t){},cc.prototype.interfaces_=function(){return[bi]},cc.prototype.getClass=function(){return cc};var Et=function(){this._nodeList=new ar(this),this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};Et.prototype.getCoordinates=function(){return this._pts},Et.prototype.size=function(){return this._pts.length},Et.prototype.getCoordinate=function(e){return this._pts[e]},Et.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Et.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))},Et.prototype.setData=function(e){this._data=e},Et.prototype.safeOctant=function(e,t){return e.equals2D(t)?0:Yo.octant(e,t)},Et.prototype.getData=function(){return this._data},Et.prototype.addIntersection=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1];this.addIntersectionNode(e,t)}else if(arguments.length===4){var n=arguments[0],i=arguments[1],o=arguments[3],s=new K(n.getIntersection(o));this.addIntersection(s,i)}},Et.prototype.toString=function(){return Cn.toLineString(new wt(this._pts))},Et.prototype.getNodeList=function(){return this._nodeList},Et.prototype.addIntersectionNode=function(e,t){var n=t,i=n+1;if(i<this._pts.length){var o=this._pts[i];e.equals2D(o)&&(n=i)}var s=this._nodeList.add(e,n);return s},Et.prototype.addIntersections=function(e,t,n){for(var i=this,o=0;o<e.getIntersectionNum();o++)i.addIntersection(e,t,n,o)},Et.prototype.interfaces_=function(){return[cc]},Et.prototype.getClass=function(){return Et},Et.getNodedSubstrings=function(){if(arguments.length===1){var e=arguments[0],t=new ue;return Et.getNodedSubstrings(e,t),t}else if(arguments.length===2)for(var n=arguments[0],i=arguments[1],o=n.iterator();o.hasNext();){var s=o.next();s.getNodeList().addSplitEdges(i)}};var Pe=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new K,this.p1=new K;else if(arguments.length===1){var e=arguments[0];this.p0=new K(e.p0),this.p1=new K(e.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var t=arguments[0],n=arguments[1],i=arguments[2],o=arguments[3];this.p0=new K(t,n),this.p1=new K(i,o)}},_g={serialVersionUID:{configurable:!0}};Pe.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},Pe.prototype.orientationIndex=function(){if(arguments[0]instanceof Pe){var e=arguments[0],t=he.orientationIndex(this.p0,this.p1,e.p0),n=he.orientationIndex(this.p0,this.p1,e.p1);return t>=0&&n>=0||t<=0&&n<=0?Math.max(t,n):0}else if(arguments[0]instanceof K){var i=arguments[0];return he.orientationIndex(this.p0,this.p1,i)}},Pe.prototype.toGeometry=function(e){return e.createLineString([this.p0,this.p1])},Pe.prototype.isVertical=function(){return this.p0.x===this.p1.x},Pe.prototype.equals=function(e){if(!(e instanceof Pe))return!1;var t=e;return this.p0.equals(t.p0)&&this.p1.equals(t.p1)},Pe.prototype.intersection=function(e){var t=new to;return t.computeIntersection(this.p0,this.p1,e.p0,e.p1),t.hasIntersection()?t.getIntersection(0):null},Pe.prototype.project=function(){if(arguments[0]instanceof K){var e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new K(e);var t=this.projectionFactor(e),n=new K;return n.x=this.p0.x+t*(this.p1.x-this.p0.x),n.y=this.p0.y+t*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof Pe){var i=arguments[0],o=this.projectionFactor(i.p0),s=this.projectionFactor(i.p1);if(o>=1&&s>=1||o<=0&&s<=0)return null;var a=this.project(i.p0);o<0&&(a=this.p0),o>1&&(a=this.p1);var c=this.project(i.p1);return s<0&&(c=this.p0),s>1&&(c=this.p1),new Pe(a,c)}},Pe.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},Pe.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},Pe.prototype.getCoordinate=function(e){return e===0?this.p0:this.p1},Pe.prototype.distancePerpendicular=function(e){return he.distancePointLinePerpendicular(e,this.p0,this.p1)},Pe.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},Pe.prototype.midPoint=function(){return Pe.midPoint(this.p0,this.p1)},Pe.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,n=this.p1.y-this.p0.y,i=t*t+n*n;if(i<=0)return De.NaN;var o=((e.x-this.p0.x)*t+(e.y-this.p0.y)*n)/i;return o},Pe.prototype.closestPoints=function(e){var t=this.intersection(e);if(t!==null)return[t,t];var n=new Array(2).fill(null),i=De.MAX_VALUE,o=null,s=this.closestPoint(e.p0);i=s.distance(e.p0),n[0]=s,n[1]=e.p0;var a=this.closestPoint(e.p1);o=a.distance(e.p1),o<i&&(i=o,n[0]=a,n[1]=e.p1);var c=e.closestPoint(this.p0);o=c.distance(this.p0),o<i&&(i=o,n[0]=this.p0,n[1]=c);var f=e.closestPoint(this.p1);return o=f.distance(this.p1),o<i&&(i=o,n[0]=this.p1,n[1]=f),n},Pe.prototype.closestPoint=function(e){var t=this.projectionFactor(e);if(t>0&&t<1)return this.project(e);var n=this.p0.distance(e),i=this.p1.distance(e);return n<i?this.p0:this.p1},Pe.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},Pe.prototype.getLength=function(){return this.p0.distance(this.p1)},Pe.prototype.compareTo=function(e){var t=e,n=this.p0.compareTo(t.p0);return n!==0?n:this.p1.compareTo(t.p1)},Pe.prototype.reverse=function(){var e=this.p0;this.p0=this.p1,this.p1=e},Pe.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)},Pe.prototype.lineIntersection=function(e){try{var t=Sn.intersection(this.p0,this.p1,e.p0,e.p1);return t}catch(n){if(!(n instanceof rl))throw n}finally{}return null},Pe.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},Pe.prototype.pointAlongOffset=function(e,t){var n=this.p0.x+e*(this.p1.x-this.p0.x),i=this.p0.y+e*(this.p1.y-this.p0.y),o=this.p1.x-this.p0.x,s=this.p1.y-this.p0.y,a=Math.sqrt(o*o+s*s),c=0,f=0;if(t!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");c=t*o/a,f=t*s/a}var m=n-f,p=i+c,g=new K(m,p);return g},Pe.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],n=arguments[1];this.p0.x=t.x,this.p0.y=t.y,this.p1.x=n.x,this.p1.y=n.y}},Pe.prototype.segmentFraction=function(e){var t=this.projectionFactor(e);return t<0?t=0:(t>1||De.isNaN(t))&&(t=1),t},Pe.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},Pe.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},Pe.prototype.distance=function(){if(arguments[0]instanceof Pe){var e=arguments[0];return he.distanceLineLine(this.p0,this.p1,e.p0,e.p1)}else if(arguments[0]instanceof K){var t=arguments[0];return he.distancePointLine(t,this.p0,this.p1)}},Pe.prototype.pointAlong=function(e){var t=new K;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},Pe.prototype.hashCode=function(){var e=De.doubleToLongBits(this.p0.x);e^=De.doubleToLongBits(this.p0.y)*31;var t=Math.trunc(e)^Math.trunc(e>>32),n=De.doubleToLongBits(this.p1.x);n^=De.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(n)^Math.trunc(n>>32);return t^i},Pe.prototype.interfaces_=function(){return[rn,nn]},Pe.prototype.getClass=function(){return Pe},Pe.midPoint=function(e,t){return new K((e.x+t.x)/2,(e.y+t.y)/2)},_g.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(Pe,_g);var hc=function(){this.tempEnv1=new Ee,this.tempEnv2=new Ee,this._overlapSeg1=new Pe,this._overlapSeg2=new Pe};hc.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];e.getLineSegment(t,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},hc.prototype.interfaces_=function(){return[]},hc.prototype.getClass=function(){return hc};var Ar=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],n=arguments[2],i=arguments[3];this._pts=e,this._start=t,this._end=n,this._context=i};Ar.prototype.getLineSegment=function(e,t){t.p0=this._pts[e],t.p1=this._pts[e+1]},Ar.prototype.computeSelect=function(e,t,n,i){var o=this._pts[t],s=this._pts[n];if(i.tempEnv1.init(o,s),n-t===1)return i.select(this,t),null;if(!e.intersects(i.tempEnv1))return null;var a=Math.trunc((t+n)/2);t<a&&this.computeSelect(e,t,a,i),a<n&&this.computeSelect(e,a,n,i)},Ar.prototype.getCoordinates=function(){for(var e=this,t=new Array(this._end-this._start+1).fill(null),n=0,i=this._start;i<=this._end;i++)t[n++]=e._pts[i];return t},Ar.prototype.computeOverlaps=function(e,t){this.computeOverlapsInternal(this._start,this._end,e,e._start,e._end,t)},Ar.prototype.setId=function(e){this._id=e},Ar.prototype.select=function(e,t){this.computeSelect(e,this._start,this._end,t)},Ar.prototype.getEnvelope=function(){if(this._env===null){var e=this._pts[this._start],t=this._pts[this._end];this._env=new Ee(e,t)}return this._env},Ar.prototype.getEndIndex=function(){return this._end},Ar.prototype.getStartIndex=function(){return this._start},Ar.prototype.getContext=function(){return this._context},Ar.prototype.getId=function(){return this._id},Ar.prototype.computeOverlapsInternal=function(e,t,n,i,o,s){var a=this._pts[e],c=this._pts[t],f=n._pts[i],m=n._pts[o];if(t-e===1&&o-i===1)return s.overlap(this,e,n,i),null;if(s.tempEnv1.init(a,c),s.tempEnv2.init(f,m),!s.tempEnv1.intersects(s.tempEnv2))return null;var p=Math.trunc((e+t)/2),g=Math.trunc((i+o)/2);e<p&&(i<g&&this.computeOverlapsInternal(e,p,n,i,g,s),g<o&&this.computeOverlapsInternal(e,p,n,g,o,s)),p<t&&(i<g&&this.computeOverlapsInternal(p,t,n,i,g,s),g<o&&this.computeOverlapsInternal(p,t,n,g,o,s))},Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar};var Zn=function(){};Zn.prototype.interfaces_=function(){return[]},Zn.prototype.getClass=function(){return Zn},Zn.getChainStartIndices=function(e){var t=0,n=new ue;n.add(new Un(t));do{var i=Zn.findChainEnd(e,t);n.add(new Un(i)),t=i}while(t<e.length-1);var o=Zn.toIntArray(n);return o},Zn.findChainEnd=function(e,t){for(var n=t;n<e.length-1&&e[n].equals2D(e[n+1]);)n++;if(n>=e.length-1)return e.length-1;for(var i=et.quadrant(e[n],e[n+1]),o=t+1;o<e.length;){if(!e[o-1].equals2D(e[o])){var s=et.quadrant(e[o-1],e[o]);if(s!==i)break}o++}return o-1},Zn.getChains=function(){if(arguments.length===1){var e=arguments[0];return Zn.getChains(e,null)}else if(arguments.length===2){for(var t=arguments[0],n=arguments[1],i=new ue,o=Zn.getChainStartIndices(t),s=0;s<o.length-1;s++){var a=new Ar(t,o[s],o[s+1],n);i.add(a)}return i}},Zn.toIntArray=function(e){for(var t=new Array(e.size()).fill(null),n=0;n<t.length;n++)t[n]=e.get(n).intValue();return t};var so=function(){};so.prototype.computeNodes=function(e){},so.prototype.getNodedSubstrings=function(){},so.prototype.interfaces_=function(){return[]},so.prototype.getClass=function(){return so};var fc=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setSegmentIntersector(e)}}};fc.prototype.setSegmentIntersector=function(e){this._segInt=e},fc.prototype.interfaces_=function(){return[so]},fc.prototype.getClass=function(){return fc};var Yf=function(r){function e(n){n?r.call(this,n):r.call(this),this._monoChains=new ue,this._index=new yg,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return Et.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(i){for(var o=this,s=Zn.getChains(i.getCoordinates(),i),a=s.iterator();a.hasNext();){var c=a.next();c.setId(o._idCounter++),o._index.insert(c.getEnvelope(),c),o._monoChains.add(c)}},e.prototype.computeNodes=function(i){var o=this;this._nodedSegStrings=i;for(var s=i.iterator();s.hasNext();)o.add(s.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var i=this,o=new bg(this._segInt),s=this._monoChains.iterator();s.hasNext();)for(var a=s.next(),c=i._index.query(a.getEnvelope()),f=c.iterator();f.hasNext();){var m=f.next();if(m.getId()>a.getId()&&(a.computeOverlaps(m,o),i._nOverlaps++),i._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},t.SegmentOverlapAction.get=function(){return bg},Object.defineProperties(e,t),e}(fc),bg=function(r){function e(){r.call(this),this._si=null;var t=arguments[0];this._si=t}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3],a=n.getContext(),c=o.getContext();this._si.processIntersections(a,i,c,s)}else return r.prototype.overlap.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hc),Qe=function r(){if(this._quadrantSegments=r.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=r.CAP_ROUND,this._joinStyle=r.JOIN_ROUND,this._mitreLimit=r.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=r.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],n=arguments[1];this.setQuadrantSegments(t),this.setEndCapStyle(n)}else if(arguments.length===4){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}}},Ki={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}};Qe.prototype.getEndCapStyle=function(){return this._endCapStyle},Qe.prototype.isSingleSided=function(){return this._isSingleSided},Qe.prototype.setQuadrantSegments=function(e){this._quadrantSegments=e,this._quadrantSegments===0&&(this._joinStyle=Qe.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Qe.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==Qe.JOIN_ROUND&&(this._quadrantSegments=Qe.DEFAULT_QUADRANT_SEGMENTS)},Qe.prototype.getJoinStyle=function(){return this._joinStyle},Qe.prototype.setJoinStyle=function(e){this._joinStyle=e},Qe.prototype.setSimplifyFactor=function(e){this._simplifyFactor=e<0?0:e},Qe.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Qe.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Qe.prototype.setEndCapStyle=function(e){this._endCapStyle=e},Qe.prototype.getMitreLimit=function(){return this._mitreLimit},Qe.prototype.setMitreLimit=function(e){this._mitreLimit=e},Qe.prototype.setSingleSided=function(e){this._isSingleSided=e},Qe.prototype.interfaces_=function(){return[]},Qe.prototype.getClass=function(){return Qe},Qe.bufferDistanceError=function(e){var t=Math.PI/2/e;return 1-Math.cos(t/2)},Ki.CAP_ROUND.get=function(){return 1},Ki.CAP_FLAT.get=function(){return 2},Ki.CAP_SQUARE.get=function(){return 3},Ki.JOIN_ROUND.get=function(){return 1},Ki.JOIN_MITRE.get=function(){return 2},Ki.JOIN_BEVEL.get=function(){return 3},Ki.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Ki.DEFAULT_MITRE_LIMIT.get=function(){return 5},Ki.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(Qe,Ki);var yt=function(e){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=he.COUNTERCLOCKWISE,this._inputLine=e||null},dc={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};yt.prototype.isDeletable=function(e,t,n,i){var o=this._inputLine[e],s=this._inputLine[t],a=this._inputLine[n];return!this.isConcave(o,s,a)||!this.isShallow(o,s,a,i)?!1:this.isShallowSampled(o,s,e,n,i)},yt.prototype.deleteShallowConcavities=function(){for(var e=this,t=1,n=this.findNextNonDeletedIndex(t),i=this.findNextNonDeletedIndex(n),o=!1;i<this._inputLine.length;){var s=!1;e.isDeletable(t,n,i,e._distanceTol)&&(e._isDeleted[n]=yt.DELETE,s=!0,o=!0),s?t=i:t=n,n=e.findNextNonDeletedIndex(t),i=e.findNextNonDeletedIndex(n)}return o},yt.prototype.isShallowConcavity=function(e,t,n,i){var o=he.computeOrientation(e,t,n),s=o===this._angleOrientation;if(!s)return!1;var a=he.distancePointLine(t,e,n);return a<i},yt.prototype.isShallowSampled=function(e,t,n,i,o){var s=this,a=Math.trunc((i-n)/yt.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var c=n;c<i;c+=a)if(!s.isShallow(e,t,s._inputLine[c],o))return!1;return!0},yt.prototype.isConcave=function(e,t,n){var i=he.computeOrientation(e,t,n),o=i===this._angleOrientation;return o},yt.prototype.simplify=function(e){var t=this;this._distanceTol=Math.abs(e),e<0&&(this._angleOrientation=he.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var n=!1;do n=t.deleteShallowConcavities();while(n);return this.collapseLine()},yt.prototype.findNextNonDeletedIndex=function(e){for(var t=e+1;t<this._inputLine.length&&this._isDeleted[t]===yt.DELETE;)t++;return t},yt.prototype.isShallow=function(e,t,n,i){var o=he.distancePointLine(t,e,n);return o<i},yt.prototype.collapseLine=function(){for(var e=this,t=new tc,n=0;n<this._inputLine.length;n++)e._isDeleted[n]!==yt.DELETE&&t.add(e._inputLine[n]);return t.toCoordinateArray()},yt.prototype.interfaces_=function(){return[]},yt.prototype.getClass=function(){return yt},yt.simplify=function(e,t){var n=new yt(e);return n.simplify(t)},dc.INIT.get=function(){return 0},dc.DELETE.get=function(){return 1},dc.KEEP.get=function(){return 1},dc.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(yt,dc);var Ur=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new ue},wg={COORDINATE_ARRAY_TYPE:{configurable:!0}};Ur.prototype.getCoordinates=function(){var e=this._ptList.toArray(Ur.COORDINATE_ARRAY_TYPE);return e},Ur.prototype.setPrecisionModel=function(e){this._precisionModel=e},Ur.prototype.addPt=function(e){var t=new K(e);if(this._precisionModel.makePrecise(t),this.isRedundant(t))return null;this._ptList.add(t)},Ur.prototype.revere=function(){},Ur.prototype.addPts=function(e,t){var n=this;if(t)for(var i=0;i<e.length;i++)n.addPt(e[i]);else for(var o=e.length-1;o>=0;o--)n.addPt(e[o])},Ur.prototype.isRedundant=function(e){if(this._ptList.size()<1)return!1;var t=this._ptList.get(this._ptList.size()-1),n=e.distance(t);return n<this._minimimVertexDistance},Ur.prototype.toString=function(){var e=new Ge,t=e.createLineString(this.getCoordinates());return t.toString()},Ur.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var e=new K(this._ptList.get(0)),t=this._ptList.get(this._ptList.size()-1);if(e.equals(t))return null;this._ptList.add(e)},Ur.prototype.setMinimumVertexDistance=function(e){this._minimimVertexDistance=e},Ur.prototype.interfaces_=function(){return[]},Ur.prototype.getClass=function(){return Ur},wg.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Ur,wg);var Ue=function(){},Jo={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Ue.prototype.interfaces_=function(){return[]},Ue.prototype.getClass=function(){return Ue},Ue.toDegrees=function(e){return e*180/Math.PI},Ue.normalize=function(e){for(;e>Math.PI;)e-=Ue.PI_TIMES_2;for(;e<=-Math.PI;)e+=Ue.PI_TIMES_2;return e},Ue.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],n=arguments[1],i=n.x-t.x,o=n.y-t.y;return Math.atan2(o,i)}},Ue.isAcute=function(e,t,n){var i=e.x-t.x,o=e.y-t.y,s=n.x-t.x,a=n.y-t.y,c=i*s+o*a;return c>0},Ue.isObtuse=function(e,t,n){var i=e.x-t.x,o=e.y-t.y,s=n.x-t.x,a=n.y-t.y,c=i*s+o*a;return c<0},Ue.interiorAngle=function(e,t,n){var i=Ue.angle(t,e),o=Ue.angle(t,n);return Math.abs(o-i)},Ue.normalizePositive=function(e){if(e<0){for(;e<0;)e+=Ue.PI_TIMES_2;e>=Ue.PI_TIMES_2&&(e=0)}else{for(;e>=Ue.PI_TIMES_2;)e-=Ue.PI_TIMES_2;e<0&&(e=0)}return e},Ue.angleBetween=function(e,t,n){var i=Ue.angle(t,e),o=Ue.angle(t,n);return Ue.diff(i,o)},Ue.diff=function(e,t){var n=null;return e<t?n=t-e:n=e-t,n>Math.PI&&(n=2*Math.PI-n),n},Ue.toRadians=function(e){return e*Math.PI/180},Ue.getTurn=function(e,t){var n=Math.sin(t-e);return n>0?Ue.COUNTERCLOCKWISE:n<0?Ue.CLOCKWISE:Ue.NONE},Ue.angleBetweenOriented=function(e,t,n){var i=Ue.angle(t,e),o=Ue.angle(t,n),s=o-i;return s<=-Math.PI?s+Ue.PI_TIMES_2:s>Math.PI?s-Ue.PI_TIMES_2:s},Jo.PI_TIMES_2.get=function(){return 2*Math.PI},Jo.PI_OVER_2.get=function(){return Math.PI/2},Jo.PI_OVER_4.get=function(){return Math.PI/4},Jo.COUNTERCLOCKWISE.get=function(){return he.COUNTERCLOCKWISE},Jo.CLOCKWISE.get=function(){return he.CLOCKWISE},Jo.NONE.get=function(){return he.COLLINEAR},Object.defineProperties(Ue,Jo);var ot=function r(){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 Pe,this._seg1=new Pe,this._offset0=new Pe,this._offset1=new Pe,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],t=arguments[1],n=arguments[2];this._precisionModel=e,this._bufParams=t,this._li=new to,this._filletAngleQuantum=Math.PI/2/t.getQuadrantSegments(),t.getQuadrantSegments()>=8&&t.getJoinStyle()===Qe.JOIN_ROUND&&(this._closingSegLengthFactor=r.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)},pc={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}};ot.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 n=he.computeOrientation(this._s0,this._s1,this._s2),i=n===he.CLOCKWISE&&this._side===ie.LEFT||n===he.COUNTERCLOCKWISE&&this._side===ie.RIGHT;n===0?this.addCollinear(t):i?this.addOutsideTurn(n,t):this.addInsideTurn(n,t)},ot.prototype.addLineEndCap=function(e,t){var n=new Pe(e,t),i=new Pe;this.computeOffsetSegment(n,ie.LEFT,this._distance,i);var o=new Pe;this.computeOffsetSegment(n,ie.RIGHT,this._distance,o);var s=t.x-e.x,a=t.y-e.y,c=Math.atan2(a,s);switch(this._bufParams.getEndCapStyle()){case Qe.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(t,c+Math.PI/2,c-Math.PI/2,he.CLOCKWISE,this._distance),this._segList.addPt(o.p1);break;case Qe.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(o.p1);break;case Qe.CAP_SQUARE:var f=new K;f.x=Math.abs(this._distance)*Math.cos(c),f.y=Math.abs(this._distance)*Math.sin(c);var m=new K(i.p1.x+f.x,i.p1.y+f.y),p=new K(o.p1.x+f.x,o.p1.y+f.y);this._segList.addPt(m),this._segList.addPt(p);break}},ot.prototype.getCoordinates=function(){var e=this._segList.getCoordinates();return e},ot.prototype.addMitreJoin=function(e,t,n,i){var o=!0,s=null;try{s=Sn.intersection(t.p0,t.p1,n.p0,n.p1);var a=i<=0?1:s.distance(e)/Math.abs(i);a>this._bufParams.getMitreLimit()&&(o=!1)}catch(c){if(c instanceof rl)s=new K(0,0),o=!1;else throw c}finally{}o?this._segList.addPt(s):this.addLimitedMitreJoin(t,n,i,this._bufParams.getMitreLimit())},ot.prototype.addFilletCorner=function(e,t,n,i,o){var s=t.x-e.x,a=t.y-e.y,c=Math.atan2(a,s),f=n.x-e.x,m=n.y-e.y,p=Math.atan2(m,f);i===he.CLOCKWISE?c<=p&&(c+=2*Math.PI):c>=p&&(c-=2*Math.PI),this._segList.addPt(t),this.addFilletArc(e,c,p,i,o),this._segList.addPt(n)},ot.prototype.addOutsideTurn=function(e,t){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*ot.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===Qe.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===Qe.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))},ot.prototype.createSquare=function(e){this._segList.addPt(new K(e.x+this._distance,e.y+this._distance)),this._segList.addPt(new K(e.x+this._distance,e.y-this._distance)),this._segList.addPt(new K(e.x-this._distance,e.y-this._distance)),this._segList.addPt(new K(e.x-this._distance,e.y+this._distance)),this._segList.closeRing()},ot.prototype.addSegments=function(e,t){this._segList.addPts(e,t)},ot.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},ot.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},ot.prototype.initSideSegments=function(e,t,n){this._s1=e,this._s2=t,this._side=n,this._seg1.setCoordinates(e,t),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},ot.prototype.addLimitedMitreJoin=function(e,t,n,i){var o=this._seg0.p1,s=Ue.angle(o,this._seg0.p0),a=Ue.angleBetweenOriented(this._seg0.p0,o,this._seg1.p1),c=a/2,f=Ue.normalize(s+c),m=Ue.normalize(f+Math.PI),p=i*n,g=p*Math.abs(Math.sin(c)),w=n-g,_=o.x+p*Math.cos(m),y=o.y+p*Math.sin(m),h=new K(_,y),d=new Pe(o,h),u=d.pointAlongOffset(1,w),l=d.pointAlongOffset(1,-w);this._side===ie.LEFT?(this._segList.addPt(u),this._segList.addPt(l)):(this._segList.addPt(l),this._segList.addPt(u))},ot.prototype.computeOffsetSegment=function(e,t,n,i){var o=t===ie.LEFT?1:-1,s=e.p1.x-e.p0.x,a=e.p1.y-e.p0.y,c=Math.sqrt(s*s+a*a),f=o*n*s/c,m=o*n*a/c;i.p0.x=e.p0.x-m,i.p0.y=e.p0.y+f,i.p1.x=e.p1.x-m,i.p1.y=e.p1.y+f},ot.prototype.addFilletArc=function(e,t,n,i,o){var s=this,a=i===he.CLOCKWISE?-1:1,c=Math.abs(t-n),f=Math.trunc(c/this._filletAngleQuantum+.5);if(f<1)return null;for(var m=0,p=c/f,g=m,w=new K;g<c;){var _=t+a*g;w.x=e.x+o*Math.cos(_),w.y=e.y+o*Math.sin(_),s._segList.addPt(w),g+=p}},ot.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*ot.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new K((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(n);var i=new K((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)}},ot.prototype.createCircle=function(e){var t=new K(e.x+this._distance,e.y);this._segList.addPt(t),this.addFilletArc(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},ot.prototype.addBevelJoin=function(e,t){this._segList.addPt(e.p1),this._segList.addPt(t.p0)},ot.prototype.init=function(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Ur,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*ot.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},ot.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()===Qe.JOIN_BEVEL||this._bufParams.getJoinStyle()===Qe.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,he.CLOCKWISE,this._distance))},ot.prototype.closeRing=function(){this._segList.closeRing()},ot.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},ot.prototype.interfaces_=function(){return[]},ot.prototype.getClass=function(){return ot},pc.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},pc.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},pc.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},pc.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(ot,pc);var yr=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var e=arguments[0],t=arguments[1];this._precisionModel=e,this._bufParams=t};yr.prototype.getOffsetCurve=function(e,t){if(this._distance=t,t===0)return null;var n=t<0,i=Math.abs(t),o=this.getSegGen(i);e.length<=1?this.computePointCurve(e[0],o):this.computeOffsetCurve(e,n,o);var s=o.getCoordinates();return n&&ke.reverse(s),s},yr.prototype.computeSingleSidedBufferCurve=function(e,t,n){var i=this.simplifyTolerance(this._distance);if(t){n.addSegments(e,!0);var o=yt.simplify(e,-i),s=o.length-1;n.initSideSegments(o[s],o[s-1],ie.LEFT),n.addFirstSegment();for(var a=s-2;a>=0;a--)n.addNextSegment(o[a],!0)}else{n.addSegments(e,!1);var c=yt.simplify(e,i),f=c.length-1;n.initSideSegments(c[0],c[1],ie.LEFT),n.addFirstSegment();for(var m=2;m<=f;m++)n.addNextSegment(c[m],!0)}n.addLastSegment(),n.closeRing()},yr.prototype.computeRingBufferCurve=function(e,t,n){var i=this.simplifyTolerance(this._distance);t===ie.RIGHT&&(i=-i);var o=yt.simplify(e,i),s=o.length-1;n.initSideSegments(o[s-1],o[0],t);for(var a=1;a<=s;a++){var c=a!==1;n.addNextSegment(o[a],c)}n.closeRing()},yr.prototype.computeLineBufferCurve=function(e,t){var n=this.simplifyTolerance(this._distance),i=yt.simplify(e,n),o=i.length-1;t.initSideSegments(i[0],i[1],ie.LEFT);for(var s=2;s<=o;s++)t.addNextSegment(i[s],!0);t.addLastSegment(),t.addLineEndCap(i[o-1],i[o]);var a=yt.simplify(e,-n),c=a.length-1;t.initSideSegments(a[c],a[c-1],ie.LEFT);for(var f=c-2;f>=0;f--)t.addNextSegment(a[f],!0);t.addLastSegment(),t.addLineEndCap(a[1],a[0]),t.closeRing()},yr.prototype.computePointCurve=function(e,t){switch(this._bufParams.getEndCapStyle()){case Qe.CAP_ROUND:t.createCircle(e);break;case Qe.CAP_SQUARE:t.createSquare(e);break}},yr.prototype.getLineCurve=function(e,t){if(this._distance=t,t<0&&!this._bufParams.isSingleSided()||t===0)return null;var n=Math.abs(t),i=this.getSegGen(n);if(e.length<=1)this.computePointCurve(e[0],i);else if(this._bufParams.isSingleSided()){var o=t<0;this.computeSingleSidedBufferCurve(e,o,i)}else this.computeLineBufferCurve(e,i);var s=i.getCoordinates();return s},yr.prototype.getBufferParameters=function(){return this._bufParams},yr.prototype.simplifyTolerance=function(e){return e*this._bufParams.getSimplifyFactor()},yr.prototype.getRingCurve=function(e,t,n){if(this._distance=n,e.length<=2)return this.getLineCurve(e,n);if(n===0)return yr.copyCoordinates(e);var i=this.getSegGen(n);return this.computeRingBufferCurve(e,t,i),i.getCoordinates()},yr.prototype.computeOffsetCurve=function(e,t,n){var i=this.simplifyTolerance(this._distance);if(t){var o=yt.simplify(e,-i),s=o.length-1;n.initSideSegments(o[s],o[s-1],ie.LEFT),n.addFirstSegment();for(var a=s-2;a>=0;a--)n.addNextSegment(o[a],!0)}else{var c=yt.simplify(e,i),f=c.length-1;n.initSideSegments(c[0],c[1],ie.LEFT),n.addFirstSegment();for(var m=2;m<=f;m++)n.addNextSegment(c[m],!0)}n.addLastSegment()},yr.prototype.getSegGen=function(e){return new ot(this._precisionModel,this._bufParams,e)},yr.prototype.interfaces_=function(){return[]},yr.prototype.getClass=function(){return yr},yr.copyCoordinates=function(e){for(var t=new Array(e.length).fill(null),n=0;n<t.length;n++)t[n]=new K(e[n]);return t};var Ko=function(){this._subgraphs=null,this._seg=new Pe,this._cga=new he;var e=arguments[0];this._subgraphs=e},Eg={DepthSegment:{configurable:!0}};Ko.prototype.findStabbedSegments=function(){var e=this;if(arguments.length===1){for(var t=arguments[0],n=new ue,i=this._subgraphs.iterator();i.hasNext();){var o=i.next(),s=o.getEnvelope();t.y<s.getMinY()||t.y>s.getMaxY()||e.findStabbedSegments(t,o.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(Me(arguments[2],xn)&&arguments[0]instanceof K&&arguments[1]instanceof Xf)for(var a=arguments[0],c=arguments[1],f=arguments[2],m=c.getEdge().getCoordinates(),p=0;p<m.length-1;p++){e._seg.p0=m[p],e._seg.p1=m[p+1],e._seg.p0.y>e._seg.p1.y&&e._seg.reverse();var g=Math.max(e._seg.p0.x,e._seg.p1.x);if(!(g<a.x)&&!e._seg.isHorizontal()&&!(a.y<e._seg.p0.y||a.y>e._seg.p1.y)&&he.computeOrientation(e._seg.p0,e._seg.p1,a)!==he.RIGHT){var w=c.getDepth(ie.LEFT);e._seg.p0.equals(m[p])||(w=c.getDepth(ie.RIGHT));var _=new oo(e._seg,w);f.add(_)}}else if(Me(arguments[2],xn)&&arguments[0]instanceof K&&Me(arguments[1],xn))for(var y=arguments[0],h=arguments[1],d=arguments[2],u=h.iterator();u.hasNext();){var l=u.next();l.isForward()&&e.findStabbedSegments(y,l,d)}}},Ko.prototype.getDepth=function(e){var t=this.findStabbedSegments(e);if(t.size()===0)return 0;var n=Tn.min(t);return n._leftDepth},Ko.prototype.interfaces_=function(){return[]},Ko.prototype.getClass=function(){return Ko},Eg.DepthSegment.get=function(){return oo},Object.defineProperties(Ko,Eg);var oo=function(){this._upwardSeg=null,this._leftDepth=null;var e=arguments[0],t=arguments[1];this._upwardSeg=new Pe(e),this._leftDepth=t};oo.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 n=this._upwardSeg.orientationIndex(t._upwardSeg);return n!==0||(n=-1*t._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(t._upwardSeg)},oo.prototype.compareX=function(e,t){var n=e.p0.compareTo(t.p0);return n!==0?n:e.p1.compareTo(t.p1)},oo.prototype.toString=function(){return this._upwardSeg.toString()},oo.prototype.interfaces_=function(){return[rn]},oo.prototype.getClass=function(){return oo};var $e=function(e,t,n){this.p0=e||null,this.p1=t||null,this.p2=n||null};$e.prototype.area=function(){return $e.area(this.p0,this.p1,this.p2)},$e.prototype.signedArea=function(){return $e.signedArea(this.p0,this.p1,this.p2)},$e.prototype.interpolateZ=function(e){if(e===null)throw new ct("Supplied point is null.");return $e.interpolateZ(e,this.p0,this.p1,this.p2)},$e.prototype.longestSideLength=function(){return $e.longestSideLength(this.p0,this.p1,this.p2)},$e.prototype.isAcute=function(){return $e.isAcute(this.p0,this.p1,this.p2)},$e.prototype.circumcentre=function(){return $e.circumcentre(this.p0,this.p1,this.p2)},$e.prototype.area3D=function(){return $e.area3D(this.p0,this.p1,this.p2)},$e.prototype.centroid=function(){return $e.centroid(this.p0,this.p1,this.p2)},$e.prototype.inCentre=function(){return $e.inCentre(this.p0,this.p1,this.p2)},$e.prototype.interfaces_=function(){return[]},$e.prototype.getClass=function(){return $e},$e.area=function(e,t,n){return Math.abs(((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2)},$e.signedArea=function(e,t,n){return((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2},$e.det=function(e,t,n,i){return e*i-t*n},$e.interpolateZ=function(e,t,n,i){var o=t.x,s=t.y,a=n.x-o,c=i.x-o,f=n.y-s,m=i.y-s,p=a*m-c*f,g=e.x-o,w=e.y-s,_=(m*g-c*w)/p,y=(-f*g+a*w)/p,h=t.z+_*(n.z-t.z)+y*(i.z-t.z);return h},$e.longestSideLength=function(e,t,n){var i=e.distance(t),o=t.distance(n),s=n.distance(e),a=i;return o>a&&(a=o),s>a&&(a=s),a},$e.isAcute=function(e,t,n){return!(!Ue.isAcute(e,t,n)||!Ue.isAcute(t,n,e)||!Ue.isAcute(n,e,t))},$e.circumcentre=function(e,t,n){var i=n.x,o=n.y,s=e.x-i,a=e.y-o,c=t.x-i,f=t.y-o,m=2*$e.det(s,a,c,f),p=$e.det(a,s*s+a*a,f,c*c+f*f),g=$e.det(s,s*s+a*a,c,c*c+f*f),w=i-p/m,_=o+g/m;return new K(w,_)},$e.perpendicularBisector=function(e,t){var n=t.x-e.x,i=t.y-e.y,o=new Sn(e.x+n/2,e.y+i/2,1),s=new Sn(e.x-i+n/2,e.y+n+i/2,1);return new Sn(o,s)},$e.angleBisector=function(e,t,n){var i=t.distance(e),o=t.distance(n),s=i/(i+o),a=n.x-e.x,c=n.y-e.y,f=new K(e.x+s*a,e.y+s*c);return f},$e.area3D=function(e,t,n){var i=t.x-e.x,o=t.y-e.y,s=t.z-e.z,a=n.x-e.x,c=n.y-e.y,f=n.z-e.z,m=o*f-s*c,p=s*a-i*f,g=i*c-o*a,w=m*m+p*p+g*g,_=Math.sqrt(w)/2;return _},$e.centroid=function(e,t,n){var i=(e.x+t.x+n.x)/3,o=(e.y+t.y+n.y)/3;return new K(i,o)},$e.inCentre=function(e,t,n){var i=t.distance(n),o=e.distance(n),s=e.distance(t),a=i+o+s,c=(i*e.x+o*t.x+s*n.x)/a,f=(i*e.y+o*t.y+s*n.y)/a;return new K(c,f)};var ln=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new ue;var e=arguments[0],t=arguments[1],n=arguments[2];this._inputGeom=e,this._distance=t,this._curveBuilder=n};ln.prototype.addPoint=function(e){if(this._distance<=0)return null;var t=e.getCoordinates(),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,Q.EXTERIOR,Q.INTERIOR)},ln.prototype.addPolygon=function(e){var t=this,n=this._distance,i=ie.LEFT;this._distance<0&&(n=-this._distance,i=ie.RIGHT);var o=e.getExteriorRing(),s=ke.removeRepeatedPoints(o.getCoordinates());if(this._distance<0&&this.isErodedCompletely(o,this._distance)||this._distance<=0&&s.length<3)return null;this.addPolygonRing(s,n,i,Q.EXTERIOR,Q.INTERIOR);for(var a=0;a<e.getNumInteriorRing();a++){var c=e.getInteriorRingN(a),f=ke.removeRepeatedPoints(c.getCoordinates());t._distance>0&&t.isErodedCompletely(c,-t._distance)||t.addPolygonRing(f,n,ie.opposite(i),Q.INTERIOR,Q.EXTERIOR)}},ln.prototype.isTriangleErodedCompletely=function(e,t){var n=new $e(e[0],e[1],e[2]),i=n.inCentre(),o=he.distancePointLine(i,n.p0,n.p1);return o<Math.abs(t)},ln.prototype.addLineString=function(e){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var t=ke.removeRepeatedPoints(e.getCoordinates()),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,Q.EXTERIOR,Q.INTERIOR)},ln.prototype.addCurve=function(e,t,n){if(e===null||e.length<2)return null;var i=new Et(e,new Ze(0,Q.BOUNDARY,t,n));this._curveList.add(i)},ln.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},ln.prototype.addPolygonRing=function(e,t,n,i,o){if(t===0&&e.length<yi.MINIMUM_VALID_SIZE)return null;var s=i,a=o;e.length>=yi.MINIMUM_VALID_SIZE&&he.isCCW(e)&&(s=o,a=i,n=ie.opposite(n));var c=this._curveBuilder.getRingCurve(e,n,t);this.addCurve(c,s,a)},ln.prototype.add=function(e){if(e.isEmpty())return null;e instanceof It?this.addPolygon(e):e instanceof vt?this.addLineString(e):e instanceof Nr?this.addPoint(e):e instanceof hl?this.addCollection(e):e instanceof io?this.addCollection(e):e instanceof mi?this.addCollection(e):e instanceof sr&&this.addCollection(e)},ln.prototype.isErodedCompletely=function(e,t){var n=e.getCoordinates();if(n.length<4)return t<0;if(n.length===4)return this.isTriangleErodedCompletely(n,t);var i=e.getEnvelopeInternal(),o=Math.min(i.getHeight(),i.getWidth());return t<0&&2*Math.abs(t)>o},ln.prototype.addCollection=function(e){for(var t=this,n=0;n<e.getNumGeometries();n++){var i=e.getGeometryN(n);t.add(i)}},ln.prototype.interfaces_=function(){return[]},ln.prototype.getClass=function(){return ln};var gl=function(){};gl.prototype.locate=function(e){},gl.prototype.interfaces_=function(){return[]},gl.prototype.getClass=function(){return gl};var wi=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()};wi.prototype.next=function(){if(this._atStart)return this._atStart=!1,wi.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 ll;var e=this._parent.getGeometryN(this._index++);return e instanceof sr?(this._subcollectionIterator=new wi(e),this._subcollectionIterator.next()):e},wi.prototype.remove=function(){throw new Error(this.getClass().getName())},wi.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)},wi.prototype.interfaces_=function(){return[ul]},wi.prototype.getClass=function(){return wi},wi.isAtomic=function(e){return!(e instanceof sr)};var Wr=function(){this._geom=null;var e=arguments[0];this._geom=e};Wr.prototype.locate=function(e){return Wr.locate(e,this._geom)},Wr.prototype.interfaces_=function(){return[gl]},Wr.prototype.getClass=function(){return Wr},Wr.isPointInRing=function(e,t){return t.getEnvelopeInternal().intersects(e)?he.isPointInRing(e,t.getCoordinates()):!1},Wr.containsPointInPolygon=function(e,t){if(t.isEmpty())return!1;var n=t.getExteriorRing();if(!Wr.isPointInRing(e,n))return!1;for(var i=0;i<t.getNumInteriorRing();i++){var o=t.getInteriorRingN(i);if(Wr.isPointInRing(e,o))return!1}return!0},Wr.containsPoint=function(e,t){if(t instanceof It)return Wr.containsPointInPolygon(e,t);if(t instanceof sr)for(var n=new wi(t);n.hasNext();){var i=n.next();if(i!==t&&Wr.containsPoint(e,i))return!0}return!1},Wr.locate=function(e,t){return t.isEmpty()?Q.EXTERIOR:Wr.containsPoint(e,t)?Q.INTERIOR:Q.EXTERIOR};var Zt=function(){this._edgeMap=new Qt,this._edgeList=null,this._ptInAreaLocation=[Q.NONE,Q.NONE]};Zt.prototype.getNextCW=function(e){this.getEdges();var t=this._edgeList.indexOf(e),n=t-1;return t===0&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Zt.prototype.propagateSideLabels=function(e){for(var t=Q.NONE,n=this.iterator();n.hasNext();){var i=n.next(),o=i.getLabel();o.isArea(e)&&o.getLocation(e,ie.LEFT)!==Q.NONE&&(t=o.getLocation(e,ie.LEFT))}if(t===Q.NONE)return null;for(var s=t,a=this.iterator();a.hasNext();){var c=a.next(),f=c.getLabel();if(f.getLocation(e,ie.ON)===Q.NONE&&f.setLocation(e,ie.ON,s),f.isArea(e)){var m=f.getLocation(e,ie.LEFT),p=f.getLocation(e,ie.RIGHT);if(p!==Q.NONE){if(p!==s)throw new Yi("side location conflict",c.getCoordinate());m===Q.NONE&&Fe.shouldNeverReachHere("found single null side (at "+c.getCoordinate()+")"),s=m}else Fe.isTrue(f.getLocation(e,ie.LEFT)===Q.NONE,"found single null side"),f.setLocation(e,ie.RIGHT,s),f.setLocation(e,ie.LEFT,s)}}},Zt.prototype.getCoordinate=function(){var e=this.iterator();if(!e.hasNext())return null;var t=e.next();return t.getCoordinate()},Zt.prototype.print=function(e){Bt.out.println("EdgeEndStar: "+this.getCoordinate());for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},Zt.prototype.isAreaLabelsConsistent=function(e){return this.computeEdgeEndLabels(e.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Zt.prototype.checkAreaLabelsConsistent=function(e){var t=this.getEdges();if(t.size()<=0)return!0;var n=t.size()-1,i=t.get(n).getLabel(),o=i.getLocation(e,ie.LEFT);Fe.isTrue(o!==Q.NONE,"Found unlabelled area edge");for(var s=o,a=this.iterator();a.hasNext();){var c=a.next(),f=c.getLabel();Fe.isTrue(f.isArea(e),"Found non-area edge");var m=f.getLocation(e,ie.LEFT),p=f.getLocation(e,ie.RIGHT);if(m===p||p!==s)return!1;s=m}return!0},Zt.prototype.findIndex=function(e){var t=this;this.iterator();for(var n=0;n<this._edgeList.size();n++){var i=t._edgeList.get(n);if(i===e)return n}return-1},Zt.prototype.iterator=function(){return this.getEdges().iterator()},Zt.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new ue(this._edgeMap.values())),this._edgeList},Zt.prototype.getLocation=function(e,t,n){return this._ptInAreaLocation[e]===Q.NONE&&(this._ptInAreaLocation[e]=Wr.locate(t,n[e].getGeometry())),this._ptInAreaLocation[e]},Zt.prototype.toString=function(){var e=new zn;e.append("EdgeEndStar: "+this.getCoordinate()),e.append(`
253
+ `);for(var t=this.iterator();t.hasNext();){var n=t.next();e.append(n),e.append(`
254
+ `)}return e.toString()},Zt.prototype.computeEdgeEndLabels=function(e){for(var t=this.iterator();t.hasNext();){var n=t.next();n.computeLabel(e)}},Zt.prototype.computeLabelling=function(e){var t=this;this.computeEdgeEndLabels(e[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var n=[!1,!1],i=this.iterator();i.hasNext();)for(var o=i.next(),s=o.getLabel(),a=0;a<2;a++)s.isLine(a)&&s.getLocation(a)===Q.BOUNDARY&&(n[a]=!0);for(var c=this.iterator();c.hasNext();)for(var f=c.next(),m=f.getLabel(),p=0;p<2;p++)if(m.isAnyNull(p)){var g=Q.NONE;if(n[p])g=Q.EXTERIOR;else{var w=f.getCoordinate();g=t.getLocation(p,w,e)}m.setAllLocationsIfNull(p,g)}},Zt.prototype.getDegree=function(){return this._edgeMap.size()},Zt.prototype.insertEdgeEnd=function(e,t){this._edgeMap.put(e,t),this._edgeList=null},Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt};var L_=function(r){function e(){r.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){var n=this;this.getResultAreaEdges();for(var i=null,o=null,s=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var c=n._resultAreaEdgeList.get(a),f=c.getSym();if(c.getLabel().isArea())switch(i===null&&c.isInResult()&&(i=c),s){case n._SCANNING_FOR_INCOMING:if(!f.isInResult())continue;o=f,s=n._LINKING_TO_OUTGOING;break;case n._LINKING_TO_OUTGOING:if(!c.isInResult())continue;o.setNext(c),s=n._SCANNING_FOR_INCOMING;break}}if(s===this._LINKING_TO_OUTGOING){if(i===null)throw new Yi("no outgoing dirEdge found",this.getCoordinate());Fe.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),o.setNext(i)}},e.prototype.insert=function(n){var i=n;this.insertEdgeEnd(i,i)},e.prototype.getRightmostEdge=function(){var n=this.getEdges(),i=n.size();if(i<1)return null;var o=n.get(0);if(i===1)return o;var s=n.get(i-1),a=o.getQuadrant(),c=s.getQuadrant();return et.isNorthern(a)&&et.isNorthern(c)?o:!et.isNorthern(a)&&!et.isNorthern(c)?s:o.getDy()!==0?o:s.getDy()!==0?s:(Fe.shouldNeverReachHere("found two horizontal edges incident on node"),null)},e.prototype.print=function(n){Bt.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var o=i.next();n.print("out "),o.print(n),n.println(),n.print("in "),o.getSym().print(n),n.println()}},e.prototype.getResultAreaEdges=function(){var n=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new ue;for(var i=this.iterator();i.hasNext();){var o=i.next();(o.isInResult()||o.getSym().isInResult())&&n._resultAreaEdgeList.add(o)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(n){for(var i=this.iterator();i.hasNext();){var o=i.next(),s=o.getLabel();s.setAllLocationsIfNull(0,n.getLocation(0)),s.setAllLocationsIfNull(1,n.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){var n=this;this.getEdges();for(var i=null,o=null,s=this._edgeList.size()-1;s>=0;s--){var a=n._edgeList.get(s),c=a.getSym();o===null&&(o=c),i!==null&&c.setNext(i),i=a}o.setNext(i)},e.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var i=arguments[0],o=this.findIndex(i),s=i.getDepth(ie.LEFT),a=i.getDepth(ie.RIGHT),c=this.computeDepths(o+1,this._edgeList.size(),s),f=this.computeDepths(0,o,c);if(f!==a)throw new Yi("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var m=arguments[0],p=arguments[1],g=arguments[2],w=g,_=m;_<p;_++){var y=n._edgeList.get(_);y.setEdgeDepths(ie.RIGHT,w),w=y.getDepth(ie.LEFT)}return w}},e.prototype.mergeSymLabels=function(){for(var n=this.iterator();n.hasNext();){var i=n.next(),o=i.getLabel();o.merge(i.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(n){for(var i=this,o=null,s=null,a=this._SCANNING_FOR_INCOMING,c=this._resultAreaEdgeList.size()-1;c>=0;c--){var f=i._resultAreaEdgeList.get(c),m=f.getSym();switch(o===null&&f.getEdgeRing()===n&&(o=f),a){case i._SCANNING_FOR_INCOMING:if(m.getEdgeRing()!==n)continue;s=m,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(f.getEdgeRing()!==n)continue;s.setNextMin(f),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(Fe.isTrue(o!==null,"found null for first outgoing dirEdge"),Fe.isTrue(o.getEdgeRing()===n,"unable to link last incoming dirEdge"),s.setNextMin(o))},e.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,i=this.iterator();i.hasNext();){var o=i.next();o.isInResult()&&n++}return n}else if(arguments.length===1){for(var s=arguments[0],a=0,c=this.iterator();c.hasNext();){var f=c.next();f.getEdgeRing()===s&&a++}return a}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var n=Q.NONE,i=this.iterator();i.hasNext();){var o=i.next(),s=o.getSym();if(!o.isLineEdge()){if(o.isInResult()){n=Q.INTERIOR;break}if(s.isInResult()){n=Q.EXTERIOR;break}}}if(n===Q.NONE)return null;for(var a=n,c=this.iterator();c.hasNext();){var f=c.next(),m=f.getSym();f.isLineEdge()?f.getEdge().setCovered(a===Q.INTERIOR):(f.isInResult()&&(a=Q.EXTERIOR),m.isInResult()&&(a=Q.INTERIOR))}},e.prototype.computeLabelling=function(n){var i=this;r.prototype.computeLabelling.call(this,n),this._label=new Ze(Q.NONE);for(var o=this.iterator();o.hasNext();)for(var s=o.next(),a=s.getEdge(),c=a.getLabel(),f=0;f<2;f++){var m=c.getLocation(f);(m===Q.INTERIOR||m===Q.BOUNDARY)&&i._label.setLocation(f,Q.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Zt),Pg=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.createNode=function(n){return new Eh(n,new L_)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(fl),Cs=function r(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=r.orientation(e)};Cs.prototype.compareTo=function(e){var t=e,n=Cs.compareOriented(this._pts,this._orientation,t._pts,t._orientation);return n},Cs.prototype.interfaces_=function(){return[rn]},Cs.prototype.getClass=function(){return Cs},Cs.orientation=function(e){return ke.increasingDirection(e)===1},Cs.compareOriented=function(e,t,n,i){for(var o=t?1:-1,s=i?1:-1,a=t?e.length:-1,c=i?n.length:-1,f=t?0:e.length-1,m=i?0:n.length-1;;){var p=e[f].compareTo(n[m]);if(p!==0)return p;f+=o,m+=s;var g=f===a,w=m===c;if(g&&!w)return-1;if(!g&&w)return 1;if(g&&w)return 0}};var Nn=function(){this._edges=new ue,this._ocaMap=new Qt};Nn.prototype.print=function(e){var t=this;e.print("MULTILINESTRING ( ");for(var n=0;n<this._edges.size();n++){var i=t._edges.get(n);n>0&&e.print(","),e.print("(");for(var o=i.getCoordinates(),s=0;s<o.length;s++)s>0&&e.print(","),e.print(o[s].x+" "+o[s].y);e.println(")")}e.print(") ")},Nn.prototype.addAll=function(e){for(var t=this,n=e.iterator();n.hasNext();)t.add(n.next())},Nn.prototype.findEdgeIndex=function(e){for(var t=this,n=0;n<this._edges.size();n++)if(t._edges.get(n).equals(e))return n;return-1},Nn.prototype.iterator=function(){return this._edges.iterator()},Nn.prototype.getEdges=function(){return this._edges},Nn.prototype.get=function(e){return this._edges.get(e)},Nn.prototype.findEqualEdge=function(e){var t=new Cs(e.getCoordinates()),n=this._ocaMap.get(t);return n},Nn.prototype.add=function(e){this._edges.add(e);var t=new Cs(e.getCoordinates());this._ocaMap.put(t,e)},Nn.prototype.interfaces_=function(){return[]},Nn.prototype.getClass=function(){return Nn};var ao=function(){};ao.prototype.processIntersections=function(e,t,n,i){},ao.prototype.isDone=function(){},ao.prototype.interfaces_=function(){return[]},ao.prototype.getClass=function(){return ao};var qr=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};qr.prototype.isTrivialIntersection=function(e,t,n,i){if(e===n&&this._li.getIntersectionNum()===1){if(qr.isAdjacentSegments(t,i))return!0;if(e.isClosed()){var o=e.size()-1;if(t===0&&i===o||i===0&&t===o)return!0}}return!1},qr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},qr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},qr.prototype.getLineIntersector=function(){return this._li},qr.prototype.hasProperIntersection=function(){return this._hasProper},qr.prototype.processIntersections=function(e,t,n,i){if(e===n&&t===i)return null;this.numTests++;var o=e.getCoordinates()[t],s=e.getCoordinates()[t+1],a=n.getCoordinates()[i],c=n.getCoordinates()[i+1];this._li.computeIntersection(o,s,a,c),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(e,t,n,i)||(this._hasIntersection=!0,e.addIntersections(this._li,t,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},qr.prototype.hasIntersection=function(){return this._hasIntersection},qr.prototype.isDone=function(){return!1},qr.prototype.hasInteriorIntersection=function(){return this._hasInterior},qr.prototype.interfaces_=function(){return[ao]},qr.prototype.getClass=function(){return qr},qr.isAdjacentSegments=function(e,t){return Math.abs(e-t)===1};var ei=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var e=arguments[0],t=arguments[1],n=arguments[2];this.coord=new K(e),this.segmentIndex=t,this.dist=n};ei.prototype.getSegmentIndex=function(){return this.segmentIndex},ei.prototype.getCoordinate=function(){return this.coord},ei.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex),e.println(" dist = "+this.dist)},ei.prototype.compareTo=function(e){var t=e;return this.compare(t.segmentIndex,t.dist)},ei.prototype.isEndPoint=function(e){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===e},ei.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},ei.prototype.getDistance=function(){return this.dist},ei.prototype.compare=function(e,t){return this.segmentIndex<e?-1:this.segmentIndex>e?1:this.dist<t?-1:this.dist>t?1:0},ei.prototype.interfaces_=function(){return[rn]},ei.prototype.getClass=function(){return ei};var Ei=function(){this._nodeMap=new Qt,this.edge=null;var e=arguments[0];this.edge=e};Ei.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();){var n=t.next();n.print(e)}},Ei.prototype.iterator=function(){return this._nodeMap.values().iterator()},Ei.prototype.addSplitEdges=function(e){var t=this;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var o=n.next(),s=t.createSplitEdge(i,o);e.add(s),i=o}},Ei.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)},Ei.prototype.createSplitEdge=function(e,t){var n=this,i=t.segmentIndex-e.segmentIndex+2,o=this.edge.pts[t.segmentIndex],s=t.dist>0||!t.coord.equals2D(o);s||i--;var a=new Array(i).fill(null),c=0;a[c++]=new K(e.coord);for(var f=e.segmentIndex+1;f<=t.segmentIndex;f++)a[c++]=n.edge.pts[f];return s&&(a[c]=t.coord),new Sh(a,new Ze(this.edge._label))},Ei.prototype.add=function(e,t,n){var i=new ei(e,t,n),o=this._nodeMap.get(i);return o!==null?o:(this._nodeMap.put(i,i),i)},Ei.prototype.isIntersection=function(e){for(var t=this.iterator();t.hasNext();){var n=t.next();if(n.coord.equals(e))return!0}return!1},Ei.prototype.interfaces_=function(){return[]},Ei.prototype.getClass=function(){return Ei};var uo=function(){};uo.prototype.getChainStartIndices=function(e){var t=this,n=0,i=new ue;i.add(new Un(n));do{var o=t.findChainEnd(e,n);i.add(new Un(o)),n=o}while(n<e.length-1);var s=uo.toIntArray(i);return s},uo.prototype.findChainEnd=function(e,t){for(var n=et.quadrant(e[t],e[t+1]),i=t+1;i<e.length;){var o=et.quadrant(e[i-1],e[i]);if(o!==n)break;i++}return i-1},uo.prototype.interfaces_=function(){return[]},uo.prototype.getClass=function(){return uo},uo.toIntArray=function(e){for(var t=new Array(e.size()).fill(null),n=0;n<t.length;n++)t[n]=e.get(n).intValue();return t};var Qi=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new Ee,this.env2=new Ee;var e=arguments[0];this.e=e,this.pts=e.getCoordinates();var t=new uo;this.startIndex=t.getChainStartIndices(this.pts)};Qi.prototype.getCoordinates=function(){return this.pts},Qi.prototype.getMaxX=function(e){var t=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return t>n?t:n},Qi.prototype.getMinX=function(e){var t=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return t<n?t:n},Qi.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var e=arguments[0],t=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[e],this.startIndex[e+1],t,t.startIndex[n],t.startIndex[n+1],i)}else if(arguments.length===6){var o=arguments[0],s=arguments[1],a=arguments[2],c=arguments[3],f=arguments[4],m=arguments[5],p=this.pts[o],g=this.pts[s],w=a.pts[c],_=a.pts[f];if(s-o===1&&f-c===1)return m.addIntersections(this.e,o,a.e,c),null;if(this.env1.init(p,g),this.env2.init(w,_),!this.env1.intersects(this.env2))return null;var y=Math.trunc((o+s)/2),h=Math.trunc((c+f)/2);o<y&&(c<h&&this.computeIntersectsForChain(o,y,a,c,h,m),h<f&&this.computeIntersectsForChain(o,y,a,h,f,m)),y<s&&(c<h&&this.computeIntersectsForChain(y,s,a,c,h,m),h<f&&this.computeIntersectsForChain(y,s,a,h,f,m))}},Qi.prototype.getStartIndexes=function(){return this.startIndex},Qi.prototype.computeIntersects=function(e,t){for(var n=this,i=0;i<this.startIndex.length-1;i++)for(var o=0;o<e.startIndex.length-1;o++)n.computeIntersectsForChain(i,e,o,t)},Qi.prototype.interfaces_=function(){return[]},Qi.prototype.getClass=function(){return Qi};var zt=function r(){var e=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var t=0;t<2;t++)for(var n=0;n<3;n++)e._depth[t][n]=r.NULL_VALUE},Sg={NULL_VALUE:{configurable:!0}};zt.prototype.getDepth=function(e,t){return this._depth[e][t]},zt.prototype.setDepth=function(e,t,n){this._depth[e][t]=n},zt.prototype.isNull=function(){var e=this;if(arguments.length===0){for(var t=0;t<2;t++)for(var n=0;n<3;n++)if(e._depth[t][n]!==zt.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===zt.NULL_VALUE}else if(arguments.length===2){var o=arguments[0],s=arguments[1];return this._depth[o][s]===zt.NULL_VALUE}},zt.prototype.normalize=function(){for(var e=this,t=0;t<2;t++)if(!e.isNull(t)){var n=e._depth[t][1];e._depth[t][2]<n&&(n=e._depth[t][2]),n<0&&(n=0);for(var i=1;i<3;i++){var o=0;e._depth[t][i]>n&&(o=1),e._depth[t][i]=o}}},zt.prototype.getDelta=function(e){return this._depth[e][ie.RIGHT]-this._depth[e][ie.LEFT]},zt.prototype.getLocation=function(e,t){return this._depth[e][t]<=0?Q.EXTERIOR:Q.INTERIOR},zt.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},zt.prototype.add=function(){var e=this;if(arguments.length===1)for(var t=arguments[0],n=0;n<2;n++)for(var i=1;i<3;i++){var o=t.getLocation(n,i);(o===Q.EXTERIOR||o===Q.INTERIOR)&&(e.isNull(n,i)?e._depth[n][i]=zt.depthAtLocation(o):e._depth[n][i]+=zt.depthAtLocation(o))}else if(arguments.length===3){var s=arguments[0],a=arguments[1],c=arguments[2];c===Q.INTERIOR&&this._depth[s][a]++}},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt},zt.depthAtLocation=function(e){return e===Q.EXTERIOR?0:e===Q.INTERIOR?1:zt.NULL_VALUE},Sg.NULL_VALUE.get=function(){return-1},Object.defineProperties(zt,Sg);var Sh=function(r){function e(){if(r.call(this),this.pts=null,this._env=null,this.eiList=new Ei(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new zt,this._depthDelta=0,arguments.length===1){var t=arguments[0];e.call(this,t,null)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.pts=n,this._label=i}}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var i=new e(n,Ze.toLineLabel(this._label));return i},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(n){this._isIsolated=n},e.prototype.setName=function(n){this._name=n},e.prototype.equals=function(n){var i=this;if(!(n instanceof e))return!1;var o=n;if(this.pts.length!==o.pts.length)return!1;for(var s=!0,a=!0,c=this.pts.length,f=0;f<this.pts.length;f++)if(i.pts[f].equals2D(o.pts[f])||(s=!1),i.pts[f].equals2D(o.pts[--c])||(a=!1),!s&&!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 n=arguments[0];return this.pts[n]}},e.prototype.print=function(n){var i=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var o=0;o<this.pts.length;o++)o>0&&n.print(","),n.print(i.pts[o].x+" "+i.pts[o].y);n.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(n){e.updateIM(this._label,n)},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(n){var i=this;n.print("edge "+this._name+": ");for(var o=this.pts.length-1;o>=0;o--)n.print(i.pts[o]+" ");n.println("")},e.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Qi(this)),this._mce},e.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new Ee;for(var i=0;i<this.pts.length;i++)n._env.expandToInclude(n.pts[i])}return this._env},e.prototype.addIntersection=function(n,i,o,s){var a=new K(n.getIntersection(s)),c=i,f=n.getEdgeDistance(o,s),m=c+1;if(m<this.pts.length){var p=this.pts[m];a.equals2D(p)&&(c=m,f=0)}this.eiList.add(a,c,f)},e.prototype.toString=function(){var n=this,i=new zn;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var o=0;o<this.pts.length;o++)o>0&&i.append(","),i.append(n.pts[o].x+" "+n.pts[o].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},e.prototype.isPointwiseEqual=function(n){var i=this;if(this.pts.length!==n.pts.length)return!1;for(var o=0;o<this.pts.length;o++)if(!i.pts[o].equals2D(n.pts[o]))return!1;return!0},e.prototype.setDepthDelta=function(n){this._depthDelta=n},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(n,i,o){for(var s=this,a=0;a<n.getIntersectionNum();a++)s.addIntersection(n,i,o,a)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];i.setAtLeastIfValid(n.getLocation(0,ie.ON),n.getLocation(1,ie.ON),1),n.isArea()&&(i.setAtLeastIfValid(n.getLocation(0,ie.LEFT),n.getLocation(1,ie.LEFT),2),i.setAtLeastIfValid(n.getLocation(0,ie.RIGHT),n.getLocation(1,ie.RIGHT),2))}else return r.prototype.updateIM.apply(this,arguments)},e}(zr),ur=function(e){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Nn,this._bufParams=e||null};ur.prototype.setWorkingPrecisionModel=function(e){this._workingPrecisionModel=e},ur.prototype.insertUniqueEdge=function(e){var t=this._edgeList.findEqualEdge(e);if(t!==null){var n=t.getLabel(),i=e.getLabel();t.isPointwiseEqual(e)||(i=new Ze(e.getLabel()),i.flip()),n.merge(i);var o=ur.depthDelta(i),s=t.getDepthDelta(),a=s+o;t.setDepthDelta(a)}else this._edgeList.add(e),e.setDepthDelta(ur.depthDelta(e.getLabel()))},ur.prototype.buildSubgraphs=function(e,t){for(var n=new ue,i=e.iterator();i.hasNext();){var o=i.next(),s=o.getRightmostCoordinate(),a=new Ko(n),c=a.getDepth(s);o.computeDepth(c),o.findResultEdges(),n.add(o),t.add(o.getDirectedEdges(),o.getNodes())}},ur.prototype.createSubgraphs=function(e){for(var t=new ue,n=e.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var o=new or;o.create(i),t.add(o)}}return Tn.sort(t,Tn.reverseOrder()),t},ur.prototype.createEmptyResultGeometry=function(){var e=this._geomFact.createPolygon();return e},ur.prototype.getNoder=function(e){if(this._workingNoder!==null)return this._workingNoder;var t=new Yf,n=new to;return n.setPrecisionModel(e),t.setSegmentIntersector(new qr(n)),t},ur.prototype.buffer=function(e,t){var n=this._workingPrecisionModel;n===null&&(n=e.getPrecisionModel()),this._geomFact=e.getFactory();var i=new yr(n,this._bufParams),o=new ln(e,t,i),s=o.getCurves();if(s.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(s,n),this._graph=new dt(new Pg),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),c=new Dr(this._geomFact);this.buildSubgraphs(a,c);var f=c.getPolygons();if(f.size()<=0)return this.createEmptyResultGeometry();var m=this._geomFact.buildGeometry(f);return m},ur.prototype.computeNodedEdges=function(e,t){var n=this,i=this.getNoder(t);i.computeNodes(e);for(var o=i.getNodedSubstrings(),s=o.iterator();s.hasNext();){var a=s.next(),c=a.getCoordinates();if(!(c.length===2&&c[0].equals2D(c[1]))){var f=a.getData(),m=new Sh(a.getCoordinates(),new Ze(f));n.insertUniqueEdge(m)}}},ur.prototype.setNoder=function(e){this._workingNoder=e},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur},ur.depthDelta=function(e){var t=e.getLocation(0,ie.LEFT),n=e.getLocation(0,ie.RIGHT);return t===Q.INTERIOR&&n===Q.EXTERIOR?1:t===Q.EXTERIOR&&n===Q.INTERIOR?-1:0},ur.convertSegStrings=function(e){for(var t=new Ge,n=new ue;e.hasNext();){var i=e.next(),o=t.createLineString(i.getCoordinates());n.add(o)}return t.buildGeometry(n)};var xs=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 n=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=o,this._offsetY=s,this._isScaled=!this.isIntegerPrecision()}};xs.prototype.rescale=function(){var e=this;if(Me(arguments[0],Mt))for(var t=arguments[0],n=t.iterator();n.hasNext();){var i=n.next();e.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var o=arguments[0],s=0;s<o.length;s++)o[s].x=o[s].x/e._scaleFactor+e._offsetX,o[s].y=o[s].y/e._scaleFactor+e._offsetY;o.length===2&&o[0].equals2D(o[1])&&Bt.out.println(o)}},xs.prototype.scale=function(){var e=this;if(Me(arguments[0],Mt)){for(var t=arguments[0],n=new ue,i=t.iterator();i.hasNext();){var o=i.next();n.add(new Et(e.scale(o.getCoordinates()),o.getData()))}return n}else if(arguments[0]instanceof Array){for(var s=arguments[0],a=new Array(s.length).fill(null),c=0;c<s.length;c++)a[c]=new K(Math.round((s[c].x-e._offsetX)*e._scaleFactor),Math.round((s[c].y-e._offsetY)*e._scaleFactor),s[c].z);var f=ke.removeRepeatedPoints(a);return f}},xs.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},xs.prototype.getNodedSubstrings=function(){var e=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(e),e},xs.prototype.computeNodes=function(e){var t=e;this._isScaled&&(t=this.scale(e)),this._noder.computeNodes(t)},xs.prototype.interfaces_=function(){return[so]},xs.prototype.getClass=function(){return xs};var ti=function(){this._li=new to,this._segStrings=null;var e=arguments[0];this._segStrings=e},Cg={fact:{configurable:!0}};ti.prototype.checkEndPtVertexIntersections=function(){var e=this;if(arguments.length===0)for(var t=this._segStrings.iterator();t.hasNext();){var n=t.next(),i=n.getCoordinates();e.checkEndPtVertexIntersections(i[0],e._segStrings),e.checkEndPtVertexIntersections(i[i.length-1],e._segStrings)}else if(arguments.length===2){for(var o=arguments[0],s=arguments[1],a=s.iterator();a.hasNext();)for(var c=a.next(),f=c.getCoordinates(),m=1;m<f.length-1;m++)if(f[m].equals(o))throw new zi("found endpt/interior pt intersection at index "+m+" :pt "+o)}},ti.prototype.checkInteriorIntersections=function(){var e=this;if(arguments.length===0)for(var t=this._segStrings.iterator();t.hasNext();)for(var n=t.next(),i=this._segStrings.iterator();i.hasNext();){var o=i.next();e.checkInteriorIntersections(n,o)}else if(arguments.length===2)for(var s=arguments[0],a=arguments[1],c=s.getCoordinates(),f=a.getCoordinates(),m=0;m<c.length-1;m++)for(var p=0;p<f.length-1;p++)e.checkInteriorIntersections(s,m,a,p);else if(arguments.length===4){var g=arguments[0],w=arguments[1],_=arguments[2],y=arguments[3];if(g===_&&w===y)return null;var h=g.getCoordinates()[w],d=g.getCoordinates()[w+1],u=_.getCoordinates()[y],l=_.getCoordinates()[y+1];if(this._li.computeIntersection(h,d,u,l),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,h,d)||this.hasInteriorIntersection(this._li,u,l)))throw new zi("found non-noded intersection at "+h+"-"+d+" and "+u+"-"+l)}},ti.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},ti.prototype.checkCollapses=function(){var e=this;if(arguments.length===0)for(var t=this._segStrings.iterator();t.hasNext();){var n=t.next();e.checkCollapses(n)}else if(arguments.length===1)for(var i=arguments[0],o=i.getCoordinates(),s=0;s<o.length-2;s++)e.checkCollapse(o[s],o[s+1],o[s+2])},ti.prototype.hasInteriorIntersection=function(e,t,n){for(var i=0;i<e.getIntersectionNum();i++){var o=e.getIntersection(i);if(!(o.equals(t)||o.equals(n)))return!0}return!1},ti.prototype.checkCollapse=function(e,t,n){if(e.equals(n))throw new zi("found non-noded collapse at "+ti.fact.createLineString([e,t,n]))},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},Cg.fact.get=function(){return new Ge},Object.defineProperties(ti,Cg);var mr=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],n=arguments[2];if(this._originalPt=e,this._pt=e,this._scaleFactor=t,this._li=n,t<=0)throw new ct("Scale factor must be non-zero");t!==1&&(this._pt=new K(this.scale(e.x),this.scale(e.y)),this._p0Scaled=new K,this._p1Scaled=new K),this.initCorners(this._pt)},xg={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};mr.prototype.intersectsScaled=function(e,t){var n=Math.min(e.x,t.x),i=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y),a=this._maxx<n||this._minx>i||this._maxy<o||this._miny>s;if(a)return!1;var c=this.intersectsToleranceSquare(e,t);return Fe.isTrue(!(a&&c),"Found bad envelope test"),c},mr.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 K(this._maxx,this._maxy),this._corner[1]=new K(this._minx,this._maxy),this._corner[2]=new K(this._minx,this._miny),this._corner[3]=new K(this._maxx,this._miny)},mr.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))},mr.prototype.scale=function(e){return Math.round(e*this._scaleFactor)},mr.prototype.getCoordinate=function(){return this._originalPt},mr.prototype.copyScaled=function(e,t){t.x=this.scale(e.x),t.y=this.scale(e.y)},mr.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var e=mr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Ee(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv},mr.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()))},mr.prototype.intersectsToleranceSquare=function(e,t){var n=!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()&&(n=!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())||n&&i||e.equals(this._pt)||t.equals(this._pt))},mr.prototype.addSnappedNode=function(e,t){var n=e.getCoordinate(t),i=e.getCoordinate(t+1);return this.intersects(n,i)?(e.addIntersection(this.getCoordinate(),t),!0):!1},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr},xg.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(mr,xg);var gc=function(){this.tempEnv1=new Ee,this.selectedSegment=new Pe};gc.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)}}},gc.prototype.interfaces_=function(){return[]},gc.prototype.getClass=function(){return gc};var vl=function(){this._index=null;var e=arguments[0];this._index=e},Og={HotPixelSnapAction:{configurable:!0}};vl.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],n=arguments[1],i=arguments[2],o=t.getSafeEnvelope(),s=new Mg(t,n,i);return this._index.query(o,{interfaces_:function(){return[Ps]},visitItem:function(a){var c=a;c.select(o,s)}}),s.isNodeAdded()}},vl.prototype.interfaces_=function(){return[]},vl.prototype.getClass=function(){return vl},Og.HotPixelSnapAction.get=function(){return Mg},Object.defineProperties(vl,Og);var Mg=function(r){function e(){r.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=t,this._parentEdge=n,this._hotPixelVertexIndex=i}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1],o=n.getContext();if(this._parentEdge!==null&&o===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(o,i)}else return r.prototype.select.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(gc),Qo=function(){this._li=null,this._interiorIntersections=null;var e=arguments[0];this._li=e,this._interiorIntersections=new ue};Qo.prototype.processIntersections=function(e,t,n,i){var o=this;if(e===n&&t===i)return null;var s=e.getCoordinates()[t],a=e.getCoordinates()[t+1],c=n.getCoordinates()[i],f=n.getCoordinates()[i+1];if(this._li.computeIntersection(s,a,c,f),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var m=0;m<this._li.getIntersectionNum();m++)o._interiorIntersections.add(o._li.getIntersection(m));e.addIntersections(this._li,t,0),n.addIntersections(this._li,i,1)}},Qo.prototype.isDone=function(){return!1},Qo.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Qo.prototype.interfaces_=function(){return[ao]},Qo.prototype.getClass=function(){return Qo};var Pi=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 to,this._li.setPrecisionModel(e),this._scaleFactor=e.getScale()};Pi.prototype.checkCorrectness=function(e){var t=Et.getNodedSubstrings(e),n=new ti(t);try{n.checkValid()}catch(i){if(i instanceof ag)i.printStackTrace();else throw i}finally{}},Pi.prototype.getNodedSubstrings=function(){return Et.getNodedSubstrings(this._nodedSegStrings)},Pi.prototype.snapRound=function(e,t){var n=this.findInteriorIntersections(e,t);this.computeIntersectionSnaps(n),this.computeVertexSnaps(e)},Pi.prototype.findInteriorIntersections=function(e,t){var n=new Qo(t);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(e),n.getInteriorIntersections()},Pi.prototype.computeVertexSnaps=function(){var e=this;if(Me(arguments[0],Mt))for(var t=arguments[0],n=t.iterator();n.hasNext();){var i=n.next();e.computeVertexSnaps(i)}else if(arguments[0]instanceof Et)for(var o=arguments[0],s=o.getCoordinates(),a=0;a<s.length;a++){var c=new mr(s[a],e._scaleFactor,e._li),f=e._pointSnapper.snap(c,o,a);f&&o.addIntersection(s[a],a)}},Pi.prototype.computeNodes=function(e){this._nodedSegStrings=e,this._noder=new Yf,this._pointSnapper=new vl(this._noder.getIndex()),this.snapRound(e,this._li)},Pi.prototype.computeIntersectionSnaps=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.next(),o=new mr(i,t._scaleFactor,t._li);t._pointSnapper.snap(o)}},Pi.prototype.interfaces_=function(){return[so]},Pi.prototype.getClass=function(){return Pi};var Ut=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new Qe,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],n=arguments[1];this._argGeom=t,this._bufParams=n}},yl={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};Ut.prototype.bufferFixedPrecision=function(e){var t=new xs(new Pi(new Ke(1)),e.getScale()),n=new ur(this._bufParams);n.setWorkingPrecisionModel(e),n.setNoder(t),this._resultGeometry=n.buffer(this._argGeom,this._distance)},Ut.prototype.bufferReducedPrecision=function(){var e=this;if(arguments.length===0){for(var t=Ut.MAX_PRECISION_DIGITS;t>=0;t--){try{e.bufferReducedPrecision(t)}catch(s){if(s instanceof Yi)e._saveException=s;else throw s}finally{}if(e._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],i=Ut.precisionScaleFactor(this._argGeom,this._distance,n),o=new Ke(i);this.bufferFixedPrecision(o)}},Ut.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var e=this._argGeom.getFactory().getPrecisionModel();e.getType()===Ke.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()},Ut.prototype.setQuadrantSegments=function(e){this._bufParams.setQuadrantSegments(e)},Ut.prototype.bufferOriginalPrecision=function(){try{var e=new ur(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(t){if(t instanceof zi)this._saveException=t;else throw t}finally{}},Ut.prototype.getResultGeometry=function(e){return this._distance=e,this.computeGeometry(),this._resultGeometry},Ut.prototype.setEndCapStyle=function(e){this._bufParams.setEndCapStyle(e)},Ut.prototype.interfaces_=function(){return[]},Ut.prototype.getClass=function(){return Ut},Ut.bufferOp=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new Ut(e),i=n.getResultGeometry(t);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof Oe&&typeof arguments[1]=="number"){var o=arguments[0],s=arguments[1],a=arguments[2],c=new Ut(o);c.setQuadrantSegments(a);var f=c.getResultGeometry(s);return f}else if(arguments[2]instanceof Qe&&arguments[0]instanceof Oe&&typeof arguments[1]=="number"){var m=arguments[0],p=arguments[1],g=arguments[2],w=new Ut(m,g),_=w.getResultGeometry(p);return _}}else if(arguments.length===4){var y=arguments[0],h=arguments[1],d=arguments[2],u=arguments[3],l=new Ut(y);l.setQuadrantSegments(d),l.setEndCapStyle(u);var v=l.getResultGeometry(h);return v}},Ut.precisionScaleFactor=function(e,t,n){var i=e.getEnvelopeInternal(),o=Br.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),s=t>0?t:0,a=o+2*s,c=Math.trunc(Math.log(a)/Math.log(10)+1),f=n-c,m=Math.pow(10,f);return m},yl.CAP_ROUND.get=function(){return Qe.CAP_ROUND},yl.CAP_BUTT.get=function(){return Qe.CAP_FLAT},yl.CAP_FLAT.get=function(){return Qe.CAP_FLAT},yl.CAP_SQUARE.get=function(){return Qe.CAP_SQUARE},yl.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(Ut,yl);var lr=function(){this._pt=[new K,new K],this._distance=De.NaN,this._isNull=!0};lr.prototype.getCoordinates=function(){return this._pt},lr.prototype.getCoordinate=function(e){return this._pt[e]},lr.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],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var i=t.distance(n);i<this._distance&&this.initialize(t,n,i)}},lr.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 n=arguments[0],i=arguments[1],o=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=o,this._isNull=!1}},lr.prototype.getDistance=function(){return this._distance},lr.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],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var i=t.distance(n);i>this._distance&&this.initialize(t,n,i)}},lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr};var Si=function(){};Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si},Si.computeDistance=function(){if(arguments[2]instanceof lr&&arguments[0]instanceof vt&&arguments[1]instanceof K)for(var e=arguments[0],t=arguments[1],n=arguments[2],i=e.getCoordinates(),o=new Pe,s=0;s<i.length-1;s++){o.setCoordinates(i[s],i[s+1]);var a=o.closestPoint(t);n.setMinimum(a,t)}else if(arguments[2]instanceof lr&&arguments[0]instanceof It&&arguments[1]instanceof K){var c=arguments[0],f=arguments[1],m=arguments[2];Si.computeDistance(c.getExteriorRing(),f,m);for(var p=0;p<c.getNumInteriorRing();p++)Si.computeDistance(c.getInteriorRingN(p),f,m)}else if(arguments[2]instanceof lr&&arguments[0]instanceof Oe&&arguments[1]instanceof K){var g=arguments[0],w=arguments[1],_=arguments[2];if(g instanceof vt)Si.computeDistance(g,w,_);else if(g instanceof It)Si.computeDistance(g,w,_);else if(g instanceof sr)for(var y=g,h=0;h<y.getNumGeometries();h++){var d=y.getGeometryN(h);Si.computeDistance(d,w,_)}else _.setMinimum(g.getCoordinate(),w)}else if(arguments[2]instanceof lr&&arguments[0]instanceof Pe&&arguments[1]instanceof K){var u=arguments[0],l=arguments[1],v=arguments[2],b=u.closestPoint(l);v.setMinimum(b,l)}};var lo=function(e){this._maxPtDist=new lr,this._inputGeom=e||null},Jf={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};lo.prototype.computeMaxMidpointDistance=function(e){var t=new Os(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},lo.prototype.computeMaxVertexDistance=function(e){var t=new $o(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},lo.prototype.findDistance=function(e){return this.computeMaxVertexDistance(e),this.computeMaxMidpointDistance(e),this._maxPtDist.getDistance()},lo.prototype.getDistancePoints=function(){return this._maxPtDist},lo.prototype.interfaces_=function(){return[]},lo.prototype.getClass=function(){return lo},Jf.MaxPointDistanceFilter.get=function(){return $o},Jf.MaxMidpointDistanceFilter.get=function(){return Os},Object.defineProperties(lo,Jf);var $o=function(e){this._maxPtDist=new lr,this._minPtDist=new lr,this._geom=e||null};$o.prototype.filter=function(e){this._minPtDist.initialize(),Si.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},$o.prototype.getMaxPointDistance=function(){return this._maxPtDist},$o.prototype.interfaces_=function(){return[vi]},$o.prototype.getClass=function(){return $o};var Os=function(e){this._maxPtDist=new lr,this._minPtDist=new lr,this._geom=e||null};Os.prototype.filter=function(e,t){if(t===0)return null;var n=e.getCoordinate(t-1),i=e.getCoordinate(t),o=new K((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),Si.computeDistance(this._geom,o,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Os.prototype.isDone=function(){return!1},Os.prototype.isGeometryChanged=function(){return!1},Os.prototype.getMaxPointDistance=function(){return this._maxPtDist},Os.prototype.interfaces_=function(){return[Mn]},Os.prototype.getClass=function(){return Os};var $i=function(e){this._comps=e||null};$i.prototype.filter=function(e){e instanceof It&&this._comps.add(e)},$i.prototype.interfaces_=function(){return[Xn]},$i.prototype.getClass=function(){return $i},$i.getPolygons=function(){if(arguments.length===1){var e=arguments[0];return $i.getPolygons(e,new ue)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return t instanceof It?n.add(t):t instanceof sr&&t.apply(new $i(n)),n}};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],n=arguments[1];this._lines=t,this._isForcedToLineString=n}};Wt.prototype.filter=function(e){if(this._isForcedToLineString&&e instanceof yi){var t=e.getFactory().createLineString(e.getCoordinateSequence());return this._lines.add(t),null}e instanceof vt&&this._lines.add(e)},Wt.prototype.setForceToLineString=function(e){this._isForcedToLineString=e},Wt.prototype.interfaces_=function(){return[Ui]},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],n=arguments[1];return t.getFactory().buildGeometry(Wt.getLines(t,n))}},Wt.getLines=function(){if(arguments.length===1){var e=arguments[0];return Wt.getLines(e,!1)}else if(arguments.length===2){if(Me(arguments[0],Mt)&&Me(arguments[1],Mt)){for(var t=arguments[0],n=arguments[1],i=t.iterator();i.hasNext();){var o=i.next();Wt.getLines(o,n)}return n}else if(arguments[0]instanceof Oe&&typeof arguments[1]=="boolean"){var s=arguments[0],a=arguments[1],c=new ue;return s.apply(new Wt(c,a)),c}else if(arguments[0]instanceof Oe&&Me(arguments[1],Mt)){var f=arguments[0],m=arguments[1];return f instanceof vt?m.add(f):f.apply(new Wt(m)),m}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&Me(arguments[0],Mt)&&Me(arguments[1],Mt)){for(var p=arguments[0],g=arguments[1],w=arguments[2],_=p.iterator();_.hasNext();){var y=_.next();Wt.getLines(y,g,w)}return g}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Oe&&Me(arguments[1],Mt)){var h=arguments[0],d=arguments[1],u=arguments[2];return h.apply(new Wt(d,u)),d}}};var Dn=function(){if(this._boundaryRule=sn.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 ct("Rule must be non-null");this._boundaryRule=e}}};Dn.prototype.locateInternal=function(){var e=this;if(arguments[0]instanceof K&&arguments[1]instanceof It){var t=arguments[0],n=arguments[1];if(n.isEmpty())return Q.EXTERIOR;var i=n.getExteriorRing(),o=this.locateInPolygonRing(t,i);if(o===Q.EXTERIOR)return Q.EXTERIOR;if(o===Q.BOUNDARY)return Q.BOUNDARY;for(var s=0;s<n.getNumInteriorRing();s++){var a=n.getInteriorRingN(s),c=e.locateInPolygonRing(t,a);if(c===Q.INTERIOR)return Q.EXTERIOR;if(c===Q.BOUNDARY)return Q.BOUNDARY}return Q.INTERIOR}else if(arguments[0]instanceof K&&arguments[1]instanceof vt){var f=arguments[0],m=arguments[1];if(!m.getEnvelopeInternal().intersects(f))return Q.EXTERIOR;var p=m.getCoordinates();return!m.isClosed()&&(f.equals(p[0])||f.equals(p[p.length-1]))?Q.BOUNDARY:he.isOnLine(f,p)?Q.INTERIOR:Q.EXTERIOR}else if(arguments[0]instanceof K&&arguments[1]instanceof Nr){var g=arguments[0],w=arguments[1],_=w.getCoordinate();return _.equals2D(g)?Q.INTERIOR:Q.EXTERIOR}},Dn.prototype.locateInPolygonRing=function(e,t){return t.getEnvelopeInternal().intersects(e)?he.locatePointInRing(e,t.getCoordinates()):Q.EXTERIOR},Dn.prototype.intersects=function(e,t){return this.locate(e,t)!==Q.EXTERIOR},Dn.prototype.updateLocationInfo=function(e){e===Q.INTERIOR&&(this._isIn=!0),e===Q.BOUNDARY&&this._numBoundaries++},Dn.prototype.computeLocation=function(e,t){var n=this;if(t instanceof Nr&&this.updateLocationInfo(this.locateInternal(e,t)),t instanceof vt)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof It)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof io)for(var i=t,o=0;o<i.getNumGeometries();o++){var s=i.getGeometryN(o);n.updateLocationInfo(n.locateInternal(e,s))}else if(t instanceof mi)for(var a=t,c=0;c<a.getNumGeometries();c++){var f=a.getGeometryN(c);n.updateLocationInfo(n.locateInternal(e,f))}else if(t instanceof sr)for(var m=new wi(t);m.hasNext();){var p=m.next();p!==t&&n.computeLocation(e,p)}},Dn.prototype.locate=function(e,t){return t.isEmpty()?Q.EXTERIOR:t instanceof vt?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)?Q.BOUNDARY:this._numBoundaries>0||this._isIn?Q.INTERIOR:Q.EXTERIOR)},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn};var cr=function r(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var e=arguments[0],t=arguments[1];r.call(this,e,r.INSIDE_AREA,t)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];this._component=n,this._segIndex=i,this._pt=o}},Ig={INSIDE_AREA:{configurable:!0}};cr.prototype.isInsideArea=function(){return this._segIndex===cr.INSIDE_AREA},cr.prototype.getCoordinate=function(){return this._pt},cr.prototype.getGeometryComponent=function(){return this._component},cr.prototype.getSegmentIndex=function(){return this._segIndex},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},Ig.INSIDE_AREA.get=function(){return-1},Object.defineProperties(cr,Ig);var Ms=function(e){this._pts=e||null};Ms.prototype.filter=function(e){e instanceof Nr&&this._pts.add(e)},Ms.prototype.interfaces_=function(){return[Xn]},Ms.prototype.getClass=function(){return Ms},Ms.getPoints=function(){if(arguments.length===1){var e=arguments[0];return e instanceof Nr?Tn.singletonList(e):Ms.getPoints(e,new ue)}else if(arguments.length===2){var t=arguments[0],n=arguments[1];return t instanceof Nr?n.add(t):t instanceof sr&&t.apply(new Ms(n)),n}};var Zo=function(){this._locations=null;var e=arguments[0];this._locations=e};Zo.prototype.filter=function(e){(e instanceof Nr||e instanceof vt||e instanceof It)&&this._locations.add(new cr(e,0,e.getCoordinate()))},Zo.prototype.interfaces_=function(){return[Xn]},Zo.prototype.getClass=function(){return Zo},Zo.getLocations=function(e){var t=new ue;return e.apply(new Zo(t)),t};var qt=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Dn,this._minDistanceLocation=null,this._minDistance=De.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 n=arguments[0],i=arguments[1],o=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=o}};qt.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 n=arguments[0],i=arguments[1],o=1-n,s=$i.getPolygons(this._geom[n]);if(s.size()>0){var a=Zo.getLocations(this._geom[o]);if(this.computeContainmentDistance(a,s,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[o]=i[0],this._minDistanceLocation[n]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&Me(arguments[0],xn)&&Me(arguments[1],xn)){for(var c=arguments[0],f=arguments[1],m=arguments[2],p=0;p<c.size();p++)for(var g=c.get(p),w=0;w<f.size();w++)if(e.computeContainmentDistance(g,f.get(w),m),e._minDistance<=e._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof cr&&arguments[1]instanceof It){var _=arguments[0],y=arguments[1],h=arguments[2],d=_.getCoordinate();if(Q.EXTERIOR!==this._ptLocator.locate(d,y))return this._minDistance=0,h[0]=_,h[1]=new cr(y,d),null}}},qt.prototype.computeMinDistanceLinesPoints=function(e,t,n){for(var i=this,o=0;o<e.size();o++)for(var s=e.get(o),a=0;a<t.size();a++){var c=t.get(a);if(i.computeMinDistance(s,c,n),i._minDistance<=i._terminateDistance)return null}},qt.prototype.computeFacetDistance=function(){var e=new Array(2).fill(null),t=Wt.getLines(this._geom[0]),n=Wt.getLines(this._geom[1]),i=Ms.getPoints(this._geom[0]),o=Ms.getPoints(this._geom[1]);if(this.computeMinDistanceLines(t,n,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance||(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(t,o,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance)||(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(n,i,e),this.updateMinDistance(e,!0),this._minDistance<=this._terminateDistance))return null;e[0]=null,e[1]=null,this.computeMinDistancePoints(i,o,e),this.updateMinDistance(e,!1)},qt.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},qt.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])},qt.prototype.nearestPoints=function(){this.computeMinDistance();var e=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return e},qt.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 vt&&arguments[1]instanceof Nr){var t=arguments[0],n=arguments[1],i=arguments[2];if(t.getEnvelopeInternal().distance(n.getEnvelopeInternal())>this._minDistance)return null;for(var o=t.getCoordinates(),s=n.getCoordinate(),a=0;a<o.length-1;a++){var c=he.distancePointLine(s,o[a],o[a+1]);if(c<e._minDistance){e._minDistance=c;var f=new Pe(o[a],o[a+1]),m=f.closestPoint(s);i[0]=new cr(t,a,m),i[1]=new cr(n,0,s)}if(e._minDistance<=e._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof vt&&arguments[1]instanceof vt){var p=arguments[0],g=arguments[1],w=arguments[2];if(p.getEnvelopeInternal().distance(g.getEnvelopeInternal())>this._minDistance)return null;for(var _=p.getCoordinates(),y=g.getCoordinates(),h=0;h<_.length-1;h++)for(var d=0;d<y.length-1;d++){var u=he.distanceLineLine(_[h],_[h+1],y[d],y[d+1]);if(u<e._minDistance){e._minDistance=u;var l=new Pe(_[h],_[h+1]),v=new Pe(y[d],y[d+1]),b=l.closestPoints(v);w[0]=new cr(p,h,b[0]),w[1]=new cr(g,d,b[1])}if(e._minDistance<=e._terminateDistance)return null}}}},qt.prototype.computeMinDistancePoints=function(e,t,n){for(var i=this,o=0;o<e.size();o++)for(var s=e.get(o),a=0;a<t.size();a++){var c=t.get(a),f=s.getCoordinate().distance(c.getCoordinate());if(f<i._minDistance&&(i._minDistance=f,n[0]=new cr(s,0,s.getCoordinate()),n[1]=new cr(c,0,c.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},qt.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new ct("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},qt.prototype.computeMinDistanceLines=function(e,t,n){for(var i=this,o=0;o<e.size();o++)for(var s=e.get(o),a=0;a<t.size();a++){var c=t.get(a);if(i.computeMinDistance(s,c,n),i._minDistance<=i._terminateDistance)return null}},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.distance=function(e,t){var n=new qt(e,t);return n.distance()},qt.isWithinDistance=function(e,t,n){var i=new qt(e,t,n);return i.distance()<=n},qt.nearestPoints=function(e,t){var n=new qt(e,t);return n.nearestPoints()};var er=function(){this._pt=[new K,new K],this._distance=De.NaN,this._isNull=!0};er.prototype.getCoordinates=function(){return this._pt},er.prototype.getCoordinate=function(e){return this._pt[e]},er.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],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var i=t.distance(n);i<this._distance&&this.initialize(t,n,i)}},er.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 n=arguments[0],i=arguments[1],o=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=o,this._isNull=!1}},er.prototype.toString=function(){return Cn.toLineString(this._pt[0],this._pt[1])},er.prototype.getDistance=function(){return this._distance},er.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],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var i=t.distance(n);i>this._distance&&this.initialize(t,n,i)}},er.prototype.interfaces_=function(){return[]},er.prototype.getClass=function(){return er};var ri=function(){};ri.prototype.interfaces_=function(){return[]},ri.prototype.getClass=function(){return ri},ri.computeDistance=function(){if(arguments[2]instanceof er&&arguments[0]instanceof vt&&arguments[1]instanceof K)for(var e=arguments[0],t=arguments[1],n=arguments[2],i=new Pe,o=e.getCoordinates(),s=0;s<o.length-1;s++){i.setCoordinates(o[s],o[s+1]);var a=i.closestPoint(t);n.setMinimum(a,t)}else if(arguments[2]instanceof er&&arguments[0]instanceof It&&arguments[1]instanceof K){var c=arguments[0],f=arguments[1],m=arguments[2];ri.computeDistance(c.getExteriorRing(),f,m);for(var p=0;p<c.getNumInteriorRing();p++)ri.computeDistance(c.getInteriorRingN(p),f,m)}else if(arguments[2]instanceof er&&arguments[0]instanceof Oe&&arguments[1]instanceof K){var g=arguments[0],w=arguments[1],_=arguments[2];if(g instanceof vt)ri.computeDistance(g,w,_);else if(g instanceof It)ri.computeDistance(g,w,_);else if(g instanceof sr)for(var y=g,h=0;h<y.getNumGeometries();h++){var d=y.getGeometryN(h);ri.computeDistance(d,w,_)}else _.setMinimum(g.getCoordinate(),w)}else if(arguments[2]instanceof er&&arguments[0]instanceof Pe&&arguments[1]instanceof K){var u=arguments[0],l=arguments[1],v=arguments[2],b=u.closestPoint(l);v.setMinimum(b,l)}};var cn=function(){this._g0=null,this._g1=null,this._ptDist=new er,this._densifyFrac=0;var e=arguments[0],t=arguments[1];this._g0=e,this._g1=t},Kf={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};cn.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},cn.prototype.setDensifyFraction=function(e){if(e>1||e<=0)throw new ct("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=e},cn.prototype.compute=function(e,t){this.computeOrientedDistance(e,t,this._ptDist),this.computeOrientedDistance(t,e,this._ptDist)},cn.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},cn.prototype.computeOrientedDistance=function(e,t,n){var i=new ea(t);if(e.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var o=new Is(t,this._densifyFrac);e.apply(o),n.setMaximum(o.getMaxPointDistance())}},cn.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn},cn.distance=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new cn(e,t);return n.distance()}else if(arguments.length===3){var i=arguments[0],o=arguments[1],s=arguments[2],a=new cn(i,o);return a.setDensifyFraction(s),a.distance()}},Kf.MaxPointDistanceFilter.get=function(){return ea},Kf.MaxDensifiedByFractionDistanceFilter.get=function(){return Is},Object.defineProperties(cn,Kf);var ea=function(){this._maxPtDist=new er,this._minPtDist=new er,this._euclideanDist=new ri,this._geom=null;var e=arguments[0];this._geom=e};ea.prototype.filter=function(e){this._minPtDist.initialize(),ri.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},ea.prototype.getMaxPointDistance=function(){return this._maxPtDist},ea.prototype.interfaces_=function(){return[vi]},ea.prototype.getClass=function(){return ea};var Is=function(){this._maxPtDist=new er,this._minPtDist=new er,this._geom=null,this._numSubSegs=0;var e=arguments[0],t=arguments[1];this._geom=e,this._numSubSegs=Math.trunc(Math.round(1/t))};Is.prototype.filter=function(e,t){var n=this;if(t===0)return null;for(var i=e.getCoordinate(t-1),o=e.getCoordinate(t),s=(o.x-i.x)/this._numSubSegs,a=(o.y-i.y)/this._numSubSegs,c=0;c<this._numSubSegs;c++){var f=i.x+c*s,m=i.y+c*a,p=new K(f,m);n._minPtDist.initialize(),ri.computeDistance(n._geom,p,n._minPtDist),n._maxPtDist.setMaximum(n._minPtDist)}},Is.prototype.isDone=function(){return!1},Is.prototype.isGeometryChanged=function(){return!1},Is.prototype.getMaxPointDistance=function(){return this._maxPtDist},Is.prototype.interfaces_=function(){return[Mn]},Is.prototype.getClass=function(){return Is};var Rr=function(e,t,n){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=n||null},Qf={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Rr.prototype.checkMaximumDistance=function(e,t,n){var i=new cn(t,e);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var o=i.getCoordinates();this._errorLocation=o[1],this._errorIndicator=e.getFactory().createLineString(o),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Cn.toLineString(o[0],o[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&&Bt.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 mi||this._input instanceof sr))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,n){var i=new qt(e,t,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var o=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=e.getFactory().createLineString(o),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Cn.toLineString(o[0],o[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 ue,n=new Wt(t),i=$i.getPolygons(e),o=i.iterator();o.hasNext();){var s=o.next();s.apply(n)}return e.getFactory().buildGeometry(t)},Rr.prototype.getErrorMessage=function(){return this._errMsg},Rr.prototype.interfaces_=function(){return[]},Rr.prototype.getClass=function(){return Rr},Qf.VERBOSE.get=function(){return!1},Qf.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Rr,Qf);var Ht=function(e,t,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._distance=t||null,this._result=n||null},$f={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Ht.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},Ht.prototype.checkEnvelope=function(){if(this._distance<0)return null;var e=this._distance*Ht.MAX_ENV_DIFF_FRAC;e===0&&(e=.001);var t=new Ee(this._input.getEnvelopeInternal());t.expandBy(this._distance);var n=new Ee(this._result.getEnvelopeInternal());n.expandBy(e),n.contains(t)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},Ht.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")},Ht.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")},Ht.prototype.checkPolygonal=function(){this._result instanceof It||this._result instanceof mi||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Ht.prototype.getErrorIndicator=function(){return this._errorIndicator},Ht.prototype.getErrorLocation=function(){return this._errorLocation},Ht.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")},Ht.prototype.report=function(e){if(!Ht.VERBOSE)return null;Bt.out.println("Check "+e+": "+(this._isValid?"passed":"FAILED"))},Ht.prototype.getErrorMessage=function(){return this._errorMsg},Ht.prototype.interfaces_=function(){return[]},Ht.prototype.getClass=function(){return Ht},Ht.isValidMsg=function(e,t,n){var i=new Ht(e,t,n);return i.isValid()?null:i.getErrorMessage()},Ht.isValid=function(e,t,n){var i=new Ht(e,t,n);return!!i.isValid()},$f.VERBOSE.get=function(){return!1},$f.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Ht,$f);var ni=function(){this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};ni.prototype.getCoordinates=function(){return this._pts},ni.prototype.size=function(){return this._pts.length},ni.prototype.getCoordinate=function(e){return this._pts[e]},ni.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},ni.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:Yo.octant(this.getCoordinate(e),this.getCoordinate(e+1))},ni.prototype.setData=function(e){this._data=e},ni.prototype.getData=function(){return this._data},ni.prototype.toString=function(){return Cn.toLineString(new wt(this._pts))},ni.prototype.interfaces_=function(){return[bi]},ni.prototype.getClass=function(){return ni};var Lt=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new ue,this._intersectionCount=0,this._keepIntersections=!0;var e=arguments[0];this._li=e,this._interiorIntersection=null};Lt.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Lt.prototype.setCheckEndSegmentsOnly=function(e){this._isCheckEndSegmentsOnly=e},Lt.prototype.getIntersectionSegments=function(){return this._intSegments},Lt.prototype.count=function(){return this._intersectionCount},Lt.prototype.getIntersections=function(){return this._intersections},Lt.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},Lt.prototype.setKeepIntersections=function(e){this._keepIntersections=e},Lt.prototype.processIntersections=function(e,t,n,i){if(!this._findAllIntersections&&this.hasIntersection()||e===n&&t===i)return null;if(this._isCheckEndSegmentsOnly){var o=this.isEndSegment(e,t)||this.isEndSegment(n,i);if(!o)return null}var s=e.getCoordinates()[t],a=e.getCoordinates()[t+1],c=n.getCoordinates()[i],f=n.getCoordinates()[i+1];this._li.computeIntersection(s,a,c,f),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=s,this._intSegments[1]=a,this._intSegments[2]=c,this._intSegments[3]=f,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Lt.prototype.isEndSegment=function(e,t){return t===0||t>=e.size()-2},Lt.prototype.hasIntersection=function(){return this._interiorIntersection!==null},Lt.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},Lt.prototype.interfaces_=function(){return[ao]},Lt.prototype.getClass=function(){return Lt},Lt.createAllIntersectionsFinder=function(e){var t=new Lt(e);return t.setFindAllIntersections(!0),t},Lt.createAnyIntersectionFinder=function(e){return new Lt(e)},Lt.createIntersectionCounter=function(e){var t=new Lt(e);return t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t};var An=function(){this._li=new to,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var e=arguments[0];this._segStrings=e};An.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},An.prototype.getIntersections=function(){return this._segInt.getIntersections()},An.prototype.isValid=function(){return this.execute(),this._isValid},An.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},An.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Lt(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var e=new Yf;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},An.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Yi(this.getErrorMessage(),this._segInt.getInteriorIntersection())},An.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Cn.toLineString(e[0],e[1])+" and "+Cn.toLineString(e[2],e[3])},An.prototype.interfaces_=function(){return[]},An.prototype.getClass=function(){return An},An.computeIntersections=function(e){var t=new An(e);return t.setFindAllIntersections(!0),t.isValid(),t.getIntersections()};var co=function r(){this._nv=null;var e=arguments[0];this._nv=new An(r.toSegmentStrings(e))};co.prototype.checkValid=function(){this._nv.checkValid()},co.prototype.interfaces_=function(){return[]},co.prototype.getClass=function(){return co},co.toSegmentStrings=function(e){for(var t=new ue,n=e.iterator();n.hasNext();){var i=n.next();t.add(new ni(i.getCoordinates(),i))}return t},co.checkValid=function(e){var t=new co(e);t.checkValid()};var ta=function(e){this._mapOp=e};ta.prototype.map=function(e){for(var t=this,n=new ue,i=0;i<e.getNumGeometries();i++){var o=t._mapOp.map(e.getGeometryN(i));o.isEmpty()||n.add(o)}return e.getFactory().createGeometryCollection(Ge.toGeometryArray(n))},ta.prototype.interfaces_=function(){return[]},ta.prototype.getClass=function(){return ta},ta.map=function(e,t){var n=new ta(t);return n.map(e)};var ii=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new ue,this._resultLineList=new ue;var e=arguments[0],t=arguments[1],n=arguments[2];this._op=e,this._geometryFactory=t,this._ptLocator=n};ii.prototype.collectLines=function(e){for(var t=this,n=this._op.getGraph().getEdgeEnds().iterator();n.hasNext();){var i=n.next();t.collectLineEdge(i,e,t._lineEdgesList),t.collectBoundaryTouchEdge(i,e,t._lineEdgesList)}},ii.prototype.labelIsolatedLine=function(e,t){var n=this._ptLocator.locate(e.getCoordinate(),this._op.getArgGeometry(t));e.getLabel().setLocation(t,n)},ii.prototype.build=function(e){return this.findCoveredLineEdges(),this.collectLines(e),this.buildLines(e),this._resultLineList},ii.prototype.collectLineEdge=function(e,t,n){var i=e.getLabel(),o=e.getEdge();e.isLineEdge()&&!e.isVisited()&&Re.isResultOfOp(i,t)&&!o.isCovered()&&(n.add(o),e.setVisitedEdge(!0))},ii.prototype.findCoveredLineEdges=function(){for(var e=this,t=this._op.getGraph().getNodes().iterator();t.hasNext();){var n=t.next();n.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var o=i.next(),s=o.getEdge();if(o.isLineEdge()&&!s.isCoveredSet()){var a=e._op.isCoveredByA(o.getCoordinate());s.setCovered(a)}}},ii.prototype.labelIsolatedLines=function(e){for(var t=this,n=e.iterator();n.hasNext();){var i=n.next(),o=i.getLabel();i.isIsolated()&&(o.isNull(0)?t.labelIsolatedLine(i,0):t.labelIsolatedLine(i,1))}},ii.prototype.buildLines=function(e){for(var t=this,n=this._lineEdgesList.iterator();n.hasNext();){var i=n.next(),o=t._geometryFactory.createLineString(i.getCoordinates());t._resultLineList.add(o),i.setInResult(!0)}},ii.prototype.collectBoundaryTouchEdge=function(e,t,n){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()),Re.isResultOfOp(i,t)&&t===Re.INTERSECTION&&(n.add(e.getEdge()),e.setVisitedEdge(!0))},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii};var ra=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new ue;var e=arguments[0],t=arguments[1];this._op=e,this._geometryFactory=t};ra.prototype.filterCoveredNodeToPoint=function(e){var t=e.getCoordinate();if(!this._op.isCoveredByLA(t)){var n=this._geometryFactory.createPoint(t);this._resultPointList.add(n)}},ra.prototype.extractNonCoveredResultNodes=function(e){for(var t=this,n=this._op.getGraph().getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||e===Re.INTERSECTION)){var o=i.getLabel();Re.isResultOfOp(o,e)&&t.filterCoveredNodeToPoint(i)}}},ra.prototype.build=function(e){return this.extractNonCoveredResultNodes(e),this._resultPointList},ra.prototype.interfaces_=function(){return[]},ra.prototype.getClass=function(){return ra};var _r=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};_r.prototype.transformPoint=function(e,t){return this._factory.createPoint(this.transformCoordinates(e.getCoordinateSequence(),e))},_r.prototype.transformPolygon=function(e,t){var n=this,i=!0,o=this.transformLinearRing(e.getExteriorRing(),e);(o===null||!(o instanceof yi)||o.isEmpty())&&(i=!1);for(var s=new ue,a=0;a<e.getNumInteriorRing();a++){var c=n.transformLinearRing(e.getInteriorRingN(a),e);c===null||c.isEmpty()||(c instanceof yi||(i=!1),s.add(c))}if(i)return this._factory.createPolygon(o,s.toArray([]));var f=new ue;return o!==null&&f.add(o),f.addAll(s),this._factory.buildGeometry(f)},_r.prototype.createCoordinateSequence=function(e){return this._factory.getCoordinateSequenceFactory().create(e)},_r.prototype.getInputGeometry=function(){return this._inputGeom},_r.prototype.transformMultiLineString=function(e,t){for(var n=this,i=new ue,o=0;o<e.getNumGeometries();o++){var s=n.transformLineString(e.getGeometryN(o),e);s!==null&&(s.isEmpty()||i.add(s))}return this._factory.buildGeometry(i)},_r.prototype.transformCoordinates=function(e,t){return this.copy(e)},_r.prototype.transformLineString=function(e,t){return this._factory.createLineString(this.transformCoordinates(e.getCoordinateSequence(),e))},_r.prototype.transformMultiPoint=function(e,t){for(var n=this,i=new ue,o=0;o<e.getNumGeometries();o++){var s=n.transformPoint(e.getGeometryN(o),e);s!==null&&(s.isEmpty()||i.add(s))}return this._factory.buildGeometry(i)},_r.prototype.transformMultiPolygon=function(e,t){for(var n=this,i=new ue,o=0;o<e.getNumGeometries();o++){var s=n.transformPolygon(e.getGeometryN(o),e);s!==null&&(s.isEmpty()||i.add(s))}return this._factory.buildGeometry(i)},_r.prototype.copy=function(e){return e.copy()},_r.prototype.transformGeometryCollection=function(e,t){for(var n=this,i=new ue,o=0;o<e.getNumGeometries();o++){var s=n.transform(e.getGeometryN(o));s!==null&&(n._pruneEmptyGeometry&&s.isEmpty()||i.add(s))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(Ge.toGeometryArray(i)):this._factory.buildGeometry(i)},_r.prototype.transform=function(e){if(this._inputGeom=e,this._factory=e.getFactory(),e instanceof Nr)return this.transformPoint(e,null);if(e instanceof hl)return this.transformMultiPoint(e,null);if(e instanceof yi)return this.transformLinearRing(e,null);if(e instanceof vt)return this.transformLineString(e,null);if(e instanceof io)return this.transformMultiLineString(e,null);if(e instanceof It)return this.transformPolygon(e,null);if(e instanceof mi)return this.transformMultiPolygon(e,null);if(e instanceof sr)return this.transformGeometryCollection(e,null);throw new ct("Unknown Geometry subtype: "+e.getClass().getName())},_r.prototype.transformLinearRing=function(e,t){var n=this.transformCoordinates(e.getCoordinateSequence(),e);if(n===null)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},_r.prototype.interfaces_=function(){return[]},_r.prototype.getClass=function(){return _r};var Ci=function r(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Pe,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof vt&&typeof arguments[1]=="number"){var e=arguments[0],t=arguments[1];r.call(this,e.getCoordinates(),t)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=r.isClosed(n),this._snapTolerance=i}};Ci.prototype.snapVertices=function(e,t){for(var n=this,i=this._isClosed?e.size()-1:e.size(),o=0;o<i;o++){var s=e.get(o),a=n.findSnapForVertex(s,t);a!==null&&(e.set(o,new K(a)),o===0&&n._isClosed&&e.set(e.size()-1,new K(a)))}},Ci.prototype.findSnapForVertex=function(e,t){for(var n=this,i=0;i<t.length;i++){if(e.equals2D(t[i]))return null;if(e.distance(t[i])<n._snapTolerance)return t[i]}return null},Ci.prototype.snapTo=function(e){var t=new tc(this._srcPts);this.snapVertices(t,e),this.snapSegments(t,e);var n=t.toCoordinateArray();return n},Ci.prototype.snapSegments=function(e,t){var n=this;if(t.length===0)return null;var i=t.length;t[0].equals2D(t[t.length-1])&&(i=t.length-1);for(var o=0;o<i;o++){var s=t[o],a=n.findSegmentIndexToSnap(s,e);a>=0&&e.add(a+1,new K(s),!1)}},Ci.prototype.findSegmentIndexToSnap=function(e,t){for(var n=this,i=De.MAX_VALUE,o=-1,s=0;s<t.size()-1;s++){if(n._seg.p0=t.get(s),n._seg.p1=t.get(s+1),n._seg.p0.equals2D(e)||n._seg.p1.equals2D(e)){if(n._allowSnappingToSourceVertices)continue;return-1}var a=n._seg.distance(e);a<n._snapTolerance&&a<i&&(i=a,o=s)}return o},Ci.prototype.setAllowSnappingToSourceVertices=function(e){this._allowSnappingToSourceVertices=e},Ci.prototype.interfaces_=function(){return[]},Ci.prototype.getClass=function(){return Ci},Ci.isClosed=function(e){return e.length<=1?!1:e[0].equals2D(e[e.length-1])};var Pt=function(e){this._srcGeom=e||null},Tg={SNAP_PRECISION_FACTOR:{configurable:!0}};Pt.prototype.snapTo=function(e,t){var n=this.extractTargetCoordinates(e),i=new Ng(t,n);return i.transform(this._srcGeom)},Pt.prototype.snapToSelf=function(e,t){var n=this.extractTargetCoordinates(this._srcGeom),i=new Ng(e,n,!0),o=i.transform(this._srcGeom),s=o;return t&&Me(s,Es)&&(s=o.buffer(0)),s},Pt.prototype.computeSnapTolerance=function(e){var t=this.computeMinimumSegmentLength(e),n=t/10;return n},Pt.prototype.extractTargetCoordinates=function(e){for(var t=new Hn,n=e.getCoordinates(),i=0;i<n.length;i++)t.add(n[i]);return t.toArray(new Array(0).fill(null))},Pt.prototype.computeMinimumSegmentLength=function(e){for(var t=De.MAX_VALUE,n=0;n<e.length-1;n++){var i=e[n].distance(e[n+1]);i<t&&(t=i)}return t},Pt.prototype.interfaces_=function(){return[]},Pt.prototype.getClass=function(){return Pt},Pt.snap=function(e,t,n){var i=new Array(2).fill(null),o=new Pt(e);i[0]=o.snapTo(t,n);var s=new Pt(t);return i[1]=s.snapTo(i[0],n),i},Pt.computeOverlaySnapTolerance=function(){if(arguments.length===1){var e=arguments[0],t=Pt.computeSizeBasedSnapTolerance(e),n=e.getPrecisionModel();if(n.getType()===Ke.FIXED){var i=1/n.getScale()*2/1.415;i>t&&(t=i)}return t}else if(arguments.length===2){var o=arguments[0],s=arguments[1];return Math.min(Pt.computeOverlaySnapTolerance(o),Pt.computeOverlaySnapTolerance(s))}},Pt.computeSizeBasedSnapTolerance=function(e){var t=e.getEnvelopeInternal(),n=Math.min(t.getHeight(),t.getWidth()),i=n*Pt.SNAP_PRECISION_FACTOR;return i},Pt.snapToSelf=function(e,t,n){var i=new Pt(e);return i.snapToSelf(t,n)},Tg.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Pt,Tg);var Ng=function(r){function e(t,n,i){r.call(this),this._snapTolerance=t||null,this._snapPts=n||null,this._isSelfSnap=i!==void 0?i:!1}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(n,i){var o=new Ci(n,this._snapTolerance);return o.setAllowSnappingToSourceVertices(this._isSelfSnap),o.snapTo(i)},e.prototype.transformCoordinates=function(n,i){var o=n.toCoordinateArray(),s=this.snapLine(o,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(s)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(_r),hr=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};hr.prototype.getCommon=function(){return De.longBitsToDouble(this._commonBits)},hr.prototype.add=function(e){var t=De.doubleToLongBits(e);if(this._isFirst)return this._commonBits=t,this._commonSignExp=hr.signExpBits(this._commonBits),this._isFirst=!1,null;var n=hr.signExpBits(t);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=hr.numCommonMostSigMantissaBits(this._commonBits,t),this._commonBits=hr.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},hr.prototype.toString=function(){if(arguments.length===1){var e=arguments[0],t=De.longBitsToDouble(e),n=De.toBinaryString(e),i="0000000000000000000000000000000000000000000000000000000000000000"+n,o=i.substring(i.length-64),s=o.substring(0,1)+" "+o.substring(1,12)+"(exp) "+o.substring(12)+" [ "+t+" ]";return s}},hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr},hr.getBit=function(e,t){var n=1<<t;return(e&n)!==0?1:0},hr.signExpBits=function(e){return e>>52},hr.zeroLowerBits=function(e,t){var n=(1<<t)-1,i=~n,o=e&i;return o},hr.numCommonMostSigMantissaBits=function(e,t){for(var n=0,i=52;i>=0;i--){if(hr.getBit(e,i)!==hr.getBit(t,i))return n;n++}return 52};var Ts=function(){this._commonCoord=null,this._ccFilter=new na},Zf={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};Ts.prototype.addCommonBits=function(e){var t=new Ns(this._commonCoord);e.apply(t),e.geometryChanged()},Ts.prototype.removeCommonBits=function(e){if(this._commonCoord.x===0&&this._commonCoord.y===0)return e;var t=new K(this._commonCoord);t.x=-t.x,t.y=-t.y;var n=new Ns(t);return e.apply(n),e.geometryChanged(),e},Ts.prototype.getCommonCoordinate=function(){return this._commonCoord},Ts.prototype.add=function(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},Ts.prototype.interfaces_=function(){return[]},Ts.prototype.getClass=function(){return Ts},Zf.CommonCoordinateFilter.get=function(){return na},Zf.Translater.get=function(){return Ns},Object.defineProperties(Ts,Zf);var na=function(){this._commonBitsX=new hr,this._commonBitsY=new hr};na.prototype.filter=function(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)},na.prototype.getCommonCoordinate=function(){return new K(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},na.prototype.interfaces_=function(){return[vi]},na.prototype.getClass=function(){return na};var Ns=function(){this.trans=null;var e=arguments[0];this.trans=e};Ns.prototype.filter=function(e,t){var n=e.getOrdinate(t,0)+this.trans.x,i=e.getOrdinate(t,1)+this.trans.y;e.setOrdinate(t,0,n),e.setOrdinate(t,1,i)},Ns.prototype.isDone=function(){return!1},Ns.prototype.isGeometryChanged=function(){return!0},Ns.prototype.interfaces_=function(){return[Mn]},Ns.prototype.getClass=function(){return Ns};var Ft=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()};Ft.prototype.selfSnap=function(e){var t=new Pt(e),n=t.snapTo(e,this._snapTolerance);return n},Ft.prototype.removeCommonBits=function(e){this._cbr=new Ts,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},Ft.prototype.prepareResult=function(e){return this._cbr.addCommonBits(e),e},Ft.prototype.getResultGeometry=function(e){var t=this.snap(this._geom),n=Re.overlayOp(t[0],t[1],e);return this.prepareResult(n)},Ft.prototype.checkValid=function(e){e.isValid()||Bt.out.println("Snapped geometry is invalid")},Ft.prototype.computeSnapTolerance=function(){this._snapTolerance=Pt.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},Ft.prototype.snap=function(e){var t=this.removeCommonBits(e),n=Pt.snap(t[0],t[1],this._snapTolerance);return n},Ft.prototype.interfaces_=function(){return[]},Ft.prototype.getClass=function(){return Ft},Ft.overlayOp=function(e,t,n){var i=new Ft(e,t);return i.getResultGeometry(n)},Ft.union=function(e,t){return Ft.overlayOp(e,t,Re.UNION)},Ft.intersection=function(e,t){return Ft.overlayOp(e,t,Re.INTERSECTION)},Ft.symDifference=function(e,t){return Ft.overlayOp(e,t,Re.SYMDIFFERENCE)},Ft.difference=function(e,t){return Ft.overlayOp(e,t,Re.DIFFERENCE)};var fr=function(e,t){this._geom=new Array(2).fill(null),this._geom[0]=e,this._geom[1]=t};fr.prototype.getResultGeometry=function(e){var t=null,n=!1,i=null;try{t=Re.overlayOp(this._geom[0],this._geom[1],e);var o=!0;o&&(n=!0)}catch(s){if(s instanceof zi)i=s;else throw s}finally{}if(!n)try{t=Ft.overlayOp(this._geom[0],this._geom[1],e)}catch(s){throw s instanceof zi?i:s}finally{}return t},fr.prototype.interfaces_=function(){return[]},fr.prototype.getClass=function(){return fr},fr.overlayOp=function(e,t,n){var i=new fr(e,t);return i.getResultGeometry(n)},fr.union=function(e,t){return fr.overlayOp(e,t,Re.UNION)},fr.intersection=function(e,t){return fr.overlayOp(e,t,Re.INTERSECTION)},fr.symDifference=function(e,t){return fr.overlayOp(e,t,Re.SYMDIFFERENCE)},fr.difference=function(e,t){return fr.overlayOp(e,t,Re.DIFFERENCE)};var vc=function(){this.mce=null,this.chainIndex=null;var e=arguments[0],t=arguments[1];this.mce=e,this.chainIndex=t};vc.prototype.computeIntersections=function(e,t){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,t)},vc.prototype.interfaces_=function(){return[]},vc.prototype.getClass=function(){return vc};var Lr=function r(){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=r.DELETE,this._xValue=e,this._insertEvent=t}else if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];this._eventType=r.INSERT,this._label=n,this._xValue=i,this._obj=o}},ed={INSERT:{configurable:!0},DELETE:{configurable:!0}};Lr.prototype.isDelete=function(){return this._eventType===Lr.DELETE},Lr.prototype.setDeleteEventIndex=function(e){this._deleteEventIndex=e},Lr.prototype.getObject=function(){return this._obj},Lr.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},Lr.prototype.getInsertEvent=function(){return this._insertEvent},Lr.prototype.isInsert=function(){return this._eventType===Lr.INSERT},Lr.prototype.isSameLabel=function(e){return this._label===null?!1:this._label===e._label},Lr.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Lr.prototype.interfaces_=function(){return[rn]},Lr.prototype.getClass=function(){return Lr},ed.INSERT.get=function(){return 1},ed.DELETE.get=function(){return 2},Object.defineProperties(Lr,ed);var Ch=function(){};Ch.prototype.interfaces_=function(){return[]},Ch.prototype.getClass=function(){return Ch};var Xt=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],n=arguments[2];this._li=e,this._includeProper=t,this._recordIsolated=n};Xt.prototype.isTrivialIntersection=function(e,t,n,i){if(e===n&&this._li.getIntersectionNum()===1){if(Xt.isAdjacentSegments(t,i))return!0;if(e.isClosed()){var o=e.getNumPoints()-1;if(t===0&&i===o||i===0&&t===o)return!0}}return!1},Xt.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Xt.prototype.setIsDoneIfProperInt=function(e){this._isDoneWhenProperInt=e},Xt.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Xt.prototype.isBoundaryPointInternal=function(e,t){for(var n=t.iterator();n.hasNext();){var i=n.next(),o=i.getCoordinate();if(e.isIntersection(o))return!0}return!1},Xt.prototype.hasProperIntersection=function(){return this._hasProper},Xt.prototype.hasIntersection=function(){return this._hasIntersection},Xt.prototype.isDone=function(){return this._isDone},Xt.prototype.isBoundaryPoint=function(e,t){return t===null?!1:!!(this.isBoundaryPointInternal(e,t[0])||this.isBoundaryPointInternal(e,t[1]))},Xt.prototype.setBoundaryNodes=function(e,t){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=t},Xt.prototype.addIntersections=function(e,t,n,i){if(e===n&&t===i)return null;this.numTests++;var o=e.getCoordinates()[t],s=e.getCoordinates()[t+1],a=n.getCoordinates()[i],c=n.getCoordinates()[i+1];this._li.computeIntersection(o,s,a,c),this._li.hasIntersection()&&(this._recordIsolated&&(e.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(e,t,n,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(e.addIntersections(this._li,t,0),n.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))))},Xt.prototype.interfaces_=function(){return[]},Xt.prototype.getClass=function(){return Xt},Xt.isAdjacentSegments=function(e,t){return Math.abs(e-t)===1};var F_=function(r){function e(){r.call(this),this.events=new ue,this.nOverlaps=null}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){var n=this;Tn.sort(this.events);for(var i=0;i<this.events.size();i++){var o=n.events.get(i);o.isDelete()&&o.getInsertEvent().setDeleteEventIndex(i)}},e.prototype.computeIntersections=function(){var n=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var o=0;o<this.events.size();o++){var s=n.events.get(o);if(s.isInsert()&&n.processOverlaps(o,s.getDeleteEventIndex(),s,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Xt&&Me(arguments[0],xn)&&Me(arguments[1],xn)){var a=arguments[0],c=arguments[1],f=arguments[2];this.addEdges(a,a),this.addEdges(c,c),this.computeIntersections(f)}else if(typeof arguments[2]=="boolean"&&Me(arguments[0],xn)&&arguments[1]instanceof Xt){var m=arguments[0],p=arguments[1],g=arguments[2];g?this.addEdges(m,null):this.addEdges(m),this.computeIntersections(p)}}},e.prototype.addEdge=function(n,i){for(var o=this,s=n.getMonotoneChainEdge(),a=s.getStartIndexes(),c=0;c<a.length-1;c++){var f=new vc(s,c),m=new Lr(i,s.getMinX(c),f);o.events.add(m),o.events.add(new Lr(s.getMaxX(c),m))}},e.prototype.processOverlaps=function(n,i,o,s){for(var a=this,c=o.getObject(),f=n;f<i;f++){var m=a.events.get(f);if(m.isInsert()){var p=m.getObject();o.isSameLabel(m)||(c.computeIntersections(p,s),a.nOverlaps++)}}},e.prototype.addEdges=function(){var n=this;if(arguments.length===1)for(var i=arguments[0],o=i.iterator();o.hasNext();){var s=o.next();n.addEdge(s,s)}else if(arguments.length===2)for(var a=arguments[0],c=arguments[1],f=a.iterator();f.hasNext();){var m=f.next();n.addEdge(m,c)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ch),xi=function(){this._min=De.POSITIVE_INFINITY,this._max=De.NEGATIVE_INFINITY},Dg={NodeComparator:{configurable:!0}};xi.prototype.getMin=function(){return this._min},xi.prototype.intersects=function(e,t){return!(this._min>t||this._max<e)},xi.prototype.getMax=function(){return this._max},xi.prototype.toString=function(){return Cn.toLineString(new K(this._min,0),new K(this._max,0))},xi.prototype.interfaces_=function(){return[]},xi.prototype.getClass=function(){return xi},Dg.NodeComparator.get=function(){return yc},Object.defineProperties(xi,Dg);var yc=function(){};yc.prototype.compare=function(e,t){var n=e,i=t,o=(n._min+n._max)/2,s=(i._min+i._max)/2;return o<s?-1:o>s?1:0},yc.prototype.interfaces_=function(){return[el]},yc.prototype.getClass=function(){return yc};var j_=function(r){function e(){r.call(this),this._item=null;var t=arguments[0],n=arguments[1],i=arguments[2];this._min=t,this._max=n,this._item=i}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.query=function(n,i,o){if(!this.intersects(n,i))return null;o.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(xi),k_=function(r){function e(){r.call(this),this._node1=null,this._node2=null;var t=arguments[0],n=arguments[1];this._node1=t,this._node2=n,this.buildExtent(this._node1,this._node2)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(n,i){this._min=Math.min(n._min,i._min),this._max=Math.max(n._max,i._max)},e.prototype.query=function(n,i,o){if(!this.intersects(n,i))return null;this._node1!==null&&this._node1.query(n,i,o),this._node2!==null&&this._node2.query(n,i,o)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(xi),Oi=function(){this._leaves=new ue,this._root=null,this._level=0};Oi.prototype.buildTree=function(){var e=this;Tn.sort(this._leaves,new xi.NodeComparator);for(var t=this._leaves,n=null,i=new ue;;){if(e.buildLevel(t,i),i.size()===1)return i.get(0);n=t,t=i,i=n}},Oi.prototype.insert=function(e,t,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new j_(e,t,n))},Oi.prototype.query=function(e,t,n){this.init(),this._root.query(e,t,n)},Oi.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},Oi.prototype.printNode=function(e){Bt.out.println(Cn.toLineString(new K(e._min,this._level),new K(e._max,this._level)))},Oi.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},Oi.prototype.buildLevel=function(e,t){this._level++,t.clear();for(var n=0;n<e.size();n+=2){var i=e.get(n),o=n+1<e.size()?e.get(n):null;if(o===null)t.add(i);else{var s=new k_(e.get(n),e.get(n+1));t.add(s)}}},Oi.prototype.interfaces_=function(){return[]},Oi.prototype.getClass=function(){return Oi};var ml=function(){this._items=new ue};ml.prototype.visitItem=function(e){this._items.add(e)},ml.prototype.getItems=function(){return this._items},ml.prototype.interfaces_=function(){return[Ps]},ml.prototype.getClass=function(){return ml};var _l=function(){this._index=null;var e=arguments[0];if(!Me(e,Es))throw new ct("Argument must be Polygonal");this._index=new ho(e)},td={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};_l.prototype.locate=function(e){var t=new qn(e),n=new bl(t);return this._index.query(e.y,e.y,n),t.getLocation()},_l.prototype.interfaces_=function(){return[gl]},_l.prototype.getClass=function(){return _l},td.SegmentVisitor.get=function(){return bl},td.IntervalIndexedGeometry.get=function(){return ho},Object.defineProperties(_l,td);var bl=function(){this._counter=null;var e=arguments[0];this._counter=e};bl.prototype.visitItem=function(e){var t=e;this._counter.countSegment(t.getCoordinate(0),t.getCoordinate(1))},bl.prototype.interfaces_=function(){return[Ps]},bl.prototype.getClass=function(){return bl};var ho=function(){this._index=new Oi;var e=arguments[0];this.init(e)};ho.prototype.init=function(e){for(var t=this,n=Wt.getLines(e),i=n.iterator();i.hasNext();){var o=i.next(),s=o.getCoordinates();t.addLine(s)}},ho.prototype.addLine=function(e){for(var t=this,n=1;n<e.length;n++){var i=new Pe(e[n-1],e[n]),o=Math.min(i.p0.y,i.p1.y),s=Math.max(i.p0.y,i.p1.y);t._index.insert(o,s,i)}},ho.prototype.query=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new ml;return this._index.query(e,t,n),n.getItems()}else if(arguments.length===3){var i=arguments[0],o=arguments[1],s=arguments[2];this._index.query(i,o,s)}},ho.prototype.interfaces_=function(){return[]},ho.prototype.getClass=function(){return ho};var mc=function(r){function e(){if(r.call(this),this._parentGeom=null,this._lineEdgeMap=new dg,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Dn,arguments.length===2){var t=arguments[0],n=arguments[1],i=sn.OGC_SFS_BOUNDARY_RULE;this._argIndex=t,this._parentGeom=n,this._boundaryNodeRule=i,n!==null&&this.add(n)}else if(arguments.length===3){var o=arguments[0],s=arguments[1],a=arguments[2];this._argIndex=o,this._parentGeom=s,this._boundaryNodeRule=a,s!==null&&this.add(s)}}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(n,i){var o=this._nodes.addNode(i),s=o.getLabel(),a=1,c=Q.NONE;c=s.getLocation(n,ie.ON),c===Q.BOUNDARY&&a++;var f=e.determineBoundary(this._boundaryNodeRule,a);s.setLocation(n,f)},e.prototype.computeSelfNodes=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.computeSelfNodes(n,i,!1)}else if(arguments.length===3){var o=arguments[0],s=arguments[1],a=arguments[2],c=new Xt(o,!0,!1);c.setIsDoneIfProperInt(a);var f=this.createEdgeSetIntersector(),m=this._parentGeom instanceof yi||this._parentGeom instanceof It||this._parentGeom instanceof mi,p=s||!m;return f.computeIntersections(this._edges,c,p),this.addSelfIntersectionNodes(this._argIndex),c}},e.prototype.computeSplitEdges=function(n){for(var i=this._edges.iterator();i.hasNext();){var o=i.next();o.eiList.addSplitEdges(n)}},e.prototype.computeEdgeIntersections=function(n,i,o){var s=new Xt(i,o,!0);s.setBoundaryNodes(this.getBoundaryNodes(),n.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,n._edges,s),s},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 Nr){var n=arguments[0],i=n.getCoordinate();this.insertPoint(this._argIndex,i,Q.INTERIOR)}else if(arguments[0]instanceof K){var o=arguments[0];this.insertPoint(this._argIndex,o,Q.INTERIOR)}},e.prototype.addPolygon=function(n){var i=this;this.addPolygonRing(n.getExteriorRing(),Q.EXTERIOR,Q.INTERIOR);for(var o=0;o<n.getNumInteriorRing();o++){var s=n.getInteriorRingN(o);i.addPolygonRing(s,Q.INTERIOR,Q.EXTERIOR)}},e.prototype.addEdge=function(n){this.insertEdge(n);var i=n.getCoordinates();this.insertPoint(this._argIndex,i[0],Q.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],Q.BOUNDARY)},e.prototype.addLineString=function(n){var i=ke.removeRepeatedPoints(n.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var o=new Sh(i,new Ze(this._argIndex,Q.INTERIOR));this._lineEdgeMap.put(n,o),this.insertEdge(o),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 n=this.getBoundaryNodes(),i=new Array(n.size()).fill(null),o=0,s=n.iterator();s.hasNext();){var a=s.next();i[o++]=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(n,i,o){if(this.isBoundaryNode(n,i))return null;o===Q.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,i):this.insertPoint(n,i,o)},e.prototype.addPolygonRing=function(n,i,o){if(n.isEmpty())return null;var s=ke.removeRepeatedPoints(n.getCoordinates());if(s.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=s[0],null;var a=i,c=o;he.isCCW(s)&&(a=o,c=i);var f=new Sh(s,new Ze(this._argIndex,Q.BOUNDARY,a,c));this._lineEdgeMap.put(n,f),this.insertEdge(f),this.insertPoint(this._argIndex,s[0],Q.BOUNDARY)},e.prototype.insertPoint=function(n,i,o){var s=this._nodes.addNode(i),a=s.getLabel();a===null?s._label=new Ze(n,o):a.setLocation(n,o)},e.prototype.createEdgeSetIntersector=function(){return new F_},e.prototype.addSelfIntersectionNodes=function(n){for(var i=this,o=this._edges.iterator();o.hasNext();)for(var s=o.next(),a=s.getLabel().getLocation(n),c=s.eiList.iterator();c.hasNext();){var f=c.next();i.addSelfIntersectionNode(n,f.coord,a)}},e.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof mi&&(this._useBoundaryDeterminationRule=!1),n instanceof It)this.addPolygon(n);else if(n instanceof vt)this.addLineString(n);else if(n instanceof Nr)this.addPoint(n);else if(n instanceof hl)this.addCollection(n);else if(n instanceof io)this.addCollection(n);else if(n instanceof mi)this.addCollection(n);else if(n instanceof sr)this.addCollection(n);else throw new Error(n.getClass().getName())}else return r.prototype.add.apply(this,arguments)},e.prototype.addCollection=function(n){for(var i=this,o=0;o<n.getNumGeometries();o++){var s=n.getGeometryN(o);i.add(s)}},e.prototype.locate=function(n){return Me(this._parentGeom,Es)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new _l(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},e.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return r.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(n,i){return n.isInBoundary(i)?Q.BOUNDARY:Q.INTERIOR},e}(dt),wl=function(){if(this._li=new to,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 mc(0,e)}else if(arguments.length===2){var t=arguments[0],n=arguments[1],i=sn.OGC_SFS_BOUNDARY_RULE;t.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(t.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new mc(0,t,i),this._arg[1]=new mc(1,n,i)}else if(arguments.length===3){var o=arguments[0],s=arguments[1],a=arguments[2];o.getPrecisionModel().compareTo(s.getPrecisionModel())>=0?this.setComputationPrecision(o.getPrecisionModel()):this.setComputationPrecision(s.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new mc(0,o,a),this._arg[1]=new mc(1,s,a)}};wl.prototype.getArgGeometry=function(e){return this._arg[e].getGeometry()},wl.prototype.setComputationPrecision=function(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)},wl.prototype.interfaces_=function(){return[]},wl.prototype.getClass=function(){return wl};var fo=function(){};fo.prototype.interfaces_=function(){return[]},fo.prototype.getClass=function(){return fo},fo.map=function(){if(arguments[0]instanceof Oe&&Me(arguments[1],fo.MapOp)){for(var e=arguments[0],t=arguments[1],n=new ue,i=0;i<e.getNumGeometries();i++){var o=t.map(e.getGeometryN(i));o!==null&&n.add(o)}return e.getFactory().buildGeometry(n)}else if(Me(arguments[0],Mt)&&Me(arguments[1],fo.MapOp)){for(var s=arguments[0],a=arguments[1],c=new ue,f=s.iterator();f.hasNext();){var m=f.next(),p=a.map(m);p!==null&&c.add(p)}return c}},fo.MapOp=function(){};var Re=function(r){function e(){var t=arguments[0],n=arguments[1];r.call(this,t,n),this._ptLocator=new Dn,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Nn,this._resultPolyList=new ue,this._resultLineList=new ue,this._resultPointList=new ue,this._graph=new dt(new Pg),this._geomFact=t.getFactory()}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(n){var i=this._edgeList.findEqualEdge(n);if(i!==null){var o=i.getLabel(),s=n.getLabel();i.isPointwiseEqual(n)||(s=new Ze(n.getLabel()),s.flip());var a=i.getDepth();a.isNull()&&a.add(o),a.add(s),o.merge(s)}else this._edgeList.add(n)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),o=i.getSym();i.isInResult()&&o.isInResult()&&(i.setInResult(!1),o.setInResult(!1))}},e.prototype.isCoveredByLA=function(n){return!!(this.isCovered(n,this._resultLineList)||this.isCovered(n,this._resultPolyList))},e.prototype.computeGeometry=function(n,i,o,s){var a=new ue;return a.addAll(n),a.addAll(i),a.addAll(o),a.isEmpty()?e.createEmptyResult(s,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},e.prototype.mergeSymLabels=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next();i.getEdges().mergeSymLabels()}},e.prototype.isCovered=function(n,i){for(var o=this,s=i.iterator();s.hasNext();){var a=s.next(),c=o._ptLocator.locate(n,a);if(c!==Q.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var n=new ue,i=this._edgeList.iterator();i.hasNext();){var o=i.next();o.isCollapsed()&&(i.remove(),n.add(o.getCollapsedEdge()))}this._edgeList.addAll(n)},e.prototype.updateNodeLabelling=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next(),o=i.getEdges().getLabel();i.getLabel().merge(o)}},e.prototype.getResultGeometry=function(n){return this.computeOverlay(n),this._resultGeom},e.prototype.insertUniqueEdges=function(n){for(var i=this,o=n.iterator();o.hasNext();){var s=o.next();i.insertUniqueEdge(s)}},e.prototype.computeOverlay=function(n){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 ue;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),co.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(n),this.cancelDuplicateResultEdges();var o=new Dr(this._geomFact);o.add(this._graph),this._resultPolyList=o.getPolygons();var s=new ii(this,this._geomFact,this._ptLocator);this._resultLineList=s.build(n);var a=new ra(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(n),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,n)},e.prototype.labelIncompleteNode=function(n,i){var o=this._ptLocator.locate(n.getCoordinate(),this._arg[i].getGeometry());n.getLabel().setLocation(i,o)},e.prototype.copyPoints=function(n){for(var i=this,o=this._arg[n].getNodeIterator();o.hasNext();){var s=o.next(),a=i._graph.addNode(s.getCoordinate());a.setLabel(n,s.getLabel().getLocation(n))}},e.prototype.findResultAreaEdges=function(n){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var o=i.next(),s=o.getLabel();s.isArea()&&!o.isInteriorAreaEdge()&&e.isResultOfOp(s.getLocation(0,ie.RIGHT),s.getLocation(1,ie.RIGHT),n)&&o.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var n=this._edgeList.iterator();n.hasNext();){var i=n.next(),o=i.getLabel(),s=i.getDepth();if(!s.isNull()){s.normalize();for(var a=0;a<2;a++)!o.isNull(a)&&o.isArea()&&!s.isNull(a)&&(s.getDelta(a)===0?o.toLine(a):(Fe.isTrue(!s.isNull(a,ie.LEFT),"depth of LEFT side has not been initialized"),o.setLocation(a,ie.LEFT,s.getLocation(a,ie.LEFT)),Fe.isTrue(!s.isNull(a,ie.RIGHT),"depth of RIGHT side has not been initialized"),o.setLocation(a,ie.RIGHT,s.getLocation(a,ie.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var o=i.next();o.getEdges().computeLabelling(n._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var o=i.next(),s=o.getLabel();o.isIsolated()&&(s.isNull(0)?n.labelIncompleteNode(o,0):n.labelIncompleteNode(o,1)),o.getEdges().updateLabelling(s)}},e.prototype.isCoveredByA=function(n){return!!this.isCovered(n,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(wl);Re.overlayOp=function(r,e,t){var n=new Re(r,e),i=n.getResultGeometry(t);return i},Re.intersection=function(r,e){if(r.isEmpty()||e.isEmpty())return Re.createEmptyResult(Re.INTERSECTION,r,e,r.getFactory());if(r.isGeometryCollection()){var t=e;return ta.map(r,{interfaces_:function(){return[fo.MapOp]},map:function(n){return n.intersection(t)}})}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(e),fr.overlayOp(r,e,Re.INTERSECTION)},Re.symDifference=function(r,e){if(r.isEmpty()||e.isEmpty()){if(r.isEmpty()&&e.isEmpty())return Re.createEmptyResult(Re.SYMDIFFERENCE,r,e,r.getFactory());if(r.isEmpty())return e.copy();if(e.isEmpty())return r.copy()}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(e),fr.overlayOp(r,e,Re.SYMDIFFERENCE)},Re.resultDimension=function(r,e,t){var n=e.getDimension(),i=t.getDimension(),o=-1;switch(r){case Re.INTERSECTION:o=Math.min(n,i);break;case Re.UNION:o=Math.max(n,i);break;case Re.DIFFERENCE:o=n;break;case Re.SYMDIFFERENCE:o=Math.max(n,i);break}return o},Re.createEmptyResult=function(r,e,t,n){var i=null;switch(Re.resultDimension(r,e,t)){case-1:i=n.createGeometryCollection(new Array(0).fill(null));break;case 0:i=n.createPoint();break;case 1:i=n.createLineString();break;case 2:i=n.createPolygon();break}return i},Re.difference=function(r,e){return r.isEmpty()?Re.createEmptyResult(Re.DIFFERENCE,r,e,r.getFactory()):e.isEmpty()?r.copy():(r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(e),fr.overlayOp(r,e,Re.DIFFERENCE))},Re.isResultOfOp=function(){if(arguments.length===2){var r=arguments[0],e=arguments[1],t=r.getLocation(0),n=r.getLocation(1);return Re.isResultOfOp(t,n,e)}else if(arguments.length===3){var i=arguments[0],o=arguments[1],s=arguments[2];switch(i===Q.BOUNDARY&&(i=Q.INTERIOR),o===Q.BOUNDARY&&(o=Q.INTERIOR),s){case Re.INTERSECTION:return i===Q.INTERIOR&&o===Q.INTERIOR;case Re.UNION:return i===Q.INTERIOR||o===Q.INTERIOR;case Re.DIFFERENCE:return i===Q.INTERIOR&&o!==Q.INTERIOR;case Re.SYMDIFFERENCE:return i===Q.INTERIOR&&o!==Q.INTERIOR||i!==Q.INTERIOR&&o===Q.INTERIOR}return!1}},Re.INTERSECTION=1,Re.UNION=2,Re.DIFFERENCE=3,Re.SYMDIFFERENCE=4;var Ds=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Dn,this._seg=new Pe;var e=arguments[0],t=arguments[1];this._g=e,this._boundaryDistanceTolerance=t,this._linework=this.extractLinework(e)};Ds.prototype.isWithinToleranceOfBoundary=function(e){for(var t=this,n=0;n<this._linework.getNumGeometries();n++)for(var i=t._linework.getGeometryN(n),o=i.getCoordinateSequence(),s=0;s<o.size()-1;s++){o.getCoordinate(s,t._seg.p0),o.getCoordinate(s+1,t._seg.p1);var a=t._seg.distance(e);if(a<=t._boundaryDistanceTolerance)return!0}return!1},Ds.prototype.getLocation=function(e){return this.isWithinToleranceOfBoundary(e)?Q.BOUNDARY:this._ptLocator.locate(e,this._g)},Ds.prototype.extractLinework=function(e){var t=new El;e.apply(t);var n=t.getLinework(),i=Ge.toLineStringArray(n);return e.getFactory().createMultiLineString(i)},Ds.prototype.interfaces_=function(){return[]},Ds.prototype.getClass=function(){return Ds};var El=function(){this._linework=null,this._linework=new ue};El.prototype.getLinework=function(){return this._linework},El.prototype.filter=function(e){var t=this;if(e instanceof It){var n=e;this._linework.add(n.getExteriorRing());for(var i=0;i<n.getNumInteriorRing();i++)t._linework.add(n.getInteriorRingN(i))}},El.prototype.interfaces_=function(){return[Xn]},El.prototype.getClass=function(){return El};var po=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var e=arguments[0];this._g=e};po.prototype.extractPoints=function(e,t,n){for(var i=this,o=e.getCoordinates(),s=0;s<o.length-1;s++)i.computeOffsetPoints(o[s],o[s+1],t,n)},po.prototype.setSidesToGenerate=function(e,t){this._doLeft=e,this._doRight=t},po.prototype.getPoints=function(e){for(var t=this,n=new ue,i=Wt.getLines(this._g),o=i.iterator();o.hasNext();){var s=o.next();t.extractPoints(s,e,n)}return n},po.prototype.computeOffsetPoints=function(e,t,n,i){var o=t.x-e.x,s=t.y-e.y,a=Math.sqrt(o*o+s*s),c=n*o/a,f=n*s/a,m=(t.x+e.x)/2,p=(t.y+e.y)/2;if(this._doLeft){var g=new K(m-f,p+c);i.add(g)}if(this._doRight){var w=new K(m+f,p-c);i.add(w)}},po.prototype.interfaces_=function(){return[]},po.prototype.getClass=function(){return po};var Hr=function r(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=r.TOLERANCE,this._testCoords=new ue;var e=arguments[0],t=arguments[1],n=arguments[2];this._boundaryDistanceTolerance=r.computeBoundaryDistanceTolerance(e,t),this._geom=[e,t,n],this._locFinder=[new Ds(this._geom[0],this._boundaryDistanceTolerance),new Ds(this._geom[1],this._boundaryDistanceTolerance),new Ds(this._geom[2],this._boundaryDistanceTolerance)]},Ag={TOLERANCE:{configurable:!0}};Hr.prototype.reportResult=function(e,t,n){Bt.out.println("Overlay result invalid - A:"+Q.toLocationSymbol(t[0])+" B:"+Q.toLocationSymbol(t[1])+" expected:"+(n?"i":"e")+" actual:"+Q.toLocationSymbol(t[2]))},Hr.prototype.isValid=function(e){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var t=this.checkValid(e);return t},Hr.prototype.checkValid=function(){var e=this;if(arguments.length===1){for(var t=arguments[0],n=0;n<this._testCoords.size();n++){var i=e._testCoords.get(n);if(!e.checkValid(t,i))return e._invalidLocation=i,!1}return!0}else if(arguments.length===2){var o=arguments[0],s=arguments[1];return this._location[0]=this._locFinder[0].getLocation(s),this._location[1]=this._locFinder[1].getLocation(s),this._location[2]=this._locFinder[2].getLocation(s),Hr.hasLocation(this._location,Q.BOUNDARY)?!0:this.isValidResult(o,this._location)}},Hr.prototype.addTestPts=function(e){var t=new po(e);this._testCoords.addAll(t.getPoints(5*this._boundaryDistanceTolerance))},Hr.prototype.isValidResult=function(e,t){var n=Re.isResultOfOp(t[0],t[1],e),i=t[2]===Q.INTERIOR,o=!(n^i);return o||this.reportResult(e,t,n),o},Hr.prototype.getInvalidLocation=function(){return this._invalidLocation},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr},Hr.hasLocation=function(e,t){for(var n=0;n<3;n++)if(e[n]===t)return!0;return!1},Hr.computeBoundaryDistanceTolerance=function(e,t){return Math.min(Pt.computeSizeBasedSnapTolerance(e),Pt.computeSizeBasedSnapTolerance(t))},Hr.isValid=function(e,t,n,i){var o=new Hr(e,t,i);return o.isValid(n)},Ag.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Hr,Ag);var Xr=function r(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=r.extractFactory(e),this._inputGeoms=e};Xr.prototype.extractElements=function(e,t){var n=this;if(e===null)return null;for(var i=0;i<e.getNumGeometries();i++){var o=e.getGeometryN(i);n._skipEmpty&&o.isEmpty()||t.add(o)}},Xr.prototype.combine=function(){for(var e=this,t=new ue,n=this._inputGeoms.iterator();n.hasNext();){var i=n.next();e.extractElements(i,t)}return t.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},Xr.prototype.interfaces_=function(){return[]},Xr.prototype.getClass=function(){return Xr},Xr.combine=function(){if(arguments.length===1){var e=arguments[0],t=new Xr(e);return t.combine()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],o=new Xr(Xr.createList(n,i));return o.combine()}else if(arguments.length===3){var s=arguments[0],a=arguments[1],c=arguments[2],f=new Xr(Xr.createList(s,a,c));return f.combine()}},Xr.extractFactory=function(e){return e.isEmpty()?null:e.iterator().next().getFactory()},Xr.createList=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=new ue;return n.add(e),n.add(t),n}else if(arguments.length===3){var i=arguments[0],o=arguments[1],s=arguments[2],a=new ue;return a.add(i),a.add(o),a.add(s),a}};var xt=function(){this._inputPolys=null,this._geomFactory=null;var e=arguments[0];this._inputPolys=e,this._inputPolys===null&&(this._inputPolys=new ue)},Rg={STRTREE_NODE_CAPACITY:{configurable:!0}};xt.prototype.reduceToGeometries=function(e){for(var t=this,n=new ue,i=e.iterator();i.hasNext();){var o=i.next(),s=null;Me(o,xn)?s=t.unionTree(o):o instanceof Oe&&(s=o),n.add(s)}return n},xt.prototype.extractByEnvelope=function(e,t,n){for(var i=new ue,o=0;o<t.getNumGeometries();o++){var s=t.getGeometryN(o);s.getEnvelopeInternal().intersects(e)?i.add(s):n.add(s)}return this._geomFactory.buildGeometry(i)},xt.prototype.unionOptimized=function(e,t){var n=e.getEnvelopeInternal(),i=t.getEnvelopeInternal();if(!n.intersects(i)){var o=Xr.combine(e,t);return o}if(e.getNumGeometries()<=1&&t.getNumGeometries()<=1)return this.unionActual(e,t);var s=n.intersection(i);return this.unionUsingEnvelopeIntersection(e,t,s)},xt.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 yg(xt.STRTREE_NODE_CAPACITY),t=this._inputPolys.iterator();t.hasNext();){var n=t.next();e.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=e.itemsTree(),o=this.unionTree(i);return o},xt.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],n=arguments[1],i=arguments[2];if(i-n<=1){var o=xt.getGeometry(t,n);return this.unionSafe(o,null)}else{if(i-n===2)return this.unionSafe(xt.getGeometry(t,n),xt.getGeometry(t,n+1));var s=Math.trunc((i+n)/2),a=this.binaryUnion(t,n,s),c=this.binaryUnion(t,s,i);return this.unionSafe(a,c)}}},xt.prototype.repeatedUnion=function(e){for(var t=null,n=e.iterator();n.hasNext();){var i=n.next();t===null?t=i.copy():t=t.union(i)}return t},xt.prototype.unionSafe=function(e,t){return e===null&&t===null?null:e===null?t.copy():t===null?e.copy():this.unionOptimized(e,t)},xt.prototype.unionActual=function(e,t){return xt.restrictToPolygons(e.union(t))},xt.prototype.unionTree=function(e){var t=this.reduceToGeometries(e),n=this.binaryUnion(t);return n},xt.prototype.unionUsingEnvelopeIntersection=function(e,t,n){var i=new ue,o=this.extractByEnvelope(n,e,i),s=this.extractByEnvelope(n,t,i),a=this.unionActual(o,s);i.add(a);var c=Xr.combine(i);return c},xt.prototype.bufferUnion=function(){if(arguments.length===1){var e=arguments[0],t=e.get(0).getFactory(),n=t.buildGeometry(e),i=n.buffer(0);return i}else if(arguments.length===2){var o=arguments[0],s=arguments[1],a=o.getFactory(),c=a.createGeometryCollection([o,s]),f=c.buffer(0);return f}},xt.prototype.interfaces_=function(){return[]},xt.prototype.getClass=function(){return xt},xt.restrictToPolygons=function(e){if(Me(e,Es))return e;var t=$i.getPolygons(e);return t.size()===1?t.get(0):e.getFactory().createMultiPolygon(Ge.toPolygonArray(t))},xt.getGeometry=function(e,t){return t>=e.size()?null:e.get(t)},xt.union=function(e){var t=new xt(e);return t.union()},Rg.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(xt,Rg);var xh=function(){};xh.prototype.interfaces_=function(){return[]},xh.prototype.getClass=function(){return xh},xh.union=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Re.createEmptyResult(Re.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),fr.overlayOp(e,t,Re.UNION)};function go(){return new Oh}function Oh(){this.reset()}Oh.prototype={constructor:Oh,reset:function(){this.s=this.t=0},add:function(r){Lg(Mh,r,this.t),Lg(this,Mh.s,this.s),this.s?this.t+=Mh.t:this.s=Mh.t},valueOf:function(){return this.s}};var Mh=new Oh;function Lg(r,e,t){var n=r.s=e+t,i=n-e,o=n-i;r.t=e-o+(t-i)}var Ot=1e-6,tt=Math.PI,Zi=tt/2,Fg=tt/4,es=tt*2,vo=180/tt,si=tt/180,dr=Math.abs,G_=Math.atan,Pl=Math.atan2,Nt=Math.cos,Dt=Math.sin,Sl=Math.sqrt;function jg(r){return r>1?0:r<-1?tt:Math.acos(r)}function ia(r){return r>1?Zi:r<-1?-Zi:Math.asin(r)}function _c(){}function Ih(r,e){r&&Gg.hasOwnProperty(r.type)&&Gg[r.type](r,e)}var kg={Feature:function(r,e){Ih(r.geometry,e)},FeatureCollection:function(r,e){for(var t=r.features,n=-1,i=t.length;++n<i;)Ih(t[n].geometry,e)}},Gg={Sphere:function(r,e){e.sphere()},Point:function(r,e){r=r.coordinates,e.point(r[0],r[1],r[2])},MultiPoint:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)r=t[n],e.point(r[0],r[1],r[2])},LineString:function(r,e){rd(r.coordinates,e,0)},MultiLineString:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)rd(t[n],e,0)},Polygon:function(r,e){Vg(r.coordinates,e)},MultiPolygon:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)Vg(t[n],e)},GeometryCollection:function(r,e){for(var t=r.geometries,n=-1,i=t.length;++n<i;)Ih(t[n],e)}};function rd(r,e,t){var n=-1,i=r.length-t,o;for(e.lineStart();++n<i;)o=r[n],e.point(o[0],o[1],o[2]);e.lineEnd()}function Vg(r,e){var t=-1,n=r.length;for(e.polygonStart();++t<n;)rd(r[t],e,1);e.polygonEnd()}function V_(r,e){r&&kg.hasOwnProperty(r.type)?kg[r.type](r,e):Ih(r,e)}go(),go();function nd(r){return[Pl(r[1],r[0]),ia(r[2])]}function Cl(r){var e=r[0],t=r[1],n=Nt(t);return[n*Nt(e),n*Dt(e),Dt(t)]}function Th(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Nh(r,e){return[r[1]*e[2]-r[2]*e[1],r[2]*e[0]-r[0]*e[2],r[0]*e[1]-r[1]*e[0]]}function id(r,e){r[0]+=e[0],r[1]+=e[1],r[2]+=e[2]}function Dh(r,e){return[r[0]*e,r[1]*e,r[2]*e]}function sd(r){var e=Sl(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=e,r[1]/=e,r[2]/=e}go();function Bg(r,e){function t(n,i){return n=r(n,i),e(n[0],n[1])}return r.invert&&e.invert&&(t.invert=function(n,i){return n=e.invert(n,i),n&&r.invert(n[0],n[1])}),t}function od(r,e){return[r>tt?r-es:r<-tt?r+es:r,e]}od.invert=od;function B_(r,e,t){return(r%=es)?e||t?Bg(Ug(r),Wg(e,t)):Ug(r):e||t?Wg(e,t):od}function zg(r){return function(e,t){return e+=r,[e>tt?e-es:e<-tt?e+es:e,t]}}function Ug(r){var e=zg(r);return e.invert=zg(-r),e}function Wg(r,e){var t=Nt(r),n=Dt(r),i=Nt(e),o=Dt(e);function s(a,c){var f=Nt(c),m=Nt(a)*f,p=Dt(a)*f,g=Dt(c),w=g*t+m*n;return[Pl(p*i-w*o,m*t-g*n),ia(w*i+p*o)]}return s.invert=function(a,c){var f=Nt(c),m=Nt(a)*f,p=Dt(a)*f,g=Dt(c),w=g*i-p*o;return[Pl(p*i+g*o,m*t+w*n),ia(w*t-m*n)]},s}function z_(r,e,t,n,i,o){if(t){var s=Nt(e),a=Dt(e),c=n*t;i==null?(i=e+n*es,o=e-c/2):(i=qg(s,i),o=qg(s,o),(n>0?i<o:i>o)&&(i+=n*es));for(var f,m=i;n>0?m>o:m<o;m-=c)f=nd([s,-a*Nt(m),-a*Dt(m)]),r.point(f[0],f[1])}}function qg(r,e){e=Cl(e),e[0]-=r,sd(e);var t=jg(-e[1]);return((-e[2]<0?-t:t)+es-Ot)%es}function Hg(){var r=[],e;return{point:function(t,n){e.push([t,n])},lineStart:function(){r.push(e=[])},lineEnd:_c,rejoin:function(){r.length>1&&r.push(r.pop().concat(r.shift()))},result:function(){var t=r;return r=[],e=null,t}}}function U_(r,e,t,n,i,o){var s=r[0],a=r[1],c=e[0],f=e[1],m=0,p=1,g=c-s,w=f-a,_;if(_=t-s,!(!g&&_>0)){if(_/=g,g<0){if(_<m)return;_<p&&(p=_)}else if(g>0){if(_>p)return;_>m&&(m=_)}if(_=i-s,!(!g&&_<0)){if(_/=g,g<0){if(_>p)return;_>m&&(m=_)}else if(g>0){if(_<m)return;_<p&&(p=_)}if(_=n-a,!(!w&&_>0)){if(_/=w,w<0){if(_<m)return;_<p&&(p=_)}else if(w>0){if(_>p)return;_>m&&(m=_)}if(_=o-a,!(!w&&_<0)){if(_/=w,w<0){if(_>p)return;_>m&&(m=_)}else if(w>0){if(_<m)return;_<p&&(p=_)}return m>0&&(r[0]=s+m*g,r[1]=a+m*w),p<1&&(e[0]=s+p*g,e[1]=a+p*w),!0}}}}}function Ah(r,e){return dr(r[0]-e[0])<Ot&&dr(r[1]-e[1])<Ot}function Rh(r,e,t,n){this.x=r,this.z=e,this.o=t,this.e=n,this.v=!1,this.n=this.p=null}function Xg(r,e,t,n,i){var o=[],s=[],a,c;if(r.forEach(function(_){if(!((y=_.length-1)<=0)){var y,h=_[0],d=_[y],u;if(Ah(h,d)){for(i.lineStart(),a=0;a<y;++a)i.point((h=_[a])[0],h[1]);i.lineEnd();return}o.push(u=new Rh(h,_,null,!0)),s.push(u.o=new Rh(h,null,u,!1)),o.push(u=new Rh(d,_,null,!1)),s.push(u.o=new Rh(d,null,u,!0))}}),!!o.length){for(s.sort(e),Yg(o),Yg(s),a=0,c=s.length;a<c;++a)s[a].e=t=!t;for(var f=o[0],m,p;;){for(var g=f,w=!0;g.v;)if((g=g.n)===f)return;m=g.z,i.lineStart();do{if(g.v=g.o.v=!0,g.e){if(w)for(a=0,c=m.length;a<c;++a)i.point((p=m[a])[0],p[1]);else n(g.x,g.n.x,1,i);g=g.n}else{if(w)for(m=g.p.z,a=m.length-1;a>=0;--a)i.point((p=m[a])[0],p[1]);else n(g.x,g.p.x,-1,i);g=g.p}g=g.o,m=g.z,w=!w}while(!g.v);i.lineEnd()}}}function Yg(r){if(e=r.length){for(var e,t=0,n=r[0],i;++t<e;)n.n=i=r[t],i.p=n,n=i;n.n=i=r[0],i.p=n}}function Jg(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function W_(r){return r.length===1&&(r=q_(r)),{left:function(e,t,n,i){for(n==null&&(n=0),i==null&&(i=e.length);n<i;){var o=n+i>>>1;r(e[o],t)<0?n=o+1:i=o}return n},right:function(e,t,n,i){for(n==null&&(n=0),i==null&&(i=e.length);n<i;){var o=n+i>>>1;r(e[o],t)>0?i=o:n=o+1}return n}}}function q_(r){return function(e,t){return Jg(r(e),t)}}W_(Jg);function Kg(r){for(var e=r.length,t,n=-1,i=0,o,s;++n<e;)i+=r[n].length;for(o=new Array(i);--e>=0;)for(s=r[e],t=s.length;--t>=0;)o[--i]=s[t];return o}var Lh=1e9,Fh=-1e9;function H_(r,e,t,n){function i(f,m){return r<=f&&f<=t&&e<=m&&m<=n}function o(f,m,p,g){var w=0,_=0;if(f==null||(w=s(f,p))!==(_=s(m,p))||c(f,m)<0^p>0)do g.point(w===0||w===3?r:t,w>1?n:e);while((w=(w+p+4)%4)!==_);else g.point(m[0],m[1])}function s(f,m){return dr(f[0]-r)<Ot?m>0?0:3:dr(f[0]-t)<Ot?m>0?2:1:dr(f[1]-e)<Ot?m>0?1:0:m>0?3:2}function a(f,m){return c(f.x,m.x)}function c(f,m){var p=s(f,1),g=s(m,1);return p!==g?p-g:p===0?m[1]-f[1]:p===1?f[0]-m[0]:p===2?f[1]-m[1]:m[0]-f[0]}return function(f){var m=f,p=Hg(),g,w,_,y,h,d,u,l,v,b,E,S={point:P,lineStart:I,lineEnd:N,polygonStart:x,polygonEnd:O};function P(R,A){i(R,A)&&m.point(R,A)}function C(){for(var R=0,A=0,B=w.length;A<B;++A)for(var k=w[A],z=1,j=k.length,L=k[0],F,G,W=L[0],V=L[1];z<j;++z)F=W,G=V,L=k[z],W=L[0],V=L[1],G<=n?V>n&&(W-F)*(n-G)>(V-G)*(r-F)&&++R:V<=n&&(W-F)*(n-G)<(V-G)*(r-F)&&--R;return R}function x(){m=p,g=[],w=[],E=!0}function O(){var R=C(),A=E&&R,B=(g=Kg(g)).length;(A||B)&&(f.polygonStart(),A&&(f.lineStart(),o(null,null,1,f),f.lineEnd()),B&&Xg(g,a,R,o,f),f.polygonEnd()),m=f,g=w=_=null}function I(){S.point=T,w&&w.push(_=[]),b=!0,v=!1,u=l=NaN}function N(){g&&(T(y,h),d&&v&&p.rejoin(),g.push(p.result())),S.point=P,v&&m.lineEnd()}function T(R,A){var B=i(R,A);if(w&&_.push([R,A]),b)y=R,h=A,d=B,b=!1,B&&(m.lineStart(),m.point(R,A));else if(B&&v)m.point(R,A);else{var k=[u=Math.max(Fh,Math.min(Lh,u)),l=Math.max(Fh,Math.min(Lh,l))],z=[R=Math.max(Fh,Math.min(Lh,R)),A=Math.max(Fh,Math.min(Lh,A))];U_(k,z,r,e,t,n)?(v||(m.lineStart(),m.point(k[0],k[1])),m.point(z[0],z[1]),B||m.lineEnd(),E=!1):B&&(m.lineStart(),m.point(R,A),E=!1)}u=R,l=A,v=B}return S}}var ad=go();function X_(r,e){var t=e[0],n=e[1],i=[Dt(t),-Nt(t),0],o=0,s=0;ad.reset();for(var a=0,c=r.length;a<c;++a)if(m=(f=r[a]).length)for(var f,m,p=f[m-1],g=p[0],w=p[1]/2+Fg,_=Dt(w),y=Nt(w),h=0;h<m;++h,g=u,_=v,y=b,p=d){var d=f[h],u=d[0],l=d[1]/2+Fg,v=Dt(l),b=Nt(l),E=u-g,S=E>=0?1:-1,P=S*E,C=P>tt,x=_*v;if(ad.add(Pl(x*S*Dt(P),y*b+x*Nt(P))),o+=C?E+S*es:E,C^g>=t^u>=t){var O=Nh(Cl(p),Cl(d));sd(O);var I=Nh(i,O);sd(I);var N=(C^E>=0?-1:1)*ia(I[2]);(n>N||n===N&&(O[0]||O[1]))&&(s+=C^E>=0?1:-1)}}return(o<-1e-6||o<Ot&&ad<-1e-6)^s&1}go();function Qg(r){return r}go(),go();var xl=1/0,jh=xl,bc=-xl,kh=bc,$g={point:Y_,lineStart:_c,lineEnd:_c,polygonStart:_c,polygonEnd:_c,result:function(){var r=[[xl,jh],[bc,kh]];return bc=kh=-(jh=xl=1/0),r}};function Y_(r,e){r<xl&&(xl=r),r>bc&&(bc=r),e<jh&&(jh=e),e>kh&&(kh=e)}go();function Zg(r,e,t,n){return function(i,o){var s=e(o),a=i.invert(n[0],n[1]),c=Hg(),f=e(c),m=!1,p,g,w,_={point:y,lineStart:d,lineEnd:u,polygonStart:function(){_.point=l,_.lineStart=v,_.lineEnd=b,g=[],p=[]},polygonEnd:function(){_.point=y,_.lineStart=d,_.lineEnd=u,g=Kg(g);var E=X_(p,a);g.length?(m||(o.polygonStart(),m=!0),Xg(g,K_,E,t,o)):E&&(m||(o.polygonStart(),m=!0),o.lineStart(),t(null,null,1,o),o.lineEnd()),m&&(o.polygonEnd(),m=!1),g=p=null},sphere:function(){o.polygonStart(),o.lineStart(),t(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function y(E,S){var P=i(E,S);r(E=P[0],S=P[1])&&o.point(E,S)}function h(E,S){var P=i(E,S);s.point(P[0],P[1])}function d(){_.point=h,s.lineStart()}function u(){_.point=y,s.lineEnd()}function l(E,S){w.push([E,S]);var P=i(E,S);f.point(P[0],P[1])}function v(){f.lineStart(),w=[]}function b(){l(w[0][0],w[0][1]),f.lineEnd();var E=f.clean(),S=c.result(),P,C=S.length,x,O,I;if(w.pop(),p.push(w),w=null,!!C){if(E&1){if(O=S[0],(x=O.length-1)>0){for(m||(o.polygonStart(),m=!0),o.lineStart(),P=0;P<x;++P)o.point((I=O[P])[0],I[1]);o.lineEnd()}return}C>1&&E&2&&S.push(S.pop().concat(S.shift())),g.push(S.filter(J_))}}return _}}function J_(r){return r.length>1}function K_(r,e){return((r=r.x)[0]<0?r[1]-Zi-Ot:Zi-r[1])-((e=e.x)[0]<0?e[1]-Zi-Ot:Zi-e[1])}const ev=Zg(function(){return!0},Q_,Z_,[-tt,-Zi]);function Q_(r){var e=NaN,t=NaN,n=NaN,i;return{lineStart:function(){r.lineStart(),i=1},point:function(o,s){var a=o>0?tt:-tt,c=dr(o-e);dr(c-tt)<Ot?(r.point(e,t=(t+s)/2>0?Zi:-Zi),r.point(n,t),r.lineEnd(),r.lineStart(),r.point(a,t),r.point(o,t),i=0):n!==a&&c>=tt&&(dr(e-n)<Ot&&(e-=n*Ot),dr(o-a)<Ot&&(o-=a*Ot),t=$_(e,t,o,s),r.point(n,t),r.lineEnd(),r.lineStart(),r.point(a,t),i=0),r.point(e=o,t=s),n=a},lineEnd:function(){r.lineEnd(),e=t=NaN},clean:function(){return 2-i}}}function $_(r,e,t,n){var i,o,s=Dt(r-t);return dr(s)>Ot?G_((Dt(e)*(o=Nt(n))*Dt(t)-Dt(n)*(i=Nt(e))*Dt(r))/(i*o*s)):(e+n)/2}function Z_(r,e,t,n){var i;if(r==null)i=t*Zi,n.point(-tt,i),n.point(0,i),n.point(tt,i),n.point(tt,0),n.point(tt,-i),n.point(0,-i),n.point(-tt,-i),n.point(-tt,0),n.point(-tt,i);else if(dr(r[0]-e[0])>Ot){var o=r[0]<e[0]?tt:-tt;i=t*o/2,n.point(-o,i),n.point(0,i),n.point(o,i)}else n.point(e[0],e[1])}function e1(r,e){var t=Nt(r),n=t>0,i=dr(t)>Ot;function o(m,p,g,w){z_(w,r,e,g,m,p)}function s(m,p){return Nt(m)*Nt(p)>t}function a(m){var p,g,w,_,y;return{lineStart:function(){_=w=!1,y=1},point:function(h,d){var u=[h,d],l,v=s(h,d),b=n?v?0:f(h,d):v?f(h+(h<0?tt:-tt),d):0;if(!p&&(_=w=v)&&m.lineStart(),v!==w&&(l=c(p,u),(!l||Ah(p,l)||Ah(u,l))&&(u[0]+=Ot,u[1]+=Ot,v=s(u[0],u[1]))),v!==w)y=0,v?(m.lineStart(),l=c(u,p),m.point(l[0],l[1])):(l=c(p,u),m.point(l[0],l[1]),m.lineEnd()),p=l;else if(i&&p&&n^v){var E;!(b&g)&&(E=c(u,p,!0))&&(y=0,n?(m.lineStart(),m.point(E[0][0],E[0][1]),m.point(E[1][0],E[1][1]),m.lineEnd()):(m.point(E[1][0],E[1][1]),m.lineEnd(),m.lineStart(),m.point(E[0][0],E[0][1])))}v&&(!p||!Ah(p,u))&&m.point(u[0],u[1]),p=u,w=v,g=b},lineEnd:function(){w&&m.lineEnd(),p=null},clean:function(){return y|(_&&w)<<1}}}function c(m,p,g){var w=Cl(m),_=Cl(p),y=[1,0,0],h=Nh(w,_),d=Th(h,h),u=h[0],l=d-u*u;if(!l)return!g&&m;var v=t*d/l,b=-t*u/l,E=Nh(y,h),S=Dh(y,v),P=Dh(h,b);id(S,P);var C=E,x=Th(S,C),O=Th(C,C),I=x*x-O*(Th(S,S)-1);if(!(I<0)){var N=Sl(I),T=Dh(C,(-x-N)/O);if(id(T,S),T=nd(T),!g)return T;var R=m[0],A=p[0],B=m[1],k=p[1],z;A<R&&(z=R,R=A,A=z);var j=A-R,L=dr(j-tt)<Ot,F=L||j<Ot;if(!L&&k<B&&(z=B,B=k,k=z),F?L?B+k>0^T[1]<(dr(T[0]-R)<Ot?B:k):B<=T[1]&&T[1]<=k:j>tt^(R<=T[0]&&T[0]<=A)){var G=Dh(C,(-x+N)/O);return id(G,S),[T,nd(G)]}}}function f(m,p){var g=n?r:tt-r,w=0;return m<-g?w|=1:m>g&&(w|=2),p<-g?w|=4:p>g&&(w|=8),w}return Zg(s,a,o,n?[0,-r]:[-tt,r-tt])}function tv(r){return function(e){var t=new ud;for(var n in r)t[n]=r[n];return t.stream=e,t}}function ud(){}ud.prototype={constructor:ud,point:function(r,e){this.stream.point(r,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 rv(r,e,t){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),o!=null&&r.clipExtent(null),V_(t,r.stream($g));var s=$g.result(),a=Math.min(n/(s[1][0]-s[0][0]),i/(s[1][1]-s[0][1])),c=+e[0][0]+(n-a*(s[1][0]+s[0][0]))/2,f=+e[0][1]+(i-a*(s[1][1]+s[0][1]))/2;return o!=null&&r.clipExtent(o),r.scale(a*150).translate([c,f])}function t1(r,e,t){return rv(r,[[0,0],e],t)}var nv=16,r1=Nt(30*si);function iv(r,e){return+e?i1(r,e):n1(r)}function n1(r){return tv({point:function(e,t){e=r(e,t),this.stream.point(e[0],e[1])}})}function i1(r,e){function t(n,i,o,s,a,c,f,m,p,g,w,_,y,h){var d=f-n,u=m-i,l=d*d+u*u;if(l>4*e&&y--){var v=s+g,b=a+w,E=c+_,S=Sl(v*v+b*b+E*E),P=ia(E/=S),C=dr(dr(E)-1)<Ot||dr(o-p)<Ot?(o+p)/2:Pl(b,v),x=r(C,P),O=x[0],I=x[1],N=O-n,T=I-i,R=u*N-d*T;(R*R/l>e||dr((d*N+u*T)/l-.5)>.3||s*g+a*w+c*_<r1)&&(t(n,i,o,s,a,c,O,I,C,v/=S,b/=S,E,y,h),h.point(O,I),t(O,I,C,v,b,E,f,m,p,g,w,_,y,h))}}return function(n){var i,o,s,a,c,f,m,p,g,w,_,y,h={point:d,lineStart:u,lineEnd:v,polygonStart:function(){n.polygonStart(),h.lineStart=b},polygonEnd:function(){n.polygonEnd(),h.lineStart=u}};function d(P,C){P=r(P,C),n.point(P[0],P[1])}function u(){p=NaN,h.point=l,n.lineStart()}function l(P,C){var x=Cl([P,C]),O=r(P,C);t(p,g,m,w,_,y,p=O[0],g=O[1],m=P,w=x[0],_=x[1],y=x[2],nv,n),n.point(p,g)}function v(){h.point=d,n.lineEnd()}function b(){u(),h.point=E,h.lineEnd=S}function E(P,C){l(i=P,C),o=p,s=g,a=w,c=_,f=y,h.point=l}function S(){t(p,g,m,w,_,y,o,s,i,a,c,f,nv,n),h.lineEnd=v,v()}return h}}var s1=tv({point:function(r,e){this.stream.point(r*si,e*si)}});function o1(r){return a1(function(){return r})()}function a1(r){var e,t=150,n=480,i=250,o,s,a=0,c=0,f=0,m=0,p=0,g,w,_=null,y=ev,h=null,d,u,l,v=Qg,b=.5,E=iv(O,b),S,P;function C(T){return T=w(T[0]*si,T[1]*si),[T[0]*t+o,s-T[1]*t]}function x(T){return T=w.invert((T[0]-o)/t,(s-T[1])/t),T&&[T[0]*vo,T[1]*vo]}function O(T,R){return T=e(T,R),[T[0]*t+o,s-T[1]*t]}C.stream=function(T){return S&&P===T?S:S=s1(y(g,E(v(P=T))))},C.clipAngle=function(T){return arguments.length?(y=+T?e1(_=T*si,6*si):(_=null,ev),N()):_*vo},C.clipExtent=function(T){return arguments.length?(v=T==null?(h=d=u=l=null,Qg):H_(h=+T[0][0],d=+T[0][1],u=+T[1][0],l=+T[1][1]),N()):h==null?null:[[h,d],[u,l]]},C.scale=function(T){return arguments.length?(t=+T,I()):t},C.translate=function(T){return arguments.length?(n=+T[0],i=+T[1],I()):[n,i]},C.center=function(T){return arguments.length?(a=T[0]%360*si,c=T[1]%360*si,I()):[a*vo,c*vo]},C.rotate=function(T){return arguments.length?(f=T[0]%360*si,m=T[1]%360*si,p=T.length>2?T[2]%360*si:0,I()):[f*vo,m*vo,p*vo]},C.precision=function(T){return arguments.length?(E=iv(O,b=T*T),N()):Sl(b)},C.fitExtent=function(T,R){return rv(C,T,R)},C.fitSize=function(T,R){return t1(C,T,R)};function I(){w=Bg(g=B_(f,m,p),e);var T=e(a,c);return o=n-T[0]*t,s=i+T[1]*t,N()}function N(){return S=P=null,C}return function(){return e=r.apply(this,arguments),C.invert=e.invert&&x,I()}}function sv(r){return function(e,t){var n=Nt(e),i=Nt(t),o=r(n*i);return[o*i*Dt(e),o*Dt(t)]}}function ov(r){return function(e,t){var n=Sl(e*e+t*t),i=r(n),o=Dt(i),s=Nt(i);return[Pl(e*o,n*s),ia(n&&t*o/n)]}}var u1=sv(function(r){return Sl(2/(1+r))});u1.invert=ov(function(r){return 2*ia(r/2)});var av=sv(function(r){return(r=jg(r))&&r/Dt(r)});av.invert=ov(function(r){return r});function l1(){return o1(av).scale(79.4188).clipAngle(179.999)}function uv(r,e){return[r,e]}uv.invert=uv;function c1(r,e,t){t=t||{};var n=t.units||"kilometers",i=t.steps||8;if(!r)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 o=[];switch(r.type){case"GeometryCollection":return rh(r,function(s){var a=Gh(s,e,n,i);a&&o.push(a)}),Ku(o);case"FeatureCollection":return th(r,function(s){var a=Gh(s,e,n,i);a&&th(a,function(c){c&&o.push(c)})}),Ku(o)}return Gh(r,e,n,i)}function Gh(r,e,t,n){var i=r.properties||{},o=r.type==="Feature"?r.geometry:r;if(o.type==="GeometryCollection"){var s=[];return rh(r,function(y){var h=Gh(y,e,t,n);h&&s.push(h)}),Ku(s)}var a=h1(o),c={type:o.type,coordinates:cv(o.coordinates,a)},f=new Hf,m=f.read(c),p=_f(bf(e,t),"meters"),g=Ut.bufferOp(m,p,n),w=new gg;if(g=w.write(g),!lv(g.coordinates)){var _={type:g.type,coordinates:hv(g.coordinates,a)};return hi(_,i)}}function lv(r){return Array.isArray(r[0])?lv(r[0]):isNaN(r[0])}function cv(r,e){return typeof r[0]!="object"?e(r):r.map(function(t){return cv(t,e)})}function hv(r,e){return typeof r[0]!="object"?e.invert(r):r.map(function(t){return hv(t,e)})}function h1(r){var e=pm(r).geometry.coordinates,t=[-e[0],-e[1]];return l1().rotate(t).scale(pr)}function f1(r,e,t){t===void 0&&(t={});var n=En(r),i=En(e),o=jf.union(n.coordinates,i.coordinates);return o.length===0?null:o.length===1?Mr(o[0],t.properties):mf(o,t.properties)}function d1(r,e,t){t===void 0&&(t={});var n=En(r),i=En(e),o=jf.intersection(n.coordinates,i.coordinates);return o.length===0?null:o.length===1?Mr(o[0],t.properties):mf(o,t.properties)}function p1(r,e){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1])&&r.push(r[0]);const t=lt(e),n=Mr([r]);return Vn(t,n)}function g1(r,e){const t=fi(r);return Mm(t,e,{units:"meters"}).geometry.coordinates}function ld(r){if((r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),r.length<=3)return 0;const e=Mr([r]);return xm(e)}function v1(r){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]);const e=Mr([r]),n=Cp(e).geometry.coordinates;return[n[0],n[1],n[2]??r[0][2]??0]}function y1(r,e,t,n){const[i,o,s]=r,a=$u(lt([i,o]),e,t,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return n=n||[0,0,0],n[0]=a.geometry.coordinates[0],n[1]=a.geometry.coordinates[1],n[2]=s,n}function cd(r,e){return ms(lt(r),lt(e),{units:"meters"})}function hd(r,e){return Yl(lt(r),lt(e))}function m1(r,e){return Ap(fi(r),fi(e))}function _1(r,e){const t=lt(r),n=lt(e),i=dm(t,n),o=(r[2]+e[2])/2;return[...i.geometry.coordinates,o]}function b1(r,e){const t=lt(e),n=fi(r);return Em(n,t,{units:"meters"})}function w1(r,e){const t=lt(r),n=fi(e);return Sm(t,n,{units:"meters"})}function E1(r,e,t,n){const[i,o,s]=r,a=Vm(lt([i,o]),e,t,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return n=n||[0,0,0],n[0]=a.geometry.coordinates[0],n[1]=a.geometry.coordinates[1],n[2]=s,n}function fv(r,e){return Lp(lt(r),lt(e),{units:"meters"})}function P1(r,e){return Gm(lt(r),lt(e))}function dv(r,e){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[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=d1(Mr([r]),Mr([e]));if(t)return t.geometry.coordinates}function pv(r,e){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[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=f1(Mr([r]),Mr([e]));if(t)return t.geometry.coordinates}function gv(r,e=500,t="meters"){const n=c1(fi(r),e,{units:t});if(n)return n.geometry.coordinates}function vv(r,e){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[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=w_(Mr([r]),Mr([e]));if(t)return t.geometry.coordinates}function yv(r,e,t=10,n="meters"){return hm(r,e,{steps:t,units:n}).geometry.coordinates}function fd(r,e){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[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=Mr([r]),n=Mr([e]);return zm(t,n)?"oneBig":Tm(t,n)?"twoBig":!1}function mv(r){const e=M.min(M.objsIterator(r,["0"])),t=M.min(M.objsIterator(r,["1"])),n=M.min(M.objsIterator(r,["2"])),i=M.max(M.objsIterator(r,["0"])),o=M.max(M.objsIterator(r,["1"])),s=M.max(M.objsIterator(r,["2"]));return{minPos:[e,t,n],maxPos:[i,o,s],center:[(e+i)*.5,(t+o)*.5,(n+s)*.5]}}function S1(r){const{minPos:e,maxPos:t,center:n}=mv(r);if(e.some(a=>!Number.isFinite(a)||t.some(c=>!Number.isFinite(c))||n.some(c=>!Number.isFinite(c)))){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=cd(e,t);let o=i*.5;const s=Math.abs(e[2]-t[2]);return s!=0&&(o=Math.sqrt(i*i+s*s)*.5),{center:n,radius:o}}function C1(r){r("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),r("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),r("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var e=1;e<=60;++e)r("EPSG:"+(32600+e),"+proj=utm +zone="+e+" +datum=WGS84 +units=m"),r("EPSG:"+(32700+e),"+proj=utm +zone="+e+" +south +datum=WGS84 +units=m");r.WGS84=r["EPSG:4326"],r["EPSG:3785"]=r["EPSG:3857"],r.GOOGLE=r["EPSG:3857"],r["EPSG:900913"]=r["EPSG:3857"],r["EPSG:102113"]=r["EPSG:3857"]}var sa=1,oa=2,Ol=3,x1=4,dd=5,_v=6378137,O1=6356752314e-3,bv=.0066943799901413165,wc=484813681109536e-20,se=Math.PI/2,M1=.16666666666666666,I1=.04722222222222222,T1=.022156084656084655,pe=1e-10,pt=.017453292519943295,ts=57.29577951308232,it=Math.PI/4,Ec=Math.PI*2,br=3.14159265359,hn={};hn.greenwich=0,hn.lisbon=-9.131906111111,hn.paris=2.337229166667,hn.bogota=-74.080916666667,hn.madrid=-3.687938888889,hn.rome=12.452333333333,hn.bern=7.439583333333,hn.jakarta=106.807719444444,hn.ferro=-17.666666666667,hn.brussels=4.367975,hn.stockholm=18.058277777778,hn.athens=23.7163375,hn.oslo=10.722916666667;const N1={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var wv=/[\s_\-\/\(\)]/g;function yo(r,e){if(r[e])return r[e];for(var t=Object.keys(r),n=e.toLowerCase().replace(wv,""),i=-1,o,s;++i<t.length;)if(o=t[i],s=o.toLowerCase().replace(wv,""),s===n)return r[o]}function pd(r){var e={},t=r.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,c){var f=c.split("=");return f.push(!0),a[f[0].toLowerCase()]=f[1],a},{}),n,i,o,s={proj:"projName",datum:"datumCode",rf:function(a){e.rf=parseFloat(a)},lat_0:function(a){e.lat0=a*pt},lat_1:function(a){e.lat1=a*pt},lat_2:function(a){e.lat2=a*pt},lat_ts:function(a){e.lat_ts=a*pt},lon_0:function(a){e.long0=a*pt},lon_1:function(a){e.long1=a*pt},lon_2:function(a){e.long2=a*pt},alpha:function(a){e.alpha=parseFloat(a)*pt},gamma:function(a){e.rectified_grid_angle=parseFloat(a)*pt},lonc:function(a){e.longc=a*pt},x_0:function(a){e.x0=parseFloat(a)},y_0:function(a){e.y0=parseFloat(a)},k_0:function(a){e.k0=parseFloat(a)},k:function(a){e.k0=parseFloat(a)},a:function(a){e.a=parseFloat(a)},b:function(a){e.b=parseFloat(a)},r:function(a){e.a=e.b=parseFloat(a)},r_a:function(){e.R_A=!0},zone:function(a){e.zone=parseInt(a,10)},south:function(){e.utmSouth=!0},towgs84:function(a){e.datum_params=a.split(",").map(function(c){return parseFloat(c)})},to_meter:function(a){e.to_meter=parseFloat(a)},units:function(a){e.units=a;var c=yo(N1,a);c&&(e.to_meter=c.to_meter)},from_greenwich:function(a){e.from_greenwich=a*pt},pm:function(a){var c=yo(hn,a);e.from_greenwich=(c||parseFloat(a))*pt},nadgrids:function(a){a==="@null"?e.datumCode="none":e.nadgrids=a},axis:function(a){var c="ewnsud";a.length===3&&c.indexOf(a.substr(0,1))!==-1&&c.indexOf(a.substr(1,1))!==-1&&c.indexOf(a.substr(2,1))!==-1&&(e.axis=a)},approx:function(){e.approx=!0}};for(n in t)i=t[n],n in s?(o=s[n],typeof o=="function"?o(i):e[o]=i):e[n]=i;return typeof e.datumCode=="string"&&e.datumCode!=="WGS84"&&(e.datumCode=e.datumCode.toLowerCase()),e}class Ev{static getId(e){const t=e.find(n=>Array.isArray(n)&&n[0]==="ID");return t&&t.length>=3?{authority:t[1],code:parseInt(t[2],10)}:null}static convertUnit(e,t="unit"){if(!e||e.length<3)return{type:t,name:"unknown",conversion_factor:null};const n=e[1],i=parseFloat(e[2])||null,o=e.find(a=>Array.isArray(a)&&a[0]==="ID"),s=o?{authority:o[1],code:parseInt(o[2],10)}:null;return{type:t,name:n,conversion_factor:i,id:s}}static convertAxis(e){const t=e[1]||"Unknown";let n;const i=t.match(/^\((.)\)$/);if(i){const f=i[1].toUpperCase();if(f==="E")n="east";else if(f==="N")n="north";else if(f==="U")n="up";else throw new Error(`Unknown axis abbreviation: ${f}`)}else n=e[2]?e[2].toLowerCase():"unknown";const o=e.find(f=>Array.isArray(f)&&f[0]==="ORDER"),s=o?parseInt(o[1],10):null,a=e.find(f=>Array.isArray(f)&&(f[0]==="LENGTHUNIT"||f[0]==="ANGLEUNIT"||f[0]==="SCALEUNIT")),c=this.convertUnit(a);return{name:t,direction:n,unit:c,order:s}}static extractAxes(e){return e.filter(t=>Array.isArray(t)&&t[0]==="AXIS").map(t=>this.convertAxis(t)).sort((t,n)=>(t.order||0)-(n.order||0))}static convert(e,t={}){switch(e[0]){case"PROJCRS":t.type="ProjectedCRS",t.name=e[1],t.base_crs=e.find(g=>Array.isArray(g)&&g[0]==="BASEGEOGCRS")?this.convert(e.find(g=>Array.isArray(g)&&g[0]==="BASEGEOGCRS")):null,t.conversion=e.find(g=>Array.isArray(g)&&g[0]==="CONVERSION")?this.convert(e.find(g=>Array.isArray(g)&&g[0]==="CONVERSION")):null;const n=e.find(g=>Array.isArray(g)&&g[0]==="CS");n&&(t.coordinate_system={type:n[1],axis:this.extractAxes(e)});const i=e.find(g=>Array.isArray(g)&&g[0]==="LENGTHUNIT");if(i){const g=this.convertUnit(i);t.coordinate_system.unit=g}t.id=this.getId(e);break;case"BASEGEOGCRS":case"GEOGCRS":t.type="GeographicCRS",t.name=e[1];const o=e.find(g=>Array.isArray(g)&&(g[0]==="DATUM"||g[0]==="ENSEMBLE"));if(o){const g=this.convert(o);o[0]==="ENSEMBLE"?t.datum_ensemble=g:t.datum=g;const w=e.find(_=>Array.isArray(_)&&_[0]==="PRIMEM");w&&w[1]!=="Greenwich"&&(g.prime_meridian={name:w[1],longitude:parseFloat(w[2])})}t.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(e)},t.id=this.getId(e);break;case"DATUM":t.type="GeodeticReferenceFrame",t.name=e[1],t.ellipsoid=e.find(g=>Array.isArray(g)&&g[0]==="ELLIPSOID")?this.convert(e.find(g=>Array.isArray(g)&&g[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":t.type="DatumEnsemble",t.name=e[1],t.members=e.filter(g=>Array.isArray(g)&&g[0]==="MEMBER").map(g=>({type:"DatumEnsembleMember",name:g[1],id:this.getId(g)}));const s=e.find(g=>Array.isArray(g)&&g[0]==="ENSEMBLEACCURACY");s&&(t.accuracy=parseFloat(s[1]));const a=e.find(g=>Array.isArray(g)&&g[0]==="ELLIPSOID");a&&(t.ellipsoid=this.convert(a)),t.id=this.getId(e);break;case"ELLIPSOID":t.type="Ellipsoid",t.name=e[1],t.semi_major_axis=parseFloat(e[2]),t.inverse_flattening=parseFloat(e[3]),e.find(g=>Array.isArray(g)&&g[0]==="LENGTHUNIT")&&this.convert(e.find(g=>Array.isArray(g)&&g[0]==="LENGTHUNIT"),t);break;case"CONVERSION":t.type="Conversion",t.name=e[1],t.method=e.find(g=>Array.isArray(g)&&g[0]==="METHOD")?this.convert(e.find(g=>Array.isArray(g)&&g[0]==="METHOD")):null,t.parameters=e.filter(g=>Array.isArray(g)&&g[0]==="PARAMETER").map(g=>this.convert(g));break;case"METHOD":t.type="Method",t.name=e[1],t.id=this.getId(e);break;case"PARAMETER":t.type="Parameter",t.name=e[1],t.value=parseFloat(e[2]),t.unit=this.convertUnit(e.find(g=>Array.isArray(g)&&(g[0]==="LENGTHUNIT"||g[0]==="ANGLEUNIT"||g[0]==="SCALEUNIT"))),t.id=this.getId(e);break;case"BOUNDCRS":t.type="BoundCRS";const c=e.find(g=>Array.isArray(g)&&g[0]==="SOURCECRS");if(c){const g=c.find(w=>Array.isArray(w));t.source_crs=g?this.convert(g):null}const f=e.find(g=>Array.isArray(g)&&g[0]==="TARGETCRS");if(f){const g=f.find(w=>Array.isArray(w));t.target_crs=g?this.convert(g):null}const m=e.find(g=>Array.isArray(g)&&g[0]==="ABRIDGEDTRANSFORMATION");m?t.transformation=this.convert(m):t.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(t.type="Transformation",t.name=e[1],t.method=e.find(g=>Array.isArray(g)&&g[0]==="METHOD")?this.convert(e.find(g=>Array.isArray(g)&&g[0]==="METHOD")):null,t.parameters=e.filter(g=>Array.isArray(g)&&(g[0]==="PARAMETER"||g[0]==="PARAMETERFILE")).map(g=>{if(g[0]==="PARAMETER")return this.convert(g);if(g[0]==="PARAMETERFILE")return{name:g[1],value:g[2],id:{authority:"EPSG",code:8656}}}),t.parameters.length===7){const g=t.parameters[6];g.name==="Scale difference"&&(g.value=Math.round((g.value-1)*1e12)/1e6)}t.id=this.getId(e);break;case"AXIS":t.coordinate_system||(t.coordinate_system={type:"unspecified",axis:[]}),t.coordinate_system.axis.push(this.convertAxis(e));break;case"LENGTHUNIT":const p=this.convertUnit(e,"LinearUnit");t.coordinate_system&&t.coordinate_system.axis&&t.coordinate_system.axis.forEach(g=>{g.unit||(g.unit=p)}),p.conversion_factor&&p.conversion_factor!==1&&t.semi_major_axis&&(t.semi_major_axis={value:t.semi_major_axis,unit:p});break;default:t.keyword=e[0];break}return t}}class D1 extends Ev{static convert(e,t={}){return super.convert(e,t),t.coordinate_system&&t.coordinate_system.subtype==="Cartesian"&&delete t.coordinate_system,t.usage&&delete t.usage,t}}class A1 extends Ev{static convert(e,t={}){super.convert(e,t);const n=e.find(o=>Array.isArray(o)&&o[0]==="CS");n&&(t.coordinate_system={subtype:n[1],axis:this.extractAxes(e)});const i=e.find(o=>Array.isArray(o)&&o[0]==="USAGE");if(i){const o=i.find(c=>Array.isArray(c)&&c[0]==="SCOPE"),s=i.find(c=>Array.isArray(c)&&c[0]==="AREA"),a=i.find(c=>Array.isArray(c)&&c[0]==="BBOX");t.usage={},o&&(t.usage.scope=o[1]),s&&(t.usage.area=s[1]),a&&(t.usage.bbox=a.slice(1))}return t}}function R1(r){return r.find(e=>Array.isArray(e)&&e[0]==="USAGE")?"2019":(r.find(e=>Array.isArray(e)&&e[0]==="CS")||r[0]==="BOUNDCRS"||r[0]==="PROJCRS"||r[0]==="GEOGCRS","2015")}function L1(r){return(R1(r)==="2019"?A1:D1).convert(r)}function F1(r){const e=r.toUpperCase();return e.includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1")}var Pc=1,Pv=2,Sv=3,Vh=4,Cv=5,gd=-1,j1=/\s/,k1=/[A-Za-z]/,G1=/[A-Za-z84_]/,Bh=/[,\]]/,xv=/[\d\.E\-\+]/;function As(r){if(typeof r!="string")throw new Error("not a string");this.text=r.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Pc}As.prototype.readCharicter=function(){var r=this.text[this.place++];if(this.state!==Vh)for(;j1.test(r);){if(this.place>=this.text.length)return;r=this.text[this.place++]}switch(this.state){case Pc:return this.neutral(r);case Pv:return this.keyword(r);case Vh:return this.quoted(r);case Cv:return this.afterquote(r);case Sv:return this.number(r);case gd:return}},As.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=Vh;return}if(Bh.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)},As.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=Pc;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=Pc,this.currentObject=this.stack.pop(),this.currentObject||(this.state=gd);return}},As.prototype.number=function(r){if(xv.test(r)){this.word+=r;return}if(Bh.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)},As.prototype.quoted=function(r){if(r==='"'){this.state=Cv;return}this.word+=r},As.prototype.keyword=function(r){if(G1.test(r)){this.word+=r;return}if(r==="["){var e=[];e.push(this.word),this.level++,this.root===null?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,this.state=Pc;return}if(Bh.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)},As.prototype.neutral=function(r){if(k1.test(r)){this.word=r,this.state=Pv;return}if(r==='"'){this.word="",this.state=Vh;return}if(xv.test(r)){this.word=r,this.state=Sv;return}if(Bh.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)},As.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===gd)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function V1(r){var e=new As(r);return e.output()}function vd(r,e,t){Array.isArray(e)&&(t.unshift(e),e=null);var n=e?{}:r,i=t.reduce(function(o,s){return Ml(s,o),o},n);e&&(r[e]=i)}function Ml(r,e){if(!Array.isArray(r)){e[r]=!0;return}var t=r.shift();if(t==="PARAMETER"&&(t=r.shift()),r.length===1){if(Array.isArray(r[0])){e[t]={},Ml(r[0],e[t]);return}e[t]=r[0];return}if(!r.length){e[t]=!0;return}if(t==="TOWGS84"){e[t]=r;return}if(t==="AXIS"){t in e||(e[t]=[]),e[t].push(r);return}Array.isArray(t)||(e[t]={});var n;switch(t){case"UNIT":case"PRIMEM":case"VERT_DATUM":e[t]={name:r[0].toLowerCase(),convert:r[1]},r.length===3&&Ml(r[2],e[t]);return;case"SPHEROID":case"ELLIPSOID":e[t]={name:r[0],a:r[1],rf:r[2]},r.length===4&&Ml(r[3],e[t]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":r[0]=["name",r[0]],vd(e,t,r);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":r[0]=["name",r[0]],vd(e,t,r),e[t].type=t;return;default:for(n=-1;++n<r.length;)if(!Array.isArray(r[n]))return Ml(r,e[t]);return vd(e,t,r)}}var B1=.017453292519943295;function Mi(r){return r*B1}function Ov(r){const e=(r.projName||"").toLowerCase().replace(/_/g," ");!r.long0&&r.longc&&(e==="albers conic equal area"||e==="lambert azimuthal equal area")&&(r.long0=r.longc),!r.lat_ts&&r.lat1&&(e==="stereographic south pole"||e==="polar stereographic (variant b)")?(r.lat0=Mi(r.lat1>0?90:-90),r.lat_ts=r.lat1,delete r.lat1):!r.lat_ts&&r.lat0&&(e==="polar stereographic"||e==="polar stereographic (variant a)")&&(r.lat_ts=r.lat0,r.lat0=Mi(r.lat0>0?90:-90),delete r.lat1)}function Mv(r){let e={units:null,to_meter:void 0};return typeof r=="string"?(e.units=r.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.units==="meter"&&(e.to_meter=1)):r&&r.name&&(e.units=r.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.to_meter=r.conversion_factor),e}function Iv(r){return typeof r=="object"?r.value*r.unit.conversion_factor:r}function Tv(r,e){r.ellipsoid.radius?(e.a=r.ellipsoid.radius,e.rf=0):(e.a=Iv(r.ellipsoid.semi_major_axis),r.ellipsoid.inverse_flattening!==void 0?e.rf=r.ellipsoid.inverse_flattening:r.ellipsoid.semi_major_axis!==void 0&&r.ellipsoid.semi_minor_axis!==void 0&&(e.rf=e.a/(e.a-Iv(r.ellipsoid.semi_minor_axis))))}function zh(r,e={}){return!r||typeof r!="object"?r:r.type==="BoundCRS"?(zh(r.source_crs,e),r.transformation&&(r.transformation.method&&r.transformation.method.name==="NTv2"?e.nadgrids=r.transformation.parameters[0].value:e.datum_params=r.transformation.parameters.map(t=>t.value)),e):(Object.keys(r).forEach(t=>{const n=r[t];if(n!==null)switch(t){case"name":if(e.srsCode)break;e.name=n,e.srsCode=n;break;case"type":n==="GeographicCRS"?e.projName="longlat":n==="ProjectedCRS"&&r.conversion&&r.conversion.method&&(e.projName=r.conversion.method.name);break;case"datum":case"datum_ensemble":n.ellipsoid&&(e.ellps=n.ellipsoid.name,Tv(n,e)),n.prime_meridian&&(e.from_greenwich=n.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=n.name,Tv(n,e);break;case"prime_meridian":e.long0=(n.longitude||0)*Math.PI/180;break;case"coordinate_system":if(n.axis){if(e.axis=n.axis.map(i=>{const o=i.direction;if(o==="east")return"e";if(o==="north")return"n";if(o==="west")return"w";if(o==="south")return"s";throw new Error(`Unknown axis direction: ${o}`)}).join("")+"u",n.unit){const{units:i,to_meter:o}=Mv(n.unit);e.units=i,e.to_meter=o}else if(n.axis[0]&&n.axis[0].unit){const{units:i,to_meter:o}=Mv(n.axis[0].unit);e.units=i,e.to_meter=o}}break;case"id":n.authority&&n.code&&(e.title=n.authority+":"+n.code);break;case"conversion":n.method&&n.method.name&&(e.projName=n.method.name),n.parameters&&n.parameters.forEach(i=>{const o=i.name.toLowerCase().replace(/\s+/g,"_"),s=i.value;i.unit&&i.unit.conversion_factor?e[o]=s*i.unit.conversion_factor:i.unit==="degree"?e[o]=s*Math.PI/180:e[o]=s});break;case"unit":n.name&&(e.units=n.name.toLowerCase(),e.units==="metre"&&(e.units="meter")),n.conversion_factor&&(e.to_meter=n.conversion_factor);break;case"base_crs":zh(n,e),e.datumCode=n.id?n.id.authority+"_"+n.id.code:n.name;break}}),e.latitude_of_false_origin!==void 0&&(e.lat0=e.latitude_of_false_origin),e.longitude_of_false_origin!==void 0&&(e.long0=e.longitude_of_false_origin),e.latitude_of_standard_parallel!==void 0&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),e.latitude_of_1st_standard_parallel!==void 0&&(e.lat1=e.latitude_of_1st_standard_parallel),e.latitude_of_2nd_standard_parallel!==void 0&&(e.lat2=e.latitude_of_2nd_standard_parallel),e.latitude_of_projection_centre!==void 0&&(e.lat0=e.latitude_of_projection_centre),e.longitude_of_projection_centre!==void 0&&(e.longc=e.longitude_of_projection_centre),e.easting_at_false_origin!==void 0&&(e.x0=e.easting_at_false_origin),e.northing_at_false_origin!==void 0&&(e.y0=e.northing_at_false_origin),e.latitude_of_natural_origin!==void 0&&(e.lat0=e.latitude_of_natural_origin),e.longitude_of_natural_origin!==void 0&&(e.long0=e.longitude_of_natural_origin),e.longitude_of_origin!==void 0&&(e.long0=e.longitude_of_origin),e.false_easting!==void 0&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),e.false_northing!==void 0&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),e.standard_parallel_1!==void 0&&(e.lat1=e.standard_parallel_1),e.standard_parallel_2!==void 0&&(e.lat2=e.standard_parallel_2),e.scale_factor_at_natural_origin!==void 0&&(e.k0=e.scale_factor_at_natural_origin),e.scale_factor_at_projection_centre!==void 0&&(e.k0=e.scale_factor_at_projection_centre),e.scale_factor_on_pseudo_standard_parallel!==void 0&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),e.azimuth!==void 0&&(e.alpha=e.azimuth),e.azimuth_at_projection_centre!==void 0&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),Ov(e),e)}var z1=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function U1(r,e){var t=e[0],n=e[1];!(t in r)&&n in r&&(r[t]=r[n],e.length===3&&(r[t]=e[2](r[t])))}function Nv(r){for(var e=Object.keys(r),t=0,n=e.length;t<n;++t){var i=e[t];z1.indexOf(i)!==-1&&W1(r[i]),typeof r[i]=="object"&&Nv(r[i])}}function W1(r){if(r.AUTHORITY){var e=Object.keys(r.AUTHORITY)[0];e&&e in r.AUTHORITY&&(r.title=e+":"+r.AUTHORITY[e])}if(r.type==="GEOGCS"?r.projName="longlat":r.type==="LOCAL_CS"?(r.projName="identity",r.local=!0):typeof r.PROJECTION=="object"?r.projName=Object.keys(r.PROJECTION)[0]:r.projName=r.PROJECTION,r.AXIS){for(var t="",n=0,i=r.AXIS.length;n<i;++n){var o=[r.AXIS[n][0].toLowerCase(),r.AXIS[n][1].toLowerCase()];o[0].indexOf("north")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="north"?t+="n":o[0].indexOf("south")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="south"?t+="s":o[0].indexOf("east")!==-1||(o[0]==="x"||o[0]==="lon")&&o[1]==="east"?t+="e":(o[0].indexOf("west")!==-1||(o[0]==="x"||o[0]==="lon")&&o[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(r.axis=t)}r.UNIT&&(r.units=r.UNIT.name.toLowerCase(),r.units==="metre"&&(r.units="meter"),r.UNIT.convert&&(r.type==="GEOGCS"?r.DATUM&&r.DATUM.SPHEROID&&(r.to_meter=r.UNIT.convert*r.DATUM.SPHEROID.a):r.to_meter=r.UNIT.convert));var s=r.GEOGCS;r.type==="GEOGCS"&&(s=r),s&&(s.DATUM?r.datumCode=s.DATUM.name.toLowerCase():r.datumCode=s.name.toLowerCase(),r.datumCode.slice(0,2)==="d_"&&(r.datumCode=r.datumCode.slice(2)),r.datumCode==="new_zealand_1949"&&(r.datumCode="nzgd49"),(r.datumCode==="wgs_1984"||r.datumCode==="world_geodetic_system_1984")&&(r.PROJECTION==="Mercator_Auxiliary_Sphere"&&(r.sphere=!0),r.datumCode="wgs84"),r.datumCode==="belge_1972"&&(r.datumCode="rnb72"),s.DATUM&&s.DATUM.SPHEROID&&(r.ellps=s.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),r.ellps.toLowerCase().slice(0,13)==="international"&&(r.ellps="intl"),r.a=s.DATUM.SPHEROID.a,r.rf=parseFloat(s.DATUM.SPHEROID.rf,10)),s.DATUM&&s.DATUM.TOWGS84&&(r.datum_params=s.DATUM.TOWGS84),~r.datumCode.indexOf("osgb_1936")&&(r.datumCode="osgb36"),~r.datumCode.indexOf("osni_1952")&&(r.datumCode="osni52"),(~r.datumCode.indexOf("tm65")||~r.datumCode.indexOf("geodetic_datum_of_1965"))&&(r.datumCode="ire65"),r.datumCode==="ch1903+"&&(r.datumCode="ch1903"),~r.datumCode.indexOf("israel")&&(r.datumCode="isr93")),r.b&&!isFinite(r.b)&&(r.b=r.a),r.rectified_grid_angle&&(r.rectified_grid_angle=Mi(r.rectified_grid_angle));function a(m){var p=r.to_meter||1;return m*p}var c=function(m){return U1(r,m)},f=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Mi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Mi],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",Mi],["lat0","latitude_of_origin",Mi],["lat0","standard_parallel_1",Mi],["lat1","standard_parallel_1",Mi],["lat2","standard_parallel_2",Mi],["azimuth","Azimuth"],["alpha","azimuth",Mi],["srsCode","name"]];f.forEach(c),Ov(r)}function yd(r){if(typeof r=="object")return zh(r);const e=F1(r);var t=V1(r);if(e==="WKT2"){const o=L1(t);return zh(o)}var n=t[0],i={};return Ml(t,i),Nv(i),i[n]}function Yr(r){var e=this;if(arguments.length===2){var t=arguments[1];typeof t=="string"?t.charAt(0)==="+"?Yr[r]=pd(arguments[1]):Yr[r]=yd(arguments[1]):Yr[r]=t}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?Yr.apply(e,n):Yr(n)});if(typeof r=="string"){if(r in Yr)return Yr[r]}else"EPSG"in r?Yr["EPSG:"+r.EPSG]=r:"ESRI"in r?Yr["ESRI:"+r.ESRI]=r:"IAU2000"in r?Yr["IAU2000:"+r.IAU2000]=r:console.log(r);return}}C1(Yr);function q1(r){return typeof r=="string"}function H1(r){return r in Yr}function X1(r){return r.indexOf("+")!==0&&r.indexOf("[")!==-1||typeof r=="object"&&!("srsCode"in r)}var Y1=["3857","900913","3785","102113"];function J1(r){var e=yo(r,"authority");if(e){var t=yo(e,"epsg");return t&&Y1.indexOf(t)>-1}}function K1(r){var e=yo(r,"extension");if(e)return yo(e,"proj4")}function Q1(r){return r[0]==="+"}function $1(r){if(q1(r)){if(H1(r))return Yr[r];if(X1(r)){var e=yd(r);if(J1(e))return Yr["EPSG:3857"];var t=K1(e);return t?pd(t):e}if(Q1(r))return pd(r)}else return r.projName?r:yd(r)}function Dv(r,e){r=r||{};var t,n;if(!e)return r;for(n in e)t=e[n],t!==void 0&&(r[n]=t);return r}function rs(r,e,t){var n=r*e;return t/Math.sqrt(1-n*n)}function Sc(r){return r<0?-1:1}function _e(r){return Math.abs(r)<=br?r:r-Sc(r)*Ec}function Ii(r,e,t){var n=r*t,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(se-e))/n}function Cc(r,e){for(var t=.5*r,n,i,o=se-2*Math.atan(e),s=0;s<=15;s++)if(n=r*Math.sin(o),i=se-2*Math.atan(e*Math.pow((1-n)/(1+n),t))-o,o+=i,Math.abs(i)<=1e-10)return o;return-9999}function Z1(){var r=this.b/this.a;this.es=1-r*r,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=rs(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function eb(r){var e=r.x,t=r.y;if(t*ts>90&&t*ts<-90&&e*ts>180&&e*ts<-180)return null;var n,i;if(Math.abs(Math.abs(t)-se)<=pe)return null;if(this.sphere)n=this.x0+this.a*this.k0*_e(e-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(it+.5*t));else{var o=Math.sin(t),s=Ii(this.e,t,o);n=this.x0+this.a*this.k0*_e(e-this.long0),i=this.y0-this.a*this.k0*Math.log(s)}return r.x=n,r.y=i,r}function tb(r){var e=r.x-this.x0,t=r.y-this.y0,n,i;if(this.sphere)i=se-2*Math.atan(Math.exp(-t/(this.a*this.k0)));else{var o=Math.exp(-t/(this.a*this.k0));if(i=Cc(this.e,o),i===-9999)return null}return n=_e(this.long0+e/(this.a*this.k0)),r.x=n,r.y=i,r}var rb=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const nb={init:Z1,forward:eb,inverse:tb,names:rb};function ib(){}function Av(r){return r}var sb=["longlat","identity"],ob=[nb,{init:ib,forward:Av,inverse:Av,names:sb}],aa={},Il=[];function Rv(r,e){var t=Il.length;return r.names?(Il[t]=r,r.names.forEach(function(n){aa[n.toLowerCase()]=t}),this):(console.log(e),!0)}function Lv(r){return r.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function ab(r){if(!r)return!1;var e=r.toLowerCase();if(typeof aa[e]<"u"&&Il[aa[e]]||(e=Lv(e),e in aa&&Il[aa[e]]))return Il[aa[e]]}function ub(){ob.forEach(Rv)}const lb={start:ub,add:Rv,get:ab};var Fv={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const cb=Fv.WGS84;function hb(r,e,t,n){var i=r*r,o=e*e,s=(i-o)/i,a=0;n?(r*=1-s*(M1+s*(I1+s*T1)),i=r*r,s=0):a=Math.sqrt(s);var c=(i-o)/o;return{es:s,e:a,ep2:c}}function fb(r,e,t,n,i){if(!r){var o=yo(Fv,n);o||(o=cb),r=o.a,e=o.b,t=o.rf}return t&&!e&&(e=(1-1/t)*r),(t===0||Math.abs(r-e)<pe)&&(i=!0,e=r),{a:r,b:e,rf:t,sphere:i}}var Uh={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var db in Uh){var md=Uh[db];md.datumName&&(Uh[md.datumName]=md)}function pb(r,e,t,n,i,o,s){var a={};return r===void 0||r==="none"?a.datum_type=dd:a.datum_type=x1,e&&(a.datum_params=e.map(parseFloat),(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0)&&(a.datum_type=sa),a.datum_params.length>3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=oa,a.datum_params[3]*=wc,a.datum_params[4]*=wc,a.datum_params[5]*=wc,a.datum_params[6]=a.datum_params[6]/1e6+1)),s&&(a.datum_type=Ol,a.grids=s),a.a=t,a.b=n,a.es=i,a.ep2=o,a}var _d={};function gb(r,e,t){return e instanceof ArrayBuffer?vb(r,e,t):{ready:yb(r,e)}}function vb(r,e,t){var n=!0;t!==void 0&&t.includeErrorFields===!1&&(n=!1);var i=new DataView(e),o=bb(i),s=wb(i,o),a=Eb(i,s,o,n),c={header:s,subgrids:a};return _d[r]=c,c}async function yb(r,e){for(var t=[],n=await e.getImageCount(),i=n-1;i>=0;i--){var o=await e.getImage(i),s=await o.readRasters(),a=s,c=[o.getWidth(),o.getHeight()],f=o.getBoundingBox().map(jv),m=[o.fileDirectory.ModelPixelScale[0],o.fileDirectory.ModelPixelScale[1]].map(jv),p=f[0]+(c[0]-1)*m[0],g=f[3]-(c[1]-1)*m[1],w=a[0],_=a[1],y=[];for(let u=c[1]-1;u>=0;u--)for(let l=c[0]-1;l>=0;l--){var h=u*c[0]+l;y.push([-mo(_[h]),mo(w[h])])}t.push({del:m,lim:c,ll:[-p,g],cvs:y})}var d={header:{nSubgrids:n},subgrids:t};return _d[r]=d,d}function mb(r){if(r===void 0)return null;var e=r.split(",");return e.map(_b)}function _b(r){if(r.length===0)return null;var e=r[0]==="@";return e&&(r=r.slice(1)),r==="null"?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:r,mandatory:!e,grid:_d[r]||null,isNull:!1}}function jv(r){return r*Math.PI/180}function mo(r){return r/3600*Math.PI/180}function bb(r){var e=r.getInt32(8,!1);return e===11?!1:(e=r.getInt32(8,!0),e!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function wb(r,e){return{nFields:r.getInt32(8,e),nSubgridFields:r.getInt32(24,e),nSubgrids:r.getInt32(40,e),shiftType:bd(r,56,64).trim(),fromSemiMajorAxis:r.getFloat64(120,e),fromSemiMinorAxis:r.getFloat64(136,e),toSemiMajorAxis:r.getFloat64(152,e),toSemiMinorAxis:r.getFloat64(168,e)}}function bd(r,e,t){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(e,t)))}function Eb(r,e,t,n){for(var i=176,o=[],s=0;s<e.nSubgrids;s++){var a=Sb(r,i,t),c=Cb(r,i,a,t,n),f=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),m=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);o.push({ll:[mo(a.lowerLongitude),mo(a.lowerLatitude)],del:[mo(a.longitudeInterval),mo(a.latitudeInterval)],lim:[f,m],count:a.gridNodeCount,cvs:Pb(c)});var p=16;n===!1&&(p=8),i+=176+a.gridNodeCount*p}return o}function Pb(r){return r.map(function(e){return[mo(e.longitudeShift),mo(e.latitudeShift)]})}function Sb(r,e,t){return{name:bd(r,e+8,e+16).trim(),parent:bd(r,e+24,e+24+8).trim(),lowerLatitude:r.getFloat64(e+72,t),upperLatitude:r.getFloat64(e+88,t),lowerLongitude:r.getFloat64(e+104,t),upperLongitude:r.getFloat64(e+120,t),latitudeInterval:r.getFloat64(e+136,t),longitudeInterval:r.getFloat64(e+152,t),gridNodeCount:r.getInt32(e+168,t)}}function Cb(r,e,t,n,i){var o=e+176,s=16;i===!1&&(s=8);for(var a=[],c=0;c<t.gridNodeCount;c++){var f={latitudeShift:r.getFloat32(o+c*s,n),longitudeShift:r.getFloat32(o+c*s+4,n)};i!==!1&&(f.latitudeAccuracy=r.getFloat32(o+c*s+8,n),f.longitudeAccuracy=r.getFloat32(o+c*s+12,n)),a.push(f)}return a}function ns(r,e){if(!(this instanceof ns))return new ns(r);e=e||function(f){if(f)throw f};var t=$1(r);if(typeof t!="object"){e("Could not parse to valid json: "+r);return}var n=ns.projections.get(t.projName);if(!n){e("Could not get projection name from: "+r);return}if(t.datumCode&&t.datumCode!=="none"){var i=yo(Uh,t.datumCode);i&&(t.datum_params=t.datum_params||(i.towgs84?i.towgs84.split(","):null),t.ellps=i.ellipse,t.datumName=i.datumName?i.datumName:t.datumCode)}t.k0=t.k0||1,t.axis=t.axis||"enu",t.ellps=t.ellps||"wgs84",t.lat1=t.lat1||t.lat0;var o=fb(t.a,t.b,t.rf,t.ellps,t.sphere),s=hb(o.a,o.b,o.rf,t.R_A),a=mb(t.nadgrids),c=t.datum||pb(t.datumCode,t.datum_params,o.a,o.b,s.es,s.ep2,a);Dv(this,t),Dv(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=s.es,this.e=s.e,this.ep2=s.ep2,this.datum=c,this.init(),e(null,this)}ns.projections=lb,ns.projections.start();function xb(r,e){return r.datum_type!==e.datum_type||r.a!==e.a||Math.abs(r.es-e.es)>5e-11?!1:r.datum_type===sa?r.datum_params[0]===e.datum_params[0]&&r.datum_params[1]===e.datum_params[1]&&r.datum_params[2]===e.datum_params[2]:r.datum_type===oa?r.datum_params[0]===e.datum_params[0]&&r.datum_params[1]===e.datum_params[1]&&r.datum_params[2]===e.datum_params[2]&&r.datum_params[3]===e.datum_params[3]&&r.datum_params[4]===e.datum_params[4]&&r.datum_params[5]===e.datum_params[5]&&r.datum_params[6]===e.datum_params[6]:!0}function kv(r,e,t){var n=r.x,i=r.y,o=r.z?r.z:0,s,a,c,f;if(i<-se&&i>-1.001*se)i=-se;else if(i>se&&i<1.001*se)i=se;else{if(i<-se)return{x:-1/0,y:-1/0,z:r.z};if(i>se)return{x:1/0,y:1/0,z:r.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(i),f=Math.cos(i),c=a*a,s=t/Math.sqrt(1-e*c),{x:(s+o)*f*Math.cos(n),y:(s+o)*f*Math.sin(n),z:(s*(1-e)+o)*a}}function Gv(r,e,t,n){var i=1e-12,o=i*i,s=30,a,c,f,m,p,g,w,_,y,h,d,u,l,v=r.x,b=r.y,E=r.z?r.z:0,S,P,C;if(a=Math.sqrt(v*v+b*b),c=Math.sqrt(v*v+b*b+E*E),a/t<i){if(S=0,c/t<i)return P=se,C=-n,{x:r.x,y:r.y,z:r.z}}else S=Math.atan2(b,v);f=E/c,m=a/c,p=1/Math.sqrt(1-e*(2-e)*m*m),_=m*(1-e)*p,y=f*p,l=0;do l++,w=t/Math.sqrt(1-e*y*y),C=a*_+E*y-w*(1-e*y*y),g=e*w/(w+C),p=1/Math.sqrt(1-g*(2-g)*m*m),h=m*(1-g)*p,d=f*p,u=d*_-h*y,_=h,y=d;while(u*u>o&&l<s);return P=Math.atan(d/Math.abs(h)),{x:S,y:P,z:C}}function Ob(r,e,t){if(e===sa)return{x:r.x+t[0],y:r.y+t[1],z:r.z+t[2]};if(e===oa){var n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],c=t[5],f=t[6];return{x:f*(r.x-c*r.y+a*r.z)+n,y:f*(c*r.x+r.y-s*r.z)+i,z:f*(-a*r.x+s*r.y+r.z)+o}}}function Mb(r,e,t){if(e===sa)return{x:r.x-t[0],y:r.y-t[1],z:r.z-t[2]};if(e===oa){var n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],c=t[5],f=t[6],m=(r.x-n)/f,p=(r.y-i)/f,g=(r.z-o)/f;return{x:m+c*p-a*g,y:-c*m+p+s*g,z:a*m-s*p+g}}}function Wh(r){return r===sa||r===oa}function Ib(r,e,t){if(xb(r,e)||r.datum_type===dd||e.datum_type===dd)return t;var n=r.a,i=r.es;if(r.datum_type===Ol){var o=Vv(r,!1,t);if(o!==0)return;n=_v,i=bv}var s=e.a,a=e.b,c=e.es;if(e.datum_type===Ol&&(s=_v,a=O1,c=bv),i===c&&n===s&&!Wh(r.datum_type)&&!Wh(e.datum_type))return t;if(t=kv(t,i,n),Wh(r.datum_type)&&(t=Ob(t,r.datum_type,r.datum_params)),Wh(e.datum_type)&&(t=Mb(t,e.datum_type,e.datum_params)),t=Gv(t,c,s,a),e.datum_type===Ol){var f=Vv(e,!0,t);if(f!==0)return}return t}function Vv(r,e,t){if(r.grids===null||r.grids.length===0)return console.log("Grid shift grids not found"),-1;var n={x:-t.x,y:t.y},i={x:Number.NaN,y:Number.NaN},o=[];e:for(var s=0;s<r.grids.length;s++){var a=r.grids[s];if(o.push(a.name),a.isNull){i=n;break}if(a.grid===null){if(a.mandatory)return console.log("Unable to find mandatory grid '"+a.name+"'"),-1;continue}for(var c=a.grid.subgrids,f=0,m=c.length;f<m;f++){var p=c[f],g=(Math.abs(p.del[1])+Math.abs(p.del[0]))/1e4,w=p.ll[0]-g,_=p.ll[1]-g,y=p.ll[0]+(p.lim[0]-1)*p.del[0]+g,h=p.ll[1]+(p.lim[1]-1)*p.del[1]+g;if(!(_>n.y||w>n.x||h<n.y||y<n.x)&&(i=Tb(n,e,p),!isNaN(i.x)))break e}}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*ts+" "+n.y*ts+" tried: '"+o+"'"),-1):(t.x=-i.x,t.y=i.y,0)}function Tb(r,e,t){var n={x:Number.NaN,y:Number.NaN};if(isNaN(r.x))return n;var i={x:r.x,y:r.y};i.x-=t.ll[0],i.y-=t.ll[1],i.x=_e(i.x-Math.PI)+Math.PI;var o=Bv(i,t);if(e){if(isNaN(o.x))return n;o.x=i.x-o.x,o.y=i.y-o.y;var s=9,a=1e-12,c,f;do{if(f=Bv(o,t),isNaN(f.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}c={x:i.x-(f.x+o.x),y:i.y-(f.y+o.y)},o.x+=c.x,o.y+=c.y}while(s--&&Math.abs(c.x)>a&&Math.abs(c.y)>a);if(s<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=_e(o.x+t.ll[0]),n.y=o.y+t.ll[1]}else isNaN(o.x)||(n.x=r.x+o.x,n.y=r.y+o.y);return n}function Bv(r,e){var t={x:r.x/e.del[0],y:r.y/e.del[1]},n={x:Math.floor(t.x),y:Math.floor(t.y)},i={x:t.x-1*n.x,y:t.y-1*n.y},o={x:Number.NaN,y:Number.NaN},s;if(n.x<0||n.x>=e.lim[0]||n.y<0||n.y>=e.lim[1])return o;s=n.y*e.lim[0]+n.x;var a={x:e.cvs[s][0],y:e.cvs[s][1]};s++;var c={x:e.cvs[s][0],y:e.cvs[s][1]};s+=e.lim[0];var f={x:e.cvs[s][0],y:e.cvs[s][1]};s--;var m={x:e.cvs[s][0],y:e.cvs[s][1]},p=i.x*i.y,g=i.x*(1-i.y),w=(1-i.x)*(1-i.y),_=(1-i.x)*i.y;return o.x=w*a.x+g*c.x+_*m.x+p*f.x,o.y=w*a.y+g*c.y+_*m.y+p*f.y,o}function zv(r,e,t){var n=t.x,i=t.y,o=t.z||0,s,a,c,f={};for(c=0;c<3;c++)if(!(e&&c===2&&t.z===void 0))switch(c===0?(s=n,"ew".indexOf(r.axis[c])!==-1?a="x":a="y"):c===1?(s=i,"ns".indexOf(r.axis[c])!==-1?a="y":a="x"):(s=o,a="z"),r.axis[c]){case"e":f[a]=s;break;case"w":f[a]=-s;break;case"n":f[a]=s;break;case"s":f[a]=-s;break;case"u":t[a]!==void 0&&(f.z=s);break;case"d":t[a]!==void 0&&(f.z=-s);break;default:return null}return f}function Uv(r){var e={x:r[0],y:r[1]};return r.length>2&&(e.z=r[2]),r.length>3&&(e.m=r[3]),e}function Nb(r){Wv(r.x),Wv(r.y)}function Wv(r){if(typeof Number.isFinite=="function"){if(Number.isFinite(r))return;throw new TypeError("coordinates must be finite numbers")}if(typeof r!="number"||r!==r||!isFinite(r))throw new TypeError("coordinates must be finite numbers")}function Db(r,e){return(r.datum.datum_type===sa||r.datum.datum_type===oa||r.datum.datum_type===Ol)&&e.datumCode!=="WGS84"||(e.datum.datum_type===sa||e.datum.datum_type===oa||e.datum.datum_type===Ol)&&r.datumCode!=="WGS84"}function qh(r,e,t,n){var i;Array.isArray(t)?t=Uv(t):t={x:t.x,y:t.y,z:t.z,m:t.m};var o=t.z!==void 0;if(Nb(t),r.datum&&e.datum&&Db(r,e)&&(i=new ns("WGS84"),t=qh(r,i,t,n),r=i),n&&r.axis!=="enu"&&(t=zv(r,!1,t)),r.projName==="longlat")t={x:t.x*pt,y:t.y*pt,z:t.z||0};else if(r.to_meter&&(t={x:t.x*r.to_meter,y:t.y*r.to_meter,z:t.z||0}),t=r.inverse(t),!t)return;if(r.from_greenwich&&(t.x+=r.from_greenwich),t=Ib(r.datum,e.datum,t),!!t)return e.from_greenwich&&(t={x:t.x-e.from_greenwich,y:t.y,z:t.z||0}),e.projName==="longlat"?t={x:t.x*ts,y:t.y*ts,z:t.z||0}:(t=e.forward(t),e.to_meter&&(t={x:t.x/e.to_meter,y:t.y/e.to_meter,z:t.z||0})),n&&e.axis!=="enu"?zv(e,!0,t):(t&&!o&&delete t.z,t)}var qv=ns("WGS84");function wd(r,e,t,n){var i,o,s;return Array.isArray(t)?(i=qh(r,e,t,n)||{x:NaN,y:NaN},t.length>2?typeof r.name<"u"&&r.name==="geocent"||typeof e.name<"u"&&e.name==="geocent"?typeof i.z=="number"?[i.x,i.y,i.z].concat(t.slice(3)):[i.x,i.y,t[2]].concat(t.slice(3)):[i.x,i.y].concat(t.slice(2)):[i.x,i.y]):(o=qh(r,e,t,n),s=Object.keys(t),s.length===2||s.forEach(function(a){if(typeof r.name<"u"&&r.name==="geocent"||typeof e.name<"u"&&e.name==="geocent"){if(a==="x"||a==="y"||a==="z")return}else if(a==="x"||a==="y")return;o[a]=t[a]}),o)}function Hv(r){return r instanceof ns?r:r.oProj?r.oProj:ns(r)}function fn(r,e,t){r=Hv(r);var n=!1,i;return typeof e>"u"?(e=r,r=qv,n=!0):(typeof e.x<"u"||Array.isArray(e))&&(t=e,e=r,r=qv,n=!0),e=Hv(e),t?wd(r,e,t):(i={forward:function(o,s){return wd(r,e,o,s)},inverse:function(o,s){return wd(e,r,o,s)}},n&&(i.oProj=e),i)}var Xv=6,Yv="AJSAJS",Jv="AFAFAF",Tl=65,dn=73,oi=79,xc=86,Oc=90;const Ab={forward:Kv,inverse:Rb,toPoint:Qv};function Kv(r,e){return e=e||5,jb(Lb({lat:r[1],lon:r[0]}),e)}function Rb(r){var e=Pd(ey(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function Qv(r){var e=Pd(ey(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Ed(r){return r*(Math.PI/180)}function $v(r){return 180*(r/Math.PI)}function Lb(r){var e=r.lat,t=r.lon,n=6378137,i=.00669438,o=.9996,s,a,c,f,m,p,g,w=Ed(e),_=Ed(t),y,h;h=Math.floor((t+180)/6)+1,t===180&&(h=60),e>=56&&e<64&&t>=3&&t<12&&(h=32),e>=72&&e<84&&(t>=0&&t<9?h=31:t>=9&&t<21?h=33:t>=21&&t<33?h=35:t>=33&&t<42&&(h=37)),s=(h-1)*6-180+3,y=Ed(s),a=i/(1-i),c=n/Math.sqrt(1-i*Math.sin(w)*Math.sin(w)),f=Math.tan(w)*Math.tan(w),m=a*Math.cos(w)*Math.cos(w),p=Math.cos(w)*(_-y),g=n*((1-i/4-3*i*i/64-5*i*i*i/256)*w-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*w)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*w)-35*i*i*i/3072*Math.sin(6*w));var d=o*c*(p+(1-f+m)*p*p*p/6+(5-18*f+f*f+72*m-58*a)*p*p*p*p*p/120)+5e5,u=o*(g+c*Math.tan(w)*(p*p/2+(5-f+9*m+4*m*m)*p*p*p*p/24+(61-58*f+f*f+600*m-330*a)*p*p*p*p*p*p/720));return e<0&&(u+=1e7),{northing:Math.round(u),easting:Math.round(d),zoneNumber:h,zoneLetter:Fb(e)}}function Pd(r){var e=r.northing,t=r.easting,n=r.zoneLetter,i=r.zoneNumber;if(i<0||i>60)return null;var o=.9996,s=6378137,a=.00669438,c,f=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),m,p,g,w,_,y,h,d,u,l=t-5e5,v=e;n<"N"&&(v-=1e7),h=(i-1)*6-180+3,c=a/(1-a),y=v/o,d=y/(s*(1-a/4-3*a*a/64-5*a*a*a/256)),u=d+(3*f/2-27*f*f*f/32)*Math.sin(2*d)+(21*f*f/16-55*f*f*f*f/32)*Math.sin(4*d)+151*f*f*f/96*Math.sin(6*d),m=s/Math.sqrt(1-a*Math.sin(u)*Math.sin(u)),p=Math.tan(u)*Math.tan(u),g=c*Math.cos(u)*Math.cos(u),w=s*(1-a)/Math.pow(1-a*Math.sin(u)*Math.sin(u),1.5),_=l/(m*o);var b=u-m*Math.tan(u)/w*(_*_/2-(5+3*p+10*g-4*g*g-9*c)*_*_*_*_/24+(61+90*p+298*g+45*p*p-252*c-3*g*g)*_*_*_*_*_*_/720);b=$v(b);var E=(_-(1+2*p+g)*_*_*_/6+(5-2*g+28*p-3*g*g+8*c+24*p*p)*_*_*_*_*_/120)/Math.cos(u);E=h+$v(E);var S;if(r.accuracy){var P=Pd({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});S={top:P.lat,right:P.lon,bottom:b,left:E}}else S={lat:b,lon:E};return S}function Fb(r){var e="Z";return 84>=r&&r>=72?e="X":72>r&&r>=64?e="W":64>r&&r>=56?e="V":56>r&&r>=48?e="U":48>r&&r>=40?e="T":40>r&&r>=32?e="S":32>r&&r>=24?e="R":24>r&&r>=16?e="Q":16>r&&r>=8?e="P":8>r&&r>=0?e="N":0>r&&r>=-8?e="M":-8>r&&r>=-16?e="L":-16>r&&r>=-24?e="K":-24>r&&r>=-32?e="J":-32>r&&r>=-40?e="H":-40>r&&r>=-48?e="G":-48>r&&r>=-56?e="F":-56>r&&r>=-64?e="E":-64>r&&r>=-72?e="D":-72>r&&r>=-80&&(e="C"),e}function jb(r,e){var t="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+kb(r.easting,r.northing,r.zoneNumber)+t.substr(t.length-5,e)+n.substr(n.length-5,e)}function kb(r,e,t){var n=Zv(t),i=Math.floor(r/1e5),o=Math.floor(e/1e5)%20;return Gb(i,o,n)}function Zv(r){var e=r%Xv;return e===0&&(e=Xv),e}function Gb(r,e,t){var n=t-1,i=Yv.charCodeAt(n),o=Jv.charCodeAt(n),s=i+r-1,a=o+e,c=!1;s>Oc&&(s=s-Oc+Tl-1,c=!0),(s===dn||i<dn&&s>dn||(s>dn||i<dn)&&c)&&s++,(s===oi||i<oi&&s>oi||(s>oi||i<oi)&&c)&&(s++,s===dn&&s++),s>Oc&&(s=s-Oc+Tl-1),a>xc?(a=a-xc+Tl-1,c=!0):c=!1,(a===dn||o<dn&&a>dn||(a>dn||o<dn)&&c)&&a++,(a===oi||o<oi&&a>oi||(a>oi||o<oi)&&c)&&(a++,a===dn&&a++),a>xc&&(a=a-xc+Tl-1);var f=String.fromCharCode(s)+String.fromCharCode(a);return f}function ey(r){if(r&&r.length===0)throw"MGRSPoint coverting from nothing";for(var e=r.length,t=null,n="",i,o=0;!/[A-Z]/.test(i=r.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+r;n+=i,o++}var s=parseInt(n,10);if(o===0||o+3>e)throw"MGRSPoint bad conversion from: "+r;var a=r.charAt(o++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+r;t=r.substring(o,o+=2);for(var c=Zv(s),f=Vb(t.charAt(0),c),m=Bb(t.charAt(1),c);m<zb(a);)m+=2e6;var p=e-o;if(p%2!==0)throw`MGRSPoint has to have an even number
255
+ of digits after the zone letter and two 100km letters - front
256
+ half for easting meters, second half for
257
+ northing meters`+r;var g=p/2,w=0,_=0,y,h,d,u,l;return g>0&&(y=1e5/Math.pow(10,g),h=r.substring(o,o+g),w=parseFloat(h)*y,d=r.substring(o+g),_=parseFloat(d)*y),u=w+f,l=_+m,{easting:u,northing:l,zoneLetter:a,zoneNumber:s,accuracy:y}}function Vb(r,e){for(var t=Yv.charCodeAt(e-1),n=1e5,i=!1;t!==r.charCodeAt(0);){if(t++,t===dn&&t++,t===oi&&t++,t>Oc){if(i)throw"Bad character: "+r;t=Tl,i=!0}n+=1e5}return n}function Bb(r,e){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var t=Jv.charCodeAt(e-1),n=0,i=!1;t!==r.charCodeAt(0);){if(t++,t===dn&&t++,t===oi&&t++,t>xc){if(i)throw"Bad character: "+r;t=Tl,i=!0}n+=1e5}return n}function zb(r){var e;switch(r){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+r}function Nl(r,e,t){if(!(this instanceof Nl))return new Nl(r,e,t);if(Array.isArray(r))this.x=r[0],this.y=r[1],this.z=r[2]||0;else if(typeof r=="object")this.x=r.x,this.y=r.y,this.z=r.z||0;else if(typeof r=="string"&&typeof e>"u"){var n=r.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=r,this.y=e,this.z=t||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Nl.fromMGRS=function(r){return new Nl(Qv(r))},Nl.prototype.toMGRS=function(r){return Kv([this.x,this.y],r)};var Ub=1,Wb=.25,ty=.046875,ry=.01953125,ny=.01068115234375,qb=.75,Hb=.46875,Xb=.013020833333333334,Yb=.007120768229166667,Jb=.3645833333333333,Kb=.005696614583333333,Qb=.3076171875;function Sd(r){var e=[];e[0]=Ub-r*(Wb+r*(ty+r*(ry+r*ny))),e[1]=r*(qb-r*(ty+r*(ry+r*ny)));var t=r*r;return e[2]=t*(Hb-r*(Xb+r*Yb)),t*=r,e[3]=t*(Jb-r*Kb),e[4]=t*r*Qb,e}function Dl(r,e,t,n){return t*=e,e*=e,n[0]*r-t*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}var $b=20;function Cd(r,e,t){for(var n=1/(1-e),i=r,o=$b;o;--o){var s=Math.sin(i),a=1-e*s*s;if(a=(Dl(i,s,Math.cos(i),t)-r)*(a*Math.sqrt(a))*n,i-=a,Math.abs(a)<pe)return i}return i}function Zb(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Sd(this.es),this.ml0=Dl(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function ew(r){var e=r.x,t=r.y,n=_e(e-this.long0),i,o,s,a=Math.sin(t),c=Math.cos(t);if(this.es){var m=c*n,p=Math.pow(m,2),g=this.ep2*Math.pow(c,2),w=Math.pow(g,2),_=Math.abs(c)>pe?Math.tan(t):0,y=Math.pow(_,2),h=Math.pow(y,2);i=1-this.es*Math.pow(a,2),m=m/Math.sqrt(i);var d=Dl(t,a,c,this.en);o=this.a*(this.k0*m*(1+p/6*(1-y+g+p/20*(5-18*y+h+14*g-58*y*g+p/42*(61+179*h-h*y-479*y)))))+this.x0,s=this.a*(this.k0*(d-this.ml0+a*n*m/2*(1+p/12*(5-y+9*g+4*w+p/30*(61+h-58*y+270*g-330*y*g+p/56*(1385+543*h-h*y-3111*y))))))+this.y0}else{var f=c*Math.sin(n);if(Math.abs(Math.abs(f)-1)<pe)return 93;if(o=.5*this.a*this.k0*Math.log((1+f)/(1-f))+this.x0,s=c*Math.cos(n)/Math.sqrt(1-Math.pow(f,2)),f=Math.abs(s),f>=1){if(f-1>pe)return 93;s=0}else s=Math.acos(s);t<0&&(s=-s),s=this.a*this.k0*(s-this.lat0)+this.y0}return r.x=o,r.y=s,r}function tw(r){var e,t,n,i,o=(r.x-this.x0)*(1/this.a),s=(r.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+s/this.k0,t=Cd(e,this.es,this.en),Math.abs(t)<se){var p=Math.sin(t),g=Math.cos(t),w=Math.abs(g)>pe?Math.tan(t):0,_=this.ep2*Math.pow(g,2),y=Math.pow(_,2),h=Math.pow(w,2),d=Math.pow(h,2);e=1-this.es*Math.pow(p,2);var u=o*Math.sqrt(e)/this.k0,l=Math.pow(u,2);e=e*w,n=t-e*l/(1-this.es)*.5*(1-l/12*(5+3*h-9*_*h+_-4*y-l/30*(61+90*h-252*_*h+45*d+46*_-l/56*(1385+3633*h+4095*d+1574*d*h)))),i=_e(this.long0+u*(1-l/6*(1+2*h+_-l/20*(5+28*h+24*d+8*_*h+6*_-l/42*(61+662*h+1320*d+720*d*h))))/g)}else n=se*Sc(s),i=0;else{var a=Math.exp(o/this.k0),c=.5*(a-1/a),f=this.lat0+s/this.k0,m=Math.cos(f);e=Math.sqrt((1-Math.pow(m,2))/(1+Math.pow(c,2))),n=Math.asin(e),s<0&&(n=-n),c===0&&m===0?i=0:i=_e(Math.atan2(c,m)+this.long0)}return r.x=i,r.y=n,r}var rw=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const Hh={init:Zb,forward:ew,inverse:tw,names:rw};function iy(r){var e=Math.exp(r);return e=(e-1/e)/2,e}function pn(r,e){r=Math.abs(r),e=Math.abs(e);var t=Math.max(r,e),n=Math.min(r,e)/(t||1);return t*Math.sqrt(1+Math.pow(n,2))}function nw(r){var e=1+r,t=e-1;return t===0?r:r*Math.log(e)/t}function iw(r){var e=Math.abs(r);return e=nw(e*(1+e/(pn(1,e)+1))),r<0?-e:e}function xd(r,e){for(var t=2*Math.cos(2*e),n=r.length-1,i=r[n],o=0,s;--n>=0;)s=-o+t*i+r[n],o=i,i=s;return e+s*Math.sin(2*e)}function sw(r,e){for(var t=2*Math.cos(e),n=r.length-1,i=r[n],o=0,s;--n>=0;)s=-o+t*i+r[n],o=i,i=s;return Math.sin(e)*s}function ow(r){var e=Math.exp(r);return e=(e+1/e)/2,e}function sy(r,e,t){for(var n=Math.sin(e),i=Math.cos(e),o=iy(t),s=ow(t),a=2*i*s,c=-2*n*o,f=r.length-1,m=r[f],p=0,g=0,w=0,_,y;--f>=0;)_=g,y=p,g=m,p=w,m=-_+a*g-c*p+r[f],w=-y+c*g+a*p;return a=n*s,c=i*o,[a*m-c*w,a*w+c*m]}function aw(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Hh.init.apply(this),this.forward=Hh.forward,this.inverse=Hh.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var r=this.es/(1+Math.sqrt(1-this.es)),e=r/(2-r),t=e;this.cgb[0]=e*(2+e*(-.6666666666666666+e*(-2+e*(2.577777777777778+e*(.5777777777777777+e*-4.228148148148148))))),this.cbg[0]=e*(-2+e*(.6666666666666666+e*(1.3333333333333333+e*(-1.8222222222222222+e*(.7111111111111111+e*.9824338624338624))))),t=t*e,this.cgb[1]=t*(2.3333333333333335+e*(-1.6+e*(-5.044444444444444+e*(8.584126984126984+e*2.458201058201058)))),this.cbg[1]=t*(1.6666666666666667+e*(-1.0666666666666667+e*(-1.4444444444444444+e*(2.86984126984127+e*-1.6105820105820106)))),t=t*e,this.cgb[2]=t*(3.7333333333333334+e*(-3.8857142857142857+e*(-12.019047619047619+e*26.03668430335097))),this.cbg[2]=t*(-1.7333333333333334+e*(1.619047619047619+e*(1.6+e*-4.474779541446208))),t=t*e,this.cgb[3]=t*(6.792063492063492+e*(-9.485714285714286+e*-28.188500881834216)),this.cbg[3]=t*(1.9634920634920634+e*(-2.4+e*-1.7518165784832451)),t=t*e,this.cgb[4]=t*(13.250793650793652+e*-23.22238255571589),this.cbg[4]=t*(-2.3301587301587303+e*3.5144460477793813),t=t*e,this.cgb[5]=t*27.011268237934903,this.cbg[5]=t*2.8496841430174764,t=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+t*(.25+t*(.015625+t/256))),this.utg[0]=e*(-.5+e*(.6666666666666666+e*(-.3854166666666667+e*(.002777777777777778+e*(.158203125+e*-.15905919312169312))))),this.gtu[0]=e*(.5+e*(-.6666666666666666+e*(.3125+e*(.22777777777777777+e*(-.4409722222222222+e*.20875661375661375))))),this.utg[1]=t*(-.020833333333333332+e*(-.06666666666666667+e*(.3034722222222222+e*(-.4380952380952381+e*.2890188388723545)))),this.gtu[1]=t*(.2708333333333333+e*(-.6+e*(.38680555555555557+e*(.44603174603174606+e*-1.0248393063822752)))),t=t*e,this.utg[2]=t*(-.035416666666666666+e*(.04404761904761905+e*(.046651785714285715+e*-.06138668430335097))),this.gtu[2]=t*(.25416666666666665+e*(-.7357142857142858+e*(.5603050595238095+e*.9237378747795415))),t=t*e,this.utg[3]=t*(-.02726314484126984+e*(.021825396825396824+e*.11439745921516754)),this.gtu[3]=t*(.30729786706349205+e*(-1.0654761904761905+e*.9096203979276896)),t=t*e,this.utg[4]=t*(-.02841641865079365+e*.027268468414301746),this.gtu[4]=t*(.4306671626984127+e*-1.713007555715889),t=t*e,this.utg[5]=t*-.03233083094085698,this.gtu[5]=t*.6650675310896665;var n=xd(this.cbg,this.lat0);this.Zb=-this.Qn*(n+sw(this.gtu,2*n))}function uw(r){var e=_e(r.x-this.long0),t=r.y;t=xd(this.cbg,t);var n=Math.sin(t),i=Math.cos(t),o=Math.sin(e),s=Math.cos(e);t=Math.atan2(n,s*i),e=Math.atan2(o*i,pn(n,i*s)),e=iw(Math.tan(e));var a=sy(this.gtu,2*t,2*e);t=t+a[0],e=e+a[1];var c,f;return Math.abs(e)<=2.623395162778?(c=this.a*(this.Qn*e)+this.x0,f=this.a*(this.Qn*t+this.Zb)+this.y0):(c=1/0,f=1/0),r.x=c,r.y=f,r}function lw(r){var e=(r.x-this.x0)*(1/this.a),t=(r.y-this.y0)*(1/this.a);t=(t-this.Zb)/this.Qn,e=e/this.Qn;var n,i;if(Math.abs(e)<=2.623395162778){var o=sy(this.utg,2*t,2*e);t=t+o[0],e=e+o[1],e=Math.atan(iy(e));var s=Math.sin(t),a=Math.cos(t),c=Math.sin(e),f=Math.cos(e);t=Math.atan2(s*f,pn(c,f*a)),e=Math.atan2(c,f*a),n=_e(e+this.long0),i=xd(this.cgb,t)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var cw=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const Xh={init:aw,forward:uw,inverse:lw,names:cw};function hw(r,e){if(r===void 0){if(r=Math.floor((_e(e)+Math.PI)*30/Math.PI)+1,r<0)return 0;if(r>60)return 60}return r}var fw="etmerc";function dw(){var r=hw(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*pt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Xh.init.apply(this),this.forward=Xh.forward,this.inverse=Xh.inverse}var pw=["Universal Transverse Mercator System","utm"];const gw={init:dw,names:pw,dependsOn:fw};function Od(r,e){return Math.pow((1-r)/(1+r),e)}var vw=20;function yw(){var r=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*r*r),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(r/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+it)/(Math.pow(Math.tan(.5*this.lat0+it),this.C)*Od(this.e*r,this.ratexp))}function mw(r){var e=r.x,t=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*t+it),this.C)*Od(this.e*Math.sin(t),this.ratexp))-se,r.x=this.C*e,r}function _w(r){for(var e=1e-14,t=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+it)/this.K,1/this.C),o=vw;o>0&&(n=2*Math.atan(i*Od(this.e*Math.sin(r.y),-.5*this.e))-se,!(Math.abs(n-r.y)<e));--o)r.y=n;return o?(r.x=t,r.y=n,r):null}const Md={init:yw,forward:mw,inverse:_w};function bw(){Md.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function ww(r){var e,t,n,i;return r.x=_e(r.x-this.long0),Md.forward.apply(this,[r]),e=Math.sin(r.y),t=Math.cos(r.y),n=Math.cos(r.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*t*n),r.x=i*t*Math.sin(r.x),r.y=i*(this.cosc0*e-this.sinc0*t*n),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function Ew(r){var e,t,n,i,o;if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,o=pn(r.x,r.y)){var s=2*Math.atan2(o,this.R2);e=Math.sin(s),t=Math.cos(s),i=Math.asin(t*this.sinc0+r.y*e*this.cosc0/o),n=Math.atan2(r.x*e,o*this.cosc0*t-r.y*this.sinc0*e)}else i=this.phic0,n=0;return r.x=n,r.y=i,Md.inverse.apply(this,[r]),r.x=_e(r.x+this.long0),r}var Pw=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const Sw={init:bw,forward:ww,inverse:Ew,names:Pw};function Cw(r,e,t){return e*=t,Math.tan(.5*(se+r))*Math.pow((1-e)/(1+e),.5*t)}function xw(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=pe&&(this.k0=.5*(1+Sc(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=pe&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=pe&&Math.abs(Math.cos(this.lat_ts))>pe&&(this.k0=.5*this.cons*rs(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Ii(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=rs(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-se,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function Ow(r){var e=r.x,t=r.y,n=Math.sin(t),i=Math.cos(t),o,s,a,c,f,m,p=_e(e-this.long0);return Math.abs(Math.abs(e-this.long0)-Math.PI)<=pe&&Math.abs(t+this.lat0)<=pe?(r.x=NaN,r.y=NaN,r):this.sphere?(o=2*this.k0/(1+this.sinlat0*n+this.coslat0*i*Math.cos(p)),r.x=this.a*o*i*Math.sin(p)+this.x0,r.y=this.a*o*(this.coslat0*n-this.sinlat0*i*Math.cos(p))+this.y0,r):(s=2*Math.atan(this.ssfn_(t,n,this.e))-se,c=Math.cos(s),a=Math.sin(s),Math.abs(this.coslat0)<=pe?(f=Ii(this.e,t*this.con,this.con*n),m=2*this.a*this.k0*f/this.cons,r.x=this.x0+m*Math.sin(e-this.long0),r.y=this.y0-this.con*m*Math.cos(e-this.long0),r):(Math.abs(this.sinlat0)<pe?(o=2*this.a*this.k0/(1+c*Math.cos(p)),r.y=o*a):(o=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*c*Math.cos(p))),r.y=o*(this.cosX0*a-this.sinX0*c*Math.cos(p))+this.y0),r.x=o*c*Math.sin(p)+this.x0,r))}function Mw(r){r.x-=this.x0,r.y-=this.y0;var e,t,n,i,o,s=Math.sqrt(r.x*r.x+r.y*r.y);if(this.sphere){var a=2*Math.atan(s/(2*this.a*this.k0));return e=this.long0,t=this.lat0,s<=pe?(r.x=e,r.y=t,r):(t=Math.asin(Math.cos(a)*this.sinlat0+r.y*Math.sin(a)*this.coslat0/s),Math.abs(this.coslat0)<pe?this.lat0>0?e=_e(this.long0+Math.atan2(r.x,-1*r.y)):e=_e(this.long0+Math.atan2(r.x,r.y)):e=_e(this.long0+Math.atan2(r.x*Math.sin(a),s*this.coslat0*Math.cos(a)-r.y*this.sinlat0*Math.sin(a))),r.x=e,r.y=t,r)}else if(Math.abs(this.coslat0)<=pe){if(s<=pe)return t=this.lat0,e=this.long0,r.x=e,r.y=t,r;r.x*=this.con,r.y*=this.con,n=s*this.cons/(2*this.a*this.k0),t=this.con*Cc(this.e,n),e=this.con*_e(this.con*this.long0+Math.atan2(r.x,-1*r.y))}else i=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,s<=pe?o=this.X0:(o=Math.asin(Math.cos(i)*this.sinX0+r.y*Math.sin(i)*this.cosX0/s),e=_e(this.long0+Math.atan2(r.x*Math.sin(i),s*this.cosX0*Math.cos(i)-r.y*this.sinX0*Math.sin(i)))),t=-1*Cc(this.e,Math.tan(.5*(se+o)));return r.x=e,r.y=t,r}var Iw=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const Tw={init:xw,forward:Ow,inverse:Mw,names:Iw,ssfn_:Cw};function Nw(){var r=this.lat0;this.lambda0=this.long0;var e=Math.sin(r),t=this.a,n=this.rf,i=1/n,o=2*i-Math.pow(i,2),s=this.e=Math.sqrt(o);this.R=this.k0*t*Math.sqrt(1-o)/(1-o*Math.pow(e,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(r),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),c=Math.log(Math.tan(Math.PI/4+r/2)),f=Math.log((1+s*e)/(1-s*e));this.K=a-this.alpha*c+this.alpha*s/2*f}function Dw(r){var e=Math.log(Math.tan(Math.PI/4-r.y/2)),t=this.e/2*Math.log((1+this.e*Math.sin(r.y))/(1-this.e*Math.sin(r.y))),n=-this.alpha*(e+t)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(r.x-this.lambda0),s=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(o))),a=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(o));return r.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,r.x=this.R*s+this.x0,r}function Aw(r){for(var e=r.x-this.x0,t=r.y-this.y0,n=e/this.R,i=2*(Math.atan(Math.exp(t/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),s=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),a=this.lambda0+s/this.alpha,c=0,f=o,m=-1e3,p=0;Math.abs(f-m)>1e-7;){if(++p>20)return;c=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(f))/2)),m=f,f=2*Math.atan(Math.exp(c))-Math.PI/2}return r.x=a,r.y=f,r}var Rw=["somerc"];const Lw={init:Nw,forward:Dw,inverse:Aw,names:Rw};var Al=1e-7;function Fw(r){var e=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],t=typeof r.projName=="object"?Object.keys(r.projName)[0]:r.projName;return"no_uoff"in r||"no_off"in r||e.indexOf(t)!==-1||e.indexOf(Lv(t))!==-1}function jw(){var r,e,t,n,i,o,s,a,c,f,m=0,p,g=0,w=0,_=0,y=0,h=0,d=0;this.no_off=Fw(this),this.no_rot="no_rot"in this;var u=!1;"alpha"in this&&(u=!0);var l=!1;if("rectified_grid_angle"in this&&(l=!0),u&&(d=this.alpha),l&&(m=this.rectified_grid_angle),u||l)g=this.longc;else if(w=this.long1,y=this.lat1,_=this.long2,h=this.lat2,Math.abs(y-h)<=Al||(r=Math.abs(y))<=Al||Math.abs(r-se)<=Al||Math.abs(Math.abs(this.lat0)-se)<=Al||Math.abs(Math.abs(h)-se)<=Al)throw new Error;var v=1-this.es;e=Math.sqrt(v),Math.abs(this.lat0)>pe?(a=Math.sin(this.lat0),t=Math.cos(this.lat0),r=1-this.es*a*a,this.B=t*t,this.B=Math.sqrt(1+this.es*this.B*this.B/v),this.A=this.B*this.k0*e/r,n=this.B*e/(t*Math.sqrt(r)),i=n*n-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(Ii(this.e,this.lat0,a),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=i=1),u||l?(u?(p=Math.asin(Math.sin(d)/n),l||(m=d)):(p=m,d=Math.asin(n*Math.sin(p))),this.lam0=g-Math.asin(.5*(i-1/i)*Math.tan(p))/this.B):(o=Math.pow(Ii(this.e,y,Math.sin(y)),this.B),s=Math.pow(Ii(this.e,h,Math.sin(h)),this.B),i=this.E/o,c=(s-o)/(s+o),f=this.E*this.E,f=(f-s*o)/(f+s*o),r=w-_,r<-Math.pi?_-=Ec:r>Math.pi&&(_+=Ec),this.lam0=_e(.5*(w+_)-Math.atan(f*Math.tan(.5*this.B*(w-_))/c)/this.B),p=Math.atan(2*Math.sin(this.B*_e(w-this.lam0))/(i-1/i)),m=d=Math.asin(n*Math.sin(p))),this.singam=Math.sin(p),this.cosgam=Math.cos(p),this.sinrot=Math.sin(m),this.cosrot=Math.cos(m),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(d))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*p,this.v_pole_n=this.ArB*Math.log(Math.tan(it-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(it+i))}function kw(r){var e={},t,n,i,o,s,a,c,f;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-se)>pe){if(s=this.E/Math.pow(Ii(this.e,r.y,Math.sin(r.y)),this.B),a=1/s,t=.5*(s-a),n=.5*(s+a),o=Math.sin(this.B*r.x),i=(t*this.singam-o*this.cosgam)/n,Math.abs(Math.abs(i)-1)<pe)throw new Error;f=.5*this.ArB*Math.log((1-i)/(1+i)),a=Math.cos(this.B*r.x),Math.abs(a)<Al?c=this.A*r.x:c=this.ArB*Math.atan2(t*this.cosgam+o*this.singam,a)}else f=r.y>0?this.v_pole_n:this.v_pole_s,c=this.ArB*r.y;return this.no_rot?(e.x=c,e.y=f):(c-=this.u_0,e.x=f*this.cosrot+c*this.sinrot,e.y=c*this.cosrot-f*this.sinrot),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function Gw(r){var e,t,n,i,o,s,a,c={};if(r.x=(r.x-this.x0)*(1/this.a),r.y=(r.y-this.y0)*(1/this.a),this.no_rot?(t=r.y,e=r.x):(t=r.x*this.cosrot-r.y*this.sinrot,e=r.y*this.cosrot+r.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*t),i=.5*(n-1/n),o=.5*(n+1/n),s=Math.sin(this.BrA*e),a=(s*this.cosgam+i*this.singam)/o,Math.abs(Math.abs(a)-1)<pe)c.x=0,c.y=a<0?-se:se;else{if(c.y=this.E/Math.sqrt((1+a)/(1-a)),c.y=Cc(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(i*this.cosgam-s*this.singam,Math.cos(this.BrA*e))}return c.x+=this.lam0,c}var Vw=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const Bw={init:jw,forward:kw,inverse:Gw,names:Vw};function zw(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<pe)){var r=this.b/this.a;this.e=Math.sqrt(1-r*r);var e=Math.sin(this.lat1),t=Math.cos(this.lat1),n=rs(this.e,e,t),i=Ii(this.e,this.lat1,e),o=Math.sin(this.lat2),s=Math.cos(this.lat2),a=rs(this.e,o,s),c=Ii(this.e,this.lat2,o),f=Math.abs(Math.abs(this.lat0)-se)<pe?0:Ii(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>pe?this.ns=Math.log(n/a)/Math.log(i/c):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(f,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Uw(r){var e=r.x,t=r.y;Math.abs(2*Math.abs(t)-Math.PI)<=pe&&(t=Sc(t)*(se-2*pe));var n=Math.abs(Math.abs(t)-se),i,o;if(n>pe)i=Ii(this.e,t,Math.sin(t)),o=this.a*this.f0*Math.pow(i,this.ns);else{if(n=t*this.ns,n<=0)return null;o=0}var s=this.ns*_e(e-this.long0);return r.x=this.k0*(o*Math.sin(s))+this.x0,r.y=this.k0*(this.rh-o*Math.cos(s))+this.y0,r}function Ww(r){var e,t,n,i,o,s=(r.x-this.x0)/this.k0,a=this.rh-(r.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(s*s+a*a),t=1):(e=-Math.sqrt(s*s+a*a),t=-1);var c=0;if(e!==0&&(c=Math.atan2(t*s,t*a)),e!==0||this.ns>0){if(t=1/this.ns,n=Math.pow(e/(this.a*this.f0),t),i=Cc(this.e,n),i===-9999)return null}else i=-se;return o=_e(c/this.ns+this.long0),r.x=o,r.y=i,r}var qw=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const Hw={init:zw,forward:Uw,inverse:Ww,names:qw};function Xw(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function Yw(r){var e,t,n,i,o,s,a,c=r.x,f=r.y,m=_e(c-this.long0);return e=Math.pow((1+this.e*Math.sin(f))/(1-this.e*Math.sin(f)),this.alfa*this.e/2),t=2*(Math.atan(this.k*Math.pow(Math.tan(f/2+this.s45),this.alfa)/e)-this.s45),n=-m*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(t)+Math.sin(this.ad)*Math.cos(t)*Math.cos(n)),o=Math.asin(Math.cos(t)*Math.sin(n)/Math.cos(i)),s=this.n*o,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),r.y=a*Math.cos(s)/1,r.x=a*Math.sin(s)/1,this.czech||(r.y*=-1,r.x*=-1),r}function Jw(r){var e,t,n,i,o,s,a,c,f=r.x;r.x=r.y,r.y=f,this.czech||(r.y*=-1,r.x*=-1),s=Math.sqrt(r.x*r.x+r.y*r.y),o=Math.atan2(r.y,r.x),i=o/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),t=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(e)),r.x=this.long0-t/this.alfa,a=e,c=0;var m=0;do r.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-r.y)<1e-10&&(c=1),a=r.y,m+=1;while(c===0&&m<15);return m>=15?null:r}var Kw=["Krovak","krovak"];const Qw={init:Xw,forward:Yw,inverse:Jw,names:Kw};function Jr(r,e,t,n,i){return r*i-e*Math.sin(2*i)+t*Math.sin(4*i)-n*Math.sin(6*i)}function Mc(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function Ic(r){return .375*r*(1+.25*r*(1+.46875*r))}function Tc(r){return .05859375*r*r*(1+.75*r)}function Nc(r){return r*r*r*.011393229166666666}function Id(r,e,t){var n=e*t;return r/Math.sqrt(1-n*n)}function _o(r){return Math.abs(r)<se?r:r-Sc(r)*Math.PI}function Yh(r,e,t,n,i){var o,s;o=r/e;for(var a=0;a<15;a++)if(s=(r-(e*o-t*Math.sin(2*o)+n*Math.sin(4*o)-i*Math.sin(6*o)))/(e-2*t*Math.cos(2*o)+4*n*Math.cos(4*o)-6*i*Math.cos(6*o)),o+=s,Math.abs(s)<=1e-10)return o;return NaN}function $w(){this.sphere||(this.e0=Mc(this.es),this.e1=Ic(this.es),this.e2=Tc(this.es),this.e3=Nc(this.es),this.ml0=this.a*Jr(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Zw(r){var e,t,n=r.x,i=r.y;if(n=_e(n-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(i)*Math.sin(n)),t=this.a*(Math.atan2(Math.tan(i),Math.cos(n))-this.lat0);else{var o=Math.sin(i),s=Math.cos(i),a=Id(this.a,this.e,o),c=Math.tan(i)*Math.tan(i),f=n*Math.cos(i),m=f*f,p=this.es*s*s/(1-this.es),g=this.a*Jr(this.e0,this.e1,this.e2,this.e3,i);e=a*f*(1-m*c*(.16666666666666666-(8-c+8*p)*m/120)),t=g-this.ml0+a*o/s*m*(.5+(5-c+6*p)*m/24)}return r.x=e+this.x0,r.y=t+this.y0,r}function eE(r){r.x-=this.x0,r.y-=this.y0;var e=r.x/this.a,t=r.y/this.a,n,i;if(this.sphere){var o=t+this.lat0;n=Math.asin(Math.sin(o)*Math.cos(e)),i=Math.atan2(Math.tan(e),Math.cos(o))}else{var s=this.ml0/this.a+t,a=Yh(s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-se)<=pe)return r.x=this.long0,r.y=se,t<0&&(r.y*=-1),r;var c=Id(this.a,this.e,Math.sin(a)),f=c*c*c/this.a/this.a*(1-this.es),m=Math.pow(Math.tan(a),2),p=e*this.a/c,g=p*p;n=a-c*Math.tan(a)/f*p*p*(.5-(1+3*m)*p*p/24),i=p*(1-g*(m/3+(1+3*m)*m*g/15))/Math.cos(a)}return r.x=_e(i+this.long0),r.y=_o(n),r}var tE=["Cassini","Cassini_Soldner","cass"];const rE={init:$w,forward:Zw,inverse:eE,names:tE};function bo(r,e){var t;return r>1e-7?(t=r*e,(1-r*r)*(e/(1-t*t)-.5/r*Math.log((1-t)/(1+t)))):2*e}var nE=1,iE=2,sE=3,oE=4;function aE(){var r=Math.abs(this.lat0);if(Math.abs(r-se)<pe?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(r)<pe?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var e;switch(this.qp=bo(this.e,1),this.mmf=.5/(1-this.es),this.apa=vE(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=bo(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function uE(r){var e,t,n,i,o,s,a,c,f,m,p=r.x,g=r.y;if(p=_e(p-this.long0),this.sphere){if(o=Math.sin(g),m=Math.cos(g),n=Math.cos(p),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t=this.mode===this.EQUIT?1+m*n:1+this.sinph0*o+this.cosph0*m*n,t<=pe)return null;t=Math.sqrt(2/t),e=t*m*Math.sin(p),t*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*m*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(g+this.lat0)<pe)return null;t=it-g*.5,t=2*(this.mode===this.S_POLE?Math.cos(t):Math.sin(t)),e=t*Math.sin(p),t*=n}}else{switch(a=0,c=0,f=0,n=Math.cos(p),i=Math.sin(p),o=Math.sin(g),s=bo(this.e,o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(a=s/this.qp,c=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:f=1+this.sinb1*a+this.cosb1*c*n;break;case this.EQUIT:f=1+c*n;break;case this.N_POLE:f=se+g,s=this.qp-s;break;case this.S_POLE:f=g-se,s=this.qp+s;break}if(Math.abs(f)<pe)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:f=Math.sqrt(2/f),this.mode===this.OBLIQ?t=this.ymf*f*(this.cosb1*a-this.sinb1*c*n):t=(f=Math.sqrt(2/(1+c*n)))*a*this.ymf,e=this.xmf*f*c*i;break;case this.N_POLE:case this.S_POLE:s>=0?(e=(f=Math.sqrt(s))*i,t=n*(this.mode===this.S_POLE?f:-f)):e=t=0;break}}return r.x=this.a*e+this.x0,r.y=this.a*t+this.y0,r}function lE(r){r.x-=this.x0,r.y-=this.y0;var e=r.x/this.a,t=r.y/this.a,n,i,o,s,a,c,f;if(this.sphere){var m=0,p,g=0;if(p=Math.sqrt(e*e+t*t),i=p*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(g=Math.sin(i),m=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(p)<=pe?0:Math.asin(t*g/p),e*=g,t=m*p;break;case this.OBLIQ:i=Math.abs(p)<=pe?this.lat0:Math.asin(m*this.sinph0+t*g*this.cosph0/p),e*=g*this.cosph0,t=(m-Math.sin(i)*this.sinph0)*p;break;case this.N_POLE:t=-t,i=se-i;break;case this.S_POLE:i-=se;break}n=t===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(e,t)}else{if(f=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e/=this.dd,t*=this.dd,c=Math.sqrt(e*e+t*t),c<pe)return r.x=this.long0,r.y=this.lat0,r;s=2*Math.asin(.5*c/this.rq),o=Math.cos(s),e*=s=Math.sin(s),this.mode===this.OBLIQ?(f=o*this.sinb1+t*s*this.cosb1/c,a=this.qp*f,t=c*this.cosb1*o-t*this.sinb1*s):(f=t*s/c,a=this.qp*f,t=c*o)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(t=-t),a=e*e+t*t,!a)return r.x=this.long0,r.y=this.lat0,r;f=1-a/this.qp,this.mode===this.S_POLE&&(f=-f)}n=Math.atan2(e,t),i=yE(Math.asin(f),this.apa)}return r.x=_e(this.long0+n),r.y=i,r}var cE=.3333333333333333,hE=.17222222222222222,fE=.10257936507936508,dE=.06388888888888888,pE=.0664021164021164,gE=.016415012942191543;function vE(r){var e,t=[];return t[0]=r*cE,e=r*r,t[0]+=e*hE,t[1]=e*dE,e*=r,t[0]+=e*fE,t[1]+=e*pE,t[2]=e*gE,t}function yE(r,e){var t=r+r;return r+e[0]*Math.sin(t)+e[1]*Math.sin(t+t)+e[2]*Math.sin(t+t+t)}var mE=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const _E={init:aE,forward:uE,inverse:lE,names:mE,S_POLE:nE,N_POLE:iE,EQUIT:sE,OBLIQ:oE};function wo(r){return Math.abs(r)>1&&(r=r>1?1:-1),Math.asin(r)}function bE(){Math.abs(this.lat1+this.lat2)<pe||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=rs(this.e3,this.sin_po,this.cos_po),this.qs1=bo(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=rs(this.e3,this.sin_po,this.cos_po),this.qs2=bo(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=bo(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>pe?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function wE(r){var e=r.x,t=r.y;this.sin_phi=Math.sin(t),this.cos_phi=Math.cos(t);var n=bo(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*_e(e-this.long0),s=i*Math.sin(o)+this.x0,a=this.rh-i*Math.cos(o)+this.y0;return r.x=s,r.y=a,r}function EE(r){var e,t,n,i,o,s;return r.x-=this.x0,r.y=this.rh-r.y+this.y0,this.ns0>=0?(e=Math.sqrt(r.x*r.x+r.y*r.y),n=1):(e=-Math.sqrt(r.x*r.x+r.y*r.y),n=-1),i=0,e!==0&&(i=Math.atan2(n*r.x,n*r.y)),n=e*this.ns0/this.a,this.sphere?s=Math.asin((this.c-n*n)/(2*this.ns0)):(t=(this.c-n*n)/this.ns0,s=this.phi1z(this.e3,t)),o=_e(i/this.ns0+this.long0),r.x=o,r.y=s,r}function PE(r,e){var t,n,i,o,s,a=wo(.5*e);if(r<pe)return a;for(var c=r*r,f=1;f<=25;f++)if(t=Math.sin(a),n=Math.cos(a),i=r*t,o=1-i*i,s=.5*o*o/n*(e/(1-c)-t/o+.5/r*Math.log((1-i)/(1+i))),a=a+s,Math.abs(s)<=1e-7)return a;return null}var SE=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const CE={init:bE,forward:wE,inverse:EE,names:SE,phi1z:PE};function xE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function OE(r){var e,t,n,i,o,s,a,c,f=r.x,m=r.y;return n=_e(f-this.long0),e=Math.sin(m),t=Math.cos(m),i=Math.cos(n),s=this.sin_p14*e+this.cos_p14*t*i,o=1,s>0||Math.abs(s)<=pe?(a=this.x0+this.a*o*t*Math.sin(n)/s,c=this.y0+this.a*o*(this.cos_p14*e-this.sin_p14*t*i)/s):(a=this.x0+this.infinity_dist*t*Math.sin(n),c=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*t*i)),r.x=a,r.y=c,r}function ME(r){var e,t,n,i,o,s;return r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,(e=Math.sqrt(r.x*r.x+r.y*r.y))?(i=Math.atan2(e,this.rc),t=Math.sin(i),n=Math.cos(i),s=wo(n*this.sin_p14+r.y*t*this.cos_p14/e),o=Math.atan2(r.x*t,e*this.cos_p14*n-r.y*this.sin_p14*t),o=_e(this.long0+o)):(s=this.phic0,o=0),r.x=o,r.y=s,r}var IE=["gnom"];const TE={init:xE,forward:OE,inverse:ME,names:IE};function NE(r,e){var t=1-(1-r*r)/(2*r)*Math.log((1-r)/(1+r));if(Math.abs(Math.abs(e)-t)<1e-6)return e<0?-1*se:se;for(var n=Math.asin(.5*e),i,o,s,a,c=0;c<30;c++)if(o=Math.sin(n),s=Math.cos(n),a=r*o,i=Math.pow(1-a*a,2)/(2*s)*(e/(1-r*r)-o/(1-a*a)+.5/r*Math.log((1-a)/(1+a))),n+=i,Math.abs(i)<=1e-10)return n;return NaN}function DE(){this.sphere||(this.k0=rs(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function AE(r){var e=r.x,t=r.y,n,i,o=_e(e-this.long0);if(this.sphere)n=this.x0+this.a*o*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(t)/Math.cos(this.lat_ts);else{var s=bo(this.e,Math.sin(t));n=this.x0+this.a*this.k0*o,i=this.y0+this.a*s*.5/this.k0}return r.x=n,r.y=i,r}function RE(r){r.x-=this.x0,r.y-=this.y0;var e,t;return this.sphere?(e=_e(this.long0+r.x/this.a/Math.cos(this.lat_ts)),t=Math.asin(r.y/this.a*Math.cos(this.lat_ts))):(t=NE(this.e,2*r.y*this.k0/this.a),e=_e(this.long0+r.x/(this.a*this.k0))),r.x=e,r.y=t,r}var LE=["cea"];const FE={init:DE,forward:AE,inverse:RE,names:LE};function jE(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function kE(r){var e=r.x,t=r.y,n=_e(e-this.long0),i=_o(t-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function GE(r){var e=r.x,t=r.y;return r.x=_e(this.long0+(e-this.x0)/(this.a*this.rc)),r.y=_o(this.lat0+(t-this.y0)/this.a),r}var VE=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const BE={init:jE,forward:kE,inverse:GE,names:VE};var oy=20;function zE(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Mc(this.es),this.e1=Ic(this.es),this.e2=Tc(this.es),this.e3=Nc(this.es),this.ml0=this.a*Jr(this.e0,this.e1,this.e2,this.e3,this.lat0)}function UE(r){var e=r.x,t=r.y,n,i,o,s=_e(e-this.long0);if(o=s*Math.sin(t),this.sphere)Math.abs(t)<=pe?(n=this.a*s,i=-1*this.a*this.lat0):(n=this.a*Math.sin(o)/Math.tan(t),i=this.a*(_o(t-this.lat0)+(1-Math.cos(o))/Math.tan(t)));else if(Math.abs(t)<=pe)n=this.a*s,i=-1*this.ml0;else{var a=Id(this.a,this.e,Math.sin(t))/Math.tan(t);n=a*Math.sin(o),i=this.a*Jr(this.e0,this.e1,this.e2,this.e3,t)-this.ml0+a*(1-Math.cos(o))}return r.x=n+this.x0,r.y=i+this.y0,r}function WE(r){var e,t,n,i,o,s,a,c,f;if(n=r.x-this.x0,i=r.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=pe)e=_e(n/this.a+this.long0),t=0;else{s=this.lat0+i/this.a,a=n*n/this.a/this.a+s*s,c=s;var m;for(o=oy;o;--o)if(m=Math.tan(c),f=-1*(s*(c*m+1)-c-.5*(c*c+a)*m)/((c-s)/m-1),c+=f,Math.abs(f)<=pe){t=c;break}e=_e(this.long0+Math.asin(n*Math.tan(c)/this.a)/Math.sin(t))}else if(Math.abs(i+this.ml0)<=pe)t=0,e=_e(this.long0+n/this.a);else{s=(this.ml0+i)/this.a,a=n*n/this.a/this.a+s*s,c=s;var p,g,w,_,y;for(o=oy;o;--o)if(y=this.e*Math.sin(c),p=Math.sqrt(1-y*y)*Math.tan(c),g=this.a*Jr(this.e0,this.e1,this.e2,this.e3,c),w=this.e0-2*this.e1*Math.cos(2*c)+4*this.e2*Math.cos(4*c)-6*this.e3*Math.cos(6*c),_=g/this.a,f=(s*(p*_+1)-_-.5*p*(_*_+a))/(this.es*Math.sin(2*c)*(_*_+a-2*s*_)/(4*p)+(s-_)*(p*w-2/Math.sin(2*c))-w),c-=f,Math.abs(f)<=pe){t=c;break}p=Math.sqrt(1-this.es*Math.pow(Math.sin(t),2))*Math.tan(t),e=_e(this.long0+Math.asin(n*p/this.a)/Math.sin(t))}return r.x=e,r.y=t,r}var qE=["Polyconic","American_Polyconic","poly"];const HE={init:zE,forward:UE,inverse:WE,names:qE};function XE(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function YE(r){var e,t=r.x,n=r.y,i=n-this.lat0,o=t-this.long0,s=i/wc*1e-5,a=o,c=1,f=0;for(e=1;e<=10;e++)c=c*s,f=f+this.A[e]*c;var m=f,p=a,g=1,w=0,_,y,h=0,d=0;for(e=1;e<=6;e++)_=g*m-w*p,y=w*m+g*p,g=_,w=y,h=h+this.B_re[e]*g-this.B_im[e]*w,d=d+this.B_im[e]*g+this.B_re[e]*w;return r.x=d*this.a+this.x0,r.y=h*this.a+this.y0,r}function JE(r){var e,t=r.x,n=r.y,i=t-this.x0,o=n-this.y0,s=o/this.a,a=i/this.a,c=1,f=0,m,p,g=0,w=0;for(e=1;e<=6;e++)m=c*s-f*a,p=f*s+c*a,c=m,f=p,g=g+this.C_re[e]*c-this.C_im[e]*f,w=w+this.C_im[e]*c+this.C_re[e]*f;for(var _=0;_<this.iterations;_++){var y=g,h=w,d,u,l=s,v=a;for(e=2;e<=6;e++)d=y*g-h*w,u=h*g+y*w,y=d,h=u,l=l+(e-1)*(this.B_re[e]*y-this.B_im[e]*h),v=v+(e-1)*(this.B_im[e]*y+this.B_re[e]*h);y=1,h=0;var b=this.B_re[1],E=this.B_im[1];for(e=2;e<=6;e++)d=y*g-h*w,u=h*g+y*w,y=d,h=u,b=b+e*(this.B_re[e]*y-this.B_im[e]*h),E=E+e*(this.B_im[e]*y+this.B_re[e]*h);var S=b*b+E*E;g=(l*b+v*E)/S,w=(v*b-l*E)/S}var P=g,C=w,x=1,O=0;for(e=1;e<=9;e++)x=x*P,O=O+this.D[e]*x;var I=this.lat0+O*wc*1e5,N=this.long0+C;return r.x=N,r.y=I,r}var KE=["New_Zealand_Map_Grid","nzmg"];const QE={init:XE,forward:YE,inverse:JE,names:KE};function $E(){}function ZE(r){var e=r.x,t=r.y,n=_e(e-this.long0),i=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+t/2.5))*1.25;return r.x=i,r.y=o,r}function eP(r){r.x-=this.x0,r.y-=this.y0;var e=_e(this.long0+r.x/this.a),t=2.5*(Math.atan(Math.exp(.8*r.y/this.a))-Math.PI/4);return r.x=e,r.y=t,r}var tP=["Miller_Cylindrical","mill"];const rP={init:$E,forward:ZE,inverse:eP,names:tP};var nP=20;function iP(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Sd(this.es)}function sP(r){var e,t,n=r.x,i=r.y;if(n=_e(n-this.long0),this.sphere){if(!this.m)i=this.n!==1?Math.asin(this.n*Math.sin(i)):i;else for(var o=this.n*Math.sin(i),s=nP;s;--s){var a=(this.m*i+Math.sin(i)-o)/(this.m+Math.cos(i));if(i-=a,Math.abs(a)<pe)break}e=this.a*this.C_x*n*(this.m+Math.cos(i)),t=this.a*this.C_y*i}else{var c=Math.sin(i),f=Math.cos(i);t=this.a*Dl(i,c,f,this.en),e=this.a*n*f/Math.sqrt(1-this.es*c*c)}return r.x=e,r.y=t,r}function oP(r){var e,t,n,i;return r.x-=this.x0,n=r.x/this.a,r.y-=this.y0,e=r.y/this.a,this.sphere?(e/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(e))),this.m?e=wo((this.m*e+Math.sin(e))/this.n):this.n!==1&&(e=wo(Math.sin(e)/this.n)),n=_e(n+this.long0),e=_o(e)):(e=Cd(r.y/this.a,this.es,this.en),i=Math.abs(e),i<se?(i=Math.sin(e),t=this.long0+r.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(e)),n=_e(t)):i-pe<se&&(n=this.long0)),r.x=n,r.y=e,r}var aP=["Sinusoidal","sinu"];const uP={init:iP,forward:sP,inverse:oP,names:aP};function lP(){}function cP(r){for(var e=r.x,t=r.y,n=_e(e-this.long0),i=t,o=Math.PI*Math.sin(t);;){var s=-(i+Math.sin(i)-o)/(1+Math.cos(i));if(i+=s,Math.abs(s)<pe)break}i/=2,Math.PI/2-Math.abs(t)<pe&&(n=0);var a=.900316316158*this.a*n*Math.cos(i)+this.x0,c=1.4142135623731*this.a*Math.sin(i)+this.y0;return r.x=a,r.y=c,r}function hP(r){var e,t;r.x-=this.x0,r.y-=this.y0,t=r.y/(1.4142135623731*this.a),Math.abs(t)>.999999999999&&(t=.999999999999),e=Math.asin(t);var n=_e(this.long0+r.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),t=(2*e+Math.sin(2*e))/Math.PI,Math.abs(t)>1&&(t=1);var i=Math.asin(t);return r.x=n,r.y=i,r}var fP=["Mollweide","moll"];const dP={init:lP,forward:cP,inverse:hP,names:fP};function pP(){Math.abs(this.lat1+this.lat2)<pe||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Mc(this.es),this.e1=Ic(this.es),this.e2=Tc(this.es),this.e3=Nc(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=rs(this.e,this.sinphi,this.cosphi),this.ml1=Jr(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<pe?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=rs(this.e,this.sinphi,this.cosphi),this.ml2=Jr(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Jr(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function gP(r){var e=r.x,t=r.y,n;if(this.sphere)n=this.a*(this.g-t);else{var i=Jr(this.e0,this.e1,this.e2,this.e3,t);n=this.a*(this.g-i)}var o=this.ns*_e(e-this.long0),s=this.x0+n*Math.sin(o),a=this.y0+this.rh-n*Math.cos(o);return r.x=s,r.y=a,r}function vP(r){r.x-=this.x0,r.y=this.rh-r.y+this.y0;var e,t,n,i;this.ns>=0?(t=Math.sqrt(r.x*r.x+r.y*r.y),e=1):(t=-Math.sqrt(r.x*r.x+r.y*r.y),e=-1);var o=0;if(t!==0&&(o=Math.atan2(e*r.x,e*r.y)),this.sphere)return i=_e(this.long0+o/this.ns),n=_o(this.g-t/this.a),r.x=i,r.y=n,r;var s=this.g-t/this.a;return n=Yh(s,this.e0,this.e1,this.e2,this.e3),i=_e(this.long0+o/this.ns),r.x=i,r.y=n,r}var yP=["Equidistant_Conic","eqdc"];const mP={init:pP,forward:gP,inverse:vP,names:yP};function _P(){this.R=this.a}function bP(r){var e=r.x,t=r.y,n=_e(e-this.long0),i,o;Math.abs(t)<=pe&&(i=this.x0+this.R*n,o=this.y0);var s=wo(2*Math.abs(t/Math.PI));(Math.abs(n)<=pe||Math.abs(Math.abs(t)-se)<=pe)&&(i=this.x0,t>=0?o=this.y0+Math.PI*this.R*Math.tan(.5*s):o=this.y0+Math.PI*this.R*-Math.tan(.5*s));var a=.5*Math.abs(Math.PI/n-n/Math.PI),c=a*a,f=Math.sin(s),m=Math.cos(s),p=m/(f+m-1),g=p*p,w=p*(2/f-1),_=w*w,y=Math.PI*this.R*(a*(p-_)+Math.sqrt(c*(p-_)*(p-_)-(_+c)*(g-_)))/(_+c);n<0&&(y=-y),i=this.x0+y;var h=c+p;return y=Math.PI*this.R*(w*h-a*Math.sqrt((_+c)*(c+1)-h*h))/(_+c),t>=0?o=this.y0+y:o=this.y0-y,r.x=i,r.y=o,r}function wP(r){var e,t,n,i,o,s,a,c,f,m,p,g,w;return r.x-=this.x0,r.y-=this.y0,p=Math.PI*this.R,n=r.x/p,i=r.y/p,o=n*n+i*i,s=-Math.abs(i)*(1+o),a=s-2*i*i+n*n,c=-2*s+1+2*i*i+o*o,w=i*i/c+(2*a*a*a/c/c/c-9*s*a/c/c)/27,f=(s-a*a/3/c)/c,m=2*Math.sqrt(-f/3),p=3*w/f/m,Math.abs(p)>1&&(p>=0?p=1:p=-1),g=Math.acos(p)/3,r.y>=0?t=(-m*Math.cos(g+Math.PI/3)-a/3/c)*Math.PI:t=-(-m*Math.cos(g+Math.PI/3)-a/3/c)*Math.PI,Math.abs(n)<pe?e=this.long0:e=_e(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-i*i)+o*o))/2/n),r.x=e,r.y=t,r}var EP=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const PP={init:_P,forward:bP,inverse:wP,names:EP};var Td={exports:{}},ay;function SP(){return ay||(ay=1,function(r){(function(e){var t={};t.Constants={},t.Math={},t.Accumulator={},function(n){n.WGS84={a:6378137,f:.0033528106647474805},n.version={major:2,minor:1,patch:1},n.version_string="2.1.1"}(t.Constants),function(n){n.digits=53,n.epsilon=Math.pow(.5,n.digits-1),n.degree=Math.PI/180,n.sq=function(i){return i*i},n.hypot=function(i,o){return Math.sqrt(i*i+o*o)},n.cbrt=Math.cbrt||function(i){var o=Math.pow(Math.abs(i),.3333333333333333);return i>0?o:i<0?-o:i},n.log1p=Math.log1p||function(i){var o=1+i,s=o-1;return s===0?i:i*Math.log(o)/s},n.atanh=Math.atanh||function(i){var o=Math.abs(i);return o=n.log1p(2*o/(1-o))/2,i>0?o:i<0?-o:i},n.copysign=function(i,o){return Math.abs(i)*(o<0||o===0&&1/o<0?-1:1)},n.sum=function(i,o){var s=i+o,a=s-o,c=s-a,f;return a-=i,c-=o,f=s&&0-(a+c),{s,t:f}},n.polyval=function(i,o,s,a){for(var c=i<0?0:o[s++];--i>=0;)c=c*a+o[s++];return c},n.AngRound=function(i){var o=.0625,s=Math.abs(i);return s=s<o?o-(o-s):s,n.copysign(s,i)},n.remainder=function(i,o){return i%=o,i<-o/2?i+o:i<o/2?i:i-o},n.AngNormalize=function(i){var o=n.remainder(i,360);return Math.abs(o)===180?n.copysign(180,i):o},n.LatFix=function(i){return Math.abs(i)>90?NaN:i},n.AngDiff=function(i,o){var s=n.sum(n.remainder(-i,360),n.remainder(o,360)),a,c;return s=n.sum(n.remainder(s.s,360),s.t),a=s.s,c=s.t,(a===0||Math.abs(a)===180)&&(a=n.copysign(a,c===0?o-i:-c)),{d:a,e:c}},n.sincosd=function(i){var o,s,a,c,f,m,p;switch(o=i%360,a=Math.round(o/90),o-=90*a,s=o*this.degree,c=Math.sin(s),f=Math.cos(s),Math.abs(o)===45?(f=Math.sqrt(.5),c=n.copysign(f,s)):Math.abs(o)===30&&(f=Math.sqrt(.75),c=n.copysign(.5,s)),a&3){case 0:m=c,p=f;break;case 1:m=f,p=-c;break;case 2:m=-c,p=-f;break;default:m=-f,p=c;break}return p+=0,m===0&&(m=n.copysign(m,i)),{s:m,c:p}},n.sincosde=function(i,o){var s,a,c,f,m,p,g;switch(s=i%360,c=Math.round(s/90),s=n.AngRound(s-90*c+o),a=s*this.degree,f=Math.sin(a),m=Math.cos(a),Math.abs(s)===45?(m=Math.sqrt(.5),f=n.copysign(m,a)):Math.abs(s)===30&&(m=Math.sqrt(.75),f=n.copysign(.5,a)),c&3){case 0:p=f,g=m;break;case 1:p=m,g=-f;break;case 2:p=-f,g=-m;break;default:p=-m,g=f;break}return g+=0,p===0&&(p=n.copysign(p,i+o)),{s:p,c:g}},n.atan2d=function(i,o){var s=0,a;switch(Math.abs(i)>Math.abs(o)&&([i,o]=[o,i],s=2),n.copysign(1,o)<0&&(o=-o,++s),a=Math.atan2(i,o)/this.degree,s){case 1:a=n.copysign(180,i)-a;break;case 2:a=90-a;break;case 3:a=-90+a;break}return a}}(t.Math),function(n,i){n.Accumulator=function(o){this.Set(o)},n.Accumulator.prototype.Set=function(o){o||(o=0),o.constructor===n.Accumulator?(this._s=o._s,this._t=o._t):(this._s=o,this._t=0)},n.Accumulator.prototype.Add=function(o){var s=i.sum(o,this._t),a=i.sum(s.s,this._s);s=s.t,this._s=a.s,this._t=a.t,this._s===0?this._s=s:this._t+=s},n.Accumulator.prototype.Sum=function(o){var s;return o?(s=new n.Accumulator(this),s.Add(o),s._s):this._s},n.Accumulator.prototype.Negate=function(){this._s*=-1,this._t*=-1},n.Accumulator.prototype.Remainder=function(o){this._s=i.remainder(this._s,o),this.Add(0)}}(t.Accumulator,t.Math),t.Geodesic={},t.GeodesicLine={},t.PolygonArea={},function(n,i,o,s,a){var c=6,f=c,m=c,p=c,g=p,w,_,y=20,h=y+s.digits+10,d=s.epsilon,u=200*d,l=Math.sqrt(d),v=d,b=1e3*l,E=0,S=31,P=32640,C,x,O,I,N,T,R,A,B;n.tiny_=Math.sqrt(Number.MIN_VALUE/Number.EPSILON),n.nC1_=c,n.nC1p_=c,n.nC2_=c,n.nC3_=c,n.nC4_=c,w=n.nC3_*(n.nC3_-1)/2,_=n.nC4_*(n.nC4_+1)/2,n.CAP_C1=1,n.CAP_C1p=2,n.CAP_C2=4,n.CAP_C3=8,n.CAP_C4=16,n.NONE=0,n.ARC=64,n.LATITUDE=128|E,n.LONGITUDE=256|n.CAP_C3,n.AZIMUTH=512|E,n.DISTANCE=1024|n.CAP_C1,n.STANDARD=n.LATITUDE|n.LONGITUDE|n.AZIMUTH|n.DISTANCE,n.DISTANCE_IN=2048|n.CAP_C1|n.CAP_C1p,n.REDUCEDLENGTH=4096|n.CAP_C1|n.CAP_C2,n.GEODESICSCALE=8192|n.CAP_C1|n.CAP_C2,n.AREA=16384|n.CAP_C4,n.ALL=P|S,n.LONG_UNROLL=32768,n.OUT_MASK=P|n.LONG_UNROLL,n.SinCosSeries=function(k,z,j,L){var F=L.length,G=F-(k?1:0),W=2*(j-z)*(j+z),V=G&1?L[--F]:0,U=0;for(G=Math.floor(G/2);G--;)U=W*V-U+L[--F],V=W*U-V+L[--F];return k?2*z*j*V:j*(V-U)},C=function(k,z){var j,L=s.sq(k),F=s.sq(z),G=(L+F-1)/6,W,V,U,q,J,Y,re,oe,te,me,be;return F===0&&G<=0?j=0:(W=L*F/4,V=s.sq(G),U=G*V,q=W*(W+2*U),J=G,q>=0?(Y=W+U,Y+=Y<0?-Math.sqrt(q):Math.sqrt(q),re=s.cbrt(Y),J+=re+(re!==0?V/re:0)):(oe=Math.atan2(Math.sqrt(-q),-(W+U)),J+=2*G*Math.cos(oe/3)),te=Math.sqrt(s.sq(J)+F),me=J<0?F/(te-J):J+te,be=(me-F)/(2*te),j=me/(Math.sqrt(me+s.sq(be))+be)),j},x=[1,4,64,0,256],n.A1m1f=function(k){var z=Math.floor(f/2),j=s.polyval(z,x,0,s.sq(k))/x[z+1];return(j+k)/(1-k)},O=[-1,6,-16,32,-9,64,-128,2048,9,-16,768,3,-5,512,-7,1280,-7,2048],n.C1f=function(k,z){var j=s.sq(k),L=k,F=0,G,W;for(G=1;G<=n.nC1_;++G)W=Math.floor((n.nC1_-G)/2),z[G]=L*s.polyval(W,O,F,j)/O[F+W+1],F+=W+2,L*=k},I=[205,-432,768,1536,4005,-4736,3840,12288,-225,116,384,-7173,2695,7680,3467,7680,38081,61440],n.C1pf=function(k,z){var j=s.sq(k),L=k,F=0,G,W;for(G=1;G<=n.nC1p_;++G)W=Math.floor((n.nC1p_-G)/2),z[G]=L*s.polyval(W,I,F,j)/I[F+W+1],F+=W+2,L*=k},N=[-11,-28,-192,0,256],n.A2m1f=function(k){var z=Math.floor(m/2),j=s.polyval(z,N,0,s.sq(k))/N[z+1];return(j-k)/(1+k)},T=[1,2,16,32,35,64,384,2048,15,80,768,7,35,512,63,1280,77,2048],n.C2f=function(k,z){var j=s.sq(k),L=k,F=0,G,W;for(G=1;G<=n.nC2_;++G)W=Math.floor((n.nC2_-G)/2),z[G]=L*s.polyval(W,T,F,j)/T[F+W+1],F+=W+2,L*=k},n.Geodesic=function(k,z){if(this.a=k,this.f=z,this._f1=1-this.f,this._e2=this.f*(2-this.f),this._ep2=this._e2/s.sq(this._f1),this._n=this.f/(2-this.f),this._b=this.a*this._f1,this._c2=(s.sq(this.a)+s.sq(this._b)*(this._e2===0?1:(this._e2>0?s.atanh(Math.sqrt(this._e2)):Math.atan(Math.sqrt(-this._e2)))/Math.sqrt(Math.abs(this._e2))))/2,this._etol2=.1*l/Math.sqrt(Math.max(.001,Math.abs(this.f))*Math.min(1,1-this.f/2)/2),!(isFinite(this.a)&&this.a>0))throw new Error("Equatorial radius is not positive");if(!(isFinite(this._b)&&this._b>0))throw new Error("Polar semi-axis is not positive");this._A3x=new Array(g),this._C3x=new Array(w),this._C4x=new Array(_),this.A3coeff(),this.C3coeff(),this.C4coeff()},R=[-3,128,-2,-3,64,-1,-3,-1,16,3,-1,-2,8,1,-1,2,1,1],n.Geodesic.prototype.A3coeff=function(){var k=0,z=0,j,L;for(j=p-1;j>=0;--j)L=Math.min(p-j-1,j),this._A3x[z++]=s.polyval(L,R,k,this._n)/R[k+L+1],k+=L+2},A=[3,128,2,5,128,-1,3,3,64,-1,0,1,8,-1,1,4,5,256,1,3,128,-3,-2,3,64,1,-3,2,32,7,512,-10,9,384,5,-9,5,192,7,512,-14,7,512,21,2560],n.Geodesic.prototype.C3coeff=function(){var k=0,z=0,j,L,F;for(j=1;j<n.nC3_;++j)for(L=n.nC3_-1;L>=j;--L)F=Math.min(n.nC3_-L-1,L),this._C3x[z++]=s.polyval(F,A,k,this._n)/A[k+F+1],k+=F+2},B=[97,15015,1088,156,45045,-224,-4784,1573,45045,-10656,14144,-4576,-858,45045,64,624,-4576,6864,-3003,15015,100,208,572,3432,-12012,30030,45045,1,9009,-2944,468,135135,5792,1040,-1287,135135,5952,-11648,9152,-2574,135135,-64,-624,4576,-6864,3003,135135,8,10725,1856,-936,225225,-8448,4992,-1144,225225,-1440,4160,-4576,1716,225225,-136,63063,1024,-208,105105,3584,-3328,1144,315315,-128,135135,-2560,832,405405,128,99099],n.Geodesic.prototype.C4coeff=function(){var k=0,z=0,j,L,F;for(j=0;j<n.nC4_;++j)for(L=n.nC4_-1;L>=j;--L)F=n.nC4_-L-1,this._C4x[z++]=s.polyval(F,B,k,this._n)/B[k+F+1],k+=F+2},n.Geodesic.prototype.A3f=function(k){return s.polyval(g-1,this._A3x,0,k)},n.Geodesic.prototype.C3f=function(k,z){var j=1,L=0,F,G;for(F=1;F<n.nC3_;++F)G=n.nC3_-F-1,j*=k,z[F]=j*s.polyval(G,this._C3x,L,k),L+=G+1},n.Geodesic.prototype.C4f=function(k,z){var j=1,L=0,F,G;for(F=0;F<n.nC4_;++F)G=n.nC4_-F-1,z[F]=j*s.polyval(G,this._C4x,L,k),L+=G+1,j*=k},n.Geodesic.prototype.Lengths=function(k,z,j,L,F,G,W,V,U,q,J,Y,re){J&=n.OUT_MASK;var oe={},te=0,me=0,be=0,ne=0,fe,Ce,Te,Ie,ve;if(J&(n.DISTANCE|n.REDUCEDLENGTH|n.GEODESICSCALE)&&(be=n.A1m1f(k),n.C1f(k,Y),J&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(ne=n.A2m1f(k),n.C2f(k,re),te=be-ne,ne=1+ne),be=1+be),J&n.DISTANCE)fe=n.SinCosSeries(!0,G,W,Y)-n.SinCosSeries(!0,j,L,Y),oe.s12b=be*(z+fe),J&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(Ce=n.SinCosSeries(!0,G,W,re)-n.SinCosSeries(!0,j,L,re),me=te*z+(be*fe-ne*Ce));else if(J&(n.REDUCEDLENGTH|n.GEODESICSCALE)){for(Te=1;Te<=n.nC2_;++Te)re[Te]=be*Y[Te]-ne*re[Te];me=te*z+(n.SinCosSeries(!0,G,W,re)-n.SinCosSeries(!0,j,L,re))}return J&n.REDUCEDLENGTH&&(oe.m0=te,oe.m12b=V*(L*G)-F*(j*W)-L*W*me),J&n.GEODESICSCALE&&(Ie=L*W+j*G,ve=this._ep2*(U-q)*(U+q)/(F+V),oe.M12=Ie+(ve*G-W*me)*j/F,oe.M21=Ie-(ve*j-L*me)*G/V),oe},n.Geodesic.prototype.InverseStart=function(k,z,j,L,F,G,W,V,U,q,J){var Y={},re=L*z-F*k,oe=F*z+L*k,te,me,be,ne,fe,Ce,Te,Ie,ve,Ne,Le,Ve,Ye,je,Gt,Gn,ys,tn,We,Or,nr,Jt,ir;return Y.sig12=-1,te=L*z,te+=F*k,me=oe>=0&&re<.5&&F*W<.5,me?(ne=s.sq(k+L),ne/=ne+s.sq(z+F),Y.dnm=Math.sqrt(1+this._ep2*ne),be=W/(this._f1*Y.dnm),fe=Math.sin(be),Ce=Math.cos(be)):(fe=V,Ce=U),Y.salp1=F*fe,Y.calp1=Ce>=0?re+F*k*s.sq(fe)/(1+Ce):te-F*k*s.sq(fe)/(1-Ce),Ie=s.hypot(Y.salp1,Y.calp1),ve=k*L+z*F*Ce,me&&Ie<this._etol2?(Y.salp2=z*fe,Y.calp2=re-z*L*(Ce>=0?s.sq(fe)/(1+Ce):1-Ce),Te=s.hypot(Y.salp2,Y.calp2),Y.salp2/=Te,Y.calp2/=Te,Y.sig12=Math.atan2(Ie,ve)):Math.abs(this._n)>.1||ve>=0||Ie>=6*Math.abs(this._n)*Math.PI*s.sq(z)||(ir=Math.atan2(-V,-U),this.f>=0?(je=s.sq(k)*this._ep2,Gt=je/(2*(1+Math.sqrt(1+je))+je),Ve=this.f*z*this.A3f(Gt)*Math.PI,Ye=Ve*z,Ne=ir/Ve,Le=te/Ye):(Gn=F*z-L*k,ys=Math.atan2(te,Gn),Or=this.Lengths(this._n,Math.PI+ys,k,-z,j,L,F,G,z,F,n.REDUCEDLENGTH,q,J),tn=Or.m12b,We=Or.m0,Ne=-1+tn/(z*F*We*Math.PI),Ye=Ne<-.01?te/Ne:-this.f*s.sq(z)*Math.PI,Ve=Ye/z,Le=W/Ve),Le>-u&&Ne>-1-b?this.f>=0?(Y.salp1=Math.min(1,-Ne),Y.calp1=-Math.sqrt(1-s.sq(Y.salp1))):(Y.calp1=Math.max(Ne>-u?0:-1,Ne),Y.salp1=Math.sqrt(1-s.sq(Y.calp1))):(nr=C(Ne,Le),Jt=Ve*(this.f>=0?-Ne*nr/(1+nr):-Le*(1+nr)/nr),fe=Math.sin(Jt),Ce=-Math.cos(Jt),Y.salp1=F*fe,Y.calp1=te-F*k*s.sq(fe)/(1-Ce))),Y.salp1<=0?(Y.salp1=1,Y.calp1=0):(Te=s.hypot(Y.salp1,Y.calp1),Y.salp1/=Te,Y.calp1/=Te),Y},n.Geodesic.prototype.Lambda12=function(k,z,j,L,F,G,W,V,U,q,J,Y,re,oe){var te={},me,be,ne,fe,Ce,Te,Ie,ve,Ne,Le,Ve,Ye,je;return k===0&&V===0&&(V=-n.tiny_),be=W*z,ne=s.hypot(V,W*k),te.ssig1=k,fe=be*k,te.csig1=Ce=V*z,me=s.hypot(te.ssig1,te.csig1),te.ssig1/=me,te.csig1/=me,te.salp2=F!==z?be/F:W,te.calp2=F!==z||Math.abs(L)!==-k?Math.sqrt(s.sq(V*z)+(z<-k?(F-z)*(z+F):(k-L)*(k+L)))/F:Math.abs(V),te.ssig2=L,Te=be*L,te.csig2=Ie=te.calp2*F,me=s.hypot(te.ssig2,te.csig2),te.ssig2/=me,te.csig2/=me,te.sig12=Math.atan2(Math.max(0,te.csig1*te.ssig2-te.ssig1*te.csig2),te.csig1*te.csig2+te.ssig1*te.ssig2),ve=Math.max(0,Ce*Te-fe*Ie),Ne=Ce*Ie+fe*Te,Ve=Math.atan2(ve*q-Ne*U,Ne*q+ve*U),Ye=s.sq(ne)*this._ep2,te.eps=Ye/(2*(1+Math.sqrt(1+Ye))+Ye),this.C3f(te.eps,oe),Le=n.SinCosSeries(!0,te.ssig2,te.csig2,oe)-n.SinCosSeries(!0,te.ssig1,te.csig1,oe),te.domg12=-this.f*this.A3f(te.eps)*be*(te.sig12+Le),te.lam12=Ve+te.domg12,J&&(te.calp2===0?te.dlam12=-2*this._f1*j/k:(je=this.Lengths(te.eps,te.sig12,te.ssig1,te.csig1,j,te.ssig2,te.csig2,G,z,F,n.REDUCEDLENGTH,Y,re),te.dlam12=je.m12b,te.dlam12*=this._f1/(te.calp2*F))),te},n.Geodesic.prototype.Inverse=function(k,z,j,L,F){var G,W;return F||(F=n.STANDARD),F===n.LONG_UNROLL&&(F|=n.STANDARD),F&=n.OUT_MASK,G=this.InverseInt(k,z,j,L,F),W=G.vals,F&n.AZIMUTH&&(W.azi1=s.atan2d(G.salp1,G.calp1),W.azi2=s.atan2d(G.salp2,G.calp2)),W},n.Geodesic.prototype.InverseInt=function(k,z,j,L,F){var G={},W,V,U,q,J,Y,re,oe,te,me,be,ne,fe,Ce,Te,Ie,ve,Ne,Le,Ve,Ye,je,Gt,Gn,ys,tn,We,Or,nr,Jt,ir,Xu,jo,li,ko,Yu,Fi,ji,Js,of,Wd,Wl,qd,af,Hd,Xd,Yd,a0,Jd,uf,Kd,lf,u0,cf,l0,c0,qc,hf,Hc,Qd,$d,ff,df,Zd,ep;if(G.lat1=k=s.LatFix(k),G.lat2=j=s.LatFix(j),k=s.AngRound(k),j=s.AngRound(j),W=s.AngDiff(z,L),V=W.e,W=W.d,F&n.LONG_UNROLL?(G.lon1=z,G.lon2=z+W+V):(G.lon1=s.AngNormalize(z),G.lon2=s.AngNormalize(L)),U=s.copysign(1,W),W*=U,V*=U,Te=W*s.degree,q=s.sincosde(W,V),Ie=q.s,ve=q.c,V=180-W-V,J=Math.abs(k)<Math.abs(j)||isNaN(j)?-1:1,J<0&&(U*=-1,[j,k]=[k,j]),Y=s.copysign(1,-k),k*=Y,j*=Y,q=s.sincosd(k),re=this._f1*q.s,oe=q.c,q=s.hypot(re,oe),re/=q,oe/=q,oe=Math.max(n.tiny_,oe),q=s.sincosd(j),te=this._f1*q.s,me=q.c,q=s.hypot(te,me),te/=q,me/=q,me=Math.max(n.tiny_,me),oe<-re?me===oe&&(te=s.copysign(re,te)):Math.abs(te)===-re&&(me=oe),fe=Math.sqrt(1+this._ep2*s.sq(re)),Ce=Math.sqrt(1+this._ep2*s.sq(te)),Gt=new Array(n.nC1_+1),Gn=new Array(n.nC2_+1),ys=new Array(n.nC3_),tn=k===-90||Ie===0,tn&&(Le=ve,Ve=Ie,Ye=1,je=0,Or=re,nr=Le*oe,Jt=te,ir=Ye*me,Ne=Math.atan2(Math.max(0,nr*Jt-Or*ir),nr*ir+Or*Jt),We=this.Lengths(this._n,Ne,Or,nr,fe,Jt,ir,Ce,oe,me,F|n.DISTANCE|n.REDUCEDLENGTH,Gt,Gn),be=We.s12b,ne=We.m12b,F&n.GEODESICSCALE&&(G.M12=We.M12,G.M21=We.M21),Ne<1||ne>=0?((Ne<3*n.tiny_||Ne<d&&(be<0||ne<0))&&(Ne=ne=be=0),ne*=this._b,be*=this._b,G.a12=Ne/s.degree):tn=!1),qc=2,!tn&&re===0&&(this.f<=0||V>=this.f*180))Le=Ye=0,Ve=je=1,be=this.a*Te,Ne=jo=Te/this._f1,ne=this._b*Math.sin(Ne),F&n.GEODESICSCALE&&(G.M12=G.M21=Math.cos(Ne)),G.a12=W/this._f1;else if(!tn)if(We=this.InverseStart(re,oe,fe,te,me,Ce,Te,Ie,ve,Gt,Gn),Ne=We.sig12,Ve=We.salp1,Le=We.calp1,Ne>=0)je=We.salp2,Ye=We.calp2,li=We.dnm,be=Ne*this._b*li,ne=s.sq(li)*this._b*Math.sin(Ne/li),F&n.GEODESICSCALE&&(G.M12=G.M21=Math.cos(Ne/li)),G.a12=Ne/s.degree,jo=Te/(this._f1*li);else{for(ko=0,Yu=n.tiny_,Fi=1,ji=n.tiny_,Js=-1,of=!1,Wd=!1;We=this.Lambda12(re,oe,fe,te,me,Ce,Ve,Le,Ie,ve,ko<y,Gt,Gn,ys),Wl=We.lam12,je=We.salp2,Ye=We.calp2,Ne=We.sig12,Or=We.ssig1,nr=We.csig1,Jt=We.ssig2,ir=We.csig2,Xu=We.eps,Hc=We.domg12,qd=We.dlam12,!(Wd||!(Math.abs(Wl)>=(of?8:1)*d)||ko==h);++ko){if(Wl>0&&(ko<y||Le/Ve>Js/ji)?(ji=Ve,Js=Le):Wl<0&&(ko<y||Le/Ve<Fi/Yu)&&(Yu=Ve,Fi=Le),ko<y&&qd>0&&(af=-Wl/qd,Math.abs(af)<Math.PI&&(Hd=Math.sin(af),Xd=Math.cos(af),Yd=Ve*Xd+Le*Hd,Yd>0))){Le=Le*Xd-Ve*Hd,Ve=Yd,q=s.hypot(Ve,Le),Ve/=q,Le/=q,of=Math.abs(Wl)<=16*d;continue}Ve=(Yu+ji)/2,Le=(Fi+Js)/2,q=s.hypot(Ve,Le),Ve/=q,Le/=q,of=!1,Wd=Math.abs(Yu-Ve)+(Fi-Le)<v||Math.abs(Ve-ji)+(Le-Js)<v}a0=F|(F&(n.REDUCEDLENGTH|n.GEODESICSCALE)?n.DISTANCE:n.NONE),We=this.Lengths(Xu,Ne,Or,nr,fe,Jt,ir,Ce,oe,me,a0,Gt,Gn),be=We.s12b,ne=We.m12b,F&n.GEODESICSCALE&&(G.M12=We.M12,G.M21=We.M21),ne*=this._b,be*=this._b,G.a12=Ne/s.degree,F&n.AREA&&(Zd=Math.sin(Hc),ep=Math.cos(Hc),qc=Ie*ep-ve*Zd,hf=ve*ep+Ie*Zd)}return F&n.DISTANCE&&(G.s12=0+be),F&n.REDUCEDLENGTH&&(G.m12=0+ne),F&n.AREA&&(Jd=Ve*oe,uf=s.hypot(Le,Ve*re),uf!==0&&Jd!==0?(Or=re,nr=Le*oe,Jt=te,ir=Ye*me,lf=s.sq(uf)*this._ep2,Xu=lf/(2*(1+Math.sqrt(1+lf))+lf),u0=s.sq(this.a)*uf*Jd*this._e2,q=s.hypot(Or,nr),Or/=q,nr/=q,q=s.hypot(Jt,ir),Jt/=q,ir/=q,cf=new Array(n.nC4_),this.C4f(Xu,cf),l0=n.SinCosSeries(!1,Or,nr,cf),c0=n.SinCosSeries(!1,Jt,ir,cf),G.S12=u0*(c0-l0)):G.S12=0,!tn&&qc==2&&(qc=Math.sin(jo),hf=Math.cos(jo)),!tn&&hf>-.7071&&te-re<1.75?(Hc=1+hf,Qd=1+oe,$d=1+me,Kd=2*Math.atan2(qc*(re*$d+te*Qd),Hc*(re*te+Qd*$d))):(ff=je*Le-Ye*Ve,df=Ye*Le+je*Ve,ff===0&&df<0&&(ff=n.tiny_*Le,df=-1),Kd=Math.atan2(ff,df)),G.S12+=this._c2*Kd,G.S12*=J*U*Y,G.S12+=0),J<0&&([je,Ve]=[Ve,je],[Ye,Le]=[Le,Ye],F&n.GEODESICSCALE&&([G.M21,G.M12]=[G.M12,G.M21])),Ve*=J*U,Le*=J*Y,je*=J*U,Ye*=J*Y,{vals:G,salp1:Ve,calp1:Le,salp2:je,calp2:Ye}},n.Geodesic.prototype.GenDirect=function(k,z,j,L,F,G){var W;return G?G===n.LONG_UNROLL&&(G|=n.STANDARD):G=n.STANDARD,L||(G|=n.DISTANCE_IN),W=new i.GeodesicLine(this,k,z,j,G),W.GenPosition(L,F,G)},n.Geodesic.prototype.Direct=function(k,z,j,L,F){return this.GenDirect(k,z,j,!1,L,F)},n.Geodesic.prototype.ArcDirect=function(k,z,j,L,F){return this.GenDirect(k,z,j,!0,L,F)},n.Geodesic.prototype.Line=function(k,z,j,L){return new i.GeodesicLine(this,k,z,j,L)},n.Geodesic.prototype.DirectLine=function(k,z,j,L,F){return this.GenDirectLine(k,z,j,!1,L,F)},n.Geodesic.prototype.ArcDirectLine=function(k,z,j,L,F){return this.GenDirectLine(k,z,j,!0,L,F)},n.Geodesic.prototype.GenDirectLine=function(k,z,j,L,F,G){var W;return G||(G=n.STANDARD|n.DISTANCE_IN),L||(G|=n.DISTANCE_IN),W=new i.GeodesicLine(this,k,z,j,G),W.GenSetDistance(L,F),W},n.Geodesic.prototype.InverseLine=function(k,z,j,L,F){var G,W,V;return F||(F=n.STANDARD|n.DISTANCE_IN),G=this.InverseInt(k,z,j,L,n.ARC),V=s.atan2d(G.salp1,G.calp1),F&(n.OUT_MASK&n.DISTANCE_IN)&&(F|=n.DISTANCE),W=new i.GeodesicLine(this,k,z,V,F,G.salp1,G.calp1),W.SetArc(G.vals.a12),W},n.Geodesic.prototype.Polygon=function(k){return new o.PolygonArea(this,k)},n.WGS84=new n.Geodesic(a.WGS84.a,a.WGS84.f)}(t.Geodesic,t.GeodesicLine,t.PolygonArea,t.Math,t.Constants),function(n,i,o){i.GeodesicLine=function(s,a,c,f,m,p,g){var w,_,y,h,d,u;m||(m=n.STANDARD|n.DISTANCE_IN),this.a=s.a,this.f=s.f,this._b=s._b,this._c2=s._c2,this._f1=s._f1,this.caps=m|n.LATITUDE|n.AZIMUTH|n.LONG_UNROLL,this.lat1=o.LatFix(a),this.lon1=c,typeof p>"u"||typeof g>"u"?(this.azi1=o.AngNormalize(f),w=o.sincosd(o.AngRound(this.azi1)),this.salp1=w.s,this.calp1=w.c):(this.azi1=f,this.salp1=p,this.calp1=g),w=o.sincosd(o.AngRound(this.lat1)),y=this._f1*w.s,_=w.c,w=o.hypot(y,_),y/=w,_/=w,_=Math.max(n.tiny_,_),this._dn1=Math.sqrt(1+s._ep2*o.sq(y)),this._salp0=this.salp1*_,this._calp0=o.hypot(this.calp1,this.salp1*y),this._ssig1=y,this._somg1=this._salp0*y,this._csig1=this._comg1=y!==0||this.calp1!==0?_*this.calp1:1,w=o.hypot(this._ssig1,this._csig1),this._ssig1/=w,this._csig1/=w,this._k2=o.sq(this._calp0)*s._ep2,h=this._k2/(2*(1+Math.sqrt(1+this._k2))+this._k2),this.caps&n.CAP_C1&&(this._A1m1=n.A1m1f(h),this._C1a=new Array(n.nC1_+1),n.C1f(h,this._C1a),this._B11=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C1a),d=Math.sin(this._B11),u=Math.cos(this._B11),this._stau1=this._ssig1*u+this._csig1*d,this._ctau1=this._csig1*u-this._ssig1*d),this.caps&n.CAP_C1p&&(this._C1pa=new Array(n.nC1p_+1),n.C1pf(h,this._C1pa)),this.caps&n.CAP_C2&&(this._A2m1=n.A2m1f(h),this._C2a=new Array(n.nC2_+1),n.C2f(h,this._C2a),this._B21=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C2a)),this.caps&n.CAP_C3&&(this._C3a=new Array(n.nC3_),s.C3f(h,this._C3a),this._A3c=-this.f*this._salp0*s.A3f(h),this._B31=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C3a)),this.caps&n.CAP_C4&&(this._C4a=new Array(n.nC4_),s.C4f(h,this._C4a),this._A4=o.sq(this.a)*this._calp0*this._salp0*s._e2,this._B41=n.SinCosSeries(!1,this._ssig1,this._csig1,this._C4a)),this.a13=this.s13=NaN},i.GeodesicLine.prototype.GenPosition=function(s,a,c){var f={},m,p,g,w,_,y,h,d,u,l,v,b,E,S,P,C,x,O,I,N,T,R,A,B,k,z,j,L,F;return c?c===n.LONG_UNROLL&&(c|=n.STANDARD):c=n.STANDARD,c&=this.caps&n.OUT_MASK,f.lat1=this.lat1,f.azi1=this.azi1,f.lon1=c&n.LONG_UNROLL?this.lon1:o.AngNormalize(this.lon1),s?f.a12=a:f.s12=a,s||this.caps&n.DISTANCE_IN&n.OUT_MASK?(w=0,_=0,s?(m=a*o.degree,z=o.sincosd(a),p=z.s,g=z.c):(d=a/(this._b*(1+this._A1m1)),u=Math.sin(d),l=Math.cos(d),w=-n.SinCosSeries(!0,this._stau1*l+this._ctau1*u,this._ctau1*l-this._stau1*u,this._C1pa),m=d-(w-this._B11),p=Math.sin(m),g=Math.cos(m),Math.abs(this.f)>.01&&(y=this._ssig1*g+this._csig1*p,h=this._csig1*g-this._ssig1*p,w=n.SinCosSeries(!0,y,h,this._C1a),v=(1+this._A1m1)*(m+(w-this._B11))-a/this._b,m=m-v/Math.sqrt(1+this._k2*o.sq(y)),p=Math.sin(m),g=Math.cos(m))),y=this._ssig1*g+this._csig1*p,h=this._csig1*g-this._ssig1*p,R=Math.sqrt(1+this._k2*o.sq(y)),c&(n.DISTANCE|n.REDUCEDLENGTH|n.GEODESICSCALE)&&((s||Math.abs(this.f)>.01)&&(w=n.SinCosSeries(!0,y,h,this._C1a)),_=(1+this._A1m1)*(w-this._B11)),C=this._calp0*y,x=o.hypot(this._salp0,this._calp0*h),x===0&&(x=h=n.tiny_),N=this._salp0,T=this._calp0*h,s&&c&n.DISTANCE&&(f.s12=this._b*((1+this._A1m1)*m+_)),c&n.LONGITUDE&&(O=this._salp0*y,I=h,P=o.copysign(1,this._salp0),b=c&n.LONG_UNROLL?P*(m-(Math.atan2(y,h)-Math.atan2(this._ssig1,this._csig1))+(Math.atan2(P*O,I)-Math.atan2(P*this._somg1,this._comg1))):Math.atan2(O*this._comg1-I*this._somg1,I*this._comg1+O*this._somg1),E=b+this._A3c*(m+(n.SinCosSeries(!0,y,h,this._C3a)-this._B31)),S=E/o.degree,f.lon2=c&n.LONG_UNROLL?this.lon1+S:o.AngNormalize(o.AngNormalize(this.lon1)+o.AngNormalize(S))),c&n.LATITUDE&&(f.lat2=o.atan2d(C,this._f1*x)),c&n.AZIMUTH&&(f.azi2=o.atan2d(N,T)),c&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(A=n.SinCosSeries(!0,y,h,this._C2a),B=(1+this._A2m1)*(A-this._B21),k=(this._A1m1-this._A2m1)*m+(_-B),c&n.REDUCEDLENGTH&&(f.m12=this._b*(R*(this._csig1*y)-this._dn1*(this._ssig1*h)-this._csig1*h*k)),c&n.GEODESICSCALE&&(z=this._k2*(y-this._ssig1)*(y+this._ssig1)/(this._dn1+R),f.M12=g+(z*y-h*k)*this._ssig1/this._dn1,f.M21=g-(z*this._ssig1-this._csig1*k)*y/R)),c&n.AREA&&(j=n.SinCosSeries(!1,y,h,this._C4a),this._calp0===0||this._salp0===0?(L=N*this.calp1-T*this.salp1,F=T*this.calp1+N*this.salp1):(L=this._calp0*this._salp0*(g<=0?this._csig1*(1-g)+p*this._ssig1:p*(this._csig1*p/(1+g)+this._ssig1)),F=o.sq(this._salp0)+o.sq(this._calp0)*this._csig1*h),f.S12=this._c2*Math.atan2(L,F)+this._A4*(j-this._B41)),s||(f.a12=m/o.degree),f):(f.a12=NaN,f)},i.GeodesicLine.prototype.Position=function(s,a){return this.GenPosition(!1,s,a)},i.GeodesicLine.prototype.ArcPosition=function(s,a){return this.GenPosition(!0,s,a)},i.GeodesicLine.prototype.GenSetDistance=function(s,a){s?this.SetArc(a):this.SetDistance(a)},i.GeodesicLine.prototype.SetDistance=function(s){var a;this.s13=s,a=this.GenPosition(!1,this.s13,n.ARC),this.a13=0+a.a12},i.GeodesicLine.prototype.SetArc=function(s){var a;this.a13=s,a=this.GenPosition(!0,this.a13,n.DISTANCE),this.s13=0+a.s12}}(t.Geodesic,t.GeodesicLine,t.Math),function(n,i,o,s){var a,c,f,m;a=function(p,g){var w=o.AngDiff(p,g).d;return p=o.AngNormalize(p),g=o.AngNormalize(g),w>0&&(p<0&&g>=0||p>0&&g===0)?1:w<0&&p>=0&&g<0?-1:0},c=function(p,g){return p=p%720,g=g%720,(0<=g&&g<360||g<-360?0:1)-(0<=p&&p<360||p<-360?0:1)},f=function(p,g,w,_,y){return p.Remainder(g),w&1&&p.Add((p.Sum()<0?1:-1)*g/2),_||p.Negate(),y?p.Sum()>g/2?p.Add(-g):p.Sum()<=-g/2&&p.Add(+g):p.Sum()>=g?p.Add(-g):p.Sum()<0&&p.Add(+g),0+p.Sum()},m=function(p,g,w,_,y){return p=o.remainder(p,g),w&1&&(p+=(p<0?1:-1)*g/2),_||(p*=-1),y?p>g/2?p-=g:p<=-g/2&&(p+=g):p>=g?p-=g:p<0&&(p+=g),0+p},n.PolygonArea=function(p,g){this._geod=p,this.a=this._geod.a,this.f=this._geod.f,this._area0=4*Math.PI*p._c2,this.polyline=g||!1,this._mask=i.LATITUDE|i.LONGITUDE|i.DISTANCE|(this.polyline?i.NONE:i.AREA|i.LONG_UNROLL),this.polyline||(this._areasum=new s.Accumulator(0)),this._perimetersum=new s.Accumulator(0),this.Clear()},n.PolygonArea.prototype.Clear=function(){this.num=0,this._crossings=0,this.polyline||this._areasum.Set(0),this._perimetersum.Set(0),this._lat0=this._lon0=this.lat=this.lon=NaN},n.PolygonArea.prototype.AddPoint=function(p,g){var w;this.num===0?(this._lat0=this.lat=p,this._lon0=this.lon=g):(w=this._geod.Inverse(this.lat,this.lon,p,g,this._mask),this._perimetersum.Add(w.s12),this.polyline||(this._areasum.Add(w.S12),this._crossings+=a(this.lon,g)),this.lat=p,this.lon=g),++this.num},n.PolygonArea.prototype.AddEdge=function(p,g){var w;this.num&&(w=this._geod.Direct(this.lat,this.lon,p,g,this._mask),this._perimetersum.Add(g),this.polyline||(this._areasum.Add(w.S12),this._crossings+=c(this.lon,w.lon2)),this.lat=w.lat2,this.lon=w.lon2),++this.num},n.PolygonArea.prototype.Compute=function(p,g){var w={number:this.num},_,y;return this.num<2?(w.perimeter=0,this.polyline||(w.area=0),w):this.polyline?(w.perimeter=this._perimetersum.Sum(),w):(_=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask),w.perimeter=this._perimetersum.Sum(_.s12),y=new s.Accumulator(this._areasum),y.Add(_.S12),w.area=f(y,this._area0,this._crossings+a(this.lon,this._lon0),p,g),w)},n.PolygonArea.prototype.TestPoint=function(p,g,w,_){var y={number:this.num+1},h,d,u,l;if(this.num===0)return y.perimeter=0,this.polyline||(y.area=0),y;for(y.perimeter=this._perimetersum.Sum(),d=this.polyline?0:this._areasum.Sum(),u=this._crossings,l=0;l<(this.polyline?1:2);++l)h=this._geod.Inverse(l===0?this.lat:p,l===0?this.lon:g,l!==0?this._lat0:p,l!==0?this._lon0:g,this._mask),y.perimeter+=h.s12,this.polyline||(d+=h.S12,u+=a(l===0?this.lon:g,l!==0?this._lon0:g));return this.polyline||(y.area=m(d,this._area0,u,w,_)),y},n.PolygonArea.prototype.TestEdge=function(p,g,w,_){var y={number:this.num?this.num+1:0},h,d,u;return this.num===0||(y.perimeter=this._perimetersum.Sum()+g,this.polyline)||(d=this._areasum.Sum(),u=this._crossings,h=this._geod.Direct(this.lat,this.lon,p,g,this._mask),d+=h.S12,u+=c(this.lon,h.lon2),u+=a(h.lon2,this._lon0),h=this._geod.Inverse(h.lat2,h.lon2,this._lat0,this._lon0,this._mask),y.perimeter+=h.s12,d+=h.S12,y.area=m(d,this._area0,u,w,_)),y}}(t.PolygonArea,t.Geodesic,t.Math,t.Accumulator),e(t)})(function(e){r.exports?r.exports=e:window.geodesic=e})}(Td)),Td.exports}var CP=SP();function xP(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.g=new CP.Geodesic.Geodesic(this.a,this.es/(1+Math.sqrt(1-this.es)))}function OP(r){var e=r.x,t=r.y,n=Math.sin(r.y),i=Math.cos(r.y),o=_e(e-this.long0),s,a,c,f,m,p,g,w,_,y,h,d,u,l,v;return this.sphere?Math.abs(this.sin_p12-1)<=pe?(r.x=this.x0+this.a*(se-t)*Math.sin(o),r.y=this.y0-this.a*(se-t)*Math.cos(o),r):Math.abs(this.sin_p12+1)<=pe?(r.x=this.x0+this.a*(se+t)*Math.sin(o),r.y=this.y0+this.a*(se+t)*Math.cos(o),r):(_=this.sin_p12*n+this.cos_p12*i*Math.cos(o),g=Math.acos(_),w=g?g/Math.sin(g):1,r.x=this.x0+this.a*w*i*Math.sin(o),r.y=this.y0+this.a*w*(this.cos_p12*n-this.sin_p12*i*Math.cos(o)),r):(s=Mc(this.es),a=Ic(this.es),c=Tc(this.es),f=Nc(this.es),Math.abs(this.sin_p12-1)<=pe?(m=this.a*Jr(s,a,c,f,se),p=this.a*Jr(s,a,c,f,t),r.x=this.x0+(m-p)*Math.sin(o),r.y=this.y0-(m-p)*Math.cos(o),r):Math.abs(this.sin_p12+1)<=pe?(m=this.a*Jr(s,a,c,f,se),p=this.a*Jr(s,a,c,f,t),r.x=this.x0+(m+p)*Math.sin(o),r.y=this.y0+(m+p)*Math.cos(o),r):Math.abs(e)<pe&&Math.abs(t-this.lat0)<pe?(r.x=r.y=0,r):(y=this.lat0/pt,h=this.long0/pt,d=t/pt,u=e/pt,l=this.g.Inverse(y,h,d,u,this.g.AZIMUTH),v=l.azi1*pt,r.x=l.s12*Math.sin(v),r.y=l.s12*Math.cos(v),r))}function MP(r){r.x-=this.x0,r.y-=this.y0;var e,t,n,i,o,s,a,c,f,m,p,g,w,_,y,h,d,u;return this.sphere?(e=Math.sqrt(r.x*r.x+r.y*r.y),e>2*se*this.a?void 0:(t=e/this.a,n=Math.sin(t),i=Math.cos(t),o=this.long0,Math.abs(e)<=pe?s=this.lat0:(s=wo(i*this.sin_p12+r.y*n*this.cos_p12/e),a=Math.abs(this.lat0)-se,Math.abs(a)<=pe?this.lat0>=0?o=_e(this.long0+Math.atan2(r.x,-r.y)):o=_e(this.long0-Math.atan2(-r.x,r.y)):o=_e(this.long0+Math.atan2(r.x*n,e*this.cos_p12*i-r.y*this.sin_p12*n))),r.x=o,r.y=s,r)):(c=Mc(this.es),f=Ic(this.es),m=Tc(this.es),p=Nc(this.es),Math.abs(this.sin_p12-1)<=pe?(g=this.a*Jr(c,f,m,p,se),e=Math.sqrt(r.x*r.x+r.y*r.y),w=g-e,s=Yh(w/this.a,c,f,m,p),o=_e(this.long0+Math.atan2(r.x,-1*r.y)),r.x=o,r.y=s,r):Math.abs(this.sin_p12+1)<=pe?(g=this.a*Jr(c,f,m,p,se),e=Math.sqrt(r.x*r.x+r.y*r.y),w=e-g,s=Yh(w/this.a,c,f,m,p),o=_e(this.long0+Math.atan2(r.x,r.y)),r.x=o,r.y=s,r):(_=this.lat0/pt,y=this.long0/pt,h=Math.atan2(r.x,r.y)/pt,d=Math.sqrt(r.x*r.x+r.y*r.y),u=this.g.Direct(_,y,h,d,this.g.STANDARD),r.x=u.lon2*pt,r.y=u.lat2*pt,r))}var IP=["Azimuthal_Equidistant","aeqd"];const TP={init:xP,forward:OP,inverse:MP,names:IP};function NP(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function DP(r){var e,t,n,i,o,s,a,c,f=r.x,m=r.y;return n=_e(f-this.long0),e=Math.sin(m),t=Math.cos(m),i=Math.cos(n),s=this.sin_p14*e+this.cos_p14*t*i,o=1,(s>0||Math.abs(s)<=pe)&&(a=this.a*o*t*Math.sin(n),c=this.y0+this.a*o*(this.cos_p14*e-this.sin_p14*t*i)),r.x=a,r.y=c,r}function AP(r){var e,t,n,i,o,s,a;return r.x-=this.x0,r.y-=this.y0,e=Math.sqrt(r.x*r.x+r.y*r.y),t=wo(e/this.a),n=Math.sin(t),i=Math.cos(t),s=this.long0,Math.abs(e)<=pe?(a=this.lat0,r.x=s,r.y=a,r):(a=wo(i*this.sin_p14+r.y*n*this.cos_p14/e),o=Math.abs(this.lat0)-se,Math.abs(o)<=pe?(this.lat0>=0?s=_e(this.long0+Math.atan2(r.x,-r.y)):s=_e(this.long0-Math.atan2(-r.x,r.y)),r.x=s,r.y=a,r):(s=_e(this.long0+Math.atan2(r.x*n,e*this.cos_p14*i-r.y*this.sin_p14*n)),r.x=s,r.y=a,r))}var RP=["ortho"];const LP={init:NP,forward:DP,inverse:AP,names:RP};var At={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},st={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function FP(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=se-it/2?this.face=At.TOP:this.lat0<=-(se-it/2)?this.face=At.BOTTOM:Math.abs(this.long0)<=it?this.face=At.FRONT:Math.abs(this.long0)<=se+it?this.face=this.long0>0?At.RIGHT:At.LEFT:this.face=At.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function jP(r){var e={x:0,y:0},t,n,i,o,s,a,c={value:0};if(r.x-=this.long0,this.es!==0?t=Math.atan(this.one_minus_f_squared*Math.tan(r.y)):t=r.y,n=r.x,this.face===At.TOP)o=se-t,n>=it&&n<=se+it?(c.value=st.AREA_0,i=n-se):n>se+it||n<=-(se+it)?(c.value=st.AREA_1,i=n>0?n-br:n+br):n>-(se+it)&&n<=-it?(c.value=st.AREA_2,i=n+se):(c.value=st.AREA_3,i=n);else if(this.face===At.BOTTOM)o=se+t,n>=it&&n<=se+it?(c.value=st.AREA_0,i=-n+se):n<it&&n>=-it?(c.value=st.AREA_1,i=-n):n<-it&&n>=-(se+it)?(c.value=st.AREA_2,i=-n-se):(c.value=st.AREA_3,i=n>0?-n+br:-n-br);else{var f,m,p,g,w,_,y;this.face===At.RIGHT?n=Rl(n,+se):this.face===At.BACK?n=Rl(n,3.14159265359):this.face===At.LEFT&&(n=Rl(n,-se)),g=Math.sin(t),w=Math.cos(t),_=Math.sin(n),y=Math.cos(n),f=w*y,m=w*_,p=g,this.face===At.FRONT?(o=Math.acos(f),i=Jh(o,p,m,c)):this.face===At.RIGHT?(o=Math.acos(m),i=Jh(o,p,-f,c)):this.face===At.BACK?(o=Math.acos(-f),i=Jh(o,p,-m,c)):this.face===At.LEFT?(o=Math.acos(-m),i=Jh(o,p,f,c)):(o=i=0,c.value=st.AREA_0)}return a=Math.atan(12/br*(i+Math.acos(Math.sin(i)*Math.cos(it))-se)),s=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(i))))),c.value===st.AREA_1?a+=se:c.value===st.AREA_2?a+=br:c.value===st.AREA_3&&(a+=1.5*br),e.x=s*Math.cos(a),e.y=s*Math.sin(a),e.x=e.x*this.a+this.x0,e.y=e.y*this.a+this.y0,r.x=e.x,r.y=e.y,r}function kP(r){var e={lam:0,phi:0},t,n,i,o,s,a,c,f,m,p={value:0};if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,n=Math.atan(Math.sqrt(r.x*r.x+r.y*r.y)),t=Math.atan2(r.y,r.x),r.x>=0&&r.x>=Math.abs(r.y)?p.value=st.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(p.value=st.AREA_1,t-=se):r.x<0&&-r.x>=Math.abs(r.y)?(p.value=st.AREA_2,t=t<0?t+br:t-br):(p.value=st.AREA_3,t+=se),m=br/12*Math.tan(t),s=Math.sin(m)/(Math.cos(m)-1/Math.sqrt(2)),a=Math.atan(s),i=Math.cos(t),o=Math.tan(n),c=1-i*i*o*o*(1-Math.cos(Math.atan(1/Math.cos(a)))),c<-1?c=-1:c>1&&(c=1),this.face===At.TOP)f=Math.acos(c),e.phi=se-f,p.value===st.AREA_0?e.lam=a+se:p.value===st.AREA_1?e.lam=a<0?a+br:a-br:p.value===st.AREA_2?e.lam=a-se:e.lam=a;else if(this.face===At.BOTTOM)f=Math.acos(c),e.phi=f-se,p.value===st.AREA_0?e.lam=-a+se:p.value===st.AREA_1?e.lam=-a:p.value===st.AREA_2?e.lam=-a-se:e.lam=a<0?-a-br:-a+br;else{var g,w,_;g=c,m=g*g,m>=1?_=0:_=Math.sqrt(1-m)*Math.sin(a),m+=_*_,m>=1?w=0:w=Math.sqrt(1-m),p.value===st.AREA_1?(m=w,w=-_,_=m):p.value===st.AREA_2?(w=-w,_=-_):p.value===st.AREA_3&&(m=w,w=_,_=-m),this.face===At.RIGHT?(m=g,g=-w,w=m):this.face===At.BACK?(g=-g,w=-w):this.face===At.LEFT&&(m=g,g=w,w=-m),e.phi=Math.acos(-_)-se,e.lam=Math.atan2(w,g),this.face===At.RIGHT?e.lam=Rl(e.lam,-se):this.face===At.BACK?e.lam=Rl(e.lam,-3.14159265359):this.face===At.LEFT&&(e.lam=Rl(e.lam,+se))}if(this.es!==0){var y,h,d;y=e.phi<0?1:0,h=Math.tan(e.phi),d=this.b/Math.sqrt(h*h+this.one_minus_f_squared),e.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),y&&(e.phi=-e.phi)}return e.lam+=this.long0,r.x=e.lam,r.y=e.phi,r}function Jh(r,e,t,n){var i;return r<pe?(n.value=st.AREA_0,i=0):(i=Math.atan2(e,t),Math.abs(i)<=it?n.value=st.AREA_0:i>it&&i<=se+it?(n.value=st.AREA_1,i-=se):i>se+it||i<=-(se+it)?(n.value=st.AREA_2,i=i>=0?i-br:i+br):(n.value=st.AREA_3,i+=se)),i}function Rl(r,e){var t=r+e;return t<-3.14159265359?t+=Ec:t>3.14159265359&&(t-=Ec),t}var GP=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const VP={init:FP,forward:jP,inverse:kP,names:GP};var Nd=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Dc=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],uy=.8487,ly=1.3523,cy=ts/5,BP=1/cy,Ll=18,Kh=function(r,e){return r[0]+e*(r[1]+e*(r[2]+e*r[3]))},zP=function(r,e){return r[1]+e*(2*r[2]+e*3*r[3])};function UP(r,e,t,n){for(var i=e;n;--n){var o=r(i);if(i-=o,Math.abs(o)<t)break}return i}function WP(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function qP(r){var e=_e(r.x-this.long0),t=Math.abs(r.y),n=Math.floor(t*cy);n<0?n=0:n>=Ll&&(n=Ll-1),t=ts*(t-BP*n);var i={x:Kh(Nd[n],t)*e,y:Kh(Dc[n],t)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*uy+this.x0,i.y=i.y*this.a*ly+this.y0,i}function HP(r){var e={x:(r.x-this.x0)/(this.a*uy),y:Math.abs(r.y-this.y0)/(this.a*ly)};if(e.y>=1)e.x/=Nd[Ll][0],e.y=r.y<0?-se:se;else{var t=Math.floor(e.y*Ll);for(t<0?t=0:t>=Ll&&(t=Ll-1);;)if(Dc[t][0]>e.y)--t;else if(Dc[t+1][0]<=e.y)++t;else break;var n=Dc[t],i=5*(e.y-n[0])/(Dc[t+1][0]-n[0]);i=UP(function(o){return(Kh(n,o)-e.y)/zP(n,o)},i,pe,100),e.x/=Kh(Nd[t],i),e.y=(5*t+i)*pt,r.y<0&&(e.y=-e.y)}return e.x=_e(e.x+this.long0),e}var XP=["Robinson","robin"];const YP={init:WP,forward:qP,inverse:HP,names:XP};function JP(){this.name="geocent"}function KP(r){var e=kv(r,this.es,this.a);return e}function QP(r){var e=Gv(r,this.es,this.a,this.b);return e}var $P=["Geocentric","geocentric","geocent","Geocent"];const ZP={init:JP,forward:KP,inverse:QP,names:$P};var Fr={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Ac={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function eS(){if(Object.keys(Ac).forEach((function(t){if(typeof this[t]>"u")this[t]=Ac[t].def;else{if(Ac[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Ac[t].num&&(this[t]=parseFloat(this[t]))}Ac[t].degrees&&(this[t]=this[t]*pt)}).bind(this)),Math.abs(Math.abs(this.lat0)-se)<pe?this.mode=this.lat0<0?Fr.S_POLE:Fr.N_POLE:Math.abs(this.lat0)<pe?this.mode=Fr.EQUIT:(this.mode=Fr.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var r=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(r),this.sw=Math.sin(r)}function tS(r){r.x-=this.long0;var e=Math.sin(r.y),t=Math.cos(r.y),n=Math.cos(r.x),i,o;switch(this.mode){case Fr.OBLIQ:o=this.sinph0*e+this.cosph0*t*n;break;case Fr.EQUIT:o=t*n;break;case Fr.S_POLE:o=-e;break;case Fr.N_POLE:o=e;break}switch(o=this.pn1/(this.p-o),i=o*t*Math.sin(r.x),this.mode){case Fr.OBLIQ:o*=this.cosph0*e-this.sinph0*t*n;break;case Fr.EQUIT:o*=e;break;case Fr.N_POLE:o*=-(t*n);break;case Fr.S_POLE:o*=t*n;break}var s,a;return s=o*this.cg+i*this.sg,a=1/(s*this.sw*this.h1+this.cw),i=(i*this.cg-o*this.sg)*this.cw*a,o=s*a,r.x=i*this.a,r.y=o*this.a,r}function rS(r){r.x/=this.a,r.y/=this.a;var e={x:r.x,y:r.y},t,n,i;i=1/(this.pn1-r.y*this.sw),t=this.pn1*r.x*i,n=this.pn1*r.y*this.cw*i,r.x=t*this.cg+n*this.sg,r.y=n*this.cg-t*this.sg;var o=pn(r.x,r.y);if(Math.abs(o)<pe)e.x=0,e.y=r.y;else{var s,a;switch(a=1-o*o*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/o+o/this.pn1),s=Math.sqrt(1-a*a),this.mode){case Fr.OBLIQ:e.y=Math.asin(s*this.sinph0+r.y*a*this.cosph0/o),r.y=(s-this.sinph0*Math.sin(e.y))*o,r.x*=a*this.cosph0;break;case Fr.EQUIT:e.y=Math.asin(r.y*a/o),r.y=s*o,r.x*=a;break;case Fr.N_POLE:e.y=Math.asin(s),r.y=-r.y;break;case Fr.S_POLE:e.y=-Math.asin(s);break}e.x=Math.atan2(r.x,r.y)}return r.x=e.x+this.long0,r.y=e.y,r}var nS=["Tilted_Perspective","tpers"];const iS={init:eS,forward:tS,inverse:rS,names:nS};function sS(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var r=1-this.es,e=1/r;this.radius_p=Math.sqrt(r),this.radius_p2=r,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function oS(r){var e=r.x,t=r.y,n,i,o,s;if(e=e-this.long0,this.shape==="ellipse"){t=Math.atan(this.radius_p2*Math.tan(t));var a=this.radius_p/pn(this.radius_p*Math.cos(t),Math.sin(t));if(i=a*Math.cos(e)*Math.cos(t),o=a*Math.sin(e)*Math.cos(t),s=a*Math.sin(t),(this.radius_g-i)*i-o*o-s*s*this.radius_p_inv2<0)return r.x=Number.NaN,r.y=Number.NaN,r;n=this.radius_g-i,this.flip_axis?(r.x=this.radius_g_1*Math.atan(o/pn(s,n)),r.y=this.radius_g_1*Math.atan(s/n)):(r.x=this.radius_g_1*Math.atan(o/n),r.y=this.radius_g_1*Math.atan(s/pn(o,n)))}else this.shape==="sphere"&&(n=Math.cos(t),i=Math.cos(e)*n,o=Math.sin(e)*n,s=Math.sin(t),n=this.radius_g-i,this.flip_axis?(r.x=this.radius_g_1*Math.atan(o/pn(s,n)),r.y=this.radius_g_1*Math.atan(s/n)):(r.x=this.radius_g_1*Math.atan(o/n),r.y=this.radius_g_1*Math.atan(s/pn(o,n))));return r.x=r.x*this.a,r.y=r.y*this.a,r}function aS(r){var e=-1,t=0,n=0,i,o,s,a;if(r.x=r.x/this.a,r.y=r.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(r.y/this.radius_g_1),t=Math.tan(r.x/this.radius_g_1)*pn(1,n)):(t=Math.tan(r.x/this.radius_g_1),n=Math.tan(r.y/this.radius_g_1)*pn(1,t));var c=n/this.radius_p;if(i=t*t+c*c+e*e,o=2*this.radius_g*e,s=o*o-4*i*this.C,s<0)return r.x=Number.NaN,r.y=Number.NaN,r;a=(-o-Math.sqrt(s))/(2*i),e=this.radius_g+a*e,t*=a,n*=a,r.x=Math.atan2(t,e),r.y=Math.atan(n*Math.cos(r.x)/e),r.y=Math.atan(this.radius_p_inv2*Math.tan(r.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(r.y/this.radius_g_1),t=Math.tan(r.x/this.radius_g_1)*Math.sqrt(1+n*n)):(t=Math.tan(r.x/this.radius_g_1),n=Math.tan(r.y/this.radius_g_1)*Math.sqrt(1+t*t)),i=t*t+n*n+e*e,o=2*this.radius_g*e,s=o*o-4*i*this.C,s<0)return r.x=Number.NaN,r.y=Number.NaN,r;a=(-o-Math.sqrt(s))/(2*i),e=this.radius_g+a*e,t*=a,n*=a,r.x=Math.atan2(t,e),r.y=Math.atan(n*Math.cos(r.x)/e)}return r.x=r.x+this.long0,r}var uS=["Geostationary Satellite View","Geostationary_Satellite","geos"];const lS={init:sS,forward:oS,inverse:aS,names:uS};var Rc=1.340264,Lc=-.081106,Fc=893e-6,jc=.003796,Qh=Math.sqrt(3)/2;function cS(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function hS(r){var e=_e(r.x-this.long0),t=r.y,n=Math.asin(Qh*Math.sin(t)),i=n*n,o=i*i*i;return r.x=e*Math.cos(n)/(Qh*(Rc+3*Lc*i+o*(7*Fc+9*jc*i))),r.y=n*(Rc+Lc*i+o*(Fc+jc*i)),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function fS(r){r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a;var e=1e-9,t=12,n=r.y,i,o,s,a,c,f;for(f=0;f<t&&(i=n*n,o=i*i*i,s=n*(Rc+Lc*i+o*(Fc+jc*i))-r.y,a=Rc+3*Lc*i+o*(7*Fc+9*jc*i),n-=c=s/a,!(Math.abs(c)<e));++f);return i=n*n,o=i*i*i,r.x=Qh*r.x*(Rc+3*Lc*i+o*(7*Fc+9*jc*i))/Math.cos(n),r.y=Math.asin(Math.sin(n)/Qh),r.x=_e(r.x+this.long0),r}var dS=["eqearth","Equal Earth","Equal_Earth"];const pS={init:cS,forward:hS,inverse:fS,names:dS};var kc=1e-10;function gS(){var r;if(this.phi1=this.lat1,Math.abs(this.phi1)<kc)throw new Error;this.es?(this.en=Sd(this.es),this.m1=Dl(this.phi1,this.am1=Math.sin(this.phi1),r=Math.cos(this.phi1),this.en),this.am1=r/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=yS,this.forward=vS):(Math.abs(this.phi1)+kc>=se?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=_S,this.forward=mS)}function vS(r){var e=_e(r.x-(this.long0||0)),t=r.y,n,i,o;return n=this.am1+this.m1-Dl(t,i=Math.sin(t),o=Math.cos(t),this.en),i=o*e/(n*Math.sqrt(1-this.es*i*i)),r.x=n*Math.sin(i),r.y=this.am1-n*Math.cos(i),r.x=this.a*r.x+(this.x0||0),r.y=this.a*r.y+(this.y0||0),r}function yS(r){r.x=(r.x-(this.x0||0))/this.a,r.y=(r.y-(this.y0||0))/this.a;var e,t,n,i;if(t=pn(r.x,r.y=this.am1-r.y),i=Cd(this.am1+this.m1-t,this.es,this.en),(e=Math.abs(i))<se)e=Math.sin(i),n=t*Math.atan2(r.x,r.y)*Math.sqrt(1-this.es*e*e)/Math.cos(i);else if(Math.abs(e-se)<=kc)n=0;else throw new Error;return r.x=_e(n+(this.long0||0)),r.y=_o(i),r}function mS(r){var e=_e(r.x-(this.long0||0)),t=r.y,n,i;return i=this.cphi1+this.phi1-t,Math.abs(i)>kc?(r.x=i*Math.sin(n=e*Math.cos(t)/i),r.y=this.cphi1-i*Math.cos(n)):r.x=r.y=0,r.x=this.a*r.x+(this.x0||0),r.y=this.a*r.y+(this.y0||0),r}function _S(r){r.x=(r.x-(this.x0||0))/this.a,r.y=(r.y-(this.y0||0))/this.a;var e,t,n=pn(r.x,r.y=this.cphi1-r.y);if(t=this.cphi1+this.phi1-n,Math.abs(t)>se)throw new Error;return Math.abs(Math.abs(t)-se)<=kc?e=0:e=n*Math.atan2(r.x,r.y)/Math.cos(t),r.x=_e(e+(this.long0||0)),r.y=_o(t),r}var bS=["bonne","Bonne (Werner lat_1=90)"];const wS={init:gS,names:bS};function ES(r){r.Proj.projections.add(Hh),r.Proj.projections.add(Xh),r.Proj.projections.add(gw),r.Proj.projections.add(Sw),r.Proj.projections.add(Tw),r.Proj.projections.add(Lw),r.Proj.projections.add(Bw),r.Proj.projections.add(Hw),r.Proj.projections.add(Qw),r.Proj.projections.add(rE),r.Proj.projections.add(_E),r.Proj.projections.add(CE),r.Proj.projections.add(TE),r.Proj.projections.add(FE),r.Proj.projections.add(BE),r.Proj.projections.add(HE),r.Proj.projections.add(QE),r.Proj.projections.add(rP),r.Proj.projections.add(uP),r.Proj.projections.add(dP),r.Proj.projections.add(mP),r.Proj.projections.add(PP),r.Proj.projections.add(TP),r.Proj.projections.add(LP),r.Proj.projections.add(VP),r.Proj.projections.add(YP),r.Proj.projections.add(ZP),r.Proj.projections.add(iS),r.Proj.projections.add(lS),r.Proj.projections.add(pS),r.Proj.projections.add(wS)}fn.defaultDatum="WGS84",fn.Proj=ns,fn.WGS84=new fn.Proj("WGS84"),fn.Point=Nl,fn.toPoint=Uv,fn.defs=Yr,fn.nadgrid=gb,fn.transform=qh,fn.mgrs=Ab,fn.version="__VERSION__",ES(fn);const hy=fn("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function is(r){return hy.forward(r)}function fy(r){return hy.inverse(r)}const dy=fn("+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 PS(r){const e=dy.forward([r[0],r[1]]);return[e[0],e[1],r[2]]}function SS(r){const e=dy.inverse([r[0],r[1]]);return[e[0],e[1],r[2]]}function py(r,e){const t=is(r),n=is(e);return M.Vector.distance(t,n)}function Fl(r,e){const t=[];do{const n=r.length;let i=0;for(let o=0;o<n-1;++o){if(e===void 0||e==="GEODESIC"){const s=cd(r[o],r[o+1]),a=Math.abs(r[o][2]-r[o+1][2]);if(a===0)i+=s;else{const c=Math.sqrt(s*s+a*a);i+=c}}else if(e==="RHUMB"){const s=fv(r[o],r[o+1]),a=Math.abs(r[o][2]-r[o+1][2]);if(a===0)i+=s;else{const c=Math.sqrt(s*s+a*a);i+=c}}else if(e==="NONE"){const s=py(r[o],r[o+1]);i+=s}else console.warn(`未知的arcType: ${e},导致距离无法计算!`);t.push(i)}}while(!1);return t}function Dd(r){const e="__getXyzFromPostion";let t=M.getExtProp(r,e);return(!t||!M.Vector.equals(t[0],r))&&(t=[[...r],is(r)],M.setExtProp(r,e,t)),t[1]}class gy extends M.Destroyable{constructor(){super();D(this,"_data",this.dv(M.react(void 0)))}set data(t){this._data.value=t}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class vy extends M.Destroyable{constructor(){super(...arguments);D(this,"_dragStartEvent",this.dv(new M.Event));D(this,"_dragOverEvent",this.dv(new M.Event));D(this,"_dragLeaveEvent",this.dv(new M.Event));D(this,"_dropEvent",this.dv(new M.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 CS(r,e){e&&(Reflect.has(e,"editing")?e.editing=!0:Reflect.has(e,"positionEditing")&&(e.positionEditing=!0))}function xS(r){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(r.typeName)||(Reflect.has(r,"editing")?r.editing=!0:Reflect.has(r,"positionEditing")&&(r.positionEditing=!0)),typeof r.execOnCreating=="function"&&r.execOnCreating()}function Gc(r,e){M.getExtProp(r,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),M.setExtProp(r,"__treeItem",e)}function OS(r){return M.getExtProp(r,"__treeItem")}function MS(r){if(!(r.startsWith("./")||r.startsWith("../")||r.startsWith("/")))return r;const e=document.createElement("a");e.href=r;const t=e.href;return e.remove(),t}function IS(r){try{return JSON.parse(r),!0}catch{return!1}}function TS(r){return r instanceof Function?r():r}function yy(r,e){for(let t of r)if(e.includes(t))return!0;return!1}function Rs(r,e){const t=r,n=e;return t===void 0||t.length===0||n===void 0||n.length===0?!0:yy(t,n)}function NS(r){const e=setTimeout(()=>{r(),clearTimeout(e)})}function Vc(r){let e=r%360;return e=e<0?360+e:e,e}function my(r){return Vc(r+180)-180}function $h(r,e,t){let n=Vc(r),i=Vc(e);Math.abs(n-i)>180&&(n<i?n+=360:i+=360);const o=n*(1-t)+i*t;return my(o)}function Ad(r,e,t,n){return n=n||[0,0,0],n[0]=$h(r[0],e[0],t),n[1]=$h(r[1],e[1],t),n[2]=$h(r[2],e[2],t),n}async function _y(r,e,t="editing"){const n=new M.Destroyable;r.ad(n);const i=e.bind(r);let o=r.viewer;if(o||await new Promise(s=>{n.ad(r.viewerChanged.don(a=>{o=a,s()}))}),!o){console.warn("viewer is undefined!,无法绑定编辑");return}return n.ad(r[`${t}Changed`].don(()=>{var s;r[`${t}`]?i():(s=(r.combinationClass?r.getMainClass():r).editingID)!=null&&s.includes("inner")&&o&&o.stopEditing()})),n.ad(o.editingEvent.don(s=>{if(s.objectIDs.includes(r.id)&&s.type==="end"){const a=r.combinationClass?r.getMainClass():r;a.editingID&&s.editingID.includes(a.editingID)?r[`${t}`]=!1:r[`${t}`]=!a.editingID.includes("outer")}})),r[`${t}`]&&i(),n}function by(r){const e=r.children&&M.every(r.children,n=>{if(!(n instanceof jr))throw new Error("!(treeItem instanceof SceneTreeItem)");return!n.show})||!1,t=r.sceneTree.getSceneObjectShowFunc(r.sceneObject);return!e||t}class jr extends M.TreeItem{constructor(t,n=!1,i,o,s=!0){super(t,n,i);D(this,"_dragDrop");D(this,"_showChangedNotAffectChildren",!1);D(this,"_showChangedNotAffectParent",!1);D(this,"_type",this.dv(M.react("Unknown")));D(this,"_isExport",this.dv(M.react(!0)));const a=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(a)),this.name=`未命名条目(${this.id})`,this.extras=o,this._isExport.value=s;let c;const f=()=>{c&&(c(),c=void 0)};this.dispose(f),this.dispose(this.sceneObjectChanged.disposableOn(m=>{f(),m&&(c=M.bind([this,"name"],[m,"name"]))})),this.dispose(this.showChanged.disposableOn(m=>{if(t.setSceneObjectShowFunc(this.sceneObject,m),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let p of this.children)p instanceof jr&&(p._showChangedNotAffectParent=!0,p.show=m,p._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof jr&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=by(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new M.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const m=new M.Destroyable;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof Event){const p=()=>{this.show=t.getSceneObjectShowFunc(this.sceneObject)};p(),m.dispose(this.sceneObject.showChanged.disposableOn(p))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof Event){const p=()=>{this.show=t.getSceneObjectShowFunc(this.sceneObject)};p(),m.dispose(this.sceneObject.enabledChanged.disposableOn(p))}return m})),this.childrenChangedEvent.disposableOn(()=>{const m=by(this);this._showChangedNotAffectChildren=!0,this.show=m,this._showChangedNotAffectChildren=!1});{const m=()=>{let p="Unknown";this.sceneObject?p=this.sceneObject.typeName:this.children&&(p="Folder"),this._type.value=p};this.dispose(this.sceneObjectChanged.disposableOn(m)),this.dispose(this.childrenResetedEvent.disposableOn(m)),m()}}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(n){console.error(`sceneTreeItem.jsonStr error ${n}`,n)}}get json(){const t=this.children&&[...this.children].filter(n=>n.isExport).map(n=>n.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 n of t.children){const i=new jr(this.tree,!0);i.json=n,this.children.push(i)}}}clone(){try{const t=new jr(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,n){if(t==="FolderInnerOrAfter"||t==="FolderInnerOrBefore"||t==="FolderInner"){if(n&&n.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;do{if(!this.children||t.includes("Or")&&this.sceneObject)break;return n&&this.children.push(n),!0}while(!1);if(t==="FolderInner")return!1;if(t==="FolderInnerOrAfter")return super.insertNewTreeItem("After",n);if(t==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",n);throw new Error("should not be here!")}else return super.insertNewTreeItem(t,n)}}(r=>{r.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:M.reactJsonWithUndefined(void 0)})})(jr||(jr={})),M.extendClassProps(jr.prototype,jr.createDefaultProps);class DS extends M.Destroyable{constructor(t){super();D(this,"_jsonLoadingEvent",this.disposeVar(new M.Event));D(this,"_setJsonProcessing",this.disposeVar(M.createProcessingFromAsyncFunc(async(t,n)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),n&&await t.promise(this._sceneTree.preloadFunc(n)),this._setJson(n),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=t,this._setJsonProcessing.errorFunc=n=>{this._jsonLoadingEvent.emit({type:"error",error:n})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(t){try{this._sceneTree.setJson(t||{})}catch(n){console.error(`json数据装配时发生错误!error: ${n}`)}}get json(){return this._sceneTree.getJson()}set json(t){this._setJsonProcessing.restart(new M.CancelError("JSON重新赋值!"),t)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(t){this.json=JSON.parse(t)}}function AS(r,e){const{type:t,id:n}=r;if(t){const i=we.create(t,n);if(i)return i.json=r,i;console.warn(`cannot create sceneObject from type(${t})`)}else console.warn(`cannot create sceneObject from type(${t})`)}function RS(r){let e=!1;do{if(!r)break;"show"in r?e=r.show??!0:"enabled"in r&&(e=r.enabled??!0)}while(!1);return e}function LS(r,e){r&&("show"in r?r.show=e:"enabled"in r&&(r.enabled=e))}function wy(r,e,t){let{offsetY:n}=e;if(!e.target||!("clientTop"in e.target))return"none";n+=2,n+=e.target.clientTop;let i="none";return r.children?n<=t*.3?i="before":n>=t*.7?!r.uiTreeObject.collapsed&&r.children.length>0?i="inner":i="after":i="inner":n<=t*.5?i="before":i="after",i}class Ey extends vy{constructor(e){super(),this._treeItem=e;const{dragStartDataManager:t}=this._treeItem.sceneTree;let n="none";const i=this.disposeVar(M.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=n,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${n});`)},200));function o(s){n!==s&&(n=s,i.restart())}this.dispose(this._dragStartEvent.disposableOn(s=>{t.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(s=>{if(s.dataTransfer){s.preventDefault();do{const a=t;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))break;const c=a.data.value,f=this._treeItem,{tree:m}=f;if(!m)break;const p=[...m.selectedItems];~p.indexOf(c)||p.push(c);const g=wy(f,s,m.itemDivHeight);if(g==="none"||!M.Tree.canMoveToTreeItems(p,f,g))break;s.dataTransfer.dropEffect="move",o(g);return}while(!1);s.dataTransfer.dropEffect="none",o("none")}})),this.dispose(this._dropEvent.disposableOn(s=>{const a=t;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const c=a.data.value,f=this._treeItem,{tree:m}=f;if(!m)return;const p=[...m.selectedItems];~p.indexOf(c)||p.push(c);const g=wy(f,s,m.itemDivHeight);g!=="none"&&M.Tree.canMoveToTreeItems(p,f,g)&&(M.Tree.moveToTreeItems(p,f,g),a.data=void 0,o("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{n="none",i.restart()}))}}function FS(r){if(!(r instanceof jr))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new Ey(r)}const jS=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function kS(r){const e=[],{root:t={}}=r,n=[t];for(;n.length>0;){const i=n.pop();if(!i)throw new Error("!todo");if(i.children){for(let o of i.children)if(o.children&&n.unshift(o),o.sceneObj){const{type:s=void 0}=o.sceneObj;s||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(o.sceneObj)),s&&jS.includes(s)&&e.push(o.sceneObj)}}}return e}async function GS(r,e){const t=kS(r);let n=0;const i=t.length;for(let o of t)if(++n,e){const s=n/i;e(s,n,i)}}class Py extends M.Destroyable{constructor(t,n){super();D(this,"treeItemContexMenuCallback");this._sceneTree=t,this._projectManager=n}get sceneTree(){return this._sceneTree}}function VS(r){return r.name+"_clone"}function Rd(r,e,t){if(r instanceof jr)return r.insertNewTreeItem(e,t);{const n={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return r.insertNewTreeItem(n[e],t)}}function BS(r){[r,...r.getDescendants()].forEach(e=>e.destroy())}const vn=class vn extends M.Tree{constructor(t,n,i,o){super(i);D(this,"_jsonLoading",this.disposeVar(new DS(this)));D(this,"createSceneObjectFunc",vn.defaultCreateSceneObjectFunc);D(this,"createTreeItemDragDropFunc",vn.defaultCreateTreeItemDragDropFunc);D(this,"preloadFunc",vn.defaultPreload);D(this,"getSceneObjectShowFunc",vn.defaultGetSceneObjectShow);D(this,"setSceneObjectShowFunc",vn.defaultSetSceneObjectShow);D(this,"getSceneTreeItemCloneNameFunc",vn.defaultGetSceneTreeItemCloneNameFunc);D(this,"debug",!1);D(this,"_contextMenu",this.disposeVar(new Py(this,this.projectManager)));D(this,"_showPropUiOnSelecting",this.disposeVar(M.react(!0)));this._name=t,this._dragStartDataManager=n,this._projectManager=o,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,c;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((c=this.lastSelectedItem)==null?void 0:c.sceneObject)??"select null")}));const{sceneObjectsManager:s}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let c of a){const f=c,{sceneObject:m}=f;m&&s.deleteSceneObject(m)&&m.destroy()&&Gc(m,void 0);for(let p of f.getDescendants()){const{sceneObject:g}=p;g&&s.deleteSceneObject(g)&&g.destroy()&&Gc(g,void 0)}BS(c)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let c of a){const f=c;f.sceneObject&&s.addSceneObject(f.sceneObject)&&Gc(f.sceneObject,f);for(let m of f.getDescendants()){const p=m;p.sceneObject&&s.addSceneObject(p.sceneObject)&&Gc(p.sceneObject,p)}}})),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 n=this.getDescendants();let i;for(let o of n)if(o.sceneObject&&o.sceneObject.id===t){i=o;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 n=t.root.children??[];this.root.resetChildren(!0);for(let o of n){const s=new jr(this,!0);s.json=o,(i=this.root.children)==null||i.push(s)}}testAddNewTreeItem(t,n){const i=t||this.lastSelectedItem||this.root;return i?Rd(i,n):!1}addNewTreeItem(t,n,i,o){const s=t||this.lastSelectedItem||this.root;if(s&&Rd(s,n)){const a=new jr(this,i);if(a.sceneObject=o,!Rd(s,n,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(t,n,i,o){const s=o??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,s)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=we.create(t,n);return a?this.addNewTreeItem(i,o??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(t,n,i,o){const s=o??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,s)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=this.addNewTreeItem(i,o??"FolderInnerOrAfter",!0);if(!a){console.warn("addNewTreeItem error!");return}return a.name=t??"未命名组节点",a}createSceneObjectTreeItemFromClass(t,n,i,o){const s=o??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,s))return;const a=we.createFromClass(t,n);return a?this.addNewTreeItem(i,s,!0,a):void 0}createSceneObjectTreeItemFromJson(t,n,i){const o=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(n,o))return;const s=we.createFromJson(t);return s?this.addNewTreeItem(n,i??"FolderInnerOrAfter",!0,s):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 n of t)this.destroySceneObjectTreeItem(n)}};D(vn,"defaultCreateSceneObjectFunc",AS),D(vn,"defaultCreateTreeItemDragDropFunc",FS),D(vn,"defaultPreload",GS),D(vn,"defaultGetSceneObjectShow",RS),D(vn,"defaultSetSceneObjectShow",LS),D(vn,"defaultGetSceneTreeItemCloneNameFunc",VS);let Bc=vn;const Ld={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class Sy extends M.Tree{constructor(e){super(e)}get propUiTree(){return this.uiTree}}class Fd extends M.TreeItem{constructor(e,t,n){super(e,t),this._property=n}get property(){return this._property}}class jd extends Fd{constructor(e,t){super(e,!1,t)}}class kd extends Fd{constructor(e,t){super(e,!0,t)}get groupChildren(){return this.children}}function Cy(r,e){const t=new Sy(e),n=r.getProperties("chinese"),i=[];for(let o of n)if(o instanceof ee){const s=new kd(t,o);s.dispose(()=>o.destroy()),t.children.push(s),i.push(s)}else{const s=new jd(t,o);t.children.push(s),s.dispose(()=>o.destroy())}for(;i.length>0;){const o=i.pop();if(!o)throw new Error("should not be here!");const s=o;if(!(s.property instanceof ee))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of s.property.children)if(a instanceof ee){const c=new kd(t,a);c.dispose(()=>a.destroy()),s.groupChildren.push(c),i.push(c)}else{const c=new jd(t,a);s.groupChildren.push(c),c.dispose(()=>a.destroy())}}return t.dispose(()=>{t.itemChildrenChanged.reset(),t.itemChildrenToChange.reset();const o=[...t.getDescendants()];o.forEach(s=>{s.children&&(s.children.length=0),s.destroy()}),o.length=0}),t}class jl extends M.Destroyable{constructor(t){super();D(this,"_propTreeReact",this.disposeVar(M.react(void 0)));this.dispose(()=>this._propTreeReact.value=void 0),this.disposeVar(new M.ObjResettingWithEvent(this.sceneObjectChanged,n=>{if(!n)return;const i=new M.Destroyable;return i.dispose(n.toDestroyEvent.disposableOn(()=>{this.sceneObject=void 0})),i})),this.dispose(this.sceneObjectChanged.disposableOn(n=>{this._propTreeReact.value=void 0,!(!n||!(n instanceof we))&&(this._propTreeReact.value=Cy(n,t))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(r=>{r.createDefaultProps=()=>({sceneObject:void 0})})(jl||(jl={})),M.extendClassProps(jl.prototype,jl.createDefaultProps);function zS(r,e,t,n=!0){n&&t(),r.dispose(e.disposableOn(t))}class US extends M.Destroyable{constructor(t,n,i,o){super();D(this,"_sceneObjectId",this.disposeVar(new M.SceneObjectWithId));this._id=t,this._startTimeStamp=n,this._duration=i,this._parent=o,this._sceneObjectId.id=this._id;const s=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,c=a-this._startTimeStamp;this.player.currentTime=M.clamp(c,0,this._duration)*(this.player.speed??1)};s(),this.dispose(this._parent.currentTimeChanged.disposableOn(s)),this.dispose(this.playerChanged.disposableOn(s))}get player(){return this._sceneObjectId.sceneObject instanceof Ti?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const WS=`用来配置子播放器,它是一个数组形式,数组的每个元素仍然是一个数组,形式是[子播放器的ID, 起始时间, 持续时间]。
258
+ 注意时间的单位是毫秒。
259
+ 示例如下:
260
+ \`\`\`
261
+ [
262
+ [
263
+ "9591a729-d90b-40d0-8d1b-f1ac4b5263c1",
264
+ 0,
265
+ 5000
266
+ ],
267
+ [
268
+ "76ad204f-58c6-4639-8713-ecfab6783b0f",
269
+ 7000.002288818359,
270
+ 5000
271
+ ]
272
+ ]
273
+ \`\`\`
274
+ `,wr=class wr extends M.Destroyable{constructor(){super();D(this,"_ratio",this.disposeVar(M.react(0)));D(this,"_subPlayers",this.disposeVar(new M.ObservableArray));const t=this.disposeVar(new M.Player);{const s=()=>{t.loop=this.loop??wr.defaults.loop};s(),this.dispose(this.loopChanged.disposableOn(s))}{const s=()=>{(this.loop??wr.defaults.loop)!==t.loop&&(this.loop=t.loop)};s(),this.dispose(t.loopChangedEvent.disposableOn(s))}{const s=()=>{t.currentTime=this.currentTime??wr.defaults.currentTime};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{(this.currentTime??wr.defaults.currentTime)!==t.currentTime&&(this.currentTime=t.currentTime)};s(),this.dispose(t.currentTimeChangedEvent.disposableOn(s))}{const s=()=>{t.duration=this.duration??wr.defaults.duration};s(),this.dispose(this.durationChanged.disposableOn(s))}{const s=()=>{(this.duration??wr.defaults.duration)!==t.duration&&(this.duration=t.duration)};s(),this.dispose(t.durationChangedEvent.disposableOn(s))}{const s=()=>{t.speed=this.speed??wr.defaults.speed};s(),this.dispose(this.speedChanged.disposableOn(s))}{const s=()=>{(this.speed??wr.defaults.speed)!==t.speed&&(this.speed=t.speed)};s(),this.dispose(t.speedChangedEvent.disposableOn(s))}{const s=()=>{t.playing=this.playing??wr.defaults.playing};s(),this.dispose(this.playingChanged.disposableOn(s))}{const s=()=>{(this.playing??wr.defaults.playing)!==t.playing&&(this.playing=t.playing)};s(),this.dispose(t.playingChangedEvent.disposableOn(s))}const n=()=>{const s=this.duration??wr.defaults.duration;s>0&&(this._ratio.value=(this.currentTime??wr.defaults.currentTime)/s)};n();const i=this.disposeVar(M.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.dispose(i.disposableOn(n)),this.dispose(()=>{const{length:s}=this._subPlayers;for(let a=0;a<s;++a)this._subPlayers.get(a).destroy();this._subPlayers.length=0});const o=()=>{for(let a of this._subPlayers)a.destroy();if(this._subPlayers.length=0,!this.channels)return;const s=this.channels.map(a=>{const[c,f,m]=a;return new US(c,f,m,this)});this._subPlayers.splice(0,0,...s)};o(),this.dispose(this.channelsChanged.disposableOn(o))}get ratio(){return this._ratio.value}set ratio(t){Math.abs(this._ratio.value-t)<.001||(this.currentTime=(this.duration??wr.defaults.duration)*t)}get ratioChanged(){return this._ratio.changed}};D(wr,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),D(wr,"channelsReadMe",WS);let Ti=wr;(r=>{r.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:M.reactDeepArrayWithUndefined(void 0,(e,t)=>e==null?void 0:e.every((n,i)=>n===t[i]),e=>[...e])})})(Ti||(Ti={})),M.extendClassProps(Ti.prototype,Ti.createDefaultProps);class Gd extends M.Destroyable{constructor(t){super();D(this,"_sceneObject",this.disposeVar(M.react(void 0)));this._id=t,this.dispose(()=>{this._sceneObject.value=void 0});const n=we.getSceneObjById(this._id);n&&(this._sceneObject.value=n),this.dispose(we.context.sceneObjCreatedEvent.disposableOn(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.dispose(we.context.sceneObjToDestroyEvent.disposableOn(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 qS extends M.Destroyable{constructor(t,n){super();D(this,"_sofi");this._id=t,this._sofi=this.disposeVar(new Gd(this._id));{const i=()=>{n.sceneObject=this._sofi.sceneObject};i(),this.dispose(this._sofi.sceneObjectChanged.disposableOn(i))}}}class HS extends M.Destroyable{constructor(){super();D(this,"_id",this.disposeVar(M.react(void 0)));D(this,"_sceneObject",this.disposeVar(M.react(void 0)));D(this,"_resetting",this.disposeVar(new M.ObjResettingWithEvent(this.idChanged,()=>{const{id:t}=this;if(t===void 0||t===""){this.sceneObject=void 0;return}return new qS(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 XS extends M.Destroyable{constructor(e,t,n,i){super(),this.disposeVar(new M.ObjResettingWithEvent(e.sceneObjectChanged,()=>{let o;i.debug&&console.log("正在获取Event事件...");do{const s=e.sceneObject;if(!s||!t)break;const a=t.split(".");if(a.length===0){i.debug&&console.warn("propNames.length === 0");break}let c=M.pluckProperty(s,!1,...a);if((!c||!(c instanceof M.Event))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),c=M.pluckProperty(s,!1,...a),i.debug&&c&&console.warn("event仍然获取不到!")),!c){i.debug&&console.warn(`cannot get changed from ${s.id}-${s.name}-${s.ref}-${t}`);break}if(!(c instanceof M.Event)){i.debug&&console.warn(`the prop is not event from ${s.id}-${s.name}-${s.ref}-${t}`);break}o=c,i.debug&&console.log(`Event获取成功 propChangedName: ${t}`,o)}while(!1);if(o){const s=new M.Destroyable;return s.dispose(o.dwon(()=>n.emit())),s}else{i.debug&&console.log(`未获取到Event!propChangedName: ${t}`);return}}))}}let YS=class extends M.Destroyable{constructor(t,n,i){super();D(this,"_doEvalEvent",this.dv(new M.Event));const o=this._doEvalEvent,s=this.disposeVar(M.createNextAnimateFrameEvent(o)),a=t.map(([c,f])=>{const m=new Gd(c),p=f&&new XS(m,f,o,n)||void 0;return[m,p]});this.dispose(()=>{a.forEach(([c,f])=>{f==null||f.destroy(),c.destroy()}),a.length=0}),this.dispose(o.disposableOn(()=>{const{evalMode:c="NextAnimateFrame",evalOnlyWhenObjsAllExist:f=!0}=n;if(c==="Immediate"){const m=a.map(([p])=>p.sceneObject);(!f||m.every(p=>p!==void 0))&&i(m)}})),this.dispose(s.disposableOn(()=>{const{evalMode:c="NextAnimateFrame",evalOnlyWhenObjsAllExist:f=!0}=n;if(c==="NextAnimateFrame"){const m=a.map(([p])=>p.sceneObject);(!f||m.every(p=>p!==void 0))&&i(m)}}))}forceExecute(){this._doEvalEvent.emit()}};const xy=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:YS},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:JS}=xy;class zc extends M.Destroyable{constructor(){super();D(this,"_evalFunc");D(this,"_forceExecute",new M.Event);const t=this.dv(M.react(void 0)),n=()=>{try{t.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",t.value)}catch(s){console.error(`evalFunc get error! ${s}`),t.value=void 0}};n(),this.dispose(this.evalFuncStrChanged.disposableOn(n));const i=s=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(s),t.value&&t.value(s))},o=this.disposeVar(new M.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new JS(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var s;(s=o.obj)==null||s.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(t){this._evalFunc=t}forceExecute(){this._forceExecute.emit()}}(r=>{r.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:M.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:M.reactJson(void 0),devTags:M.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(zc||(zc={})),M.extendClassProps(zc.prototype,zc.createDefaultProps);function KS(r,e,t){var i;((i=e.viewer)==null?void 0:i.getEngineObject(e))?t.call(r):r.dispose(e.createdEvent.don(()=>t.call(r)))}const ht=class ht extends we{constructor(t){super(t);D(this,"_editing",this.dv(M.react(!1)));D(this,"editingID");D(this,"editingBindMode","singlePoint");D(this,"_deprecated",[]);D(this,"_flyInEvent",this.dv(new M.Event));D(this,"_flyToEvent",this.dv(new M.Event));D(this,"_flyOverEvent",this.disposeVar(new M.Event));D(this,"_pickedEvent",this.dv(new M.Event));D(this,"_calcFlyToParamEvent",this.dv(new M.Event));D(this,"_calcFlyInParamEvent",this.dv(new M.Event));D(this,"useCalcFlyToParamInESObjectWithLocation",!1);_y(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 n=0;n<t.length;n++){const i=t[n];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(o=>{Reflect.has(this,o+"Changed")&&this.d(this[o+"Changed"].don(a=>{const c=i[o];typeof c=="string"?console.warn(`注意:${this.typeName} 的 ${o} 属性下版本将会被移除!`):Object.keys(c).forEach(f=>{a===f&&console.warn(`注意:${this.typeName} 的 ${o} 属性值 ${f} 下版本将会被移除,推荐使用属性值 ${c[f]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(t=1){this._flyInEvent.emit(t,ht._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(t=1){this._flyToEvent.emit(t,ht._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 de("唯一标识","id",!1,!0,[this,"id"]),new de("名称","name",!0,!1,[this,"name"]),new $("是否显示","show",!1,!1,[this,"show"],ht.defaults.show),new $("开启碰撞","collision",!1,!1,[this,"collision"],ht.defaults.collision),new $("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],ht.defaults.allowPicking),new Se("保存观察视角","保存当前flyToParam",[],()=>this.calcFlyToParam(),[]),new Se("清空飞向参数","清空飞向参数",[],()=>this.emptyFlyToParam(),[]),new Se("清空飞入参数","清空飞入参数",[],()=>this.emptyFlyInParam(),[]),new Se("保存飞入参数","保存飞入参数flyInParam",[],()=>this.calcFlyInParam(),[])]}}getProperties(t){return[...super.getProperties(t),new ee("ESVisualObject","ESVisualObject",[new $("是否显示","是否显示.",!1,!1,[this,"show"],ht.defaults.show),new $("是否开启碰撞监测","collision,是否开启碰撞监测.",!1,!1,[this,"collision"],ht.defaults.collision),new $("是否允许拾取","是否允许被鼠标点击拾取.",!1,!1,[this,"allowPicking"],ht.defaults.allowPicking),new ee("飞行定位","飞向参数",[new Se("飞向","飞向",["number"],n=>this.flyTo(n),[1]),new ae("flyToParam","flyToParam",!0,!1,[this,"flyToParam"],ht.defaults.flyToParam),new Se("获取当前参数","获取当前flyToParam",[],()=>this.calcFlyToParam(),[]),new H("flyToDistance","flyToDistance",!0,!1,[this,"flyToDistance"],ht.defaults.flyToParam.distance),new H("flyToHeading","flyToHeading",!0,!1,[this,"flyToHeading"],ht.defaults.flyToParam.heading),new H("flyToPitch","flyToPitch",!0,!1,[this,"flyToPitch"],ht.defaults.flyToParam.pitch),new H("flyToFlyDuration","flyToFlyDuration",!0,!1,[this,"flyToFlyDuration"],ht.defaults.flyToParam.flyDuration),new H("flyToHDelta","flyToHDelta",!0,!1,[this,"flyToHDelta"],ht.defaults.flyToParam.hDelta),new H("flyToPDelta","flyToPDelta",!0,!1,[this,"flyToPDelta"],ht.defaults.flyToParam.pDelta)]),new ee("飞入定位","飞入参数",[new Se("飞入","飞入",["number"],n=>this.flyIn(n),[1]),new ae("flyInParam","flyInParam",!0,!1,[this,"flyInParam"],ht.defaults.flyInParam),new Se("获取当前相机参数","获取当前相机参数",[],()=>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??ht.defaults.flyToParam,distance:t}:void 0}set flyToHeading(t){this.flyToParam=t!==void 0?{...this.flyToParam??ht.defaults.flyToParam,heading:t}:void 0}set flyToPitch(t){this.flyToParam=t!==void 0?{...this.flyToParam??ht.defaults.flyToParam,pitch:t}:void 0}set flyToFlyDuration(t){this.flyToParam=t!==void 0?{...this.flyToParam??ht.defaults.flyToParam,flyDuration:t}:void 0}set flyToHDelta(t){this.flyToParam=t!==void 0?{...this.flyToParam??ht.defaults.flyToParam,hDelta:t}:void 0}set flyToPDelta(t){this.flyToParam=t!==void 0?{...this.flyToParam??ht.defaults.flyToParam,pDelta:t}:void 0}};D(ht,"supportEditingModes",[]),D(ht,"_lastFlyInId",0),D(ht,"_lastFlyToId",0),D(ht,"defaults",{...we.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 Xe=ht;(r=>{r.createDefaultProps=()=>({...we.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:M.reactJsonWithUndefined(void 0),flyInParam:M.reactJsonWithUndefined(void 0)})})(Xe||(Xe={})),M.extendClassProps(Xe.prototype,Xe.createDefaultProps);function Oy(r){let e=0;function t(n,i){i++,e=Math.max(i,e),n.forEach(o=>{Array.isArray(o)&&t(o,i)})}return t(r,0),e}const Wc=class Wc extends Xe{constructor(t){super(t);D(this,"editingBindMode","lineString");D(this,"_area",this.dv(M.react(0)));D(this,"_perimeter",this.dv(M.react(0)));const n=()=>{this._updateArea(),this._updatePerimeter()};n(),this.d(this.pointsChanged.don(n))}updateEditing(){var n;const t=[];do{if(this.editingBindMode=="doublePoints"){t.push(xe.DoublePointsAppend,xe.DoublePointsModify);break}if(this.editingBindMode=="lineString"){t.push(xe.LineStringAppend,xe.LineStringInsert,xe.Translation);break}if(this.editingBindMode=="circular"){t.push(xe.CircularAppend,xe.CircularInsert,xe.Translation),this.supportEditingModes().includes(xe.HeightModify)&&t.push(xe.HeightModify);break}if(this.editingBindMode=="visibility"){t.push(xe.VisibilityAppend,xe.VisibilityModify);break}}while(!1);(n=this.viewer)==null||n.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 ld([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const t=Fl(this.points,"NONE");return t[t.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const t=[...this.points,this.points[0]],n=Fl(t,"NONE");return n[n.length-1]}else return}getIntersect(t){if(this.points&&this.points.length>=3&&t.length>=3){const n=dv(this.points,t);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const o=[...n],s=[];return o.forEach(a=>{const c=a[0].map(f=>[...f,0]);s.push(c)}),s}else return[[...n][0].map(a=>[...a,0])]}else return}getUnion(t){if(this.points&&this.points.length>=3&&t.length>=3){const n=pv(this.points,t);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const o=[...n],s=[];return o.forEach(a=>{const c=a[0].map(f=>[...f,0]);s.push(c)}),s}else return[[...n][0].map(a=>[...a,0])]}else return}getDifference(t){if(this.points&&this.points.length>=3&&t.length>=3){let n=[...t];const i=t[0],o=t[t.length-1];i[0]===o[0]&&i[1]===o[1]&&i[2]===o[2]||n.push(i);const s=vv([...this.points,this.points[0]],[...n]);if(!s)return{status:"undefined",positions:void 0};const a=[...s];if(Oy(a)===3){const c=a.map(g=>g.map(w=>[...w,0]));if(c.length<=1)return{status:"notIncluded",positions:c};const f=c[0],m=c[1];return fd([...f],[...m])==="oneBig"?{status:"included",positions:c}:{status:"notIncluded",positions:c}}else if(Oy(a)===4){const f=[...a.map(p=>p.map(g=>g.map(w=>[...w,0])))],m=[];return f.forEach(p=>{m.push(p[0])}),{status:"notIncluded",positions:m}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(t=500,n){if(this.points&&this.points.length>=2){const i=gv(this.points,t,n);return i?[i[0].map(o=>[...o,0])]:void 0}else return}geoPolygonOverlap(t){if(this.points&&this.points.length>=3&&t.length>=3){const n=fd(this.points,t);return n==="oneBig"?!0:n==="twoBig"?!1:void 0}else return}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"style",coordinate:[...t.coordinate,new $("编辑","编辑",!1,!1,[this,"editing"],!1),new ae("位置数组","位置数组(经纬高数组)",!0,!1,[this,"points"],Wc.defaults.points)],style:[...t.style,new ee("点样式","点样式集合",[]),new $("开启","开启点样式",!1,!1,[this,"pointed"],!1),new H("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new ce("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new ge("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new ee("线样式","线样式集合",[]),new $("开启","开启线样式",!1,!1,[this,"stroked"],!0),new $("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new H("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new ce("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new ge("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new ee("面样式","面样式集合",[]),new $("开启","开启填充样式",!1,!1,[this,"filled"],!1),new $("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new ge("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(t){return[...super.getProperties(t),new ee("ESGeoVector","ESGeoVector",[new $("是否编辑","是否编辑",!1,!1,[this,"editing"]),new ae("位置数组","位置数组(经纬高数组)",!1,!1,[this,"points"]),new ee("点样式","点样式",[new $("开启点样式","开启点样式",!1,!1,[this,"pointed"]),new H("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"]),new ce("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]]),new ge("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"]),new de("点材质","点材质(pointMaterial)",!1,!1,[this,"pointMaterial"]),new ae("点材质参数","点材质参数(pointMaterialParams)",!1,!1,[this,"pointMaterialParams"])]),new ee("线样式","线样式",[new $("开启线样式","开启线样式",!1,!1,[this,"stroked"]),new H("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"]),new ce("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]]),new ge("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"]),new de("线材质","线材质(strokeMaterial)",!1,!1,[this,"strokeMaterial"]),new ae("线材质参数","线材质参数(strokeMaterialParams)",!1,!1,[this,"strokeMaterialParams"]),new $("是否贴地","是否贴地",!1,!1,[this,"strokeGround"])]),new ee("填充样式","填充样式",[new $("开启填充样式","开启填充样式",!1,!1,[this,"filled"]),new ge("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"]),new de("面材质","面材质(fillMaterial)",!1,!1,[this,"fillMaterial"]),new ae("面材质参数","面材质参数(fillMaterialParams)",!1,!1,[this,"fillMaterialParams"]),new $("是否贴地","是否贴地",!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 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(Wc,"supportEditingModes",[...Xe.supportEditingModes,xe.Translation]),D(Wc,"defaults",{...Xe.defaults,points:[],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});let Ae=Wc;(r=>{r.createDefaultProps=()=>({...Xe.createDefaultProps(),pointed:!1,pointStyle:M.reactJson(r.defaults.pointStyle),stroked:!1,strokeStyle:M.reactJson(r.defaults.strokeStyle),filled:!1,fillStyle:M.reactJson(r.defaults.fillStyle),points:M.reactPositions(void 0)})})(Ae||(Ae={})),M.extendClassProps(Ae.prototype,Ae.createDefaultProps);class le extends Xe{constructor(){super(...arguments);D(this,"_statusDis",this.dv(M.react(!0)));D(this,"_smoothMoveEvent",this.dv(new M.Event));D(this,"_smoothMoveWithRotationEvent",this.dv(new M.Event));D(this,"_smoothMoveOnGroundEvent",this.dv(new M.Event));D(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new M.Event));D(this,"_automaticLandingEvent",this.dv(new M.Event));D(this,"_smoothMoveKeepPitchEvent",this.dv(new M.Event));D(this,"_smoothMoveRelativelyEvent",this.dv(new M.Event));D(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new M.Event));D(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var n;const t=[];do{if(this.editingBindMode=="singlePoint"){t.push(xe.Place,xe.Translation),["ESLocationMeasurement"].includes(this.typeName)||t.push(xe.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||t.push(xe.Scale);break}if(this.editingBindMode=="doublePoints"){t.push(xe.DoublePointsAppend,xe.DoublePointsModify);break}}while(!1);(n=this.viewer)==null||n.startEditing(this,t,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(t,n){this._smoothMoveEvent.emit(t,n)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(t,n,i){this._smoothMoveWithRotationEvent.emit(t,n,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(t,n,i,o){this._smoothMoveOnGroundEvent.emit(t,n,i,o)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(t,n,i,o,s){this._smoothMoveWithRotationOnGroundEvent.emit(t,n,i,o,s)}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,n){this._smoothMoveKeepPitchEvent.emit(t,n)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(t,n){this._smoothMoveRelativelyEvent.emit(t,n)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(t,n,i){this._smoothMoveRelativelyWithRotationEvent.emit(t,n,i)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",location:[...t.location,new $("是否编辑","是否编辑",!1,!1,[this,"editing"]),new Se("自动落地","自动落地",[],()=>this.automaticLanding(),[]),new ci("位置数组","经度,纬度,高度,度为单位",!1,!1,[this,"position"],[0,0,0]),new Qc("姿态数组","偏航角,俯仰角,翻转角,度为单位",!1,!1,[this,"rotation"],[0,0,0]),new Kt("缩放","缩放",!1,!1,[this,"scale"],[1,1,1]),new H("最小可见距离","单位米",!1,!1,[this,"minVisibleDistance"],0),new H("最大可见距离","单位米",!1,!1,[this,"maxVisibleDistance"],0)]}}getProperties(t){return[...super.getProperties(t),new ee("位置姿态对象","位置姿态对象ESObjectWithLocation",[new Se("平滑移动","smoothMove",["numbers","number"],(n,i)=>this.smoothMove(n,i),[[0,0,0],0]),new Se("固定方向平滑移动","smoothMoveKeepPitch",["numbers","number"],(n,i)=>this.smoothMoveKeepPitch(n,i),[[0,0,0],0]),new Se("平滑偏移","smoothMoveWithRotation",["numbers","numbers","number"],(n,i,o)=>this.smoothMoveWithRotation(n,i,o),[[0,0,0],[0,0,0],0]),new Se("贴地平滑移动","smoothMoveOnGround",["number","number","number","string"],(n,i,o,s)=>this.smoothMoveOnGround(n,i,o,s),[0,0,0,""]),new Se("贴地平滑偏移","smoothMoveWithRotationOnGround",["numbers","number","number","number","string"],(n,i,o,s,a)=>this.smoothMoveWithRotationOnGround(n,i,o,s,a),[[0,0,0],0,0,0,""]),new Se("smoothMoveRelatively","smoothMoveRelatively",["numbers","number"],(n,i)=>this.smoothMoveRelatively(n,i),[[0,0,0],0]),new Se("smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation",["numbers","numbers","number"],(n,i,o)=>this.smoothMoveRelativelyWithRotation(n,i,o),[[0,0,0],[0,0,0],0]),new ci("位置数组","经度,纬度,高度,度为单位",!1,!1,[this,"position"]),new Qc("姿态数组","偏航角,俯仰角,翻转角,度为单位",!1,!1,[this,"rotation"]),new Kt("缩放","缩放",!1,!1,[this,"scale"]),new $("是否编辑","是否开启编辑状态",!0,!1,[this,"editing"],!1),new H("最小可见距离","单位米",!1,!1,[this,"minVisibleDistance"]),new H("最大可见距离","单位米",!1,!1,[this,"maxVisibleDistance"]),new $("是否应用距离显隐","是否应用距离显隐",!1,!1,[this,"enableVisibleDistance"])])]}}D(le,"supportEditingModes",[...Xe.supportEditingModes,xe.Place,xe.Translation,xe.Rotation,xe.Scale,xe.DoublePointsAppend,xe.DoublePointsModify]),D(le,"defaults",{...Xe.defaults}),(r=>{r.createDefaultProps=()=>({...Xe.createDefaultProps(),position:M.reactArray([0,0,0]),rotation:M.reactArray([0,0,0]),scale:M.reactArray([1,1,1]),minVisibleDistance:M.react(0),maxVisibleDistance:M.react(0)})})(le||(le={})),M.extendClassProps(le.prototype,le.createDefaultProps);class Ni extends le{getESProperties(){const e={...super.getESProperties()};return{...e,style:[...e.style,new ee("点样式","点样式集合",[]),new $("开启点样式","开启点样式",!1,!1,[this,"pointed"],!1),new H("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new ce("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new ge("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new ee("线样式","线样式集合",[]),new $("开启线样式","开启线样式",!1,!1,[this,"stroked"],!1),new $("是否贴地(线)","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new H("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new ce("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new ge("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new ee("面样式","面样式集合",[]),new $("开启填充样式","开启填充样式",!1,!1,[this,"filled"],!1),new $("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new ge("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(e){return[...super.getProperties(e),new ee("ESLocalVector","ESLocalVector",[new ae("点样式","点样式(pointMaterialParams)",!1,!1,[this,"pointStyle"]),new ae("线样式","线样式(strokeMaterialParams)",!1,!1,[this,"strokeStyle"]),new ae("填充样式","填充样式(fillMaterialParams)",!1,!1,[this,"fillStyle"]),new ee("点样式","点样式",[new $("开启点样式","开启点样式",!1,!1,[this,"pointed"]),new H("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"]),new ce("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]]),new ge("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"]),new de("点材质","点材质(pointMaterial)",!1,!1,[this,"pointMaterial"]),new ae("点材质参数","点材质参数(pointMaterialParams)",!1,!1,[this,"pointMaterialParams"])]),new ee("线样式","线样式",[new $("开启线样式","开启线样式",!1,!1,[this,"stroked"]),new H("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"]),new ce("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]]),new ge("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"]),new de("线材质","线材质(strokeMaterial)",!1,!1,[this,"strokeMaterial"]),new ae("线材质参数","线材质参数(strokeMaterialParams)",!1,!1,[this,"strokeMaterialParams"]),new $("是否贴地(线)","是否贴地(线)",!1,!1,[this,"strokeGround"],!1)]),new ee("填充样式","填充样式",[new $("开启填充样式","开启填充样式",!1,!1,[this,"filled"]),new ge("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"]),new de("面材质","面材质(fillMaterial)",!1,!1,[this,"fillMaterial"]),new ae("面材质参数","面材质参数(fillMaterialParams)",!1,!1,[this,"fillMaterialParams"]),new $("是否贴地","是否贴地",!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(Ni,"defaults",{...le.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}),(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),pointed:!1,pointStyle:M.reactJson(r.defaults.pointStyle),stroked:!1,strokeStyle:M.reactJson(r.defaults.strokeStyle),filled:!1,fillStyle:M.reactJson(r.defaults.fillStyle)})})(Ni||(Ni={})),M.extendClassProps(Ni.prototype,Ni.createDefaultProps);class Kr extends Ni{getESProperties(){return{...super.getESProperties()}}getProperties(e){return[...super.getProperties(e)]}}D(Kr,"defaults",{...Ni.defaults}),(r=>{r.createDefaultProps=()=>({...Ni.createDefaultProps()})})(Kr||(Kr={})),M.extendClassProps(Kr.prototype,Kr.createDefaultProps);const My=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],Iy=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]];class jt extends le{constructor(){super(...arguments);D(this,"_widgetEvent",this.dv(new M.Event))}get widgetEvent(){return this._widgetEvent}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new $("屏幕渲染","是否开启屏幕渲染模式",!1,!1,[this,"screenRender"],!0),new $("尺寸自适应","尺寸是否根据内容自动计算",!1,!1,[this,"sizeByContent"],!0),new at("尺寸大小","尺寸自适应关闭才会生效",!1,!1,[this,"size"],[100,100]),new at("偏移比例","偏移比例(anchor)",!1,!1,[this,"anchor"],[.5,1]),new at("像素偏移","像素偏移(offset)",!1,!1,[this,"offset"],[0,0]),new ce("渲染模式","八种渲染模式(0~7),当Widget中透明度只有(0,1)两种时可以选择2",!1,!1,[this,"renderMode"],Iy,0),new ce("漫游旋转类型","三种漫游旋转类型(0,1,2)",!1,!1,[this,"rotationType"],My,1),new de("绑定对象","actorTag",!1,!1,[this,"actorTag"]),new de("插槽名称","socketName",!1,!1,[this,"socketName"]),new Kt("位置偏移","positionOffset(米)",!1,!1,[this,"positionOffset"]),new Kt("相对姿态","rotationOffset(米)",!1,!1,[this,"rotationOffset"])]}}getProperties(t){return[...super.getProperties(t),new ee("标签属性","标签对象ESLabel的属性",[new $("屏幕渲染","是否开启屏幕渲染模式",!1,!1,[this,"screenRender"],!0),new $("尺寸自适应","尺寸是否根据内容自动计算",!1,!1,[this,"sizeByContent"],!0),new at("尺寸大小","尺寸自适应关闭才会生效",!1,!1,[this,"size"],[100,100]),new at("偏移比例","偏移比例(anchor)",!1,!1,[this,"anchor"],[.5,1]),new at("像素偏移","像素偏移(offset)",!1,!1,[this,"offset"],[0,0]),new ce("渲染模式","八种渲染模式(0~7),当Widget中透明度只有(0,1)两种时可以选择2",!1,!1,[this,"renderMode"],Iy,0),new ce("漫游旋转类型","三种漫游旋转类型(0,1,2)",!1,!1,[this,"rotationType"],My,1),new H("排序","zOrder排序",!1,!1,[this,"zOrder"],0)])]}}D(jt,"defaults",{...le.defaults,screenRender:!0,size:[100,100],anchor:[.5,.5],sizeByContent:!0,renderMode:0,rotationType:1}),(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),screenRender:!0,size:M.reactArray([100,100]),anchor:M.reactArray([.5,1]),offset:M.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:M.reactArray([0,0,0]),rotationOffset:M.reactArray([0,0,0])})})(jt||(jt={})),M.extendClassProps(jt.prototype,jt.createDefaultProps);const Qr=class Qr extends Xe{constructor(){super(...arguments);D(this,"_refreshTilesetEvent",this.dv(new M.Event));D(this,"_tilesetReadyEvent",this.dv(new M.Event));D(this,"_supportEdit",this.dv(M.react(!0)));D(this,"_highlightFeatureEvent",this.dv(new M.Event));D(this,"_highlightFeatureAndFlyToEvent",this.dv(new M.Event));D(this,"_getFeatureTableEvent",this.dv(new M.Event));D(this,"_featureTableResultEvent",this.dv(new M.Event));D(this,"_getMaterialNameListEvent",this.disposeVar(new M.Event));D(this,"_setFeatureStyleEvent",this.dv(new M.Event));D(this,"_setFeatureColorEvent",this.dv(new M.Event));D(this,"_setFeatureVisableEvent",this.dv(new M.Event));D(this,"_resetFeatureStyleEvent",this.dv(new M.Event));D(this,"setMaterialInfoEvent",this.ad(new M.Event));D(this,"_setMaterialEvent",this.disposeVar(new M.Event));D(this,"_clippingPlanesId",this.dv(M.react("")));D(this,"_clippingPlaneIds",this.dv(M.react([])));D(this,"_flattenedPlaneId",this.dv(M.react("")));D(this,"_flattenedPlaneEnabled",this.dv(M.react(!1)));D(this,"_clippingPlaneId",this.dv(M.react("")));D(this,"_excavateId",this.dv(M.reactArray([])))}get typeName(){return"ES3DTileset"}get defaultProps(){return Qr.createDefaultProps()}updateEditing(){var t;(t=this.viewer)==null||t.startEditing(this,[xe.Translation,xe.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,n){this._highlightFeatureEvent.emit(t,n)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(t,n,i,o){this._highlightFeatureAndFlyToEvent.emit(t,n,i,o)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(t=>{const n=this.d(this._featureTableResultEvent.donce(t));this._getFeatureTableEvent.emit(),setTimeout(()=>{n(),t(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(t=>{const n=new M.Destroyable;n.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(n.destroy(),t(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{n.isDestroyed()||(n.destroy(),t(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(t){this._setFeatureStyleEvent.emit(t)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(t,n){this._setFeatureColorEvent.emit(t,typeof n=="string"?JSON.parse(n):n)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(t,n){this._setFeatureVisableEvent.emit(t,typeof n=="string"?JSON.parse(n):n)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(t){return new Promise(n=>{const i=new M.Destroyable;i.ad(this.setMaterialInfoEvent.donce(o=>{i.destroy(),n(o)})),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={...Ld}}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new ut("精度","精度.",!1,!1,[this,"maximumScreenSpaceError"],1,[0,256],16),new ce("材质模式","materialMode",!0,!1,[this,"materialMode"],Qr.defaults.materialModes,"normal"),new ce("颜色模式","颜色混合模式",!1,!1,[this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"HIGHLIGHT"),new ae("materialOverrideMap","材质替换",!1,!1,[this,"materialOverrideMap"],Qr.defaults.materialOverrideMap)],dataSource:[...t.dataSource,new ae("服务地址","服务地址",!0,!1,[this,"url"],Qr.defaults.url)],coordinate:[...t.coordinate,new $("编辑","编辑",!0,!1,[this,"editing"],!1),new Kt("偏移","偏移量",!0,!1,[this,"offset"],[0,0,0]),new Qc("旋转","旋转",!1,!1,[this,"rotation"],[0,0,0])]}}getProperties(t){return[...super.getProperties(t),new ee("ES3DTileset","ES3DTileset",[new ae("服务地址","服务地址",!1,!1,[this,"url"],Qr.defaults.url),new ce("materialMode","materialMode",!1,!1,[this,"materialMode"],Qr.defaults.materialModes),new ae("materialParams","materialParams",!1,!1,[this,"materialParams"],Qr.defaults.materialParams),new H("maximumScreenSpaceError","显示精度,maximumScreenSpaceError",!1,!1,[this,"maximumScreenSpaceError"]),new $("编辑","编辑",!1,!1,[this,"editing"],!1),new ci("offset","offset",!0,!1,[this,"offset"]),new ci("rotation","rotation",!1,!1,[this,"rotation"]),new ut("精度","精度.",!1,!1,[this,"maximumScreenSpaceError"],1,[0,256],16),new Se("highlightFeature","highlightFeature",["string","string"],(n,i)=>this.highlightFeature(n,i),["","rgba(255,0,0,1)"]),new Se("setFeatureColor","setFeatureColor",["string","string"],(n,i)=>this.setFeatureColor(n,i),["",""]),new Se("setFeatureVisable","setFeatureVisable",["string","string"],(n,i)=>this.setFeatureVisable(n,i),["",""]),new Se("resetFeatureStyle","resetFeatureStyle",[],()=>this.resetFeatureStyle(),[]),new ee("ue","ue",[new Se("refreshTileset","refreshTileset",[],()=>this.refreshTileset(),[]),new de("actorTag","actorTag",!1,!1,[this,"actorTag"]),new $("是否高亮","是否高亮.",!1,!1,[this,"highlight"]),new ge("highlightColor"," highlightColor.",!1,!1,[this,"highlightColor"]),new H("highlightID","highlightID",!1,!1,[this,"highlightID"]),new ae("materialOverrideMap","材质替换",!1,!1,[this,"materialOverrideMap"],Qr.defaults.materialOverrideMap)]),new ee("czm","czm",[new ee("可视化","可视化",[new at("czmImageBasedLightingFactor","反射强度 ,imageBasedLightingFactor",!1,!1,[this,"czmImageBasedLightingFactor"]),new H("czmAtmosphereScatteringIntensity","大气散射强度 ,atmosphereScatteringIntensity",!1,!1,[this,"czmAtmosphereScatteringIntensity"]),new ae("czmEnvironmentMapManager","动态环境贴图管理器",!1,!1,[this,"czmEnvironmentMapManager"]),new H("czmMaximumMemoryUsage","最大内存,maximumMemoryUsage",!1,!1,[this,"czmMaximumMemoryUsage"])]),new ee("常用","常用",[new ce("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 ae("czmStyle","czmStyle",!1,!1,[this,"czmStyleJson"]),new $("czmBackFaceCulling","czmBackFaceCulling",!1,!1,[this,"czmBackFaceCulling"]),new $("czmSkipLevelOfDetail","czmSkipLevelOfDetail",!1,!1,[this,"czmSkipLevelOfDetail"]),new ce("colorBlendMode","颜色混合模式",!1,!1,[this,"colorBlendMode"],[["HIGHLIGHT","HIGHLIGHT"],["REPLACE","REPLACE"],["MIX","MIX"]],"HIGHLIGHT"),new H("cacheBytes","最大缓存占用,超过的会自动卸载,但是视野范围内能看见的保留。单位字节。Cesium1.110(含)以后的版本起作用。",!1,!1,[this,"cacheBytes"],536870912)]),new ee("调试信息","调试信息",[new $("czmDebugShowBoundingVolume","For debugging only.When true, renders the bounding volume for each tile.",!1,!1,[this,"czmDebugShowBoundingVolume"]),new $("czmDebugShowContentBoundingVolume","czmDebugShowContentBoundingVolume.",!1,!1,[this,"czmDebugShowContentBoundingVolume"])]),new ee("clippingPlanes","clippingPlanes",[new $("clippingPlaneEnabled","clippingPlaneEnabled",!1,!1,[this,"clippingPlaneEnabled"]),new $("unionClippingRegions","unionClippingRegions",!1,!1,[this,"unionClippingRegions"]),new ge("clippingPlaneEdgeColor","clippingPlaneEdgeColor",!1,!1,[this,"clippingPlaneEdgeColor"]),new H("clippingPlaneEdgeWidth","clippingPlaneEdgeWidth",!1,!1,[this,"clippingPlaneEdgeWidth"])])])])]}};D(Qr,"type",Qr.register("ES3DTileset",Qr,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),D(Qr,"supportEditingModes",[...Xe.supportEditingModes,xe.Translation,xe.Rotation]),D(Qr,"defaults",{...Xe.defaults,url:"",actorTag:"",materialMode:"normal",materialModes:[["常规","normal"],["科技感","technology"]],offset:[0,0,0],materialParams:{baseColor:[0,.5,1]},cacheBytes:536870912,materialOverrideMap:{}});let Yt=Qr;(r=>{r.createDefaultProps=()=>({...Xe.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:M.reactArray([1,0,0,1]),offset:M.reactArrayWithUndefined(void 0),rotation:M.reactArray([0,0,0]),czmImageBasedLightingFactor:M.reactArray([1,1]),czmEnvironmentMapManager:M.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:M.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:536870912,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:M.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:M.reactJsonWithUndefined(void 0)})})(Yt||(Yt={})),M.extendClassProps(Yt.prototype,Yt.createDefaultProps);const ks=class ks extends le{constructor(t){super(t);D(this,"_isFlyInCreated",this.dv(M.react(!1)));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position){const i=this.dv(M.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 ks.createDefaultProps()}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(t){this._isFlyInCreated.value=t}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ce("模式","mode",!1,!1,[this,"mode"],ks.defaults.modes,"cylinder"),new H("半径","radius",!1,!1,[this,"radius"],10)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new ce("mode","mode",!1,!1,[this,"mode"],ks.defaults.modes),new H("半径","radius",!1,!1,[this,"radius"])])]}};D(ks,"type",ks.register("ESAlarm",ks,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"})),D(ks,"defaults",{...le.defaults,modes:[["柱状警告","cylinder"],["圆形警告","circle"]],radius:100,czmAnimations:[{index:0,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"}]});let ua=ks;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),mode:"cylinder",radius:10})})(ua||(ua={})),M.extendClassProps(ua.prototype,ua.createDefaultProps);const Pu=class Pu extends le{get typeName(){return"ESApertureEffect"}get defaultProps(){return Pu.createDefaultProps()}constructor(e){super(e),this.collision=!1}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new H("半径","radius",!1,!1,[this,"radius"],1)]}}getProperties(e){return[...super.getProperties(e),new H("半径","radius",!1,!1,[this,"radius"])]}};D(Pu,"type",Pu.register("ESApertureEffect",Pu,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"})),D(Pu,"defaults",{...le.defaults,radius:1});let la=Pu;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),radius:1})})(la||(la={})),M.extendClassProps(la.prototype,la.createDefaultProps);const Rn=class Rn extends Ae{constructor(t){super(t);D(this,"editingBindMode","circular");this.collision=Rn.defaults.collision,this.filled=Rn.defaults.filled,this.stroked=Rn.defaults.stroked,this.fillStyle=Rn.defaults.fillStyle,this.strokeStyle=Rn.defaults.strokeStyle}get typeName(){return"ESGeoPolygon"}get defaultProps(){return Rn.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new H("面积","面积",!1,!0,[this,"area"]),new H("周长","周长",!1,!0,[this,"perimeter"])]}}getProperties(t){return[...super.getProperties(t),new ee("ESGeoPolygon","ESGeoPolygon",[])]}};D(Rn,"type",Rn.register("ESGeoPolygon",Rn,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),D(Rn,"supportEditingModes",[...Ae.supportEditingModes,xe.CircularAppend,xe.CircularInsert]),D(Rn,"defaults",{...Ae.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 ze=Rn;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps()})})(ze||(ze={})),M.extendClassProps(ze.prototype,ze.createDefaultProps);const ls=class ls extends ze{get typeName(){return"ESAreaMeasurement"}get defaultProps(){return ls.createDefaultProps()}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:ls.defaults.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle??ls.defaults.fillStyle,materialParams:e??ls.defaults.fillStyle.materialParams}}constructor(e){super(e),this.fillStyle.ground=!0,this.strokeStyle.width=2}getProperties(e){return[...super.getProperties(e)]}};D(ls,"type",ls.register("ESAreaMeasurement",ls,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"面积测量"})),D(ls,"defaults",{...ze.defaults,fillStyle:{color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!1}});let ca=ls;(r=>{r.createDefaultProps=()=>({...ze.createDefaultProps(),stroked:!0,filled:!0})})(ca||(ca={})),M.extendClassProps(ca.prototype,ca.createDefaultProps);const Su=class Su extends le{get typeName(){return"ESBlastParticleSystem"}get defaultProps(){return Su.createDefaultProps()}constructor(e){super(e)}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"general"}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ee("czm","czm",[new ql("图片","The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.",!1,!1,[this,"image"]),new Kt("偏移","translation",!1,!1,[this,"translation"])])])]}};D(Su,"type",Su.register("ESBlastParticleSystem",Su,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"})),D(Su,"defaults",{...le.defaults,image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:[0,0,0]});let ha=Su;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",positionEditing:void 0,translation:M.reactArray([0,0,0])})})(ha||(ha={})),M.extendClassProps(ha.prototype,ha.createDefaultProps);const Er=class Er extends le{get typeName(){return"ESBoxClipping"}get defaultProps(){return{...Er.createDefaultProps()}}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new $("反转","reverse",!1,!1,[this,"reverse"],Er.defaults.reverse),new Kt("尺寸","长宽高",!1,!1,[this,"size"],Er.defaults.size),new ge("边框颜色","edgeColor",!1,!1,[this,"edgeColor"],Er.defaults.edgeColor),new H("边框宽度","edgeWidth",!1,!1,[this,"edgeWidth"],Er.defaults.edgeWidth),new de("瓦片图层","targetID",!1,!1,[this,"targetID"],Er.defaults.targetID)]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new $("reverse","reverse",!1,!1,[this,"reverse"],Er.defaults.reverse),new ge("edgeColor","edgeColor",!1,!1,[this,"edgeColor"],Er.defaults.edgeColor),new H("edgeWidth","edgeWidth",!1,!1,[this,"edgeWidth"],Er.defaults.edgeWidth),new Kt("尺寸","长宽高",!1,!1,[this,"size"],Er.defaults.size),new de("targetID","targetID",!1,!1,[this,"targetID"],Er.defaults.targetID)])]}};D(Er,"type",Er.register("ESBoxClipping",Er,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"})),D(Er,"defaults",{...le.defaults,reverse:!1,edgeColor:[1,1,1,1],edgeWidth:1,size:[10,10,10],targetID:""});let fa=Er;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),reverse:!1,edgeColor:M.reactArray([1,1,1,1]),edgeWidth:2,size:M.reactArray([10,10,10]),targetID:""})})(fa||(fa={})),M.extendClassProps(fa.prototype,fa.createDefaultProps);const Gs=class Gs extends le{constructor(){super(...arguments);D(this,"_thumbnail",this.dv(M.react("")));D(this,"_duration",this.dv(M.react(1)));D(this,"_resetWithCurrentCameraEvent",this.dv(new M.Event));D(this,"_captureEvent",this.dv(new M.Event))}get typeName(){return"ESCameraView"}get defaultProps(){return Gs.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,n="default"){this.flyInEvent.emit(t,-1,n)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(t,n){this._captureEvent.emit(t,n)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getProperties(t){return[...super.getProperties(t),new ee("ESCameraView","ESCameraView",[new Se("设置为当前视角","resetWithCurrentCamera",[],()=>this.resetWithCurrentCamera(),[]),new Se("获取缩略图","获取缩略图",["number","number"],(n,i)=>this.capture(n,i),[Gs.defaults.thumbnailWidth,Gs.defaults.thumbnailHeight]),new de("缩略图","缩略图",!0,!1,[this,"thumbnail"]),new H("飞行时间","飞行时间(秒)",!0,!1,[this,"duration"])])]}};D(Gs,"type",Gs.register("ESCameraView",Gs,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"})),D(Gs,"defaults",{...le.defaults,thumbnailWidth:64,thumbnailHeight:64,duration:1,thumbnail:""});let Eo=Gs;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps()})})(Eo||(Eo={})),M.extendClassProps(Eo.prototype,Eo.createDefaultProps);class Zh extends M.Destroyable{constructor(t,n,i){super();D(this,"_view",this.dv(new Eo));if(this.d(t.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${t.views.length+1}`,n){const a=this._view,c=n;a.duration=c.duration??1,a.position=c.position,a.rotation=c.rotation??[0,0,0],a.thumbnail=c.thumbnail??"",a.name=c.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(M.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const o=this._view,s=this.dv(M.createNextAnimateFrameEvent(o.durationChanged,o.positionChanged,o.rotationChanged,o.thumbnailChanged,o.nameChanged));this.d(s.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 we{constructor(t){super(t);D(this,"_currentViewIndex",this.dv(M.react(-1)));D(this,"_viewWrappers",this.dv(new M.ObservableArray));D(this,"_currentViewWrapper",this.dv(M.react(void 0)));D(this,"_container",this.dv(M.react(void 0)));{const n=this.dv(M.createProcessingFromAsyncFunc(async o=>{var s;do{if(!this.flyToNextView())break;const a=this.intervalTime??$r.defaults.intervalTime,f=((((s=this._currentViewWrapper.value)==null?void 0:s.viewInfo.duration)??0)+a)*1e3;await o.promise(M.sleep(f))}while(!0);this.playing=!1})),i=()=>{this.playing?n.restart():n.cancel()};i(),this.d(this.playingChanged.don(i))}{const n=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};n(),this.d(this._viewWrappers.changedEvent.don(n))}{const n=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};n(),this.d(this._viewWrappers.changedEvent.don(n)),this.d(this._currentViewWrapper.changed.don(n))}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 fp(this._viewWrappers,t=>t.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(t){if(t.length===this._viewWrappers.length){const n=this._viewWrappers;if(t.every((i,o)=>{const s=n.get(o).view;return i.duration===s.duration&&yf(i.position,s.position)&&yf(i.rotation,s.rotation)&&i.thumbnail===s.thumbnail&&i.name===s.name}))return}this.clearAllViews();for(let n of t)this._viewWrappers.push(new Zh(this,n))}_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}`,n=[64,64]){this._viewWrappers.push(new Zh(this,void 0,{name:t,size:n}))}update(t,n,i=[64,64]){if(t>=this._viewWrappers.length||t<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const o=this._viewWrappers.get(t);n&&(o.view.name=n),o.view.resetWithCurrentCamera(),o.view.capture(i[0],i[1])}addView(){this._viewWrappers.push(new Zh(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 Zh(this))}setCurrentView(t){if(t>=this._viewWrappers.length||t<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const n=this._viewWrappers.get(t);return this._currentViewWrapper.value=n,!0}resetView(t){if(t>=this._viewWrappers.length||t<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const n=this._viewWrappers.get(t);n.view.resetWithCurrentCamera(),n.view.capture()}resetViewName(t,n){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=n}updateView(t,n){if(t>=this._viewWrappers.length||t<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(t);i.view.position=n.position,i.view.rotation=n.rotation??[0,0,0],i.view.duration=n.duration??1,i.view.thumbnail=n.thumbnail??"",i.view.name=n.name??""}flyToView(t){if(this.setCurrentView(t)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const n=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(n,this.flyMode??$r.defaults.flyMode)}}flyToPrevView(){const t=this._currentViewWrapper.value;if(!t)return this.flyToView(0),!0;const n=this._getIndex(t);return this.loop??$r.defaults.loop?(this.flyToView((this._viewWrappers.length+n-1)%this._viewWrappers.length),!0):n-1<0?!1:(this.flyToView(n-1),!0)}moveToPreView(){const t=this._currentViewWrapper.value;if(!t)return;const n=this._getIndex(t);if(n===0)return;const i=this._viewWrappers.splice(n-1,1,t)[0];this._viewWrappers.set(n,i)}moveToNextView(){const t=this._currentViewWrapper.value;if(!t)return;const n=this._getIndex(t);if(n===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(n+1,1,t)[0];this._viewWrappers.set(n,i)}flyToNextView(){const t=this._currentViewWrapper.value;if(!t)return this.flyToView(0),!0;const n=this._getIndex(t);return this.loop??$r.defaults.loop?(this.flyToView((n+1)%this._viewWrappers.length),!0):n+1>this._viewWrappers.length-1?!1:(this.flyToView(n+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 n=this._getIndex(t);if(n===-1){console.warn("index === -1");return}this.deleteView(n)}transitionImageUrl(t){return we.context.getStrFromEnv(t)}getProperties(t){return[...super.getProperties(t),new ee("ESCameraViewCollection","ESCameraViewCollection",[new ce("飞行模式","flyMode",!1,!1,[this,"flyMode"],$r.defaults.flyModes,$r.defaults.flyMode),new Se("添加视角","添加视角",[],()=>this.addView(),[]),new Se("插入视角","插入视角",["number"],n=>this.insertView(n),[0]),new Se("清空所有视角","清空所有视角",[],()=>this.clearAllViews(),[]),new Se("当前位置插入视角","当前位置插入视角",[],()=>this.insertView(this.currentViewIndex+1),[]),new Se("上一个视角","上一个视角",[],()=>this.flyToPrevView(),[]),new Se("下一个视角","下一个视角",[],()=>this.flyToNextView(),[]),new Se("当前视角移动到上一个视角","当前视角移动到上一个视角",[],()=>this.moveToPreView(),[]),new Se("当前视角移动到下一个视角","当前视角移动到下一个视角",[],()=>this.moveToNextView(),[]),new Se("飞入指定视角","飞入指定视角",["number"],n=>this.flyToView(n),[0]),new Se("设置当前视角","设置当前视角",["number"],n=>this.setCurrentView(n),[0]),new Se("删除当前视角","删除当前视角",[],()=>this.deleteCurrentView(),[]),new Se("删除指定视角","删除指定视角",["number"],n=>this.deleteView(n),[0]),new Se("重置视角","重置视角",["number"],n=>this.resetView(n),[0]),new H("当前序号","当前序号",!1,!0,[this,"currentViewIndex"]),new ap("播放","播放",[this,"playing"],()=>this.stop(),[this,"loop"],$r.defaults),new $("是否播放","是否播放.",!1,!1,[this,"playing"]),new Se("停止","停止",[],()=>this.stop(),[]),new $("是否循环","是否循环.",!1,!1,[this,"loop"]),new H("间隔时间","间隔时间(s)",!1,!1,[this,"intervalTime"]),new ae("视角集合","类型为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",{...we.defaults,loop:!0,playing:!1,intervalTime:5,duration:1,views:[],flyMode:"default",flyModes:[["默认","default"],["直线飞行","uniform"]]});let Po=$r;(r=>{r.createDefaultProps=()=>({...we.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})})(Po||(Po={})),M.extendClassProps(Po.prototype,Po.createDefaultProps);const Cu=class Cu extends le{constructor(t){super(t);D(this,"editingBindMode","doublePoints")}get typeName(){return"ESCameraVisibleRange"}get defaultProps(){return Cu.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new H("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"],1.77778),new H("横向夹角","fov",!1,!1,[this,"fov"],90),new H("视野长度","far",!1,!1,[this,"far"],100),new H("近面距离","near",!1,!1,[this,"near"],5)]}}getProperties(t){return[...super.getProperties(t),new H("横向夹角","fov",!1,!1,[this,"fov"]),new H("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"]),new H("视野长度","far",!1,!1,[this,"far"]),new H("近面距离","near",!1,!1,[this,"near"])]}};D(Cu,"type",Cu.register("ESCameraVisibleRange",Cu,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"})),D(Cu,"defaults",{...le.defaults,fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1});let da=Cu;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})})(da||(da={})),M.extendClassProps(da.prototype,da.createDefaultProps);const Vs=class Vs extends le{get typeName(){return"ESCar"}get defaultProps(){return Vs.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ce("模式","mode",!1,!1,[this,"mode"],Vs.defaults.modeEnum,"policeCar")]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ce("mode","mode",!1,!1,[this,"mode"],Vs.defaults.modeEnum)])]}};D(Vs,"type",Vs.register("ESCar",Vs,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"})),D(Vs,"defaults",{...le.defaults,modeEnum:[["警车","policeCar"]],mode:"policeCar"});let pa=Vs;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),mode:"policeCar",allowPicking:!0})})(pa||(pa={})),M.extendClassProps(pa.prototype,pa.createDefaultProps);const Io=class Io extends Ae{constructor(t){super(t);D(this,"editingBindMode","circular");this.fillGround=!0}get typeName(){return"ESClassification"}get defaultProps(){return Io.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new H("高度","高度",!1,!1,[this,"height"],10)],coordinate:[...t.coordinate,new H("面积","面积",!1,!0,[this,"area"]),new H("周长","周长",!1,!0,[this,"perimeter"])]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new H("高度","高度",!1,!1,[this,"height"])])]}};D(Io,"type",Io.register("ESClassification",Io,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),D(Io,"supportEditingModes",[...Ae.supportEditingModes,xe.CircularAppend,xe.CircularInsert,xe.HeightModify]),D(Io,"defaults",{...Ae.defaults,fillStyle:{material:"",materialParams:{},ground:!0,color:[1,1,1,1]},filled:!0});let So=Io;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps(),height:10,filled:!0})})(So||(So={})),M.extendClassProps(So.prototype,So.createDefaultProps);const xu=class xu extends le{get typeName(){return"ESClippingPlane"}get defaultProps(){return xu.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new $("显示箭头","显示箭头",!1,!1,[this,"showArrow"],!0),new ge("线框颜色","edgeColor",!1,!1,[this,"edgeColor"],[1,1,1,1]),new H("线框宽度","edgetWidth",!1,!1,[this,"edgetWidth"],2),new H("裁剪宽度","width",!1,!1,[this,"width"],200),new H("裁剪高度","height",!1,!1,[this,"height"],200),new de("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ee("czm","czm",[new $("显示箭头","显示箭头",!1,!1,[this,"showArrow"]),new ge("edgeColor","edgeColor",!1,!1,[this,"edgeColor"]),new H("edgetWidth","edgetWidth",!1,!1,[this,"edgetWidth"]),new H("width","width",!1,!1,[this,"width"]),new H("height","height",!1,!1,[this,"height"]),new de("targetID","targetID",!1,!1,[this,"targetID"])])])]}};D(xu,"type",xu.register("ESClippingPlane",xu,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"})),D(xu,"defaults",{...le.defaults});let ga=xu;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),showArrow:!0,edgeColor:M.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})})(ga||(ga={})),M.extendClassProps(ga.prototype,ga.createDefaultProps);class QS extends M.Destroyable{constructor(e,t,n){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${n.id}) container`);{const c=()=>{const m=`${t.cssText}
275
+ ${t.cssAllInitial?"all: initial;":""}
276
+ ${t.show?"":"display: none"}
277
+ `;i.style.cssText=m};c();const f=this.dv(M.createNextAnimateFrameEvent(t.cssAllInitialChanged,t.cssTextChanged,t.showChanged));this.d(f.don(c))}e.appendChild(i),this.d(()=>e.removeChild(i));const o=this.dv(M.createNextAnimateFrameEvent(t.instanceClassChanged,t.containerChanged,t.shadowDomChanged)),s=this.dv(new M.ObjResettingWithEvent(o,()=>{const{instanceClass:c,container:f}=t;if(!c||f)return;let m=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),t.shadowDom){const p=i.appendChild(document.createElement("div"));p.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${n.id}) container shadowDiv`),m=p.attachShadow({mode:"open"}).appendChild(document.createElement("div")),m.setAttribute("xe2-div",`ESCustomDiv(${t.id})(viewer: ${n.id}) container shadowDiv div`)}return new c(m,t,n)})),{_updateEvent:a}=t;this.d(a.don(c=>{if(s.obj)try{c(s.obj,t,n)}catch(f){console.error(`ESCustomDiv update error! ${f}`)}}))}}const Ty=`class MyDiv extends XE2['xe2-base-utils'].Destroyable {
278
+ // subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
279
+ // customDiv指向当前的CustomDiv场景对象
280
+ // viewer指定当前的视口
281
+ constructor(subContainer, customDiv, viewer) {
282
+ super();
283
+
284
+ this._subContainer = subContainer;
285
+ const div = document.createElement('div');
286
+ this._div = div;
287
+
288
+ this._subContainer.appendChild(div);
289
+ this.d(() => this._subContainer.removeChild(this._div));
290
+
291
+ div.style.width = '300px';
292
+ div.style.height = '50px';
293
+ div.style.position = 'absolute';
294
+ div.style.left = '10px';
295
+ div.style.top = '10px';
296
+ div.style.background = 'rgba(120, 120, 0, 0.7)';
297
+ div.style.color = 'white';
298
+ div.style.fontSize = '30px';
299
+ div.style.lineHeight = '50px';
300
+ div.style.border = '1px solid white';
301
+ div.style.zIndex = '100'; // 特别重要,不能丢!很可能导致保存后打开看不到!
302
+ div.innerText = 'Hello world!';
303
+
304
+ // {
305
+ // // 控制显示隐藏
306
+ // const update = () => {
307
+ // div.style.display = (customDiv.show ?? true) ? 'flex' : 'none';
308
+ // };
309
+ // update();
310
+ // this.d(customDiv.showChanged.don(update));
311
+ // }
312
+ }
313
+
314
+ // 随机背景颜色,仅用于测试外部强制更新,此函数非必需
315
+ update() {
316
+ const r = (255 * Math.random()) | 0;
317
+ const g = (255 * Math.random()) | 0;
318
+ const b = (255 * Math.random()) | 0;
319
+ this._div.style.background = \`rgba(\${r}, \${g}, \${b}, 0.8)\`;
320
+ }
321
+ }`,$S=`示例代码:
322
+ \`\`\`
323
+ ${Ty}
324
+ \`\`\`
325
+ `,Ln=class Ln extends we{constructor(t){super(t);D(this,"_updateEvent",this.dv(new M.Event));D(this,"_instanceClassReact",this.dv(M.react(void 0)));D(this,"_innerHtmlMounted",this.dv(new M.Event));D(this,"_container",this.dv(M.react(void 0)));this.registerAttachedObjectForContainer((i,o)=>new QS(o,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 o=`class MyDiv extends XE2['xe2-base-utils'].Destroyable {
326
+ // subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
327
+ // customDiv指向当前的CustomDiv场景对象
328
+ // viewer指定当前的视口
329
+ // z-index样式需要设置,否则可能导致看不到!
330
+ constructor(subContainer, customDiv, viewer) {
331
+ super();
332
+
333
+ const div = document.createElement('div');
334
+ this.d(() => subContainer.removeChild(div));
335
+
336
+ subContainer.appendChild(div);
337
+
338
+ div.innerHTML = \`${this.innerHTML}\`;
339
+ customDiv._innerHtmlMounted.emit(div, viewer);
340
+
341
+ // {
342
+ // // 控制显示隐藏
343
+ // const update = () => {
344
+ // div.style.display = (customDiv.show ?? true) ? 'flex' : 'none';
345
+ // };
346
+ // update();
347
+ // this.d(customDiv.showChanged.don(update));
348
+ // }
349
+ }
350
+ }`;this.instanceClassStr=o};i(),this.d(this.innerHTMLChanged.don(i))}const n=document.createElement("div");n.setAttribute("xe2-div",`ESCustomDiv(${this.id}) container`);{const i=()=>{const s=`${this.cssText};
351
+ ${this.cssAllInitial?"all: initial;":""}
352
+ ${this.show?"":"display: none;"}
353
+ `;n.style.cssText=s};i();const o=this.dv(M.createNextAnimateFrameEvent(this.cssAllInitialChanged,this.cssTextChanged,this.showChanged));this.d(o.don(i))}{const i=()=>{if(this.containerId===void 0||this.containerId==="")this.container=void 0;else{const o=document.getElementById(this.containerId);o instanceof HTMLElement?this.container=o:(this.container=void 0,console.warn(`Div from containerId(${this.containerId}) is not HTMLDivElement!`))}};i(),this.d(this.containerIdChanged.don(i))}{class i extends M.Destroyable{constructor(s){super(),s.appendChild(n),this.d(()=>s.removeChild(n))}}this.dv(new M.ObjResettingWithEvent(this.containerChanged,()=>{if(this.container)return new i(this.container)}))}{const i=this.dv(M.createNextAnimateFrameEvent(this.containerChanged,this.instanceClassChanged,this.shadowDomChanged));this.dv(new M.ObjResettingWithEvent(i,()=>{if(!this.container||!this.instanceClass)return;let o=n;if(n.firstElementChild&&n.removeChild(n.firstElementChild),this.shadowDom){const s=n.appendChild(document.createElement("div"));s.setAttribute("xe2-div","ESCustomDiv container shadowDiv"),o=s.attachShadow({mode:"open"}).appendChild(document.createElement("div")),o.setAttribute("xe2-div","ESCustomDiv container shadowDiv div")}return new this.instanceClass(o,this,void 0)}))}}get typeName(){return"ESCustomDiv"}get defaultProps(){return Ln.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 n=i=>{i||alert("evalFuncStr为空,无法执行!");try{const o=i&&Function(`"use strict";return (${i})`)();this.update(o)}catch(o){alert(`updateDivFunc error: ${o}`)}};return[...super.getProperties(t),new ee("ESCustomDiv","ESCustomDiv",[new $("显示","显示",!1,!1,[this,"show"]),new Gi("实例类","实例类",!0,!1,[this,"instanceClassStr"],Ty,$S),new Gi("innerHTML","注意设置此属性设置此属性会自动更新instanceClassStr变量",!0,!1,[this,"innerHTML"],Ln.defaultInnerHTML,Ln.innerHTMLReadMe),new Se("强制更新","强制更新",["string"],n,["(divClass, dom, viewer) => divClass.update && divClass.update()"]),new $("允许拾取","是否允许拾取",!0,!1,[this,"allowPicking"]),new de("容器ID","容器的ID,如果设置,CustomDiv将自动放入容器,否则放入各个视口中。",!0,!1,[this,"containerId"],Ln.defaults.containerId),new $("shadowDom","shadowDom",!1,!1,[this,"shadowDom"]),new $("cssAllInitial","cssAllInitial",!1,!1,[this,"cssAllInitial"]),new de("cssText","cssText",!1,!1,[this,"cssText"])])]}};D(Ln,"type",Ln.register("ESCustomDiv",Ln,{chsName:"ESCustomDiv",tags:["ESObjects"],description:"自定义div"})),D(Ln,"defaults",{...we.defaults,show:!0,containerId:""}),D(Ln,"defaultInnerHTML",`<!-- z-index样式需要设置,否则可能导致看不到!-->
354
+ <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>
355
+ `),D(Ln,"innerHTMLReadMe",`示例代码:
356
+ \`\`\`
357
+ ${Ln.defaultInnerHTML}
358
+ \`\`\`
359
+ `);let Co=Ln;(r=>{r.createDefaultProps=()=>({...we.createDefaultProps(),show:!0,instanceClassStr:void 0,innerHTML:void 0,allowPicking:void 0,containerId:void 0,shadowDom:!1,cssAllInitial:!1,cssText:""})})(Co||(Co={})),M.extendClassProps(Co.prototype,Co.createDefaultProps);const cs=class cs extends le{constructor(t){super(t);D(this,"_maxTime",this.dv(M.react(cs.defaults.maxTime)))}get typeName(){return"ESDataMesh"}get defaultProps(){return cs.createDefaultProps()}get maxTime(){return this._maxTime.value}get maxTimeChanged(){return this._maxTime.changed}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new ae("url","url",!1,!1,[this,"url"]),new H("maxTime","maxTime",!0,!0,[this,"maxTime"],cs.defaults.maxTime),new H("currentTime","currentTime",!1,!1,[this,"currentTime"]),new H("minPropValue","minPropValue",!1,!1,[this,"minPropValue"]),new H("maxPropValue","maxPropValue",!1,!1,[this,"maxPropValue"]),new ae("colorStops","colorStops",!0,!1,[this,"colorStops"],cs.defaults.colorStops)])]}};D(cs,"type",cs.register("ESDataMesh",cs,{chsName:"数值面着色",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"数值面着色"})),D(cs,"defaults",{...le.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 va=cs;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),url:"http://114.242.26.126:6003/ESDataMesh/water-assets2/",currentTime:0,minPropValue:0,maxPropValue:1,colorStops:M.reactJsonWithUndefined(void 0)})})(va||(va={})),M.extendClassProps(va.prototype,va.createDefaultProps);const To=class To extends Ae{constructor(t){super(t);D(this,"_distance",this.dv(M.react(0)));D(this,"editingBindMode","lineString");const n=()=>{if(this.points&&this.points.length>=2){const i=Fl(this.points,"GEODESIC"),o=i[i.length-1];this._distance.value=o}else this._distance.value=0};n(),this.d(this.pointsChanged.don(n))}get typeName(){return"ESGeoLineString"}get defaultProps(){return To.createDefaultProps()}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new H("长度","距离",!1,!0,[this,"distance"])],style:[new ee("点样式","点样式集合",[]),new $("开启","开启点样式",!1,!1,[this,"pointed"],!1),new H("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new ce("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new ge("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new ee("线样式","线样式集合",[]),new $("开启","开启线样式",!1,!1,[this,"stroked"],!0),new $("贴地","是否贴地(线)",!1,!1,[this,"strokeGround"]),new H("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new ce("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new ge("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1])]}}getProperties(t){return[...super.getProperties(t),new ee("计算","计算",[new H("距离","距离",!1,!0,[this,"distance"])])]}};D(To,"type",To.register("ESGeoLineString",To,{chsName:"地理折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理折线"})),D(To,"supportEditingModes",[...Ae.supportEditingModes,xe.LineStringAppend,xe.LineStringInsert]),D(To,"defaults",{...Ae.defaults,strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},stroked:!0});let gn=To;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps(),stroked:!0,strokeStyle:M.reactJson(r.defaults.strokeStyle)})})(gn||(gn={})),M.extendClassProps(gn.prototype,gn.createDefaultProps);const Ou=class Ou extends gn{get typeName(){return"ESDistanceMeasurement"}get defaultProps(){return Ou.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(Ou,"type",Ou.register("ESDistanceMeasurement",Ou,{chsName:"距离测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"距离测量"})),D(Ou,"defaults",{...gn.defaults,strokeStyle:{width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}});let ya=Ou;(r=>{r.createDefaultProps=()=>({...gn.createDefaultProps(),strokeStyle:M.reactJson(r.defaults.strokeStyle)})})(ya||(ya={})),M.extendClassProps(ya.prototype,ya.createDefaultProps);const Bs=class Bs extends ze{get typeName(){return"ESExcavate"}get defaultProps(){return Bs.createDefaultProps()}constructor(e){super(e),this.filled=!1}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ce("模式","mode",!1,!1,[this,"mode"],Bs.defaults.modes,"in"),new de("瓦片图层","targetID",!1,!1,[this,"targetID"],"")],style:[new ee("点样式","点样式集合",[]),new $("开启","开启点样式",!1,!1,[this,"pointed"],!1),new H("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new ce("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new ge("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new ee("线样式","线样式集合",[]),new $("开启","开启线样式",!1,!1,[this,"stroked"],!0),new H("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new ce("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new ge("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new $("是否贴地","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new ee("面样式","面样式集合",[]),new $("开启","开启填充样式",!1,!1,[this,"filled"],!0),new ge("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1]),new $("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1)]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ce("模式","mode",!1,!1,[this,"mode"],Bs.defaults.modes),new de("目标ID","targetID",!1,!1,[this,"targetID"])])]}};D(Bs,"type",Bs.register("ESExcavate",Bs,{chsName:"挖坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"挖坑"})),D(Bs,"defaults",{...ze.defaults,stroked:!1,ground:!0,modes:[["向内","in"],["向外","out"]],targetID:"",filled:!1});let Ls=Bs;(r=>{r.createDefaultProps=()=>({...ze.createDefaultProps(),mode:"in",targetID:"",filled:!1})})(Ls||(Ls={})),M.extendClassProps(Ls.prototype,Ls.createDefaultProps);const Mu=class Mu extends le{get typeName(){return"ESFireParticleSystem"}get defaultProps(){return Mu.createDefaultProps()}constructor(e){super(e)}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"general"}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ee("czm","czm",[new ql("图片","The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.",!1,!1,[this,"image"]),new Kt("偏移","translation",!1,!1,[this,"translation"])])])]}};D(Mu,"type",Mu.register("ESFireParticleSystem",Mu,{chsName:"粒子烟火",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子烟火"})),D(Mu,"defaults",{...le.defaults,image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:[0,0,0]});let ma=Mu;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),image:"",translation:M.reactArray([0,0,0])})})(ma||(ma={})),M.extendClassProps(ma.prototype,ma.createDefaultProps);const zs=class zs extends Xe{get typeName(){return"ESForestTileset"}get defaultProps(){return zs.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ae("路径","路径",!0,!1,[this,"url"]),new ae("treeTypes","类型为 { name: string, mesh: string, cullingDistance: number, scale: number }[]",!0,!1,[this,"treeTypes"],[]),new ae("xiaoBanWidget","类型为 { class: string, pivot: [number,number], space: number }",!0,!1,[this,"xiaoBanWidget"],zs.defaults.xiaoBanWidgetDefault,zs.defaults.XiaoBanWidgetSampleValue),new de("youShiSZ","youShiSZ",!1,!1,[this,"youShiSZ"]),new de("diLei","diLei",!1,!1,[this,"diLei"]),new de("senLinLB","senLinLB",!1,!1,[this,"senLinLB"]),new de("labelMaterial","labelMaterial",!1,!1,[this,"labelMaterial"]),new H("heightOffset","heightOffset",!1,!1,[this,"heightOffset"])])]}};D(zs,"type",zs.register("ESForestTileset",zs,{chsName:"森林切片图层",tags:["ESObjects","_ES_Impl_UE"],description:"ESForestTileset"})),D(zs,"defaults",{...Xe.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:`
360
+ ## 参数类型为 ESTreeType
361
+ \`\`\`js
362
+
363
+ type ESJVector2D = [number, number]
364
+
365
+ type ESTreeType = {
366
+ class: string,
367
+ pivot: ESJVector2D,
368
+ space: number
369
+ }
370
+
371
+ \`\`\`
372
+ `,TreeTypeSampleValue:`
373
+ ## 参数类型为 ESTreeType[]
374
+ \`\`\`js
375
+
376
+ type ESTreeType = {
377
+ name: string,
378
+ mesh: string,
379
+ cullingDistance: number,
380
+ scale: number
381
+ }
382
+
383
+ \`\`\`
384
+ `});let _a=zs;(r=>{r.createDefaultProps=()=>({...Xe.createDefaultProps(),url:"",treeTypes:M.reactJsonWithUndefined(void 0),xiaoBanWidget:M.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})})(_a||(_a={})),M.extendClassProps(_a.prototype,_a.createDefaultProps);const Ny=`class MyDiv {
385
+ // container是Poi的div
386
+ // geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
387
+ // viewer指定当前的视口
388
+ constructor(container, eSGeoDiv, viewer) {
389
+ this._container = container;
390
+ this._div = document.createElement('div');
391
+ this._container.appendChild(this._div);
392
+
393
+ this._div.style.width = '300px';
394
+ this._div.style.height = '50px';
395
+ this._div.style.background = 'rgba(120, 120, 0, 0.7)';
396
+ this._div.style.color = 'white';
397
+ this._div.style.fontSize = '30px';
398
+ this._div.style.lineHeight = '50px';
399
+ this._div.style.border = '1px solid white';
400
+ this._div.innerText = 'Hello world!';
401
+ }
402
+
403
+ // 随机背景颜色,仅用于测试外部强制更新,此函数非必需
404
+ update() {
405
+ const r = (255 * Math.random()) | 0;
406
+ const g = (255 * Math.random()) | 0;
407
+ const b = (255 * Math.random()) | 0;
408
+ this._div.style.background = \`rgba(\${r}, \${g}, \${b}, 0.8)\`;
409
+ }
410
+
411
+ // 销毁函数,注意此函数必需,否则会报错!
412
+ destroy() {
413
+ this._container.removeChild(this._div);
414
+ }
415
+ }`,ZS=`示例代码:
416
+ \`\`\`
417
+ ${Ny}
418
+ \`\`\`
419
+ `,Dy=`<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>
420
+ `,tr=class tr extends le{constructor(t){super(t);D(this,"combinationClass",!0);D(this,"_widgetEvent",this.dv(new M.Event));D(this,"_echartsFunReact",this.dv(M.react(void 0)));D(this,"_instanceClassReact",this.dv(M.react(void 0)));const n=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};n(),this.d(this.instanceClassStrChanged.don(n));{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const o=`class MyDiv {
421
+ // container是Poi的div
422
+ // geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
423
+ // viewer指定当前的视口
424
+ constructor(container, eSGeoDiv, viewer) {
425
+ this._container = container;
426
+ this._div = document.createElement('div');
427
+ this._div.style.position = 'relative';
428
+ this._container.appendChild(this._div);
429
+ this._div.innerHTML = \`${this.innerHTML}\`;
430
+ }
431
+
432
+ // 销毁函数,注意此函数必需,否则会报错!
433
+ destroy() {
434
+ this._container.removeChild(this._div);
435
+ }
436
+ }`;this.instanceClassStr=o};i(),this.d(this.innerHTMLChanged.don(i))}}get typeName(){return"ESGeoDiv"}get defaultProps(){return tr.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 H("透明度","透明度",!0,!1,[this,"opacity"],tr.defaults.opacity),new H("zOrder","zOrder",!0,!1,[this,"zOrder"],tr.defaults.zOrder),new at("偏移比例","偏移比例.",!0,!1,[this,"anchor"],tr.defaults.anchor),new Gi("innerHTML","注意设置此属性设置此属性会自动更新instanceClassStr变量",!0,!1,[this,"innerHTML"],tr.defaults.innerHTML),new Gi("实例类","实例类",!0,!1,[this,"instanceClassStr"],tr.defaults.instanceClassStr,tr.defaults.instanceClassStrReadMe)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new at("偏移比例","偏移比例.",!0,!1,[this,"anchor"],tr.defaults.anchor),new H("透明度","透明度",!0,!1,[this,"opacity"],tr.defaults.opacity),new Gi("实例类","实例类",!0,!1,[this,"instanceClassStr"],tr.defaults.instanceClassStr,tr.defaults.instanceClassStrReadMe),new Gi("innerHTML","注意设置此属性设置此属性会自动更新instanceClassStr变量",!0,!1,[this,"innerHTML"],tr.defaults.innerHTML),new H("zOrder","zOrder",!0,!1,[this,"zOrder"],tr.defaults.zOrder)])]}};D(tr,"type",tr.register("ESGeoDiv",tr,{chsName:"ESGeoDiv",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESGeoDiv"})),D(tr,"defaults",{...le.defaults,opacity:1,anchor:[.5,1],instanceClassStr:Ny,instanceClassStrReadMe:ZS,innerHTML:Dy,zOrder:0});let ba=tr;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),opacity:1,anchor:M.reactArray([.5,1]),instanceClassStr:void 0,innerHTML:Dy,zOrder:0})})(ba||(ba={})),M.extendClassProps(ba.prototype,ba.createDefaultProps);const No=class No extends Ae{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 No.createDefaultProps()}toPolygon(){if(this.points&&this.points.length>=2){const t=[...this.points][0],n=[...this.points][1];return[t,[t[0],n[1],t[2]],n,[n[0],t[1],n[2]]]}else return}_updateArea(){if(this.points&&this.points.length>=2){const t=[...this.points],n=t[0],i=t[1],o=[n,[n[0],i[1],n[2]],i,[i[0],n[1],i[2]]];this._area.value=ld(o)}else this._area.value=0}_updatePerimeter(){if(this.points&&this.points.length>=2){const t=[...this.points],n=t[0],i=t[1],o=[n,[n[0],i[1],n[2]],i,[i[0],n[1],i[2]]],s=[...o,o[0]],a=Fl(s,"NONE"),c=a[a.length-1];this._perimeter.value=c}else this._perimeter.value=0}getESProperties(){const t=super.getESProperties();return{...t,coordinate:[...t.coordinate,new H("面积","面积",!1,!0,[this,"area"]),new H("周长","周长",!1,!0,[this,"perimeter"])]}}getProperties(t){return[...super.getProperties(t),new ee("计算","计算",[new H("面积","面积",!1,!0,[this,"area"]),new H("周长","周长",!1,!0,[this,"perimeter"])])]}};D(No,"type",No.register("ESGeoRectangle",No,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),D(No,"supportEditingModes",[...Ae.supportEditingModes,xe.DoublePointsAppend,xe.DoublePointsModify]),D(No,"defaults",{...Ae.defaults});let wa=No;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps()})})(wa||(wa={})),M.extendClassProps(wa.prototype,wa.createDefaultProps);const Vd={translationX:0,translationY:0,translationZ:0,rotationHeading:0,rotationPitch:0,rotationRoll:0,scaleX:1,scaleY:1,scaleZ:1},hs=class hs extends le{constructor(t){super(t);D(this,"_nodeTransformations",this.dv(M.react(void 0)));D(this,"_czmModelReadyEvent",this.dv(new M.Event));D(this,"_setNodePositionEvent",this.dv(new M.Event));D(this,"_setNodeRotationEvent",this.dv(new M.Event));D(this,"_setNodeScaleEvent",this.dv(new M.Event));D(this,"_printDebugInfoEvent",this.dv(new M.Event));D(this,"setMaterialInfoEvent",this.ad(new M.Event));D(this,"_setMaterialEvent",this.disposeVar(new M.Event))}get typeName(){return"ESGltfModel"}get defaultProps(){return hs.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 n={...this.nodeTransformations};delete n[t],this.nodeTransformations=n}get setNodePositionEvent(){return this._setNodePositionEvent}setNodePosition(t,n){this._setNodePositionEvent.emit(t,n),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[t]??{...Vd};if(n.some(o=>!Number.isFinite(o))){console.error(`setNodePosition error: ${t} ${n}`);return}this._nodeTransformations.value={...this.nodeTransformations,[t]:{...i,translationX:n[0],translationY:n[1],translationZ:n[2]}}}get setNodeRotationEvent(){return this._setNodeRotationEvent}setNodeRotation(t,n){this._setNodeRotationEvent.emit(t,n),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[t]??{...Vd};if(n.some(o=>!Number.isFinite(o))){console.error(`setNodeRotation error: ${t} ${n}`);return}this._nodeTransformations.value={...this.nodeTransformations,[t]:{...i,rotationHeading:n[0],rotationPitch:n[1],rotationRoll:n[2]}}}get setNodeScaleEvent(){return this._setNodeScaleEvent}setNodeScale(t,n){this._setNodeScaleEvent.emit(t,n),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[t]??{...Vd};if(n.some(o=>!Number.isFinite(o)||o<0)){console.error(`setNodeScale error: !Number.isFinite(e) || e < 0 ${t} ${n}`);return}this._nodeTransformations.value={...this.nodeTransformations,[t]:{...i,scaleX:n[0],scaleY:n[1],scaleZ:n[2]}}}getNodePosition(t){if(!this.nodeTransformations)return;const n=this.nodeTransformations[t];if(n)return[n.translationX,n.translationY,n.translationZ]}getNodeRotation(t){if(!this.nodeTransformations)return;const n=this.nodeTransformations[t];if(n)return[n.rotationHeading,n.rotationPitch,n.rotationRoll]}getNodeScale(t){if(!this.nodeTransformations)return;const n=this.nodeTransformations[t];if(n)return[n.scaleX,n.scaleY,n.scaleZ]}get printDebugInfoEvent(){return this._printDebugInfoEvent}printDebugInfo(){this._printDebugInfoEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(t){return new Promise(n=>{const i=new M.Destroyable;i.ad(this.setMaterialInfoEvent.donce(o=>{i.destroy(),n(o)})),this._setMaterialEvent.emit(t)})}setLight122(){this.czmEnvironmentMapManager={...Ld}}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",dataSource:[...t.dataSource,new ae("模型路径","模型路径地址",!0,!1,[this,"url"],hs.defaults.url),new ae("实例化矩阵","实例化矩阵",!0,!1,[this,"instances"],hs.defaults.instances)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new ae("模型路径","模型路径地址",!1,!1,[this,"url"]),new ee("czm","czm",[new at("czmImageBasedLightingFactor","反射强度 ,imageBasedLightingFactor",!1,!1,[this,"czmImageBasedLightingFactor"]),new H("czmAtmosphereScatteringIntensity","大气散射强度 ,atmosphereScatteringIntensity",!1,!1,[this,"czmAtmosphereScatteringIntensity"]),new ae("czmEnvironmentMapManager","动态环境贴图管理器",!1,!1,[this,"czmEnvironmentMapManager"]),new Se("控制台输出模型信息","控制台输出模型信息",[],()=>this.printDebugInfo(),[]),new H("最大缩放比例","最大缩放值",!0,!1,[this,"czmMaximumScale"]),new H("统一缩放值","统一缩放值",!1,!1,[this,"czmNativeScale"]),new H("最小像素尺寸","最小像素尺寸,若为0表示不使用最小像素尺寸。",!1,!1,[this,"czmMinimumPixelSize"]),new ge("颜色"," A Property specifying the color.",!1,!1,[this,"czmColor"]),new ae("实例化矩阵","实例化矩阵",!0,!1,[this,"instances"],hs.defaults.instances)])])]}};D(hs,"type",hs.register("ESGltfModel",hs,{chsName:"模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"gltf模型"})),D(hs,"defaults",{...le.defaults,url:"${earthsdk3-assets-script-dir}/assets/glb/building.glb",instances:[]});let Ea=hs;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),url:r.defaults.url,czmMaximumScale:void 0,czmMinimumPixelSize:0,czmNativeScale:1,czmColor:M.reactArray([1,1,1,1]),allowPicking:!0,instances:M.reactArrayWithUndefined(void 0),czmImageBasedLightingFactor:M.reactArray([1,1]),czmAtmosphereScatteringIntensity:2,czmEnvironmentMapManager:M.reactJsonWithUndefined(void 0)})})(Ea||(Ea={})),M.extendClassProps(Ea.prototype,Ea.createDefaultProps);const Fn=class Fn extends le{constructor(t){super(t);D(this,"_aiMoveToEvent",this.dv(new M.Event));D(this,"_stopAIMoveEvent",this.dv(new M.Event))}get typeName(){return"ESHuman"}get defaultProps(){return Fn.createDefaultProps()}get aiMoveToEvent(){return this._aiMoveToEvent}aiMoveTo(t,n){this._aiMoveToEvent.emit(t,n)}get stopAIMoveEvent(){return this._stopAIMoveEvent}stopAIMove(){this._stopAIMoveEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ce("模式","mode",!0,!1,[this,"mode"],Fn.defaults.modes,Fn.defaults.mode),new ce("动画","animation",!0,!1,[this,"animation"],Fn.defaults.animations,Fn.defaults.animation)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new Se("自动寻路","aiMoveTo",["numbers","number"],(n,i)=>this.aiMoveTo(n,i),[[0,0,0],0]),new Se("stopAIMove","stopAIMove",[],()=>this.stopAIMove(),[]),new ce("mode","mode",!1,!1,[this,"mode"],Fn.defaults.modes),new ce("动画","animation",!1,!1,[this,"animation"],Fn.defaults.animations)])]}};D(Fn,"type",Fn.register("ESHuman",Fn,{chsName:"人员",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"工人 警察 路人"})),D(Fn,"defaults",{...le.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 ss=Fn;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),mode:"worker",animation:"standing",allowPicking:!0})})(ss||(ss={})),M.extendClassProps(ss.prototype,ss.createDefaultProps);const fs=class fs extends jt{get typeName(){return"ESImageLabel"}get defaultProps(){return fs.createDefaultProps()}constructor(e){super(e),this.anchor=fs.defaults.anchor,this.renderMode=fs.defaults.renderMode}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ae("图片路径","图片路径",!1,!1,[this,"url"],fs.defaults.url)]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ae("图片路径","图片路径",!1,!1,[this,"url"])])]}};D(fs,"type",fs.register("ESImageLabel",fs,{chsName:"图片标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"基础图片标签。"})),D(fs,"defaults",{...jt.defaults,url:"inner://CameraBlue.png",anchor:[.5,1],renderMode:4});let Pa=fs;(r=>{r.createDefaultProps=()=>({...jt.createDefaultProps(),url:"inner://CameraBlue.png"})})(Pa||(Pa={})),M.extendClassProps(Pa.prototype,Pa.createDefaultProps);const Ay=`
437
+ # 声明文件
438
+ ### options 类型
439
+ \`\`\`javascript
440
+ export type ESImageryLayerOptionsType =
441
+ {
442
+ "type": "tms";
443
+ "fileExtension"?: string;
444
+ "credit"?: string;
445
+ "tilingScheme"?: ESTilingSchemaJsonType;
446
+ "ellipsoid"?: [x: number, y: number, z: number];
447
+ "tileWidth"?: number;
448
+ "tileHeight"?: number;
449
+ "flipXY"?: boolean;
450
+ } |
451
+ {
452
+ type: 'xyz';
453
+ subdomains?: string | string[];
454
+ credit?: string;
455
+ tilingScheme?: ESTilingSchemaJsonType;
456
+ ellipsoid?: [x: number, y: number, z: number];
457
+ tileWidth?: number;
458
+ tileHeight?: number;
459
+ hasAlphaChannel?: boolean;
460
+ pickFeaturesUrl?: string;
461
+ enablePickFeatures?: boolean;
462
+ urlSchemeZeroPadding?: JsonValue,
463
+ customTags?: { [k: string]: string };
464
+ } |
465
+ {
466
+ type: 'wms';
467
+ layers: string;
468
+ parameters?: JsonValue,
469
+ getFeatureInfoParameters?: JsonValue,
470
+ enablePickFeatures?: boolean,
471
+ tilingScheme?: ESTilingSchemaJsonType;
472
+ ellipsoid?: [x: number, y: number, z: number];
473
+ tileWidth?: number;
474
+ tileHeight?: number;
475
+ crs?: string,
476
+ srs?: string,
477
+ credit?: string;
478
+ subdomains?: string | string[];
479
+ times?: ESJTimeIntervalCollectionJsonType;
480
+ getFeatureInfoUrl?: string
481
+ } |
482
+ {
483
+ type: 'wmts';
484
+ format?: string;
485
+ layer: string;
486
+ style: string;
487
+ tileMatrixSetID: string;
488
+ tileMatrixLabels?: string[];
489
+ times?: ESJTimeIntervalCollectionJsonType;
490
+ dimensions?: JsonValue;
491
+ tileWidth?: number;
492
+ tileHeight?: number;
493
+ tilingScheme?: ESTilingSchemaJsonType;
494
+ ellipsoid?: [x: number, y: number, z: number];
495
+ credit?: string;
496
+ subdomains?: string | string[];
497
+ } |
498
+ {
499
+ type: 'ion';
500
+ accessToken?: string,
501
+ server?: string
502
+ }
503
+ \`\`\`
504
+
505
+ ### tilingSchema类型
506
+ \`\`\`javascript
507
+ export type ESTilingSchemaJsonType = {
508
+ "type": "WebMercatorTilingScheme";
509
+ "ellipsoid"?: [x: number, y: number, z: number];
510
+ "numberOfLevelZeroTilesX"?: number; .
511
+ "numberOfLevelZeroTilesY"?: number;
512
+ "rectangleSouthwestInMeters"?: [number, number];
513
+ "rectangleNortheastInMeters"?: [number, number];
514
+ } | {
515
+ "type": "GeographicTilingScheme";
516
+ "ellipsoid"?: [x: number, y: number, z: number];
517
+ "rectangle"?: [west: number, south: number, east: number, north: number];
518
+ "numberOfLevelZeroTilesX"?: number;
519
+ "numberOfLevelZeroTilesY"?: number;
520
+ }
521
+ \`\`\`
522
+
523
+ ### times类型
524
+ \`\`\`javascript
525
+ export type ESJTimeIntervalCollectionJsonType = {
526
+ type: 'fromIso8601';
527
+ iso8601: string;
528
+ isStartIncluded?: boolean;
529
+ isStopIncluded?: boolean;
530
+ leadingInterval?: boolean;
531
+ trailingInterval?: boolean;
532
+ } | {
533
+ type: 'fromIso8601DateArray';
534
+ iso8601Dates?: string[];
535
+ isStartIncluded?: boolean;
536
+ isStopIncluded?: boolean;
537
+ leadingInterval?: boolean;
538
+ trailingInterval?: boolean;
539
+ };
540
+
541
+ \`\`\`
542
+ `,jn=class jn extends Xe{get typeName(){return"ESImageryLayer"}get defaultProps(){return jn.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new H("层级序号","层级序号",!1,!1,[this,"zIndex"],jn.defaults.zIndex)],dataSource:[...e.dataSource,new ae("影像服务地址","影像服务地址",!1,!1,[this,"url"]),new kr("矩形范围","西南东北",!0,!1,[this,"rectangle"],jn.defaults.rectangle),new ut("最大级别","最大级别.",!0,!1,[this,"maximumLevel"],1,[1,24],jn.defaults.maximumLevel),new ae("options","options",!0,!1,[this,"options"],jn.defaults.options),new de("targetID","targetID",!1,!1,[this,"targetID"],""),new ut("opacity","opacity",!1,!1,[this,"opacity"],.01,[0,1],1)]}}getProperties(e){return[...super.getProperties(e),new ee("ESImageryLayer","ESImageryLayer",[new ae("影像服务地址","影像服务地址",!1,!1,[this,"url"]),new ee("通用","通用",[new kr("矩形范围","西南东北",!0,!1,[this,"rectangle"],jn.defaults.rectangle),new H("高度","A numeric Property specifying the height.",!1,!1,[this,"height"]),new H("zIndex","层级",!1,!1,[this,"zIndex"]),new de("actorTag","actorTag",!1,!1,[this,"actorTag"]),new de("componentTag","componentTag",!1,!1,[this,"componentTag"]),new H("minimumLevel","minimumLevel",!1,!1,[this,"minimumLevel"]),new H("maximumLevel","maximumLevel",!1,!1,[this,"maximumLevel"]),new ae("options","options",!0,!1,[this,"options"],{},Ay),new de("targetID","targetID",!1,!1,[this,"targetID"]),new ut("opacity","opacity",!1,!1,[this,"opacity"],.01,[0,1],1)]),new ee("czm","czm",[new ce("czmSplitDirection","The ImagerySplitDirection split to apply to this layer.",!1,!1,[this,"czmSplitDirection"],jn.defaults.czmSplitDirectionEnum),new H("透明度","透明度,The alpha blending value of this layer, from 0.0 to 1.0.",!1,!1,[this,"czmAlpha"]),new H("亮度","亮度,The brightness of this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmBrightness"]),new H("对比度","对比度,The contrast of this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmContrast"]),new H("色相","色相,The hue of this layer. 0.0 uses the unmodified imagery color. ",!1,!1,[this,"czmHue"]),new H("饱和度","饱和度,The saturation of this layer. 1.0 uses the unmodified imagery color. ",!1,!1,[this,"czmSaturation"]),new H("伽马值","伽马,The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmGamma"])])])]}};D(jn,"type",jn.register("ESImageryLayer",jn,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"影像图层"})),D(jn,"defaults",{...Xe.defaults,url:"",rectangle:[-180,-90,180,90],options:{},zIndex:0,actorTag:"",componentTag:"",minimumLevel:0,maximumLevel:22,targetID:"",opacity:1,czmSplitDirection:"NONE",czmSplitDirectionEnum:[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]],czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,czmSubdomains:[]});let Sa=jn;(r=>{r.createDefaultProps=()=>({...Xe.createDefaultProps(),url:"",rectangle:M.reactJsonWithUndefined(void 0),options:M.reactJsonWithUndefined(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",opacity:1,czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1})})(Sa||(Sa={})),M.extendClassProps(Sa.prototype,Sa.createDefaultProps);const yn=class yn extends le{get typeName(){return"ESLocalSkyBox"}get defaultProps(){return yn.createDefaultProps()}constructor(e){super(e),this.collision=!1,this.allowPicking=!1}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new H("尺寸","圆直径或包围盒边长",!1,!1,[this,"size"],yn.defaults.size),new $("自动跟随","是否跟随相机",!1,!1,[this,"autoFollow"],yn.defaults.autoFollow),new ce("mode","模式",!1,!1,[this,"mode"],yn.defaults.modes,"blueSky")]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new H("size","圆直径或包围盒边长",!1,!1,[this,"size"],yn.defaults.size),new $("autoFollow","是否跟随相机(自动跟随效果为渐变,会在5000米左右消失)",!1,!1,[this,"autoFollow"],yn.defaults.autoFollow),new H("autoOpacityFactor","自动消失系数",!1,!1,[this,"autoOpacityFactor"],yn.defaults.autoOpacityFactor),new ce("mode","模式",!1,!1,[this,"mode"],yn.defaults.modes)])]}};D(yn,"type",yn.register("ESLocalSkyBox",yn,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),D(yn,"defaults",{...le.defaults,size:1e4,autoFollow:!0,autoOpacityFactor:2,modes:[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]});let Ca=yn;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky"})})(Ca||(Ca={})),M.extendClassProps(Ca.prototype,Ca.createDefaultProps);const Iu=class Iu extends le{get typeName(){return"ESLocationMeasurement"}get defaultProps(){return Iu.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e)]}};D(Iu,"type",Iu.register("ESLocationMeasurement",Iu,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"位置测量点"})),D(Iu,"defaults",{...le.defaults});let xa=Iu;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps()})})(xa||(xa={})),M.extendClassProps(xa.prototype,xa.createDefaultProps);const rr=class rr extends le{constructor(t){super(t);D(this,"_player",this.dv(new Ti));{const n=rr.defaults;this.d(M.bind([this._player,"loop"],[this,"playingLoop"],i=>i??n.playingLoop,i=>i??n.playingLoop)),this.d(M.bind([this._player,"currentTime"],[this,"currentTime"],i=>i??n.currentTime,i=>i??n.currentTime)),this.d(M.bind([this._player,"duration"],[this,"duration"],i=>i??n.duration,i=>i??n.duration)),this.d(M.bind([this._player,"playing"],[this,"playing"],i=>i??n.playing,i=>i??n.playing)),this.d(M.bind([this._player,"speed"],[this,"playingSpeed"],i=>i??n.playingSpeed,i=>i??n.playingSpeed))}}get typeName(){return"ESParticleSystemPrimitive"}get defaultProps(){return rr.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 ee("通用","通用",[new Se("飞入","飞入",["number"],n=>this.flyTo(n),[1e3]),new Gi("更新回调函数","The callback function to be called each frame to update a particle.",!0,!1,[this,"updateCallback"]),new H("发射率","emissionRate,The number of particles to emit per second.",!0,!1,[this,"emissionRate"],5),new $("是否循环","loop,Whether the particle system should loop its bursts when it is complete.",!0,!1,[this,"loop"],!0),new H("等级","scale,Sets the scale to apply to the image of the particle for the duration of its particleLife.",!0,!1,[this,"particleScale"],1),new H("初始等级","startScale,The initial scale to apply to the image of the particle at the beginning of its life.",!0,!1,[this,"startScale"]),new H("结束等级","endScale,The final scale to apply to the image of the particle at the end of its life.",!0,!1,[this,"endScale"],rr.defaults.endScale),new ge("颜色","Sets the color of a particle for the duration of its particleLife.",!0,!1,[this,"color"]),new ge("初始颜色","The color of the particle at the beginning of its life.",!0,!1,[this,"startColor"]),new ge("结束颜色","The color of the particle at the end of its life.",!0,!1,[this,"endColor"]),new $("尺寸单位为米","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 H("速度","speed,If set, overrides the minimumSpeed and maximumSpeed inputs with this value.",!0,!1,[this,"speed"],1),new H("最小速度","minimumSpeed,Sets the minimum bound in meters per second above which a particles actual speed will be randomly chosen.",!0,!1,[this,"minimumSpeed"]),new H("最大速度","maximumSpeed,Sets the maximum bound in meters per second below which a particles actual speed will be randomly chosen.",!0,!1,[this,"maximumSpeed"]),new H("生命周期","lifetime,How long the particle system will emit particles, in seconds.",!0,!1,[this,"lifetime"],Number.MAX_VALUE),new H("粒子生命周期","particleLife,If set, overrides the minimumParticleLife and maximumParticleLife inputs with this value.",!0,!1,[this,"particleLife"],rr.defaults.particleLife),new H("最小粒子生命周期","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 H("最大粒子生命周期","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 H("块数量","mass,Sets the minimum and maximum mass of particles in kilograms.",!0,!1,[this,"mass"],1),new H("最小块数量","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 H("最大块数量","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 at("图片尺寸","imageSize",!0,!1,[this,"imageSize"],rr.defaults.imageSize),new at("最小图片尺寸","minimumImageSize",!0,!1,[this,"minimumImageSize"]),new at("最大图片尺寸","maximumImageSize",!0,!1,[this,"maximumImageSize"]),new ql("图片","The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.",!0,!1,[this,"image"],rr.defaults.image),new Kt("偏移","translation",!0,!1,[this,"translation"],[0,0,0]),new gf("bursts","bursts",!0,!1,[this,"bursts"]),new ae("emitter","emitter",!1,!1,[this,"emitter"],rr.defaults.emitter)]),new ee("播放器","播放器",[new H("播放比率","播放比率(0-1)",!0,!1,[this,"ratio"],rr.defaults.ratio),new Jc("播放器","播放器",[this,"playing"],[this,"ratio"],[this,"playingLoop"]),new $("是否循环","是否循环.",!0,!1,[this,"playingLoop"],rr.defaults.playingLoop),new H("当前时间","当前时间",!0,!1,[this,"currentTime"],rr.defaults.currentTime),new H("过渡时间","过渡时间",!0,!1,[this,"duration"],rr.defaults.duration),new $("是否播放","是否播放.",!0,!1,[this,"playing"],rr.defaults.playing),new H("播放速度","播放速度.",!0,!1,[this,"playingSpeed"],rr.defaults.playingSpeed)])]}};D(rr,"type",rr.register("ESParticleSystemPrimitive",rr,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"})),D(rr,"defaults",{...le.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 Oa=rr;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),emitter:M.reactJsonWithUndefined(void 0),bursts:M.reactArrayCollectionWithUndefined(void 0),translation:M.reactArrayWithUndefined(void 0),positionEditing:void 0,image:void 0,imageSize:M.reactArrayWithUndefined(void 0),minimumImageSize:M.reactArrayWithUndefined(void 0),maximumImageSize:M.reactArrayWithUndefined(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:void 0,color:M.reactArrayWithUndefined(void 0),startColor:M.reactArrayWithUndefined(void 0),endColor:M.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})})(Oa||(Oa={})),M.extendClassProps(Oa.prototype,Oa.createDefaultProps);const mn=class mn extends jt{constructor(t){super(t);D(this,"initialStyle",this.ad(M.reactJsonWithUndefined(void 0)));D(this,"_getInitialStyleEvent",this.disposeVar(new M.Event))}get typeName(){return"ESPoi2D"}get defaultProps(){return mn.createDefaultProps()}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(t=>{const n=this.d(this.initialStyle.changed.disposableOnce(t));this.getInitialStyleEvent.emit(),setTimeout(()=>{n(),t(void 0)},2e3)})])}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ce("模式","mode",!1,!1,[this,"mode"],mn.defaults.modes,mn.defaults.mode),new ae("样式","style",!1,!1,[this,"style"],mn.defaults.style),new $("自动锚点对齐","autoAnchor",!1,!1,[this,"autoAnchor"],mn.defaults.autoAnchor)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new ce("模式","mode",!1,!1,[this,"mode"],mn.defaults.modes),new ae("样式","style",!1,!1,[this,"style"],mn.defaults.style),new $("自动锚点对齐","autoAnchor",!1,!1,[this,"autoAnchor"],mn.defaults.autoAnchor)])]}};D(mn,"type",mn.register("ESPoi2D",mn,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),D(mn,"defaults",{...jt.defaults,modes:[["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"],["UCVertical","UCVertical"]],mode:"SquareH01",style:{},autoAnchor:!0});let os=mn;(r=>{r.createDefaultProps=()=>({...jt.createDefaultProps(),mode:"SquareH01",style:M.reactJson({}),autoAnchor:!0})})(os||(os={})),M.extendClassProps(os.prototype,os.createDefaultProps);const Ai=class Ai extends le{get typeName(){return"ESPoi3D"}get defaultProps(){return Ai.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ce("模式","mode",!1,!1,[this,"mode"],Ai.defaults.modes),new ae("样式","style",!1,!1,[this,"style"],Ai.defaults.style)]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ce("模式","mode",!1,!1,[this,"mode"],Ai.defaults.modes),new ae("样式","style",!1,!1,[this,"style"],Ai.defaults.style)])]}};D(Ai,"type",Ai.register("ESPoi3D",Ai,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),D(Ai,"defaults",{...le.defaults,modes:[["三角形","triangle"],["菱形","diamond"]],mode:"triangle",style:{UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]}});let Ma=Ai;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),mode:"triangle",style:M.reactJson(r.defaults.style)})})(Ma||(Ma={})),M.extendClassProps(Ma.prototype,Ma.createDefaultProps);const Tu=class Tu extends ze{constructor(t){super(t);D(this,"_czmFlattenedPlaneId",this.disposeVar(M.react("")));this.filled=!1}get typeName(){return"ESPolygonFlattenedPlane"}get defaultProps(){return Tu.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 de("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new de("瓦片图层","targetID",!1,!1,[this,"targetID"])])]}};D(Tu,"type",Tu.register("ESPolygonFlattenedPlane",Tu,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"})),D(Tu,"defaults",{...ze.defaults});let Ia=Tu;(r=>{r.createDefaultProps=()=>({...ze.createDefaultProps(),targetID:""})})(Ia||(Ia={})),M.extendClassProps(Ia.prototype,Ia.createDefaultProps);const Ry=async(r,e,t)=>{const{viewer:n}=r;if(!n){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"AddTrees",p:{id:e,TreeParams:t}});return i.error&&console.error("AddTrees:",i.error),i},Ly=async(r,e)=>{const{viewer:t}=r;if(!t){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const n=await t.callUeFunc({f:"RemoveAllTrees",p:{id:e}});return n.error&&console.error("RemoveAllTrees:",n.error),n},Fy=async(r,e,t)=>{const{viewer:n}=r;if(!n){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"UpdateTreeParams",p:{id:e,TreeParams:t}});return i.error&&console.error("UpdateTreeParams:",i.error),i},jy=async(r,e,t,n)=>{const{viewer:i}=r;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const o=await i.callUeFunc({f:"CutDownTrees",p:{id:e,TreeIds:t,TimeLength:n}});return o.error&&console.error("CutDownTrees:",o.error),o},ky=async(r,e,t,n,i)=>{const{viewer:o}=r;if(!o){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const s=await o.callUeFunc({f:"GrowthSimulation",p:{id:e,ToParams:t,SwitchTime:i,TimeLength:n}});return s.error&&console.error("GrowthSimulation:",s.error),s},Nu=class Nu extends Xe{constructor(t){super(t);D(this,"_addTreesEvent",this.dv(new M.Event));D(this,"_removeAllTreesEvent",this.dv(new M.Event));D(this,"_updateTreeParamsEvent",this.dv(new M.Event));D(this,"_cutDownTreesEvent",this.dv(new M.Event));D(this,"_growthSimulationEvent",this.dv(new M.Event))}get typeName(){return"ESSeparateFoliage"}get defaultProps(){return Nu.createDefaultProps()}async addTreesCallFunc(t,n){return await Ry(t,this.id,n)}async updateTreeParamsCallFunc(t,n){return await Fy(t,this.id,n)}async cutDownTreesCallFunc(t,n,i){return await jy(t,this.id,n,i)}async removeAllTreesCallFunc(t){return await Ly(t,this.id)}async growthSimulationCallFunc(t,n,i,o){return await ky(t,this.id,n,i,o)}async getIdByComponentNameAndHitItem(t,n,i){return await t.getIdByComponentNameAndHitItem(this.id,n,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,n){this._cutDownTreesEvent.emit(t,n)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(t,n,i){this._growthSimulationEvent.emit(t,n,i)}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new ae("treeTypes","类型为 { name: string, meshPath: string }[]",!0,!1,[this,"treeTypes"],[],"{ name: string, meshPath: string }[]"),new H("树桩id","树桩id",!1,!1,[this,"stumpId"]),new H("动画间隔时间","动画间隔时间",!1,!1,[this,"intervalTime"]),new H("切换间隔时间","切换间隔时间",!1,!1,[this,"switchIntervalTime"])])]}};D(Nu,"type",Nu.register("ESSeparateFoliage",Nu,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"})),D(Nu,"defaults",{...Xe.defaults,treeTypes:[],stumpId:-1,intervalTime:.1,switchIntervalTime:.5});let Ta=Nu;(r=>{r.createDefaultProps=()=>({...Xe.createDefaultProps(),treeTypes:M.reactJsonWithUndefined(void 0),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})})(Ta||(Ta={})),M.extendClassProps(Ta.prototype,Ta.createDefaultProps);function ef(r,e,t){const n="buffer"in r,i=n?r.buffer:r;n&&(e+=r.byteOffset);const o=new Array(t),s=new DataView(i);for(let a=0;a<t;++a){const c=s.getUint8(e+a);o[a]=String.fromCharCode(c)}return o.join("")}function tf(r,e){const t="buffer"in r,n=t?r.buffer:r;return t&&(e+=r.byteOffset),new DataView(n).getUint32(e,!0)}function Gy(r,e,t){const n="buffer"in r,i=n?r.buffer:r;if(n&&(e+=r.byteOffset),e+t>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,e,t)}function eC(r,e,t){const n="buffer"in r,i=n?r.buffer:r;if(n&&(e+=r.byteOffset),e+t*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,e,t)}function tC(r,e,t){const n="buffer"in r,i=n?r.buffer:r;if(n&&(e+=r.byteOffset),e+t*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,e,t)}function rC(r,e,t){const n="buffer"in r,i=n?r.buffer:r;if(n&&(e+=r.byteOffset),e+t*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,e,t)}function Vy(r){if(ef(r,0,4)!=="glTF"){console.error("Not a glTF file");return}const t=tf(r,4);if(t!==2){console.error("Unsupported glTF version");return}const n=tf(r,8);if(n!==r.byteLength){console.error("Invalid glTF length");return}const i=tf(r,12);if(i+12+4>n){console.error("Invalid glTF chunk length");return}if(ef(r,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const s=ef(r,20,i),a={version:t,length:n,gltfJson:s};do{if(20+i>=r.byteLength)break;const c=tf(r,20+i);if(ef(r,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const m=Gy(r,20+i+8,c);a.gltfBinary=m}while(!1);return a}window.parseGlb=Vy;function By(r){const e=Vy(r);if(e===void 0||!e.gltfBinary)return;const t=JSON.parse(e.gltfJson);return t.nodes.map(n=>{var i=t.meshes[n.mesh],o=i.primitives[0].attributes.POSITION,s=i.primitives[0].indices,a=t.accessors[o],c=t.bufferViews[a.bufferView];if(!e.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const f=rC(e.gltfBinary,c.byteOffset??0,c.byteLength/4);var m=t.accessors[s],p=t.bufferViews[m.bufferView];if(!e.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let g;return m.componentType===5121?g=Gy(e.gltfBinary,p.byteOffset??0,p.byteLength/1):m.componentType===5123?g=eC(e.gltfBinary,p.byteOffset??0,p.byteLength/2):m.componentType===5125&&(g=tC(e.gltfBinary,p.byteOffset??0,p.byteLength/4)),{name:n.name,posBuffer:f,indicesBuffer:g}})}window.parseWaterGlb=By;const gt=class gt extends le{constructor(t){super(t);D(this,"_submergingData");D(this,"_allMoments",[]);D(this,"readyEvent",this.dv(new M.Event));{const n=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(o=>{this._submergingData=By(o);const s=this._submergingData.map(a=>Date.parse(a.name)).sort();this._allMoments=s,this.currentTime==0&&(this.currentTime=s[0]),this.readyEvent.emit()})}).catch(i=>{console.log(i)})};n(),this.d(this.urlChanged.don(()=>{n()}))}}get typeName(){return"ESSubmergingAnalysis"}get defaultProps(){return gt.createDefaultProps()}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new de("Url地址","url",!1,!1,[this,"url"],gt.defaults.url),new ut("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],gt.defaults.amplitude),new H("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],gt.defaults.frequency),new H("当前时间","currentTime",!1,!1,[this,"currentTime"],gt.defaults.currentTime),new ae("材质参数","materialParams",!1,!1,[this,"materialParams"],gt.defaults.materialParams),new ce("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],gt.defaults.waterTypes,"river"),new ge("水的底色","waterColor",!1,!1,[this,"waterColor"],gt.defaults.waterColor),new ut("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],gt.defaults.waveVelocity),new H("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],gt.defaults.flowSpeed),new ut("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],gt.defaults.specularIntensity)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new de("模型Url地址","url",!1,!1,[this,"url"],gt.defaults.url),new H("当前时间","currentTime",!1,!1,[this,"currentTime"],gt.defaults.currentTime),new ae("材质参数","materialParams",!1,!1,[this,"materialParams"],gt.defaults.materialParams),new ce("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],gt.defaults.waterTypes),new ge("水的底色","waterColor",!1,!1,[this,"waterColor"],gt.defaults.waterColor),new H("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],gt.defaults.frequency),new ut("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],gt.defaults.waveVelocity),new ut("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],gt.defaults.amplitude),new ut("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],gt.defaults.specularIntensity),new H("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],gt.defaults.flowSpeed)])]}};D(gt,"type",gt.register("ESSubmergingAnalysis",gt,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"})),D(gt,"defaults",{...le.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});let Na=gt;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),url:"",currentTime:0,materialParams:M.reactJson({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,allowPicking:!0})})(Na||(Na={})),M.extendClassProps(Na.prototype,Na.createDefaultProps);const Do=class Do extends ze{constructor(t){super(t);D(this,"_startEvent",this.dv(new M.Event));D(this,"_stopEvent",this.dv(new M.Event));this.filled=!1,this.stroked=!1}get typeName(){return"ESSunshineAnalysis"}get defaultProps(){return Do.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 ge("起始颜色","起始颜色",!1,!1,[this,"startColor"]),new ge("结束颜色","结束颜色",!1,!1,[this,"endColor"]),new H("计算进度","计算进度",!0,!0,[this,"progress"]),new H("高度","高度m",!1,!1,[this,"extrudedHeight"]),new H("底面高度","底面高度",!1,!1,[this,"height"]),new H("采样间距","采样间距m",!1,!1,[this,"sampleDistance"]),new H("起始时间","startTime,时间戳",!1,!1,[this,"startTime"]),new H("结束时间","endTime,时间戳",!1,!1,[this,"endTime"]),new H("时间跨度","时间跨度,默认1小时时间戳",!1,!1,[this,"spanTime"]),new Se("开始分析","开始分析",[],()=>this.start(),[]),new Se("结束分析","结束分析",[],()=>this.stop(),[])]}};D(Do,"type",Do.register("ESSunshineAnalysis",Do,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),D(Do,"supportEditingModes",[...ze.supportEditingModes,xe.HeightModify]),D(Do,"defaults",{...ze.defaults});let Da=Do;(r=>{r.createDefaultProps=()=>({...ze.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:M.reactArray([1,1,0,1]),endColor:M.reactArray([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0})})(Da||(Da={})),M.extendClassProps(Da.prototype,Da.createDefaultProps);const Zr=class Zr extends Xe{constructor(t){super(t);D(this,"_activateEvent",this.disposeVar(new M.Event));D(this,"activate",!1)}get typeName(){return"ESTerrainLayer"}get defaultProps(){return Zr.createDefaultProps()}get activateEvent(){return this._activateEvent}getESProperties(){const t={...super.getESProperties()},n=[new H("层级序号","层级序号",!1,!1,[this,"zIndex"],Zr.defaults.zIndex),new ce("渲染模式","renderMode",!1,!1,[this,"renderMode"],Zr.defaults.renderModes,"default"),new H("透明度","opacity",!1,!1,[this,"opacity"],Zr.defaults.opacity)],i=[new ae("地形服务地址","地形服务地址",!1,!1,[this,"url"],Zr.defaults.url),new kr("矩形范围","西南东北",!1,!1,[this,"rectangle"],Zr.defaults.rectangle)];return t.basic.push(...n),t.dataSource.push(...i),t.defaultMenu="dataSource",t}getProperties(t){return[...super.getProperties(t),new ee("ESTerrainLayer","ESTerrainLayer",[new ae("地形服务地址","地形服务地址",!1,!1,[this,"url"]),new kr("矩形范围","西南东北",!1,!1,[this,"rectangle"]),new H("层级","zIndex",!1,!1,[this,"zIndex"]),new ce("渲染模式","renderMode",!1,!1,[this,"renderMode"],Zr.defaults.renderModes,Zr.defaults.renderMode),new H("透明度","opacity",!1,!1,[this,"opacity"],Zr.defaults.opacity),new ee("czm","czm",[new H("czmMinzoom","czmMinzoom",!0,!1,[this,"czmMinzoom"]),new H("czmMaxzoom","czmMaxzoom",!0,!1,[this,"czmMaxzoom"])])])]}};D(Zr,"type",Zr.register("ESTerrainLayer",Zr,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"})),D(Zr,"defaults",{...Xe.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 Aa=Zr;(r=>{r.createDefaultProps=()=>({...Xe.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:M.reactArray([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0,renderMode:"default",opacity:1})})(Aa||(Aa={})),M.extendClassProps(Aa.prototype,Aa.createDefaultProps);const ui=class ui extends jt{get typeName(){return"ESTextLabel"}get defaultProps(){return ui.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ge("文本颜色","指定文本标签的字体颜色.",!1,!1,[this,"color"],[1,1,1,1]),new H("文字大小","fontSize",!1,!1,[this,"fontSize"],14),new Yc("内容","内容",!0,!1,[this,"text"],ui.defaults.text),new ge("背景颜色"," 指定文本标签的背景颜色.",!1,!1,[this,"backgroundColor"],ui.defaults.backgroundColor),new kr("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"],ui.defaults.padding)]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new Yc("内容","内容",!0,!1,[this,"text"],ui.defaults.text),new ge("文本颜色","指定文本标签的字体颜色.",!1,!1,[this,"color"]),new H("文字大小","fontSize",!1,!1,[this,"fontSize"]),new ge("背景颜色"," 指定文本标签的背景颜色.",!1,!1,[this,"backgroundColor"]),new kr("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"])]),new ee("czm","czm",[new $("文本编辑交互","文本编辑交互.",!1,!1,[this,"textEditingInteraction"]),new $("文本编辑","文本编辑.",!1,!1,[this,"textEditing"]),new H("宽度","宽度",!0,!1,[this,"width"],ui.defaults.width),new kr("原点比例和偏移","原点比例和偏移.",!1,!1,[this,"originRatioAndOffset"]),new H("透明度","透明度",!1,!1,[this,"opacity"]),new kr("边框圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new ge("边框颜色"," 边框色.",!1,!1,[this,"borderColor"]),new H("边框宽度","边框宽度",!1,!1,[this,"borderWidth"]),new ce("文字位置","文字位置",!1,!1,[this,"textAlign"],[["center","center"],["left","left"],["right","right"]]),new ce("边框类型","边框类型",!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(ui,"type",ui.register("ESTextLabel",ui,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"})),D(ui,"defaults",{...jt.defaults,allowTextEditing:!0,width:80,text:"请输入文字",originRatioAndOffset:[.5,1,0,0],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 Ra=ui;(r=>{r.createDefaultProps=()=>({...jt.createDefaultProps(),text:void 0,width:void 0,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:M.reactArray([1,1,1,1]),backgroundColor:M.reactArray([0,0,0,.8]),padding:M.reactArray([5,5,5,5]),borderRadius:M.reactArray([6,6,6,6]),borderWidth:0,borderColor:M.reactArray([1,1,1,1]),borderStyle:"solid"})})(Ra||(Ra={})),M.extendClassProps(Ra.prototype,Ra.createDefaultProps);const zy=`
543
+ #### 默认值如下
544
+ \`\`\`js
545
+ {
546
+ "Title": "示例",
547
+ "Content": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
548
+ }
549
+ \`\`\``,_n=class _n extends jt{constructor(t){super(t);D(this,"_callFunctionEvent",this.disposeVar(new M.Event))}get typeName(){return"ESUEWidget"}get defaultProps(){return _n.createDefaultProps()}get callFunctionEvent(){return this._callFunctionEvent}callFunction(t,n){this._callFunctionEvent.emit(t,n)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Kt("positionOffset","positionOffset(米)",!1,!1,[this,"positionOffset"],_n.defaults.positionOffset),new Kt("rotationOffset","rotationOffset(米)",!1,!1,[this,"rotationOffset"],_n.defaults.rotationOffset),new de("actorTag","actorTag",!1,!1,[this,"actorTag"],_n.defaults.actorTag),new de("widgetClass","widgetClass",!1,!1,[this,"widgetClass"],_n.defaults.widgetClass),new de("socketName","socketName",!1,!1,[this,"socketName"],_n.defaults.socketName),new ae("info","info",!0,!1,[this,"info"],_n.defaults.info,zy)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new Se("callFunction","callFunction",["string","string"],(n,i)=>this.callFunction(n,JSON.parse(i)),["",""]),new ci("positionOffset","positionOffset(米)",!1,!1,[this,"positionOffset"]),new ci("rotationOffset","rotationOffset(米)",!1,!1,[this,"rotationOffset"]),new de("actorTag","actorTag",!1,!1,[this,"actorTag"]),new de("widgetClass","widgetClass",!1,!1,[this,"widgetClass"]),new de("socketName","socketName",!1,!1,[this,"socketName"]),new ae("info","info",!0,!1,[this,"info"],_n.defaults.info,zy)])]}};D(_n,"type",_n.register("ESUEWidget",_n,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),D(_n,"defaults",{...jt.defaults,info:{Title:"标题示例",Content:"内容示例"},widgetClass:"",socketName:"",positionOffset:[0,0,0],actorTag:"",rotationOffset:[0,0,0]});let La=_n;(r=>{r.createDefaultProps=()=>({widgetClass:"",info:M.reactJsonWithUndefined(void 0),...jt.createDefaultProps()})})(La||(La={})),M.extendClassProps(La.prototype,La.createDefaultProps);const kl=class kl extends le{constructor(){super(...arguments);D(this,"_callFunctionEvent",this.dv(new M.Event));D(this,"_actorEvent",this.dv(new M.Event));D(this,"_lastActorStatus",this.dv(M.react("null")))}get typeName(){return"ESUnrealActor"}get defaultProps(){return kl.createDefaultProps()}get callFunctionEvent(){return this._callFunctionEvent}callFunction(t,n){this._callFunctionEvent.emit(t,n)}getBoundSphereWithChildren(t){return new Promise((n,i)=>{n(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 de("actorTag","actorTag",!1,!1,[this,"actorTag"],""),new de("actorClass","actorClass",!1,!1,[this,"actorClass"],""),new $("是否高亮","是否高亮highlight.",!1,!1,[this,"highlight"],!1)]}}getProperties(t){return[...super.getProperties(t),new Se("callFunction","callFunction",["string","string"],(n,i)=>this.callFunction(n,JSON.parse(i)),["",""]),new de("actorTag","actorTag",!1,!1,[this,"actorTag"]),new de("actorClass","actorClass",!1,!1,[this,"actorClass"]),new $("是否高亮","是否高亮highlight.",!1,!1,[this,"highlight"])]}};D(kl,"type",kl.register("ESUnrealActor",kl,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"UnrealActor"}));let Fa=kl;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})})(Fa||(Fa={})),M.extendClassProps(Fa.prototype,Fa.createDefaultProps);const Pr=class Pr extends le{constructor(t){super(t);D(this,"editingBindMode","doublePoints");D(this,"_resetWithCameraInfoEvent",this.dv(new M.Event));this.collision=!1}get typeName(){return"ESVideoFusion"}get defaultProps(){return Pr.createDefaultProps()}get resetWithCameraInfoEvent(){return this._resetWithCameraInfoEvent}resetWithCameraInfo(){this._resetWithCameraInfoEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new $("循环","looping",!1,!1,[this,"looping"],Pr.defaults.looping),new $("视椎体","showFrustum",!1,!1,[this,"showFrustum"],Pr.defaults.showFrustum),new H("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"],Pr.defaults.aspectRatio),new H("横向夹角","fov",!1,!1,[this,"fov"],Pr.defaults.fov),new H("视野长度","far",!1,!1,[this,"far"],Pr.defaults.far),new H("近面距离","near",!1,!1,[this,"near"],Pr.defaults.near),new ae("视频路径","videoStreamUrl",!1,!1,[this,"videoStreamUrl"],Pr.defaults.videoStreamUrl),new H("显示优先级","zIndex",!1,!1,[this,"zIndex"],Pr.defaults.zIndex),new ce("视频类型","视频类型",!1,!1,[this,"videoStreamType"],Pr.defaults.videoStreamTypes,"video")]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new H("横向夹角","fov",!1,!1,[this,"fov"]),new H("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"]),new H("视野长度","far",!1,!1,[this,"far"]),new H("近面距离","near",!1,!1,[this,"near"]),new ae("视频路径","videoStreamUrl",!1,!1,[this,"videoStreamUrl"]),new H("显示优先级","zIndex",!1,!1,[this,"zIndex"]),new $("视椎体","showFrustum",!1,!1,[this,"showFrustum"]),new $("循环","looping",!1,!1,[this,"looping"])]),new ee("czm","czm",[new ce("视频类型","视频类型",!1,!1,[this,"videoStreamType"],Pr.defaults.videoStreamTypes),new Se("重置","以当前相机状态",[],()=>this.resetWithCameraInfo(),[])])]}};D(Pr,"type",Pr.register("ESVideoFusion",Pr,{chsName:"视频融合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视频融合"})),D(Pr,"defaults",{...le.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 ja=Pr;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamType:"video"})})(ja||(ja={})),M.extendClassProps(ja.prototype,ja.createDefaultProps);const kn=class kn extends le{constructor(t){super(t);D(this,"editingBindMode","doublePoints");this.collision=!1}get typeName(){return"ESViewShed"}get defaultProps(){return kn.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new $("视椎体","showFrustum",!1,!1,[this,"showFrustum"],kn.defaults.showFrustum),new H("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"],kn.defaults.aspectRatio),new H("横向夹角","fov",!1,!1,[this,"fov"],kn.defaults.fov),new H("近面距离","near",!1,!1,[this,"near"],kn.defaults.near),new H("视野长度","far",!1,!1,[this,"far"],kn.defaults.far),new H("显示优先级","zIndex",!1,!1,[this,"zIndex"],kn.defaults.zIndex)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new H("横向夹角","fov",!1,!1,[this,"fov"]),new H("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"]),new H("近面距离","near",!1,!1,[this,"near"]),new H("视野长度","far",!1,!1,[this,"far"]),new H("显示优先级","zIndex",!1,!1,[this,"zIndex"]),new $("视椎体","showFrustum",!1,!1,[this,"showFrustum"])])]}};D(kn,"type",kn.register("ESViewShed",kn,{chsName:"视域分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"信号传输器"})),D(kn,"defaults",{...le.defaults,fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0});let ka=kn;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0})})(ka||(ka={})),M.extendClassProps(ka.prototype,ka.createDefaultProps);const Uy=`
550
+ #### 默认值如下
551
+ \`\`\`js
552
+ {
553
+ "Title": "示例",
554
+ "Key":"Value",
555
+ "内容": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
556
+ }
557
+ \`\`\``,ds=class ds extends jt{get typeName(){return"ESWidget"}get defaultProps(){return ds.createDefaultProps()}constructor(e){super(e),this.anchor=[.5,1]}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ae("信息","info",!0,!1,[this,"info"],ds.defaults.info,Uy)]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ae("信息","info",!0,!1,[this,"info"],ds.defaults.info,Uy)]),new ee("ue","ue",[new ci("坐标偏移","positionOffset(米)",!1,!1,[this,"positionOffset"]),new ci("旋转偏移","rotationOffset(米)",!1,!1,[this,"rotationOffset"]),new de("actorTag","actorTag",!1,!1,[this,"actorTag"]),new de("widgetClass","widgetClass",!1,!1,[this,"widgetClass"]),new de("socketName","socketName",!1,!1,[this,"socketName"])]),new ee("czm","czm",[new H("透明度","透明度",!0,!1,[this,"opacity"],ds.defaults.opacity)])]}};D(ds,"type",ds.register("ESWidget",ds,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ES组件"})),D(ds,"defaults",{...jt.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 Ga=ds;(r=>{r.createDefaultProps=()=>({...jt.createDefaultProps(),info:{title:"标题示例",内容:"内容示例"},widgetClass:void 0,actorTag:"",socketName:"",positionOffset:M.reactArray([0,0,0]),rotationOffset:M.reactArray([0,0,0]),opacity:1})})(Ga||(Ga={})),M.extendClassProps(Ga.prototype,Ga.createDefaultProps);const Ao=class Ao extends Ae{constructor(t){super(t);D(this,"editingBindMode","doublePoints");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 Ao.createDefaultProps()}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}getProperties(t){return[...super.getProperties(t)]}};D(Ao,"type",Ao.register("ESDirectionMeasurement",Ao,{chsName:"方位角测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"方位角测量"})),D(Ao,"supportEditingModes",[...Ae.supportEditingModes,xe.Rotation,xe.Scale,xe.DoublePointsAppend,xe.DoublePointsModify]),D(Ao,"defaults",{...Ae.defaults});let Va=Ao;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps()})})(Va||(Va={})),M.extendClassProps(Va.prototype,Va.createDefaultProps);const nC={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"}}]},iC=`properties是一个包含三个属性的对象,title表示标题,marker-symbol表示点位的文字内容,marker-color表示点位颜色,properties可以删除,然后使用场景对象属性设置。
558
+ \`\`\`
559
+ {
560
+ "type": "FeatureCollection",
561
+ "features": [
562
+ {
563
+ "type": "Feature",
564
+ "geometry": {
565
+ "type": "Point",
566
+ "coordinates": [
567
+ 116.2,
568
+ 39.56
569
+ ]
570
+ },
571
+ "properties": {
572
+ "title": "swimming",
573
+ "marker-symbol": "swimming",
574
+ "marker-color": "#8F1312"
575
+ }
576
+ },
577
+ {
578
+ "type": "Feature",
579
+ "geometry": {
580
+ "type": "Point",
581
+ "coordinates": [
582
+ 115.2,
583
+ 38.56
584
+ ],
585
+ "properties": {
586
+ "title": "8",
587
+ "marker-symbol": "8",
588
+ "marker-color": "#46117E"
589
+ }
590
+ }
591
+ },
592
+ {
593
+ "type": "Feature",
594
+ "geometry": {
595
+ "type": "Point",
596
+ "coordinates": [
597
+ 114.2,
598
+ 37.56
599
+ ],
600
+ "properties": {
601
+ "title": "6",
602
+ "marker-symbol": "6",
603
+ "marker-color": "#713291"
604
+ }
605
+ }
606
+ }
607
+ ]
608
+ }
609
+ \`\`\`
610
+ `,Wy=`// dataSource
611
+ (dataSource) => {
612
+ if (dataSource) {
613
+ dataSource.show = true;
614
+
615
+ const entities = dataSource.entities.values;
616
+ const colorHash = {};
617
+ for (let i = 0; i < entities.length; i++) {
618
+ const entity = entities[i];
619
+ const name = entity.name;
620
+ let color = colorHash[name];
621
+ if (!color) {
622
+ color = Cesium.Color.fromRandom({
623
+ alpha: 1.0,
624
+ });
625
+ colorHash[name] = color;
626
+ }
627
+ if (entity.polygon) {
628
+
629
+ entity.polygon.material = color;
630
+ entity.polygon.outline = false;
631
+ entity.polygon.extrudedHeight = entity.properties.Population / 50.0;
632
+ }
633
+ }
634
+ }
635
+ }
636
+ `,sC=`示例代码
637
+ \`\`\`
638
+ ${Wy}
639
+ \`\`\`
640
+ `;function qy(r){try{return JSON.parse(r),!0}catch{return!1}}const oC="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",ye=class ye extends Xe{constructor(t){super(t);D(this,"_flyToFeatureEvent",this.dv(new M.Event));D(this,"_flyToFeatureIndexEvent",this.dv(new M.Event));D(this,"_features",this.disposeVar(M.reactJsonWithUndefined(void 0)));D(this,"pickedInfoType","FeatureCollection");this.ad(this.urlChanged.don(async()=>{var n;if(!this.url){this.features=void 0;return}do{if(typeof this.url=="object"){this.features=this.url;break}if(qy(this.url)){this.features=JSON.parse(this.url);break}await fetch(we.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.features=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)})}while(!1);this.pickedInfoType=((n=this.features)==null?void 0:n.type)??"FeatureCollection"})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get typeName(){return"ESGeoJson"}get defaultProps(){return ye.createDefaultProps()}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(t,n,i){this._flyToFeatureEvent.emit(t,n,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(t,n){this._flyToFeatureIndexEvent.emit(t,n)}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 de("名称","name",!0,!1,[this,"name"]),new de("唯一标识","id",!1,!0,[this,"id"]),new $("是否显示","show",!1,!1,[this,"show"],!0),new $("开启碰撞","collision",!1,!1,[this,"collision"],!1),new $("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],!1),new Se("保存观察视角","保存当前视角",[],()=>this.calcFlyInParam(),[])],dataSource:[new ae("服务地址","服务地址",!0,!1,[this,"url"],ye.defaults.url),new H("要素最小可视距离","要素最小可视距离",!1,!1,[this,"minFeatureVisibleDistance"],ye.defaults.minFeatureVisibleDistance),new H("要素最大可视距离","要素最大可视距离",!1,!1,[this,"maxFeatureVisibleDistance"],ye.defaults.maxFeatureVisibleDistance),new ce("高度参考","高度参考",!1,!1,[this,"heightReference"],ye.defaults.heightReferences)],location:[],coordinate:[],style:[new ee("点文字样式","点样式集合",[]),new $("是否显示","是否显示",!1,!1,[this,"textShow"],ye.defaults.textShow),new at("锚点","锚点",!1,!1,[this,"textAnchor"],ye.defaults.textAnchor),new de("标注显示属性","要用于显示的文本属性",!1,!1,[this,"textProperty"],ye.defaults.textProperty),new de("默认文本","默认统一显示的文本",!1,!1,[this,"textDefaultText"],ye.defaults.textDefaultText),new ge("文本颜色","文本颜色",!1,!1,[this,"textColor"],ye.defaults.textColor),new ge("背景颜色","背景颜色",!0,!1,[this,"textBackgroundColor"],ye.defaults.textBackgroundColor),new de("字体样式","字体样式",!1,!1,[this,"textFontStyle"],ye.defaults.textFontStyle),new de("字体粗细","字体粗细",!1,!1,[this,"textFontWeight"],ye.defaults.textFontWeight),new H("字体大小","字体大小",!1,!1,[this,"textFontSize"],ye.defaults.textFontSize),new at("像素偏移","像素偏移",!1,!1,[this,"textOffset"],ye.defaults.textOffset),new ee("点图片样式","图片样式集合",[]),new $("是否显示","是否显示",!1,!1,[this,"imageShow"],ye.defaults.imageShow),new at("锚点","锚点",!1,!1,[this,"imageAnchor"],ye.defaults.imageAnchor),new ae("图片地址","图片地址",!1,!1,[this,"imageUrl"],ye.defaults.imageUrl),new at("图片大小","图片大小",!1,!1,[this,"imageSize"],ye.defaults.imageSize),new at("像素偏移","像素偏移",!1,!1,[this,"imageOffset"],ye.defaults.imageOffset),new ee("线样式","线样式集合",[]),new $("是否显示","是否显示",!1,!1,[this,"stroked"],ye.defaults.stroked),new $("贴地","贴地(线)",!1,!1,[this,"strokeGround"],ye.defaults.strokeGround),new H("线宽","线宽",!1,!1,[this,"strokeWidth"],ye.defaults.strokeWidth),new ce("线宽类型","线宽类型",!1,!1,[this,"strokeWidthType"],ye.defaults.strokeWidthTypes),new ge("线颜色","线颜色",!1,!1,[this,"strokeColor"],ye.defaults.strokeColor),new de("线材质","线材质",!1,!1,[this,"strokeMaterial"],ye.defaults.strokeMaterial),new ae("线材质参数","线材质参数",!1,!1,[this,"strokeMaterialParams"],ye.defaults.strokeMaterialParams),new ee("面样式","面样式集合",[]),new $("是否显示","是否显示",!1,!1,[this,"filled"],ye.defaults.filled),new $("贴地","贴地(面)",!1,!1,[this,"fillGround"],ye.defaults.fillGround),new ge("填充颜色","填充颜色",!1,!1,[this,"fillColor"],ye.defaults.fillColor),new de("填充材质","填充材质",!1,!1,[this,"fillMaterial"],ye.defaults.fillMaterial),new ae("填充材质参数","填充材质参数",!1,!1,[this,"fillMaterialParams"],ye.defaults.fillMaterialParams)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new $("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],ye.defaults.show),new $("允许拾取","是否允许拾取",!1,!1,[this,"allowPicking"],ye.defaults.allowPicking),new Se("飞入","飞入",["number"],n=>this.flyTo(n),[1]),new Se("清空飞入参数","清空飞入参数",[],()=>this.emptyFlyInParam(),[]),new Se("保存飞入参数","保存飞入参数flyInParam",[],()=>this.calcFlyInParam(),[]),new ae("flyInParam","flyInParam",!0,!1,[this,"flyInParam"],ye.defaults.flyInParam)]),new ee("标注文本样式","标注文本样式",[new $("是否显示","是否显示",!1,!1,[this,"textShow"],ye.defaults.textShow),new de("标注显示属性","要用于显示的文本属性",!1,!1,[this,"textProperty"],ye.defaults.textProperty),new de("默认文本","默认统一显示的文本",!1,!1,[this,"textDefaultText"],ye.defaults.textDefaultText),new ge("文本颜色","文本颜色",!1,!1,[this,"textColor"],ye.defaults.textColor),new ge("背景颜色","背景颜色",!0,!1,[this,"textBackgroundColor"],ye.defaults.textBackgroundColor),new de("字体","字体",!1,!1,[this,"textFontFamily"],ye.defaults.textFontFamily),new de("字体样式","字体样式",!1,!1,[this,"textFontStyle"],ye.defaults.textFontStyle),new de("字体粗细","字体粗细",!1,!1,[this,"textFontWeight"],ye.defaults.textFontWeight),new H("字体大小","字体大小",!1,!1,[this,"textFontSize"],ye.defaults.textFontSize),new at("锚点","锚点",!1,!1,[this,"textAnchor"],ye.defaults.textAnchor),new at("像素偏移","像素偏移",!1,!1,[this,"textOffset"],ye.defaults.textOffset)]),new ee("标注图标样式","标注图标样式",[new $("是否显示","是否显示",!1,!1,[this,"imageShow"],ye.defaults.imageShow),new ae("图片地址","图片地址",!1,!1,[this,"imageUrl"],ye.defaults.imageUrl),new at("图片大小","图片大小",!1,!1,[this,"imageSize"],ye.defaults.imageSize),new at("锚点","锚点",!1,!1,[this,"imageAnchor"],ye.defaults.imageAnchor),new at("像素偏移","像素偏移",!1,!1,[this,"imageOffset"],ye.defaults.imageOffset)]),new ee("线样式","线样式",[new $("是否显示","是否显示",!1,!1,[this,"stroked"],ye.defaults.stroked),new H("线宽","线宽",!1,!1,[this,"strokeWidth"],ye.defaults.strokeWidth),new ce("线宽类型","线宽类型",!1,!1,[this,"strokeWidthType"],ye.defaults.strokeWidthTypes),new ge("线颜色","线颜色",!1,!1,[this,"strokeColor"],ye.defaults.strokeColor),new de("线材质","线材质",!1,!1,[this,"strokeMaterial"],ye.defaults.strokeMaterial),new ae("线材质参数","线材质参数",!1,!1,[this,"strokeMaterialParams"],ye.defaults.strokeMaterialParams),new $("贴地(线)","贴地(线)",!1,!1,[this,"strokeGround"],ye.defaults.strokeGround)]),new ee("填充样式","填充样式",[new $("是否显示","是否显示",!1,!1,[this,"filled"],ye.defaults.filled),new ge("填充颜色","填充颜色",!1,!1,[this,"fillColor"],ye.defaults.fillColor),new de("填充材质","填充材质",!1,!1,[this,"fillMaterial"],ye.defaults.fillMaterial),new ae("填充材质参数","填充材质参数",!1,!1,[this,"fillMaterialParams"],ye.defaults.fillMaterialParams),new $("贴地(面)","贴地(面)",!1,!1,[this,"fillGround"],ye.defaults.fillGround)]),new ee("通用","通用",[new ae("服务地址","服务地址",!0,!1,[this,"url"],ye.defaults.url),new Gi("loadFnStr","loadFnStr",!0,!1,[this,"loadFuncStr"],ye.defaults.defaultLoadFuncStr,ye.defaults.defaultLoadFuncDocStr),new H("要素最小可视距离","要素最小可视距离",!1,!1,[this,"minFeatureVisibleDistance"],ye.defaults.minFeatureVisibleDistance),new H("要素最大可视距离","要素最大可视距离",!1,!1,[this,"maxFeatureVisibleDistance"],ye.defaults.maxFeatureVisibleDistance),new ce("高度参考","高度参考",!1,!1,[this,"heightReference"],ye.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(ye,"type",ye.register("ESGeoJson",ye,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),D(ye,"defaults",{...Xe.defaults,show:!0,allowPicking:!0,url:oC,defaultLoadFuncStr:Wy,defaultLoadFuncDocStr:sC,data:nC,dataMd:iC,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 Ba=ye;(r=>{r.createDefaultProps=()=>({...Xe.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:void 0,stroked:!0,strokeStyle:M.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:M.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:M.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:M.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:M.reactJsonWithUndefined(void 0),heightReference:"NONE"})})(Ba||(Ba={})),M.extendClassProps(Ba.prototype,Ba.createDefaultProps);const Ro=class Ro extends Ae{constructor(t){super(t);D(this,"editingBindMode","doublePoints");this.stroked=!0,this.strokeStyle.width=2}get typeName(){return"ESHeightMeasurement"}get defaultProps(){return Ro.createDefaultProps()}getProperties(t){return[...super.getProperties(t)]}};D(Ro,"type",Ro.register("ESHeightMeasurement",Ro,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),D(Ro,"supportEditingModes",[...Ae.supportEditingModes,xe.DoublePointsAppend,xe.DoublePointsModify]),D(Ro,"defaults",{...Ae.defaults});let za=Ro;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps()})})(za||(za={})),M.extendClassProps(za.prototype,za.createDefaultProps);const Du=class Du extends Kr{constructor(t){super(t);D(this,"_area",this.dv(M.react(0)));D(this,"_perimeter",this.dv(M.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 n=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};n(),this.d(this.radiusChanged.don(n))}get typeName(){return"ESLocalCircle"}get defaultProps(){return{...Du.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,n){return yv([...this.position],this.radius,t,n)[0].map(o=>[...o,this.position?this.position[2]:0])}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"style",basic:[...t.basic,new H("圆半径","圆半径",!0,!1,[this,"radius"],1)],general:[...t.general],dataSource:[...t.dataSource],location:[],coordinate:[new $("是否编辑","是否编辑",!1,!1,[this,"editing"]),new H("面积","面积",!1,!0,[this,"area"]),new H("周长","周长",!1,!0,[this,"perimeter"]),new ci("三维坐标","三维坐标",!0,!1,[this,"position"],[0,0,0])],style:[...t.style]}}getProperties(t){return[...super.getProperties(t),new ee("ESLocalCircle","ESLocalCircle",[new H("圆半径","圆半径",!1,!1,[this,"radius"]),new H("面积","面积",!1,!0,[this,"area"]),new H("周长","周长",!1,!0,[this,"perimeter"])])]}};D(Du,"type",Du.register("ESLocalCircle",Du,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"})),D(Du,"defaults",{...Kr.defaults,fillStyle:{color:[1,1,1,.5],material:"",materialParams:{}}});let Ua=Du;(r=>{r.createDefaultProps=()=>({...Kr.createDefaultProps(),radius:1})})(Ua||(Ua={})),M.extendClassProps(Ua.prototype,Ua.createDefaultProps);const Au=class Au extends Kr{get typeName(){return"ESLocalPolygon"}get defaultProps(){return{...Au.createDefaultProps()}}constructor(e){super(e),this.filled=!0}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new ip("坐标","偏移量[x,y],单位米,不含高度",!1,!1,[this,"points"],[])]}}getProperties(e){return[...super.getProperties(e),new ee("ESLocalPolygon","ESLocalPolygon",[new ae("位置偏移数组","偏移量[x,y],单位米,不含高度",!1,!1,[this,"points"])])]}};D(Au,"type",Au.register("ESLocalPolygon",Au,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"})),D(Au,"defaults",{...Kr.defaults,points:[],filled:!0});let as=Au;(r=>{r.createDefaultProps=()=>({...Kr.createDefaultProps(),points:hp(void 0)})})(as||(as={})),M.extendClassProps(as.prototype,as.createDefaultProps);const Gl=class Gl extends Ni{get typeName(){return"ESLocalPolygonZ"}get defaultProps(){return{...Gl.createDefaultProps()}}constructor(e){super(e),this.filled=!0}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new gf("本地位置数组","本地位置数组",!0,!1,[this,"points"])])]}};D(Gl,"type",Gl.register("ESLocalPolygonZ",Gl,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let Wa=Gl;(r=>{r.createDefaultProps=()=>({...Ni.createDefaultProps(),points:M.reactPositions(void 0)})})(Wa||(Wa={})),M.extendClassProps(Wa.prototype,Wa.createDefaultProps);const Ru=class Ru extends Kr{get typeName(){return"ESLocalRectangle"}get defaultProps(){return{...Ru.createDefaultProps()}}constructor(e){super(e),this.filled=!0}getProperties(e){return[...super.getProperties(e),new ee("ESLocalRectangle","ESLocalRectangle",[new H("宽度","宽度",!1,!1,[this,"width"]),new H("高度","高度",!1,!1,[this,"height"])])]}};D(Ru,"type",Ru.register("ESLocalRectangle",Ru,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"})),D(Ru,"defaults",{...Kr.defaults,width:5e5,height:3e5});let qa=Ru;(r=>{r.createDefaultProps=()=>({...Kr.createDefaultProps(),width:5e5,height:3e5})})(qa||(qa={})),M.extendClassProps(qa.prototype,qa.createDefaultProps);const ps=class ps extends Ae{constructor(t){super(t);D(this,"editingBindMode","lineString");D(this,"_distance",this.dv(M.react(0)));D(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);D(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.fillColor=[1,0,.73,1];const n=()=>{if(this.points&&this.points.length>=2){const i=Fl(this.points,"GEODESIC"),o=i[i.length-1];this._distance.value=o}else this._distance.value=0};n(),this.d(this.pointsChanged.don(n))}get typeName(){return"ESPipeFence"}get defaultProps(){return ps.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 H("高度","height",!1,!1,[this,"height"],10),new H("宽度","width",!1,!1,[this,"width"],10),new ce("模式","materialMode",!1,!1,[this,"materialMode"],ps.defaults.materialModes,"purple")],coordinate:[...t.coordinate,new H("长度","距离",!1,!0,[this,"distance"])]}}getProperties(t){return[...super.getProperties(t),new ee("ESPipeFence","ESPipeFence",[new H("高度","height",!1,!1,[this,"height"]),new H("宽度","width",!1,!1,[this,"width"]),new ce("materialMode","materialMode",!1,!1,[this,"materialMode"],ps.defaults.materialModes)])]}};D(ps,"type",ps.register("ESPipeFence",ps,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),D(ps,"supportEditingModes",[...Ae.supportEditingModes,xe.LineStringAppend,xe.LineStringInsert]),D(ps,"defaults",{...Ae.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 Ha=ps;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0})})(Ha||(Ha={})),M.extendClassProps(Ha.prototype,Ha.createDefaultProps);const Lo=class Lo extends Yt{constructor(t){super(t);D(this,"_setLayerVisibleEvent",this.dv(new M.Event));D(this,"_setLayerColorEvent",this.dv(new M.Event))}get typeName(){return"ESPipeserTileset"}get defaultProps(){return Lo.createDefaultProps()}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(t,n){this._setLayerVisibleEvent.emit(t,n)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(t,n){this._setLayerColorEvent.emit(t,n)}getProperties(t){return[...super.getProperties(t),new ee("ESPipeserTileset","ESPipeserTileset",[new Se("setLayerVisible","setLayerVisible",["string","string"],(n,i)=>this.setLayerVisible(n,i),["",""]),new Se("setLayerColor","setLayerColor",["string","string"],(n,i)=>this.setLayerColor(n,i),["",""]),new ce("colorMode","colorMode",!0,!1,[this,"colorMode"],Lo.description.colorMode,"default")])]}};D(Lo,"type",Lo.register("ESPipeserTileset",Lo,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),D(Lo,"description",{colorMode:[["default","default"],["color","color"],["blend","blend"]]});let Xa=Lo;(r=>{r.createDefaultProps=()=>({colorMode:"default",...Yt.createDefaultProps()})})(Xa||(Xa={})),M.extendClassProps(Xa.prototype,Xa.createDefaultProps);const gs=class gs extends Ae{constructor(t){super(t);D(this,"editingBindMode","circular");this.filled=!0,this.collision=!1}get typeName(){return"ESPolygonFence"}get defaultProps(){return gs.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",coordinate:[...t.coordinate,new H("面积","面积",!1,!0,[this,"area"]),new H("周长","周长",!1,!0,[this,"perimeter"])],basic:[...t.basic,new H("高度","height",!1,!1,[this,"height"],10),new ce("模式","materialMode",!1,!1,[this,"materialMode"],gs.defaults.materialModes,"danger")]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new H("高度","height",!1,!1,[this,"height"]),new ce("materialMode","materialMode",!1,!1,[this,"materialMode"],gs.defaults.materialModes)]),new ee("计算","计算",[new H("面积","面积",!1,!0,[this,"area"]),new H("周长","周长",!1,!0,[this,"perimeter"])])]}};D(gs,"type",gs.register("ESPolygonFence",gs,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),D(gs,"supportEditingModes",[...Ae.supportEditingModes,xe.CircularAppend,xe.CircularInsert,xe.HeightModify]),D(gs,"defaults",{...Ae.defaults,fillStyle:{color:[1,1,1,1],material:"",materialParams:{}},filled:!0,materialModes:[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]});let Ya=gs;(r=>{r.createDefaultProps=()=>({height:10,materialMode:"danger",...Ae.createDefaultProps()})})(Ya||(Ya={})),M.extendClassProps(Ya.prototype,Ya.createDefaultProps);const Us=class Us extends Ae{constructor(t){super(t);D(this,"_deprecated",["ground"]);D(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());D(this,"editingBindMode","doublePoints")}get typeName(){return"ESRectangle"}get defaultProps(){return Us.createDefaultProps()}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new $("是否贴地","A boolean Property specifying the visibility.",!1,!1,[this,"ground"]),new $("轮廓线半透明","轮廓线半透明.",!1,!1,[this,"outlineTranslucent"]),new H("高度","高度",!1,!1,[this,"height"]),new H("拉伸高度","拉伸高度",!1,!1,[this,"extrudedHeight"]),new kr("范围","西南东北",!0,!1,[this,"rectangle"],Us.defaults.rectangle),new H("纹理旋转角度","纹理旋转角度.",!1,!1,[this,"stRotation"]),new H("旋转角度","rotation",!1,!1,[this,"rotation"]),new $("是否单点编辑","是否单点编辑.",!1,!1,[this,"pointEditing"])])]}};D(Us,"type",Us.register("ESRectangle",Us,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),D(Us,"supportEditingModes",[...Ae.supportEditingModes,xe.DoublePointsAppend,xe.DoublePointsModify]),D(Us,"defaults",{...Ae.defaults,ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:void 0,stRotation:0,rotation:0,pointEditing:!1,allowPicking:!1});let Ja=Us;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:M.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})})(Ja||(Ja={})),M.extendClassProps(Ja.prototype,Ja.createDefaultProps);const Lu=class Lu extends ze{get typeName(){return"ESPolygonWithHole"}get defaultProps(){return Lu.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ae("裁切多边形数组","必须在内部,且没有相交,裁切的多边形数组",!0,!1,[this,"innerRings"],[])]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ae("裁切多边形数组","必须在内部,且没有相交,裁切的多边形数组",!0,!1,[this,"innerRings"],[])])]}};D(Lu,"type",Lu.register("ESPolygonWithHole",Lu,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"})),D(Lu,"defaults",{...ze.defaults,innerRings:[]});let Ka=Lu;(r=>{r.createDefaultProps=()=>({...ze.createDefaultProps(),innerRings:M.reactPositionsSet(void 0)})})(Ka||(Ka={})),M.extendClassProps(Ka.prototype,Ka.createDefaultProps);const Ws=class Ws extends ze{constructor(t){super(t);D(this,"_startEvent",this.disposeVar(new M.Event));this.fillStyle.ground=!0}get typeName(){return"ESSurfaceAreaMeasurement"}get defaultProps(){return Ws.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}getProperties(t){return[...super.getProperties(t),new ee("ESSurfaceAreaMeasurement","表面积测量",[new Se("开始计算","开始计算",[],()=>this.start(),[]),new H("插值距离","插值距离,单位米,为0时不插值",!1,!1,[this,"interpolation"],Ws.defaults.interpolation),new H("偏移高度","三角面整体偏移高度,单位米",!1,!1,[this,"offsetHeight"],Ws.defaults.offsetHeight)])]}};D(Ws,"type",Ws.register("ESSurfaceAreaMeasurement",Ws,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"})),D(Ws,"defaults",{...ze.defaults,interpolation:.5,offsetHeight:0});let Qa=Ws;(r=>{r.createDefaultProps=()=>({...ze.createDefaultProps(),interpolation:void 0,offsetHeight:void 0})})(Qa||(Qa={})),M.extendClassProps(Qa.prototype,Qa.createDefaultProps);const qs=class qs extends le{get typeName(){return"ESDatasmithRuntimeModel"}get defaultProps(){return qs.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new H("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new ae("importOptions","导入参数",!0,!1,[this,"importOptions"],qs.defaults.importOptions)],dataSource:[...e.dataSource,new ae("路径","url",!1,!1,[this,"url"])]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ae("url","url",!1,!1,[this,"url"]),new H("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new ae("importOptions","导入参数",!0,!1,[this,"importOptions"],qs.defaults.importOptions)])]}};D(qs,"type",qs.register("ESDatasmithRuntimeModel",qs,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"})),D(qs,"defaults",{...le.defaults,url:"",importOptions:{buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}});let $a=qs;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),url:"",importOptions:M.reactJsonWithUndefined(void 0),downloadProgress:0})})($a||($a={})),M.extendClassProps($a.prototype,$a.createDefaultProps);const mt=class mt extends as{get typeName(){return"ESDynamicWater"}get defaultProps(){return{...mt.createDefaultProps()}}constructor(e){super(e),this.stroked=!1,this.filled=!0}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ce("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],mt.defaults.waterTypes,mt.defaults.waterType),new H("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],mt.defaults.frequency),new ut("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],mt.defaults.amplitude),new ut("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],.1,[0,360],mt.defaults.flowDirection),new ut("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],mt.defaults.waveVelocity),new ut("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],mt.defaults.specularIntensity),new H("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],mt.defaults.flowSpeed),new ge("水的底色","waterColor",!1,!1,[this,"waterColor"],mt.defaults.waterColor),new ae("水的图片","waterImage",!1,!1,[this,"waterImage"],mt.defaults.waterImage)]}}getProperties(e){return[...super.getProperties(e),new ce("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],mt.defaults.waterTypes),new ae("水的图片","waterImage",!1,!1,[this,"waterImage"],mt.defaults.waterImage),new ge("水的底色","waterColor",!1,!1,[this,"waterColor"],mt.defaults.waterColor),new H("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],mt.defaults.frequency),new ut("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],mt.defaults.waveVelocity),new ut("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],mt.defaults.amplitude),new ut("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],mt.defaults.specularIntensity),new ut("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],.1,[0,360],mt.defaults.flowDirection),new H("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],mt.defaults.flowSpeed)]}};D(mt,"type",mt.register("ESDynamicWater",mt,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"})),D(mt,"defaults",{...as.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});let Za=mt;(r=>{r.createDefaultProps=()=>({...as.createDefaultProps(),waterImage:M.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,allowPicking:!0})})(Za||(Za={})),M.extendClassProps(Za.prototype,Za.createDefaultProps);const _t=class _t extends ze{get typeName(){return"ESGeoWater"}get defaultProps(){return _t.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new ce("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],_t.defaults.waterTypes,_t.defaults.waterType),new H("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],_t.defaults.frequency),new ut("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],_t.defaults.amplitude),new ut("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],.1,[0,360],_t.defaults.flowDirection),new ut("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],_t.defaults.waveVelocity),new ut("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],_t.defaults.specularIntensity),new H("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],_t.defaults.flowSpeed),new ge("水的底色","waterColor",!1,!1,[this,"waterColor"],_t.defaults.waterColor),new ae("水的图片","waterImage",!1,!1,[this,"waterImage"],_t.defaults.waterImage)]}}getProperties(e){return[...super.getProperties(e),new ee("ESGeoWater","ESGeoWater",[new ce("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],_t.defaults.waterTypes),new ae("水的图片","waterImage",!1,!1,[this,"waterImage"],_t.defaults.waterImage),new ge("水的底色","waterColor",!1,!1,[this,"waterColor"],_t.defaults.waterColor),new H("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],_t.defaults.frequency),new ut("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],_t.defaults.waveVelocity),new ut("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],_t.defaults.amplitude),new ut("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],_t.defaults.specularIntensity),new ut("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],.1,[0,360],_t.defaults.flowDirection),new H("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],_t.defaults.flowSpeed)])]}};D(_t,"type",_t.register("ESGeoWater",_t,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"})),D(_t,"defaults",{...ze.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:{}});let eu=_t;(r=>{r.createDefaultProps=()=>({...ze.createDefaultProps(),waterImage:M.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,.8],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,allowPicking:!0})})(eu||(eu={})),M.extendClassProps(eu.prototype,eu.createDefaultProps);const Fu=class Fu extends le{get typeName(){return"ESLevelRuntimeModel"}get defaultProps(){return Fu.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new H("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new de("levelName","levelName",!1,!1,[this,"levelName"],""),new H("levelLoadDistance","levelLoadDistance",!1,!1,[this,"levelLoadDistance"],1e3),new Kt("levelOffset","levelOffset",!1,!1,[this,"levelOffset"],[0,0,0])],dataSource:[...e.dataSource,new ae("url","url",!1,!1,[this,"url"],"")]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ae("url","url",!1,!1,[this,"url"]),new de("levelName","levelName",!1,!1,[this,"levelName"]),new H("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new H("levelLoadDistance","levelLoadDistance",!1,!1,[this,"levelLoadDistance"]),new Kt("levelOffset","levelOffset",!1,!1,[this,"levelOffset"])])]}};D(Fu,"type",Fu.register("ESLevelRuntimeModel",Fu,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"})),D(Fu,"defaults",{...le.defaults,url:""});let tu=Fu;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:M.reactArray([0,0,0]),levelLoadDistance:1e3})})(tu||(tu={})),M.extendClassProps(tu.prototype,tu.createDefaultProps);const Sr=class Sr extends gn{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 Sr.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new H("半径","radius(米)",!1,!1,[this,"radius"],Sr.defaults.radius),new H("圆边数","sides(圆细分边)",!1,!1,[this,"sides"],Sr.defaults.sides),new H("材质速度","speed",!1,!1,[this,"speed"],Sr.defaults.speed),new ce("材质模式","materialMode",!1,!1,[this,"materialMode"],Sr.defaults.materialModes),new ae("材质图片和重复度","materialImage",!1,!1,[this,"materialImage"],Sr.defaults.materialImage)],style:[new ee("点样式","点样式集合",[]),new $("开启","开启点样式",!1,!1,[this,"pointed"],!1),new H("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new ce("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new ge("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new ee("线样式","线样式集合",[]),new $("开启线样式","开启线样式",!1,!1,[this,"stroked"],!0),new H("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new ce("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new ge("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new $("是否贴地","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new ee("面样式","面样式集合",[]),new $("开启","开启填充样式",!1,!1,[this,"filled"],!1),new ge("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1]),new $("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new H("半径","radius(米)",!1,!1,[this,"radius"],Sr.defaults.radius),new H("圆边数","sides(圆细分边)",!1,!1,[this,"sides"],Sr.defaults.sides),new ae("材质图片和重复度","materialImage",!1,!1,[this,"materialImage"],Sr.defaults.materialImage),new H("材质速度","speed",!1,!1,[this,"speed"],Sr.defaults.speed),new ce("材质模式","materialMode",!1,!1,[this,"materialMode"],Sr.defaults.materialModes)])]}};D(Sr,"type",Sr.register("ESPipeline",Sr,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),D(Sr,"defaults",{...gn.defaults,radius:10,sides:10,materialImage:{url:"",uDis:50,vDis:10},speed:1,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"]]});let ru=Sr;(r=>{r.createDefaultProps=()=>({...gn.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:M.reactJson(r.defaults.materialImage),speed:1})})(ru||(ru={})),M.extendClassProps(ru.prototype,ru.createDefaultProps);const bn=class bn extends Ae{constructor(t){super(t);D(this,"editingBindMode","visibility")}get typeName(){return"ESVisibilityAnalysis"}get defaultProps(){return bn.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ge("可视区域颜色","可视区域颜色.",!1,!1,[this,"visibleColor"],bn.defaults.visibleColor),new ge("遮挡区域颜色","遮挡区域颜色.",!1,!1,[this,"invisibleColor"],bn.defaults.invisibleColor),new H("视点高度偏移","heightOffset",!1,!1,[this,"heightOffset"],bn.defaults.heightOffset)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new ge("可视区域颜色","可视区域颜色.",!1,!1,[this,"visibleColor"],bn.defaults.visibleColor),new ge("遮挡区域颜色","遮挡区域颜色.",!1,!1,[this,"invisibleColor"],bn.defaults.invisibleColor),new H("视点高度偏移","heightOffset",!1,!1,[this,"heightOffset"],bn.defaults.heightOffset)])]}};D(bn,"type",bn.register("ESVisibilityAnalysis",bn,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),D(bn,"supportEditingModes",[...Ae.supportEditingModes,xe.VisibilityAppend,xe.VisibilityModify]),D(bn,"defaults",{...Ae.defaults,visibleColor:[0,1,0,1],invisibleColor:[1,0,0,1],heightOffset:0});let nu=bn;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps(),visibleColor:M.reactArray([0,1,0,1]),invisibleColor:M.reactArray([1,0,0,1]),heightOffset:0})})(nu||(nu={})),M.extendClassProps(nu.prototype,nu.createDefaultProps);const ju=class ju extends ze{constructor(t){super(t);D(this,"_startEvent",this.dv(new M.Event));D(this,"_clearEvent",this.dv(new M.Event));this.filled=!1,this.stroked=!0,this.strokeStyle.width=2}get typeName(){return"ESVolumeMeasurement"}get defaultProps(){return ju.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new H("基准面高程","基准面高程",!0,!1,[this,"planeHeight"]),new H("采样间距 m","采样间距 m",!1,!1,[this,"gridWidth"]),new H("挖方","挖方 m³",!1,!0,[this,"cutVolume"]),new H("填方","填方 m³",!1,!0,[this,"fillVolume"]),new H("挖填方","挖填方 m³",!1,!0,[this,"cutAndFillVolume"]),new H("计算进度","计算进度",!1,!0,[this,"progress"]),new Se("开始分析","开始分析",[],()=>this.start(),[]),new Se("清空分析结果","清空分析结果",[],()=>this.clear(),[]),new $("是否开启深度检测","A boolean Property specifying the visibility.",!1,!1,[this,"depthTest"])])]}};D(ju,"type",ju.register("ESVolumeMeasurement",ju,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"})),D(ju,"defaults",{...ze.defaults});let iu=ju;(r=>{r.createDefaultProps=()=>({...ze.createDefaultProps(),planeHeight:M.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1})})(iu||(iu={})),M.extendClassProps(iu.prototype,iu.createDefaultProps);const Vl=class Vl extends ss{constructor(t){super(t);D(this,"_human",this.dv(new ss(`${this.id}_ESHuman`)));D(this,"_poi",this.dv(new os(`${this.id}_ESPoi2D`)));D(this,"combinationClass",!0);this.mainClass=this._human,this.d(this.components.disposableAdd(this._human)),this.d(this.components.disposableAdd(this._poi));{const{_human:n,_poi:i}=this;this.d(M.track([n,"show"],[this,"show"])),this.d(M.track([i,"show"],[this,"show"])),this.d(M.track([n,"allowPicking"],[this,"allowPicking"])),this.d(M.track([i,"allowPicking"],[this,"allowPicking"])),this.d(M.bind([n,"scale"],[this,"scale"])),this.d(M.bind([i,"scale"],[this,"scale"])),this.d(M.track([n,"collision"],[this,"collision"])),this.d(M.track([i,"collision"],[this,"collision"])),this.d(M.bind([n,"flyInParam"],[this,"flyInParam"])),this.d(M.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(M.track([n,"animation"],[this,"animation"])),this.d(M.track([n,"mode"],[this,"mode"])),this.d(M.track([n,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(M.track([n,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(M.track([i,"name"],[this,"name"])),this.d(M.track([i,"mode"],[this,"poiMode"])),this.d(M.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(M.track([i,"screenRender"],[this,"screenRender"])),this.d(M.track([i,"size"],[this,"size"])),this.d(M.track([i,"anchor"],[this,"anchor"])),this.d(M.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(M.track([i,"renderMode"],[this,"renderMode"])),this.d(M.track([i,"rotationType"],[this,"rotationType"])),this.d(M.track([i,"zOrder"],[this,"zOrder"])),this.d(M.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(M.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(M.bind([n,"position"],[this,"position"])),this.d(M.bind([n,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(o=>{n.flyIn(o)})),this.d(this.flyToEvent.don(o=>{n.flyTo(o)})),this.d(this.calcFlyToParamEvent.don(()=>{n.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{n.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((o,s)=>{n.smoothMove(o,s)})),this.d(this.smoothMoveWithRotationEvent.don((o,s,a)=>{n.smoothMoveWithRotation(o,s,a)})),this.d(this.smoothMoveOnGroundEvent.don((o,s,a,c)=>{n.smoothMoveOnGround(o,s,a,c)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((o,s,a,c,f)=>{n.smoothMoveWithRotationOnGround(o,s,a,c,f)})),this.d(this.automaticLandingEvent.don(()=>{n.automaticLanding()}))}}get typeName(){return"ESHumanPoi"}get defaultProps(){return Vl.createDefaultProps()}get human(){return this._human}get poi(){return this._poi}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ce("poi模式","poiMode",!1,!1,[this,"poiMode"],os.defaults.modes,"SquareH01"),new H("poi高度偏移","poi高度偏移",!1,!1,[this,"poiOffsetHeight"],1.8)]}}getProperties(t){return[...super.getProperties(t),new ce("poi模式","poiMode",!1,!1,[this,"poiMode"],os.defaults.modes),new H("poi高度偏移","poi高度偏移",!1,!1,[this,"poiOffsetHeight"],1.8)]}};D(Vl,"type",Vl.register("ESHumanPoi",Vl,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let su=Vl;(r=>{r.createDefaultProps=()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:M.reactJson({}),autoAnchor:!0,screenRender:!0,size:M.reactArray([100,100]),anchor:M.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...ss.createDefaultProps()})})(su||(su={})),M.extendClassProps(su.prototype,su.createDefaultProps);const Cr=class Cr extends ze{get typeName(){return"ESPit"}get defaultProps(){return Cr.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 H("深度","坑深度(米)",!1,!1,[this,"depth"],Cr.defaults.depth),new H("插值","插值距离(米)",!1,!1,[this,"interpolation"],Cr.defaults.interpolation),new H("透明度","透明度",!1,!1,[this,"opacity"],Cr.defaults.opacity),new ae("侧面图片","侧面图片",!1,!1,[this,"sideImage"],Cr.defaults.sideImage),new ae("底面图片","底面图片",!1,!1,[this,"bottomImage"],Cr.defaults.bottomImage)],style:[new ee("点样式","点样式集合",[]),new $("开启","开启点样式",!1,!1,[this,"pointed"],!1),new H("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new ce("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new ge("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new ee("线样式","线样式集合",[]),new $("开启","开启线样式",!1,!1,[this,"stroked"],!0),new H("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new ce("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new ge("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new $("是否贴地","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new ee("面样式","面样式集合",[]),new $("开启","开启填充样式",!1,!1,[this,"filled"],!0),new ge("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1]),new $("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1)]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new H("深度","坑深度(米)",!1,!1,[this,"depth"],Cr.defaults.depth),new H("插值","插值距离(米)",!1,!1,[this,"interpolation"],Cr.defaults.interpolation),new ae("侧面图片","侧面图片",!1,!1,[this,"sideImage"],Cr.defaults.sideImage),new ae("底面图片","底面图片",!1,!1,[this,"bottomImage"],Cr.defaults.bottomImage),new H("opacity","透明度",!1,!1,[this,"opacity"],Cr.defaults.opacity)])]}};D(Cr,"type",Cr.register("ESPit",Cr,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"})),D(Cr,"defaults",{...ze.defaults,depth:100,sideImage:{url:we.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50},bottomImage:{url:we.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50},opacity:1,interpolation:50});let us=Cr;(r=>{r.createDefaultProps=()=>({...ze.createDefaultProps(),depth:100,sideImage:M.reactJson(r.defaults.sideImage),bottomImage:M.reactJson(r.defaults.bottomImage),opacity:1,interpolation:50})})(us||(us={})),M.extendClassProps(us.prototype,us.createDefaultProps);const Bl=class Bl extends us{constructor(t){super(t);D(this,"_excavate",this.dv(new Ls(`${this.id}_ESExcavate`)));D(this,"_pit",this.dv(new us(`${this.id}_ESPit`)));D(this,"combinationClass",!0);this.mainClass=this._pit,this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit));{const{_excavate:n,_pit:i}=this;this.d(M.track([n,"show"],[this,"show"])),this.d(M.track([i,"show"],[this,"show"])),this.d(M.track([n,"allowPicking"],[this,"allowPicking"])),this.d(M.track([i,"allowPicking"],[this,"allowPicking"])),this.d(M.track([n,"collision"],[this,"collision"])),this.d(M.track([i,"collision"],[this,"collision"])),this.d(M.bind([i,"points"],[this,"points"])),this.d(M.track([n,"points"],[this,"points"])),this.d(M.track([i,"pointed"],[this,"pointed"])),this.d(M.track([n,"pointed"],[this,"pointed"])),this.d(M.track([i,"pointStyle"],[this,"pointStyle"])),this.d(M.track([n,"pointStyle"],[this,"pointStyle"])),this.d(M.track([i,"stroked"],[this,"stroked"])),this.d(M.track([n,"stroked"],[this,"stroked"])),this.d(M.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(M.track([n,"strokeStyle"],[this,"strokeStyle"])),this.d(M.track([i,"filled"],[this,"filled"])),this.d(M.track([i,"fillStyle"],[this,"fillStyle"])),this.d(M.track([n,"fillStyle"],[this,"fillStyle"])),this.d(M.track([n,"mode"],[this,"mode"])),this.d(M.track([n,"targetID"],[this,"targetID"])),this.d(M.track([i,"depth"],[this,"depth"])),this.d(M.track([i,"sideImage"],[this,"sideImage"])),this.d(M.track([i,"bottomImage"],[this,"bottomImage"])),this.d(M.track([i,"opacity"],[this,"opacity"])),this.d(M.track([i,"interpolation"],[this,"interpolation"])),this.d(M.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(M.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(o=>{i.flyIn(o)})),this.d(this.flyToEvent.don(o=>{i.flyTo(o)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get typeName(){return"ESHole"}get defaultProps(){return Bl.createDefaultProps()}get excavate(){return this._excavate}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ce("模式","mode",!1,!1,[this,"mode"],Ls.defaults.modes,"in"),new de("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}};D(Bl,"type",Bl.register("ESHole",Bl,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let ou=Bl;(r=>{r.createDefaultProps=()=>({mode:"in",targetID:"",...us.createDefaultProps()})})(ou||(ou={})),M.extendClassProps(ou.prototype,ou.createDefaultProps);const Bd={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},aC=async(r,e)=>{try{const t=window.localStorage.getItem("Authorization"),n={headers:{...t?{Authorization:t}:{}},mode:"cors"},o=await(await fetch(r+`${Bd.layerconfigfind}?tileServiceName=${e}`,n)).text();return JSON.parse(o)}catch(t){console.error(t)}},uC=async(r,e,t)=>{try{const n=window.localStorage.getItem("Authorization"),i=t??{},o={method:"POST",headers:{"Content-Type":"application/json",...n?{Authorization:n}:{}},mode:"cors",body:JSON.stringify({tileServiceName:e,layerConfig:JSON.stringify(i)})},a=await(await fetch(r+Bd.layerconfigsave,o)).text();return JSON.parse(a)}catch(n){console.error(n)}},lC=async r=>{try{const e=window.localStorage.getItem("Authorization"),t={headers:{...e?{Authorization:e}:{}},mode:"cors"},i=await(await fetch(r,t)).text(),o=JSON.parse(i);if(o.status=="ok")return o.data.port;console.error(o.status);return}catch(e){console.error(e)}},cC=async(r,e,t)=>{try{const n={tileServiceName:e,featureId:t},i=window.localStorage.getItem("Authorization"),s=await(await fetch(r+Bd.featureproperty,{method:"post",headers:{"Content-Type":"application/json",...i?{Authorization:i}:{}},body:JSON.stringify(n),mode:"cors"})).text(),a=JSON.parse(s);if(a.status=="ok")return a.data;console.error(a.data.status);return}catch(n){console.error(n)}},ku=class ku extends Yt{constructor(t){super(t);D(this,"_es3DTileset",this.dv(new Yt(`${this.id}_ES3DTileset`)));D(this,"_ids",this.dv(M.reactJson([])));D(this,"combinationClass",!0);D(this,"_highlightInner3DtilesetEvent",this.dv(new M.Event));D(this,"_removeHighlightInner3DtilesetEvent",this.dv(new M.Event));D(this,"_tilesetServePort",this.dv(M.react("")));this.mainClass=this._es3DTileset;{const n=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(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const n=this._es3DTileset;this.d(M.track([n,"allowPicking"],[this,"allowPicking"])),this.d(M.track([n,"collision"],[this,"collision"])),this.d(M.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(M.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(M.track([n,"actorTag"],[this,"actorTag"])),this.d(M.track([n,"materialMode"],[this,"materialMode"])),this.d(M.track([n,"highlight"],[this,"highlight"])),this.d(M.track([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(M.track([n,"highlightID"],[this,"highlightID"])),this.d(M.track([n,"highlightColor"],[this,"highlightColor"])),this.d(M.bind([n,"offset"],[this,"offset"])),this.d(M.bind([n,"rotation"],[this,"rotation"])),this.d(M.track([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(M.track([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(M.track([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(M.track([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(M.track([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(M.track([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(M.track([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(M.track([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(M.track([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(M.track([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(M.track([n,"cacheBytes"],[this,"cacheBytes"])),this.d(M.track([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(M.track([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(M.track([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(M.track([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(M.track([n,"materialParams"],[this,"materialParams"])),this.d(M.bind([n,"supportEdit"],[this,"supportEdit"])),this.d(M.bind([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(M.bind([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(M.bind([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(M.bind([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(M.bind([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(M.bind([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{n.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{this.pickedEvent.emit(new Zc(this,i.childPickedInfo))}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get typeName(){return"ESRtsTileset"}get defaultProps(){return ku.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}async getFeatureProperty(t){return await cC(this.baseUrl,this.tileServiceName,t)}async getLayerConfig(){const t=await aC(this.baseUrl,this.tileServiceName);return this.layerConfig=t,t}async saveLayerConfig(){const t=this.layerConfig;return await uC(this.baseUrl,this.tileServiceName,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,n){var a,c,f;const i=await t.pick(n),o=i.sceneObject;return!o||o.id!==this.id&&o.typeName!="ESRtsFeatureEditing"?void 0:o.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(c=i==null?void 0:i.tilesetPickInfo)==null?void 0:c.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(f=i==null?void 0:i.sceneObject)==null?void 0:f.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 lC(this.url);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],n=+new Date;if(t){const o=this.tileServiceIp,s=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${o}:${s}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var t;if(this.url&&typeof this.url=="string"){const n=(t=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:t[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return n}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 n=(t=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:t[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}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 n=(t=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:t[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getProperties(t){return[...super.getProperties(t),new ee("ESRtsTileset","ESRtsTileset",[new ae("图层配置","图层配置(layerConfig)",!0,!1,[this,"layerConfig"],[])])]}};D(ku,"type",ku.register("ESRtsTileset",ku,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),D(ku,"defaults",{...Yt.defaults,layerConfig:[]});let au=ku;(r=>{r.createDefaultProps=()=>({layerConfig:M.reactJsonWithUndefined(void 0),...Yt.createDefaultProps()})})(au||(au={})),M.extendClassProps(au.prototype,au.createDefaultProps);function hC(r){return typeof r=="number"&&!isNaN(r)}const Gu=class Gu extends Yt{constructor(t){super(t);D(this,"combinationClass",!0)}get typeName(){return"ESRtsFeatureEditing"}get defaultProps(){return Gu.createDefaultProps()}get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,beautifyMaterails:this.beautifyMaterails,props:this.props,rotation:this.rotation}}set json(t){this._innerSetJson(t)}async init(t,n){this.featureId=n;const i=await t.getFeatureProperty(n);this.uiShowprops=i.allFields.map(a=>({featureClassName:a.featureClassName,fields:a.fields.map(c=>({key:c.name,type:c.type,value:c.type!="Double"?c.value:hC(c.value)?Number(c.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 o=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${o}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(a=>{t.pickedEvent.emit(new Zc(t,a))})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}getProperties(t){return[...super.getProperties(t)]}};D(Gu,"type",Gu.register("ESRtsFeatureEditing",Gu,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),D(Gu,"defaults",{...Yt.defaults,layerConfig:{}});let uu=Gu;(r=>{r.createDefaultProps=()=>({...Yt.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:M.reactJson({}),beautifyMaterails:M.reactJson({}),uiShowprops:M.reactJson({}),props:M.reactJson({})})})(uu||(uu={})),M.extendClassProps(uu.prototype,uu.createDefaultProps);const fC=async r=>{try{const e=window.localStorage.getItem("Authorization"),t={headers:{...e?{Authorization:e}:{}},mode:"cors"},i=await(await fetch(r,t)).text(),o=JSON.parse(i);if(o.status=="ok")return o.data.port;console.error(o.status);return}catch(e){console.error(e)}},Vu=class Vu extends Yt{constructor(t){super(t);D(this,"_es3DTileset",this.dv(new Yt(`${this.id}_ES3DTileset`)));D(this,"combinationClass",!0);D(this,"_tilesetServePort",this.dv(M.react("")));this.mainClass=this._es3DTileset;{const n=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(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const n=this._es3DTileset;this.d(M.track([n,"allowPicking"],[this,"allowPicking"])),this.d(M.track([n,"collision"],[this,"collision"])),this.d(M.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(M.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(M.track([n,"actorTag"],[this,"actorTag"])),this.d(M.track([n,"materialMode"],[this,"materialMode"])),this.d(M.track([n,"highlight"],[this,"highlight"])),this.d(M.track([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(M.track([n,"highlightID"],[this,"highlightID"])),this.d(M.track([n,"highlightColor"],[this,"highlightColor"])),this.d(M.bind([n,"offset"],[this,"offset"])),this.d(M.bind([n,"rotation"],[this,"rotation"])),this.d(M.track([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(M.track([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(M.track([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(M.track([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(M.track([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(M.track([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(M.track([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(M.track([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(M.track([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(M.track([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(M.track([n,"cacheBytes"],[this,"cacheBytes"])),this.d(M.track([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(M.track([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(M.track([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(M.track([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(M.track([n,"materialParams"],[this,"materialParams"])),this.d(M.bind([n,"supportEdit"],[this,"supportEdit"])),this.d(M.bind([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(M.bind([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(M.bind([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(M.bind([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(M.bind([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(M.bind([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{this.pickedEvent.emit(new Zc(this,i.childPickedInfo))}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get typeName(){return"ESMsTileset"}get defaultProps(){return Vu.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}async getport(){const t=await fC(this.url);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],n=+new Date;if(t){const o=this.tileServiceIp,s=await this.getport();this._es3DTileset.url=`${o}:${s}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var t;if(this.url&&typeof this.url=="string"){const n=(t=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:t[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return n}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 n=(t=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:t[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return n}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 n=(t=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:t[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}getProperties(t){return[...super.getProperties(t)]}};D(Vu,"type",Vu.register("ESMsTileset",Vu,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),D(Vu,"defaults",{...Yt.defaults,layerConfig:{}});let lu=Vu;(r=>{r.createDefaultProps=()=>({...Yt.createDefaultProps()})})(lu||(lu={})),M.extendClassProps(lu.prototype,lu.createDefaultProps);const Hy={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:`
641
+ ## 参数类型为 ESPoiType[]
642
+ \`\`\`js
643
+ type Vector2D = [number, number]
644
+
645
+ type ESPoiType = {
646
+ type: string,
647
+ povit: Vector2D,
648
+ widget: string,
649
+ worldScale: number,
650
+ hiddenDistance: number
651
+ }
652
+
653
+ \`\`\`
654
+ `},Fo=class Fo extends Xe{get typeName(){return"ESPoiTileset"}get defaultProps(){return Fo.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ae("路径","路径",!1,!1,[this,"url"]),new ae("poiTypes","类型为 {type: string, povit: Vector2D, widget: string, worldScale: number, hiddenDistance: number}[]",!1,!1,[this,"poiTypes"],Fo.defaults.poiTypes,Hy.sampleValue),new H("heightOffset","heightOffset",!1,!1,[this,"heightOffset"])])]}};D(Fo,"type",Fo.register("ESPoiTileset",Fo,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"})),D(Fo,"defaults",{...Xe.defaults,poiTypes:Hy.defaultValue});let cu=Fo;(r=>{r.createDefaultProps=()=>({...Xe.createDefaultProps(),url:"",poiTypes:M.reactJsonWithUndefined(void 0),heightOffset:40})})(cu||(cu={})),M.extendClassProps(cu.prototype,cu.createDefaultProps);const Bu=class Bu extends we{get typeName(){return"ESScale"}get defaultProps(){return Bu.createDefaultProps()}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new $("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new ce("定位","放到屏幕的哪个位置",!1,!1,[this,"screenPosition"],[["left","left"],["right","right"]]),new at("位置","位置(bottom,right/left)",!1,!1,[this,"cssPosition"])])]}};D(Bu,"type",Bu.register("ESScale",Bu,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"})),D(Bu,"defaults",{...we.defaults,show:!0,screenPosition:"right",cssPosition:[40,18]});let hu=Bu;(r=>{r.createDefaultProps=()=>({...we.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})})(hu||(hu={})),M.extendClassProps(hu.prototype,hu.createDefaultProps);const wn=class wn extends ze{get typeName(){return"ESGeoExtrudedPolygon"}get defaultProps(){return wn.createDefaultProps()}constructor(e){super(e),this.collision=!1}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new H("高度","高度 m",!0,!1,[this,"height"],wn.defaults.height),new H("拉伸高度","拉伸高度 m",!0,!1,[this,"extrudedHeight"],wn.defaults.extrudedHeight),new $("应用每个位置高度","应用每个位置高度",!0,!1,[this,"perPositionHeight"],wn.defaults.perPositionHeight)],style:[new ee("点样式","点样式集合",[]),new $("开启","开启点样式",!1,!1,[this,"pointed"],!1),new H("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new ce("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new ge("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new ee("线样式","线样式集合",[]),new $("开启","开启线样式",!1,!1,[this,"stroked"],!1),new $("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new H("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new ce("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new ge("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new ee("面样式","面样式集合",[]),new $("开启","开启填充样式",!1,!1,[this,"filled"],!0),new $("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new ge("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new H("高度","高度 m",!0,!1,[this,"height"],wn.defaults.height),new H("拉伸高度","拉伸高度 m",!0,!1,[this,"extrudedHeight"],wn.defaults.extrudedHeight),new $("应用每个位置高度","应用每个位置高度",!0,!1,[this,"perPositionHeight"],wn.defaults.perPositionHeight)])]}};D(wn,"type",wn.register("ESGeoExtrudedPolygon",wn,{chsName:"挤压多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"挤压多边形体"})),D(wn,"supportEditingModes",[...ze.supportEditingModes,xe.HeightModify]),D(wn,"defaults",{...ze.defaults,height:0,extrudedHeight:10,perPositionHeight:!1});let xo=wn;(r=>{r.createDefaultProps=()=>({...ze.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1})})(xo||(xo={})),M.extendClassProps(xo.prototype,xo.createDefaultProps);const zu=class zu extends ze{constructor(t){super(t);D(this,"_classification",this.dv(new So(`${this.id}_ESClassification`)));D(this,"_geoExtrudedPolygon",this.dv(new xo(`${this.id}_ESGeoExtrudedPolygon`)));D(this,"combinationClass",!0);this.mainClass=this._geoExtrudedPolygon,this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon));{const{_classification:n,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(M.track([n,"collision"],[this,"collision"])),this.d(M.track([i,"collision"],[this,"collision"])),this.d(M.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(M.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(M.bind([i,"points"],[this,"points"])),this.d(M.bind([i,"extrudedHeight"],[this,"height"])),this.d(M.bind([n,"fillColor"],[this,"overheightColor"])),this.d(M.bind([i,"fillColor"],[this,"standardColor"]));{const o=()=>{const{height:a,points:c,maxHeight:f}=this;if(!c)return;const m=c.map(p=>[p[0],p[1],a]);n.points=m,n.height=f-a,f-a<=0?n.show=!1:n.show=this.show&&this.filled};o();const s=this.dv(M.createNextAnimateFrameEvent(this.heightChanged,this.pointsChanged,this.maxHeightChanged));this.d(s.don(o))}{const o=()=>{const{show:a,filled:c}=this;n.show=a&&c,i.show=a&&c};o();const s=this.dv(M.createNextAnimateFrameEvent(this.showChanged,this.filledChanged));this.d(s.don(o))}this.dispose(this.flyInEvent.don(o=>{i.flyIn(o)})),this.dispose(this.flyToEvent.don(o=>{i.flyTo(o)})),this.dispose(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.dispose(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get typeName(){return"ESHeightLimitAnalysis"}get defaultProps(){return zu.createDefaultProps()}get json(){return this._innerGetJson()}set json(t){this._innerSetJson(t)}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new H("高度","控高的高度",!1,!1,[this,"height"],10),new H("最高高度","最高高度",!1,!1,[this,"maxHeight"],200),new ge("超高颜色","超高颜色",!1,!1,[this,"overheightColor"],[1,0,0,.5]),new ge("标准颜色","标准颜色",!1,!1,[this,"standardColor"],[0,1,0,.5])],style:[new ee("点样式","点样式集合",[]),new $("开启","开启点样式",!1,!1,[this,"pointed"],!1),new H("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new ce("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new ge("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new ee("线样式","线样式集合",[]),new $("开启","开启线样式",!1,!1,[this,"stroked"],!1),new $("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new H("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new ce("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new ge("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new ee("面样式","面样式集合",[]),new $("开启","开启填充样式",!1,!1,[this,"filled"],!0),new $("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new ge("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(t){return[...super.getProperties(t),new H("高度","控高的高度",!1,!1,[this,"height"],10),new H("最高高度","最高高度",!1,!1,[this,"maxHeight"],200),new ge("超高颜色","超高颜色",!1,!1,[this,"overheightColor"],[1,0,0,.5]),new ge("标准颜色","标准颜色",!1,!1,[this,"standardColor"],[0,1,0,.5])]}};D(zu,"type",zu.register("ESHeightLimitAnalysis",zu,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),D(zu,"supportEditingModes",[...ze.supportEditingModes,xe.HeightModify]);let fu=zu;(r=>{r.createDefaultProps=()=>({height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5],...ze.createDefaultProps()})})(fu||(fu={})),M.extendClassProps(fu.prototype,fu.createDefaultProps);const xr=class xr extends Xe{constructor(t){super(t);D(this,"_widgetEvent",this.dv(new M.Event));D(this,"_data",this.dv(M.react(void 0)));{const n=()=>{if(this.url)do{if(typeof this.url=="object"){this.data=this.url;break}if(qy(this.url)){this.data=JSON.parse(this.url);break}fetch(we.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)})}while(!1)};n(),this.d(this.urlChanged.don(n))}}get typeName(){return"ESEntityCluster"}get defaultProps(){return xr.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 ae("地址","数据Url地址",!1,!1,[this,"url"],xr.defaults.url),new H("集合范围","用于扩展屏幕空间边界框的像素范围",!1,!1,[this,"pixelRange"],xr.defaults.pixelRange),new H("最小数量","可以聚合的屏幕空间对象的最小数量",!1,!1,[this,"minimumClusterSize"],xr.defaults.minimumClusterSize),new ce("高度模式","高度获取模式",!1,!1,[this,"heightReference"],xr.defaults.heightReferences,"None")]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new ae("url","数据Url地址",!1,!1,[this,"url"],xr.defaults.url),new H("pixelRange","用于扩展屏幕空间边界框的像素范围",!1,!1,[this,"pixelRange"],xr.defaults.pixelRange),new H("minimumClusterSize","可以聚合的屏幕空间对象的最小数量",!1,!1,[this,"minimumClusterSize"],xr.defaults.minimumClusterSize),new ae("style","用于设置聚合和非聚合的显示样式",!1,!1,[this,"style"],xr.defaults.style),new ce("heightReference","高度获取模式",!1,!1,[this,"heightReference"],xr.defaults.heightReferences)]),new ee("UE","UE",[new $("perspective","是否启用透视效果,自动缩放远处标签",!1,!1,[this,"perspective"],xr.defaults.perspective)])]}};D(xr,"type",xr.register("ESEntityCluster",xr,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"})),D(xr,"defaults",{...Xe.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 du=xr;(r=>{r.createDefaultProps=()=>({...Xe.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:M.reactJsonWithUndefined(void 0),heightReference:"None",perspective:!1})})(du||(du={})),M.extendClassProps(du.prototype,du.createDefaultProps);class Uc extends M.Destroyable{constructor(){super();D(this,"_player",this.disposeVar(new Ti));const t=this._player;{const n=()=>{const i=(this.stopTime??0)-(this.startTime??0);t.duration=i>0?i:0};n(),this.d(this.startTimeChanged.don(n)),this.d(this.stopTimeChanged.don(n))}this.d(M.bind([t,"playing"],[this,"playing"])),this.d(M.bind([t,"loop"],[this,"loop"])),this.d(M.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 n=this.currentTime-this.startTime;t.currentTime=M.clamp(n,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}}(r=>{r.createDefaultProps=()=>({...we.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Uc||(Uc={})),M.extendClassProps(Uc.prototype,Uc.createDefaultProps);const Uu=class Uu extends we{constructor(t){super(t);D(this,"_absolutePlayer",this.dv(new Uc));const n=this.absolutePlayer;this.d(M.bind([n,"currentTime"],[this,"currentTime"])),this.d(M.bind([n,"startTime"],[this,"startTime"])),this.d(M.bind([n,"stopTime"],[this,"stopTime"])),this.d(M.bind([n,"playing"],[this,"playing"])),this.d(M.bind([n,"loop"],[this,"loop"])),this.d(M.bind([n,"speed"],[this,"speed"]))}get typeName(){return"ESPlayer"}get defaultProps(){return Uu.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 ee("通用","通用",[new Jc("播放器","播放器",[this,"playing"],[this,"ratio"],[this,"loop"]),new Vi("currentTime","currentTime",!1,!1,[this,"currentTime"]),new Vi("startTime","startTime",!1,!1,[this,"startTime"]),new Vi("stopTime","stopTime",!1,!1,[this,"stopTime"]),new $("playing","playing",!1,!1,[this,"playing"]),new $("loop","loop",!1,!1,[this,"loop"]),new H("speed","speed",!1,!1,[this,"speed"])])]}};D(Uu,"type",Uu.register("ESPlayer",Uu,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"})),D(Uu,"defaults",{...we.defaults,currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1});let Fs=Uu;(r=>{r.createDefaultProps=()=>({...we.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})})(Fs||(Fs={})),M.extendClassProps(Fs.prototype,Fs.createDefaultProps);function Xy(r,e){if(e<0)return[void 0,0];if(e>r.length-1)return[void 0,r.length-1];let t;do{if(t=r[e][2],t||e-1<0)break;--e}while(!0);return[t,e]}function Yy(r,e){if(e<0)return[void 0,0];if(e>r.length-1)return[void 0,r.length-1];let t;do{if(t=r[e][2],t||e+1>=r.length)break;++e}while(!0);return[t,e]}function dC(r,e,t="Lerp"){let n,i,o,s;if(r.length!==0){do{if(e<=r[0][0]){n=r[0][1],i=r[0][2],o=0,s=0;break}else if(e>=r[r.length-1][0]){const[f,m,p]=r[r.length-1];n=m,i=p,o=r.length-2,s=1;break}const c=r.findIndex(([f])=>e<=f);if(c===-1)throw new Error("nextIndex === -1");o=c-1;{const[f,m]=r[o],[p,g]=r[c],w=(e-f)/(p-f),_=Dd(m),y=Dd(g),h=M.Vector.lerp(_,y,w);n=fy(h),s=w}{let[f,m]=Xy(r,o),[p,g]=Yy(r,c);if(t==="Lerp")if(f&&p){if(m<0||g>=r.length)throw new Error("Invalid rotation index");const w=(e-r[m][0])/(r[g][0]-r[m][0]);i=Ad(f,p,w)}else f?i=f:p?i=p:i=void 0;else t==="Prev"?f&&(i=f):t==="Next"&&p&&(i=p)}}while(!1);return{position:n,rotation:i,index:o,ratio:s}}}function pC(r,e,t){const{timePosRots:n}=r;if(!n)throw new Error("!timePosRots");if(n.length===0)throw new Error("timePosRots.length === 0");e=Math.max(e,n[0][0]),t=Math.min(t,n[n.length-1][0]);const i=r.getCurrent(e),o=r.getCurrent(t);if(!i||!o)return;const s=[];i.ratio<1&&s.push([e,i.position,i.rotation]);for(let a=i.index+1;a<=o.index;++a)s.push(n[a]);return o.ratio>0&&s.push([t,o.position,o.rotation]),s}function Jy(r,e=!1){const t=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=t.length;if(n===0)return t;if(n===1)return(!t[0][2]===void 0||e)&&(t[0][2]=void 0),t;for(let i=1;i<n;++i){if(t[i][2]!==void 0&&!e)continue;const o=t[i-1][1],s=t[i][1],a=is(o),c=is(s),f=M.Vector.distance(a,c);if(f===0){t[i][2]=t[i-1][2];continue}const m=hd(o,s),p=s[2]-o[2],g=Math.asin(p/f)*180/Math.PI,w=Number.isFinite(m)?m:0,_=Number.isFinite(g)?g:0;t[i][2]=[w,_,0]}return(t[0][2]===void 0||e)&&(t[0][2]=n>1?t[1][2]:void 0),t}function Ky(r,e=!1){const t=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=t.length;if(n===0)return t;if(n===1)return(!t[0][2]===void 0||e)&&(t[0][2]=void 0),t;for(let i=n-2;i>=0;--i){if(t[i][2]!==void 0&&!e)continue;const o=t[i][1],s=t[i+1][1],a=is(o),c=is(s),f=M.Vector.distance(a,c);if(f===0){t[i][2]=t[i+1][2];continue}const m=hd(o,s),p=s[2]-o[2],g=Math.asin(p/f)*180/Math.PI,w=Number.isFinite(m)?m:0,_=Number.isFinite(g)?g:0;t[i][2]=[w,_,0]}return(t[n-1][2]===void 0||e)&&(t[n-1][2]=n>1?t[n-2][2]:[0,0,0]),t}function gC(r,e=!1){const t=Jy(r,e),n=Ky(r,e);if(t.length!==n.length)throw new Error("p.length !== n.length");const i=t.length;for(let o=0;o<i;o++){const s=t[o][2],a=n[o][2];s===void 0&&a===void 0?t[o][2]=void 0:s===void 0?t[o][2]=a:a===void 0?t[o][2]=s:t[o][2]=Ad(s,a,.5)}return t}function vC(r,e,t){let i;if(!r.timePosRots)return;const o=[],s=r.timePosRots.length;if(!(s<=2)){o.push(r.timePosRots[0]);for(let a=1;a<s-1;++a){const c=r.timePosRots[a-1][0],f=r.timePosRots[a][0],m=r.timePosRots[a+1][0],p=r.accumDistances[a-1],g=r.accumDistances[a],w=r.accumDistances[a+1];do{const _=g-p;if(_===0)continue;const y=_-(i??(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5);let h=(y<0?0:y)/_;Number.isNaN(h)&&(h=0);const d=(1-h)*c+h*f,u=r.getCurrent(d);if(!u)break;o.push([d,u.position,u.rotation])}while(!1);t&&o.push(r.timePosRots[a]);do{const _=w-g;if(_===0)continue;let y=(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5;const h=(e.length==1?e[0]:e[a]||e[e.length-1])*.5||0;y+h>_?(y=_*(y/(y+h)),i=_-y):i=void 0;let d=(y<0?0:y)/_;const u=(1-d)*f+d*m,l=r.getCurrent(u);if(!l)break;o.push([u,l.position,l.rotation])}while(!1)}o.push(r.timePosRots[s-1]),r.timePosRots=o}}const yC=`
655
+ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
656
+ \`\`\`
657
+ [
658
+ [
659
+ 0,
660
+ [
661
+ 102.53298730761246,
662
+ 28.91979487002454,
663
+ 9.313225746154785e-10
664
+ ],
665
+ [
666
+ 50.04442483885466,
667
+ 0,
668
+ 0
669
+ ]
670
+ ],
671
+ [
672
+ 93573.85803656405,
673
+ [
674
+ 103.2739673341736,
675
+ 29.858290043349385,
676
+ 9.313225746154785e-10
677
+ ],
678
+ [
679
+ 50.04442483885466,
680
+ 0,
681
+ 0
682
+ ]
683
+ ],
684
+ [
685
+ 187147.71620880597,
686
+ [
687
+ 105.0227848288211,
688
+ 29.992573933966238,
689
+ -1.862645149230957e-9
690
+ ],
691
+ [
692
+ 50.407671059303944,
693
+ -1.7107615502773115e-12,
694
+ 0
695
+ ]
696
+ ]
697
+ ]
698
+ \`\`\`
699
+ `;function mC(r){try{const e=JSON.parse(r);if(Array.isArray(e)&&e.length>0){const t=typeof e[0][0]=="number",n=Array.isArray(e[0][1])&&e[0][1].length===3;return t&&n?e:void 0}throw new Error("解析有问题")}catch{const t=r.split(/\n|\r\n/),n=[],i=t.length;for(let o=0;o<i;++o){const s=t[o],a=s.split(/[^0-9e\.\+\-]+/).filter(c=>c!=="").map(c=>+c);a.length<4?console.warn(`第${o+1}行数据无法解析成路径的数据, 原内容为: ${s}`):a.length<7?n.push([a[0],[a[1],a[2],a[3]],void 0]):n.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return n}}const en=class en extends M.Destroyable{constructor(t,n){super();D(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});D(this,"_currentInfo",this.disposeVar(M.react(void 0,(t,n)=>!1)));D(this,"_player");D(this,"_flyToEvent",this.disposeVar(new M.Event));D(this,"_accumDistancesChanged",this.disposeVar(new M.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(M.react(void 0)));this._player=this.disposeVar(new Ti);const i=()=>{const o=this.getCurrent(this.currentTime??0);if(o===void 0)this._currentInfo.value=void 0;else{const{index:s,position:a,rotation:c,ratio:f}=o;this._scratchCurrentInfo.index=s,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=c,this._scratchCurrentInfo.ratio=f,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(M.bind([this._player,"loop"],[this,"loop"]));{const o=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const s=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(s-this._player.currentTime)>.01)&&(this._player.currentTime=s)};o(),this.dispose(this.currentTimeChanged.disposableOn(o))}{const o=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const s=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(s-this.currentTime)>.01)&&(this.currentTime=s)};o(),this.dispose(this._player.currentTimeChanged.disposableOn(o))}this.dispose(M.bind([this._player,"duration"],[this,"duration"])),this.dispose(M.bind([this._player,"playing"],[this,"playing"])),this.dispose(M.bind([this._player,"speed"],[this,"speed"]));{const o=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};o();const s=this.disposeVar(M.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(s.disposableOn(o))}{const o=()=>{const s=this.timePosRots;if(!s)return;let a=0;const c=s.length;for(let f=0;f<c;++f){const m=s[f][0];if(m<0)console.warn("地理路径的时间戳不能小于0!");else if(m<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${f} time: ${m}`);break}}};o(),this.dispose(this.timePosRotsChanged.disposableOn(o))}{const o=this.disposeVar(M.createProcessingFromAsyncFunc(async s=>{if(!this.dataUri)return;await s.promise(M.sleep(1e3));const a=await s.promise(fetch(this.dataUri)),c=await s.promise(a.text());this.timePosRots=en.parseData(c)}));this.dispose(this.dataUriChanged.disposableOn(()=>{o.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=en.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 n=0;const i=[];let o=is(this.timePosRots[0][1]);i.push(n);for(let s=1;s<t;++s){const a=is(this.timePosRots[s][1]),c=M.Vector.distance(a,o);o=a,n+=c,i.push(n)}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&&dC(this.timePosRots,t,this.rotLerpMode)}subPath(t,n){return this.timePosRots&&pC(this,t,n)}computeRotIfUndefinedUsingPrevLine(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=en.computeRotIfUndefinedUsingPrevLine(this.timePosRots,t)}computeRotIfUndefinedUsingNextLine(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=en.computeRotIfUndefinedUsingNextLine(this.timePosRots,t)}computeRotIfUndefinedUsingLerp(t=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=en.computeRotIfUndefinedUsingLerp(this.timePosRots,t)}computeRotIfUndefined(t=!1){this.computeRotIfUndefinedUsingPrevLine(t)}addAroundPoints(t,n){vC(this,t,n)}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(en,"computeRotIfUndefinedUsingPrevLine",Jy),D(en,"computeRotIfUndefinedUsingNextLine",Ky),D(en,"computeRotIfUndefinedUsingLerp",gC),D(en,"getLeftRotation",Xy),D(en,"getRightRotation",Yy),D(en,"parseData",mC),D(en,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),D(en,"timePosRotsMd",yC);let Oo=en;(r=>{r.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:M.reactDeepArrayWithUndefined(void 0,(e,t)=>e[0]===t[0]&&e[1].every((n,i)=>n===t[1][i])&&e[2]===t[2]===void 0||e[2]!==void 0&&t[2]!==void 0&&e[2].every((n,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:M.reactArray([1,1,1,1]),hasDash:!1,gapColor:M.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})})(Oo||(Oo={})),M.extendClassProps(Oo.prototype,Oo.createDefaultProps);const Hs=class Hs extends gn{constructor(t){super(t);D(this,"_path");D(this,"_currentPositionChanged",this.disposeVar(new M.Event));D(this,"_currentRotationChanged",this.disposeVar(new M.Event));D(this,"_currentChanged",this.disposeVar(new M.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 Oo),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 n=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const o=this.timeStamps.length,s=this.points.length,a=Math.min(o,s),c=[];for(let f=0;f<a;++f)c.push([this.timeStamps[f],this.points[f]]);this._path.timePosRots=c,this.rotationRadius.some(f=>f>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(M.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));n(),this.dispose(i.disposableOn(n))}}get typeName(){return"ESPath"}get defaultProps(){return Hs.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[Vc(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 vf("时间序列","时间序列",!0,!1,[this,"timeStamps"],[]),new H("线条流速","速度 m/s",!1,!1,[this,"speed"],1),new ce("模式","materialMode",!1,!1,[this,"materialMode"],Hs.defaults.materialModes,"singleArrow"),new ae("拐弯半径","拐弯半径,单位米",!1,!1,[this,"rotationRadius"])]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new vf("时间序列","时间序列",!0,!1,[this,"timeStamps"],[]),new Kt("当前位置","当前位置",!0,!0,[this,"currentPosition"]),new H("速度","速度 m/s",!1,!1,[this,"speed"]),new ce("materialMode","materialMode",!1,!1,[this,"materialMode"],Hs.defaults.materialModes),new ae("拐弯半径","拐弯半径,单位米",!1,!1,[this,"rotationRadius"],[5])])]}};D(Hs,"type",Hs.register("ESPath",Hs,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"})),D(Hs,"defaults",{...Ae.defaults,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]]});let js=Hs;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps(),timeStamps:M.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:M.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})})(js||(js={})),M.extendClassProps(js.prototype,js.createDefaultProps);const Xs=class Xs extends le{get typeName(){return"ESGeoDivTextPoi"}get defaultProps(){return Xs.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new $("文本编辑交互","文本编辑交互.",!1,!1,[this,"textEditingInteraction"]),new $("文本编辑","文本编辑.",!1,!1,[this,"textEditing"]),new H("宽度","宽度",!0,!1,[this,"width"],Xs.defaults.width),new Yc("内容","内容",!0,!1,[this,"text"],Xs.defaults.text),new kr("原点比例和偏移","原点比例和偏移.",!1,!1,[this,"originRatioAndOffset"]),new H("透明度","透明度",!1,!1,[this,"opacity"]),new H("字体大小","字体大小",!1,!1,[this,"fontSize"]),new ge("字体颜色"," 字体颜色.",!1,!1,[this,"color"]),new ge("背景颜色"," 背景颜色.",!1,!1,[this,"backgroundColor"]),new kr("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"]),new kr("边框圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new ge("边框颜色"," 边框色.",!1,!1,[this,"borderColor"]),new H("边框宽度","边框宽度",!1,!1,[this,"borderWidth"]),new ce("文字位置","文字位置",!1,!1,[this,"textAlign"],[["center","center"],["left","left"],["right","right"]]),new ce("边框类型","边框类型",!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(Xs,"type",Xs.register("ESGeoDivTextPoi",Xs,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"})),D(Xs,"defaults",{...le.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 pu=Xs;(r=>{r.createDefaultProps=()=>({text:void 0,width:void 0,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:M.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:M.reactArray([1,1,1,1]),backgroundColor:M.reactArray([0,0,0,.8]),padding:M.reactArray([5,5,5,5]),borderRadius:M.reactArray([6,6,6,6]),borderWidth:0,borderColor:M.reactArray([1,1,1,1]),borderStyle:"solid",...le.createDefaultProps()})})(pu||(pu={})),M.extendClassProps(pu.prototype,pu.createDefaultProps);const zl=class zl extends le{get typeName(){return"ESCityBasePoint"}get defaultProps(){return{...zl.createDefaultProps()}}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ge("颜色","颜色",!1,!1,[this,"color"],[1,1,0,1])]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new ge("颜色","颜色",!1,!1,[this,"color"])])]}};D(zl,"type",zl.register("ESCityBasePoint",zl,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let gu=zl;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),color:M.reactArray([1,1,0,1])})})(gu||(gu={})),M.extendClassProps(gu.prototype,gu.createDefaultProps);const _C=[{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]}}],bC=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
700
+ \`\`\`
701
+ [{
702
+ "id": "document",
703
+ "name": "CZML Path",
704
+ "version": "1.0",
705
+ "clock": {
706
+ "interval": "2012-08-04T10:00:00Z/2012-08-04T15:00:00Z",
707
+ "currentTime": "2012-08-04T10:00:00Z",
708
+ "multiplier": 10
709
+ }
710
+ }, {
711
+ "id": "path",
712
+ "name": "path with GPS flight data",
713
+ "description": "<p>Hang gliding flight log data from Daniel H. Friedman.<br>Icon created by Larisa Skosyrska from the Noun Project</p>",
714
+ "availability": "2012-08-04T10:00:00Z/2012-08-04T15:00:00Z",
715
+ "path": {
716
+ "material": {
717
+ "polylineOutline": {
718
+ "color": {
719
+ "rgba": [255, 0, 255, 255]
720
+ },
721
+ "outlineColor": {
722
+ "rgba": [0, 255, 255, 255]
723
+ },
724
+ "outlineWidth": 5
725
+ }
726
+ },
727
+ "width": 8,
728
+ "leadTime": 10,
729
+ "trailTime": 1000,
730
+ "resolution": 5
731
+ },
732
+ "billboard": {
733
+ "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAfCAYAAACVgY94AAAACXBIWXMAAC4jAAAuIwF4pT92AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA7VJREFUeNrEl2uIlWUQx39nXUu0m2uQbZYrbabdLKMs/VBkmHQjioqFIhBS+hKEQpQRgVAf2u5RQkGBRUllRH4I2e5ZUBJlEZVt5i0tTfHStrZ6fn35L70d9n7Obg88vOedmWfmf2bmmZkXlRrtq9V16mZ1iVqqhd5agXvQf1c5zw/V8dXqrqO6dQKwBrgdWApsCb0VqAc2AnOrMVANwIsD4BLgTOBPYB2wHJgEzAG+ANqAu4ZsZYiuX5QwfqI2hvaNulA9J7zLQn8o76vUuuHOwXHqSzH4aIF+TWjnBkSH+nCBf716SP1KPWO4AJ6ltgfIjRW8p9U/1KPz/ry6RT2mIDNF3Zjz19Ya4G1R/J16dgWvQd2pPlXhMdVZPUTgxfCW1wJgXUJpQlvfg8zs8K8r0Caom9QHetG7NGfa1ElDBThRXRtFd/Qh16puKIS3e7+clBjdy7kL1b3q4fzJQQGck5z6Nb97kxujblWf64HXov7Vl/E4YXWccP9AAd6dAx+ox/WTArNzY1t64B0f8K0DyLXuUvRGZfcpCo1VX4tg6wB76WMB0dALf526foAX8cqUot2pGP8B2Kz+krBeNYjS8636dh/8Beo2deoA9TWp76pd6g0q9cDNwKvAD8A84EfglLRBe2g+JWAfcEF68bPABOCoAl/gIPA5MA64FVgGnNhP292W3r0SeB1YVlJXAjcBP8XwyQUj9AKwAzg2+/fQSsBhoJxBAaALaIzenZGnD911wA7gEDAD2FFSpwOzgDHZ5T7+ZSlGd2d6AXgi5+qAn+O5U0PbBVwKtAD3AHuB8f3YGBUdncCGoQ4LE9XtGRqK9LnduVPRIu2BPqwD65IYbS7Qpql7Ql9YoJcy9bwzkgPrfOCj5G33+h54E/g0PAr5thq4ApgyEgNrc27aWwVaPTA1QJ4BjgTGFvhteV40EgPrgvTP7qlmZqFnl9WD+b2posN83E/NrEkOjlI/U1fkfUYa/pe5IE3qZPW8jFOqiyN7p3pAPX04c7AxYSoDDcAjKT2LgLXA6IR2M3Bviv59wDTgQGTPH84Qd8+HXfHcoUws2zM0HMjuUPep+xP2PWpnwtw0GJsldbBpewQwE/gbeDyt7H1gcW53O7AC+A3Yn6+/W+Ld9SnWA15DAVhc8xK2TuA9YHrCuhV4EngFuBx4YagG6qv8cF+T52kB2Zy+e1I8taUacNV+uBdXO7ABmJwJpwx8XQvF9TUCWM64tiQhbq/oMv+7BwFWpQzNT8vbVQul/wwAGzzdmXU1xuUAAAAASUVORK5CYII=",
734
+ "scale": 1.5,
735
+ "eyeOffset": {
736
+ "cartesian": [0.0, 0.0, -10.0]
737
+ }
738
+ },
739
+ "position": {
740
+ "epoch": "2012-08-04T10:00:00Z",
741
+ "cartographicDegrees": [
742
+ 0, -122.93797, 39.50935, 1776,
743
+ 10, -122.93822, 39.50918, 1773,
744
+ 20, -122.9385, 39.50883, 1772,
745
+ 30, -122.93855, 39.50842, 1770,
746
+ 40, -122.93868, 39.50792, 1770,
747
+ 50, -122.93877, 39.50743, 1767,
748
+ 60, -122.93862, 39.50697, 1771,
749
+ 70, -122.93828, 39.50648, 1765,
750
+ ]
751
+ }
752
+ }]
753
+ \`\`\`
754
+ `,Qy=`(dataSource) => {
755
+ var entities = dataSource.entities.values;
756
+
757
+ for (var i = 0; i < entities.length; i++) {
758
+ var entity = entities[i];
759
+ if (Cesium.defined(entity.billboard)) {
760
+ // entity.label = undefined; // 去掉文字的显示
761
+
762
+ entity.point = new Cesium.PointGraphics({
763
+ color: Cesium.Color.BLUE,
764
+ pixelSize: 30
765
+ });
766
+ }
767
+ }
768
+ }
769
+ `,wC=`data 路径都可以使用下面回调函数
770
+ \`\`\`
771
+ ${Qy}
772
+ \`\`\`
773
+
774
+ `,$y=Date.now();new Date($y).toISOString(),new Date($y+864e5).toISOString();const kt=class kt extends we{constructor(t){super(t);D(this,"_flyToEvent",this.disposeVar(new M.Event));D(this,"_resetClockEvent",this.disposeVar(new M.Event))}get typeName(){return"ESCzml"}get defaultProps(){return kt.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 ae("数据","数据",!0,!1,[this,"data"],kt.defaults.data,kt.defaults.dataMd),new ae("路径","路径",!1,!1,[this,"uri"],""),new $("启用","启用",!1,!1,[this,"clockEnabled"],!1),new H("倍速","倍速.",!1,!1,[this,"multiplier"],kt.defaults.multiplier),new $("自动设置时钟","自动设置时钟",!1,!1,[this,"autoResetClock"],!0),new Vi("开始时间","开始时间",!0,!1,[this,"startTime"],kt.defaults.startTime),new Vi("结束时间","结束时间",!0,!1,[this,"stopTime"],kt.defaults.stopTime),new Vi("当前时间","当前时间",!0,!1,[this,"currentTime"],kt.defaults.currentTime),new ce("clockStep","clockStep",!1,!1,[this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"SYSTEM_CLOCK_MULTIPLIER"),new ce("clockRange","clockRange",!1,!1,[this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"UNBOUNDED"),new $("是否启用动画","是否启用动画",!1,!1,[this,"shouldAnimate"],!1)],general:[...t.general,new de("唯一标识","id",!1,!0,[this,"id"]),new de("名称","name",!0,!1,[this,"name"]),new $("是否显示","show",!1,!1,[this,"show"],!0),new $("开启碰撞","collision",!1,!1,[this,"collision"],!1),new $("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],!1)]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new $("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new $("允许拾取","是否允许拾取",!1,!1,[this,"allowPicking"]),new Se("飞入","飞入",["number"],n=>this.flyTo(n),[1e3]),new ae("数据","数据",!0,!1,[this,"data"],kt.defaults.data,kt.defaults.dataMd),new ae("路径","路径",!1,!1,[this,"uri"]),new $("自动设置时钟","自动设置时钟",!1,!1,[this,"autoResetClock"]),new Se("重设时钟","根据当前加载的数据重设始终",[],()=>this.resetClock(),[]),new Gi("loadFnStr","loadFnStr",!0,!1,[this,"loadFuncStr"],kt.defaults.defaultLoadFuncStr,kt.defaults.defaultLoadFuncDocStr)]),new ee("时钟","时钟",[new $("启用","启用",!1,!1,[this,"clockEnabled"]),new Vi("开始时间","开始时间",!0,!1,[this,"startTime"],kt.defaults.startTime),new Vi("结束时间","结束时间",!0,!1,[this,"stopTime"],kt.defaults.stopTime),new Vi("当前时间","当前时间",!0,!1,[this,"currentTime"],kt.defaults.currentTime),new H("倍速","倍速.",!1,!1,[this,"multiplier"],kt.defaults.multiplier),new ce("clockStep","clockStep",!1,!1,[this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]]),new ce("clockRange","clockRange",!1,!1,[this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]]),new $("是否启用动画","是否启用动画",!1,!1,[this,"shouldAnimate"])])]}};D(kt,"type",kt.register("ESCzml",kt,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"})),D(kt,"defaults",{...we.defaults,show:!0,allowPicking:!0,data:_C,dataMd:bC,autoResetClock:!0,clockEnabled:!1,startTime:()=>Date.now(),stopTime:()=>Date.now()+864e5,currentTime:()=>Date.now(),multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,uri:"${earthsdk3-assets-script-dir}/assets/misc/simple.czml",defaultLoadFuncStr:Qy,defaultLoadFuncDocStr:wC});let vu=kt;(r=>{r.createDefaultProps=()=>({show:!0,uri:"",allowPicking:!1,data:M.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,...we.createDefaultProps()})})(vu||(vu={})),M.extendClassProps(vu.prototype,vu.createDefaultProps);const Wu=class Wu extends we{get typeName(){return"ESNavigator"}get defaultProps(){return Wu.createDefaultProps()}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new $("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new H("尺寸","尺寸",!1,!1,[this,"cssSize"]),new at("位置","位置(top,right)",!1,!1,[this,"cssPosition"]),new ql("图片地址","图片地址",!1,!1,[this,"imgUrl"])])]}};D(Wu,"type",Wu.register("ESNavigator",Wu,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"})),D(Wu,"defaults",{...we.defaults,show:!0,cssPosition:[170,30],cssSize:100,imgUrl:we.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")});let yu=Wu;(r=>{r.createDefaultProps=()=>({...we.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:r.defaults.imgUrl})})(yu||(yu={})),M.extendClassProps(yu.prototype,yu.createDefaultProps);const Ri=class Ri extends we{get typeName(){return"ESViewerStatusBar"}get defaultProps(){return Ri.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new $("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],Ri.defaults.show),new H("高度","height",!0,!1,[this,"height"],Ri.defaults.height),new H("文字大小","fontSize",!0,!1,[this,"fontSize"],Ri.defaults.fontSize),new ge("背景颜色"," 背景颜色",!0,!1,[this,"bgColor"],Ri.defaults.bgColor)])]}};D(Ri,"type",Ri.register("ESViewerStatusBar",Ri,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"})),D(Ri,"defaults",{...we.defaults,show:!0,height:30,fontSize:14,bgColor:[71,71,71,.8]});let mu=Ri;(r=>{r.createDefaultProps=()=>({...we.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:[.2784313725490196,.2784313725490196,.2784313725490196,.8]})})(mu||(mu={})),M.extendClassProps(mu.prototype,mu.createDefaultProps);const Li=class Li extends we{get typeName(){return"ESViewerStatusBarScale"}get defaultProps(){return Li.createDefaultProps()}constructor(e){super(e)}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new $("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],Li.defaults.show),new H("高度","height",!0,!1,[this,"height"],Li.defaults.height),new H("文字大小","fontSize",!0,!1,[this,"fontSize"],Li.defaults.fontSize),new ge("背景颜色"," 背景颜色",!0,!1,[this,"bgColor"],Li.defaults.bgColor)])]}};D(Li,"type",Li.register("ESViewerStatusBarScale",Li,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"})),D(Li,"defaults",{...we.defaults,show:!0,height:30,fontSize:14,bgColor:[71,71,71,.8]});let _u=Li;(r=>{r.createDefaultProps=()=>({...we.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:[.2784313725490196,.2784313725490196,.2784313725490196,.8]})})(_u||(_u={})),M.extendClassProps(_u.prototype,_u.createDefaultProps);const qu=class qu extends le{get typeName(){return"ESGaussianSplatting"}get defaultProps(){return qu.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new de("路径","url",!0,!1,[this,"url"]),new H("进度","progress",!1,!0,[this,"progress"],0)]}}getProperties(e){return[...super.getProperties(e),new ee("通用","通用",[new de("路径","url",!0,!1,[this,"url"]),new H("进度","progress",!1,!0,[this,"progress"],0)])]}};D(qu,"type",qu.register("ESGaussianSplatting",qu,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的ES对象"})),D(qu,"defaults",{...le.defaults});let bu=qu;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),url:"",progress:0})})(bu||(bu={})),M.extendClassProps(bu.prototype,bu.createDefaultProps);const Ys=class Ys extends le{get typeName(){return"ESStaticMesh"}get defaultProps(){return Ys.createDefaultProps()}constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()},t=[new de("mesh地址","mesh地址",!1,!1,[this,"mesh"],Ys.defaults.mesh)];return e.basic.push(...t),e}getProperties(e){return[...super.getProperties(e),new ee("ESStaticMesh","ESStaticMesh",[new de("mesh地址","mesh地址",!1,!1,[this,"mesh"],Ys.defaults.mesh)])]}};D(Ys,"type",Ys.register("ESStaticMesh",Ys,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"})),D(Ys,"defaults",{...le.defaults,mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"});let wu=Ys;(r=>{r.createDefaultProps=()=>({...le.createDefaultProps(),mesh:""})})(wu||(wu={})),M.extendClassProps(wu.prototype,wu.createDefaultProps);const Ul=class Ul extends Ae{constructor(t){super(t);D(this,"_startEvent",this.disposeVar(new M.Event));D(this,"_clearEvent",this.disposeVar(new M.Event))}get typeName(){return"ESSkylineAnalysis"}get defaultProps(){return Ul.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Se("开始分析","开始分析",[],()=>this.start(),[]),new Se("清除分析","清除分析",[],()=>this.clear(),[]),new Kc("分析结果","screenPoints",!1,!1,[this,"screenPoints"])]}}getProperties(t){return[...super.getProperties(t),new ee("通用","通用",[new Se("开始分析","开始分析",[],()=>this.start(),[]),new Se("清除分析","清除分析",[],()=>this.clear(),[]),new Kc("分析结果","screenPoints",!1,!1,[this,"screenPoints"])])]}};D(Ul,"type",Ul.register("ESSkylineAnalysis",Ul,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let Eu=Ul;(r=>{r.createDefaultProps=()=>({...Ae.createDefaultProps(),screenPoints:M.reactArrayWithUndefined(void 0)})})(Eu||(Eu={})),M.extendClassProps(Eu.prototype,Eu.createDefaultProps);function Zy(r){return typeof r=="string"?document.getElementById(r):r}function zd(r){if(!r)throw new Error("container is not defined");r.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);",r.appendChild(e),e}class e0 extends M.Destroyable{constructor(t,n){super();D(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=t,this._createSceneObjectListeningFunc=n;const i=this._listeningSceneObjects,o=(s,a)=>{if(s)for(let c of s){const f=i.get(c);f&&(f.destroy(),i.delete(c))}if(a)for(let c of a){if(i.get(c)){console.warn(`listeningSceneObjects已存在某对象:${c.name}`,c);debugger}const m=this.createSceneObjectListeningFunc(c);m&&i.set(c,m)}};o(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(o)),this.dispose(()=>{for(let s of this._listeningSceneObjects.values())s.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class EC extends M.Destroyable{constructor(e){super(),this._esObjectsManager=e;{const t=this._esObjectsManager;class n extends M.Destroyable{constructor(o){super(),this._esPath=o,this.dv(new M.ObjResettingWithEvent(t.activeViewerChanged,()=>{const s=t.activeViewer;if(!s)return;class a extends M.Destroyable{constructor(f){if(super(),this._esPath=f,!s)throw new Error("!viewer");const m=()=>{const p=t.activeViewer;p&&(this._esPath.path.currentTime=p.simulationTime)};m(),this.d(s.simulationTimeChanged.don(m))}}return new a(this._esPath)}))}}this.dv(new e0(t.sceneObjectsManager,i=>{if(i instanceof js)return new n(i)}))}{const t=this._esObjectsManager;class n extends M.Destroyable{constructor(o){super();{const s=()=>{const a=t.activeViewer;a&&(a.simulationTime=o.currentTime??0)};s(),this.d(o.currentTimeChanged.don(s))}}}this.dv(new e0(t.sceneObjectsManager,i=>{if(i instanceof Fs)return new n(i)}))}}}class PC extends M.Destroyable{constructor(e){super(),e.forEach(t=>{this.d(t.path.currentPositionChanged.don(n=>{n&&t.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...n])})})),this.d(t.path.currentRotationChanged.don(n=>{n&&t.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...n])})}))})}}class SC extends M.Destroyable{constructor(t){super();D(this,"_player");D(this,"_channels",this.dv(M.reactArray([])));this._objectManager=t,this._player=this._objectManager.player,this.dv(new M.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const n=[];for(let i=0;i<this.channels.length;i++){const o=this.channels[i],s=we.getSceneObjById(o.pathId);if(!s||!(s instanceof js))continue;const c=o.sceneObjectIds.map(f=>we.getSceneObjById(f)).filter(f=>f!==void 0);c.length!==0&&n.push({path:s,sceneObjects:c})}if(n.length!==0)return new PC(n)}))}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 rf(r){if(r.data){const{type:e,value:t}=r.data;if(e==="UITreeA"&&t instanceof jr){const{sceneObject:n}=t;if(n)return n.id}}}function CC(r,e){const{property:t,customEventName:n,otherParams:i}=e,{dragstartDataMananger:o}=r;if(!(t instanceof ci)){if(!(t instanceof Kc)){if(t instanceof de){const[s,a]=M.getReactFuncs(t.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const c=i[0];if(c.preventDefault(),!c.dataTransfer)return;rf(o)?c.dataTransfer.dropEffect="move":c.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const f=rf(o);f!==void 0&&a(f)}}else if(t instanceof rp){const[s,a]=M.getReactFuncs(t.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const c=i[0];if(c.preventDefault(),!c.dataTransfer)return;rf(o)?c.dataTransfer.dropEffect="move":c.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");const c=i[0].$event,f=i[0].strinsPropDom,m=i[0].index;c.preventDefault();const p=rf(o);if(p!==void 0){f[m].firstChild.value=p;const g=new Event("input",{bubbles:!0,cancelable:!0});f[m].firstChild.dispatchEvent(g)}}}else if(t instanceof np){const[s,a]=M.getReactFuncs(t.reactVar)}}}}class xC extends M.Destroyable{constructor(){super();D(this,"_sceneObjects",new Set);D(this,"_sceneObjectsToChange",this.dv(new M.Event));this.d(()=>{const t=M.length(this._sceneObjects);t!==0&&console.warn(`场景对象管理器销毁时仍然管理着${t}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(t){if(this._sceneObjects.has(t))return console.warn(`创建失败:对象${t}已经存在于场景对象管理器中!}`),!1;do this._sceneObjectsToChange.emit([],[t]),this._sceneObjects.add(t);while(!1);return!0}deleteSceneObject(t){if(!this._sceneObjects.has(t))return console.warn(`删除失败:对象${t}不存在于场景对象管理器中!}`),!1;do this._sceneObjectsToChange.emit([t],[]),this._sceneObjects.delete(t);while(!1);return!0}createSceneObject(t,n){const i=we.context.createSceneObject(t,n);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(t,n){const i=we.context.createSceneObjectFromClass(t,n);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(t){const n=we.context.createSceneObjectFromJson(t);return n&&this.addSceneObject(n),n}}function t0(r,e){return r.length===e.length&&r.every((t,n)=>t===e[n])}class OC extends M.Destroyable{constructor(e){super(),this._viewer=e,this.d(M.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class MC extends M.Destroyable{constructor(e,t){super(),this._viewer=e,this._activeViewer=t;const n=Di.createCommonProps(),i=[];Object.keys(n).forEach(c=>{const f=this._activeViewer[c+"Changed"];i.push(f)});const o=this.dv(M.createNextAnimateFrameEvent(...i)),s=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(n).forEach(c=>{this._viewer[c]=this._activeViewer[c]})};this.d(o.don(s));const a=this.dv(M.createAnimateFrame());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const c=this._activeViewer.getCurrentCameraInfo(),f=this._viewer.getCurrentCameraInfo();if(!c)return;const{position:m,rotation:p}=c;f&&t0(m,f.position)&&t0(p,f.rotation)||this._viewer.flyIn(m,p,0)}),this.d(()=>a.cancel())}}const IC=`<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">
775
+ <animateTransform values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" repeatCount="indefinite" type="rotate" attributeName="transform"></animateTransform>
776
+ </circle><g></g></g></svg>
777
+ `,TC='<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>',NC='<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>',Hu=class Hu extends M.Destroyable{constructor(e){super();const t=()=>{const n=this.dv(new Co);this.d(M.track([n,"show"],[e,"useDefaultStatusDiv"]));{const i=()=>{n.show=(e.useDefaultStatusDiv??!0)&&e.status!=="Created"};i(),this.d(e.useDefaultStatusDivChanged.don(i)),this.d(e.statusChanged.don(i)),n.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}e.add(n),this.d(()=>e.delete(n)),n.instanceClass=class extends M.Destroyable{constructor(s,a,c){super();D(this,"_div",document.createElement("div"));if(this._subContainer=s,!c)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const _=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};_(),this.d(a.showChanged.don(_))}let f,m,p,g,w;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",f=document.createElement("div"),this._div.appendChild(f),f.style.width="auto",f.style.position="absolute",f.style.left="50%",f.style.top="50%",f.style.transform="translate(-50%,-50%)",f.style.background="rgba(120, 120, 0, 0.7)",f.style.color="white",f.style.fontSize="10px",f.style.background="none",f.style.display="flex",f.style.justifyContent="center",f.style.alignItems="center",m=document.createElement("div"),f.appendChild(m),m.style.pointerEvents="none",m.style.display="block",m.style.width="40px",m.innerHTML=Hu.defaultsSvg.loadingSvg,m.style.filter="drop-shadow(0px 0px 1px black)",p=document.createElement("div"),f.appendChild(p),p.style.pointerEvents="none",p.style.marginLeft="10px",p.style.display="flex",p.style.flexFlow="column",p.style.maxWidth="300px",g=document.createElement("div"),p.appendChild(g),g.style.fontSize="14px",g.style.fontWeight="800",g.style.marginBottom="5px",g.style.textShadow="0 0 2px black",w=document.createElement("div"),p.appendChild(w),w.style.fontWeight="400",w.style.textShadow="0 0 2px black";{const _=()=>{let h="Raw";c.status==="Raw"?h="初始状态":c.status==="Creating"?h="正在创建":c.status==="Created"?h="创建完成":c.status==="Error"?h="创建失败":c.status==="Reconnecting"&&(h="重新连接"),g.innerText=`${h}(${c.status})`,w.innerText=`${c.statusLog}`,(c.status==="Creating"||c.status==="Reconnecting")&&(m.innerHTML=Hu.defaultsSvg.loadingSvg),c.status==="Created"&&(m.innerHTML=Hu.defaultsSvg.successSvg),c.status==="Error"&&(m.innerHTML=Hu.defaultsSvg.warnSvg)};_();const y=this.dv(M.createNextAnimateFrameEvent(c.statusLogChanged,c.statusChanged));this.d(y.don(_))}}update(){const s=255*Math.random()|0,a=255*Math.random()|0,c=255*Math.random()|0;this._div.style.background=`rgba(${s}, ${a}, ${c}, 0.8)`}}};this.d(e.containerChanged.don(()=>{t()}))}};D(Hu,"defaultsSvg",{loadingSvg:IC,successSvg:TC,warnSvg:NC});let Ud=Hu;class DC extends M.Destroyable{constructor(e,t,n){super(),this._subContainer=e,this._overlayContainer=t,this._viewer=n;const i=this._subContainer,o=this._overlayContainer,s=this._viewer,a=()=>{const m=s.zIndex??"";i.style.zIndex=m,o.style.zIndex=m};a(),this.d(s.zIndexChanged.don(a));const c=()=>{i.style.display=s.show??!0?"block":"none"};c(),this.d(s.showChanged.don(c));const f=()=>{i.style.opacity=`${s.opacity??1}`};f(),this.d(s.opacityChanged.don(f))}}function nf(r){let e=M.getExtProp(r,"_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",r.appendChild(e),M.setExtProp(r,"_relativeContainer",e)),e}class AC extends M.Destroyable{constructor(t,n){super();D(this,"_subContainer",document.createElement("div"));D(this,"_overlayContainer",document.createElement("div"));D(this,"_containerStyleController");this._container=t,this._viewer=n,this._containerStyleController=this.dv(new DC(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:o}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),o.style.position="relative",o.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),nf(this._container).appendChild(i),this.d(()=>nf(this._container).removeChild(i)),nf(this._container).appendChild(o),this.d(()=>nf(this._container).removeChild(o))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class RC extends M.Destroyable{constructor(){super(...arguments);D(this,"registerObjsMap",new Map)}register(t,n){return this.registerObjsMap.has(t)&&console.warn(`register warn:${t}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(t,n),t}getViewerConstructor(t){const n=this.registerObjsMap.get(t);if(!n){console.warn(`未找到${t}类!`);return}return n}createViewer(t){const n=t.type,i=this.getViewerConstructor(n);if(!i)throw new Error(`没有找到类型为${n}的Viewer构造器!`);return new i(t)}}class r0 extends M.Destroyable{constructor(e,t,n=!1,i=!1){if(super(),this._viewer=e,!t)throw new Error("ViewerCustomInteraction: container is null");const o=this.dv(M.DomElementEvent.create(t,"pointerdown")),s=this.dv(M.DomElementEvent.create(t,"pointermove")),a=this.dv(M.DomElementEvent.create(t,"pointerup")),c=this.dv(M.DomElementEvent.create(t,"pointerout")),f=this.dv(M.DomElementEvent.create(t,"pointerover")),m=this.dv(new M.PointerClick),p=this.dv(new M.PointerHover),g=()=>{const v=this._viewer.hoverTime*1e3;p.delayTime=v};this.d(this._viewer.hoverTimeChanged.don(()=>{g()})),this.d(o.don(v=>m.pointerDown(v))),this.d(s.don(v=>m.pointerMove(v))),this.d(a.don(v=>m.pointerUp(v))),this.d(c.don(v=>m.pointerOut(v))),this.d(o.don(v=>p.pointerDown(v))),this.d(s.don(v=>p.pointerMove(v))),this.d(a.don(v=>p.pointerUp(v))),this.d(c.don(v=>p.pointerOut(v)));const{x:w,y:_}=t.getBoundingClientRect(),y=i?w:0,h=i?_:0;this.d(p.hoverEvent.don(v=>{const[b,E]=M.getDomEventCurrentTargetPos(v,n);this._viewer.hoverEvent.emit({screenPosition:[b+y,E+h],pointerEvent:v})})),this.d(m.clickEvent.don(v=>{const[b,E]=M.getDomEventCurrentTargetPos(v,n);this._viewer.clickEvent.emit({screenPosition:[b+y,E+h],pointerEvent:v})})),this.d(m.dbclickEvent.don(v=>{const[b,E]=M.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[b+y,E+h],pointerEvent:v})})),this.d(o.don(v=>{const[b,E]=M.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[b+y,E+h],pointerEvent:v})})),this.d(a.don(v=>{const[b,E]=M.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[b+y,E+h],pointerEvent:v})})),this.d(s.don(v=>{const[b,E]=M.getDomEventCurrentTargetPos(v,n);this._viewer.pointerMoveEvent.emit({screenPosition:[b+y,E+h],pointerEvent:v})})),this.d(f.don(v=>{const[b,E]=M.getDomEventCurrentTargetPos(v,n);this._viewer.pointerOverEvent.emit({screenPosition:[b+y,E+h],pointerEvent:v})})),this.d(c.don(v=>{const[b,E]=M.getDomEventCurrentTargetPos(v,n);this._viewer.pointerOutEvent.emit({screenPosition:[b+y,E+h],pointerEvent:v})}));const d=this.dv(M.DomElementEvent.create(t,"keydown"));this.d(d.don(v=>this._viewer.keyDownEvent.emit(v)));const u=this.dv(M.DomElementEvent.create(t,"keyup"));this.d(u.don(v=>this._viewer.keyUpEvent.emit(v)));const l=this.dv(M.DomElementEvent.create(t,"wheel"));this.d(l.don(v=>this._viewer.wheelEvent.emit(v)))}}const vs=class vs extends M.Destroyable{constructor(t){super();D(this,"_forceRecreateEvent",this.dv(new M.Event));D(this,"_container",this.dv(M.react(void 0)));D(this,"_containerSize",this.dv(M.react(void 0)));D(this,"_editingEvent",this.disposeVar(new M.Event));D(this,"_status",this.dv(M.react("Raw")));D(this,"_statusLog",this.dv(M.react("")));D(this,"_statusContainer",this.dv(new Ud(this)));D(this,"_useCustomInteraction",this.dv(M.react(!0)));D(this,"_resetInteractionEvent",this.dv(M.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));D(this,"_interactionResetting",this.dv(new M.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new r0(this,this.container)})));D(this,"_viewerChanged",this.dv(new M.Event));D(this,"_containerResetEvent",this.dv(M.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));D(this,"_containerResetting",this.dv(new M.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new AC(this.container,this)})));D(this,"_sceneObjectsMap",new Map);D(this,"_id");D(this,"_typeName");D(this,"_updateFuncReact",this.dv(M.react(void 0)));D(this,"_toDestroyFuncReact",this.dv(M.react(void 0)));D(this,"_statusInfo",vs.defaults.statusInfo);D(this,"_navigationMode",this.dv(M.react("Map")));D(this,"_syncViewer",this.dv(M.react(void 0)));D(this,"_syncEventDon",this.dv(new M.ObjResettingWithEvent(this.syncViewerChanged,()=>{const t=this.syncViewer;if(t)return new MC(this,t)})));D(this,"_timeSyncdon",this.dv(new M.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new OC(this)})));D(this,"_hoverEvent",this.dv(new M.Event));D(this,"_pointerOverEvent",this.dv(new M.Event));D(this,"_pointerMoveEvent",this.dv(new M.Event));D(this,"_pointerDownEvent",this.dv(new M.Event));D(this,"_pointerUpEvent",this.dv(new M.Event));D(this,"_pointerOutEvent",this.dv(new M.Event));D(this,"_clickEvent",this.dv(new M.Event));D(this,"_dblclickEvent",this.dv(new M.Event));D(this,"_keyDownEvent",this.dv(new M.Event));D(this,"_keyUpEvent",this.dv(new M.Event));D(this,"_wheelEvent",this.dv(new M.Event));D(this,"_actived",this.dv(M.react(!1)));this._id=t.id??M.createGuid();const n=Zy(t.container);if(n)this._container.value=zd(n),this._typeName=t.type,this._initName();else throw new Error("container is not defined");{const i=()=>{n&&(this.show??!0?n.style.display="block":n.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,o=()=>{for(let[a,c]of i.entries())if(!c&&a){const f=Go.context.createEngineObject(a,this);f&&i.set(a,f)}},s=()=>{for(let[a,c]of i.entries())c&&!c.isDestroyed()&&c.destroy(),i.set(a,void 0)};this.d(s),this.d(this.viewerChanged.don(a=>{s(),a&&o()}))}{{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(o){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let o;this.d(()=>o&&o.destroy()),this.d(this.updateFuncChanged.don(()=>{o&&o.cancel(),this.updateFunc&&(o=o||M.createAnimateFrame(),o.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(o){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(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 n=document.getElementById(t);n&&n instanceof HTMLDivElement?this._container.value=zd(n):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else t instanceof HTMLDivElement?this._container.value=zd(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 n of t)if(!this.has(n)){const i=Go.context.createEngineObject(n,this);i&&this._sceneObjectsMap.set(n,i),n.viewerAttached.emit(this)}}delete(...t){for(let n of t)if(this.has(n)){const i=this._sceneObjectsMap.get(n);i&&i.destroy(),this._sceneObjectsMap.delete(n),n.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 vs.createDefaultProps()}_getJson(t=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(t){let o,s=this.defaultProps[i];s instanceof M.ReactiveVariable?o=s.equals(this[i]):o=s===this[i],o||(n[i]=this[i])}else n[i]=this[i];return n}_setJson(t,n,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 o=n||[];o.push("id","type");const s=Object.keys(this.defaultProps).filter(a=>!o.includes(a));for(let a of s)if(a in t)this[a]=t[a]===null?void 0:t[a];else if(!(i??!1)){let c=this.defaultProps[a];c instanceof M.ReactiveVariable&&(c=c.value),this[a]=c}}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(n){console.warn(`时间格式不正确! value: ${t} error: ${n}`)}}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 ee("ESViewer","ESViewer",[new Se("强制刷新","重载",[],()=>this.forceRecreate(),[]),new $("debug","debug",!0,!1,[this,"debug"],vs.defaults.debug),new $("是否可见","是否可见",!0,!1,[this,"show"]),new ce("位置点单位","lonLatFormat",!0,!1,[this,"lonLatFormat"],[["度","DECIMAL_DEGREE"],["度分","DEGREES_DECIMAL_MINUTES"],["度分秒","SEXAGESIMAL_DEGREE"]]),new $("是否开启文字避让","textAvoidance",!0,!1,[this,"textAvoidance"],!1),new de("ionAccessToken","ionAccessToken",!1,!1,[this,"ionAccessToken"]),new H("时钟","时钟",!1,!1,[this,"currentTime"]),new $("globeShow","globeShow",!0,!1,[this,"globeShow"]),new $("atmosphere","atmosphere",!1,!1,[this,"atmosphere"])]),new H("飞行像素范围","默认飞行定位时对象包围球所占的屏幕像素大小",!1,!1,[this,"flyToBoundingSize"]),new H("编辑高度偏移","编辑时默认的高度偏移",!1,!1,[this,"editingHeightOffset"]),new ee("Globe","Globe",[new ae("地形着色器","可以设置地形全局坡度,坡向,高程带,等高线等",!1,!1,[this,"terrainShader"])])]}get actived(){return this._actived.value}set actived(t){this._actived.value=t}get activedChanged(){return this._actived.changed}};D(vs,"context",new RC),D(vs,"register",vs.context.register.bind(vs.context)),D(vs,"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});let Di=vs;(r=>{r.createBaseProps=()=>({name:"未命名场景对象",extras:M.reactJson(void 0),devTags:M.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}),r.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:M.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:M.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:M.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:r.defaults.terrainShader}),r.createDefaultProps=()=>({...(0,r.createBaseProps)(),...(0,r.createCommonProps)()})})(Di||(Di={})),M.extendClassProps(Di.prototype,Di.createDefaultProps);function n0(r,e){const t=r._lastCameraInfo;if(t){const n=e.viewerChanged.don(i=>{if(!i||!t)return;const{position:o,rotation:s}=t;e.flyIn(o,s,0),r._lastCameraInfo=void 0,n()})}}const LC=r=>{const e=Di.createCommonProps(),t={};try{Object.keys(e).forEach(n=>{t[n]=r[n]})}catch(n){console.warn(n)}return t},i0=(r,e)=>{const t=Di.createCommonProps();try{Object.keys(t).forEach(n=>{r[n]=e[n]})}catch(n){console.warn(n)}};class FC extends M.Destroyable{constructor(t){super();D(this,"_viewersChanged",this.disposeVar(new M.Event));D(this,"_viewers",new Set);D(this,"_viewersToChange",this.dv(new M.Event));this._sceneObjectsManager=t,this.d(()=>{for(const n of this._viewers)this.destroyViewer(n);this._viewers.clear()}),this.viewers.forEach(n=>{const i=this._sceneObjectsManager.sceneObjects;n.add(...i)}),this.d(()=>{const n=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...n)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((n,i)=>{this.viewers.forEach(o=>{i.forEach(s=>{Rs(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))}),n.forEach(s=>{Rs(o.devTags,s.devTags)&&(o.has(s)?o.delete(s):console.warn(`${o.typeName}中不存在${s.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{this.viewers.forEach(s=>{s.has(o)&&s.delete(o),console.log("sceneObjectsToChange",s.devTags,o.devTags,Rs(s.devTags,o.devTags)),Rs(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))})}))})})),this.d(this.viewersChanged.don((n,i)=>{const o=this._sceneObjectsManager.sceneObjects;i.forEach(s=>{for(let a of o)Rs(s.devTags,a.devTags)&&(s.has(a)?console.warn(`${s.typeName}中已存${a.typeName},检查逻辑是否有问题!`):s.add(a))}),n.forEach(s=>{for(let a of o)Rs(s.devTags,a.devTags)&&(s.has(a)?s.delete(a):console.warn(`${s.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{s.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let c of a)console.log("viewersChanged",s.devTags,c.devTags,Rs(s.devTags,c.devTags)),Rs(s.devTags,c.devTags)&&(s.has(c)?console.warn(`${s.typeName}中已存${c.typeName},检查逻辑是否有问题!`):s.add(c))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(t){const n=Di.context.createViewer(t);return this._viewers.add(n),this._viewersChanged.emit([],[n]),n}destroyViewer(t){return t.isDestroyed()?!0:(this._viewers.delete(t),this._viewersChanged.emit([t],[]),t.destroy(),t.isDestroyed())}}function s0(r,e,t,n){if(t)n.currentActiveEditing=[r,e];else if(n.currentActiveEditing){const[i,o]=n.currentActiveEditing;i===r&&o===e&&(t||(n.currentActiveEditing=void 0))}}const jC=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class kC extends M.Destroyable{constructor(e,t){super(),this._sceneObject=e;const n=this._sceneObject;for(let i of jC){const o=i+"Changed",s=n[o];if(s){{const a=n[i];s0(n,i,a,t)}this.dispose(s.disposableOn(a=>s0(n,i,a,t)))}}}get sceneObject(){return this._sceneObject}}class GC extends M.Destroyable{constructor(){super();D(this,"_currentActiveEditing",this.disposeVar(M.reactArrayWithUndefined(void 0)));D(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((t,n)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),n){const[i,o]=n;i[o]===!0&&(i[o]=!1)}if(t){const[i,o]=t;i[o]=!0}})),we.context.sceneObjCreatedEvent.don(t=>{t.dv(new kC(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 Mo extends M.Destroyable{constructor(...t){super();D(this,"_drgm",this.dv(new gy));D(this,"_sobjm",this.dv(new xC));D(this,"_vrm",this.dv(new FC(this._sobjm)));D(this,"_sceneObjectEditingManager",this.disposeVar(new GC));D(this,"_activeViewer",this.dv(M.react(void 0)));D(this,"_syncOtherViewersToActived",this.dv(M.react(!1)));D(this,"_cmrvm",this.createSceneObjectFromClass(Po));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 Bc("default",this.dragstartDataMananger,24,this)));D(this,"_propUiTreeManager",this.dv(new jl(24)));D(this,"_sceneTreeMap",new Map);D(this,"_viewerCreatedEvent",this.dv(new M.Event));D(this,"_lastCameraInfo");D(this,"_lastActiveViewerJson");D(this,"syncEvent",this.dv(M.createNextAnimateFrameEvent(this.activeViewerChanged,this.syncOtherViewersToActivedChanged)));D(this,"_syncEventDon",this.d(this.syncEvent.don(()=>{const t=this.syncOtherViewersToActived;this.viewers.forEach(n=>{t?n.syncOtherViewer(this.activeViewer):n.syncOtherViewer(void 0)})})));D(this,"_player",this.createSceneObjectFromClass(Fs));D(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));D(this,"_esPlyarAndPathTime",this.dv(new EC(this)));D(this,"_pathAnimationManager",this.dv(new SC(this)))}static get envs(){return we.context.environmentVariables}getSceneObjectById(t){return we.getSceneObjectById(t)}getSceneObject(t){return we.getSceneObject(t)}get $refs(){return we.$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 p;const t=this._asset.createdTime||new Date().toISOString(),n=new Date().toISOString(),i=this._asset.name||"未命名项目",s={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:t,modifiedTime:n,name:i},a=this.sceneTree.json,c=this._cmrvm.views,f=[...this._vrm.viewers].map(g=>g.json),m=(p=this.activeViewer)==null?void 0:p.getCurrentCameraInfo();return{asset:s,viewers:f,sceneTree:a,viewCollection:c,lastView:m}}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(n=>{const i=t.viewers.find(o=>o.id===n.id);i&&(n.json=i)})}catch(n){console.error(`ESObjectsManager解析json数据时发生错误! error: ${n}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(t){return CC(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,n=24){if(this._sceneTreeMap.has(t)||t==="default")console.warn(`id为${t}的SceneTree已存在!`);else{const i=this.dv(new Bc(t,this.dragstartDataMananger,n,this));this._sceneTreeMap.set(t,i)}return this.getSceneTree(t)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(t){const n=this._vrm.createViewer(t);this.activeViewer||(this.activeViewer=n);const i=this.d(n.viewerChanged.don(o=>{o&&(this._viewerCreatedEvent.emit(n),i())}));return n}destroyViewer(t){return this._activeViewer.value===t&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(t)}switchViewer(t,n=!0,i=!0,o=!0){var f;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&n&&(this._lastCameraInfo=(f=this.activeViewer)==null?void 0:f.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?LC(this.activeViewer):void 0),o&&this.activeViewer&&this.destroyViewer(this.activeViewer);const s=t.id,a=s?[...this.getViewers()].find(m=>m.id===s):[...this.getViewers()].find(m=>m.typeName===t.type);if(a)if(s&&a.typeName!==t.type)console.warn(`id为${s}的viewer的typeName和option.type${t.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),n&&n0(this,a),i&&this._lastActiveViewerJson&&(i0(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===Zy(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 c=this.createViewer(t);return n&&n0(this,c),i&&this._lastActiveViewerJson&&(i0(c,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=c,c}switchToCesiumViewer(...t){if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)){const{container:n,viewSync:i,attributeSync:o,destroy:s,id:a}=t[0];return this.switchViewer({type:"ESCesiumViewer",container:n,id:a},i??!0,o??!0,s??!0)}else if(typeof t[0]=="string"||t[0]instanceof HTMLDivElement){const n={container:t[0],viewSync:t[1]??!0,attributeSync:t[2]??!0,destroy:t[3]??!0,id:t[4]},{container:i,viewSync:o,attributeSync:s,destroy:a,id:c}=n;return this.switchViewer({type:"ESCesiumViewer",container:i,id:c},o,s,a)}}switchToUEViewer(...t){let n,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("uri")){const{container:c,uri:f,app:m,token:p,viewSync:g,attributeSync:w,destroy:_,id:y}=t[0];n={type:"ESUeViewer",container:c,id:y,options:{uri:f,app:m,token:p}},i={viewSync:g??!0,attributeSync:w??!0,destroy:_??!0}}else if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("ws")){const{container:c,ws:f,esmsg:m,viewSync:p,attributeSync:g,id:w,destroy:_}=t[0];n={type:"ESUeViewer",container:c,id:w,options:{ws:f,esmsg:m}},i={viewSync:p??!0,attributeSync:g??!0,destroy:_??!0}}else if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)&&t[0].hasOwnProperty("project")){const{container:c,project:f,baseUrl:m,viewSync:p,attributeSync:g,id:w,destroy:_}=t[0];n={type:"ESUeViewer",container:c,id:w,options:{project:f,baseUrl:m}},i={viewSync:p??!0,attributeSync:g??!0,destroy:_??!0}}else(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(typeof t[1]=="string"&&t[1].startsWith("ws")?(n={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")?(n={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}):(n={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(!n)throw new Error("参数错误");const{viewSync:o,attributeSync:s,destroy:a}=i;return this.switchViewer(n,o,s,a)}createCesiumViewer(...t){let n;if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)?n={...t[0],type:"ESCesiumViewer"}:(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(n={container:t[0],options:t[1]??void 0,id:t[2]??void 0,type:"ESCesiumViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createUeViewer(...t){let n;if(typeof t[0]=="object"&&!(t[0]instanceof HTMLDivElement)?n={...t[0],type:"ESUeViewer"}:(typeof t[0]=="string"||t[0]instanceof HTMLDivElement)&&(typeof t[1]=="string"&&t[1].startsWith("ws")?n={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")?n={type:"ESUeViewer",container:t[0],id:t[4]??void 0,options:{uri:t[1],app:t[2],token:t[3]??void 0}}:n={type:"ESUeViewer",container:t[0],id:t[3]??void 0,options:{project:t[1],baseUrl:t[2]??void 0}}),!n)throw new Error("参数错误");return this.createViewer(n)}createSceneObject(t,n){return this._sobjm.createSceneObject(t,n)}createSceneObjectFromClass(t,n){return this._sobjm.createSceneObjectFromClass(t,n)}createSceneObjectFromJson(t){return this._sobjm.createSceneObjectFromJson(t)}destroySceneObject(t){const n=this._sobjm.deleteSceneObject(t);return t.destroy(),n}destroyAllSceneObjects(){const t=[...this._sobjm.sceneObjects];for(let n of t)n!=this._player&&n!=this._cmrvm&&this.destroySceneObject(n)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}D(Mo,"getSceneObjById",we.context.getSceneObjectById.bind(we.context)),D(Mo,"getEnv",we.context.getEnv.bind(we.context)),D(Mo,"setEnv",we.context.setEnv.bind(we.context)),(r=>{r.createDefaultProps=()=>({})})(Mo||(Mo={})),M.extendClassProps(Mo.prototype,Mo.createDefaultProps);function VC(){const r=navigator.userAgent;let e="Unknown";/Windows/.test(r)?e="Windows":/Macintosh/.test(r)?e="MacOS":/Linux/.test(r)?e="Linux":/Android/.test(r)?e="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(e="iOS");let t="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?t="x64":/x86|i686|Win32/.test(r)?t="x86":/arm64|aarch64/.test(r)?t="arm64":/arm/.test(r)&&(t="arm"),{os:e.toLocaleLowerCase(),arch:t.toLocaleLowerCase()}}const BC=Date.now();function o0(r){const{os:e,arch:t}=VC(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-BC)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:e,arch:t},o={method:"GET",headers:new Headers,redirect:"follow"},s=window.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${s}`,o).then(a=>a.text()).then(a=>console.log(a)).catch(a=>console.log("error",a))}X.copyright=void 0;try{const r="earthsdk3",e="3.0.7-beta.2",t="2025-05-22T07:06:28.000Z",n="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",o="b7988d4abb009d1c139795520219336dac2ff06a",a=((Date.now()-1747897588e3)/36e5).toFixed(1),c=`%c🌏 ${r}%c ${e}.${o.slice(0,8)}.${t} (距今${a}个小时)
778
+ %c${i?i+`
779
+ `:""}当前网站正在使用${r},此软件版权归${n}所有
780
+ `;X.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","b7988d4abb009d1c139795520219336dac2ff06a")},get info(){return c},get date(){return"2025-05-22T07:06:28.000Z"},get author(){return"suplyang"},get version(){return"3.0.7-beta.2"},get name(){return"earthsdk3"},get commitId(){return"b7988d4abb009d1c139795520219336dac2ff06a"},print(){console.info(this.info,`
781
+ font-size: 18px;
782
+ font-weight: 1000;
783
+ line-height: 1;
784
+ color: rgb(0, 120, 215);
785
+ padding-top: 20px;
786
+ padding-bottom: 10px;
787
+ `,`
788
+ font-size: 10px;
789
+ font-weight: 1000;
790
+ color: rgb(0, 120, 215);
791
+ `,`
792
+ font-size: 10px;
793
+ line-height: 1.5;
794
+ color: rgb(0, 120, 215);
795
+ padding-bottom: 2px;
796
+ padding-left: 35px;
797
+ `)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[r]=X.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>o0(X.copyright),6e4),setInterval(()=>o0(X.copyright),864e5)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&X.copyright.print()}catch{console.warn("版本信息有误!")}return X.AttachedPickedInfo=lp,X.BasePropTreeItem=Fd,X.Boolean2Property=C0,X.Boolean2sProperty=M0,X.Boolean3Property=x0,X.Boolean3sProperty=I0,X.Boolean4Property=O0,X.Boolean4sProperty=T0,X.BooleanProperty=$,X.BooleansProperty=y0,X.ColorProperty=ge,X.ColorRgbProperty=A0,X.DashPatternProperty=R0,X.DateProperty=Vi,X.DatesProperty=vf,X.DivPickedInfo=z0,X.DragStartDataManager=gy,X.ES3DTileset=Yt,X.ESAlarm=ua,X.ESApertureEffect=la,X.ESAreaMeasurement=ca,X.ESBlastParticleSystem=ha,X.ESBoxClipping=fa,X.ESCameraView=Eo,X.ESCameraViewCollection=Po,X.ESCameraVisibleRange=da,X.ESCar=pa,X.ESCityBasePoint=gu,X.ESClassification=So,X.ESClippingPlane=ga,X.ESCustomDiv=Co,X.ESCzml=vu,X.ESDataMesh=va,X.ESDatasmithRuntimeModel=$a,X.ESDirectionMeasurement=Va,X.ESDistanceMeasurement=ya,X.ESDynamicWater=Za,X.ESEntityCluster=du,X.ESExcavate=Ls,X.ESFireParticleSystem=ma,X.ESForestTileset=_a,X.ESGaussianSplatting=bu,X.ESGeoDiv=ba,X.ESGeoDivTextPoi=pu,X.ESGeoExtrudedPolygon=xo,X.ESGeoJson=Ba,X.ESGeoLineString=gn,X.ESGeoPolygon=ze,X.ESGeoRectangle=wa,X.ESGeoVector=Ae,X.ESGeoWater=eu,X.ESGltfModel=Ea,X.ESHeightLimitAnalysis=fu,X.ESHeightMeasurement=za,X.ESHole=ou,X.ESHuman=ss,X.ESHumanPoi=su,X.ESImageLabel=Pa,X.ESImageryLayer=Sa,X.ESJEditingMode=xe,X.ESJLonLatFormat=up,X.ESJPickedInfo=B0,X.ESLabel=jt,X.ESLevelRuntimeModel=tu,X.ESLocalCircle=Ua,X.ESLocalPolygon=as,X.ESLocalPolygonZ=Wa,X.ESLocalRectangle=qa,X.ESLocalSkyBox=Ca,X.ESLocalVector=Ni,X.ESLocalVector2D=Kr,X.ESLocationMeasurement=xa,X.ESMsTileset=lu,X.ESNavigator=yu,X.ESObjectWithLocation=le,X.ESObjectsManager=Mo,X.ESParticleSystemPrimitive=Oa,X.ESPath=js,X.ESPathImpl=Oo,X.ESPipeFence=Ha,X.ESPipeline=ru,X.ESPipeserTileset=Xa,X.ESPit=us,X.ESPlayer=Fs,X.ESPoi2D=os,X.ESPoi3D=Ma,X.ESPoiTileset=cu,X.ESPolygonFence=Ya,X.ESPolygonFlattenedPlane=Ia,X.ESPolygonWithHole=Ka,X.ESRectangle=Ja,X.ESRtsFeatureEditing=uu,X.ESRtsTileset=au,X.ESScale=hu,X.ESSceneObject=we,X.ESSceneObjectWithId=HS,X.ESSeparateFoliage=Ta,X.ESSkylineAnalysis=Eu,X.ESStaticMesh=wu,X.ESSubmergingAnalysis=Na,X.ESSunshineAnalysis=Da,X.ESSurfaceAreaMeasurement=Qa,X.ESTerrainLayer=Aa,X.ESTextLabel=Ra,X.ESUEWidget=La,X.ESUnrealActor=Fa,X.ESVideoFusion=ja,X.ESViewShed=ka,X.ESViewer=Di,X.ESViewerStatusBar=mu,X.ESViewerStatusBarScale=_u,X.ESVisibilityAnalysis=nu,X.ESVisualObject=Xe,X.ESVolumeMeasurement=iu,X.ESWidget=Ga,X.EngineObject=Go,X.EnumProperty=ce,X.EnumStringsProperty=L0,X.EvalStringProperty=Gi,X.FunctionProperty=Se,X.GroupPropTreeItem=kd,X.GroupProperty=ee,X.JsonProperty=ae,X.LeafPropTreeItem=jd,X.LongStringProperty=Yc,X.MaximumScreenSpaceErrorProperty=g0,X.MinmaxProperty=F0,X.NearFarScalerProperty=j0,X.NonreactiveJsonStringProperty=op,X.Number2Property=at,X.Number2sProperty=ip,X.Number3Property=Kt,X.Number3sProperty=gf,X.Number4Property=kr,X.Number4WithUndefinedProperty=P0,X.Number4sProperty=S0,X.NumberProperty=H,X.NumberRangeProperty=k0,X.NumberSliderProperty=ut,X.NumbersProperty=v0,X.ParamsProperty=sp,X.PickedInfo=$c,X.PickedResult=U0,X.Player=Ti,X.PlayerProperty=Jc,X.PositionProperty=ci,X.PositionsProperty=Kc,X.PositionsSetPropety=V0,X.PropTree=Sy,X.PropUiTreeManager=jl,X.Property=Ks,X.ReactVarProperty=qe,X.RotationProperty=Qc,X.SceneObjectFromId=Gd,X.SceneObjectPickedInfo=Zc,X.SceneTree=Bc,X.SceneTreeContextMenu=Py,X.SceneTreeItem=jr,X.SceneTreeItemDragDrop=Ey,X.String2Property=m0,X.String2sProperty=np,X.String3Property=_0,X.String3sProperty=w0,X.String4Property=b0,X.String4sProperty=E0,X.StringNumberProperty=N0,X.StringNumbersProperty=D0,X.StringProperty=de,X.StringsProperty=rp,X.TreeItemDragDrop=vy,X.UriProperty=ql,X.ViewPlayerProperty=ap,X.ViewerCustomInteraction=r0,X.Watcher=zc,X.WatcherTools=xy,X.WithUndefinedProperty=pf,X.addTreesCallFunc=Ry,X.bindCustomEditing=_y,X.booleanPointInPolygon=p1,X.cartesianDistance=py,X.clamp0_360=Vc,X.clampN180_180=my,X.createPropTreeFromSceneObject=Cy,X.cutDownTreesCallFunc=jy,X.defaultInitSceneObjectOnCreatingFunc=xS,X.defaultLight122FromEnvironmentMapManager=Ld,X.defaultUpdateSceneObjectOnPickingFunc=CS,X.equalsN3=yf,X.geoAlong=g1,X.geoArea=ld,X.geoBuffer=gv,X.geoCenterOfMass=v1,X.geoDestination=y1,X.geoDifference=vv,X.geoDistance=cd,X.geoHeading=hd,X.geoIntersect=dv,X.geoLineIntersect=m1,X.geoNearestPointOnLine=b1,X.geoPointToLineDistance=w1,X.geoPolygonFromCircle=yv,X.geoPolygonOverlap=fd,X.geoRhumbDestination=E1,X.geoRhumbDistance=fv,X.geoRhumbHeading=P1,X.geoUnion=pv,X.getDefaultValue=TS,X.getDistancesFromPositions=Fl,X.getGeoBoundingSphereFromPositions=S1,X.getMidpoint=_1,X.getMinMaxCorner=mv,X.getSceneObjectTreeItem=OS,X.getXyzFromPostion=Dd,X.growthSimulationCallFunc=ky,X.hasSameTags=yy,X.hasSameViewerTags=Rs,X.inOrderRunning=NS,X.isJSONString=IS,X.lbhToWebMerc=PS,X.lbhToXyz=is,X.lerpAngle=$h,X.lerpRotation=Ad,X.map=fp,X.optionsStr=Ay,X.reactPosition2Ds=hp,X.registerCreatedEventUpdate=KS,X.registerEventUpdate=zS,X.removeAllTreesCallFunc=Ly,X.rpToap=MS,X.setSceneObjectTreeItem=Gc,X.updateTreeParamsCallFunc=Fy,X.webMercToLbh=SS,X.xyzToLbh=fy,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"}),X}({});