earthsdk3 3.4.0-beta.13 → 3.4.0-beta.14
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.
- package/dist/ESJTypes/index.d.ts.map +1 -0
- package/dist/ESJTypes/pickedInfos/index.d.ts.map +1 -0
- package/dist/ESJTypes/properties/ClockType.d.ts.map +1 -0
- package/dist/ESJTypes/properties/DataType.d.ts.map +1 -0
- package/dist/ESJTypes/properties/ESJArcType.d.ts.map +1 -0
- package/dist/ESJTypes/properties/ESJEditingMode.d.ts.map +1 -0
- package/dist/ESJTypes/properties/ESJEnvironmentMapManager.d.ts.map +1 -0
- package/dist/ESJTypes/properties/ESJGeoRegion.d.ts.map +1 -0
- package/dist/ESJTypes/properties/ESJInstances.d.ts.map +1 -0
- package/dist/ESJTypes/properties/ESJMaterialType.d.ts.map +1 -0
- package/dist/ESJTypes/properties/ESJResource.d.ts.map +1 -0
- package/dist/ESJTypes/properties/FillStyleType.d.ts.map +1 -0
- package/dist/ESJTypes/properties/FlyParamType.d.ts.map +1 -0
- package/dist/ESJTypes/properties/ParticleEmitterJsonType.d.ts.map +1 -0
- package/dist/ESJTypes/properties/PointStyleType.d.ts.map +1 -0
- package/dist/ESJTypes/properties/StrokeStyleType.d.ts.map +1 -0
- package/dist/ESJTypes/properties/Viewer.d.ts.map +1 -0
- package/dist/ESJTypes/properties/index.d.ts.map +1 -0
- package/dist/ESJTypes/props/ColorProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/ColorRgbProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/DashPatternProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/DateProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/DatesProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/EnumProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/EnumStringsProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/EvalStringProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/FunctionProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/GroupProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/JsonProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/LongStringProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/MinmaxProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/NativeProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/NearFarScalerProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/NonreactiveJsonStringProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/NumberRangeProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/NumberSliderProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/ParamsProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/PlayerProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/PositionProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/PositionsProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/PositionsSetPropety.d.ts.map +1 -0
- package/dist/ESJTypes/props/Property.d.ts.map +1 -0
- package/dist/ESJTypes/props/ReactVarProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/RotationProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/UriProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/ViewPlayerProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/WithUndefinedProperty.d.ts.map +1 -0
- package/dist/ESJTypes/props/index.d.ts.map +1 -0
- package/dist/ESObjectManager/ESPlyarAndPathTime.d.ts.map +1 -0
- package/dist/ESObjectManager/PathAnimationManager.d.ts.map +1 -0
- package/dist/ESObjectManager/SceneObjectEditingManager.d.ts.map +1 -0
- package/dist/ESObjectManager/SceneObjectsListening.d.ts.map +1 -0
- package/dist/ESObjectManager/SceneObjectsManager.d.ts.map +1 -0
- package/dist/ESObjectManager/ViewersManager.d.ts.map +1 -0
- package/dist/ESObjectManager/index.d.ts.map +1 -0
- package/dist/ESObjectManager/propTreeCallback.d.ts.map +1 -0
- package/dist/ESObjectManager/utils.d.ts.map +1 -0
- package/dist/ESObjects/base/ESGeoVector.d.ts.map +1 -0
- package/dist/ESObjects/base/ESLabel.d.ts.map +1 -0
- package/dist/ESObjects/base/ESLocalVector.d.ts.map +1 -0
- package/dist/ESObjects/base/ESLocalVector2D.d.ts.map +1 -0
- package/dist/ESObjects/base/ESObjectWithLocation.d.ts.map +1 -0
- package/dist/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts.map +1 -0
- package/dist/ESObjects/base/ESSceneObject/RefsManager.d.ts.map +1 -0
- package/dist/ESObjects/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts.map +1 -0
- package/dist/ESObjects/base/ESSceneObject/funcs/replaceStrWithEnv.d.ts.map +1 -0
- package/dist/ESObjects/base/ESSceneObject/index.d.ts.map +1 -0
- package/dist/ESObjects/base/ESTestObject.d.ts.map +1 -0
- package/dist/ESObjects/base/ESVisualObject.d.ts.map +1 -0
- package/dist/ESObjects/base/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ES3DTileset/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ES3DTileset/type.d.ts.map +1 -0
- package/dist/ESObjects/general/ESAlarm.d.ts.map +1 -0
- package/dist/ESObjects/general/ESApertureEffect.d.ts.map +1 -0
- package/dist/ESObjects/general/ESAreaMeasurement.d.ts.map +1 -0
- package/dist/ESObjects/general/ESBlastParticleSystem.d.ts.map +1 -0
- package/dist/ESObjects/general/ESBoxClipping.d.ts.map +1 -0
- package/dist/ESObjects/general/ESCameraView.d.ts.map +1 -0
- package/dist/ESObjects/general/ESCameraViewCollection/ViewWrapper.d.ts.map +1 -0
- package/dist/ESObjects/general/ESCameraViewCollection/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESCameraVisibleRange.d.ts.map +1 -0
- package/dist/ESObjects/general/ESCar.d.ts.map +1 -0
- package/dist/ESObjects/general/ESCityBasePoint.d.ts.map +1 -0
- package/dist/ESObjects/general/ESClassification.d.ts.map +1 -0
- package/dist/ESObjects/general/ESClippingPlane.d.ts.map +1 -0
- package/dist/ESObjects/general/ESCustomDiv/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESCustomDiv/instance.d.ts.map +1 -0
- package/dist/ESObjects/general/ESCzml.d.ts.map +1 -0
- package/dist/ESObjects/general/ESDataMesh.d.ts.map +1 -0
- package/dist/ESObjects/general/ESDatasmithRuntimeModel.d.ts.map +1 -0
- package/dist/ESObjects/general/ESDirectionMeasurement.d.ts.map +1 -0
- package/dist/ESObjects/general/ESDistanceMeasurement.d.ts.map +1 -0
- package/dist/ESObjects/general/ESDynamicWater.d.ts.map +1 -0
- package/dist/ESObjects/general/ESEntityCluster.d.ts.map +1 -0
- package/dist/ESObjects/general/ESExcavate.d.ts.map +1 -0
- package/dist/ESObjects/general/ESFeatureLayer/FeatureLayer.d.ts +9 -0
- package/dist/ESObjects/general/ESFeatureLayer/FeatureLayer.d.ts.map +1 -0
- package/dist/ESObjects/general/ESFeatureLayer/PointLayer/index.d.ts +27 -0
- package/dist/ESObjects/general/ESFeatureLayer/PointLayer/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESFeatureLayer/PointLayer/utils.d.ts +40 -0
- package/dist/ESObjects/general/ESFeatureLayer/PointLayer/utils.d.ts.map +1 -0
- package/dist/ESObjects/general/ESFeatureLayer/PolyLineLayer/index.d.ts +20 -0
- package/dist/ESObjects/general/ESFeatureLayer/PolyLineLayer/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESFeatureLayer/PolygonLayer/index.d.ts +18 -0
- package/dist/ESObjects/general/ESFeatureLayer/PolygonLayer/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESFeatureLayer/PolygonLayer/utils.d.ts +9 -0
- package/dist/ESObjects/general/ESFeatureLayer/PolygonLayer/utils.d.ts.map +1 -0
- package/dist/ESObjects/general/ESFeatureLayer/index.d.ts +26 -0
- package/dist/ESObjects/general/ESFeatureLayer/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESFeatureLayer/types.d.ts +587 -0
- package/dist/ESObjects/general/ESFeatureLayer/types.d.ts.map +1 -0
- package/dist/ESObjects/general/ESFeatureLayer/utils.d.ts +392 -0
- package/dist/ESObjects/general/ESFeatureLayer/utils.d.ts.map +1 -0
- package/dist/ESObjects/general/ESFireParticleSystem.d.ts.map +1 -0
- package/dist/ESObjects/general/ESForestTileset.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGaussianSplatting.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoDiv/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoDiv/mds.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoDivTextPoi.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoExtrudedPolygon.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoJson/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoJson/type.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoLineString.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoPoints/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoPolygon.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoRectangle.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGeoWater.d.ts.map +1 -0
- package/dist/ESObjects/general/ESGltfModel.d.ts.map +1 -0
- package/dist/ESObjects/general/ESHeatMap/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESHeightLimitAnalysis.d.ts.map +1 -0
- package/dist/ESObjects/general/ESHeightMeasurement.d.ts.map +1 -0
- package/dist/ESObjects/general/ESHole.d.ts.map +1 -0
- package/dist/ESObjects/general/ESHuman.d.ts.map +1 -0
- package/dist/ESObjects/general/ESHumanPoi.d.ts.map +1 -0
- package/dist/ESObjects/general/ESImageLabel.d.ts.map +1 -0
- package/dist/ESObjects/general/ESImageryLayer/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESImageryLayer/types.d.ts.map +1 -0
- package/dist/ESObjects/general/ESLevelRuntimeModel.d.ts.map +1 -0
- package/dist/ESObjects/general/ESLocalCircle.d.ts.map +1 -0
- package/dist/ESObjects/general/ESLocalPolygon.d.ts.map +1 -0
- package/dist/ESObjects/general/ESLocalPolygonZ.d.ts.map +1 -0
- package/dist/ESObjects/general/ESLocalRectangle.d.ts.map +1 -0
- package/dist/ESObjects/general/ESLocalRegularPolygon.d.ts.map +1 -0
- package/dist/ESObjects/general/ESLocalSkyBox.d.ts.map +1 -0
- package/dist/ESObjects/general/ESLocationMeasurement.d.ts.map +1 -0
- package/dist/ESObjects/general/ESMsTileset/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESMsTileset/types.d.ts.map +1 -0
- package/dist/ESObjects/general/ESNavigator.d.ts.map +1 -0
- package/dist/ESObjects/general/ESParticleSystemPrimitive.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/CurrentInfoType.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/GetCurrentFuncType.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/PolylineResetting.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/RotLerpModeType.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/computeRotIfUndefined.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/dataTextMd.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/getCurrent.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/parseData.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/subPath.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/subdivide.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/ESPathImpl/timePosRotsMd.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPath/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPipeFence.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPipeline.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPipeserTileset.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPit.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPlayer/AbsolutePlayer.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPlayer/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPoi2D.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPoi3D.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPoiTileset.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPolygonFence.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPolygonFlattenedPlane.d.ts.map +1 -0
- package/dist/ESObjects/general/ESPolygonWithHole.d.ts.map +1 -0
- package/dist/ESObjects/general/ESRectangle.d.ts.map +1 -0
- package/dist/ESObjects/general/ESRefVoxels.d.ts.map +1 -0
- package/dist/ESObjects/general/ESRtsFeatureEditing/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESRtsFeatureEditing/types.d.ts.map +1 -0
- package/dist/ESObjects/general/ESRtsTileset/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESRtsTileset/types.d.ts.map +1 -0
- package/dist/ESObjects/general/ESScale.d.ts.map +1 -0
- package/dist/ESObjects/general/ESSeparateFoliage/CallFunc.d.ts.map +1 -0
- package/dist/ESObjects/general/ESSeparateFoliage/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESSkylineAnalysis/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESStaticMesh.d.ts.map +1 -0
- package/dist/ESObjects/general/ESSubmergingAnalysis/bufferUtils.d.ts.map +1 -0
- package/dist/ESObjects/general/ESSubmergingAnalysis/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESSubmergingAnalysis/parseGlb.d.ts.map +1 -0
- package/dist/ESObjects/general/ESSunshineAnalysis/index.d.ts.map +1 -0
- package/dist/ESObjects/general/ESSurfaceAreaMeasurement.d.ts.map +1 -0
- package/dist/ESObjects/general/ESTerrainLayer.d.ts.map +1 -0
- package/dist/ESObjects/general/ESTextLabel.d.ts.map +1 -0
- package/dist/ESObjects/general/ESUEWidget.d.ts.map +1 -0
- package/dist/ESObjects/general/ESUnrealActor.d.ts.map +1 -0
- package/dist/ESObjects/general/ESVideoFusion.d.ts.map +1 -0
- package/dist/ESObjects/general/ESViewShed.d.ts.map +1 -0
- package/dist/ESObjects/general/ESViewerStatusBar.d.ts.map +1 -0
- package/dist/ESObjects/general/ESViewerStatusBarScale.d.ts.map +1 -0
- package/dist/ESObjects/general/ESVisibilityAnalysis.d.ts.map +1 -0
- package/dist/ESObjects/general/ESVolumeMeasurement.d.ts.map +1 -0
- package/dist/ESObjects/general/ESWidget.d.ts.map +1 -0
- package/dist/ESObjects/general/index.d.ts +90 -0
- package/dist/ESObjects/general/index.d.ts.map +1 -0
- package/dist/ESObjects/index.d.ts.map +1 -0
- package/dist/ESViewer/ContainerStyleController.d.ts.map +1 -0
- package/dist/ESViewer/ESViewer.d.ts.map +1 -0
- package/dist/ESViewer/GeneralAnalysis/RollerShutterAnalysis.d.ts.map +1 -0
- package/dist/ESViewer/GeneralAnalysis/index.d.ts.map +1 -0
- package/dist/ESViewer/Resetting/index.d.ts.map +1 -0
- package/dist/ESViewer/StatusContainer.d.ts.map +1 -0
- package/dist/ESViewer/ViewerContainer.d.ts.map +1 -0
- package/dist/ESViewer/ViewerContext.d.ts.map +1 -0
- package/dist/ESViewer/ViewerCustomInteraction.d.ts.map +1 -0
- package/dist/ESViewer/getContainer.d.ts.map +1 -0
- package/dist/ESViewer/index.d.ts.map +1 -0
- package/dist/EngineObject/EditingObjectContext.d.ts.map +1 -0
- package/dist/EngineObject/EngineObjectsContext.d.ts.map +1 -0
- package/dist/EngineObject/index.d.ts.map +1 -0
- package/dist/copyright.d.ts.map +1 -0
- package/dist/earthsdk3.iife.js +43 -43
- package/dist/earthsdk3.js +6586 -5722
- package/dist/earthsdk3.umd.cjs +38 -38
- package/dist/index.d.ts.map +1 -0
- package/dist/utils/PropTrees/PropTree.d.ts.map +1 -0
- package/dist/utils/PropTrees/PropTreeItem.d.ts.map +1 -0
- package/dist/utils/PropTrees/PropUiTreeManager.d.ts.map +1 -0
- package/dist/utils/PropTrees/index.d.ts.map +1 -0
- package/dist/utils/SceneTrees/SceneTree.d.ts.map +1 -0
- package/dist/utils/SceneTrees/SceneTreeContextMenu.d.ts.map +1 -0
- package/dist/utils/SceneTrees/SceneTreeItem.d.ts.map +1 -0
- package/dist/utils/SceneTrees/SceneTreeItemDragDrop.d.ts.map +1 -0
- package/dist/utils/SceneTrees/SceneTreeJsonLoading.d.ts.map +1 -0
- package/dist/utils/SceneTrees/defaultCreateSceneObject.d.ts.map +1 -0
- package/dist/utils/SceneTrees/defaultCreateTreeItemDragDrop.d.ts.map +1 -0
- package/dist/utils/SceneTrees/defaultLight122FromEnvironmentMapManager.d.ts.map +1 -0
- package/dist/utils/SceneTrees/defaultShowSceneObject.d.ts.map +1 -0
- package/dist/utils/SceneTrees/index.d.ts.map +1 -0
- package/dist/utils/SceneTrees/preload.d.ts.map +1 -0
- package/dist/utils/SmoothMoveController.d.ts.map +1 -0
- package/dist/utils/base/DragStartDataManager.d.ts.map +1 -0
- package/dist/utils/base/TreeItemDragDrop.d.ts.map +1 -0
- package/dist/utils/base/bindCustomEditing.d.ts.map +1 -0
- package/dist/utils/base/defaultInitSceneObjectOnCreatingFunc.d.ts.map +1 -0
- package/dist/utils/base/defaultUpdateSceneObjectOnPickingFunc.d.ts.map +1 -0
- package/dist/utils/base/getDefaultValue.d.ts.map +1 -0
- package/dist/utils/base/hasSameTags.d.ts.map +1 -0
- package/dist/utils/base/inOrderRunning.d.ts.map +1 -0
- package/dist/utils/base/index.d.ts.map +1 -0
- package/dist/utils/base/lerpAngle.d.ts.map +1 -0
- package/dist/utils/base/rpToap.d.ts.map +1 -0
- package/dist/utils/base/sceneObjectTreeItem.d.ts.map +1 -0
- package/dist/utils/base/utils.d.ts.map +1 -0
- package/dist/utils/components/ESSceneObjectWithId.d.ts.map +1 -0
- package/dist/utils/components/Player.d.ts.map +1 -0
- package/dist/utils/components/Watcher.d.ts.map +1 -0
- package/dist/utils/components/WatcherTools/index.d.ts.map +1 -0
- package/dist/utils/components/WatcherTools/toolsForWatcher.d.ts.map +1 -0
- package/dist/utils/components/index.d.ts.map +1 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/proj4/getDistancesFromPositions.d.ts.map +1 -0
- package/dist/utils/proj4/getXyzFromPostion.d.ts.map +1 -0
- package/dist/utils/proj4/index.d.ts.map +1 -0
- package/dist/utils/proj4/lbhToXyz.d.ts.map +1 -0
- package/dist/utils/react.d.ts.map +1 -0
- package/dist/utils/registerCreatedEventUpdate.d.ts.map +1 -0
- package/dist/utils/registerEventUpdate.d.ts.map +1 -0
- package/dist/utils/turf/booleanPointInPolygon.d.ts.map +1 -0
- package/dist/utils/turf/geoAlong.d.ts.map +1 -0
- package/dist/utils/turf/geoArea.d.ts.map +1 -0
- package/dist/utils/turf/geoCenterOfMass.d.ts.map +1 -0
- package/dist/utils/turf/geoDestination.d.ts.map +1 -0
- package/dist/utils/turf/geoDistance.d.ts.map +1 -0
- package/dist/utils/turf/geoHeading.d.ts.map +1 -0
- package/dist/utils/turf/geoLineIntersect.d.ts.map +1 -0
- package/dist/utils/turf/geoMidpoint.d.ts.map +1 -0
- package/dist/utils/turf/geoNearestPointOnLine.d.ts.map +1 -0
- package/dist/utils/turf/geoPointToLineDistance.d.ts.map +1 -0
- package/dist/utils/turf/geoRhumbDestination.d.ts.map +1 -0
- package/dist/utils/turf/geoRhumbDistance.d.ts.map +1 -0
- package/dist/utils/turf/geoRhumbHeading.d.ts.map +1 -0
- package/dist/utils/turf/geoTools.d.ts.map +1 -0
- package/dist/utils/turf/getGeoBoundingSphereFromPositions.d.ts.map +1 -0
- package/dist/utils/turf/getMinMaxCorner.d.ts.map +1 -0
- package/dist/utils/turf/index.d.ts.map +1 -0
- package/dist/xbsj-base/index.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/Destroyable/destroyObject.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/Destroyable/index.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/ObjPool.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/events.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/index.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/oneTimeWarning.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/pipe/DoublyLinkedList.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/pipe/Event.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/pipe/ListenerPipe.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/pipe/SmartListenerHandler.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/pipe/SmartListenerPipe.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/pipe/index.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/save/downloadLink.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/save/index.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/save/saveOnBrowser.d.ts.map +1 -0
- package/dist/xbsj-base/xr-base-utils/timeFuncs.d.ts.map +1 -0
- package/dist/xbsj-base/xr-utils/ObservableSet.d.ts.map +1 -0
- package/dist/xbsj-base/xr-utils/index.d.ts.map +1 -0
- package/package.json +4 -2
- package/dist/types/ESJTypes/index.d.ts.map +0 -1
- package/dist/types/ESJTypes/pickedInfos/index.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/ClockType.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/DataType.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/ESJArcType.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/ESJEditingMode.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/ESJEnvironmentMapManager.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/ESJGeoRegion.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/ESJInstances.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/ESJMaterialType.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/ESJResource.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/FillStyleType.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/FlyParamType.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/ParticleEmitterJsonType.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/PointStyleType.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/StrokeStyleType.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/Viewer.d.ts.map +0 -1
- package/dist/types/ESJTypes/properties/index.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/ColorProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/ColorRgbProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/DashPatternProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/DateProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/DatesProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/EnumProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/EnumStringsProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/EvalStringProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/FunctionProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/GroupProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/JsonProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/LongStringProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/MinmaxProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/NativeProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/NearFarScalerProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/NonreactiveJsonStringProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/NumberRangeProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/NumberSliderProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/ParamsProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/PlayerProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/PositionProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/PositionsProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/PositionsSetPropety.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/Property.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/ReactVarProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/RotationProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/UriProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/ViewPlayerProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/WithUndefinedProperty.d.ts.map +0 -1
- package/dist/types/ESJTypes/props/index.d.ts.map +0 -1
- package/dist/types/ESObjectManager/ESPlyarAndPathTime.d.ts.map +0 -1
- package/dist/types/ESObjectManager/PathAnimationManager.d.ts.map +0 -1
- package/dist/types/ESObjectManager/SceneObjectEditingManager.d.ts.map +0 -1
- package/dist/types/ESObjectManager/SceneObjectsListening.d.ts.map +0 -1
- package/dist/types/ESObjectManager/SceneObjectsManager.d.ts.map +0 -1
- package/dist/types/ESObjectManager/ViewersManager.d.ts.map +0 -1
- package/dist/types/ESObjectManager/index.d.ts.map +0 -1
- package/dist/types/ESObjectManager/propTreeCallback.d.ts.map +0 -1
- package/dist/types/ESObjectManager/utils.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESGeoVector.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESLabel.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESLocalVector.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESLocalVector2D.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESObjectWithLocation.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESSceneObject/RefsManager.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESSceneObject/funcs/replaceStrWithEnv.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESSceneObject/index.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESTestObject.d.ts.map +0 -1
- package/dist/types/ESObjects/base/ESVisualObject.d.ts.map +0 -1
- package/dist/types/ESObjects/base/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ES3DTileset/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ES3DTileset/type.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESAlarm.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESApertureEffect.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESAreaMeasurement.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESBlastParticleSystem.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESBoxClipping.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESCameraView.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESCameraViewCollection/ViewWrapper.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESCameraViewCollection/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESCameraVisibleRange.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESCar.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESCityBasePoint.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESClassification.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESClippingPlane.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESCustomDiv/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESCustomDiv/instance.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESCzml.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESDataMesh.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESDatasmithRuntimeModel.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESDirectionMeasurement.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESDistanceMeasurement.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESDynamicWater.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESEntityCluster.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESExcavate.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESFireParticleSystem.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESForestTileset.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGaussianSplatting.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoDiv/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoDiv/mds.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoDivTextPoi.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoExtrudedPolygon.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoJson/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoJson/type.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoLineString.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoPoints/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoPolygon.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoRectangle.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGeoWater.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESGltfModel.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESHeatMap/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESHeightMeasurement.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESHole.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESHuman.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESHumanPoi.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESImageLabel.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESImageryLayer/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESImageryLayer/types.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESLevelRuntimeModel.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESLocalCircle.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESLocalPolygon.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESLocalPolygonZ.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESLocalRectangle.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESLocalRegularPolygon.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESLocalSkyBox.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESLocationMeasurement.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESMsTileset/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESMsTileset/types.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESNavigator.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESParticleSystemPrimitive.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/CurrentInfoType.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/GetCurrentFuncType.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/PolylineResetting.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/RotLerpModeType.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/computeRotIfUndefined.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/dataTextMd.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/getCurrent.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/parseData.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/subPath.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/subdivide.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/ESPathImpl/timePosRotsMd.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPath/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPipeFence.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPipeline.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPipeserTileset.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPit.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPlayer/AbsolutePlayer.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPlayer/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPoi2D.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPoi3D.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPoiTileset.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPolygonFence.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPolygonFlattenedPlane.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESPolygonWithHole.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESRectangle.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESRefVoxels.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESRtsFeatureEditing/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESRtsFeatureEditing/types.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESRtsTileset/types.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESScale.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESSeparateFoliage/CallFunc.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESSeparateFoliage/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESSkylineAnalysis/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESStaticMesh.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESSubmergingAnalysis/bufferUtils.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESSubmergingAnalysis/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESSubmergingAnalysis/parseGlb.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESSunshineAnalysis/index.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESSurfaceAreaMeasurement.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESTerrainLayer.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESTextLabel.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESUEWidget.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESUnrealActor.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESVideoFusion.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESViewShed.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESViewerStatusBar.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESViewerStatusBarScale.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESVisibilityAnalysis.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESVolumeMeasurement.d.ts.map +0 -1
- package/dist/types/ESObjects/general/ESWidget.d.ts.map +0 -1
- package/dist/types/ESObjects/general/index.d.ts +0 -89
- package/dist/types/ESObjects/general/index.d.ts.map +0 -1
- package/dist/types/ESObjects/index.d.ts.map +0 -1
- package/dist/types/ESViewer/ContainerStyleController.d.ts.map +0 -1
- package/dist/types/ESViewer/ESViewer.d.ts.map +0 -1
- package/dist/types/ESViewer/GeneralAnalysis/RollerShutterAnalysis.d.ts.map +0 -1
- package/dist/types/ESViewer/GeneralAnalysis/index.d.ts.map +0 -1
- package/dist/types/ESViewer/Resetting/index.d.ts.map +0 -1
- package/dist/types/ESViewer/StatusContainer.d.ts.map +0 -1
- package/dist/types/ESViewer/ViewerContainer.d.ts.map +0 -1
- package/dist/types/ESViewer/ViewerContext.d.ts.map +0 -1
- package/dist/types/ESViewer/ViewerCustomInteraction.d.ts.map +0 -1
- package/dist/types/ESViewer/getContainer.d.ts.map +0 -1
- package/dist/types/ESViewer/index.d.ts.map +0 -1
- package/dist/types/EngineObject/EditingObjectContext.d.ts.map +0 -1
- package/dist/types/EngineObject/EngineObjectsContext.d.ts.map +0 -1
- package/dist/types/EngineObject/index.d.ts.map +0 -1
- package/dist/types/copyright.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/utils/PropTrees/PropTree.d.ts.map +0 -1
- package/dist/types/utils/PropTrees/PropTreeItem.d.ts.map +0 -1
- package/dist/types/utils/PropTrees/PropUiTreeManager.d.ts.map +0 -1
- package/dist/types/utils/PropTrees/index.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/SceneTree.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/SceneTreeContextMenu.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/SceneTreeItem.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/SceneTreeItemDragDrop.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/SceneTreeJsonLoading.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/defaultCreateSceneObject.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/defaultCreateTreeItemDragDrop.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/defaultLight122FromEnvironmentMapManager.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/defaultShowSceneObject.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/index.d.ts.map +0 -1
- package/dist/types/utils/SceneTrees/preload.d.ts.map +0 -1
- package/dist/types/utils/SmoothMoveController.d.ts.map +0 -1
- package/dist/types/utils/base/DragStartDataManager.d.ts.map +0 -1
- package/dist/types/utils/base/TreeItemDragDrop.d.ts.map +0 -1
- package/dist/types/utils/base/bindCustomEditing.d.ts.map +0 -1
- package/dist/types/utils/base/defaultInitSceneObjectOnCreatingFunc.d.ts.map +0 -1
- package/dist/types/utils/base/defaultUpdateSceneObjectOnPickingFunc.d.ts.map +0 -1
- package/dist/types/utils/base/getDefaultValue.d.ts.map +0 -1
- package/dist/types/utils/base/hasSameTags.d.ts.map +0 -1
- package/dist/types/utils/base/inOrderRunning.d.ts.map +0 -1
- package/dist/types/utils/base/index.d.ts.map +0 -1
- package/dist/types/utils/base/lerpAngle.d.ts.map +0 -1
- package/dist/types/utils/base/rpToap.d.ts.map +0 -1
- package/dist/types/utils/base/sceneObjectTreeItem.d.ts.map +0 -1
- package/dist/types/utils/base/utils.d.ts.map +0 -1
- package/dist/types/utils/components/ESSceneObjectWithId.d.ts.map +0 -1
- package/dist/types/utils/components/Player.d.ts.map +0 -1
- package/dist/types/utils/components/Watcher.d.ts.map +0 -1
- package/dist/types/utils/components/WatcherTools/index.d.ts.map +0 -1
- package/dist/types/utils/components/WatcherTools/toolsForWatcher.d.ts.map +0 -1
- package/dist/types/utils/components/index.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/proj4/getDistancesFromPositions.d.ts.map +0 -1
- package/dist/types/utils/proj4/getXyzFromPostion.d.ts.map +0 -1
- package/dist/types/utils/proj4/index.d.ts.map +0 -1
- package/dist/types/utils/proj4/lbhToXyz.d.ts.map +0 -1
- package/dist/types/utils/react.d.ts.map +0 -1
- package/dist/types/utils/registerCreatedEventUpdate.d.ts.map +0 -1
- package/dist/types/utils/registerEventUpdate.d.ts.map +0 -1
- package/dist/types/utils/turf/booleanPointInPolygon.d.ts.map +0 -1
- package/dist/types/utils/turf/geoAlong.d.ts.map +0 -1
- package/dist/types/utils/turf/geoArea.d.ts.map +0 -1
- package/dist/types/utils/turf/geoCenterOfMass.d.ts.map +0 -1
- package/dist/types/utils/turf/geoDestination.d.ts.map +0 -1
- package/dist/types/utils/turf/geoDistance.d.ts.map +0 -1
- package/dist/types/utils/turf/geoHeading.d.ts.map +0 -1
- package/dist/types/utils/turf/geoLineIntersect.d.ts.map +0 -1
- package/dist/types/utils/turf/geoMidpoint.d.ts.map +0 -1
- package/dist/types/utils/turf/geoNearestPointOnLine.d.ts.map +0 -1
- package/dist/types/utils/turf/geoPointToLineDistance.d.ts.map +0 -1
- package/dist/types/utils/turf/geoRhumbDestination.d.ts.map +0 -1
- package/dist/types/utils/turf/geoRhumbDistance.d.ts.map +0 -1
- package/dist/types/utils/turf/geoRhumbHeading.d.ts.map +0 -1
- package/dist/types/utils/turf/geoTools.d.ts.map +0 -1
- package/dist/types/utils/turf/getGeoBoundingSphereFromPositions.d.ts.map +0 -1
- package/dist/types/utils/turf/getMinMaxCorner.d.ts.map +0 -1
- package/dist/types/utils/turf/index.d.ts.map +0 -1
- package/dist/types/xbsj-base/index.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/Destroyable/destroyObject.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/Destroyable/index.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/ObjPool.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/events.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/index.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/oneTimeWarning.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/pipe/DoublyLinkedList.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/pipe/Event.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/pipe/ListenerPipe.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/pipe/SmartListenerHandler.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/pipe/SmartListenerPipe.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/pipe/index.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/save/downloadLink.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/save/index.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/save/saveOnBrowser.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-base-utils/timeFuncs.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-utils/ObservableSet.d.ts.map +0 -1
- package/dist/types/xbsj-base/xr-utils/index.d.ts.map +0 -1
- /package/dist/{types/ESJTypes → ESJTypes}/index.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/pickedInfos/index.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/ClockType.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/DataType.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/ESJArcType.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/ESJEditingMode.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/ESJEnvironmentMapManager.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/ESJGeoRegion.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/ESJInstances.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/ESJMaterialType.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/ESJResource.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/FillStyleType.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/FlyParamType.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/ParticleEmitterJsonType.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/PointStyleType.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/StrokeStyleType.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/Viewer.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/properties/index.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/ColorProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/ColorRgbProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/DashPatternProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/DateProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/DatesProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/EnumProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/EnumStringsProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/EvalStringProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/FunctionProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/GroupProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/JsonProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/LongStringProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/MinmaxProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/NativeProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/NearFarScalerProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/NonreactiveJsonStringProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/NumberRangeProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/NumberSliderProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/ParamsProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/PlayerProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/PositionProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/PositionsProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/PositionsSetPropety.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/Property.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/ReactVarProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/RotationProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/UriProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/ViewPlayerProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/WithUndefinedProperty.d.ts +0 -0
- /package/dist/{types/ESJTypes → ESJTypes}/props/index.d.ts +0 -0
- /package/dist/{types/ESObjectManager → ESObjectManager}/ESPlyarAndPathTime.d.ts +0 -0
- /package/dist/{types/ESObjectManager → ESObjectManager}/PathAnimationManager.d.ts +0 -0
- /package/dist/{types/ESObjectManager → ESObjectManager}/SceneObjectEditingManager.d.ts +0 -0
- /package/dist/{types/ESObjectManager → ESObjectManager}/SceneObjectsListening.d.ts +0 -0
- /package/dist/{types/ESObjectManager → ESObjectManager}/SceneObjectsManager.d.ts +0 -0
- /package/dist/{types/ESObjectManager → ESObjectManager}/ViewersManager.d.ts +0 -0
- /package/dist/{types/ESObjectManager → ESObjectManager}/index.d.ts +0 -0
- /package/dist/{types/ESObjectManager → ESObjectManager}/propTreeCallback.d.ts +0 -0
- /package/dist/{types/ESObjectManager → ESObjectManager}/utils.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESGeoVector.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESLabel.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESLocalVector.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESLocalVector2D.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESObjectWithLocation.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESSceneObject/ESObjectsContext.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESSceneObject/RefsManager.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESSceneObject/funcs/replaceStrWithEnv.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESSceneObject/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESTestObject.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/ESVisualObject.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/base/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ES3DTileset/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ES3DTileset/type.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESAlarm.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESApertureEffect.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESAreaMeasurement.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESBlastParticleSystem.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESBoxClipping.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESCameraView.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESCameraViewCollection/ViewWrapper.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESCameraViewCollection/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESCameraVisibleRange.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESCar.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESCityBasePoint.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESClassification.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESClippingPlane.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESCustomDiv/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESCustomDiv/instance.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESCzml.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESDataMesh.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESDatasmithRuntimeModel.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESDirectionMeasurement.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESDistanceMeasurement.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESDynamicWater.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESEntityCluster.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESExcavate.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESFireParticleSystem.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESForestTileset.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGaussianSplatting.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoDiv/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoDiv/mds.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoDivTextPoi.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoExtrudedPolygon.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoJson/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoJson/type.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoLineString.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoPoints/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoPolygon.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoRectangle.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGeoWater.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESGltfModel.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESHeatMap/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESHeightLimitAnalysis.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESHeightMeasurement.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESHole.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESHuman.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESHumanPoi.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESImageLabel.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESImageryLayer/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESImageryLayer/types.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESLevelRuntimeModel.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESLocalCircle.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESLocalPolygon.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESLocalPolygonZ.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESLocalRectangle.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESLocalRegularPolygon.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESLocalSkyBox.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESLocationMeasurement.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESMsTileset/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESMsTileset/types.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESNavigator.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESParticleSystemPrimitive.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/CurrentInfoType.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/GetCurrentFuncType.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/PolylineResetting.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/RotLerpModeType.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/computeRotIfUndefined.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/dataTextMd.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/getCurrent.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/parseData.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/subPath.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/subdivide.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/ESPathImpl/timePosRotsMd.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPath/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPipeFence.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPipeline.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPipeserTileset.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPit.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPlayer/AbsolutePlayer.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPlayer/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPoi2D.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPoi3D.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPoiTileset.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPolygonFence.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPolygonFlattenedPlane.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESPolygonWithHole.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESRectangle.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESRefVoxels.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESRtsFeatureEditing/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESRtsFeatureEditing/types.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESRtsTileset/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESRtsTileset/types.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESScale.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESSeparateFoliage/CallFunc.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESSeparateFoliage/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESSkylineAnalysis/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESStaticMesh.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESSubmergingAnalysis/bufferUtils.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESSubmergingAnalysis/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESSubmergingAnalysis/parseGlb.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESSunshineAnalysis/index.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESSurfaceAreaMeasurement.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESTerrainLayer.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESTextLabel.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESUEWidget.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESUnrealActor.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESVideoFusion.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESViewShed.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESViewerStatusBar.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESViewerStatusBarScale.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESVisibilityAnalysis.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESVolumeMeasurement.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/general/ESWidget.d.ts +0 -0
- /package/dist/{types/ESObjects → ESObjects}/index.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/ContainerStyleController.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/ESViewer.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/GeneralAnalysis/RollerShutterAnalysis.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/GeneralAnalysis/index.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/Resetting/index.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/StatusContainer.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/ViewerContainer.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/ViewerContext.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/ViewerCustomInteraction.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/getContainer.d.ts +0 -0
- /package/dist/{types/ESViewer → ESViewer}/index.d.ts +0 -0
- /package/dist/{types/EngineObject → EngineObject}/EditingObjectContext.d.ts +0 -0
- /package/dist/{types/EngineObject → EngineObject}/EngineObjectsContext.d.ts +0 -0
- /package/dist/{types/EngineObject → EngineObject}/index.d.ts +0 -0
- /package/dist/{types/copyright.d.ts → copyright.d.ts} +0 -0
- /package/dist/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/utils → utils}/PropTrees/PropTree.d.ts +0 -0
- /package/dist/{types/utils → utils}/PropTrees/PropTreeItem.d.ts +0 -0
- /package/dist/{types/utils → utils}/PropTrees/PropUiTreeManager.d.ts +0 -0
- /package/dist/{types/utils → utils}/PropTrees/index.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/SceneTree.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/SceneTreeContextMenu.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/SceneTreeItem.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/SceneTreeItemDragDrop.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/SceneTreeJsonLoading.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/defaultCreateSceneObject.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/defaultCreateTreeItemDragDrop.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/defaultLight122FromEnvironmentMapManager.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/defaultShowSceneObject.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/index.d.ts +0 -0
- /package/dist/{types/utils → utils}/SceneTrees/preload.d.ts +0 -0
- /package/dist/{types/utils → utils}/SmoothMoveController.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/DragStartDataManager.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/TreeItemDragDrop.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/bindCustomEditing.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/defaultInitSceneObjectOnCreatingFunc.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/defaultUpdateSceneObjectOnPickingFunc.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/getDefaultValue.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/hasSameTags.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/inOrderRunning.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/index.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/lerpAngle.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/rpToap.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/sceneObjectTreeItem.d.ts +0 -0
- /package/dist/{types/utils → utils}/base/utils.d.ts +0 -0
- /package/dist/{types/utils → utils}/components/ESSceneObjectWithId.d.ts +0 -0
- /package/dist/{types/utils → utils}/components/Player.d.ts +0 -0
- /package/dist/{types/utils → utils}/components/Watcher.d.ts +0 -0
- /package/dist/{types/utils → utils}/components/WatcherTools/index.d.ts +0 -0
- /package/dist/{types/utils → utils}/components/WatcherTools/toolsForWatcher.d.ts +0 -0
- /package/dist/{types/utils → utils}/components/index.d.ts +0 -0
- /package/dist/{types/utils → utils}/index.d.ts +0 -0
- /package/dist/{types/utils → utils}/proj4/getDistancesFromPositions.d.ts +0 -0
- /package/dist/{types/utils → utils}/proj4/getXyzFromPostion.d.ts +0 -0
- /package/dist/{types/utils → utils}/proj4/index.d.ts +0 -0
- /package/dist/{types/utils → utils}/proj4/lbhToXyz.d.ts +0 -0
- /package/dist/{types/utils → utils}/react.d.ts +0 -0
- /package/dist/{types/utils → utils}/registerCreatedEventUpdate.d.ts +0 -0
- /package/dist/{types/utils → utils}/registerEventUpdate.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/booleanPointInPolygon.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoAlong.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoArea.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoCenterOfMass.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoDestination.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoDistance.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoHeading.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoLineIntersect.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoMidpoint.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoNearestPointOnLine.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoPointToLineDistance.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoRhumbDestination.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoRhumbDistance.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoRhumbHeading.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/geoTools.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/getGeoBoundingSphereFromPositions.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/getMinMaxCorner.d.ts +0 -0
- /package/dist/{types/utils → utils}/turf/index.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/index.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/Destroyable/destroyObject.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/Destroyable/index.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/ObjPool.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/events.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/index.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/oneTimeWarning.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/pipe/DoublyLinkedList.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/pipe/Event.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/pipe/ListenerPipe.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/pipe/SmartListenerHandler.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/pipe/SmartListenerPipe.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/pipe/index.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/save/downloadLink.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/save/index.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/save/saveOnBrowser.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-base-utils/timeFuncs.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-utils/ObservableSet.d.ts +0 -0
- /package/dist/{types/xbsj-base → xbsj-base}/xr-utils/index.d.ts +0 -0
package/dist/earthsdk3.umd.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(S,
|
|
1
|
+
(function(S,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("xbsj-base"),require("proj4"),require("@turf/turf")):typeof define=="function"&&define.amd?define(["exports","xbsj-base","proj4","@turf/turf"],p):(S=typeof globalThis<"u"?globalThis:S||self,p(S.EarthSDK3={},S.xbsj_base,S.proj4,S.turf))})(this,function(S,p,vs,Vg){"use strict";var Q0=Object.defineProperty;var $0=(S,p,vs)=>p in S?Q0(S,p,{enumerable:!0,configurable:!0,writable:!0,value:vs}):S[p]=vs;var f=(S,p,vs)=>$0(S,typeof p!="symbol"?p+"":p,vs);function zg(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const Me=zg(Vg);function Ug(){const n=navigator.userAgent;let t="Unknown";/Windows/.test(n)?t="Windows":/Macintosh/.test(n)?t="MacOS":/Linux/.test(n)?t="Linux":/Android/.test(n)?t="Android":/iOS|iPhone|iPad|iPod/.test(n)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(n)?e="x64":/x86|i686|Win32/.test(n)?e="x86":/arm64|aarch64/.test(n)?e="arm64":/arm/.test(n)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const Gg=Date.now();function af(n){const{os:t,arch:e}=Ug(),r={version:n.version,commitdate:n.date,commitId:n.commitId,runningTime:(Date.now()-Gg)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(r));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(a=>a.text()).then(a=>console.log(a)).catch(a=>console.log("error",a))}S.copyright=void 0;try{const n="earthsdk3",t="3.4.0-beta.14",e="2025-09-04T09:50:16.000Z",r="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="2f66fa5c727be8472175214486ff7c46128a4eb7",a=((Date.now()-1756979416e3)/36e5).toFixed(1),u=`%c🌏 ${n}%c ${t}.${s.slice(0,8)}.${e} (距今${a}个小时)
|
|
2
2
|
%c${i?i+`
|
|
3
3
|
`:""}当前网站正在使用${n},此软件版权归${r}所有
|
|
4
|
-
`;S.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
4
|
+
`;S.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","2f66fa5c727be8472175214486ff7c46128a4eb7")},get info(){return u},get date(){return"2025-09-04T09:50:16.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.14"},get name(){return"earthsdk3"},get commitId(){return"2f66fa5c727be8472175214486ff7c46128a4eb7"},print(){console.info(this.info,`
|
|
5
5
|
font-size: 18px;
|
|
6
6
|
font-weight: 1000;
|
|
7
7
|
line-height: 1;
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
color: rgb(0, 120, 215);
|
|
19
19
|
padding-bottom: 2px;
|
|
20
20
|
padding-left: 35px;
|
|
21
|
-
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[n]=S.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>$h(S.copyright),1e3*60),setInterval(()=>$h(S.copyright),24*60*60*1e3)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&S.copyright.print()}catch{console.warn("版本信息有误!")}function Pg(){return!0}function bg(){throw new Error("throwOnDestroyed")}function tf(n){for(var t in n)typeof n[t]=="function"&&(n[t]=bg);n.isDestroyed=Pg}const dl=class dl{constructor(){f(this,"_memId",++dl._lastMemId);f(this,"_disposers")}get __v_skip(){return!0}get memId(){return this._memId}get disposers(){return this._disposers||(this._disposers=[]),this._disposers}dispose(t){return this.disposers.push(t),t}d(t){return this.dispose(t)}disposeVar(t){return this.disposers.push(()=>t.destroy()),t}dv(t){return this.disposeVar(t)}tryDisposeVar(t){return this.disposers.push(()=>t.tryDestroy()),t}tdv(t){return this.tryDisposeVar(t)}autoDispose(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}ad(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}isDestroyed(){return!1}destroyImp(){}destroy(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{const t=this._disposers,e=t.length;for(let r=e-1;r>=0;--r)t[r]();t.length=0,this._disposers=void 0}catch(t){console.error(`destroy get error! ${t}`)}return tf(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};f(dl,"_lastMemId",-1);let J=dl,vl;function ef(n){vl=n}Object.defineProperties(J.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!vl)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new vl)}return this._toDestroyEvent}}});class yl{constructor(t,e,r=!1){f(this,"_freeElements");f(this,"_usedElementsCount");f(this,"_usedElements");f(this,"_nextCreateID");f(this,"_scratchObjs");this._createDefaultFunc=t,this._destroyFunc=e,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],r&&(this._usedElements=[])}get usedElementsCount(){return this._usedElementsCount}get freeElementsCount(){return this._freeElements.length}_getCreateID(){return this._nextCreateID++}_create(){let t;return this._freeElements.length>0?t=this._freeElements.pop():t=this._createDefaultFunc&&this._createDefaultFunc()||{},t._cid=this._getCreateID(),t}create(){return this._create()}multiCreate(t){this._scratchObjs.length=0;for(let e=0;e<t;++e)this._scratchObjs.push(this._create());return this._scratchObjs}_destroy(t){this._destroyFunc&&this._destroyFunc(t),t._cid=void 0}destroy(...t){const e=t.length;for(let r=0;r<e;++r)this._destroy(t[r])}}function Ng(){return{item:void 0,previous:void 0,next:void 0}}function Tg(n){n.item=void 0,n.previous=void 0,n.next=void 0}const rf=new yl(Ng,Tg,!0);function _l(n,t,e){const r=rf.create();return r.item=n,r.previous=t,r.next=e,r}function nf(n){if(!n)throw new Error("node is undefined!");rf.destroy(n)}function wl(n,t){t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=void 0,n.tail=t.previous):t.next?(t.next.previous=void 0,n.head=t.next):(n.head=void 0,n.tail=void 0),t.next=void 0,t.previous=void 0}class sf{constructor(t){f(this,"head");f(this,"tail");f(this,"_length");const{needLength:e}=t||{needLength:!0};this.head=void 0,this.tail=void 0,e&&(this._length=0)}_incrementLength(){typeof this._length=="number"&&++this._length}_decrementLength(){typeof this._length=="number"&&--this._length}_setLength(t){typeof this._length=="number"&&(this._length=t)}get length(){return this._length}get empty(){return!this.head}*[Symbol.iterator](){let t=this.head;for(;t;)yield t,t=t.next}remove(t){if(!t)throw new Error("node is undefined!");wl(this,t),this._decrementLength(),nf(t)}getNode(t){let e=this.head;for(;e!==null;){if(!e)throw new Error("current is undefined!");if(e.item===t)return e;e=e.next}}moveAfter(t,e){if(t!==e){wl(this,e);var r=t.next;t.next=e,this.tail===t?this.tail=e:r&&(r.previous=e),e.next=r,e.previous=t}}moveBefore(t,e){if(t!==e){wl(this,e);var r=t.previous;t.previous=e,this.head===t?this.head=e:r&&(r.next=e),e.previous=r,e.next=t}}insertBefore(t,e){const r=_l(e,t.previous,t);return t.previous&&(t.previous.next=r),t.previous=r,this.head===t&&(this.head=r),this._incrementLength(),r}insertAfter(t,e){const r=_l(e,t,t.next);return t.next&&(t.next.previous=r),t.next=r,this.tail===t&&(this.tail=r),this._incrementLength(),r}_setFirstNode(t){if(this.head||this.tail)throw new Error("_setFirstNode error!");const e=_l(t,void 0,void 0);if(this.head=e,this.tail=e,this._incrementLength(),this._length!==1)throw new Error("_setFirstNode error! this._length !== 1");return e}push(t){return this.tail?this.insertAfter(this.tail,t):this._setFirstNode(t)}pop(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");const t=this.tail.item;return this.remove(this.tail),t}shift(){if(!this.head)throw new Error("DoublyLinkedList is empty!");const t=this.head.item;return this.remove(this.head),t}unshift(t){return this.head?this.insertBefore(this.head,t):this._setFirstNode(t)}removeAll(){let t=this.head;for(;t;){const e=t.next;nf(t),t=e}this.head=void 0,this.tail=void 0,this._setLength(0)}}const of=new Set;function af(n,t=n){of.has(t)||(of.add(t),console.warn(n))}function Og(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function Dg(n){n.func=void 0,n.scope=void 0,n._hasRemoved=!1,n._once=!1}const ms=new yl(Og,Dg,!0);class El{constructor(){f(this,"__dll");f(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new sf({needLength:!0}),this.__dll}_pushCurrentListener(t){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(t):this.__currentListenerStack=[this.__currentListenerStack,t]:this.__currentListenerStack=t}_popCurrentListener(){if(this.__currentListenerStack)Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0;else throw new Error("cannot pop!")}_hasCurrentListener(t){return this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(t)!==-1:this.__currentListenerStack===t:!1}do(...t){if(this.__dll&&!this._dll.empty){let e=this._dll.head;for(;e;){const r=e.item;r._hasRemoved||(this._pushCurrentListener(r),r.func.call(r.scope,...t),this._popCurrentListener());const i=e.next;r._once&&!r._hasRemoved&&(this.remove(e),e=void 0),e&&this._clearHasRemoved(e),e=i}}}get empty(){if(!this.__dll||this._dll.empty)return!0;let t=!0,e=this._dll.head;for(;e;){if(!e.item._hasRemoved){t=!1;break}e=e.next}return t}isHandlerValid(t){return!t.item._hasRemoved}nextHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.next;for(;e&&e.item._hasRemoved;)e=e.next;return e}prevHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.previous;for(;e&&e.item._hasRemoved;)e=e.previous;return e}moveAfter(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(t,e)}moveBefore(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(t,e)}insertBefore(t,e,r,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=ms.create();return s.func=e,s.scope=r,s._once=i,this._dll.insertBefore(t,s)}insertAfter(t,e,r,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=ms.create();return s.func=e,s.scope=r,s._once=i,this._dll.insertAfter(t,s)}_clearHasRemoved(t){t.item._hasRemoved&&!this._hasCurrentListener(t.item)&&(ms.destroy(t.item),this._dll.remove(t))}remove(t){if(!t.item||t.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(t.item)?t.item._hasRemoved=!0:(ms.destroy(t.item),this._dll.remove(t))}removeAll(){if(this.__dll&&!this._dll.empty){let t=this._dll.head;for(;t;){const e=t.next;t.item._hasRemoved||this.remove(t),t=e}}}destroy(){if(!this.__dll)return;let t=this._dll.head;for(;t;){const e=t.next,r=t;this._hasCurrentListener(r.item)||(console.warn("Event has remove item that on current stack!"),console.warn(`${r.item.func.toString()}`)),ms.destroy(r.item),this._dll.remove(r),t=e}this.__dll=void 0,this.__currentListenerStack=void 0}push(t,e,r=!1){const i=ms.create();return i.func=t,i.scope=e,i._once=r,this._dll.push(i)}pop(){const t=this.tail;if(!t)throw new Error("pop error!");this.remove(t)}shift(){const t=this.head;if(!t)throw new Error("shift error!");this.remove(t)}unshift(t,e,r=!1){const i=ms.create();return i.func=t,i.scope=e,i._once=r,this._dll.unshift(i)}get tail(){let t=this._dll.tail;for(;t&&t.item._hasRemoved;)t=t.previous;return t}get head(){let t=this._dll.head;for(;t&&t.item._hasRemoved;)t=t.previous;return t}}class ya{constructor(){f(this,"_listenerHandler");f(this,"_cid")}_reset(t,e){this._listenerHandler=t,this._cid=e}clone(t){return t=t??new ya,t._reset(this._listenerHandler,this._cid),t}get valid(){if(typeof this._listenerHandler<"u"&&typeof this._cid=="number"){const t=this._listenerHandler._cid;if(typeof t<"u"&&this._cid===t)return!0}return!1}}class Sl extends ya{}let V=class extends J{constructor(){super(...arguments);f(this,"__pipe");f(this,"beforeCallback");f(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new El,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}emit(...e){!this.isDestroyed()&&this.beforeCallback&&this.beforeCallback(...e),!this.isDestroyed()&&this._pipe.do(...e),!this.isDestroyed()&&this.afterCallback&&this.afterCallback(...e)}on(e,r,i=!1,s){const o=i?this._pipe.unshift(e,r,!1):this._pipe.push(e,r,!1);return s=s??new Sl,s._reset(o,o._cid),s}disposableOn(e,r,i=!1,s){const o=this.on(e,r,i,s);return()=>{o.valid&&this.off(o)}}don(e,r,i=!1,s){return this.disposableOn(e,r,i,s)}disposableWeakOn(e,r,i=!1,s){const o=new J,a=()=>{!o.isDestroyed()&&o.destroy()};return o.dispose(this.disposableOn(e,r,i,s)),o.dispose(this.toDestroyEvent.disposableOn(a)),a}dwon(e,r,i=!1,s){return this.disposableWeakOn(e,r,i,s)}once(e,r,i=!1,s){const o=i?this._pipe.unshift(e,r,!0):this._pipe.push(e,r,!0);return s=s??new Sl,s._reset(o,o._cid),s}disposableOnce(e,r,i=!1,s){const o=this.once(e,r,i,s);return()=>o.valid&&this.off(o)}donce(e,r,i=!1,s){const o=this.once(e,r,i,s);return()=>o.valid&&this.off(o)}off(e){if(!e.valid)throw new Error("handler is not valid!");this._pipe.remove(e._listenerHandler),e._reset()}reset(){this._pipe.removeAll()}destroyImp(){this.empty||(af("The event is destroying with listeners!"),this._pipe.removeAll())}};ef(V);function no(n,t){return t=t??new ya,t._reset(n,n._cid),t}class xg{constructor(){f(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new El,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}do(...t){return this._pipe.do(...t)}isHandlerValid(t){return t.valid?this._pipe.isHandlerValid(t._listenerHandler):!1}moveAfter(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}moveBefore(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}insertBefore(t,e,r,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertBefore(t._listenerHandler,e,r,i);return no(o,s)}insertAfter(t,e,r,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertAfter(t._listenerHandler,e,r,i);return no(o,s)}remove(t){if(!t.valid)throw new Error("handler is not valid!");return this._pipe.remove(t._listenerHandler)}removeAll(){return this._pipe.removeAll()}push(t,e,r=!1,i){const s=this._pipe.push(t,e,r);return no(s,i)}pop(){return this._pipe.pop()}shift(){return this._pipe.shift()}unshift(t,e,r=!1,i){const s=this._pipe.unshift(t,e,r);return no(s,i)}getTail(t){const e=this._pipe.tail;if(e)return no(e,t)}getHead(t){const e=this._pipe.head;if(e)return no(e,t)}}function Mg(n,t,...e){const r=setInterval(n,t,...e);return()=>clearInterval(r)}function Lg(n,t,...e){const r=setTimeout(n,t,...e);return()=>clearTimeout(r)}function Ag(n,...t){let e;const r=()=>{const i=performance.now();n(i,...t),e=requestAnimationFrame(r)};return r(),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function uf(n,...t){let e;return e=requestAnimationFrame(()=>{const i=performance.now();n(i,...t)}),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Rg(n,...t){let e=!1,r;return new Promise((i,s)=>{r=s,i()}).then(()=>{!e&&n(...t)}).catch(i=>{console.error(i)}),()=>(e=!0)&&r&&(r("nextMicroTask cancelled!"),r=void 0)}class Fg extends V{constructor(e,r,...i){super();f(this,"_cancellFunc");this._nextFunc=e,this.dispose(()=>{this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0)}),i.forEach(s=>this.dispose(s[r?"dwon":"don"](()=>{this.next()})))}next(){this._cancellFunc||(this._cancellFunc=this._nextFunc(()=>(this._cancellFunc=void 0,this.emit())))}flush(){this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0,this.emit())}}class lf extends Fg{constructor(...t){super(uf,!1,...t)}}function _a(n,t,e={time:"don",immediate:!1}){const r=new lf(...Array.isArray(n)?n:[n]),i=r[e.time??"don"](t);return(e.immediate??!1)&&t(),()=>{i(),r.destroy()}}function kg(n,t,e){typeof e>"u"&&(t.endsWith(".gltf")?e="model/gltf+json":t.endsWith(".bin")?e="application/octet-stream":t.endsWith(".glb")?e="model/gltf-binary":t.endsWith(".jpg")||t.endsWith(".jpeg")?e="image/jpeg":t.endsWith(".png")?e="image/png":t.endsWith(".glsl")?e="text/plain":t.endsWith(".json")?e="application/json":t.endsWith(".b3dm")||t.endsWith(".i3dm")||t.endsWith("pnts")||t.endsWith("cmpt")?e="application/octet-stream":console.warn(`save ${t}: MimeType无法确定!`));const r=new Blob([n],{type:e||""});let i=URL.createObjectURL(r);var s=document.createElement("a"),o=new MouseEvent("click");s.download=t,s.href=i,s.dispatchEvent(o),URL.revokeObjectURL(i)}function Vg(n,t){const e=document.createElement("a"),r=new MouseEvent("click");e.download=t||"下载",e.href=n,e.dispatchEvent(r)}const pl=class pl extends J{constructor(){super();f(this,"_set",new Set);f(this,"_toChangeEvent",this.disposeVar(new V));f(this,"_changedEvent",this.disposeVar(new V));f(this,"main");this.dispose(()=>{this._set.size!==0&&(pl.warnOnDestroying&&console.warn("this._set.size > 0"),this.clear())})}get toChange(){return this._toChangeEvent}get changed(){return this._changedEvent}add(...e){if(e.length==2&&typeof e[1]=="boolean")e[1]&&(this.main=e[0]);else for(let r of e)this._toChangeEvent.emit([],[r]),this._set.add(r),this._changedEvent.emit([],[r])}delete(...e){for(let r of e)this.main&&this.main==r&&(this.main=void 0),this._toChangeEvent.emit([r],[]),this._set.delete(r),this._changedEvent.emit([r],[])}disposableAdd(...e){return e.length==2&&typeof e[1]=="boolean"?(e[1]&&(this.main=e[0]),this.add(e[0]),()=>this.delete(e[0])):(this.add(...e),()=>this.delete(...e))}get size(){return this._set.size}clear(){const e=[...this._set];this._toChangeEvent.emit([],e),this._set.clear(),this._changedEvent.emit([],e)}values(){return this._set.values()}};f(pl,"warnOnDestroying",!0);let du=pl;class zg extends J{constructor(){super(...arguments);f(this,"registerEngines",{})}register(e,r,i){const s=this.registerEngines[e]||new Map;return s.has(r)&&console.warn(`register warn:${e}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[e]=s,r}getEngineObjConstructor(e,r){const i=this.registerEngines[r];if(!i)return;let s=e.constructor,o=e.typeName,a=i.get(o);if(a)return a;if(e.components.main)return;const u=o;for(;o!=="ESSceneObject"&&(s=s.getParentClass(),!!s);)if(o=s.type,a=i.get(o),a)return console.warn(`未找到${u}在${r}中对应的实现类! 使用父类${o}的实现类!`),a}createEngineObject(e,r){const i=this.getEngineObjConstructor(e,r.typeName);if(i){const s=new i(e,r);return s.createdEvent.emit(),s}else{const s=new vs(e,r);return s.createdEvent.emit(),s}}}class Ug extends J{constructor(){super(...arguments);f(this,"registerEngines",{})}register(e,r,i){const s=this.registerEngines[e]||new Map;s.has(r)&&console.warn(`register warn:${e}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[e]=s}getEngineObjConstructor(e,r){const s=(this.registerEngines[r]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${r}中对应的实现类!`)}createEngineObject(e,r){const i=this.getEngineObjConstructor(e.typeName,r.typeName);if(i){const s=new i(e,r);return s.createdEvent.emit(),s}else{const s=new vs(e,r);return s.createdEvent.emit(),s}}}const on=class on extends J{constructor(e,r,i=!1){super();f(this,"_createdEvent",this.dv(new V));f(this,"_id",++on._accumId);this._sceneObject=e,this._viewer=r;{if(i)return;const s=(o,a)=>{for(let u of o)this._viewer.delete(u);for(let u of a)u.parentID=this.sceneObject.id,this._viewer.add(u)};s([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(s)),this.d(()=>s(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};f(on,"context",new zg),f(on,"contextEditing",new Ug),f(on,"register",on.context.register.bind(on.context)),f(on,"registerEditing",on.contextEditing.register.bind(on.contextEditing)),f(on,"_accumId",-1);let vs=on;const gl=class gl extends J{constructor(e,r){super();f(this,"_id",++gl._accumId);this._name=e,this._description=r}get id(){return this._id}get name(){return this._name}get description(){return this._description}};f(gl,"_accumId",-1);let ki=gl;class Cl extends ki{constructor(t,e,r,i,s){super(t,e),this._withUndefined=r,this._readonly=i,this._defaultValue=s}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class yt extends Cl{constructor(t,e,r,i,s,o){const a=t instanceof d.ReactiveVariable?"未获取到属性名":t[1].toString();super(e??a,o??a,i??!1,s??!1,r),this._reactVar=t}get reactVar(){return this._reactVar}}class q extends yt{get type(){return"BooleanProperty"}}class ut extends yt{get type(){return"StringProperty"}}class L extends yt{get type(){return"NumberProperty"}}class Gg extends yt{get type(){return"MaximumScreenSpaceErrorProperty"}}class cf extends yt{get type(){return"StringsProperty"}}class Wg extends yt{get type(){return"NumbersProperty"}}class qg extends yt{get type(){return"BooleansProperty"}}class Xg extends yt{get type(){return"String2Property"}}class Yg extends yt{get type(){return"String3Property"}}class Hg extends yt{get type(){return"String4Property"}}class hf extends yt{get type(){return"String2sProperty"}}class Jg extends yt{get type(){return"String3sProperty"}}class Bg extends yt{get type(){return"String4sProperty"}}class ve extends yt{get type(){return"Number2Property"}}class Ue extends yt{get type(){return"Number3Property"}}class dn extends yt{get type(){return"Number4Property"}}class jg extends yt{get type(){return"Number4WithUndefinedProperty"}}class ff extends yt{get type(){return"Number2sProperty"}}class Il extends yt{get type(){return"Number3sProperty"}}class Zg extends yt{get type(){return"Number4sProperty"}}class Kg extends yt{get type(){return"Boolean2Property"}}class Qg extends yt{get type(){return"Boolean3Property"}}class $g extends yt{get type(){return"Boolean4Property"}}class tm extends yt{get type(){return"Boolean2sProperty"}}class em extends yt{get type(){return"Boolean3sProperty"}}class rm extends yt{get type(){return"Boolean4sProperty"}}class nm extends yt{get type(){return"StringNumberProperty"}}class im extends yt{get type(){return"StringNumbersProperty"}}class Et extends dn{get type(){return"ColorProperty"}}class sm extends Ue{get type(){return"ColorRgbProperty"}}class om extends L{get type(){return"DashPatternProperty"}}class mt extends yt{constructor(t,e,r,i,s,o,a){super(t,r,i,s,o,a),this._enums=e}get type(){return"EnumProperty"}get enums(){return this._enums}}class am extends yt{constructor(t,e,r,i,s,o,a){super(t,r,i,s,o,a),this._enums=e}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class Vi extends yt{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class df extends yt{constructor(t,e,r,i,s){super(t,e,i,!1,!1,s),this._paramTypes=r}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class st extends ki{constructor(e,r,i,s,o){const a=s??"Unnamed Function";super(a,o??a);f(this,"_paramsProperty");f(this,"_getValueFunc");this._func=r;const u=this.disposeVar(d.reactJson(i));this._paramsProperty=this.disposeVar(new df(u,a+"_params",e,i));const[l]=d.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=l}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class it extends ki{constructor(t,e,r){const i=e??"分组";super(i,r??i),this._children=t}get type(){return"GroupProperty"}get children(){return this._children}}class Q extends yt{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class Pl extends yt{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class um extends ve{get type(){return"MinmaxProperty"}}class lm extends dn{get type(){return"NearFarScalerProperty"}}class pf extends Cl{constructor(t,e,r,i,s,o,a){const u=r??"非响应式Json";super(u,a??u,s??!1,o??!1,i),this._getJsonStringFunc=t,this._setJsonStringFunc=e}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class cm extends ve{get type(){return"NumberRangeProperty"}}class Se extends yt{constructor(t,e,r,i,s,o,a,u){super(t,i,s,o,a,u),this._step=e,this._minMax=r}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function hm(n,t){const[e,r,i]=d.getReactFuncs(n),[s,o,a]=d.getReactFuncs(t),u=d.react((e()??0)/(s()??3e3)),l=()=>{const c=u.value,h=s()??3e3,p=e()??0;if(!Number.isFinite(h)||!Number.isFinite(p)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${p}`);return}Math.abs(c*h-p)<.001||(h<=0?u.value=0:u.value=p/h)};return u.dispose(i.disposableOn(l)),u.dispose(a.disposableOn(l)),u.dispose(u.changed.disposableOn(()=>{const c=u.value,h=s()??3e3,p=e()??0;if(!Number.isFinite(h)||!Number.isFinite(p)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${p}`);return}Math.abs(c*h-p)<.001||r(c*h)})),u}class pu extends ki{constructor(e,r,i,s,o,a){super(s??"播放器",a??"播放器");f(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=e,this._ratioReact=r,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}f(pu,"createPlayingRatio",hm);class io extends Ue{get type(){return"PositionProperty"}}class gf extends yt{get type(){return"PositionsProperty"}}class fm extends yt{get type(){return"PositionsSetPropety"}}class bl extends Ue{get type(){return"RotationProperty"}}class wa extends ut{get type(){return"UriProperty"}}class mf extends ki{constructor(e,r,i,s,o,a){const u=s??"视角播放器";super(u,a??u);f(this,"_defaults",{playing:!1,loop:!1});this._playingReact=e,this._stopFn=r,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class vf extends yt{get type(){return"DatesProperty"}}class ys extends yt{get type(){return"DateProperty"}}var $=(n=>(n.Place="place",n.Translation="translation",n.Rotation="rotation",n.Scale="scale",n.DoublePointsAppend="doublePointsAppend",n.DoublePointsModify="doublePointsModify",n.CircularAppend="circularAppend",n.CircularInsert="circularInsert",n.LineStringAppend="lineStringAppend",n.LineStringInsert="lineStringInsert",n.ScatterAppend="scatterAppend",n.ScatterModify="scatterModify",n.VisibilityAppend="visibilityAppend",n.VisibilityModify="visibilityModify",n.HeightModify="heightModify",n))($||{}),yf=(n=>(n.DECIMAL_DEGREE="DECIMAL_DEGREE",n.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",n.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",n))(yf||{});class dm{constructor(t){this.childPickedInfo=t}}class pm{constructor(t,e,r,i,s,o){this.pickResult=t,this.sceneObject=e,this.tilesetPickInfo=r,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=o}assign(t){t!=null&&t.pickedResult&&(this.pickResult=t.pickedResult),t!=null&&t.sceneObject&&(this.sceneObject=t.sceneObject),t!=null&&t.tilesetPickInfo&&(this.tilesetPickInfo=t.tilesetPickInfo),t!=null&&t.geojsonPickInfo&&(this.geojsonPickInfo=t.geojsonPickInfo),t!=null&&t.attachedInfo&&(this.attachedInfo=t.attachedInfo),t!=null&&t.screenPosition&&(this.screenPosition=t.screenPosition)}}class gm extends J{constructor(e){super();f(this,"_sceneObjRefs",new Map);f(this,"_refs",{});f(this,"_refsChanged",this.dv(new V));const r=(i,s,o)=>{if(o){const a=this.getLastSceneObject(o),u=this._sceneObjRefs.get(o);if(!u)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const c=u.indexOf(i);c===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(u.splice(c,1),u.length===0&&this._sceneObjRefs.delete(o))}const l=this.getLastSceneObject(o);this._refs[o]=l,this._refsChanged.emit(l,a)}if(s){const a=this.getLastSceneObject(s),u=this._sceneObjRefs.get(s);u?(u.push(i),u.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
|
|
21
|
+
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[n]=S.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>af(S.copyright),1e3*60),setInterval(()=>af(S.copyright),24*60*60*1e3)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&S.copyright.print()}catch{console.warn("版本信息有误!")}function Wg(){return!0}function qg(){throw new Error("throwOnDestroyed")}function uf(n){for(var t in n)typeof n[t]=="function"&&(n[t]=qg);n.isDestroyed=Wg}const bl=class bl{constructor(){f(this,"_memId",++bl._lastMemId);f(this,"_disposers")}get __v_skip(){return!0}get memId(){return this._memId}get disposers(){return this._disposers||(this._disposers=[]),this._disposers}dispose(t){return this.disposers.push(t),t}d(t){return this.dispose(t)}disposeVar(t){return this.disposers.push(()=>t.destroy()),t}dv(t){return this.disposeVar(t)}tryDisposeVar(t){return this.disposers.push(()=>t.tryDestroy()),t}tdv(t){return this.tryDisposeVar(t)}autoDispose(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}ad(t){return typeof t=="function"?this.dispose(t):this.disposeVar(t)}isDestroyed(){return!1}destroyImp(){}destroy(){if(this._toDestroyEvent&&this._toDestroyEvent.emit(),this.destroyImp(),this._disposers)try{const t=this._disposers,e=t.length;for(let r=e-1;r>=0;--r)t[r]();t.length=0,this._disposers=void 0}catch(t){console.error(`destroy get error! ${t}`)}return uf(this)}tryDestory(){if(!this.isDestroyed())return this.destroy()}};f(bl,"_lastMemId",-1);let H=bl,Ol;function lf(n){Ol=n}Object.defineProperties(H.prototype,{toDestroyEvent:{get(){if(this._toDestroyEvent===void 0){if(!Ol)throw new Error("Destroyable EventCtor not registered yet!");this._toDestroyEvent=this.disposeVar(new Ol)}return this._toDestroyEvent}}});class xl{constructor(t,e,r=!1){f(this,"_freeElements");f(this,"_usedElementsCount");f(this,"_usedElements");f(this,"_nextCreateID");f(this,"_scratchObjs");this._createDefaultFunc=t,this._destroyFunc=e,this._freeElements=[],this._usedElementsCount=0,this._nextCreateID=1,this._scratchObjs=[],r&&(this._usedElements=[])}get usedElementsCount(){return this._usedElementsCount}get freeElementsCount(){return this._freeElements.length}_getCreateID(){return this._nextCreateID++}_create(){let t;return this._freeElements.length>0?t=this._freeElements.pop():t=this._createDefaultFunc&&this._createDefaultFunc()||{},t._cid=this._getCreateID(),t}create(){return this._create()}multiCreate(t){this._scratchObjs.length=0;for(let e=0;e<t;++e)this._scratchObjs.push(this._create());return this._scratchObjs}_destroy(t){this._destroyFunc&&this._destroyFunc(t),t._cid=void 0}destroy(...t){const e=t.length;for(let r=0;r<e;++r)this._destroy(t[r])}}function Xg(){return{item:void 0,previous:void 0,next:void 0}}function Hg(n){n.item=void 0,n.previous=void 0,n.next=void 0}const cf=new xl(Xg,Hg,!0);function Dl(n,t,e){const r=cf.create();return r.item=n,r.previous=t,r.next=e,r}function hf(n){if(!n)throw new Error("node is undefined!");cf.destroy(n)}function Ml(n,t){t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=void 0,n.tail=t.previous):t.next?(t.next.previous=void 0,n.head=t.next):(n.head=void 0,n.tail=void 0),t.next=void 0,t.previous=void 0}class ff{constructor(t){f(this,"head");f(this,"tail");f(this,"_length");const{needLength:e}=t||{needLength:!0};this.head=void 0,this.tail=void 0,e&&(this._length=0)}_incrementLength(){typeof this._length=="number"&&++this._length}_decrementLength(){typeof this._length=="number"&&--this._length}_setLength(t){typeof this._length=="number"&&(this._length=t)}get length(){return this._length}get empty(){return!this.head}*[Symbol.iterator](){let t=this.head;for(;t;)yield t,t=t.next}remove(t){if(!t)throw new Error("node is undefined!");Ml(this,t),this._decrementLength(),hf(t)}getNode(t){let e=this.head;for(;e!==null;){if(!e)throw new Error("current is undefined!");if(e.item===t)return e;e=e.next}}moveAfter(t,e){if(t!==e){Ml(this,e);var r=t.next;t.next=e,this.tail===t?this.tail=e:r&&(r.previous=e),e.next=r,e.previous=t}}moveBefore(t,e){if(t!==e){Ml(this,e);var r=t.previous;t.previous=e,this.head===t?this.head=e:r&&(r.next=e),e.previous=r,e.next=t}}insertBefore(t,e){const r=Dl(e,t.previous,t);return t.previous&&(t.previous.next=r),t.previous=r,this.head===t&&(this.head=r),this._incrementLength(),r}insertAfter(t,e){const r=Dl(e,t,t.next);return t.next&&(t.next.previous=r),t.next=r,this.tail===t&&(this.tail=r),this._incrementLength(),r}_setFirstNode(t){if(this.head||this.tail)throw new Error("_setFirstNode error!");const e=Dl(t,void 0,void 0);if(this.head=e,this.tail=e,this._incrementLength(),this._length!==1)throw new Error("_setFirstNode error! this._length !== 1");return e}push(t){return this.tail?this.insertAfter(this.tail,t):this._setFirstNode(t)}pop(){if(!this.tail)throw new Error("DoublyLinkedList is empty!");const t=this.tail.item;return this.remove(this.tail),t}shift(){if(!this.head)throw new Error("DoublyLinkedList is empty!");const t=this.head.item;return this.remove(this.head),t}unshift(t){return this.head?this.insertBefore(this.head,t):this._setFirstNode(t)}removeAll(){let t=this.head;for(;t;){const e=t.next;hf(t),t=e}this.head=void 0,this.tail=void 0,this._setLength(0)}}const df=new Set;function pf(n,t=n){df.has(t)||(df.add(t),console.warn(n))}function Yg(){return{func:void 0,scope:void 0,_hasRemoved:!1,_once:!1}}function Jg(n){n.func=void 0,n.scope=void 0,n._hasRemoved=!1,n._once=!1}const ys=new xl(Yg,Jg,!0);class Ll{constructor(){f(this,"__dll");f(this,"__currentListenerStack")}get _dll(){return this.__dll=this.__dll??new ff({needLength:!0}),this.__dll}_pushCurrentListener(t){this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.push(t):this.__currentListenerStack=[this.__currentListenerStack,t]:this.__currentListenerStack=t}_popCurrentListener(){if(this.__currentListenerStack)Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.pop():this.__currentListenerStack=void 0;else throw new Error("cannot pop!")}_hasCurrentListener(t){return this.__currentListenerStack?Array.isArray(this.__currentListenerStack)?this.__currentListenerStack.indexOf(t)!==-1:this.__currentListenerStack===t:!1}do(...t){if(this.__dll&&!this._dll.empty){let e=this._dll.head;for(;e;){const r=e.item;r._hasRemoved||(this._pushCurrentListener(r),r.func.call(r.scope,...t),this._popCurrentListener());const i=e.next;r._once&&!r._hasRemoved&&(this.remove(e),e=void 0),e&&this._clearHasRemoved(e),e=i}}}get empty(){if(!this.__dll||this._dll.empty)return!0;let t=!0,e=this._dll.head;for(;e;){if(!e.item._hasRemoved){t=!1;break}e=e.next}return t}isHandlerValid(t){return!t.item._hasRemoved}nextHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.next;for(;e&&e.item._hasRemoved;)e=e.next;return e}prevHandler(t){if(!t.item._hasRemoved)throw new Error("handler has removed!");let e=t.previous;for(;e&&e.item._hasRemoved;)e=e.previous;return e}moveAfter(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or nextHandler has removed!");return this._dll.moveAfter(t,e)}moveBefore(t,e){if(t.item._hasRemoved||e.item._hasRemoved)throw new Error("handler or prevHandler has removed!");return this._dll.moveBefore(t,e)}insertBefore(t,e,r,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=ys.create();return s.func=e,s.scope=r,s._once=i,this._dll.insertBefore(t,s)}insertAfter(t,e,r,i=!1){if(t.item._hasRemoved)throw new Error("handler has removed!");const s=ys.create();return s.func=e,s.scope=r,s._once=i,this._dll.insertAfter(t,s)}_clearHasRemoved(t){t.item._hasRemoved&&!this._hasCurrentListener(t.item)&&(ys.destroy(t.item),this._dll.remove(t))}remove(t){if(!t.item||t.item._hasRemoved)throw new Error("handler has removed!");this._hasCurrentListener(t.item)?t.item._hasRemoved=!0:(ys.destroy(t.item),this._dll.remove(t))}removeAll(){if(this.__dll&&!this._dll.empty){let t=this._dll.head;for(;t;){const e=t.next;t.item._hasRemoved||this.remove(t),t=e}}}destroy(){if(!this.__dll)return;let t=this._dll.head;for(;t;){const e=t.next,r=t;this._hasCurrentListener(r.item)||(console.warn("Event has remove item that on current stack!"),console.warn(`${r.item.func.toString()}`)),ys.destroy(r.item),this._dll.remove(r),t=e}this.__dll=void 0,this.__currentListenerStack=void 0}push(t,e,r=!1){const i=ys.create();return i.func=t,i.scope=e,i._once=r,this._dll.push(i)}pop(){const t=this.tail;if(!t)throw new Error("pop error!");this.remove(t)}shift(){const t=this.head;if(!t)throw new Error("shift error!");this.remove(t)}unshift(t,e,r=!1){const i=ys.create();return i.func=t,i.scope=e,i._once=r,this._dll.unshift(i)}get tail(){let t=this._dll.tail;for(;t&&t.item._hasRemoved;)t=t.previous;return t}get head(){let t=this._dll.head;for(;t&&t.item._hasRemoved;)t=t.previous;return t}}class Na{constructor(){f(this,"_listenerHandler");f(this,"_cid")}_reset(t,e){this._listenerHandler=t,this._cid=e}clone(t){return t=t??new Na,t._reset(this._listenerHandler,this._cid),t}get valid(){if(typeof this._listenerHandler<"u"&&typeof this._cid=="number"){const t=this._listenerHandler._cid;if(typeof t<"u"&&this._cid===t)return!0}return!1}}class Al extends Na{}let V=class extends H{constructor(){super(...arguments);f(this,"__pipe");f(this,"beforeCallback");f(this,"afterCallback")}get _pipe(){return this.__pipe=this.__pipe??new Ll,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}emit(...e){!this.isDestroyed()&&this.beforeCallback&&this.beforeCallback(...e),!this.isDestroyed()&&this._pipe.do(...e),!this.isDestroyed()&&this.afterCallback&&this.afterCallback(...e)}on(e,r,i=!1,s){const o=i?this._pipe.unshift(e,r,!1):this._pipe.push(e,r,!1);return s=s??new Al,s._reset(o,o._cid),s}disposableOn(e,r,i=!1,s){const o=this.on(e,r,i,s);return()=>{o.valid&&this.off(o)}}don(e,r,i=!1,s){return this.disposableOn(e,r,i,s)}disposableWeakOn(e,r,i=!1,s){const o=new H,a=()=>{!o.isDestroyed()&&o.destroy()};return o.dispose(this.disposableOn(e,r,i,s)),o.dispose(this.toDestroyEvent.disposableOn(a)),a}dwon(e,r,i=!1,s){return this.disposableWeakOn(e,r,i,s)}once(e,r,i=!1,s){const o=i?this._pipe.unshift(e,r,!0):this._pipe.push(e,r,!0);return s=s??new Al,s._reset(o,o._cid),s}disposableOnce(e,r,i=!1,s){const o=this.once(e,r,i,s);return()=>o.valid&&this.off(o)}donce(e,r,i=!1,s){const o=this.once(e,r,i,s);return()=>o.valid&&this.off(o)}off(e){if(!e.valid)throw new Error("handler is not valid!");this._pipe.remove(e._listenerHandler),e._reset()}reset(){this._pipe.removeAll()}destroyImp(){this.empty||(pf("The event is destroying with listeners!"),this._pipe.removeAll())}};lf(V);function ao(n,t){return t=t??new Na,t._reset(n,n._cid),t}class Bg{constructor(){f(this,"__pipe")}get _pipe(){return this.__pipe=this.__pipe??new Ll,this.__pipe}get empty(){return!this.__pipe||this._pipe.empty}do(...t){return this._pipe.do(...t)}isHandlerValid(t){return t.valid?this._pipe.isHandlerValid(t._listenerHandler):!1}moveAfter(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}moveBefore(t,e){if(!t.valid||!e.valid)throw new Error("handler or nextHander is not valid!");return this._pipe.moveAfter(t._listenerHandler,e._listenerHandler)}insertBefore(t,e,r,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertBefore(t._listenerHandler,e,r,i);return ao(o,s)}insertAfter(t,e,r,i=!1,s){if(!t.valid)throw new Error("handler is not valid!");const o=this._pipe.insertAfter(t._listenerHandler,e,r,i);return ao(o,s)}remove(t){if(!t.valid)throw new Error("handler is not valid!");return this._pipe.remove(t._listenerHandler)}removeAll(){return this._pipe.removeAll()}push(t,e,r=!1,i){const s=this._pipe.push(t,e,r);return ao(s,i)}pop(){return this._pipe.pop()}shift(){return this._pipe.shift()}unshift(t,e,r=!1,i){const s=this._pipe.unshift(t,e,r);return ao(s,i)}getTail(t){const e=this._pipe.tail;if(e)return ao(e,t)}getHead(t){const e=this._pipe.head;if(e)return ao(e,t)}}function jg(n,t,...e){const r=setInterval(n,t,...e);return()=>clearInterval(r)}function Zg(n,t,...e){const r=setTimeout(n,t,...e);return()=>clearTimeout(r)}function Kg(n,...t){let e;const r=()=>{const i=performance.now();n(i,...t),e=requestAnimationFrame(r)};return r(),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function gf(n,...t){let e;return e=requestAnimationFrame(()=>{const i=performance.now();n(i,...t)}),()=>typeof e<"u"&&(cancelAnimationFrame(e),e=void 0)}function Qg(n,...t){let e=!1,r;return new Promise((i,s)=>{r=s,i()}).then(()=>{!e&&n(...t)}).catch(i=>{console.error(i)}),()=>(e=!0)&&r&&(r("nextMicroTask cancelled!"),r=void 0)}class $g extends V{constructor(e,r,...i){super();f(this,"_cancellFunc");this._nextFunc=e,this.dispose(()=>{this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0)}),i.forEach(s=>this.dispose(s[r?"dwon":"don"](()=>{this.next()})))}next(){this._cancellFunc||(this._cancellFunc=this._nextFunc(()=>(this._cancellFunc=void 0,this.emit())))}flush(){this._cancellFunc&&(this._cancellFunc(),this._cancellFunc=void 0,this.emit())}}class mf extends $g{constructor(...t){super(gf,!1,...t)}}function uo(n,t,e={time:"don",immediate:!1}){const r=new mf(...Array.isArray(n)?n:[n]),i=r[e.time??"don"](t);return(e.immediate??!1)&&t(),()=>{i(),r.destroy()}}function tm(n,t,e){typeof e>"u"&&(t.endsWith(".gltf")?e="model/gltf+json":t.endsWith(".bin")?e="application/octet-stream":t.endsWith(".glb")?e="model/gltf-binary":t.endsWith(".jpg")||t.endsWith(".jpeg")?e="image/jpeg":t.endsWith(".png")?e="image/png":t.endsWith(".glsl")?e="text/plain":t.endsWith(".json")?e="application/json":t.endsWith(".b3dm")||t.endsWith(".i3dm")||t.endsWith("pnts")||t.endsWith("cmpt")?e="application/octet-stream":console.warn(`save ${t}: MimeType无法确定!`));const r=new Blob([n],{type:e||""});let i=URL.createObjectURL(r);var s=document.createElement("a"),o=new MouseEvent("click");s.download=t,s.href=i,s.dispatchEvent(o),URL.revokeObjectURL(i)}function em(n,t){const e=document.createElement("a"),r=new MouseEvent("click");e.download=t||"下载",e.href=n,e.dispatchEvent(r)}const Nl=class Nl extends H{constructor(){super();f(this,"_set",new Set);f(this,"_toChangeEvent",this.disposeVar(new V));f(this,"_changedEvent",this.disposeVar(new V));f(this,"main");this.dispose(()=>{this._set.size!==0&&(Nl.warnOnDestroying&&console.warn("this._set.size > 0"),this.clear())})}get toChange(){return this._toChangeEvent}get changed(){return this._changedEvent}add(...e){if(e.length==2&&typeof e[1]=="boolean")e[1]&&(this.main=e[0]);else for(let r of e)this._toChangeEvent.emit([],[r]),this._set.add(r),this._changedEvent.emit([],[r])}delete(...e){for(let r of e)this.main&&this.main==r&&(this.main=void 0),this._toChangeEvent.emit([r],[]),this._set.delete(r),this._changedEvent.emit([r],[])}disposableAdd(...e){return e.length==2&&typeof e[1]=="boolean"?(e[1]&&(this.main=e[0]),this.add(e[0]),()=>this.delete(e[0])):(this.add(...e),()=>this.delete(...e))}get size(){return this._set.size}clear(){const e=[...this._set];this._toChangeEvent.emit([],e),this._set.clear(),this._changedEvent.emit([],e)}values(){return this._set.values()}};f(Nl,"warnOnDestroying",!0);let wu=Nl;class rm extends H{constructor(){super(...arguments);f(this,"registerEngines",{})}register(e,r,i){const s=this.registerEngines[e]||new Map;return s.has(r)&&console.warn(`register warn:${e}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[e]=s,r}getEngineObjConstructor(e,r){const i=this.registerEngines[r];if(!i)return;let s=e.constructor,o=e.typeName,a=i.get(o);if(a)return a;if(e.components.main)return;const u=o;for(;o!=="ESSceneObject"&&(s=s.getParentClass(),!!s);)if(o=s.type,a=i.get(o),a)return console.warn(`未找到${u}在${r}中对应的实现类! 使用父类${o}的实现类!`),a}createEngineObject(e,r){const i=this.getEngineObjConstructor(e,r.typeName);if(i){const s=new i(e,r);return s.createdEvent.emit(),s}else{const s=new _s(e,r);return s.createdEvent.emit(),s}}}class nm extends H{constructor(){super(...arguments);f(this,"registerEngines",{})}register(e,r,i){const s=this.registerEngines[e]||new Map;s.has(r)&&console.warn(`register warn:${e}中${r}的实现类已经被注册,再次注册会覆盖。`),s.set(r,i),this.registerEngines[e]=s}getEngineObjConstructor(e,r){const s=(this.registerEngines[r]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${r}中对应的实现类!`)}createEngineObject(e,r){const i=this.getEngineObjConstructor(e.typeName,r.typeName);if(i){const s=new i(e,r);return s.createdEvent.emit(),s}else{const s=new _s(e,r);return s.createdEvent.emit(),s}}}const an=class an extends H{constructor(e,r,i=!1){super();f(this,"_createdEvent",this.dv(new V));f(this,"_id",++an._accumId);this._sceneObject=e,this._viewer=r;{if(i)return;const s=(o,a)=>{for(let u of o)this._viewer.delete(u);for(let u of a)u.parentID=this.sceneObject.id,this._viewer.add(u)};s([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(s)),this.d(()=>s(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};f(an,"context",new rm),f(an,"contextEditing",new nm),f(an,"register",an.context.register.bind(an.context)),f(an,"registerEditing",an.contextEditing.register.bind(an.contextEditing)),f(an,"_accumId",-1);let _s=an;const Tl=class Tl extends H{constructor(e,r){super();f(this,"_id",++Tl._accumId);this._name=e,this._description=r}get id(){return this._id}get name(){return this._name}get description(){return this._description}};f(Tl,"_accumId",-1);let zi=Tl;class Rl extends zi{constructor(t,e,r,i,s){super(t,e),this._withUndefined=r,this._readonly=i,this._defaultValue=s}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class yt extends Rl{constructor(t,e,r,i,s,o){const a=t instanceof p.ReactiveVariable?"未获取到属性名":t[1].toString();super(e??a,o??a,i??!1,s??!1,r),this._reactVar=t}get reactVar(){return this._reactVar}}class q extends yt{get type(){return"BooleanProperty"}}class ut extends yt{get type(){return"StringProperty"}}class L extends yt{get type(){return"NumberProperty"}}class im extends yt{get type(){return"MaximumScreenSpaceErrorProperty"}}class vf extends yt{get type(){return"StringsProperty"}}class sm extends yt{get type(){return"NumbersProperty"}}class om extends yt{get type(){return"BooleansProperty"}}class am extends yt{get type(){return"String2Property"}}class um extends yt{get type(){return"String3Property"}}class lm extends yt{get type(){return"String4Property"}}class yf extends yt{get type(){return"String2sProperty"}}class cm extends yt{get type(){return"String3sProperty"}}class hm extends yt{get type(){return"String4sProperty"}}class ve extends yt{get type(){return"Number2Property"}}class Ge extends yt{get type(){return"Number3Property"}}class pn extends yt{get type(){return"Number4Property"}}class fm extends yt{get type(){return"Number4WithUndefinedProperty"}}class _f extends yt{get type(){return"Number2sProperty"}}class Fl extends yt{get type(){return"Number3sProperty"}}class dm extends yt{get type(){return"Number4sProperty"}}class pm extends yt{get type(){return"Boolean2Property"}}class gm extends yt{get type(){return"Boolean3Property"}}class mm extends yt{get type(){return"Boolean4Property"}}class vm extends yt{get type(){return"Boolean2sProperty"}}class ym extends yt{get type(){return"Boolean3sProperty"}}class _m extends yt{get type(){return"Boolean4sProperty"}}class wm extends yt{get type(){return"StringNumberProperty"}}class Em extends yt{get type(){return"StringNumbersProperty"}}class Et extends pn{get type(){return"ColorProperty"}}class Sm extends Ge{get type(){return"ColorRgbProperty"}}class Cm extends L{get type(){return"DashPatternProperty"}}class mt extends yt{constructor(t,e,r,i,s,o,a){super(t,r,i,s,o,a),this._enums=e}get type(){return"EnumProperty"}get enums(){return this._enums}}class Im extends yt{constructor(t,e,r,i,s,o,a){super(t,r,i,s,o,a),this._enums=e}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class Ui extends yt{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class wf extends yt{constructor(t,e,r,i,s){super(t,e,i,!1,!1,s),this._paramTypes=r}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class st extends zi{constructor(e,r,i,s,o){const a=s??"Unnamed Function";super(a,o??a);f(this,"_paramsProperty");f(this,"_getValueFunc");this._func=r;const u=this.disposeVar(p.reactJson(i));this._paramsProperty=this.disposeVar(new wf(u,a+"_params",e,i));const[l]=p.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=l}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class it extends zi{constructor(t,e,r){const i=e??"分组";super(i,r??i),this._children=t}get type(){return"GroupProperty"}get children(){return this._children}}class Q extends yt{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class kl extends yt{constructor(t,e,r,i,s,o,a){super(t,e,r,s,o,a),this._sampleValue=i}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class Pm extends ve{get type(){return"MinmaxProperty"}}class bm extends pn{get type(){return"NearFarScalerProperty"}}class Ef extends Rl{constructor(t,e,r,i,s,o,a){const u=r??"非响应式Json";super(u,a??u,s??!1,o??!1,i),this._getJsonStringFunc=t,this._setJsonStringFunc=e}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class Nm extends ve{get type(){return"NumberRangeProperty"}}class Se extends yt{constructor(t,e,r,i,s,o,a,u){super(t,i,s,o,a,u),this._step=e,this._minMax=r}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function Tm(n,t){const[e,r,i]=p.getReactFuncs(n),[s,o,a]=p.getReactFuncs(t),u=p.react((e()??0)/(s()??3e3)),l=()=>{const c=u.value,h=s()??3e3,d=e()??0;if(!Number.isFinite(h)||!Number.isFinite(d)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${d}`);return}Math.abs(c*h-d)<.001||(h<=0?u.value=0:u.value=d/h)};return u.dispose(i.disposableOn(l)),u.dispose(a.disposableOn(l)),u.dispose(u.changed.disposableOn(()=>{const c=u.value,h=s()??3e3,d=e()??0;if(!Number.isFinite(h)||!Number.isFinite(d)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${d}`);return}Math.abs(c*h-d)<.001||r(c*h)})),u}class Eu extends zi{constructor(e,r,i,s,o,a){super(s??"播放器",a??"播放器");f(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=e,this._ratioReact=r,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}f(Eu,"createPlayingRatio",Tm);class lo extends Ge{get type(){return"PositionProperty"}}class Sf extends yt{get type(){return"PositionsProperty"}}class Om extends yt{get type(){return"PositionsSetPropety"}}class Vl extends Ge{get type(){return"RotationProperty"}}class Ta extends ut{get type(){return"UriProperty"}}class Cf extends zi{constructor(e,r,i,s,o,a){const u=s??"视角播放器";super(u,a??u);f(this,"_defaults",{playing:!1,loop:!1});this._playingReact=e,this._stopFn=r,this._loopReact=i,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class If extends yt{get type(){return"DatesProperty"}}class ws extends yt{get type(){return"DateProperty"}}var $=(n=>(n.Place="place",n.Translation="translation",n.Rotation="rotation",n.Scale="scale",n.DoublePointsAppend="doublePointsAppend",n.DoublePointsModify="doublePointsModify",n.CircularAppend="circularAppend",n.CircularInsert="circularInsert",n.LineStringAppend="lineStringAppend",n.LineStringInsert="lineStringInsert",n.ScatterAppend="scatterAppend",n.ScatterModify="scatterModify",n.VisibilityAppend="visibilityAppend",n.VisibilityModify="visibilityModify",n.HeightModify="heightModify",n))($||{}),Pf=(n=>(n.DECIMAL_DEGREE="DECIMAL_DEGREE",n.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",n.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",n))(Pf||{});class xm{constructor(t){this.childPickedInfo=t}}class Dm{constructor(t,e,r,i,s,o){this.pickResult=t,this.sceneObject=e,this.tilesetPickInfo=r,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=o}assign(t){t!=null&&t.pickedResult&&(this.pickResult=t.pickedResult),t!=null&&t.sceneObject&&(this.sceneObject=t.sceneObject),t!=null&&t.tilesetPickInfo&&(this.tilesetPickInfo=t.tilesetPickInfo),t!=null&&t.geojsonPickInfo&&(this.geojsonPickInfo=t.geojsonPickInfo),t!=null&&t.attachedInfo&&(this.attachedInfo=t.attachedInfo),t!=null&&t.screenPosition&&(this.screenPosition=t.screenPosition)}}class Mm extends H{constructor(e){super();f(this,"_sceneObjRefs",new Map);f(this,"_refs",{});f(this,"_refsChanged",this.dv(new V));const r=(i,s,o)=>{if(o){const a=this.getLastSceneObject(o),u=this._sceneObjRefs.get(o);if(!u)console.warn(`this._sceneObjRefs中不存在ref(${o}), 可能系统存在逻辑问题`);else{const c=u.indexOf(i);c===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(u.splice(c,1),u.length===0&&this._sceneObjRefs.delete(o))}const l=this.getLastSceneObject(o);this._refs[o]=l,this._refsChanged.emit(l,a)}if(s){const a=this.getLastSceneObject(s),u=this._sceneObjRefs.get(s);u?(u.push(i),u.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
|
|
22
22
|
${u.map(c=>`${c.id} ${c.typeName}
|
|
23
|
-
`).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const l=this.getLastSceneObject(s);this._refs[s]=l,this._refsChanged.emit(l,a)}};this.d(e.sceneObjCreatedEvent.don(i=>{const s=(o,a)=>r(i,o,a);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&r(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const r=this.getSceneObjects(e);if(r)return r[r.length-1]}getSceneObjects(e){const r=this._sceneObjRefs.get(e);if(!(!r||r.length===0))return r}}function _f(n,t){const[e,r,i]=d.getReactFuncs(n),s=d.react(void 0),o=()=>{const a=e()??t;s.value=a&&tt.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d(tt.context.environmentVariablesChanged.don(o)),s}function wf(n){const t=/\${(.*?)\}/g;if(!t.test(n))return n;const e=n.replace(t,(r,i)=>{const s=tt.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return wf(e)}class mm extends J{constructor(){super();f(this,"_esObjConstructors",new Map);f(this,"_sceneObjs",new Map);f(this,"_sceneObjCreatedEvent",new V);f(this,"_sceneObjToDestroyEvent",new V);f(this,"_refsManager",this.dv(new gm(this)));f(this,"_environmentVariables",window.ESSDK_ENV||{});f(this,"_environmentVariablesChanged",this.dv(new V))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,r,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,r),i&&d.setExtProp(r,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,r){if(!r||this._sceneObjs.has(r)){const s=d.createGuid();r&&console.warn(`已存在相同id的对象!id自动变更!${r} -> ${s} 请注意:id变更可能导致引用失效!`),r=s}if(!r)throw new Error("id不能为空!");const i=new e(r);return i.id!==r&&(console.warn(`sceneObj.id(${i.id}) !== id(${r}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,r){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,r)}else return this.createSceneObjectFromClass(e,r)}createSceneObjectFromJson(e){const r=this.createSceneObject(e.type,e.id);return r&&(r.json=e),r}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(e.startsWith("ES")){const r=[];for(const i of this._sceneObjs.values())i.typeName===e&&r.push(i);return r}else return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const r=this._esObjConstructors.get(e);if(r)return r}getProps(e){const r=this._getSceneObjConstructor(e);if(!r){console.warn(`cannot get constructor from type: ${e}`);return}return d.getExtProp(r,"__sceneObjExtraInfo")}setProps(e,r){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let s=d.getExtProp(i,"__sceneObjExtraInfo");s||(s={},d.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,r)}getProp(e,r){const i=this.getProps(e);return i&&i[r]}setProp(e,r,i){this.setProps(e,{[r]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[r,i]of Object.entries(e))this.setEnv(r,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,r){if(this._environmentVariables[e]!==r){const i=this._environmentVariables[e];this._environmentVariables[e]=r,this._environmentVariablesChanged.emit(e,r,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return wf(e)}createEnvStrReact(e,r){return _f(e,r)}createEvnStrReact(e,r){return _f(e,r)}}const ft=class ft extends J{constructor(e){super();f(this,"_components",this.dv(new du));f(this,"_viewerAttached",this.dv(new V));f(this,"_viewerDetached",this.dv(new V));f(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(r=>{r.actived&&(this.activeViewer=r),r.ad(r.activedChanged.don(i=>{i&&e.has(r)&&(this.activeViewer=r)})),e.add(r)})),this.d(this._viewerDetached.don(r=>{e.delete(r),this.activeViewer==r&&(this.activeViewer=void 0)})),e})());f(this,"_activeViewer",this.disposeVar(d.react(void 0)));f(this,"_createdEvent",this.dv(new V));f(this,"_flushEvent",this.dv(new V));f(this,"_id");f(this,"_updateFuncReact",this.dv(d.react(void 0)));f(this,"_toDestroyFuncReact",this.dv(d.react(void 0)));f(this,"_parentID");e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??d.createGuid(),this._initName();{const r=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};r(),this.d(this.execOnceFuncStrChanged.don(r))}{const r=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};r(),this.d(this.updateFuncStrChanged.don(r));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||d.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const r=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};r(),this.d(this.toDestroyFuncStrChanged.don(r)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,r,i){d.extendClassProps(r.prototype,r.createDefaultProps);const s=r.createDefaultProps();r.defaults&&(r.defaults={});for(const o of Object.keys(s))r.defaults[o]=s[o]instanceof d.ReactiveVariable?s[o].value:s[o];return this.innerRegister(e,r,i),e}static get envs(){return ft.context.environmentVariables}static get $refs(){return ft.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const r=new Map;this.d(()=>{r.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=e(i);s&&r.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!r.has(i))return;const s=r.get(i);s&&(s.destroy(),r.delete(i))}))}createAttachedObject(e){const r=new Map,i=()=>{for(let[u,l]of r.entries())l.destroy();r.clear()},s=u=>{const l=e(u);l&&r.set(u,l)};for(let u of this.attachedViewers)s(u);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(u=>{if(!r.has(u))return;const l=r.get(u);l&&(l.destroy(),r.delete(u))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(r=>new vm(r,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}_innerGetJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof d.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_innerSetJson(e,r,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof d.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(e){this._parentID=e}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new it(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new it(r[s],s))}),i}getESProperties(){return{defaultMenu:"general",basic:[],general:[new ut([this,"typeName"],"类型",void 0,!1,!0),new ut([this,"id"],"唯一标识",void 0,!1,!0),new ut([this,"name"],"名称")],dataSource:[],location:[],coordinate:[],style:[],more:[new ut([this,"ref"],"ref",void 0,!0),new Q([this,"extras"],"extras",void 0,void 0,!0),new pf(()=>this._jsonStr,e=>e&&(this._jsonStr=e),"JSON")]}}};f(ft,"context",new mm),f(ft,"innerRegister",ft.context.register.bind(ft.context)),f(ft,"defaults",{}),f(ft,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),f(ft,"type",ft.register("ESSceneObject",ft,{chsName:"场景类",tags:["ESObjects"],description:""})),f(ft,"create",ft.context.createSceneObject.bind(ft.context)),f(ft,"createFromClass",ft.context.createSceneObjectFromClass.bind(ft.context)),f(ft,"createFromJson",ft.context.createSceneObjectFromJson.bind(ft.context)),f(ft,"destroySceneObject",ft.context.destroySceneObject.bind(ft.context)),f(ft,"getSceneObjById",ft.context.getSceneObjectById.bind(ft.context)),f(ft,"getSceneObj",ft.context.getSceneObject.bind(ft.context)),f(ft,"getEnv",ft.context.getEnv.bind(ft.context)),f(ft,"setEnv",ft.context.setEnv.bind(ft.context)),f(ft,"getStrFromEnv",ft.context.getStrFromEnv.bind(ft.context)),f(ft,"getSceneObjectById",ft.context.getSceneObjectById.bind(ft.context)),f(ft,"getSceneObject",ft.context.getSceneObject.bind(ft.context));let tt=ft;class vm extends J{constructor(t,e){super(),this.dv(new d.ObjResettingWithEvent(t.subContainerChanged,()=>{if(t.subContainer)return e(t,t.subContainer)}))}}const _s={distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0},ym={position:[0,0,0],rotation:[0,0,0],flyDuration:1},yr=class yr extends tt{constructor(e){super(e);f(this,"_editing",this.dv(d.react(!1)));f(this,"editingID");f(this,"editingBindMode","singlePoint");f(this,"_deprecated",[]);f(this,"_flyInEvent",this.dv(new V));f(this,"_flyToEvent",this.dv(new V));f(this,"_flyOverEvent",this.disposeVar(new V));f(this,"_pickedEvent",this.dv(new V));f(this,"_calcFlyToParamEvent",this.dv(new V));f(this,"_calcFlyInParamEvent",this.dv(new V));f(this,"useCalcFlyToParamInESObjectWithLocation",!1);Pf(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let r=0;r<e.length;r++){const i=e[r];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(a=>{const u=i[s];typeof u=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(u).forEach(l=>{a===l&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${l} 下版本将会被移除,推荐使用属性值 ${u[l]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,yr._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,yr._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,general:[...e.general,new q([this,"show"],"是否显示",yr.defaults.show),new q([this,"collision"],"开启碰撞",yr.defaults.collision),new q([this,"allowPicking"],"允许拾取",yr.defaults.allowPicking),new st([],()=>this.calcFlyToParam(),[],"保存观察视角","保存当前flyToParam"),new st([],()=>this.emptyFlyToParam(),[],"清空飞向参数","清空飞向参数"),new st([],()=>this.emptyFlyInParam(),[],"清空飞入参数","清空飞入参数"),new st([],()=>this.calcFlyInParam(),[],"保存飞入参数","保存飞入参数flyInParam")],more:[...e.more,new it([],"飞行定位","飞向参数"),new st(["number"],r=>this.flyTo(r),[1],"飞向"),new Q([this,"flyToParam"],"flyToParam",void 0,void 0,!0),new L([this,"flyToDistance"],"flyToDistance",void 0,!0),new L([this,"flyToHeading"],"flyToHeading",void 0,!0),new L([this,"flyToPitch"],"flyToPitch",void 0,!0),new L([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new L([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new L([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new it([],"飞入参数"),new st(["number"],r=>this.flyIn(r),[1],"飞入"),new Q([this,"flyInParam"],"flyInParam",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??_s,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??_s,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??_s,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??_s,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??_s,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??_s,pDelta:e}:void 0}};f(yr,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:d.reactJsonWithUndefined(void 0),flyInParam:d.reactJsonWithUndefined(void 0)})),f(yr,"type",yr.register("ESVisualObject",yr,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),f(yr,"supportEditingModes",[]),f(yr,"_lastFlyInId",0),f(yr,"_lastFlyToId",0);let kt=yr;class Ef extends J{constructor(){super();f(this,"_data",this.dv(d.react(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class Sf extends J{constructor(){super(...arguments);f(this,"_dragStartEvent",this.dv(new V));f(this,"_dragOverEvent",this.dv(new V));f(this,"_dragLeaveEvent",this.dv(new V));f(this,"_dropEvent",this.dv(new V))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function _m(n,t){t&&(Reflect.has(t,"editing")?t.editing=!0:Reflect.has(t,"positionEditing")&&(t.positionEditing=!0))}function wm(n){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(n.typeName)||(Reflect.has(n,"editing")?n.editing=!0:Reflect.has(n,"positionEditing")&&(n.positionEditing=!0)),typeof n.execOnCreating=="function"&&n.execOnCreating()}function gu(n,t){d.getExtProp(n,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),d.setExtProp(n,"__treeItem",t)}function Em(n){return d.getExtProp(n,"__treeItem")}function Sm(n){if(!(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")))return n;const t=document.createElement("a");t.href=n;const e=t.href;return t.remove(),e}function Cm(n){try{return JSON.parse(n),!0}catch{return!1}}function Im(n){return n instanceof Function?n():n}function Cf(n,t){for(let e of n)if(t.includes(e))return!0;return!1}function pi(n,t){const e=n,r=t;return e===void 0||e.length===0||r===void 0||r.length===0?!0:Cf(e,r)}function Pm(n){const t=setTimeout(()=>{n(),clearTimeout(t)})}function so(n){let t=n%360;return t=t<0?360+t:t,t}function If(n){return so(n+180)-180}function mu(n,t,e){let r=so(n),i=so(t);Math.abs(r-i)>180&&(r<i?r+=360:i+=360);const s=r*(1-e)+i*e;return If(s)}function Nl(n,t,e,r){return r=r||[0,0,0],r[0]=mu(n[0],t[0],e),r[1]=mu(n[1],t[1],e),r[2]=mu(n[2],t[2],e),r}function Pf(n,t,e="editing"){const r=new J;n.ad(r);const i=t.bind(n);return r.ad(new d.ObjResettingWithEvent(n.activeViewerChanged,()=>{const s=new J;let o=n.activeViewer;return o?(s.ad(n[`${e}Changed`].don(()=>{var a;n[`${e}`]?i():(a=(n.components.main??n).editingID)!=null&&a.includes("inner")&&n.activeViewer&&n.activeViewer.stopEditing()})),s.ad(o.editingEvent.don(a=>{if(a.objectIDs.includes(n.id)&&a.type==="end"){const u=n.components.main??n;u.editingID&&a.editingID.includes(u.editingID)?n[`${e}`]=!1:n[`${e}`]=!u.editingID.includes("outer")}}))):s.ad(n[`${e}Changed`].don(()=>{n[`${e}`]=!1})),s})),n[`${e}`]&&i(),r}class bm extends J{constructor(e,r,i,s){super();f(this,"_sceneObjectId",this.dv(new d.SceneObjectWithId));this._id=e,this._startTimeStamp=r,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,u=a-this._startTimeStamp;this.player.currentTime=d.clamp(u,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof pn?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const Nm=`
|
|
23
|
+
`).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const l=this.getLastSceneObject(s);this._refs[s]=l,this._refsChanged.emit(l,a)}};this.d(e.sceneObjCreatedEvent.don(i=>{const s=(o,a)=>r(i,o,a);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&r(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const r=this.getSceneObjects(e);if(r)return r[r.length-1]}getSceneObjects(e){const r=this._sceneObjRefs.get(e);if(!(!r||r.length===0))return r}}function bf(n,t){const[e,r,i]=p.getReactFuncs(n),s=p.react(void 0),o=()=>{const a=e()??t;s.value=a&&tt.context.getStrFromEnv(a)};return o(),i&&s.d(i.don(o)),s.d(tt.context.environmentVariablesChanged.don(o)),s}function Nf(n){const t=/\${(.*?)\}/g;if(!t.test(n))return n;const e=n.replace(t,(r,i)=>{const s=tt.context.getEnv(i);return s===void 0?(console.warn(`环境变量(${i})不存在,无法进行转换`),"{env-error}"):s});return Nf(e)}class Lm extends H{constructor(){super();f(this,"_esObjConstructors",new Map);f(this,"_sceneObjs",new Map);f(this,"_sceneObjCreatedEvent",new V);f(this,"_sceneObjToDestroyEvent",new V);f(this,"_refsManager",this.dv(new Mm(this)));f(this,"_environmentVariables",window.ESSDK_ENV||{});f(this,"_environmentVariablesChanged",this.dv(new V))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,r,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,r),i&&p.setExtProp(r,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,r){if(!r||this._sceneObjs.has(r)){const s=p.createGuid();r&&console.warn(`已存在相同id的对象!id自动变更!${r} -> ${s} 请注意:id变更可能导致引用失效!`),r=s}if(!r)throw new Error("id不能为空!");const i=new e(r);return i.id!==r&&(console.warn(`sceneObj.id(${i.id}) !== id(${r}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,r){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,r)}else return this.createSceneObjectFromClass(e,r)}createSceneObjectFromJson(e){const r=this.createSceneObject(e.type,e.id);return r&&(r.json=e),r}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(e.startsWith("ES")){const r=[];for(const i of this._sceneObjs.values())i.typeName===e&&r.push(i);return r}else return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const r=this._esObjConstructors.get(e);if(r)return r}getProps(e){const r=this._getSceneObjConstructor(e);if(!r){console.warn(`cannot get constructor from type: ${e}`);return}return p.getExtProp(r,"__sceneObjExtraInfo")}setProps(e,r){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let s=p.getExtProp(i,"__sceneObjExtraInfo");s||(s={},p.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,r)}getProp(e,r){const i=this.getProps(e);return i&&i[r]}setProp(e,r,i){this.setProps(e,{[r]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[r,i]of Object.entries(e))this.setEnv(r,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,r){if(this._environmentVariables[e]!==r){const i=this._environmentVariables[e];this._environmentVariables[e]=r,this._environmentVariablesChanged.emit(e,r,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return Nf(e)}createEnvStrReact(e,r){return bf(e,r)}createEvnStrReact(e,r){return bf(e,r)}}const ft=class ft extends H{constructor(e){super();f(this,"_components",this.dv(new wu));f(this,"_viewerAttached",this.dv(new V));f(this,"_viewerDetached",this.dv(new V));f(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(r=>{r.actived&&(this.activeViewer=r),r.ad(r.activedChanged.don(i=>{i&&e.has(r)&&(this.activeViewer=r)})),e.add(r)})),this.d(this._viewerDetached.don(r=>{e.delete(r),this.activeViewer==r&&(this.activeViewer=void 0)})),e})());f(this,"_activeViewer",this.disposeVar(p.react(void 0)));f(this,"_createdEvent",this.dv(new V));f(this,"_flushEvent",this.dv(new V));f(this,"_id");f(this,"_updateFuncReact",this.dv(p.react(void 0)));f(this,"_toDestroyFuncReact",this.dv(p.react(void 0)));f(this,"_parentID");e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??p.createGuid(),this._initName();{const r=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};r(),this.d(this.execOnceFuncStrChanged.don(r))}{const r=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};r(),this.d(this.updateFuncStrChanged.don(r));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||p.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const r=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};r(),this.d(this.toDestroyFuncStrChanged.don(r)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static getParentClass(){return Object.getPrototypeOf(this)}static register(e,r,i){p.extendClassProps(r.prototype,r.createDefaultProps);const s=r.createDefaultProps();r.defaults&&(r.defaults={});for(const o of Object.keys(s))r.defaults[o]=s[o]instanceof p.ReactiveVariable?s[o].value:s[o];return this.innerRegister(e,r,i),e}static get envs(){return ft.context.environmentVariables}static get $refs(){return ft.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const r=new Map;this.d(()=>{r.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=e(i);s&&r.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!r.has(i))return;const s=r.get(i);s&&(s.destroy(),r.delete(i))}))}createAttachedObject(e){const r=new Map,i=()=>{for(let[u,l]of r.entries())l.destroy();r.clear()},s=u=>{const l=e(u);l&&r.set(u,l)};for(let u of this.attachedViewers)s(u);const o=this._viewerAttached.don(s),a=this._viewerDetached.don(u=>{if(!r.has(u))return;const l=r.get(u);l&&(l.destroy(),r.delete(u))});return()=>{a(),o(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(r=>new Am(r,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}get typeName(){return this.constructor.type}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return this.constructor.createDefaultProps()}_innerGetJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof p.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_innerSetJson(e,r,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof p.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID??this.id}set parentID(e){this._parentID=e}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new it(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new it(r[s],s))}),i}getESProperties(){return{defaultMenu:"general",basic:[],general:[new ut([this,"typeName"],"类型",void 0,!1,!0),new ut([this,"id"],"唯一标识",void 0,!1,!0),new ut([this,"name"],"名称")],dataSource:[],location:[],coordinate:[],style:[],more:[new ut([this,"ref"],"ref",void 0,!0),new Q([this,"extras"],"extras",void 0,void 0,!0),new Ef(()=>this._jsonStr,e=>e&&(this._jsonStr=e),"JSON")]}}};f(ft,"context",new Lm),f(ft,"innerRegister",ft.context.register.bind(ft.context)),f(ft,"defaults",{}),f(ft,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})),f(ft,"type",ft.register("ESSceneObject",ft,{chsName:"场景类",tags:["ESObjects"],description:""})),f(ft,"create",ft.context.createSceneObject.bind(ft.context)),f(ft,"createFromClass",ft.context.createSceneObjectFromClass.bind(ft.context)),f(ft,"createFromJson",ft.context.createSceneObjectFromJson.bind(ft.context)),f(ft,"destroySceneObject",ft.context.destroySceneObject.bind(ft.context)),f(ft,"getSceneObjById",ft.context.getSceneObjectById.bind(ft.context)),f(ft,"getSceneObj",ft.context.getSceneObject.bind(ft.context)),f(ft,"getEnv",ft.context.getEnv.bind(ft.context)),f(ft,"setEnv",ft.context.setEnv.bind(ft.context)),f(ft,"getStrFromEnv",ft.context.getStrFromEnv.bind(ft.context)),f(ft,"getSceneObjectById",ft.context.getSceneObjectById.bind(ft.context)),f(ft,"getSceneObject",ft.context.getSceneObject.bind(ft.context));let tt=ft;class Am extends H{constructor(t,e){super(),this.dv(new p.ObjResettingWithEvent(t.subContainerChanged,()=>{if(t.subContainer)return e(t,t.subContainer)}))}}const Es={distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0},Rm={position:[0,0,0],rotation:[0,0,0],flyDuration:1},_r=class _r extends tt{constructor(e){super(e);f(this,"_editing",this.dv(p.react(!1)));f(this,"editingID");f(this,"editingBindMode","singlePoint");f(this,"_deprecated",[]);f(this,"_flyInEvent",this.dv(new V));f(this,"_flyToEvent",this.dv(new V));f(this,"_flyOverEvent",this.disposeVar(new V));f(this,"_pickedEvent",this.dv(new V));f(this,"_calcFlyToParamEvent",this.dv(new V));f(this,"_calcFlyInParamEvent",this.dv(new V));f(this,"useCalcFlyToParamInESObjectWithLocation",!1);Mf(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let r=0;r<e.length;r++){const i=e[r];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(a=>{const u=i[s];typeof u=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(u).forEach(l=>{a===l&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${l} 下版本将会被移除,推荐使用属性值 ${u[l]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,_r._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,_r._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,general:[...e.general,new q([this,"show"],"是否显示",_r.defaults.show),new q([this,"collision"],"开启碰撞",_r.defaults.collision),new q([this,"allowPicking"],"允许拾取",_r.defaults.allowPicking),new st([],()=>this.calcFlyToParam(),[],"保存观察视角","保存当前flyToParam"),new st([],()=>this.emptyFlyToParam(),[],"清空飞向参数","清空飞向参数"),new st([],()=>this.emptyFlyInParam(),[],"清空飞入参数","清空飞入参数"),new st([],()=>this.calcFlyInParam(),[],"保存飞入参数","保存飞入参数flyInParam")],more:[...e.more,new it([],"飞行定位","飞向参数"),new st(["number"],r=>this.flyTo(r),[1],"飞向"),new Q([this,"flyToParam"],"flyToParam",void 0,void 0,!0),new L([this,"flyToDistance"],"flyToDistance",void 0,!0),new L([this,"flyToHeading"],"flyToHeading",void 0,!0),new L([this,"flyToPitch"],"flyToPitch",void 0,!0),new L([this,"flyToFlyDuration"],"flyToFlyDuration",void 0,!0),new L([this,"flyToHDelta"],"flyToHDelta",void 0,!0),new L([this,"flyToPDelta"],"flyToPDelta",void 0,!0),new it([],"飞入参数"),new st(["number"],r=>this.flyIn(r),[1],"飞入"),new Q([this,"flyInParam"],"flyInParam",void 0,void 0,!0)]}}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??Es,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??Es,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??Es,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??Es,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??Es,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??Es,pDelta:e}:void 0}};f(_r,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:p.reactJsonWithUndefined(void 0),flyInParam:p.reactJsonWithUndefined(void 0)})),f(_r,"type",_r.register("ESVisualObject",_r,{chsName:"可视化对象",tags:["ESObjects"],description:"可视化对象"})),f(_r,"supportEditingModes",[]),f(_r,"_lastFlyInId",0),f(_r,"_lastFlyToId",0);let Ft=_r;class Tf extends H{constructor(){super();f(this,"_data",this.dv(p.react(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class Of extends H{constructor(){super(...arguments);f(this,"_dragStartEvent",this.dv(new V));f(this,"_dragOverEvent",this.dv(new V));f(this,"_dragLeaveEvent",this.dv(new V));f(this,"_dropEvent",this.dv(new V))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function Fm(n,t){t&&(Reflect.has(t,"editing")?t.editing=!0:Reflect.has(t,"positionEditing")&&(t.positionEditing=!0))}function km(n){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(n.typeName)||(Reflect.has(n,"editing")?n.editing=!0:Reflect.has(n,"positionEditing")&&(n.positionEditing=!0)),typeof n.execOnCreating=="function"&&n.execOnCreating()}function Su(n,t){p.getExtProp(n,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),p.setExtProp(n,"__treeItem",t)}function Vm(n){return p.getExtProp(n,"__treeItem")}function zm(n){if(!(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")))return n;const t=document.createElement("a");t.href=n;const e=t.href;return t.remove(),e}function Um(n){try{return JSON.parse(n),!0}catch{return!1}}function Gm(n){return n instanceof Function?n():n}function xf(n,t){for(let e of n)if(t.includes(e))return!0;return!1}function gi(n,t){const e=n,r=t;return e===void 0||e.length===0||r===void 0||r.length===0?!0:xf(e,r)}function Wm(n){const t=setTimeout(()=>{n(),clearTimeout(t)})}function co(n){let t=n%360;return t=t<0?360+t:t,t}function Df(n){return co(n+180)-180}function Cu(n,t,e){let r=co(n),i=co(t);Math.abs(r-i)>180&&(r<i?r+=360:i+=360);const s=r*(1-e)+i*e;return Df(s)}function zl(n,t,e,r){return r=r||[0,0,0],r[0]=Cu(n[0],t[0],e),r[1]=Cu(n[1],t[1],e),r[2]=Cu(n[2],t[2],e),r}function Mf(n,t,e="editing"){const r=new H;n.ad(r);const i=t.bind(n);return r.ad(new p.ObjResettingWithEvent(n.activeViewerChanged,()=>{const s=new H;let o=n.activeViewer;return o?(s.ad(n[`${e}Changed`].don(()=>{var a;n[`${e}`]?i():(a=(n.components.main??n).editingID)!=null&&a.includes("inner")&&n.activeViewer&&n.activeViewer.stopEditing()})),s.ad(o.editingEvent.don(a=>{if(a.objectIDs.includes(n.id)&&a.type==="end"){const u=n.components.main??n;u.editingID&&a.editingID.includes(u.editingID)?n[`${e}`]=!1:n[`${e}`]=!u.editingID.includes("outer")}}))):s.ad(n[`${e}Changed`].don(()=>{n[`${e}`]=!1})),s})),n[`${e}`]&&i(),r}class qm extends H{constructor(e,r,i,s){super();f(this,"_sceneObjectId",this.dv(new p.SceneObjectWithId));this._id=e,this._startTimeStamp=r,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const o=()=>{if(!this.player)return;const{currentTime:a=0}=this._parent,u=a-this._startTimeStamp;this.player.currentTime=p.clamp(u,0,this._duration)*(this.player.speed??1)};o(),this.d(this._parent.currentTimeChanged.don(o)),this.d(this.playerChanged.don(o))}get player(){return this._sceneObjectId.sceneObject instanceof gn?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const Xm=`
|
|
24
24
|
用来配置子播放器,它是一个数组形式,数组的每个元素仍然是一个数组,形式是[子播放器的ID, 起始时间, 持续时间]。
|
|
25
25
|
注意时间的单位是毫秒。
|
|
26
26
|
示例如下:
|
|
@@ -38,10 +38,10 @@ ${u.map(c=>`${c.id} ${c.typeName}
|
|
|
38
38
|
]
|
|
39
39
|
]
|
|
40
40
|
\`\`\`
|
|
41
|
-
`,Ve=class Ve extends J{constructor(){super();f(this,"_ratio",this.dv(d.react(0)));f(this,"_subPlayers",this.dv(new d.ObservableArray));const e=this.dv(new d.Player);{const o=()=>{e.loop=this.loop??Ve.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??Ve.defaults.loop)!==e.loop&&(this.loop=e.loop)};o(),this.d(e.loopChangedEvent.don(o))}{const o=()=>{e.currentTime=this.currentTime??Ve.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??Ve.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};o(),this.d(e.currentTimeChangedEvent.don(o))}{const o=()=>{e.duration=this.duration??Ve.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??Ve.defaults.duration)!==e.duration&&(this.duration=e.duration)};o(),this.d(e.durationChangedEvent.don(o))}{const o=()=>{e.speed=this.speed??Ve.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??Ve.defaults.speed)!==e.speed&&(this.speed=e.speed)};o(),this.d(e.speedChangedEvent.don(o))}{const o=()=>{e.playing=this.playing??Ve.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??Ve.defaults.playing)!==e.playing&&(this.playing=e.playing)};o(),this.d(e.playingChangedEvent.don(o))}const r=()=>{const o=this.duration??Ve.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??Ve.defaults.currentTime)/o)};r();const i=this.dv(d.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.d(i.don(r)),this.d(()=>{const{length:o}=this._subPlayers;for(let a=0;a<o;++a)this._subPlayers.get(a).destroy();this._subPlayers.length=0});const s=()=>{for(let a of this._subPlayers)a.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(a=>{const[u,l,c]=a;return new bm(u,l,c,this)});this._subPlayers.splice(0,0,...o)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??Ve.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};f(Ve,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),f(Ve,"channelsReadMe",Nm);let pn=Ve;(n=>{n.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:d.reactDeepArrayWithUndefined(void 0,(t,e)=>t==null?void 0:t.every((r,i)=>r===e[i]),t=>[...t])})})(pn||(pn={})),d.extendClassProps(pn.prototype,pn.createDefaultProps);class Tl extends J{constructor(e){super();f(this,"_sceneObject",this.dv(d.react(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const r=tt.getSceneObjById(this._id);r&&(this._sceneObject.value=r),this.d(tt.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(tt.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class Tm extends J{constructor(e,r){super();f(this,"_sofi");this._id=e,this._sofi=this.dv(new Tl(this._id));{const i=()=>{r.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class Om extends J{constructor(){super();f(this,"_id",this.dv(d.react(void 0)));f(this,"_sceneObject",this.dv(d.react(void 0)));f(this,"_resetting",this.dv(new d.ObjResettingWithEvent(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new Tm(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class Dm extends J{constructor(t,e,r,i){super(),this.disposeVar(new d.ObjResettingWithEvent(t.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");const o=t.sceneObject;if(o&&e){const a=e.split(".");if(a.length===0)i.debug&&console.warn("propNames.length === 0");else{let u=d.pluckProperty(o,!1,...a);(!u||!(u instanceof V))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),u=d.pluckProperty(o,!1,...a),i.debug&&u&&console.warn("event仍然获取不到!")),u?u instanceof V?(s=u,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,s)):i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${e}`):i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${e}`)}}if(s){const a=new J;return a.d(s.dwon(()=>r.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}const bf=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends J{constructor(e,r,i){super();f(this,"_doEvalEvent",this.dv(new V));const s=this._doEvalEvent,o=this.disposeVar(d.createNextAnimateFrameEvent(s)),a=e.map(([u,l])=>{const c=new Tl(u),h=l&&new Dm(c,l,s,r)||void 0;return[c,h]});this.d(()=>{a.forEach(([u,l])=>{l==null||l.destroy(),u.destroy()}),a.length=0}),this.d(s.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=r;if(u==="Immediate"){const c=a.map(([h])=>h.sceneObject);(!l||c.every(h=>h!==void 0))&&i(c)}})),this.d(o.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=r;if(u==="NextAnimateFrame"){const c=a.map(([h])=>h.sceneObject);(!l||c.every(h=>h!==void 0))&&i(c)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:xm}=bf;class Ea extends J{constructor(){super();f(this,"_evalFunc");f(this,"_forceExecute",new V);const e=this.dv(d.react(void 0)),r=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(o){console.error(`evalFunc get error! ${o}`),e.value=void 0}};r(),this.dispose(this.evalFuncStrChanged.disposableOn(r));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),e.value&&e.value(o))},s=this.disposeVar(new d.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new xm(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=s.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(n=>{n.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:d.reactDeepArray([],(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[t[0],t[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(Ea||(Ea={})),d.extendClassProps(Ea.prototype,Ea.createDefaultProps);const Nf=gs("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function qn(n){return Nf.forward(n)}function Tf(n){return Nf.inverse(n)}const Of=gs("+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 Mm(n){const t=Of.forward([n[0],n[1]]);return[t[0],t[1],n[2]]}function Lm(n){const t=Of.inverse([n[0],n[1]]);return[t[0],t[1],n[2]]}function Am(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1])&&n.push(n[0]);const e=ml.point(t),r=ml.polygon([n]);return ml.booleanPointInPolygon(e,r)}var Me=63710088e-1,Df={centimeters:Me*100,centimetres:Me*100,degrees:Me/111325,feet:Me*3.28084,inches:Me*39.37,kilometers:Me/1e3,kilometres:Me/1e3,meters:Me,metres:Me,miles:Me/1609.344,millimeters:Me*1e3,millimetres:Me*1e3,nauticalmiles:Me/1852,radians:1,yards:Me*1.0936};function gn(n,t,e){e===void 0&&(e={});var r={type:"Feature"};return(e.id===0||e.id)&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.properties=t||{},r.geometry=n,r}function Ut(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!xf(n[0])||!xf(n[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:n};return gn(r,t,e)}function $e(n,t,e){e===void 0&&(e={});for(var r=0,i=n;r<i.length;r++){var s=i[r];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:n};return gn(a,t,e)}function mn(n,t,e){if(e===void 0&&(e={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:n};return gn(r,t,e)}function oo(n,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=n,e}function Ol(n,t,e){e===void 0&&(e={});var r={type:"MultiPolygon",coordinates:n};return gn(r,t,e)}function Dl(n,t){t===void 0&&(t="kilometers");var e=Df[t];if(!e)throw new Error(t+" units is invalid");return n*e}function xl(n,t){t===void 0&&(t="kilometers");var e=Df[t];if(!e)throw new Error(t+" units is invalid");return n/e}function vu(n){var t=n%(2*Math.PI);return t*180/Math.PI}function Ge(n){var t=n%360;return t*Math.PI/180}function Ml(n,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("length must be a positive number");return Dl(xl(n,t),e)}function xf(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}function tr(n){if(!n)throw new Error("coord is required");if(!Array.isArray(n)){if(n.type==="Feature"&&n.geometry!==null&&n.geometry.type==="Point")return n.geometry.coordinates;if(n.type==="Point")return n.coordinates}if(Array.isArray(n)&&n.length>=2&&!Array.isArray(n[0])&&!Array.isArray(n[1]))return n;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function ws(n){if(Array.isArray(n))return n;if(n.type==="Feature"){if(n.geometry!==null)return n.geometry.coordinates}else if(n.coordinates)return n.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Mf(n,t,e){if(!n)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!n||n.type!=="Feature"||!n.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!n.geometry||n.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+n.geometry.type)}function Pr(n){return n.type==="Feature"?n.geometry:n}function Rm(n,t){return n.type==="FeatureCollection"?"FeatureCollection":n.type==="GeometryCollection"?"GeometryCollection":n.type==="Feature"&&n.geometry!==null?n.geometry.type:n.type}function Sa(n,t,e){if(e===void 0&&(e={}),e.final===!0)return Fm(n,t);var r=tr(n),i=tr(t),s=Ge(r[0]),o=Ge(i[0]),a=Ge(r[1]),u=Ge(i[1]),l=Math.sin(o-s)*Math.cos(u),c=Math.cos(a)*Math.sin(u)-Math.sin(a)*Math.cos(u)*Math.cos(o-s);return vu(Math.atan2(l,c))}function Fm(n,t){var e=Sa(t,n);return e=(e+180)%360,e}function ao(n,t,e,r){r===void 0&&(r={});var i=tr(n),s=Ge(i[0]),o=Ge(i[1]),a=Ge(e),u=xl(t,r.units),l=Math.asin(Math.sin(o)*Math.cos(u)+Math.cos(o)*Math.sin(u)*Math.cos(a)),c=s+Math.atan2(Math.sin(a)*Math.sin(u)*Math.cos(o),Math.cos(u)-Math.sin(o)*Math.sin(l)),h=vu(c),p=vu(l);return Ut([h,p],r.properties)}function gi(n,t,e){e===void 0&&(e={});var r=tr(n),i=tr(t),s=Ge(i[1]-r[1]),o=Ge(i[0]-r[0]),a=Ge(r[1]),u=Ge(i[1]),l=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(u);return Dl(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),e.units)}function km(n,t,e){e===void 0&&(e={});for(var r=Pr(n),i=r.coordinates,s=0,o=0;o<i.length&&!(t>=s&&o===i.length-1);o++)if(s>=t){var a=t-s;if(a){var u=Sa(i[o],i[o-1])-180,l=ao(i[o],a,u,e);return l}else return Ut(i[o])}else s+=gi(i[o],i[o+1],e);return Ut(i[i.length-1])}function Vm(n,t){const e=mn(n);return km(e,t,{units:"meters"}).geometry.coordinates}function uo(n,t,e){if(n!==null)for(var r,i,s,o,a,u,l,c=0,h=0,p,v=n.type,w=v==="FeatureCollection",I=v==="Feature",P=w?n.features.length:1,O=0;O<P;O++){l=w?n.features[O].geometry:I?n.geometry:n,p=l?l.type==="GeometryCollection":!1,a=p?l.geometries.length:1;for(var m=0;m<a;m++){var _=0,g=0;if(o=p?l.geometries[m]:l,o!==null){u=o.coordinates;var y=o.type;switch(c=e&&(y==="Polygon"||y==="MultiPolygon")?1:0,y){case null:break;case"Point":if(t(u,h,O,_,g)===!1)return!1;h++,_++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(t(u[r],h,O,_,g)===!1)return!1;h++,y==="MultiPoint"&&_++}y==="LineString"&&_++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-c;i++){if(t(u[r][i],h,O,_,g)===!1)return!1;h++}y==="MultiLineString"&&_++,y==="Polygon"&&g++}y==="Polygon"&&_++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(g=0,i=0;i<u[r].length;i++){for(s=0;s<u[r][i].length-c;s++){if(t(u[r][i][s],h,O,_,g)===!1)return!1;h++}g++}_++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(uo(o.geometries[r],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function yu(n,t){if(n.type==="Feature")t(n,0);else if(n.type==="FeatureCollection")for(var e=0;e<n.features.length&&t(n.features[e],e)!==!1;e++);}function _u(n,t){var e,r,i,s,o,a,u,l,c,h,p=0,v=n.type==="FeatureCollection",w=n.type==="Feature",I=v?n.features.length:1;for(e=0;e<I;e++){for(a=v?n.features[e].geometry:w?n.geometry:n,l=v?n.features[e].properties:w?n.properties:{},c=v?n.features[e].bbox:w?n.bbox:void 0,h=v?n.features[e].id:w?n.id:void 0,u=a?a.type==="GeometryCollection":!1,o=u?a.geometries.length:1,i=0;i<o;i++){if(s=u?a.geometries[i]:a,s===null){if(t(null,p,l,c,h)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,p,l,c,h)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<s.geometries.length;r++)if(t(s.geometries[r],p,l,c,h)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}p++}}function zm(n,t,e){var r=e;return _u(n,function(i,s,o,a,u){r=t(r,i,s,o,a,u)}),r}function Ll(n,t){_u(n,function(e,r,i,s,o){var a=e===null?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return t(gn(e,i,{bbox:s,id:o}),r,0)===!1?!1:void 0}var u;switch(a){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var l=0;l<e.coordinates.length;l++){var c=e.coordinates[l],h={type:u,coordinates:c};if(t(gn(h,i),r,l)===!1)return!1}})}function Um(n,t){Ll(n,function(e,r,i){var s=0;if(e.geometry){var o=e.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,u=0,l=0,c=0;if(uo(e,function(h,p,v,w,I){if(a===void 0||r>u||w>l||I>c){a=h,u=r,l=w,c=I,s=0;return}var P=mn([a,h],e.properties);if(t(P,r,i,I,s)===!1)return!1;s++,a=h})===!1)return!1}}})}var Lf=6378137;function Gm(n){return zm(n,function(t,e){return t+Wm(e)},0)}function Wm(n){var t=0,e;switch(n.type){case"Polygon":return Af(n.coordinates);case"MultiPolygon":for(e=0;e<n.coordinates.length;e++)t+=Af(n.coordinates[e]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Af(n){var t=0;if(n&&n.length>0){t+=Math.abs(Rf(n[0]));for(var e=1;e<n.length;e++)t-=Math.abs(Rf(n[e]))}return t}function Rf(n){var t,e,r,i,s,o,a,u=0,l=n.length;if(l>2){for(a=0;a<l;a++)a===l-2?(i=l-2,s=l-1,o=0):a===l-1?(i=l-1,s=0,o=1):(i=a,s=a+1,o=a+2),t=n[i],e=n[s],r=n[o],u+=(Al(r[0])-Al(t[0]))*Math.sin(Al(e[1]));u=u*Lf*Lf/2}return u}function Al(n){return n*Math.PI/180}function Rl(n){if((n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),n.length<=3)return 0;const t=$e([n]);return Gm(t)}function Ff(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function qm(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var wu={exports:{}},Eu={exports:{}},Xm=Eu.exports,kf;function Vf(){return kf||(kf=1,function(n,t){(function(e,r){n.exports=r()})(Xm,function(){function e(m,_,g,y,E){(function C(b,T,M,N,D){for(;N>M;){if(N-M>600){var A=N-M+1,F=T-M+1,Y=Math.log(A),G=.5*Math.exp(2*Y/3),K=.5*Math.sqrt(Y*G*(A-G)/A)*(F-A/2<0?-1:1),at=Math.max(M,Math.floor(T-F*G/A+K)),ht=Math.min(N,Math.floor(T+(A-F)*G/A+K));C(b,T,at,ht,D)}var X=b[T],H=M,B=N;for(r(b,M,T),D(b[N],X)>0&&r(b,M,N);H<B;){for(r(b,H,B),H++,B--;D(b[H],X)<0;)H++;for(;D(b[B],X)>0;)B--}D(b[M],X)===0?r(b,M,B):r(b,++B,N),B<=T&&(M=B+1),T<=B&&(N=B-1)}})(m,_,g||0,y||m.length-1,E||i)}function r(m,_,g){var y=m[_];m[_]=m[g],m[g]=y}function i(m,_){return m<_?-1:m>_?1:0}var s=function(m){m===void 0&&(m=9),this._maxEntries=Math.max(4,m),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(m,_,g){if(!g)return _.indexOf(m);for(var y=0;y<_.length;y++)if(g(m,_[y]))return y;return-1}function a(m,_){u(m,0,m.children.length,_,m)}function u(m,_,g,y,E){E||(E=P(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var C=_;C<g;C++){var b=m.children[C];l(E,m.leaf?y(b):b)}return E}function l(m,_){return m.minX=Math.min(m.minX,_.minX),m.minY=Math.min(m.minY,_.minY),m.maxX=Math.max(m.maxX,_.maxX),m.maxY=Math.max(m.maxY,_.maxY),m}function c(m,_){return m.minX-_.minX}function h(m,_){return m.minY-_.minY}function p(m){return(m.maxX-m.minX)*(m.maxY-m.minY)}function v(m){return m.maxX-m.minX+(m.maxY-m.minY)}function w(m,_){return m.minX<=_.minX&&m.minY<=_.minY&&_.maxX<=m.maxX&&_.maxY<=m.maxY}function I(m,_){return _.minX<=m.maxX&&_.minY<=m.maxY&&_.maxX>=m.minX&&_.maxY>=m.minY}function P(m){return{children:m,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function O(m,_,g,y,E){for(var C=[_,g];C.length;)if(!((g=C.pop())-(_=C.pop())<=y)){var b=_+Math.ceil((g-_)/y/2)*y;e(m,b,_,g,E),C.push(_,b,b,g)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(m){var _=this.data,g=[];if(!I(m,_))return g;for(var y=this.toBBox,E=[];_;){for(var C=0;C<_.children.length;C++){var b=_.children[C],T=_.leaf?y(b):b;I(m,T)&&(_.leaf?g.push(b):w(m,T)?this._all(b,g):E.push(b))}_=E.pop()}return g},s.prototype.collides=function(m){var _=this.data;if(!I(m,_))return!1;for(var g=[];_;){for(var y=0;y<_.children.length;y++){var E=_.children[y],C=_.leaf?this.toBBox(E):E;if(I(m,C)){if(_.leaf||w(m,C))return!0;g.push(E)}}_=g.pop()}return!1},s.prototype.load=function(m){if(!m||!m.length)return this;if(m.length<this._minEntries){for(var _=0;_<m.length;_++)this.insert(m[_]);return this}var g=this._build(m.slice(),0,m.length-1,0);if(this.data.children.length)if(this.data.height===g.height)this._splitRoot(this.data,g);else{if(this.data.height<g.height){var y=this.data;this.data=g,g=y}this._insert(g,this.data.height-g.height-1,!0)}else this.data=g;return this},s.prototype.insert=function(m){return m&&this._insert(m,this.data.height-1),this},s.prototype.clear=function(){return this.data=P([]),this},s.prototype.remove=function(m,_){if(!m)return this;for(var g,y,E,C=this.data,b=this.toBBox(m),T=[],M=[];C||T.length;){if(C||(C=T.pop(),y=T[T.length-1],g=M.pop(),E=!0),C.leaf){var N=o(m,C.children,_);if(N!==-1)return C.children.splice(N,1),T.push(C),this._condense(T),this}E||C.leaf||!w(C,b)?y?(g++,C=y.children[g],E=!1):C=null:(T.push(C),M.push(g),g=0,y=C,C=C.children[0])}return this},s.prototype.toBBox=function(m){return m},s.prototype.compareMinX=function(m,_){return m.minX-_.minX},s.prototype.compareMinY=function(m,_){return m.minY-_.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(m){return this.data=m,this},s.prototype._all=function(m,_){for(var g=[];m;)m.leaf?_.push.apply(_,m.children):g.push.apply(g,m.children),m=g.pop();return _},s.prototype._build=function(m,_,g,y){var E,C=g-_+1,b=this._maxEntries;if(C<=b)return a(E=P(m.slice(_,g+1)),this.toBBox),E;y||(y=Math.ceil(Math.log(C)/Math.log(b)),b=Math.ceil(C/Math.pow(b,y-1))),(E=P([])).leaf=!1,E.height=y;var T=Math.ceil(C/b),M=T*Math.ceil(Math.sqrt(b));O(m,_,g,M,this.compareMinX);for(var N=_;N<=g;N+=M){var D=Math.min(N+M-1,g);O(m,N,D,T,this.compareMinY);for(var A=N;A<=D;A+=T){var F=Math.min(A+T-1,D);E.children.push(this._build(m,A,F,y-1))}}return a(E,this.toBBox),E},s.prototype._chooseSubtree=function(m,_,g,y){for(;y.push(_),!_.leaf&&y.length-1!==g;){for(var E=1/0,C=1/0,b=void 0,T=0;T<_.children.length;T++){var M=_.children[T],N=p(M),D=(A=m,F=M,(Math.max(F.maxX,A.maxX)-Math.min(F.minX,A.minX))*(Math.max(F.maxY,A.maxY)-Math.min(F.minY,A.minY))-N);D<C?(C=D,E=N<E?N:E,b=M):D===C&&N<E&&(E=N,b=M)}_=b||_.children[0]}var A,F;return _},s.prototype._insert=function(m,_,g){var y=g?m:this.toBBox(m),E=[],C=this._chooseSubtree(y,this.data,_,E);for(C.children.push(m),l(C,y);_>=0&&E[_].children.length>this._maxEntries;)this._split(E,_),_--;this._adjustParentBBoxes(y,E,_)},s.prototype._split=function(m,_){var g=m[_],y=g.children.length,E=this._minEntries;this._chooseSplitAxis(g,E,y);var C=this._chooseSplitIndex(g,E,y),b=P(g.children.splice(C,g.children.length-C));b.height=g.height,b.leaf=g.leaf,a(g,this.toBBox),a(b,this.toBBox),_?m[_-1].children.push(b):this._splitRoot(g,b)},s.prototype._splitRoot=function(m,_){this.data=P([m,_]),this.data.height=m.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(m,_,g){for(var y,E,C,b,T,M,N,D=1/0,A=1/0,F=_;F<=g-_;F++){var Y=u(m,0,F,this.toBBox),G=u(m,F,g,this.toBBox),K=(E=Y,C=G,b=void 0,T=void 0,M=void 0,N=void 0,b=Math.max(E.minX,C.minX),T=Math.max(E.minY,C.minY),M=Math.min(E.maxX,C.maxX),N=Math.min(E.maxY,C.maxY),Math.max(0,M-b)*Math.max(0,N-T)),at=p(Y)+p(G);K<D?(D=K,y=F,A=at<A?at:A):K===D&&at<A&&(A=at,y=F)}return y||g-_},s.prototype._chooseSplitAxis=function(m,_,g){var y=m.leaf?this.compareMinX:c,E=m.leaf?this.compareMinY:h;this._allDistMargin(m,_,g,y)<this._allDistMargin(m,_,g,E)&&m.children.sort(y)},s.prototype._allDistMargin=function(m,_,g,y){m.children.sort(y);for(var E=this.toBBox,C=u(m,0,_,E),b=u(m,g-_,g,E),T=v(C)+v(b),M=_;M<g-_;M++){var N=m.children[M];l(C,m.leaf?E(N):N),T+=v(C)}for(var D=g-_-1;D>=_;D--){var A=m.children[D];l(b,m.leaf?E(A):A),T+=v(b)}return T},s.prototype._adjustParentBBoxes=function(m,_,g){for(var y=g;y>=0;y--)l(_[y],m)},s.prototype._condense=function(m){for(var _=m.length-1,g=void 0;_>=0;_--)m[_].children.length===0?_>0?(g=m[_-1].children).splice(g.indexOf(m[_]),1):this.clear():a(m[_],this.toBBox)},s})}(Eu)),Eu.exports}class Ym{constructor(t=[],e=Hm){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:r}=this,i=e[t];for(;t>0;){const s=t-1>>1,o=e[s];if(r(i,o)>=0)break;e[t]=o,t=s}e[t]=i}_down(t){const{data:e,compare:r}=this,i=this.length>>1,s=e[t];for(;t<i;){let o=(t<<1)+1,a=e[o];const u=o+1;if(u<this.length&&r(e[u],a)<0&&(o=u,a=e[u]),r(a,s)>=0)break;e[t]=a,t=o}e[t]=s}}function Hm(n,t){return n<t?-1:n>t?1:0}const Jm=qm(Object.freeze(Object.defineProperty({__proto__:null,default:Ym},Symbol.toStringTag,{value:"Module"})));var Ca={exports:{}},Fl,zf;function Bm(){return zf||(zf=1,Fl=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=(i-r)/2,l=0,c=u-1;l<u;c=l++){var h=e[r+l*2+0],p=e[r+l*2+1],v=e[r+c*2+0],w=e[r+c*2+1],I=p>o!=w>o&&s<(v-h)*(o-p)/(w-p)+h;I&&(a=!a)}return a}),Fl}var kl,Uf;function jm(){return Uf||(Uf=1,kl=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=i-r,l=0,c=u-1;l<u;c=l++){var h=e[l+r][0],p=e[l+r][1],v=e[c+r][0],w=e[c+r][1],I=p>o!=w>o&&s<(v-h)*(o-p)/(w-p)+h;I&&(a=!a)}return a}),kl}var Gf;function Zm(){if(Gf)return Ca.exports;Gf=1;var n=Bm(),t=jm();return Ca.exports=function(r,i,s,o){return i.length>0&&Array.isArray(i[0])?t(r,i,s,o):n(r,i,s,o)},Ca.exports.nested=t,Ca.exports.flat=n,Ca.exports}var Ia={exports:{}},Km=Ia.exports,Wf;function Qm(){return Wf||(Wf=1,function(n,t){(function(e,r){r(t)})(Km,function(e){const i=33306690738754706e-32;function s(I,P,O,m,_){let g,y,E,C,b=P[0],T=m[0],M=0,N=0;T>b==T>-b?(g=b,b=P[++M]):(g=T,T=m[++N]);let D=0;if(M<I&&N<O)for(T>b==T>-b?(E=g-((y=b+g)-b),b=P[++M]):(E=g-((y=T+g)-T),T=m[++N]),g=y,E!==0&&(_[D++]=E);M<I&&N<O;)T>b==T>-b?(E=g-((y=g+b)-(C=y-g))+(b-C),b=P[++M]):(E=g-((y=g+T)-(C=y-g))+(T-C),T=m[++N]),g=y,E!==0&&(_[D++]=E);for(;M<I;)E=g-((y=g+b)-(C=y-g))+(b-C),b=P[++M],g=y,E!==0&&(_[D++]=E);for(;N<O;)E=g-((y=g+T)-(C=y-g))+(T-C),T=m[++N],g=y,E!==0&&(_[D++]=E);return g===0&&D!==0||(_[D++]=g),D}function o(I){return new Float64Array(I)}const a=33306690738754716e-32,u=22204460492503146e-32,l=11093356479670487e-47,c=o(4),h=o(8),p=o(12),v=o(16),w=o(4);e.orient2d=function(I,P,O,m,_,g){const y=(P-g)*(O-_),E=(I-_)*(m-g),C=y-E;if(y===0||E===0||y>0!=E>0)return C;const b=Math.abs(y+E);return Math.abs(C)>=a*b?C:-function(T,M,N,D,A,F,Y){let G,K,at,ht,X,H,B,gt,Dt,St,Ct,Rt,ue,ie,wr,Er,di,Sr;const Cr=T-A,Ir=N-A,Gn=M-F,Wn=D-F;X=(wr=(gt=Cr-(B=(H=134217729*Cr)-(H-Cr)))*(St=Wn-(Dt=(H=134217729*Wn)-(H-Wn)))-((ie=Cr*Wn)-B*Dt-gt*Dt-B*St))-(Ct=wr-(di=(gt=Gn-(B=(H=134217729*Gn)-(H-Gn)))*(St=Ir-(Dt=(H=134217729*Ir)-(H-Ir)))-((Er=Gn*Ir)-B*Dt-gt*Dt-B*St))),c[0]=wr-(Ct+X)+(X-di),X=(ue=ie-((Rt=ie+Ct)-(X=Rt-ie))+(Ct-X))-(Ct=ue-Er),c[1]=ue-(Ct+X)+(X-Er),X=(Sr=Rt+Ct)-Rt,c[2]=Rt-(Sr-X)+(Ct-X),c[3]=Sr;let ps=function(C0,_g){let wg=_g[0];for(let Qh=1;Qh<C0;Qh++)wg+=_g[Qh];return wg}(4,c),fu=u*Y;if(ps>=fu||-ps>=fu||(G=T-(Cr+(X=T-Cr))+(X-A),at=N-(Ir+(X=N-Ir))+(X-A),K=M-(Gn+(X=M-Gn))+(X-F),ht=D-(Wn+(X=D-Wn))+(X-F),G===0&&K===0&&at===0&&ht===0)||(fu=l*Y+i*Math.abs(ps),(ps+=Cr*ht+Wn*G-(Gn*at+Ir*K))>=fu||-ps>=fu))return ps;X=(wr=(gt=G-(B=(H=134217729*G)-(H-G)))*(St=Wn-(Dt=(H=134217729*Wn)-(H-Wn)))-((ie=G*Wn)-B*Dt-gt*Dt-B*St))-(Ct=wr-(di=(gt=K-(B=(H=134217729*K)-(H-K)))*(St=Ir-(Dt=(H=134217729*Ir)-(H-Ir)))-((Er=K*Ir)-B*Dt-gt*Dt-B*St))),w[0]=wr-(Ct+X)+(X-di),X=(ue=ie-((Rt=ie+Ct)-(X=Rt-ie))+(Ct-X))-(Ct=ue-Er),w[1]=ue-(Ct+X)+(X-Er),X=(Sr=Rt+Ct)-Rt,w[2]=Rt-(Sr-X)+(Ct-X),w[3]=Sr;const w0=s(4,c,4,w,h);X=(wr=(gt=Cr-(B=(H=134217729*Cr)-(H-Cr)))*(St=ht-(Dt=(H=134217729*ht)-(H-ht)))-((ie=Cr*ht)-B*Dt-gt*Dt-B*St))-(Ct=wr-(di=(gt=Gn-(B=(H=134217729*Gn)-(H-Gn)))*(St=at-(Dt=(H=134217729*at)-(H-at)))-((Er=Gn*at)-B*Dt-gt*Dt-B*St))),w[0]=wr-(Ct+X)+(X-di),X=(ue=ie-((Rt=ie+Ct)-(X=Rt-ie))+(Ct-X))-(Ct=ue-Er),w[1]=ue-(Ct+X)+(X-Er),X=(Sr=Rt+Ct)-Rt,w[2]=Rt-(Sr-X)+(Ct-X),w[3]=Sr;const E0=s(w0,h,4,w,p);X=(wr=(gt=G-(B=(H=134217729*G)-(H-G)))*(St=ht-(Dt=(H=134217729*ht)-(H-ht)))-((ie=G*ht)-B*Dt-gt*Dt-B*St))-(Ct=wr-(di=(gt=K-(B=(H=134217729*K)-(H-K)))*(St=at-(Dt=(H=134217729*at)-(H-at)))-((Er=K*at)-B*Dt-gt*Dt-B*St))),w[0]=wr-(Ct+X)+(X-di),X=(ue=ie-((Rt=ie+Ct)-(X=Rt-ie))+(Ct-X))-(Ct=ue-Er),w[1]=ue-(Ct+X)+(X-Er),X=(Sr=Rt+Ct)-Rt,w[2]=Rt-(Sr-X)+(Ct-X),w[3]=Sr;const S0=s(E0,p,4,w,v);return v[S0-1]}(I,P,O,m,_,g,b)},e.orient2dfast=function(I,P,O,m,_,g){return(P-g)*(O-_)-(I-_)*(m-g)},Object.defineProperty(e,"__esModule",{value:!0})})}(Ia,Ia.exports)),Ia.exports}var qf;function $m(){if(qf)return wu.exports;qf=1;var n=Vf(),t=Jm,e=Zm(),r=Qm().orient2d;t.default&&(t=t.default),wu.exports=i,wu.exports.default=i;function i(g,y,E){y=Math.max(0,y===void 0?2:y),E=E||0;var C=v(g),b=new n(16);b.toBBox=function(B){return{minX:B[0],minY:B[1],maxX:B[0],maxY:B[1]}},b.compareMinX=function(B,gt){return B[0]-gt[0]},b.compareMinY=function(B,gt){return B[1]-gt[1]},b.load(g);for(var T=[],M=0,N;M<C.length;M++){var D=C[M];b.remove(D),N=w(D,N),T.push(N)}var A=new n(16);for(M=0;M<T.length;M++)A.insert(p(T[M]));for(var F=y*y,Y=E*E;T.length;){var G=T.shift(),K=G.p,at=G.next.p,ht=I(K,at);if(!(ht<Y)){var X=ht/F;D=s(b,G.prev.p,K,at,G.next.next.p,X,A),D&&Math.min(I(D,K),I(D,at))<=X&&(T.push(G),T.push(w(D,G)),b.remove(D),A.remove(G),A.insert(p(G)),A.insert(p(G.next)))}}G=N;var H=[];do H.push(G.p),G=G.next;while(G!==N);return H.push(G.p),H}function s(g,y,E,C,b,T,M){for(var N=new t([],o),D=g.data;D;){for(var A=0;A<D.children.length;A++){var F=D.children[A],Y=D.leaf?P(F,E,C):a(E,C,F);Y>T||N.push({node:F,dist:Y})}for(;N.length&&!N.peek().node.children;){var G=N.pop(),K=G.node,at=P(K,y,E),ht=P(K,C,b);if(G.dist<at&&G.dist<ht&&l(E,K,M)&&l(C,K,M))return K}D=N.pop(),D&&(D=D.node)}return null}function o(g,y){return g.dist-y.dist}function a(g,y,E){if(u(g,E)||u(y,E))return 0;var C=O(g[0],g[1],y[0],y[1],E.minX,E.minY,E.maxX,E.minY);if(C===0)return 0;var b=O(g[0],g[1],y[0],y[1],E.minX,E.minY,E.minX,E.maxY);if(b===0)return 0;var T=O(g[0],g[1],y[0],y[1],E.maxX,E.minY,E.maxX,E.maxY);if(T===0)return 0;var M=O(g[0],g[1],y[0],y[1],E.minX,E.maxY,E.maxX,E.maxY);return M===0?0:Math.min(C,b,T,M)}function u(g,y){return g[0]>=y.minX&&g[0]<=y.maxX&&g[1]>=y.minY&&g[1]<=y.maxY}function l(g,y,E){for(var C=Math.min(g[0],y[0]),b=Math.min(g[1],y[1]),T=Math.max(g[0],y[0]),M=Math.max(g[1],y[1]),N=E.search({minX:C,minY:b,maxX:T,maxY:M}),D=0;D<N.length;D++)if(h(N[D].p,N[D].next.p,g,y))return!1;return!0}function c(g,y,E){return r(g[0],g[1],y[0],y[1],E[0],E[1])}function h(g,y,E,C){return g!==C&&y!==E&&c(g,y,E)>0!=c(g,y,C)>0&&c(E,C,g)>0!=c(E,C,y)>0}function p(g){var y=g.p,E=g.next.p;return g.minX=Math.min(y[0],E[0]),g.minY=Math.min(y[1],E[1]),g.maxX=Math.max(y[0],E[0]),g.maxY=Math.max(y[1],E[1]),g}function v(g){for(var y=g[0],E=g[0],C=g[0],b=g[0],T=0;T<g.length;T++){var M=g[T];M[0]<y[0]&&(y=M),M[0]>C[0]&&(C=M),M[1]<E[1]&&(E=M),M[1]>b[1]&&(b=M)}var N=[y,E,C,b],D=N.slice();for(T=0;T<g.length;T++)e(g[T],N)||D.push(g[T]);return _(D)}function w(g,y){var E={p:g,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return y?(E.next=y.next,E.prev=y,y.next.prev=E,y.next=E):(E.prev=E,E.next=E),E}function I(g,y){var E=g[0]-y[0],C=g[1]-y[1];return E*E+C*C}function P(g,y,E){var C=y[0],b=y[1],T=E[0]-C,M=E[1]-b;if(T!==0||M!==0){var N=((g[0]-C)*T+(g[1]-b)*M)/(T*T+M*M);N>1?(C=E[0],b=E[1]):N>0&&(C+=T*N,b+=M*N)}return T=g[0]-C,M=g[1]-b,T*T+M*M}function O(g,y,E,C,b,T,M,N){var D=E-g,A=C-y,F=M-b,Y=N-T,G=g-b,K=y-T,at=D*D+A*A,ht=D*F+A*Y,X=F*F+Y*Y,H=D*G+A*K,B=F*G+Y*K,gt=at*X-ht*ht,Dt,St,Ct,Rt,ue=gt,ie=gt;gt===0?(St=0,ue=1,Rt=B,ie=X):(St=ht*B-X*H,Rt=at*B-ht*H,St<0?(St=0,Rt=B,ie=X):St>ue&&(St=ue,Rt=B+ht,ie=X)),Rt<0?(Rt=0,-H<0?St=0:-H>at?St=ue:(St=-H,ue=at)):Rt>ie&&(Rt=ie,-H+ht<0?St=0:-H+ht>at?St=ue:(St=-H+ht,ue=at)),Dt=St===0?0:St/ue,Ct=Rt===0?0:Rt/ie;var wr=(1-Dt)*g+Dt*E,Er=(1-Dt)*y+Dt*C,di=(1-Ct)*b+Ct*M,Sr=(1-Ct)*T+Ct*N,Cr=di-wr,Ir=Sr-Er;return Cr*Cr+Ir*Ir}function m(g,y){return g[0]===y[0]?g[1]-y[1]:g[0]-y[0]}function _(g){g.sort(m);for(var y=[],E=0;E<g.length;E++){for(;y.length>=2&&c(y[y.length-2],y[y.length-1],g[E])<=0;)y.pop();y.push(g[E])}for(var C=[],b=g.length-1;b>=0;b--){for(;C.length>=2&&c(C[C.length-2],C[C.length-1],g[b])<=0;)C.pop();C.push(g[b])}return C.pop(),y.pop(),y.concat(C)}return wu.exports}var tv=$m();const ev=Ff(tv);function rv(n,t){t===void 0&&(t={}),t.concavity=t.concavity||1/0;var e=[];if(uo(n,function(i){e.push([i[0],i[1]])}),!e.length)return null;var r=ev(e,t.concavity);return r.length>3?$e([r]):null}function Xf(n,t){t===void 0&&(t={});var e=0,r=0,i=0;return uo(n,function(s){e+=s[0],r+=s[1],i++},!0),Ut([e/i,r/i],t.properties)}function Yf(n,t){switch(t===void 0&&(t={}),Rm(n)){case"Point":return Ut(tr(n),t.properties);case"Polygon":var e=[];uo(n,function(g){e.push(g)});var r=Xf(n,{properties:t.properties}),i=r.geometry.coordinates,s=0,o=0,a=0,u,l,c,h,p,v,w,I,P=e.map(function(g){return[g[0]-i[0],g[1]-i[1]]});for(u=0;u<e.length-1;u++)l=P[u],h=l[0],v=l[1],c=P[u+1],p=c[0],w=c[1],I=h*w-p*v,a+=I,s+=(h+p)*I,o+=(v+w)*I;if(a===0)return r;var O=a*.5,m=1/(6*O);return Ut([i[0]+m*s,i[1]+m*o],t.properties);default:var _=rv(n);return _?Yf(_,{properties:t.properties}):Xf(n,{properties:t.properties})}}function nv(n){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]);const t=$e([n]),r=Yf(t).geometry.coordinates;return[r[0],r[1],r[2]??n[0][2]??0]}function Hf(n,t,e,r){const[i,s,o]=n,a=ao(Ut([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function Su(n,t){return gi(Ut(n),Ut(t),{units:"meters"})}function Pa(n,t){return Sa(Ut(n),Ut(t))}function Jf(n){if(!n)throw new Error("geojson is required");var t=[];return Ll(n,function(e){iv(e,t)}),oo(t)}function iv(n,t){var e=[],r=n.geometry;if(r!==null){switch(r.type){case"Polygon":e=ws(r);break;case"LineString":e=[ws(r)]}e.forEach(function(i){var s=sv(i,n.properties);s.forEach(function(o){o.id=t.length,t.push(o)})})}}function sv(n,t){var e=[];return n.reduce(function(r,i){var s=mn([r,i],t);return s.bbox=ov(r,i),e.push(s),i}),e}function ov(n,t){var e=n[0],r=n[1],i=t[0],s=t[1],o=e<i?e:i,a=r<s?r:s,u=e>i?e:i,l=r>s?r:s;return[o,a,u,l]}var Cu={exports:{}},Vl={},Bf;function jf(){return Bf||(Bf=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.earthRadius=63710088e-1,n.factors={centimeters:n.earthRadius*100,centimetres:n.earthRadius*100,degrees:n.earthRadius/111325,feet:n.earthRadius*3.28084,inches:n.earthRadius*39.37,kilometers:n.earthRadius/1e3,kilometres:n.earthRadius/1e3,meters:n.earthRadius,metres:n.earthRadius,miles:n.earthRadius/1609.344,millimeters:n.earthRadius*1e3,millimetres:n.earthRadius*1e3,nauticalmiles:n.earthRadius/1852,radians:1,yards:n.earthRadius*1.0936},n.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/n.earthRadius,yards:1.0936133},n.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function t(N,D,A){A===void 0&&(A={});var F={type:"Feature"};return(A.id===0||A.id)&&(F.id=A.id),A.bbox&&(F.bbox=A.bbox),F.properties=D||{},F.geometry=N,F}n.feature=t;function e(N,D,A){switch(N){case"Point":return r(D).geometry;case"LineString":return a(D).geometry;case"Polygon":return s(D).geometry;case"MultiPoint":return h(D).geometry;case"MultiLineString":return c(D).geometry;case"MultiPolygon":return p(D).geometry;default:throw new Error(N+" is invalid")}}n.geometry=e;function r(N,D,A){if(A===void 0&&(A={}),!N)throw new Error("coordinates is required");if(!Array.isArray(N))throw new Error("coordinates must be an Array");if(N.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!C(N[0])||!C(N[1]))throw new Error("coordinates must contain numbers");var F={type:"Point",coordinates:N};return t(F,D,A)}n.point=r;function i(N,D,A){return A===void 0&&(A={}),l(N.map(function(F){return r(F,D)}),A)}n.points=i;function s(N,D,A){A===void 0&&(A={});for(var F=0,Y=N;F<Y.length;F++){var G=Y[F];if(G.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var K=0;K<G[G.length-1].length;K++)if(G[G.length-1][K]!==G[0][K])throw new Error("First and last Position are not equivalent.")}var at={type:"Polygon",coordinates:N};return t(at,D,A)}n.polygon=s;function o(N,D,A){return A===void 0&&(A={}),l(N.map(function(F){return s(F,D)}),A)}n.polygons=o;function a(N,D,A){if(A===void 0&&(A={}),N.length<2)throw new Error("coordinates must be an array of two or more positions");var F={type:"LineString",coordinates:N};return t(F,D,A)}n.lineString=a;function u(N,D,A){return A===void 0&&(A={}),l(N.map(function(F){return a(F,D)}),A)}n.lineStrings=u;function l(N,D){D===void 0&&(D={});var A={type:"FeatureCollection"};return D.id&&(A.id=D.id),D.bbox&&(A.bbox=D.bbox),A.features=N,A}n.featureCollection=l;function c(N,D,A){A===void 0&&(A={});var F={type:"MultiLineString",coordinates:N};return t(F,D,A)}n.multiLineString=c;function h(N,D,A){A===void 0&&(A={});var F={type:"MultiPoint",coordinates:N};return t(F,D,A)}n.multiPoint=h;function p(N,D,A){A===void 0&&(A={});var F={type:"MultiPolygon",coordinates:N};return t(F,D,A)}n.multiPolygon=p;function v(N,D,A){A===void 0&&(A={});var F={type:"GeometryCollection",geometries:N};return t(F,D,A)}n.geometryCollection=v;function w(N,D){if(D===void 0&&(D=0),D&&!(D>=0))throw new Error("precision must be a positive number");var A=Math.pow(10,D||0);return Math.round(N*A)/A}n.round=w;function I(N,D){D===void 0&&(D="kilometers");var A=n.factors[D];if(!A)throw new Error(D+" units is invalid");return N*A}n.radiansToLength=I;function P(N,D){D===void 0&&(D="kilometers");var A=n.factors[D];if(!A)throw new Error(D+" units is invalid");return N/A}n.lengthToRadians=P;function O(N,D){return _(P(N,D))}n.lengthToDegrees=O;function m(N){var D=N%360;return D<0&&(D+=360),D}n.bearingToAzimuth=m;function _(N){var D=N%(2*Math.PI);return D*180/Math.PI}n.radiansToDegrees=_;function g(N){var D=N%360;return D*Math.PI/180}n.degreesToRadians=g;function y(N,D,A){if(D===void 0&&(D="kilometers"),A===void 0&&(A="kilometers"),!(N>=0))throw new Error("length must be a positive number");return I(P(N,D),A)}n.convertLength=y;function E(N,D,A){if(D===void 0&&(D="meters"),A===void 0&&(A="kilometers"),!(N>=0))throw new Error("area must be a positive number");var F=n.areaFactors[D];if(!F)throw new Error("invalid original units");var Y=n.areaFactors[A];if(!Y)throw new Error("invalid final units");return N/F*Y}n.convertArea=E;function C(N){return!isNaN(N)&&N!==null&&!Array.isArray(N)}n.isNumber=C;function b(N){return!!N&&N.constructor===Object}n.isObject=b;function T(N){if(!N)throw new Error("bbox is required");if(!Array.isArray(N))throw new Error("bbox must be an Array");if(N.length!==4&&N.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");N.forEach(function(D){if(!C(D))throw new Error("bbox must only contain numbers")})}n.validateBBox=T;function M(N){if(!N)throw new Error("id is required");if(["string","number"].indexOf(typeof N)===-1)throw new Error("id must be a number or a string")}n.validateId=M}(Vl)),Vl}var le={},Zf;function Kf(){if(Zf)return le;Zf=1,Object.defineProperty(le,"__esModule",{value:!0});var n=jf();function t(m,_,g){if(m!==null)for(var y,E,C,b,T,M,N,D=0,A=0,F,Y=m.type,G=Y==="FeatureCollection",K=Y==="Feature",at=G?m.features.length:1,ht=0;ht<at;ht++){N=G?m.features[ht].geometry:K?m.geometry:m,F=N?N.type==="GeometryCollection":!1,T=F?N.geometries.length:1;for(var X=0;X<T;X++){var H=0,B=0;if(b=F?N.geometries[X]:N,b!==null){M=b.coordinates;var gt=b.type;switch(D=g&&(gt==="Polygon"||gt==="MultiPolygon")?1:0,gt){case null:break;case"Point":if(_(M,A,ht,H,B)===!1)return!1;A++,H++;break;case"LineString":case"MultiPoint":for(y=0;y<M.length;y++){if(_(M[y],A,ht,H,B)===!1)return!1;A++,gt==="MultiPoint"&&H++}gt==="LineString"&&H++;break;case"Polygon":case"MultiLineString":for(y=0;y<M.length;y++){for(E=0;E<M[y].length-D;E++){if(_(M[y][E],A,ht,H,B)===!1)return!1;A++}gt==="MultiLineString"&&H++,gt==="Polygon"&&B++}gt==="Polygon"&&H++;break;case"MultiPolygon":for(y=0;y<M.length;y++){for(B=0,E=0;E<M[y].length;E++){for(C=0;C<M[y][E].length-D;C++){if(_(M[y][E][C],A,ht,H,B)===!1)return!1;A++}B++}H++}break;case"GeometryCollection":for(y=0;y<b.geometries.length;y++)if(t(b.geometries[y],_,g)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function e(m,_,g,y){var E=g;return t(m,function(C,b,T,M,N){b===0&&g===void 0?E=C:E=_(E,C,b,T,M,N)},y),E}function r(m,_){var g;switch(m.type){case"FeatureCollection":for(g=0;g<m.features.length&&_(m.features[g].properties,g)!==!1;g++);break;case"Feature":_(m.properties,0);break}}function i(m,_,g){var y=g;return r(m,function(E,C){C===0&&g===void 0?y=E:y=_(y,E,C)}),y}function s(m,_){if(m.type==="Feature")_(m,0);else if(m.type==="FeatureCollection")for(var g=0;g<m.features.length&&_(m.features[g],g)!==!1;g++);}function o(m,_,g){var y=g;return s(m,function(E,C){C===0&&g===void 0?y=E:y=_(y,E,C)}),y}function a(m){var _=[];return t(m,function(g){_.push(g)}),_}function u(m,_){var g,y,E,C,b,T,M,N,D,A,F=0,Y=m.type==="FeatureCollection",G=m.type==="Feature",K=Y?m.features.length:1;for(g=0;g<K;g++){for(T=Y?m.features[g].geometry:G?m.geometry:m,N=Y?m.features[g].properties:G?m.properties:{},D=Y?m.features[g].bbox:G?m.bbox:void 0,A=Y?m.features[g].id:G?m.id:void 0,M=T?T.type==="GeometryCollection":!1,b=M?T.geometries.length:1,E=0;E<b;E++){if(C=M?T.geometries[E]:T,C===null){if(_(null,F,N,D,A)===!1)return!1;continue}switch(C.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(_(C,F,N,D,A)===!1)return!1;break}case"GeometryCollection":{for(y=0;y<C.geometries.length;y++)if(_(C.geometries[y],F,N,D,A)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}F++}}function l(m,_,g){var y=g;return u(m,function(E,C,b,T,M){C===0&&g===void 0?y=E:y=_(y,E,C,b,T,M)}),y}function c(m,_){u(m,function(g,y,E,C,b){var T=g===null?null:g.type;switch(T){case null:case"Point":case"LineString":case"Polygon":return _(n.feature(g,E,{bbox:C,id:b}),y,0)===!1?!1:void 0}var M;switch(T){case"MultiPoint":M="Point";break;case"MultiLineString":M="LineString";break;case"MultiPolygon":M="Polygon";break}for(var N=0;N<g.coordinates.length;N++){var D=g.coordinates[N],A={type:M,coordinates:D};if(_(n.feature(A,E),y,N)===!1)return!1}})}function h(m,_,g){var y=g;return c(m,function(E,C,b){C===0&&b===0&&g===void 0?y=E:y=_(y,E,C,b)}),y}function p(m,_){c(m,function(g,y,E){var C=0;if(g.geometry){var b=g.geometry.type;if(!(b==="Point"||b==="MultiPoint")){var T,M=0,N=0,D=0;if(t(g,function(A,F,Y,G,K){if(T===void 0||y>M||G>N||K>D){T=A,M=y,N=G,D=K,C=0;return}var at=n.lineString([T,A],g.properties);if(_(at,y,E,K,C)===!1)return!1;C++,T=A})===!1)return!1}}})}function v(m,_,g){var y=g,E=!1;return p(m,function(C,b,T,M,N){E===!1&&g===void 0?y=C:y=_(y,C,b,T,M,N),E=!0}),y}function w(m,_){if(!m)throw new Error("geojson is required");c(m,function(g,y,E){if(g.geometry!==null){var C=g.geometry.type,b=g.geometry.coordinates;switch(C){case"LineString":if(_(g,y,E,0,0)===!1)return!1;break;case"Polygon":for(var T=0;T<b.length;T++)if(_(n.lineString(b[T],g.properties),y,E,T)===!1)return!1;break}}})}function I(m,_,g){var y=g;return w(m,function(E,C,b,T){C===0&&g===void 0?y=E:y=_(y,E,C,b,T)}),y}function P(m,_){if(_=_||{},!n.isObject(_))throw new Error("options is invalid");var g=_.featureIndex||0,y=_.multiFeatureIndex||0,E=_.geometryIndex||0,C=_.segmentIndex||0,b=_.properties,T;switch(m.type){case"FeatureCollection":g<0&&(g=m.features.length+g),b=b||m.features[g].properties,T=m.features[g].geometry;break;case"Feature":b=b||m.properties,T=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":T=m;break;default:throw new Error("geojson is invalid")}if(T===null)return null;var M=T.coordinates;switch(T.type){case"Point":case"MultiPoint":return null;case"LineString":return C<0&&(C=M.length+C-1),n.lineString([M[C],M[C+1]],b,_);case"Polygon":return E<0&&(E=M.length+E),C<0&&(C=M[E].length+C-1),n.lineString([M[E][C],M[E][C+1]],b,_);case"MultiLineString":return y<0&&(y=M.length+y),C<0&&(C=M[y].length+C-1),n.lineString([M[y][C],M[y][C+1]],b,_);case"MultiPolygon":return y<0&&(y=M.length+y),E<0&&(E=M[y].length+E),C<0&&(C=M[y][E].length-C-1),n.lineString([M[y][E][C],M[y][E][C+1]],b,_)}throw new Error("geojson is invalid")}function O(m,_){if(_=_||{},!n.isObject(_))throw new Error("options is invalid");var g=_.featureIndex||0,y=_.multiFeatureIndex||0,E=_.geometryIndex||0,C=_.coordIndex||0,b=_.properties,T;switch(m.type){case"FeatureCollection":g<0&&(g=m.features.length+g),b=b||m.features[g].properties,T=m.features[g].geometry;break;case"Feature":b=b||m.properties,T=m.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":T=m;break;default:throw new Error("geojson is invalid")}if(T===null)return null;var M=T.coordinates;switch(T.type){case"Point":return n.point(M,b,_);case"MultiPoint":return y<0&&(y=M.length+y),n.point(M[y],b,_);case"LineString":return C<0&&(C=M.length+C),n.point(M[C],b,_);case"Polygon":return E<0&&(E=M.length+E),C<0&&(C=M[E].length+C),n.point(M[E][C],b,_);case"MultiLineString":return y<0&&(y=M.length+y),C<0&&(C=M[y].length+C),n.point(M[y][C],b,_);case"MultiPolygon":return y<0&&(y=M.length+y),E<0&&(E=M[y].length+E),C<0&&(C=M[y][E].length-C),n.point(M[y][E][C],b,_)}throw new Error("geojson is invalid")}return le.coordAll=a,le.coordEach=t,le.coordReduce=e,le.featureEach=s,le.featureReduce=o,le.findPoint=O,le.findSegment=P,le.flattenEach=c,le.flattenReduce=h,le.geomEach=u,le.geomReduce=l,le.lineEach=w,le.lineReduce=I,le.propEach=r,le.propReduce=i,le.segmentEach=p,le.segmentReduce=v,le}var Iu={},Qf;function av(){if(Qf)return Iu;Qf=1,Object.defineProperty(Iu,"__esModule",{value:!0});var n=Kf();function t(e){var r=[1/0,1/0,-1/0,-1/0];return n.coordEach(e,function(i){r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]<i[0]&&(r[2]=i[0]),r[3]<i[1]&&(r[3]=i[1])}),r}return t.default=t,Iu.default=t,Iu}var $f;function uv(){if($f)return Cu.exports;$f=1;var n=Vf(),t=jf(),e=Kf(),r=av().default,i=e.featureEach;e.coordEach,t.polygon;var s=t.featureCollection;function o(a){var u=new n(a);return u.insert=function(l){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.insert.call(this,l)},u.load=function(l){var c=[];return Array.isArray(l)?l.forEach(function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:r(h),c.push(h)}):i(l,function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:r(h),c.push(h)}),n.prototype.load.call(this,c)},u.remove=function(l,c){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.remove.call(this,l,c)},u.clear=function(){return n.prototype.clear.call(this)},u.search=function(l){var c=n.prototype.search.call(this,this.toBBox(l));return s(c)},u.collides=function(l){return n.prototype.collides.call(this,this.toBBox(l))},u.all=function(){var l=n.prototype.all.call(this);return s(l)},u.toJSON=function(){return n.prototype.toJSON.call(this)},u.fromJSON=function(l){return n.prototype.fromJSON.call(this,l)},u.toBBox=function(l){var c;if(l.bbox)c=l.bbox;else if(Array.isArray(l)&&l.length===4)c=l;else if(Array.isArray(l)&&l.length===6)c=[l[0],l[1],l[3],l[4]];else if(l.type==="Feature")c=r(l);else if(l.type==="FeatureCollection")c=r(l);else throw new Error("invalid geojson");return{minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]}},u}return Cu.exports=o,Cu.exports.default=o,Cu.exports}var lv=uv();const cv=Ff(lv);function td(n,t){var e={},r=[];if(n.type==="LineString"&&(n=gn(n)),t.type==="LineString"&&(t=gn(t)),n.type==="Feature"&&t.type==="Feature"&&n.geometry!==null&&t.geometry!==null&&n.geometry.type==="LineString"&&t.geometry.type==="LineString"&&n.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=ed(n,t);return i&&r.push(i),oo(r)}var s=cv();return s.load(Jf(t)),yu(Jf(n),function(o){yu(s.search(o),function(a){var u=ed(o,a);if(u){var l=ws(u).join(",");e[l]||(e[l]=!0,r.push(u))}})}),oo(r)}function ed(n,t){var e=ws(n),r=ws(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(r.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=e[0][0],s=e[0][1],o=e[1][0],a=e[1][1],u=r[0][0],l=r[0][1],c=r[1][0],h=r[1][1],p=(h-l)*(o-i)-(c-u)*(a-s),v=(c-u)*(s-l)-(h-l)*(i-u),w=(o-i)*(s-l)-(a-s)*(i-u);if(p===0)return null;var I=v/p,P=w/p;if(I>=0&&I<=1&&P>=0&&P<=1){var O=i+I*(o-i),m=s+I*(a-s);return Ut([O,m])}return null}function hv(n,t){return td(mn(n),mn(t))}function fv(n,t){var e=gi(n,t),r=Sa(n,t),i=ao(n,e/2,r);return i}function dv(n,t){const e=Ut(n),r=Ut(t),i=fv(e,r),s=(n[2]+t[2])/2;return[...i.geometry.coordinates,s]}function pv(n,t,e){e===void 0&&(e={});var r=Ut([1/0,1/0],{dist:1/0}),i=0;return Ll(n,function(s){for(var o=ws(s),a=0;a<o.length-1;a++){var u=Ut(o[a]);u.properties.dist=gi(t,u,e);var l=Ut(o[a+1]);l.properties.dist=gi(t,l,e);var c=gi(u,l,e),h=Math.max(u.properties.dist,l.properties.dist),p=Sa(u,l),v=ao(t,h,p+90,e),w=ao(t,h,p-90,e),I=td(mn([v.geometry.coordinates,w.geometry.coordinates]),mn([u.geometry.coordinates,l.geometry.coordinates])),P=null;I.features.length>0&&(P=I.features[0],P.properties.dist=gi(t,P,e),P.properties.location=i+gi(u,P,e)),u.properties.dist<r.properties.dist&&(r=u,r.properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&(r=l,r.properties.index=a+1,r.properties.location=i+c),P&&P.properties.dist<r.properties.dist&&(r=P,r.properties.index=a),i+=c}}),r}function gv(n,t){const e=Ut(t),r=mn(n);return pv(r,e,{units:"meters"})}function rd(n,t,e){e===void 0&&(e={});var r=tr(n),i=tr(t);i[0]+=i[0]-r[0]>180?-360:r[0]-i[0]>180?360:0;var s=mv(r,i),o=Ml(s,"meters",e.units);return o}function mv(n,t,e){e=e===void 0?Me:Number(e);var r=e,i=n[1]*Math.PI/180,s=t[1]*Math.PI/180,o=s-i,a=Math.abs(t[0]-n[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var u=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),l=Math.abs(u)>1e-11?o/u:Math.cos(i),c=Math.sqrt(o*o+l*l*a*a),h=c*r;return h}function vv(n,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!n)throw new Error("pt is required");if(Array.isArray(n)?n=Ut(n):n.type==="Point"?n=gn(n):Mf(n,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=mn(t):t.type==="LineString"?t=gn(t):Mf(t,"LineString","line");var r=1/0,i=n.geometry.coordinates;return Um(t,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],u=yv(i,o,a,e);u<r&&(r=u)}),Ml(r,"degrees",e.units)}function yv(n,t,e,r){var i=[e[0]-t[0],e[1]-t[1]],s=[n[0]-t[0],n[1]-t[1]],o=nd(s,i);if(o<=0)return zl(n,t,{method:r.method,units:"degrees"});var a=nd(i,i);if(a<=o)return zl(n,e,{method:r.method,units:"degrees"});var u=o/a,l=[t[0]+u*i[0],t[1]+u*i[1]];return zl(n,l,{method:r.method,units:"degrees"})}function nd(n,t){return n[0]*t[0]+n[1]*t[1]}function zl(n,t,e){return e.method==="planar"?rd(n,t,e):gi(n,t,e)}function _v(n,t){const e=Ut(n),r=mn(t);return vv(e,r,{units:"meters"})}function wv(n,t,e,r){r===void 0&&(r={});var i=t<0,s=Ml(Math.abs(t),r.units,"meters");i&&(s=-Math.abs(s));var o=tr(n),a=Ev(o,s,e);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,Ut(a,r.properties)}function Ev(n,t,e,r){r=r===void 0?Me:Number(r);var i=t/r,s=n[0]*Math.PI/180,o=Ge(n[1]),a=Ge(e),u=i*Math.cos(a),l=o+u;Math.abs(l)>Math.PI/2&&(l=l>0?Math.PI-l:-Math.PI-l);var c=Math.log(Math.tan(l/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),h=Math.abs(c)>1e-11?u/c:Math.cos(o),p=i*Math.sin(a)/h,v=s+p;return[(v*180/Math.PI+540)%360-180,l*180/Math.PI]}function Sv(n,t,e,r){const[i,s,o]=n,a=wv(Ut([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function id(n,t){return rd(Ut(n),Ut(t),{units:"meters"})}function Cv(n,t,e){e===void 0&&(e={});var r;e.final?r=sd(tr(t),tr(n)):r=sd(tr(n),tr(t));var i=r>180?-(360-r):r;return i}function sd(n,t){var e=Ge(n[1]),r=Ge(t[1]),i=Ge(t[0]-n[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(e/2+Math.PI/4)),o=Math.atan2(i,s);return(vu(o)+360)%360}function Iv(n,t){return Cv(Ut(n),Ut(t))}function vn(n){var t=[1/0,1/0,-1/0,-1/0];return uo(n,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}vn.default=vn;function yn(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r=tr(n),i=Pr(t),s=i.type,o=t.bbox,a=i.coordinates;if(o&&Pv(r,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var u=!1,l=0;l<a.length&&!u;l++)if(od(r,a[l][0],e.ignoreBoundary)){for(var c=!1,h=1;h<a[l].length&&!c;)od(r,a[l][h],!e.ignoreBoundary)&&(c=!0),h++;c||(u=!0)}return u}function od(n,t,e){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var o=t[i][0],a=t[i][1],u=t[s][0],l=t[s][1],c=n[1]*(o-u)+a*(u-n[0])+l*(n[0]-o)===0&&(o-n[0])*(u-n[0])<=0&&(a-n[1])*(l-n[1])<=0;if(c)return!e;var h=a>n[1]!=l>n[1]&&n[0]<(u-o)*(n[1]-a)/(l-a)+o;h&&(r=!r)}return r}function Pv(n,t){return t[0]<=n[0]&&t[1]<=n[1]&&t[2]>=n[0]&&t[3]>=n[1]}function mi(n,t,e){e===void 0&&(e={});for(var r=tr(n),i=ws(t),s=0;s<i.length-1;s++){var o=!1;if(e.ignoreEndVertices&&(s===0&&(o="start"),s===i.length-2&&(o="end"),s===0&&s+1===i.length-1&&(o="both")),bv(i[s],i[s+1],r,o,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function bv(n,t,e,r,i){var s=e[0],o=e[1],a=n[0],u=n[1],l=t[0],c=t[1],h=e[0]-a,p=e[1]-u,v=l-a,w=c-u,I=h*w-p*v;if(i!==null){if(Math.abs(I)>i)return!1}else if(I!==0)return!1;if(r){if(r==="start")return Math.abs(v)>=Math.abs(w)?v>0?a<s&&s<=l:l<=s&&s<a:w>0?u<o&&o<=c:c<=o&&o<u;if(r==="end")return Math.abs(v)>=Math.abs(w)?v>0?a<=s&&s<l:l<s&&s<=a:w>0?u<=o&&o<c:c<o&&o<=u;if(r==="both")return Math.abs(v)>=Math.abs(w)?v>0?a<s&&s<l:l<s&&s<a:w>0?u<o&&o<c:c<o&&o<u}else return Math.abs(v)>=Math.abs(w)?v>0?a<=s&&s<=l:l<=s&&s<=a:w>0?u<=o&&o<=c:c<=o&&o<=u;return!1}function Nv(n,t){var e=Pr(n),r=Pr(t),i=e.type,s=r.type,o=e.coordinates,a=r.coordinates;switch(i){case"Point":switch(s){case"Point":return Ul(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return Tv(e,r);case"MultiPoint":return Ov(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return mi(r,e,{ignoreEndVertices:!0});case"LineString":return Mv(e,r);case"MultiPoint":return Dv(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return yn(r,e,{ignoreBoundary:!0});case"LineString":return Lv(e,r);case"Polygon":return Av(e,r);case"MultiPoint":return xv(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Tv(n,t){var e,r=!1;for(e=0;e<n.coordinates.length;e++)if(Ul(n.coordinates[e],t.coordinates)){r=!0;break}return r}function Ov(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){for(var i=r[e],s=!1,o=0,a=n.coordinates;o<a.length;o++){var u=a[o];if(Ul(i,u)){s=!0;break}}if(!s)return!1}return!0}function Dv(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(mi(s,n,{ignoreEndVertices:!0})&&(e=!0),!mi(s,n))return!1}return!!e}function xv(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){var i=r[e];if(!yn(i,n,{ignoreBoundary:!0}))return!1}return!0}function Mv(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(mi({type:"Point",coordinates:s},n,{ignoreEndVertices:!0})&&(e=!0),!mi({type:"Point",coordinates:s},n,{ignoreEndVertices:!1}))return!1}return e}function Lv(n,t){var e=!1,r=0,i=vn(n),s=vn(t);if(!ad(i,s))return!1;for(r;r<t.coordinates.length-1;r++){var o=Rv(t.coordinates[r],t.coordinates[r+1]);if(yn({type:"Point",coordinates:o},n,{ignoreBoundary:!0})){e=!0;break}}return e}function Av(n,t){if(n.type==="Feature"&&n.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var e=vn(n),r=vn(t);if(!ad(e,r))return!1;for(var i=Pr(t).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],u=0,l=a;u<l.length;u++){var c=l[u];if(!yn(c,n))return!1}return!0}function ad(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function Ul(n,t){return n[0]===t[0]&&n[1]===t[1]}function Rv(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function Fv(n,t){var e=Pr(n),r=Pr(t),i=e.type,s=r.type;switch(i){case"Point":switch(s){case"MultiPoint":return kv(e,r);case"LineString":return mi(e,r,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return yn(e,r,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return Vv(e,r);case"LineString":return zv(e,r);case"Polygon":case"MultiPolygon":return Uv(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return Gv(e,r);case"Polygon":case"MultiPolygon":return Wv(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return qv(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function kv(n,t){var e,r=!1;for(e=0;e<t.coordinates.length;e++)if(ld(t.coordinates[e],n.coordinates)){r=!0;break}return r}function Vv(n,t){for(var e=0;e<n.coordinates.length;e++){for(var r=!1,i=0;i<t.coordinates.length;i++)ld(n.coordinates[e],t.coordinates[i])&&(r=!0);if(!r)return!1}return!0}function zv(n,t){for(var e=!1,r=0;r<n.coordinates.length;r++){if(!mi(n.coordinates[r],t))return!1;e||(e=mi(n.coordinates[r],t,{ignoreEndVertices:!0}))}return e}function Uv(n,t){for(var e=!0,r=!1,i=0;i<n.coordinates.length;i++){if(r=yn(n.coordinates[1],t),!r){e=!1;break}r=yn(n.coordinates[1],t,{ignoreBoundary:!0})}return e&&r}function Gv(n,t){for(var e=0;e<n.coordinates.length;e++)if(!mi(n.coordinates[e],t))return!1;return!0}function Wv(n,t){var e=vn(t),r=vn(n);if(!ud(e,r))return!1;for(var i=!1,s=0;s<n.coordinates.length-1;s++){if(!yn(n.coordinates[s],t))return!1;if(i||(i=yn(n.coordinates[s],t,{ignoreBoundary:!0})),!i){var o=Xv(n.coordinates[s],n.coordinates[s+1]);i=yn(o,t,{ignoreBoundary:!0})}}return i}function qv(n,t){var e=vn(n),r=vn(t);if(!ud(r,e))return!1;for(var i=0;i<n.coordinates[0].length;i++)if(!yn(n.coordinates[0][i],t))return!1;return!0}function ud(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function ld(n,t){return n[0]===t[0]&&n[1]===t[1]}function Xv(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function Yv(n,t){t===void 0&&(t={});var e=vn(n),r=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return Ut([r,i],t.properties,t)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),r=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(r+i,0):Math.min(i,r);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:r;for(s=s<0?Math.max(r+arguments[2],0):Math.min(s,r);i<s;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},Number.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(n){return n!==n},Math.trunc=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};var Es=function(){};Es.prototype.interfaces_=function(){return[]},Es.prototype.getClass=function(){return Es},Es.prototype.equalsWithTolerance=function(t,e,r){return Math.abs(t-e)<=r};var Vt=function(n){function t(e){n.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new n().stack}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Error),ot=function(){},cd={MAX_VALUE:{configurable:!0}};ot.isNaN=function(t){return Number.isNaN(t)},ot.doubleToLongBits=function(t){return t},ot.longBitsToDouble=function(t){return t},ot.isInfinite=function(t){return!Number.isFinite(t)},cd.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(ot,cd);var cr=function(){},Pu=function(){},lo=function(){};function hr(){}var x=function n(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=n.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=n.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},Ss={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};x.prototype.setOrdinate=function(t,e){switch(t){case x.X:this.x=e;break;case x.Y:this.y=e;break;case x.Z:this.z=e;break;default:throw new Vt("Invalid ordinate index: "+t)}},x.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return!(!Es.equalsWithTolerance(this.x,e.x,r)||!Es.equalsWithTolerance(this.y,e.y,r))}},x.prototype.getOrdinate=function(t){switch(t){case x.X:return this.x;case x.Y:return this.y;case x.Z:return this.z}throw new Vt("Invalid ordinate index: "+t)},x.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||ot.isNaN(this.z))&&ot.isNaN(t.z)},x.prototype.equals=function(t){return t instanceof x?this.equals2D(t):!1},x.prototype.equalInZ=function(t,e){return Es.equalsWithTolerance(this.z,t.z,e)},x.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},x.prototype.clone=function(){},x.prototype.copy=function(){return new x(this)},x.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},x.prototype.distance3D=function(t){var e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+r*r+i*i)},x.prototype.distance=function(t){var e=this.x-t.x,r=this.y-t.y;return Math.sqrt(e*e+r*r)},x.prototype.hashCode=function(){var t=17;return t=37*t+x.hashCode(this.x),t=37*t+x.hashCode(this.y),t},x.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},x.prototype.interfaces_=function(){return[cr,Pu,hr]},x.prototype.getClass=function(){return x},x.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=ot.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},Ss.DimensionalComparator.get=function(){return vi},Ss.serialVersionUID.get=function(){return 6683108902428367e3},Ss.NULL_ORDINATE.get=function(){return ot.NaN},Ss.X.get=function(){return 0},Ss.Y.get=function(){return 1},Ss.Z.get=function(){return 2},Object.defineProperties(x,Ss);var vi=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new Vt("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};vi.prototype.compare=function(t,e){var r=t,i=e,s=vi.compare(r.x,i.x);if(s!==0)return s;var o=vi.compare(r.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=vi.compare(r.z,i.z);return a},vi.prototype.interfaces_=function(){return[lo]},vi.prototype.getClass=function(){return vi},vi.compare=function(t,e){return t<e?-1:t>e?1:ot.isNaN(t)?ot.isNaN(e)?0:-1:ot.isNaN(e)?1:0};var co=function(){};co.prototype.create=function(){},co.prototype.interfaces_=function(){return[]},co.prototype.getClass=function(){return co};var R=function(){},ba={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};R.prototype.interfaces_=function(){return[]},R.prototype.getClass=function(){return R},R.toLocationSymbol=function(t){switch(t){case R.EXTERIOR:return"e";case R.BOUNDARY:return"b";case R.INTERIOR:return"i";case R.NONE:return"-"}throw new Vt("Unknown location value: "+t)},ba.INTERIOR.get=function(){return 0},ba.BOUNDARY.get=function(){return 1},ba.EXTERIOR.get=function(){return 2},ba.NONE.get=function(){return-1},Object.defineProperties(R,ba);var nt=function(n,t){return n.interfaces_&&n.interfaces_().indexOf(t)>-1},er=function(){},hd={LOG_10:{configurable:!0}};er.prototype.interfaces_=function(){return[]},er.prototype.getClass=function(){return er},er.log10=function(t){var e=Math.log(t);return ot.isInfinite(e)||ot.isNaN(e)?e:e/er.LOG_10},er.min=function(t,e,r,i){var s=t;return e<s&&(s=e),r<s&&(s=r),i<s&&(s=i),s},er.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],r=arguments[2];return t<e?e:t>r?r:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],s=arguments[1],o=arguments[2];return i<s?s:i>o?o:i}},er.wrap=function(t,e){return t<0?e- -t%e:t%e},er.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],r=arguments[2],i=t;return e>i&&(i=e),r>i&&(i=r),i}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=s;return o>l&&(l=o),a>l&&(l=a),u>l&&(l=u),l}},er.average=function(t,e){return(t+e)/2},hd.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(er,hd);var zr=function(t){this.str=t};zr.prototype.append=function(t){this.str+=t},zr.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},zr.prototype.toString=function(t){return this.str};var Ur=function(t){this.value=t};Ur.prototype.intValue=function(){return this.value},Ur.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},Ur.isNaN=function(t){return Number.isNaN(t)};var Na=function(){};Na.isWhitespace=function(t){return t<=32&&t>=0||t===127},Na.toUpperCase=function(t){return t.toUpperCase()};var k=function n(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof n){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var r=arguments[0];n.call(this,n.parse(r))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},br={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};k.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},k.prototype.extractSignificantDigits=function(t,e){var r=this.abs(),i=k.magnitude(r._hi),s=k.TEN.pow(i);r=r.divide(s),r.gt(k.TEN)?(r=r.divide(k.TEN),i+=1):r.lt(k.ONE)&&(r=r.multiply(k.TEN),i-=1);for(var o=i+1,a=new zr,u=k.MAX_PRINT_DIGITS-1,l=0;l<=u;l++){t&&l===o&&a.append(".");var c=Math.trunc(r._hi);if(c<0)break;var h=!1,p=0;c>9?(h=!0,p="9"):p="0"+c,a.append(p),r=r.subtract(k.valueOf(c)).multiply(k.TEN),h&&r.selfAdd(k.TEN);var v=!0,w=k.magnitude(r._hi);if(w<0&&Math.abs(w)>=u-l&&(v=!1),!v)break}return e[0]=i,a.toString()},k.prototype.sqr=function(){return this.multiply(this)},k.prototype.doubleValue=function(){return this._hi+this._lo},k.prototype.subtract=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},k.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},k.prototype.isZero=function(){return this._hi===0&&this._lo===0},k.prototype.selfSubtract=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},k.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},k.prototype.min=function(t){return this.le(t)?this:t},k.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof k){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null,h=null,p=null;return l=this._hi/r,c=k.SPLIT*l,s=c-l,p=k.SPLIT*r,s=c-s,o=l-s,a=p-r,h=l*r,a=p-a,u=r-a,p=s*a-h+s*u+o*a+o*u,c=(this._hi-h-p+this._lo-l*i)/r,p=l+c,this._hi=p,this._lo=l-p+c,this}},k.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},k.prototype.divide=function(){if(arguments[0]instanceof k){var t=arguments[0],e=null,r=null,i=null,s=null,o=null,a=null,u=null,l=null;o=this._hi/t._hi,a=k.SPLIT*o,e=a-o,l=k.SPLIT*t._hi,e=a-e,r=o-e,i=l-t._hi,u=o*t._hi,i=l-i,s=t._hi-i,l=e*i-u+e*s+r*i+r*s,a=(this._hi-u-l+this._lo-o*t._lo)/t._hi,l=o+a;var c=l,h=o-l+a;return new k(c,h)}else if(typeof arguments[0]=="number"){var p=arguments[0];return ot.isNaN(p)?k.createNaN():k.copy(this).selfDivide(p,0)}},k.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},k.prototype.pow=function(t){if(t===0)return k.valueOf(1);var e=new k(this),r=k.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2===1&&r.selfMultiply(e),i/=2,i>0&&(e=e.sqr());else r=e;return t<0?r.reciprocal():r},k.prototype.ceil=function(){if(this.isNaN())return k.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new k(t,e)},k.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},k.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},k.prototype.setValue=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},k.prototype.max=function(t){return this.ge(t)?this:t},k.prototype.sqrt=function(){if(this.isZero())return k.valueOf(0);if(this.isNegative())return k.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,r=k.valueOf(e),i=this.subtract(r.sqr()),s=i._hi*(t*.5);return r.add(s)},k.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof k){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],r=null,i=null,s=null,o=null,a=null,u=null;return s=this._hi+e,a=s-this._hi,o=s-a,o=e-a+(this._hi-o),u=o+this._lo,r=s+u,i=u+(s-r),this._hi=r+i,this._lo=i+(r-this._hi),this}}else if(arguments.length===2){var l=arguments[0],c=arguments[1],h=null,p=null,v=null,w=null,I=null,P=null,O=null,m=null;I=this._hi+l,v=this._lo+c,O=I-this._hi,m=v-this._lo,P=I-O,w=v-m,P=l-O+(this._hi-P),w=c-m+(this._lo-w),O=P+v,h=I+O,p=O+(I-h),O=w+p;var _=h+O,g=O+(h-_);return this._hi=_,this._lo=g,this}},k.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof k){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null;l=k.SPLIT*this._hi,s=l-this._hi,c=k.SPLIT*r,s=l-s,o=this._hi-s,a=c-r,l=this._hi*r,a=c-a,u=r-a,c=s*a-l+s*u+o*a+o*u+(this._hi*i+this._lo*r);var h=l+c;s=l-h;var p=c+s;return this._hi=h,this._lo=p,this}},k.prototype.selfSqr=function(){return this.selfMultiply(this)},k.prototype.floor=function(){if(this.isNaN())return k.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new k(t,e)},k.prototype.negate=function(){return this.isNaN()?this:new k(-this._hi,-this._lo)},k.prototype.clone=function(){},k.prototype.multiply=function(){if(arguments[0]instanceof k){var t=arguments[0];return t.isNaN()?k.createNaN():k.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return ot.isNaN(e)?k.createNaN():k.copy(this).selfMultiply(e,0)}},k.prototype.isNaN=function(){return ot.isNaN(this._hi)},k.prototype.intValue=function(){return Math.trunc(this._hi)},k.prototype.toString=function(){var t=k.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},k.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!0,e),i=e[0]+1,s=r;if(r.charAt(0)===".")s="0"+r;else if(i<0)s="0."+k.stringOfChar("0",-i)+r;else if(r.indexOf(".")===-1){var o=i-r.length,a=k.stringOfChar("0",o);s=r+a+".0"}return this.isNegative()?"-"+s:s},k.prototype.reciprocal=function(){var t=null,e=null,r=null,i=null,s=null,o=null,a=null,u=null;s=1/this._hi,o=k.SPLIT*s,t=o-s,u=k.SPLIT*this._hi,t=o-t,e=s-t,r=u-this._hi,a=s*this._hi,r=u-r,i=this._hi-r,u=t*r-a+t*i+e*r+e*i,o=(1-a-u-s*this._lo)/this._hi;var l=s+o,c=s-l+o;return new k(l,c)},k.prototype.toSciNotation=function(){if(this.isZero())return k.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!1,e),i=k.SCI_NOT_EXPONENT_CHAR+e[0];if(r.charAt(0)==="0")throw new Error("Found leading zero: "+r);var s="";r.length>1&&(s=r.substring(1));var o=r.charAt(0)+"."+s;return this.isNegative()?"-"+o+i:o+i},k.prototype.abs=function(){return this.isNaN()?k.NaN:this.isNegative()?this.negate():new k(this)},k.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},k.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},k.prototype.add=function(){if(arguments[0]instanceof k){var t=arguments[0];return k.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return k.copy(this).selfAdd(e)}},k.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof k){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._hi=r,this._lo=i}},k.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},k.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},k.prototype.trunc=function(){return this.isNaN()?k.NaN:this.isPositive()?this.floor():this.ceil()},k.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},k.prototype.interfaces_=function(){return[hr,cr,Pu]},k.prototype.getClass=function(){return k},k.sqr=function(t){return k.valueOf(t).selfMultiply(t)},k.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return k.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new k(e)}},k.sqrt=function(t){return k.valueOf(t).sqrt()},k.parse=function(t){for(var e=0,r=t.length;Na.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<r){var s=t.charAt(e);(s==="-"||s==="+")&&(e++,s==="-"&&(i=!0))}for(var o=new k,a=0,u=0,l=0;!(e>=r);){var c=t.charAt(e);if(e++,Na.isDigit(c)){var h=c-"0";o.selfMultiply(k.TEN),o.selfAdd(h),a++;continue}if(c==="."){u=a;continue}if(c==="e"||c==="E"){var p=t.substring(e);try{l=Ur.parseInt(p)}catch(O){throw O instanceof Error?new Error("Invalid exponent "+p+" in string "+t):O}finally{}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}var v=o,w=a-u-l;if(w===0)v=o;else if(w>0){var I=k.TEN.pow(w);v=o.divide(I)}else if(w<0){var P=k.TEN.pow(-w);v=o.multiply(P)}return i?v.negate():v},k.createNaN=function(){return new k(ot.NaN,ot.NaN)},k.copy=function(t){return new k(t)},k.magnitude=function(t){var e=Math.abs(t),r=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(r)),s=Math.pow(10,i);return s*10<=e&&(i+=1),i},k.stringOfChar=function(t,e){for(var r=new zr,i=0;i<e;i++)r.append(t);return r.toString()},br.PI.get=function(){return new k(3.141592653589793,12246467991473532e-32)},br.TWO_PI.get=function(){return new k(6.283185307179586,24492935982947064e-32)},br.PI_2.get=function(){return new k(1.5707963267948966,6123233995736766e-32)},br.E.get=function(){return new k(2.718281828459045,14456468917292502e-32)},br.NaN.get=function(){return new k(ot.NaN,ot.NaN)},br.EPS.get=function(){return 123259516440783e-46},br.SPLIT.get=function(){return 134217729},br.MAX_PRINT_DIGITS.get=function(){return 32},br.TEN.get=function(){return k.valueOf(10)},br.ONE.get=function(){return k.valueOf(1)},br.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},br.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(k,br);var Le=function(){},fd={DP_SAFE_EPSILON:{configurable:!0}};Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le},Le.orientationIndex=function(t,e,r){var i=Le.orientationIndexFilter(t,e,r);if(i<=1)return i;var s=k.valueOf(e.x).selfAdd(-t.x),o=k.valueOf(e.y).selfAdd(-t.y),a=k.valueOf(r.x).selfAdd(-e.x),u=k.valueOf(r.y).selfAdd(-e.y);return s.selfMultiply(u).selfSubtract(o.selfMultiply(a)).signum()},Le.signOfDet2x2=function(t,e,r,i){var s=t.multiply(i).selfSubtract(e.multiply(r));return s.signum()},Le.intersection=function(t,e,r,i){var s=k.valueOf(i.y).selfSubtract(r.y).selfMultiply(k.valueOf(e.x).selfSubtract(t.x)),o=k.valueOf(i.x).selfSubtract(r.x).selfMultiply(k.valueOf(e.y).selfSubtract(t.y)),a=s.subtract(o),u=k.valueOf(i.x).selfSubtract(r.x).selfMultiply(k.valueOf(t.y).selfSubtract(r.y)),l=k.valueOf(i.y).selfSubtract(r.y).selfMultiply(k.valueOf(t.x).selfSubtract(r.x)),c=u.subtract(l),h=c.selfDivide(a).doubleValue(),p=k.valueOf(t.x).selfAdd(k.valueOf(e.x).selfSubtract(t.x).selfMultiply(h)).doubleValue(),v=k.valueOf(e.x).selfSubtract(t.x).selfMultiply(k.valueOf(t.y).selfSubtract(r.y)),w=k.valueOf(e.y).selfSubtract(t.y).selfMultiply(k.valueOf(t.x).selfSubtract(r.x)),I=v.subtract(w),P=I.selfDivide(a).doubleValue(),O=k.valueOf(r.y).selfAdd(k.valueOf(i.y).selfSubtract(r.y).selfMultiply(P)).doubleValue();return new x(p,O)},Le.orientationIndexFilter=function(t,e,r){var i=null,s=(t.x-r.x)*(e.y-r.y),o=(t.y-r.y)*(e.x-r.x),a=s-o;if(s>0){if(o<=0)return Le.signum(a);i=s+o}else if(s<0){if(o>=0)return Le.signum(a);i=-s-o}else return Le.signum(a);var u=Le.DP_SAFE_EPSILON*i;return a>=u||-a>=u?Le.signum(a):2},Le.signum=function(t){return t>0?1:t<0?-1:0},fd.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(Le,fd);var _t=function(){},Ta={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Ta.X.get=function(){return 0},Ta.Y.get=function(){return 1},Ta.Z.get=function(){return 2},Ta.M.get=function(){return 3},_t.prototype.setOrdinate=function(t,e,r){},_t.prototype.size=function(){},_t.prototype.getOrdinate=function(t,e){},_t.prototype.getCoordinate=function(){},_t.prototype.getCoordinateCopy=function(t){},_t.prototype.getDimension=function(){},_t.prototype.getX=function(t){},_t.prototype.clone=function(){},_t.prototype.expandEnvelope=function(t){},_t.prototype.copy=function(){},_t.prototype.getY=function(t){},_t.prototype.toCoordinateArray=function(){},_t.prototype.interfaces_=function(){return[Pu]},_t.prototype.getClass=function(){return _t},Object.defineProperties(_t,Ta);var dd=function(){},ho=function(n){function t(){n.call(this,"Projective point not representable on the Cartesian plane.")}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(dd),ce=function(){};ce.arraycopy=function(t,e,r,i,s){for(var o=0,a=e;a<e+s;a++)r[i+o]=t[a],o++},ce.getProperty=function(t){return{"line.separator":`
|
|
42
|
-
`}[t]};var Nr=function n(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],r=arguments[1];this.x=e,this.y=r,this.w=1}else if(arguments[0]instanceof n&&arguments[1]instanceof n){var i=arguments[0],s=arguments[1];this.x=i.y*s.w-s.y*i.w,this.y=s.x*i.w-i.x*s.w,this.w=i.x*s.y-s.x*i.y}else if(arguments[0]instanceof x&&arguments[1]instanceof x){var o=arguments[0],a=arguments[1];this.x=o.y-a.y,this.y=a.x-o.x,this.w=o.x*a.y-a.x*o.y}}else if(arguments.length===3){var u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(arguments.length===4){var h=arguments[0],p=arguments[1],v=arguments[2],w=arguments[3],I=h.y-p.y,P=p.x-h.x,O=h.x*p.y-p.x*h.y,m=v.y-w.y,_=w.x-v.x,g=v.x*w.y-w.x*v.y;this.x=P*g-_*O,this.y=m*O-I*g,this.w=I*_-m*P}};Nr.prototype.getY=function(){var t=this.y/this.w;if(ot.isNaN(t)||ot.isInfinite(t))throw new ho;return t},Nr.prototype.getX=function(){var t=this.x/this.w;if(ot.isNaN(t)||ot.isInfinite(t))throw new ho;return t},Nr.prototype.getCoordinate=function(){var t=new x;return t.x=this.getX(),t.y=this.getY(),t},Nr.prototype.interfaces_=function(){return[]},Nr.prototype.getClass=function(){return Nr},Nr.intersection=function(t,e,r,i){var s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,u=r.y-i.y,l=i.x-r.x,c=r.x*i.y-i.x*r.y,h=o*c-l*a,p=u*a-s*c,v=s*l-u*o,w=h/v,I=p/v;if(ot.isNaN(w)||ot.isInfinite(w)||ot.isNaN(I)||ot.isInfinite(I))throw new ho;return new x(w,I)};var j=function n(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof x){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof n){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];this.init(s,o,a,u)}},pd={serialVersionUID:{configurable:!0}};j.prototype.getArea=function(){return this.getWidth()*this.getHeight()},j.prototype.equals=function(t){if(!(t instanceof j))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},j.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new j;var e=this._minx>t._minx?this._minx:t._minx,r=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,s=this._maxy<t._maxy?this._maxy:t._maxy;return new j(e,i,r,s)},j.prototype.isNull=function(){return this._maxx<this._minx},j.prototype.getMaxX=function(){return this._maxx},j.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof x){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];return this.isNull()||e.isNull()?!1:e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:r>=this._minx&&r<=this._maxx&&i>=this._miny&&i<=this._maxy}},j.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof j){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof x){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:!(r>this._maxx||r<this._minx||i>this._maxy||i<this._miny)}},j.prototype.getMinY=function(){return this._miny},j.prototype.getMinX=function(){return this._minx},j.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof x){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.isNull()?(this._minx=r,this._maxx=r,this._miny=i,this._maxy=i):(r<this._minx&&(this._minx=r),r>this._maxx&&(this._maxx=r),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},j.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},j.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},j.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},j.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},j.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},j.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},j.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},j.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},j.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=r,this._maxy+=r,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},j.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof j){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof x){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.covers(r,i)}},j.prototype.centre=function(){return this.isNull()?null:new x((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},j.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof x){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];s<o?(this._minx=s,this._maxx=o):(this._minx=o,this._maxx=s),a<u?(this._miny=a,this._maxy=u):(this._miny=u,this._maxy=a)}},j.prototype.getMaxY=function(){return this._maxy},j.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var r=0;return this._maxy<t._miny?r=t._miny-this._maxy:this._miny>t._maxy&&(r=this._miny-t._maxy),e===0?r:r===0?e:Math.sqrt(e*e+r*r)},j.prototype.hashCode=function(){var t=17;return t=37*t+x.hashCode(this._minx),t=37*t+x.hashCode(this._maxx),t=37*t+x.hashCode(this._miny),t=37*t+x.hashCode(this._maxy),t},j.prototype.interfaces_=function(){return[cr,hr]},j.prototype.getClass=function(){return j},j.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],r=arguments[2];return r.x>=(t.x<e.x?t.x:e.x)&&r.x<=(t.x>e.x?t.x:e.x)&&r.y>=(t.y<e.y?t.y:e.y)&&r.y<=(t.y>e.y?t.y:e.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=Math.min(o.x,a.x),l=Math.max(o.x,a.x),c=Math.min(i.x,s.x),h=Math.max(i.x,s.x);return!(c>l||h<u||(u=Math.min(o.y,a.y),l=Math.max(o.y,a.y),c=Math.min(i.y,s.y),h=Math.max(i.y,s.y),c>l)||h<u)}},pd.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(j,pd);var Gr={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*$/},bu=function(t){this.geometryFactory=t||new pt};bu.prototype.read=function(t){var e,r,i;t=t.replace(/[\n\r]/g," ");var s=Gr.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(s=Gr.emptyTypeStr.exec(t),s[2]=void 0),s&&(r=s[1].toLowerCase(),i=s[2],fo[r]&&(e=fo[r].apply(this,[i]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},bu.prototype.write=function(t){return this.extractGeometry(t)},bu.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!Xn[e])return null;var r=e.toUpperCase(),i;return t.isEmpty()?i=r+" EMPTY":i=r+"("+Xn[e].apply(this,[t])+")",i};var Xn={coordinate:function(t){return t.x+" "+t.y},point:function(t){return Xn.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Xn.point.apply(e,[t._geometries[i]])+")");return r.join(",")},linestring:function(t){for(var e=this,r=[],i=0,s=t._points._coordinates.length;i<s;++i)r.push(Xn.coordinate.apply(e,[t._points._coordinates[i]]));return r.join(",")},linearring:function(t){for(var e=this,r=[],i=0,s=t._points._coordinates.length;i<s;++i)r.push(Xn.coordinate.apply(e,[t._points._coordinates[i]]));return r.join(",")},multilinestring:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Xn.linestring.apply(e,[t._geometries[i]])+")");return r.join(",")},polygon:function(t){var e=this,r=[];r.push("("+Xn.linestring.apply(this,[t._shell])+")");for(var i=0,s=t._holes.length;i<s;++i)r.push("("+Xn.linestring.apply(e,[t._holes[i]])+")");return r.join(",")},multipolygon:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Xn.polygon.apply(e,[t._geometries[i]])+")");return r.join(",")},geometrycollection:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push(e.extractGeometry(t._geometries[i]));return r.join(",")}},fo={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(Gr.spaces);return this.geometryFactory.createPoint(new x(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var r,i=t.trim().split(","),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(Gr.trimParens,"$1"),s.push(fo.point.apply(e,[r]));return this.geometryFactory.createMultiPoint(s)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),r=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(Gr.spaces),r.push(new x(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(r)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),r=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(Gr.spaces),r.push(new x(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var r,i=t.trim().split(Gr.parenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(Gr.trimParens,"$1"),s.push(fo.linestring.apply(e,[r]));return this.geometryFactory.createMultiLineString(s)},polygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var r,i,s,o=t.trim().split(Gr.parenComma),a,u=[],l=0,c=o.length;l<c;++l)r=o[l].replace(Gr.trimParens,"$1"),i=fo.linestring.apply(e,[r]),s=e.geometryFactory.createLinearRing(i._points),l===0?a=s:u.push(s);return this.geometryFactory.createPolygon(a,u)},multipolygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var r,i=t.trim().split(Gr.doubleParenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(Gr.trimParens,"$1"),s.push(fo.polygon.apply(e,[r]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(t){var e=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var r=t.trim().split("|"),i=[],s=0,o=r.length;s<o;++s)i.push(e.read(r[s]));return this.geometryFactory.createGeometryCollection(i)}},Tr=function(t){this.parser=new bu(t)};Tr.prototype.write=function(t){return this.parser.write(t)},Tr.toLineString=function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var Yn=function(n){function t(e){n.call(this,e),this.name="RuntimeException",this.message=e,this.stack=new n().stack}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Error),Nu=function(n){function t(){if(n.call(this),arguments.length===0)n.call(this);else if(arguments.length===1){var e=arguments[0];n.call(this,e)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Yn),ct=function(){};ct.prototype.interfaces_=function(){return[]},ct.prototype.getClass=function(){return ct},ct.shouldNeverReachHere=function(){if(arguments.length===0)ct.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new Nu("Should never reach here"+(t!==null?": "+t:""))}},ct.isTrue=function(){var t,e;if(arguments.length===1)t=arguments[0],ct.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],e=arguments[1],!t))throw e===null?new Nu:new Nu(e)},ct.equals=function(){var t,e,r;if(arguments.length===2)t=arguments[0],e=arguments[1],ct.equals(t,e,null);else if(arguments.length===3&&(t=arguments[0],e=arguments[1],r=arguments[2],!e.equals(t)))throw new Nu("Expected "+t+" but encountered "+e+(r!==null?": "+r:""))};var Gt=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 x,this._intPt[1]=new x,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Cs={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};Gt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},Gt.prototype.getTopologySummary=function(){var t=new zr;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},Gt.prototype.computeIntersection=function(t,e,r,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=r,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,r,i)},Gt.prototype.getIntersectionNum=function(){return this._result},Gt.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],e=this.getEdgeDistance(t,0),r=this.getEdgeDistance(t,1);e>r?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},Gt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},Gt.prototype.setPrecisionModel=function(t){this._precisionModel=t},Gt.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],r=0;r<this._result;r++)if(!(t._intPt[r].equals2D(t._inputLines[e][0])||t._intPt[r].equals2D(t._inputLines[e][1])))return!0;return!1}},Gt.prototype.getIntersection=function(t){return this._intPt[t]},Gt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},Gt.prototype.hasIntersection=function(){return this._result!==Gt.NO_INTERSECTION},Gt.prototype.getEdgeDistance=function(t,e){var r=Gt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1]);return r},Gt.prototype.isCollinear=function(){return this._result===Gt.COLLINEAR_INTERSECTION},Gt.prototype.toString=function(){return Tr.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Tr.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},Gt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},Gt.prototype.isIntersection=function(t){for(var e=this,r=0;r<this._result;r++)if(e._intPt[r].equals2D(t))return!0;return!1},Gt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},Gt.prototype.interfaces_=function(){return[]},Gt.prototype.getClass=function(){return Gt},Gt.computeEdgeDistance=function(t,e,r){var i=Math.abs(r.x-e.x),s=Math.abs(r.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(r))i>s?o=i:o=s;else{var a=Math.abs(t.x-e.x),u=Math.abs(t.y-e.y);i>s?o=a:o=u,o===0&&!t.equals(e)&&(o=Math.max(a,u))}return ct.isTrue(!(o===0&&!t.equals(e)),"Bad distance calculation"),o},Gt.nonRobustComputeEdgeDistance=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s);return ct.isTrue(!(o===0&&!t.equals(e)),"Invalid distance calculation"),o},Cs.DONT_INTERSECT.get=function(){return 0},Cs.DO_INTERSECT.get=function(){return 1},Cs.COLLINEAR.get=function(){return 2},Cs.NO_INTERSECTION.get=function(){return 0},Cs.POINT_INTERSECTION.get=function(){return 1},Cs.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(Gt,Cs);var zi=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(r){var i=new j(this._inputLines[0][0],this._inputLines[0][1]),s=new j(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(r)&&s.contains(r)},t.prototype.computeIntersection=function(){if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,j.intersects(i,s,r)&&W.orientationIndex(i,s,r)===0&&W.orientationIndex(s,i,r)===0)return this._isProper=!0,(r.equals(i)||r.equals(s))&&(this._isProper=!1),this._result=n.POINT_INTERSECTION,null;this._result=n.NO_INTERSECTION}else return n.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(r,i,s,o,a){a.x=this.smallestInAbsValue(r.x,i.x,s.x,o.x),a.y=this.smallestInAbsValue(r.y,i.y,s.y,o.y),r.x-=a.x,r.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.safeHCoordinateIntersection=function(r,i,s,o){var a=null;try{a=Nr.intersection(r,i,s,o)}catch(u){if(u instanceof ho)a=t.nearestEndpoint(r,i,s,o);else throw u}finally{}return a},t.prototype.intersection=function(r,i,s,o){var a=this.intersectionWithNormalization(r,i,s,o);return this.isInSegmentEnvelopes(a)||(a=new x(t.nearestEndpoint(r,i,s,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(a),a},t.prototype.smallestInAbsValue=function(r,i,s,o){var a=r,u=Math.abs(a);return Math.abs(i)<u&&(a=i,u=Math.abs(i)),Math.abs(s)<u&&(a=s,u=Math.abs(s)),Math.abs(o)<u&&(a=o),a},t.prototype.checkDD=function(r,i,s,o,a){var u=Le.intersection(r,i,s,o),l=this.isInSegmentEnvelopes(u);ce.out.println("DD in env = "+l+" --------------------- "+u),a.distance(u)>1e-4&&ce.out.println("Distance = "+a.distance(u))},t.prototype.intersectionWithNormalization=function(r,i,s,o){var a=new x(r),u=new x(i),l=new x(s),c=new x(o),h=new x;this.normalizeToEnvCentre(a,u,l,c,h);var p=this.safeHCoordinateIntersection(a,u,l,c);return p.x+=h.x,p.y+=h.y,p},t.prototype.computeCollinearIntersection=function(r,i,s,o){var a=j.intersects(r,i,s),u=j.intersects(r,i,o),l=j.intersects(s,o,r),c=j.intersects(s,o,i);return a&&u?(this._intPt[0]=s,this._intPt[1]=o,n.COLLINEAR_INTERSECTION):l&&c?(this._intPt[0]=r,this._intPt[1]=i,n.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=s,this._intPt[1]=r,s.equals(r)&&!u&&!c?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):a&&c?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!u&&!l?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):u&&l?(this._intPt[0]=o,this._intPt[1]=r,o.equals(r)&&!a&&!c?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):u&&c?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!a&&!l?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):n.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(r,i,s,o,a){var u=r.x<i.x?r.x:i.x,l=r.y<i.y?r.y:i.y,c=r.x>i.x?r.x:i.x,h=r.y>i.y?r.y:i.y,p=s.x<o.x?s.x:o.x,v=s.y<o.y?s.y:o.y,w=s.x>o.x?s.x:o.x,I=s.y>o.y?s.y:o.y,P=u>p?u:p,O=c<w?c:w,m=l>v?l:v,_=h<I?h:I,g=(P+O)/2,y=(m+_)/2;a.x=g,a.y=y,r.x-=a.x,r.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.computeIntersect=function(r,i,s,o){if(this._isProper=!1,!j.intersects(r,i,s,o))return n.NO_INTERSECTION;var a=W.orientationIndex(r,i,s),u=W.orientationIndex(r,i,o);if(a>0&&u>0||a<0&&u<0)return n.NO_INTERSECTION;var l=W.orientationIndex(s,o,r),c=W.orientationIndex(s,o,i);if(l>0&&c>0||l<0&&c<0)return n.NO_INTERSECTION;var h=a===0&&u===0&&l===0&&c===0;return h?this.computeCollinearIntersection(r,i,s,o):(a===0||u===0||l===0||c===0?(this._isProper=!1,r.equals2D(s)||r.equals2D(o)?this._intPt[0]=r:i.equals2D(s)||i.equals2D(o)?this._intPt[0]=i:a===0?this._intPt[0]=new x(s):u===0?this._intPt[0]=new x(o):l===0?this._intPt[0]=new x(r):c===0&&(this._intPt[0]=new x(i))):(this._isProper=!0,this._intPt[0]=this.intersection(r,i,s,o)),n.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(r,i,s,o){var a=r,u=W.distancePointLine(r,s,o),l=W.distancePointLine(i,s,o);return l<u&&(u=l,a=i),l=W.distancePointLine(s,r,i),l<u&&(u=l,a=s),l=W.distancePointLine(o,r,i),l<u&&(u=l,a=o),a},t}(Gt),Is=function(){};Is.prototype.interfaces_=function(){return[]},Is.prototype.getClass=function(){return Is},Is.orientationIndex=function(t,e,r){var i=e.x-t.x,s=e.y-t.y,o=r.x-e.x,a=r.y-e.y;return Is.signOfDet2x2(i,s,o,a)},Is.signOfDet2x2=function(t,e,r,i){var s=null,o=null,a=null;if(s=1,t===0||i===0)return e===0||r===0?0:e>0?r>0?-s:s:r>0?s:-s;if(e===0||r===0)return i>0?t>0?s:-s:t>0?-s:s;if(e>0?i>0?e<=i||(s=-s,o=t,t=r,r=o,o=e,e=i,i=o):e<=-i?(s=-s,r=-r,i=-i):(o=t,t=-r,r=o,o=e,e=-i,i=o):i>0?-e<=i?(s=-s,t=-t,e=-e):(o=-t,t=r,r=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,r=-r,i=-i):(s=-s,o=-t,t=-r,r=o,o=-e,e=-i,i=o),t>0)if(r>0){if(!(t<=r))return s}else return s;else{if(r>0)return-s;if(t>=r)s=-s,t=-t,r=-r;else return-s}for(;;){if(a=Math.floor(r/t),r=r-a*t,i=i-a*e,i<0)return-s;if(i>e)return s;if(t>r+r){if(e<i+i)return s}else{if(e>i+i)return-s;r=t-r,i=e-i,s=-s}if(i===0)return r===0?0:-s;if(r===0||(a=Math.floor(t/r),t=t-a*r,e=e-a*i,e<0))return s;if(e>i)return-s;if(r>t+t){if(i<e+e)return-s}else{if(i>e+e)return s;t=r-t,e=i-e,s=-s}if(e===0)return t===0?0:s;if(t===0)return-s}};var Wr=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};Wr.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var r=t.x,i=e.x;return r>i&&(r=e.x,i=t.x),this._p.x>=r&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var s=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,u=e.y-this._p.y,l=Is.signOfDet2x2(s,o,a,u);if(l===0)return this._isPointOnSegment=!0,null;u<o&&(l=-l),l>0&&this._crossingCount++}},Wr.prototype.isPointInPolygon=function(){return this.getLocation()!==R.EXTERIOR},Wr.prototype.getLocation=function(){return this._isPointOnSegment?R.BOUNDARY:this._crossingCount%2===1?R.INTERIOR:R.EXTERIOR},Wr.prototype.isOnSegment=function(){return this._isPointOnSegment},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr},Wr.locatePointInRing=function(){if(arguments[0]instanceof x&&nt(arguments[1],_t)){for(var t=arguments[0],e=arguments[1],r=new Wr(t),i=new x,s=new x,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,s),r.countSegment(i,s),r.isOnSegment())return r.getLocation();return r.getLocation()}else if(arguments[0]instanceof x&&arguments[1]instanceof Array){for(var a=arguments[0],u=arguments[1],l=new Wr(a),c=1;c<u.length;c++){var h=u[c],p=u[c-1];if(l.countSegment(h,p),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var W=function(){},Ps={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};W.prototype.interfaces_=function(){return[]},W.prototype.getClass=function(){return W},W.orientationIndex=function(t,e,r){return Le.orientationIndex(t,e,r)},W.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,r=t[0].x,i=1;i<t.length-1;i++){var s=t[i].x-r,o=t[i+1].y,a=t[i-1].y;e+=s*(a-o)}return e/2}else if(nt(arguments[0],_t)){var u=arguments[0],l=u.size();if(l<3)return 0;var c=new x,h=new x,p=new x;u.getCoordinate(0,h),u.getCoordinate(1,p);var v=h.x;p.x-=v;for(var w=0,I=1;I<l-1;I++)c.y=h.y,h.x=p.x,h.y=p.y,u.getCoordinate(I+1,p),p.x-=v,w+=h.x*(c.y-p.y);return w/2}},W.distanceLineLine=function(t,e,r,i){if(t.equals(e))return W.distancePointLine(t,r,i);if(r.equals(i))return W.distancePointLine(i,t,e);var s=!1;if(!j.intersects(t,e,r,i))s=!0;else{var o=(e.x-t.x)*(i.y-r.y)-(e.y-t.y)*(i.x-r.x);if(o===0)s=!0;else{var a=(t.y-r.y)*(i.x-r.x)-(t.x-r.x)*(i.y-r.y),u=(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y),l=u/o,c=a/o;(c<0||c>1||l<0||l>1)&&(s=!0)}}return s?er.min(W.distancePointLine(t,r,i),W.distancePointLine(e,r,i),W.distancePointLine(r,t,e),W.distancePointLine(i,t,e)):0},W.isPointInRing=function(t,e){return W.locatePointInRing(t,e)!==R.EXTERIOR},W.computeLength=function(t){var e=t.size();if(e<=1)return 0;var r=0,i=new x;t.getCoordinate(0,i);for(var s=i.x,o=i.y,a=1;a<e;a++){t.getCoordinate(a,i);var u=i.x,l=i.y,c=u-s,h=l-o;r+=Math.sqrt(c*c+h*h),s=u,o=l}return r},W.isCCW=function(t){var e=t.length-1;if(e<3)throw new Vt("Ring has fewer than 4 points, so orientation cannot be determined");for(var r=t[0],i=0,s=1;s<=e;s++){var o=t[s];o.y>r.y&&(r=o,i=s)}var a=i;do a=a-1,a<0&&(a=e);while(t[a].equals2D(r)&&a!==i);var u=i;do u=(u+1)%e;while(t[u].equals2D(r)&&u!==i);var l=t[a],c=t[u];if(l.equals2D(r)||c.equals2D(r)||l.equals2D(c))return!1;var h=W.computeOrientation(l,r,c),p=!1;return h===0?p=l.x>c.x:p=h>0,p},W.locatePointInRing=function(t,e){return Wr.locatePointInRing(t,e)},W.distancePointLinePerpendicular=function(t,e,r){var i=(r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y),s=((e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y))/i;return Math.abs(s)*Math.sqrt(i)},W.computeOrientation=function(t,e,r){return W.orientationIndex(t,e,r)},W.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new Vt("Line array must contain at least one vertex");for(var r=t.distance(e[0]),i=0;i<e.length-1;i++){var s=W.distancePointLine(t,e[i],e[i+1]);s<r&&(r=s)}return r}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];if(a.x===u.x&&a.y===u.y)return o.distance(a);var l=(u.x-a.x)*(u.x-a.x)+(u.y-a.y)*(u.y-a.y),c=((o.x-a.x)*(u.x-a.x)+(o.y-a.y)*(u.y-a.y))/l;if(c<=0)return o.distance(a);if(c>=1)return o.distance(u);var h=((a.y-o.y)*(u.x-a.x)-(a.x-o.x)*(u.y-a.y))/l;return Math.abs(h)*Math.sqrt(l)}},W.isOnLine=function(t,e){for(var r=new zi,i=1;i<e.length;i++){var s=e[i-1],o=e[i];if(r.computeIntersection(t,s,o),r.hasIntersection())return!0}return!1},Ps.CLOCKWISE.get=function(){return-1},Ps.RIGHT.get=function(){return W.CLOCKWISE},Ps.COUNTERCLOCKWISE.get=function(){return 1},Ps.LEFT.get=function(){return W.COUNTERCLOCKWISE},Ps.COLLINEAR.get=function(){return 0},Ps.STRAIGHT.get=function(){return W.COLLINEAR},Object.defineProperties(W,Ps);var Hn=function(){};Hn.prototype.filter=function(t){},Hn.prototype.interfaces_=function(){return[]},Hn.prototype.getClass=function(){return Hn};var rt=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},_n={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}};rt.prototype.isGeometryCollection=function(){return this.getSortIndex()===rt.SORTINDEX_GEOMETRYCOLLECTION},rt.prototype.getFactory=function(){return this._factory},rt.prototype.getGeometryN=function(t){return this},rt.prototype.getArea=function(){return 0},rt.prototype.isRectangle=function(){return!1},rt.prototype.equals=function(){if(arguments[0]instanceof rt){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof rt))return!1;var r=e;return this.equalsExact(r)}},rt.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},rt.prototype.geometryChanged=function(){this.apply(rt.geometryChangedFilter)},rt.prototype.geometryChangedAction=function(){this._envelope=null},rt.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())},rt.prototype.getLength=function(){return 0},rt.prototype.getNumGeometries=function(){return 1},rt.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.getSortIndex()!==r.getSortIndex()?this.getSortIndex()-r.getSortIndex():this.isEmpty()&&r.isEmpty()?0:this.isEmpty()?-1:r.isEmpty()?1:this.compareToSameClass(r,i)}},rt.prototype.getUserData=function(){return this._userData},rt.prototype.getSRID=function(){return this._SRID},rt.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},rt.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===rt.SORTINDEX_GEOMETRYCOLLECTION)throw new Vt("This method does not support GeometryCollection arguments")},rt.prototype.equal=function(t,e,r){return r===0?t.equals(e):t.distance(e)<=r},rt.prototype.norm=function(){var t=this.copy();return t.normalize(),t},rt.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},rt.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new j(this._envelope)},rt.prototype.setSRID=function(t){this._SRID=t},rt.prototype.setUserData=function(t){this._userData=t},rt.prototype.compare=function(t,e){for(var r=t.iterator(),i=e.iterator();r.hasNext()&&i.hasNext();){var s=r.next(),o=i.next(),a=s.compareTo(o);if(a!==0)return a}return r.hasNext()?1:i.hasNext()?-1:0},rt.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},rt.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===rt.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===rt.SORTINDEX_MULTIPOINT||this.getSortIndex()===rt.SORTINDEX_MULTILINESTRING||this.getSortIndex()===rt.SORTINDEX_MULTIPOLYGON},rt.prototype.interfaces_=function(){return[Pu,cr,hr]},rt.prototype.getClass=function(){return rt},rt.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},rt.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},_n.serialVersionUID.get=function(){return 8763622679187377e3},_n.SORTINDEX_POINT.get=function(){return 0},_n.SORTINDEX_MULTIPOINT.get=function(){return 1},_n.SORTINDEX_LINESTRING.get=function(){return 2},_n.SORTINDEX_LINEARRING.get=function(){return 3},_n.SORTINDEX_MULTILINESTRING.get=function(){return 4},_n.SORTINDEX_POLYGON.get=function(){return 5},_n.SORTINDEX_MULTIPOLYGON.get=function(){return 6},_n.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},_n.geometryChangedFilter.get=function(){return Gl},Object.defineProperties(rt,_n);var Gl=function(){};Gl.interfaces_=function(){return[Hn]},Gl.filter=function(t){t.geometryChangedAction()};var wn=function(){};wn.prototype.filter=function(t){},wn.prototype.interfaces_=function(){return[]},wn.prototype.getClass=function(){return wn};var fr=function(){},Jn={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}};fr.prototype.isInBoundary=function(t){},fr.prototype.interfaces_=function(){return[]},fr.prototype.getClass=function(){return fr},Jn.Mod2BoundaryNodeRule.get=function(){return po},Jn.EndPointBoundaryNodeRule.get=function(){return go},Jn.MultiValentEndPointBoundaryNodeRule.get=function(){return mo},Jn.MonoValentEndPointBoundaryNodeRule.get=function(){return vo},Jn.MOD2_BOUNDARY_RULE.get=function(){return new po},Jn.ENDPOINT_BOUNDARY_RULE.get=function(){return new go},Jn.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new mo},Jn.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new vo},Jn.OGC_SFS_BOUNDARY_RULE.get=function(){return fr.MOD2_BOUNDARY_RULE},Object.defineProperties(fr,Jn);var po=function(){};po.prototype.isInBoundary=function(t){return t%2===1},po.prototype.interfaces_=function(){return[fr]},po.prototype.getClass=function(){return po};var go=function(){};go.prototype.isInBoundary=function(t){return t>0},go.prototype.interfaces_=function(){return[fr]},go.prototype.getClass=function(){return go};var mo=function(){};mo.prototype.isInBoundary=function(t){return t>1},mo.prototype.interfaces_=function(){return[fr]},mo.prototype.getClass=function(){return mo};var vo=function(){};vo.prototype.isInBoundary=function(t){return t===1},vo.prototype.interfaces_=function(){return[fr]},vo.prototype.getClass=function(){return vo};var $t=function(){};$t.prototype.add=function(){},$t.prototype.addAll=function(){},$t.prototype.isEmpty=function(){},$t.prototype.iterator=function(){},$t.prototype.size=function(){},$t.prototype.toArray=function(){},$t.prototype.remove=function(){};function Wl(n){this.message=n||""}Wl.prototype=new Error,Wl.prototype.name="IndexOutOfBoundsException";var yo=function(){};yo.prototype.hasNext=function(){},yo.prototype.next=function(){},yo.prototype.remove=function(){};var Or=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}($t);function _o(n){this.message=n||""}_o.prototype=new Error,_o.prototype.name="NoSuchElementException";var U=function(n){function t(){n.call(this),this.array_=[],arguments[0]instanceof $t&&this.addAll(arguments[0])}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[n,$t]},t.prototype.add=function(r){return arguments.length===1?this.array_.push(r):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.set=function(r,i){var s=this.array_[r];return this.array_[r]=i,s},t.prototype.iterator=function(){return new Hv(this)},t.prototype.get=function(r){if(r<0||r>=this.size())throw new Wl;return this.array_[r]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},t.prototype.remove=function(r){for(var i=this,s=!1,o=0,a=this.array_.length;o<a;o++)if(i.array_[o]===r){i.array_.splice(o,1),s=!0;break}return s},t}(Or),Hv=function(n){function t(e){n.call(this),this.arrayList_=e,this.position_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new _o;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(r){return this.arrayList_.set(this.position_-1,r)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(yo),Oa=function(n){function t(){if(n.call(this),arguments.length!==0){if(arguments.length===1){var r=arguments[0];this.ensureCapacity(r.length),this.add(r,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={coordArrayType:{configurable:!0}};return e.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(i){return this.get(i)},t.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=!1,u=s.iterator();u.hasNext();)i.add(u.next(),o),a=!0;return a}else return n.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var i=this,s=n.prototype.clone.call(this),o=0;o<this.size();o++)s.add(o,i.get(o).copy());return s},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];n.prototype.add.call(this,s)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1];return this.add(o,a,!0),!0}else if(arguments[0]instanceof x&&typeof arguments[1]=="boolean"){var u=arguments[0],l=arguments[1];if(!l&&this.size()>=1){var c=this.get(this.size()-1);if(c.equals2D(u))return null}n.prototype.add.call(this,u)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var h=arguments[0],p=arguments[1];return this.add(h,p),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var v=arguments[0],w=arguments[1],I=arguments[2];if(I)for(var P=0;P<v.length;P++)i.add(v[P],w);else for(var O=v.length-1;O>=0;O--)i.add(v[O],w);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof x){var m=arguments[0],_=arguments[1],g=arguments[2];if(!g){var y=this.size();if(y>0){if(m>0){var E=this.get(m-1);if(E.equals2D(_))return null}if(m<y){var C=this.get(m);if(C.equals2D(_))return null}}}n.prototype.add.call(this,m,_)}}else if(arguments.length===4){var b=arguments[0],T=arguments[1],M=arguments[2],N=arguments[3],D=1;M>N&&(D=-1);for(var A=M;A!==N;A+=D)i.add(b[A],T);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new x(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,e),t}(U),dt=function(){},Tu={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Tu.ForwardComparator.get=function(){return Da},Tu.BidirectionalComparator.get=function(){return wo},Tu.coordArrayType.get=function(){return new Array(0).fill(null)},dt.prototype.interfaces_=function(){return[]},dt.prototype.getClass=function(){return dt},dt.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},dt.ptNotInList=function(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(dt.indexOf(i,e)<0)return i}return null},dt.scroll=function(t,e){var r=dt.indexOf(e,t);if(r<0)return null;var i=new Array(t.length).fill(null);ce.arraycopy(t,r,i,0,t.length-r),ce.arraycopy(t,0,i,t.length-r,r),ce.arraycopy(i,0,t,0,t.length)},dt.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!t[r].equals(e[r]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(i===s)return!0;if(i===null||s===null||i.length!==s.length)return!1;for(var a=0;a<i.length;a++)if(o.compare(i[a],s[a])!==0)return!1;return!0}},dt.intersection=function(t,e){for(var r=new Oa,i=0;i<t.length;i++)e.intersects(t[i])&&r.add(t[i],!0);return r.toCoordinateArray()},dt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},dt.removeRepeatedPoints=function(t){if(!dt.hasRepeatedPoints(t))return t;var e=new Oa(t,!1);return e.toCoordinateArray()},dt.reverse=function(t){for(var e=t.length-1,r=Math.trunc(e/2),i=0;i<=r;i++){var s=t[i];t[i]=t[e-i],t[e-i]=s}},dt.removeNull=function(t){for(var e=0,r=0;r<t.length;r++)t[r]!==null&&e++;var i=new Array(e).fill(null);if(e===0)return i;for(var s=0,o=0;o<t.length;o++)t[o]!==null&&(i[s++]=t[o]);return i},dt.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),r=0;r<t.length;r++)e[r]=new x(t[r]);return e}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=arguments[4],l=0;l<u;l++)o[a+l]=new x(i[s+l])},dt.isEqualReversed=function(t,e){for(var r=0;r<t.length;r++){var i=t[r],s=e[t.length-r-1];if(i.compareTo(s)!==0)return!1}return!0},dt.envelope=function(t){for(var e=new j,r=0;r<t.length;r++)e.expandToInclude(t[r]);return e},dt.toCoordinateArray=function(t){return t.toArray(dt.coordArrayType)},dt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},dt.indexOf=function(t,e){for(var r=0;r<e.length;r++)if(t.equals(e[r]))return r;return-1},dt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var r=t.length-1-e,i=t[e].compareTo(t[r]);if(i!==0)return i}return 1},dt.compare=function(t,e){for(var r=0;r<t.length&&r<e.length;){var i=t[r].compareTo(e[r]);if(i!==0)return i;r++}return r<e.length?-1:r<t.length?1:0},dt.minCoordinate=function(t){for(var e=null,r=0;r<t.length;r++)(e===null||e.compareTo(t[r])>0)&&(e=t[r]);return e},dt.extract=function(t,e,r){e=er.clamp(e,0,t.length),r=er.clamp(r,-1,t.length);var i=r-e+1;r<0&&(i=0),e>=t.length&&(i=0),r<e&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var o=0,a=e;a<=r;a++)s[o++]=t[a];return s},Object.defineProperties(dt,Tu);var Da=function(){};Da.prototype.compare=function(t,e){var r=t,i=e;return dt.compare(r,i)},Da.prototype.interfaces_=function(){return[lo]},Da.prototype.getClass=function(){return Da};var wo=function(){};wo.prototype.compare=function(t,e){var r=t,i=e;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;var s=dt.compare(r,i),o=dt.isEqualReversed(r,i);return o?0:s},wo.prototype.OLDcompare=function(t,e){var r=t,i=e;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;for(var s=dt.increasingDirection(r),o=dt.increasingDirection(i),a=s>0?0:r.length-1,u=o>0?0:r.length-1,l=0;l<r.length;l++){var c=r[a].compareTo(i[u]);if(c!==0)return c;a+=s,u+=o}return 0},wo.prototype.interfaces_=function(){return[lo]},wo.prototype.getClass=function(){return wo};var bs=function(){};bs.prototype.get=function(){},bs.prototype.put=function(){},bs.prototype.size=function(){},bs.prototype.values=function(){},bs.prototype.entrySet=function(){};var Jv=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(bs);function xa(n){this.message=n||""}xa.prototype=new Error,xa.prototype.name="OperationNotSupported";function Ou(){}Ou.prototype=new $t,Ou.prototype.contains=function(){};var ql=function(n){function t(){n.call(this),this.array_=[],arguments[0]instanceof $t&&this.addAll(arguments[0])}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.contains=function(r){for(var i=this,s=0,o=this.array_.length;s<o;s++){var a=i.array_[s];if(a===r)return!0}return!1},t.prototype.add=function(r){return this.contains(r)?!1:(this.array_.push(r),!0)},t.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.remove=function(r){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},t.prototype.iterator=function(){return new Bv(this)},t}(Ou),Bv=function(n){function t(e){n.call(this),this.hashSet_=e,this.position_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new _o;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new xa},t}(yo),Bn=0,Ui=1;function gd(n){return n===null?Bn:n.color}function Lt(n){return n===null?null:n.parent}function jn(n,t){n!==null&&(n.color=t)}function Xl(n){return n===null?null:n.left}function md(n){return n===null?null:n.right}function ye(){this.root_=null,this.size_=0}ye.prototype=new Jv,ye.prototype.get=function(n){for(var t=this.root_;t!==null;){var e=n.compareTo(t.key);if(e<0)t=t.left;else if(e>0)t=t.right;else return t.value}return null},ye.prototype.put=function(n,t){if(this.root_===null)return this.root_={key:n,value:t,left:null,right:null,parent:null,color:Bn,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var e=this.root_,r,i;do if(r=e,i=n.compareTo(e.key),i<0)e=e.left;else if(i>0)e=e.right;else{var s=e.value;return e.value=t,s}while(e!==null);var o={key:n,left:null,right:null,value:t,parent:r,color:Bn,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=o:r.right=o,this.fixAfterInsertion(o),this.size_++,null},ye.prototype.fixAfterInsertion=function(n){var t=this;for(n.color=Ui;n!=null&&n!==this.root_&&n.parent.color===Ui;)if(Lt(n)===Xl(Lt(Lt(n)))){var e=md(Lt(Lt(n)));gd(e)===Ui?(jn(Lt(n),Bn),jn(e,Bn),jn(Lt(Lt(n)),Ui),n=Lt(Lt(n))):(n===md(Lt(n))&&(n=Lt(n),t.rotateLeft(n)),jn(Lt(n),Bn),jn(Lt(Lt(n)),Ui),t.rotateRight(Lt(Lt(n))))}else{var r=Xl(Lt(Lt(n)));gd(r)===Ui?(jn(Lt(n),Bn),jn(r,Bn),jn(Lt(Lt(n)),Ui),n=Lt(Lt(n))):(n===Xl(Lt(n))&&(n=Lt(n),t.rotateRight(n)),jn(Lt(n),Bn),jn(Lt(Lt(n)),Ui),t.rotateLeft(Lt(Lt(n))))}this.root_.color=Bn},ye.prototype.values=function(){var n=new U,t=this.getFirstEntry();if(t!==null)for(n.add(t.value);(t=ye.successor(t))!==null;)n.add(t.value);return n},ye.prototype.entrySet=function(){var n=new ql,t=this.getFirstEntry();if(t!==null)for(n.add(t);(t=ye.successor(t))!==null;)n.add(t);return n},ye.prototype.rotateLeft=function(n){if(n!=null){var t=n.right;n.right=t.left,t.left!=null&&(t.left.parent=n),t.parent=n.parent,n.parent===null?this.root_=t:n.parent.left===n?n.parent.left=t:n.parent.right=t,t.left=n,n.parent=t}},ye.prototype.rotateRight=function(n){if(n!=null){var t=n.left;n.left=t.right,t.right!=null&&(t.right.parent=n),t.parent=n.parent,n.parent===null?this.root_=t:n.parent.right===n?n.parent.right=t:n.parent.left=t,t.right=n,n.parent=t}},ye.prototype.getFirstEntry=function(){var n=this.root_;if(n!=null)for(;n.left!=null;)n=n.left;return n},ye.successor=function(n){if(n===null)return null;if(n.right!==null){for(var t=n.right;t.left!==null;)t=t.left;return t}else{for(var e=n.parent,r=n;e!==null&&r===e.right;)r=e,e=e.parent;return e}},ye.prototype.size=function(){return this.size_};var Ma=function(){};Ma.prototype.interfaces_=function(){return[]},Ma.prototype.getClass=function(){return Ma};function vd(){}vd.prototype=new Ou;function qr(){this.array_=[],arguments[0]instanceof $t&&this.addAll(arguments[0])}qr.prototype=new vd,qr.prototype.contains=function(n){for(var t=this,e=0,r=this.array_.length;e<r;e++){var i=t.array_[e];if(i.compareTo(n)===0)return!0}return!1},qr.prototype.add=function(n){var t=this;if(this.contains(n))return!1;for(var e=0,r=this.array_.length;e<r;e++){var i=t.array_[e];if(i.compareTo(n)===1)return t.array_.splice(e,0,n),!0}return this.array_.push(n),!0},qr.prototype.addAll=function(n){for(var t=this,e=n.iterator();e.hasNext();)t.add(e.next());return!0},qr.prototype.remove=function(n){throw new xa},qr.prototype.size=function(){return this.array_.length},qr.prototype.isEmpty=function(){return this.array_.length===0},qr.prototype.toArray=function(){for(var n=this,t=[],e=0,r=this.array_.length;e<r;e++)t.push(n.array_[e]);return t},qr.prototype.iterator=function(){return new Du(this)};var Du=function(n){this.treeSet_=n,this.position_=0};Du.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new _o;return this.treeSet_.array_[this.position_++]},Du.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Du.prototype.remove=function(){throw new xa};var Gi=function(){};Gi.sort=function(){var t=arguments[0],e,r,i,s;if(arguments.length===1)s=function(a,u){return a.compareTo(u)},t.sort(s);else if(arguments.length===2)i=arguments[1],s=function(a,u){return i.compare(a,u)},t.sort(s);else if(arguments.length===3){r=t.slice(arguments[1],arguments[2]),r.sort();var o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length));for(t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])}else if(arguments.length===4)for(r=t.slice(arguments[1],arguments[2]),i=arguments[3],s=function(a,u){return i.compare(a,u)},r.sort(s),o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length)),t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])},Gi.asList=function(t){for(var e=new U,r=0,i=t.length;r<i;r++)e.add(t[r]);return e};var It=function(){},Dr={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}};Dr.P.get=function(){return 0},Dr.L.get=function(){return 1},Dr.A.get=function(){return 2},Dr.FALSE.get=function(){return-1},Dr.TRUE.get=function(){return-2},Dr.DONTCARE.get=function(){return-3},Dr.SYM_FALSE.get=function(){return"F"},Dr.SYM_TRUE.get=function(){return"T"},Dr.SYM_DONTCARE.get=function(){return"*"},Dr.SYM_P.get=function(){return"0"},Dr.SYM_L.get=function(){return"1"},Dr.SYM_A.get=function(){return"2"},It.prototype.interfaces_=function(){return[]},It.prototype.getClass=function(){return It},It.toDimensionSymbol=function(t){switch(t){case It.FALSE:return It.SYM_FALSE;case It.TRUE:return It.SYM_TRUE;case It.DONTCARE:return It.SYM_DONTCARE;case It.P:return It.SYM_P;case It.L:return It.SYM_L;case It.A:return It.SYM_A}throw new Vt("Unknown dimension value: "+t)},It.toDimensionValue=function(t){switch(Na.toUpperCase(t)){case It.SYM_FALSE:return It.FALSE;case It.SYM_TRUE:return It.TRUE;case It.SYM_DONTCARE:return It.DONTCARE;case It.SYM_P:return It.P;case It.SYM_L:return It.L;case It.SYM_A:return It.A}throw new Vt("Unknown dimension symbol: "+t)},Object.defineProperties(It,Dr);var Xr=function(){};Xr.prototype.filter=function(t){},Xr.prototype.interfaces_=function(){return[]},Xr.prototype.getClass=function(){return Xr};var xr=function(){};xr.prototype.filter=function(t,e){},xr.prototype.isDone=function(){},xr.prototype.isGeometryChanged=function(){},xr.prototype.interfaces_=function(){return[]},xr.prototype.getClass=function(){return xr};var Ce=function(n){function t(r,i){if(n.call(this,i),this._geometries=r||[],n.hasNullElements(this._geometries))throw new Vt("geometries must not contain null elements")}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new j,o=0;o<this._geometries.length;o++)s.expandToInclude(i._geometries[o].getEnvelopeInternal());return s},t.prototype.getGeometryN=function(i){return this._geometries[i]},t.prototype.getSortIndex=function(){return n.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var i=this,s=new Array(this.getNumPoints()).fill(null),o=-1,a=0;a<this._geometries.length;a++)for(var u=i._geometries[a].getCoordinates(),l=0;l<u.length;l++)o++,s[o]=u[l];return s},t.prototype.getArea=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getArea();return s},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._geometries.length!==a._geometries.length)return!1;for(var u=0;u<this._geometries.length;u++)if(!i._geometries[u].equalsExact(a._geometries[u],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();Gi.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var i=this,s=It.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getBoundaryDimension());return s},t.prototype.getDimension=function(){for(var i=this,s=It.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getDimension());return s},t.prototype.getLength=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getNumPoints();return s},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createGeometryCollection(o)},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=new qr(Gi.asList(this._geometries)),a=new qr(Gi.asList(s._geometries));return this.compare(o,a)}else if(arguments.length===2){for(var u=arguments[0],l=arguments[1],c=u,h=this.getNumGeometries(),p=c.getNumGeometries(),v=0;v<h&&v<p;){var w=i.getGeometryN(v),I=c.getGeometryN(v),P=w.compareToSameClass(I,l);if(P!==0)return P;v++}return v<h?1:v<p?-1:0}},t.prototype.apply=function(){var i=this;if(nt(arguments[0],wn))for(var s=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(s);else if(nt(arguments[0],xr)){var a=arguments[0];if(this._geometries.length===0)return null;for(var u=0;u<this._geometries.length&&(i._geometries[u].apply(a),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(nt(arguments[0],Xr)){var l=arguments[0];l.filter(this);for(var c=0;c<this._geometries.length;c++)i._geometries[c].apply(l)}else if(nt(arguments[0],Hn)){var h=arguments[0];h.filter(this);for(var p=0;p<this._geometries.length;p++)i._geometries[p].apply(h)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),ct.shouldNeverReachHere(),null},t.prototype.clone=function(){var i=this,s=n.prototype.clone.call(this);s._geometries=new Array(this._geometries.length).fill(null);for(var o=0;o<this._geometries.length;o++)s._geometries[o]=i._geometries[o].clone();return s},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,e),t}(rt),Wi=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return rt.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?It.FALSE:0},t.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var s=0;s<this._geometries.length;s++)if(!i._geometries[s].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[s-1-a]=i._geometries[a].reverse();return this.getFactory().createMultiLineString(o)},t.prototype.getBoundary=function(){return new dr(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[Ma]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,e),t}(Ce),dr=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],e=fr.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._geom=r,this._geomFact=r.getFactory(),this._bnRule=i}};dr.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},dr.prototype.getBoundary=function(){return this._geom instanceof qt?this.boundaryLineString(this._geom):this._geom instanceof Wi?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},dr.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this._bnRule.isInBoundary(2);return e?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},dr.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},dr.prototype.computeBoundaryCoordinates=function(t){var e=this,r=new U;this._endpointMap=new ye;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);s.getNumPoints()!==0&&(e.addEndpoint(s.getCoordinateN(0)),e.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),u=a.getValue(),l=u.count;e._bnRule.isInBoundary(l)&&r.add(a.getKey())}return dt.toCoordinateArray(r)},dr.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);e===null&&(e=new xu,this._endpointMap.put(t,e)),e.count++},dr.prototype.interfaces_=function(){return[]},dr.prototype.getClass=function(){return dr},dr.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new dr(t);return e.getBoundary()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new dr(r,i);return s.getBoundary()}};var xu=function(){this.count=null};xu.prototype.interfaces_=function(){return[]},xu.prototype.getClass=function(){return xu};function jv(){}function Zv(){}var Kv=function(){};function Qv(){}function $v(){}function ty(){}var pr=function(){},Yl={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};pr.prototype.interfaces_=function(){return[]},pr.prototype.getClass=function(){return pr},pr.chars=function(t,e){for(var r=new Array(e).fill(null),i=0;i<e;i++)r[i]=t;return String(r)},pr.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new Qv,r=new jv;return t.printStackTrace(r),e.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],o="";new Zv(pr.getStackTrace(i));for(var a=new ty,u=0;u<s;u++)try{o+=a.readLine()+pr.NEWLINE}catch(l){if(l instanceof $v)ct.shouldNeverReachHere();else throw l}finally{}return o}},pr.split=function(t,e){for(var r=e.length,i=new U,s=""+t,o=s.indexOf(e);o>=0;){var a=s.substring(0,o);i.add(a),s=s.substring(o+r),o=s.indexOf(e)}s.length>0&&i.add(s);for(var u=new Array(i.size()).fill(null),l=0;l<u.length;l++)u[l]=i.get(l);return u},pr.toString=function(){if(arguments.length===1){var t=arguments[0];return pr.SIMPLE_ORDINATE_FORMAT.format(t)}},pr.spaces=function(t){return pr.chars(" ",t)},Yl.NEWLINE.get=function(){return ce.getProperty("line.separator")},Yl.SIMPLE_ORDINATE_FORMAT.get=function(){return new Kv},Object.defineProperties(pr,Yl);var Yt=function(){};Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.copyCoord=function(t,e,r,i){for(var s=Math.min(t.getDimension(),r.getDimension()),o=0;o<s;o++)r.setOrdinate(i,o,t.getOrdinate(e,o))},Yt.isRing=function(t){var e=t.size();return e===0?!0:e<=3?!1:t.getOrdinate(0,_t.X)===t.getOrdinate(e-1,_t.X)&&t.getOrdinate(0,_t.Y)===t.getOrdinate(e-1,_t.Y)},Yt.isEqual=function(t,e){var r=t.size(),i=e.size();if(r!==i)return!1;for(var s=Math.min(t.getDimension(),e.getDimension()),o=0;o<r;o++)for(var a=0;a<s;a++){var u=t.getOrdinate(o,a),l=e.getOrdinate(o,a);if(t.getOrdinate(o,a)!==e.getOrdinate(o,a)&&!(ot.isNaN(u)&&ot.isNaN(l)))return!1}return!0},Yt.extend=function(t,e,r){var i=t.create(r,e.getDimension()),s=e.size();if(Yt.copy(e,0,i,0,s),s>0)for(var o=s;o<r;o++)Yt.copy(e,s-1,i,o,1);return i},Yt.reverse=function(t){for(var e=t.size()-1,r=Math.trunc(e/2),i=0;i<=r;i++)Yt.swap(t,i,e-i)},Yt.swap=function(t,e,r){if(e===r)return null;for(var i=0;i<t.getDimension();i++){var s=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(r,i)),t.setOrdinate(r,i,s)}},Yt.copy=function(t,e,r,i,s){for(var o=0;o<s;o++)Yt.copyCoord(t,e+o,r,i+o)},Yt.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var r=t.getDimension(),i=new zr;i.append("(");for(var s=0;s<e;s++){s>0&&i.append(" ");for(var o=0;o<r;o++)o>0&&i.append(","),i.append(pr.toString(t.getOrdinate(s,o)))}return i.append(")"),i.toString()}},Yt.ensureValidRing=function(t,e){var r=e.size();if(r===0)return e;if(r<=3)return Yt.createClosedRing(t,e,4);var i=e.getOrdinate(0,_t.X)===e.getOrdinate(r-1,_t.X)&&e.getOrdinate(0,_t.Y)===e.getOrdinate(r-1,_t.Y);return i?e:Yt.createClosedRing(t,e,r+1)},Yt.createClosedRing=function(t,e,r){var i=t.create(r,e.getDimension()),s=e.size();Yt.copy(e,0,i,0,s);for(var o=s;o<r;o++)Yt.copy(e,0,i,o,1);return i};var qt=function(n){function t(r,i){n.call(this,i),this._points=null,this.init(r)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new j:this._points.expandEnvelope(new j)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return n.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._points.size()!==a._points.size())return!1;for(var u=0;u<this._points.size();u++)if(!i.equal(i._points.getCoordinate(u),a._points.getCoordinate(u),o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<Math.trunc(this._points.size()/2);s++){var o=i._points.size()-1-s;if(!i._points.getCoordinate(s).equals(i._points.getCoordinate(o)))return i._points.getCoordinate(s).compareTo(i._points.getCoordinate(o))>0&&Yt.reverse(i._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?It.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return W.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var i=this._points.copy();Yt.reverse(i);var s=this.getFactory().createLineString(i);return s},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],o=s,a=0,u=0;a<this._points.size()&&u<o._points.size();){var l=i._points.getCoordinate(a).compareTo(o._points.getCoordinate(u));if(l!==0)return l;a++,u++}return a<this._points.size()?1:u<o._points.size()?-1:0}else if(arguments.length===2){var c=arguments[0],h=arguments[1],p=c;return h.compare(this._points,p._points)}},t.prototype.apply=function(){var i=this;if(nt(arguments[0],wn))for(var s=arguments[0],o=0;o<this._points.size();o++)s.filter(i._points.getCoordinate(o));else if(nt(arguments[0],xr)){var a=arguments[0];if(this._points.size()===0)return null;for(var u=0;u<this._points.size()&&(a.filter(i._points,u),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(nt(arguments[0],Xr)){var l=arguments[0];l.filter(this)}else if(nt(arguments[0],Hn)){var c=arguments[0];c.filter(this)}},t.prototype.getBoundary=function(){return new dr(this).getBoundary()},t.prototype.isEquivalentClass=function(i){return i instanceof t},t.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._points=this._points.clone(),i},t.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new Vt("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},t.prototype.isCoordinate=function(i){for(var s=this,o=0;o<this._points.size();o++)if(s._points.getCoordinate(o).equals(i))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},t.prototype.interfaces_=function(){return[Ma]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,e),t}(rt),La=function(){};La.prototype.interfaces_=function(){return[]},La.prototype.getClass=function(){return La};var We=function(n){function t(r,i){n.call(this,i),this._coordinates=r||null,this.init(this._coordinates)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new j;var i=new j;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},t.prototype.getSortIndex=function(){return n.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return It.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],s=i;return this.getCoordinate().compareTo(s.getCoordinate())}else if(arguments.length===2){var o=arguments[0],a=arguments[1],u=o;return a.compare(this._coordinates,u._coordinates)}},t.prototype.apply=function(){if(nt(arguments[0],wn)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(nt(arguments[0],xr)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(nt(arguments[0],Xr)){var o=arguments[0];o.filter(this)}else if(nt(arguments[0],Hn)){var a=arguments[0];a.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),ct.isTrue(i.size()<=1),this._coordinates=i},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[La]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,e),t}(rt),yi=function(){};yi.prototype.interfaces_=function(){return[]},yi.prototype.getClass=function(){return yi};var te=function(n){function t(r,i,s){if(n.call(this,s),this._shell=null,this._holes=null,r===null&&(r=this.getFactory().createLinearRing()),i===null&&(i=[]),n.hasNullElements(i))throw new Vt("holes must not contain null elements");if(r.isEmpty()&&n.hasNonEmptyElements(i))throw new Vt("shell is empty but holes are not");this._shell=r,this._holes=i}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return n.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var s=new Array(this.getNumPoints()).fill(null),o=-1,a=this._shell.getCoordinates(),u=0;u<a.length;u++)o++,s[o]=a[u];for(var l=0;l<this._holes.length;l++)for(var c=i._holes[l].getCoordinates(),h=0;h<c.length;h++)o++,s[o]=c[h];return s},t.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(W.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)s-=Math.abs(W.signedArea(i._holes[o].getCoordinateSequence()));return s},t.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),s=this.getEnvelopeInternal(),o=0;o<5;o++){var a=i.getX(o);if(!(a===s.getMinX()||a===s.getMaxX()))return!1;var u=i.getY(o);if(!(u===s.getMinY()||u===s.getMaxY()))return!1}for(var l=i.getX(0),c=i.getY(0),h=1;h<=4;h++){var p=i.getX(h),v=i.getY(h),w=p!==l,I=v!==c;if(w===I)return!1;l=p,c=v}return!0},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s,u=this._shell,l=a._shell;if(!u.equalsExact(l,o)||this._holes.length!==a._holes.length)return!1;for(var c=0;c<this._holes.length;c++)if(!i._holes[c].equalsExact(a._holes[c],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var s=0;s<this._holes.length;s++)i.normalize(i._holes[s],!1);Gi.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];if(o.isEmpty())return null;var u=new Array(o.getCoordinates().length-1).fill(null);ce.arraycopy(o.getCoordinates(),0,u,0,u.length);var l=dt.minCoordinate(o.getCoordinates());dt.scroll(u,l),ce.arraycopy(u,0,o.getCoordinates(),0,u.length),o.getCoordinates()[u.length]=u[0],W.isCCW(o.getCoordinates())===a&&dt.reverse(o.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var i=this,s=0;s+=this._shell.getLength();for(var o=0;o<this._holes.length;o++)s+=i._holes[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=this._shell.getNumPoints(),o=0;o<this._holes.length;o++)s+=i._holes[o].getNumPoints();return s},t.prototype.reverse=function(){var i=this,s=this.copy();s._shell=this._shell.copy().reverse(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].copy().reverse();return s},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=this._shell,a=s._shell;return o.compareToSameClass(a)}else if(arguments.length===2){var u=arguments[0],l=arguments[1],c=u,h=this._shell,p=c._shell,v=h.compareToSameClass(p,l);if(v!==0)return v;for(var w=this.getNumInteriorRing(),I=c.getNumInteriorRing(),P=0;P<w&&P<I;){var O=i.getInteriorRingN(P),m=c.getInteriorRingN(P),_=O.compareToSameClass(m,l);if(_!==0)return _;P++}return P<w?1:P<I?-1:0}},t.prototype.apply=function(i){var s=this;if(nt(i,wn)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)s._holes[o].apply(i)}else if(nt(i,xr)){if(this._shell.apply(i),!i.isDone())for(var a=0;a<this._holes.length&&(s._holes[a].apply(i),!i.isDone());a++);i.isGeometryChanged()&&this.geometryChanged()}else if(nt(i,Xr))i.filter(this);else if(nt(i,Hn)){i.filter(this),this._shell.apply(i);for(var u=0;u<this._holes.length;u++)s._holes[u].apply(i)}},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var s=new Array(this._holes.length+1).fill(null);s[0]=this._shell;for(var o=0;o<this._holes.length;o++)s[o+1]=i._holes[o];return s.length<=1?this.getFactory().createLinearRing(s[0].getCoordinateSequence()):this.getFactory().createMultiLineString(s)},t.prototype.clone=function(){var i=this,s=n.prototype.clone.call(this);s._shell=this._shell.clone(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].clone();return s},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var i=this,s=this._shell.copy(),o=new Array(this._holes.length).fill(null),a=0;a<o.length;a++)o[a]=i._holes[a].copy();return new t(s,o,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(i){return this._holes[i]},t.prototype.interfaces_=function(){return[yi]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,e),t}(rt),Eo=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return rt.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return n.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return It.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[La]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,e),t}(Ce),En=function(n){function t(r,i){r instanceof x&&i instanceof pt&&(r=i.getCoordinateSequenceFactory().create(r)),n.call(this,r,i),this.validateConstruction()}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return rt.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return It.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:n.prototype.isClosed.call(this)},t.prototype.reverse=function(){var i=this._points.copy();Yt.reverse(i);var s=this.getFactory().createLinearRing(i);return s},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!n.prototype.isClosed.call(this))throw new Vt("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new Vt("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t}(qt),Sn=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return rt.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createMultiPolygon(o)},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new U,o=0;o<this._geometries.length;o++)for(var a=i._geometries[o],u=a.getBoundary(),l=0;l<u.getNumGeometries();l++)s.add(u.getGeometryN(l));var c=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(c))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[yi]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,e),t}(Ce),gr=function(t){this._factory=t||null,this._isUserDataCopied=!1},Mu={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};gr.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},gr.prototype.edit=function(t,e){if(t===null)return null;var r=this.editInternal(t,e);return this._isUserDataCopied&&r.setUserData(t.getUserData()),r},gr.prototype.editInternal=function(t,e){return this._factory===null&&(this._factory=t.getFactory()),t instanceof Ce?this.editGeometryCollection(t,e):t instanceof te?this.editPolygon(t,e):t instanceof We?e.edit(t,this._factory):t instanceof qt?e.edit(t,this._factory):(ct.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},gr.prototype.editGeometryCollection=function(t,e){for(var r=this,i=e.edit(t,this._factory),s=new U,o=0;o<i.getNumGeometries();o++){var a=r.edit(i.getGeometryN(o),e);a===null||a.isEmpty()||s.add(a)}return i.getClass()===Eo?this._factory.createMultiPoint(s.toArray([])):i.getClass()===Wi?this._factory.createMultiLineString(s.toArray([])):i.getClass()===Sn?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},gr.prototype.editPolygon=function(t,e){var r=this,i=e.edit(t,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),e);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var o=new U,a=0;a<i.getNumInteriorRing();a++){var u=r.edit(i.getInteriorRingN(a),e);u===null||u.isEmpty()||o.add(u)}return this._factory.createPolygon(s,o.toArray([]))},gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr},gr.GeometryEditorOperation=function(){},Mu.NoOpGeometryOperation.get=function(){return Aa},Mu.CoordinateOperation.get=function(){return Ra},Mu.CoordinateSequenceOperation.get=function(){return Fa},Object.defineProperties(gr,Mu);var Aa=function(){};Aa.prototype.edit=function(t,e){return t},Aa.prototype.interfaces_=function(){return[gr.GeometryEditorOperation]},Aa.prototype.getClass=function(){return Aa};var Ra=function(){};Ra.prototype.edit=function(t,e){var r=this.editCoordinates(t.getCoordinates(),t);return r===null?t:t instanceof En?e.createLinearRing(r):t instanceof qt?e.createLineString(r):t instanceof We?r.length>0?e.createPoint(r[0]):e.createPoint():t},Ra.prototype.interfaces_=function(){return[gr.GeometryEditorOperation]},Ra.prototype.getClass=function(){return Ra};var Fa=function(){};Fa.prototype.edit=function(t,e){return t instanceof En?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof qt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof We?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},Fa.prototype.interfaces_=function(){return[gr.GeometryEditorOperation]},Fa.prototype.getClass=function(){return Fa};var Ht=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var r=0;r<e;r++)t._coordinates[r]=new x}else if(nt(arguments[0],_t)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var s=0;s<this._coordinates.length;s++)t._coordinates[s]=i.getCoordinateCopy(s)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,o===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var u=arguments[0],l=arguments[1];this._coordinates=new Array(u).fill(null),this._dimension=l;for(var c=0;c<u;c++)t._coordinates[c]=new x}}},yd={serialVersionUID:{configurable:!0}};Ht.prototype.setOrdinate=function(t,e,r){switch(e){case _t.X:this._coordinates[t].x=r;break;case _t.Y:this._coordinates[t].y=r;break;case _t.Z:this._coordinates[t].z=r;break;default:throw new Vt("invalid ordinateIndex")}},Ht.prototype.size=function(){return this._coordinates.length},Ht.prototype.getOrdinate=function(t,e){switch(e){case _t.X:return this._coordinates[t].x;case _t.Y:return this._coordinates[t].y;case _t.Z:return this._coordinates[t].z}return ot.NaN},Ht.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var e=arguments[0],r=arguments[1];r.x=this._coordinates[e].x,r.y=this._coordinates[e].y,r.z=this._coordinates[e].z}},Ht.prototype.getCoordinateCopy=function(t){return new x(this._coordinates[t])},Ht.prototype.getDimension=function(){return this._dimension},Ht.prototype.getX=function(t){return this._coordinates[t].x},Ht.prototype.clone=function(){for(var t=this,e=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)e[r]=t._coordinates[r].clone();return new Ht(e,this._dimension)},Ht.prototype.expandEnvelope=function(t){for(var e=this,r=0;r<this._coordinates.length;r++)t.expandToInclude(e._coordinates[r]);return t},Ht.prototype.copy=function(){for(var t=this,e=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)e[r]=t._coordinates[r].copy();return new Ht(e,this._dimension)},Ht.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var e=new zr(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var r=1;r<this._coordinates.length;r++)e.append(", "),e.append(t._coordinates[r]);return e.append(")"),e.toString()}else return"()"},Ht.prototype.getY=function(t){return this._coordinates[t].y},Ht.prototype.toCoordinateArray=function(){return this._coordinates},Ht.prototype.interfaces_=function(){return[_t,hr]},Ht.prototype.getClass=function(){return Ht},yd.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(Ht,yd);var Cn=function(){},Hl={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};Cn.prototype.readResolve=function(){return Cn.instance()},Cn.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new Ht(t)}else if(nt(arguments[0],_t)){var e=arguments[0];return new Ht(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new Ht(r):new Ht(r,i)}},Cn.prototype.interfaces_=function(){return[co,hr]},Cn.prototype.getClass=function(){return Cn},Cn.instance=function(){return Cn.instanceObject},Hl.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},Hl.instanceObject.get=function(){return new Cn},Object.defineProperties(Cn,Hl);var _d=function(n){function t(){n.call(this),this.map_=new Map}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(r){return this.map_.get(r)||null},t.prototype.put=function(r,i){return this.map_.set(r,i),i},t.prototype.values=function(){for(var r=new U,i=this.map_.values(),s=i.next();!s.done;)r.add(s.value),s=i.next();return r},t.prototype.entrySet=function(){var r=new ql;return this.map_.entries().forEach(function(i){return r.add(i)}),r},t.prototype.size=function(){return this.map_.size()},t}(bs),Pt=function n(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=n.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Yr){var t=arguments[0];this._modelType=t,t===n.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this._modelType=n.FIXED,this.setScale(e)}else if(arguments[0]instanceof n){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},Jl={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Pt.prototype.equals=function(t){if(!(t instanceof Pt))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},Pt.prototype.compareTo=function(t){var e=t,r=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new Ur(r).compareTo(new Ur(i))},Pt.prototype.getScale=function(){return this._scale},Pt.prototype.isFloating=function(){return this._modelType===Pt.FLOATING||this._modelType===Pt.FLOATING_SINGLE},Pt.prototype.getType=function(){return this._modelType},Pt.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Pt.FLOATING?t="Floating":this._modelType===Pt.FLOATING_SINGLE?t="Floating-Single":this._modelType===Pt.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},Pt.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(ot.isNaN(t))return t;if(this._modelType===Pt.FLOATING_SINGLE){var e=t;return e}return this._modelType===Pt.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof x){var r=arguments[0];if(this._modelType===Pt.FLOATING)return null;r.x=this.makePrecise(r.x),r.y=this.makePrecise(r.y)}},Pt.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Pt.FLOATING?t=16:this._modelType===Pt.FLOATING_SINGLE?t=6:this._modelType===Pt.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},Pt.prototype.setScale=function(t){this._scale=Math.abs(t)},Pt.prototype.interfaces_=function(){return[hr,cr]},Pt.prototype.getClass=function(){return Pt},Pt.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},Jl.serialVersionUID.get=function(){return 7777263578777804e3},Jl.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Pt,Jl);var Yr=function n(t){this._name=t||null,n.nameToTypeMap.put(t,this)},Bl={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Yr.prototype.readResolve=function(){return Yr.nameToTypeMap.get(this._name)},Yr.prototype.toString=function(){return this._name},Yr.prototype.interfaces_=function(){return[hr]},Yr.prototype.getClass=function(){return Yr},Bl.serialVersionUID.get=function(){return-552860263173159e4},Bl.nameToTypeMap.get=function(){return new _d},Object.defineProperties(Yr,Bl),Pt.Type=Yr,Pt.FIXED=new Yr("FIXED"),Pt.FLOATING=new Yr("FLOATING"),Pt.FLOATING_SINGLE=new Yr("FLOATING SINGLE");var pt=function n(){this._precisionModel=new Pt,this._SRID=0,this._coordinateSequenceFactory=n.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?nt(arguments[0],co)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Pt&&(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]))},wd={serialVersionUID:{configurable:!0}};pt.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new x(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new x(t.getMinX(),t.getMinY()),new x(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new x(t.getMinX(),t.getMinY()),new x(t.getMinX(),t.getMaxY()),new x(t.getMaxX(),t.getMaxY()),new x(t.getMaxX(),t.getMinY()),new x(t.getMinX(),t.getMinY())]),null)},pt.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new qt(this.getCoordinateSequenceFactory().create(t),this);if(nt(t,_t))return new qt(t,this)}else return new qt(this.getCoordinateSequenceFactory().create([]),this)},pt.prototype.createMultiLineString=function(){if(arguments.length===0)return new Wi(null,this);if(arguments.length===1){var t=arguments[0];return new Wi(t,this)}},pt.prototype.buildGeometry=function(t){for(var e=null,r=!1,i=!1,s=t.iterator();s.hasNext();){var o=s.next(),a=o.getClass();e===null&&(e=a),a!==e&&(r=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(e===null)return this.createGeometryCollection();if(r||i)return this.createGeometryCollection(pt.toGeometryArray(t));var u=t.iterator().next(),l=t.size()>1;if(l){if(u instanceof te)return this.createMultiPolygon(pt.toPolygonArray(t));if(u instanceof qt)return this.createMultiLineString(pt.toLineStringArray(t));if(u instanceof We)return this.createMultiPoint(pt.toPointArray(t));ct.shouldNeverReachHere("Unhandled class: "+u.getClass().getName())}return u},pt.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},pt.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof x){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(nt(arguments[0],_t)){var e=arguments[0];return new We(e,this)}}},pt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},pt.prototype.createPolygon=function(){if(arguments.length===0)return new te(null,null,this);if(arguments.length===1){if(nt(arguments[0],_t)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof En){var r=arguments[0];return this.createPolygon(r,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new te(i,s,this)}},pt.prototype.getSRID=function(){return this._SRID},pt.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Ce(null,this);if(arguments.length===1){var t=arguments[0];return new Ce(t,this)}},pt.prototype.createGeometry=function(t){var e=new gr(this);return e.edit(t,{edit:function(){if(arguments.length===2){var r=arguments[0];return this._coordinateSequenceFactory.create(r)}}})},pt.prototype.getPrecisionModel=function(){return this._precisionModel},pt.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(nt(arguments[0],_t)){var e=arguments[0];return new En(e,this)}}},pt.prototype.createMultiPolygon=function(){if(arguments.length===0)return new Sn(null,this);if(arguments.length===1){var t=arguments[0];return new Sn(t,this)}},pt.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new Eo(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new Eo(e,this)}else if(arguments[0]instanceof Array){var r=arguments[0];return this.createMultiPoint(r!==null?this.getCoordinateSequenceFactory().create(r):null)}else if(nt(arguments[0],_t)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(i.size()).fill(null),o=0;o<i.size();o++){var a=t.getCoordinateSequenceFactory().create(1,i.getDimension());Yt.copy(i,o,a,0,1),s[o]=t.createPoint(a)}return this.createMultiPoint(s)}}},pt.prototype.interfaces_=function(){return[hr]},pt.prototype.getClass=function(){return pt},pt.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.getDefaultCoordinateSequenceFactory=function(){return Cn.instance()},pt.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},wd.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(pt,wd);var ey=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],Lu=function(t){this.geometryFactory=t||new pt};Lu.prototype.read=function(t){var e;typeof t=="string"?e=JSON.parse(t):e=t;var r=e.type;if(!Hr[r])throw new Error("Unknown GeoJSON type: "+e.type);return ey.indexOf(r)!==-1?Hr[r].apply(this,[e.coordinates]):r==="GeometryCollection"?Hr[r].apply(this,[e.geometries]):Hr[r].apply(this,[e])},Lu.prototype.write=function(t){var e=t.getGeometryType();if(!Zn[e])throw new Error("Geometry is not supported");return Zn[e].apply(this,[t])};var Hr={Feature:function(n){var t={};for(var e in n)t[e]=n[e];if(n.geometry){var r=n.geometry.type;if(!Hr[r])throw new Error("Unknown GeoJSON type: "+n.type);t.geometry=this.read(n.geometry)}return n.bbox&&(t.bbox=Hr.bbox.apply(this,[n.bbox])),t},FeatureCollection:function(n){var t=this,e={};if(n.features){e.features=[];for(var r=0;r<n.features.length;++r)e.features.push(t.read(n.features[r]))}return n.bbox&&(e.bbox=this.parse.bbox.apply(this,[n.bbox])),e},coordinates:function(n){for(var t=[],e=0;e<n.length;++e){var r=n[e];t.push(new x(r[0],r[1]))}return t},bbox:function(n){return this.geometryFactory.createLinearRing([new x(n[0],n[1]),new x(n[2],n[1]),new x(n[2],n[3]),new x(n[0],n[3]),new x(n[0],n[1])])},Point:function(n){var t=new x(n[0],n[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(n){for(var t=this,e=[],r=0;r<n.length;++r)e.push(Hr.Point.apply(t,[n[r]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(n){var t=Hr.coordinates.apply(this,[n]);return this.geometryFactory.createLineString(t)},MultiLineString:function(n){for(var t=this,e=[],r=0;r<n.length;++r)e.push(Hr.LineString.apply(t,[n[r]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(n){for(var t=this,e=Hr.coordinates.apply(this,[n[0]]),r=this.geometryFactory.createLinearRing(e),i=[],s=1;s<n.length;++s){var o=n[s],a=Hr.coordinates.apply(t,[o]),u=t.geometryFactory.createLinearRing(a);i.push(u)}return this.geometryFactory.createPolygon(r,i)},MultiPolygon:function(n){for(var t=this,e=[],r=0;r<n.length;++r){var i=n[r];e.push(Hr.Polygon.apply(t,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(n){for(var t=this,e=[],r=0;r<n.length;++r){var i=n[r];e.push(t.read(i))}return this.geometryFactory.createGeometryCollection(e)}},Zn={coordinate:function(n){return[n.x,n.y]},Point:function(n){var t=Zn.coordinate.apply(this,[n.getCoordinate()]);return{type:"Point",coordinates:t}},MultiPoint:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Zn.Point.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(n){for(var t=this,e=[],r=n.getCoordinates(),i=0;i<r.length;++i){var s=r[i];e.push(Zn.coordinate.apply(t,[s]))}return{type:"LineString",coordinates:e}},MultiLineString:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Zn.LineString.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(n){var t=this,e=[],r=Zn.LineString.apply(this,[n._shell]);e.push(r.coordinates);for(var i=0;i<n._holes.length;++i){var s=n._holes[i],o=Zn.LineString.apply(t,[s]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Zn.Polygon.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=i.getGeometryType();e.push(Zn[s].apply(t,[i]))}return{type:"GeometryCollection",geometries:e}}},jl=function(t){this.geometryFactory=t||new pt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Lu(this.geometryFactory)};jl.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===Pt.FIXED&&this.reducePrecision(e),e},jl.prototype.reducePrecision=function(t){var e=this,r,i;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(r=0,i=t.points.length;r<i;r++)e.precisionModel.makePrecise(t.points[r]);else if(t.geometries)for(r=0,i=t.geometries.length;r<i;r++)e.reducePrecision(t.geometries[r])};var Ed=function(){this.parser=new Lu(this.geometryFactory)};Ed.prototype.write=function(t){return this.parser.write(t)};var z=function(){},Au={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};z.prototype.interfaces_=function(){return[]},z.prototype.getClass=function(){return z},z.opposite=function(t){return t===z.LEFT?z.RIGHT:t===z.RIGHT?z.LEFT:t},Au.ON.get=function(){return 0},Au.LEFT.get=function(){return 1},Au.RIGHT.get=function(){return 2},Object.defineProperties(z,Au);function Ru(n){this.message=n||""}Ru.prototype=new Error,Ru.prototype.name="EmptyStackException";function Jr(){this.array_=[]}Jr.prototype=new Or,Jr.prototype.add=function(n){return this.array_.push(n),!0},Jr.prototype.get=function(n){if(n<0||n>=this.size())throw new Error;return this.array_[n]},Jr.prototype.push=function(n){return this.array_.push(n),n},Jr.prototype.pop=function(n){if(this.array_.length===0)throw new Ru;return this.array_.pop()},Jr.prototype.peek=function(){if(this.array_.length===0)throw new Ru;return this.array_[this.array_.length-1]},Jr.prototype.empty=function(){return this.array_.length===0},Jr.prototype.isEmpty=function(){return this.empty()},Jr.prototype.search=function(n){return this.array_.indexOf(n)},Jr.prototype.size=function(){return this.array_.length},Jr.prototype.toArray=function(){for(var n=this,t=[],e=0,r=this.array_.length;e<r;e++)t.push(n.array_[e]);return t};var Br=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Br.prototype.getCoordinate=function(){return this._minCoord},Br.prototype.getRightmostSide=function(t,e){var r=this.getRightmostSideOfSegment(t,e);return r<0&&(r=this.getRightmostSideOfSegment(t,e-1)),r<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),r},Br.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();ct.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],r=t[this._minIndex+1],i=W.computeOrientation(this._minCoord,r,e),s=!1;(e.y<this._minCoord.y&&r.y<this._minCoord.y&&i===W.COUNTERCLOCKWISE||e.y>this._minCoord.y&&r.y>this._minCoord.y&&i===W.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},Br.prototype.getRightmostSideOfSegment=function(t,e){var r=t.getEdge(),i=r.getCoordinates();if(e<0||e+1>=i.length||i[e].y===i[e+1].y)return-1;var s=z.LEFT;return i[e].y<i[e+1].y&&(s=z.RIGHT),s},Br.prototype.getEdge=function(){return this._orientedDe},Br.prototype.checkForRightmostCoordinate=function(t){for(var e=this,r=t.getEdge().getCoordinates(),i=0;i<r.length-1;i++)(e._minCoord===null||r[i].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=i,e._minCoord=r[i])},Br.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Br.prototype.findEdge=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next();i.isForward()&&e.checkForRightmostCoordinate(i)}ct.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var s=this.getRightmostSide(this._minDe,this._minIndex);s===z.LEFT&&(this._orientedDe=this._minDe.getSym())},Br.prototype.interfaces_=function(){return[]},Br.prototype.getClass=function(){return Br};var Kn=function(n){function t(e,r){n.call(this,t.msgWithCoord(e,r)),this.pt=r?new x(r):null,this.name="TopologyException"}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(r,i){return i?r:r+" [ "+i+" ]"},t}(Yn),Fu=function(){this.array_=[]};Fu.prototype.addLast=function(t){this.array_.push(t)},Fu.prototype.removeFirst=function(){return this.array_.shift()},Fu.prototype.isEmpty=function(){return this.array_.length===0};var Ie=function(){this._finder=null,this._dirEdgeList=new U,this._nodes=new U,this._rightMostCoord=null,this._env=null,this._finder=new Br};Ie.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},Ie.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Ie.prototype.computeNodeDepth=function(t){for(var e=this,r=null,i=t.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){r=s;break}}if(r===null)throw new Kn("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(r);for(var o=t.getEdges().iterator();o.hasNext();){var a=o.next();a.setVisited(!0),e.copySymDepths(a)}},Ie.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(z.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Ie.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Ie.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(z.RIGHT)>=1&&e.getDepth(z.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Ie.prototype.computeDepths=function(t){var e=this,r=new ql,i=new Fu,s=t.getNode();for(i.addLast(s),r.add(s),t.setVisited(!0);!i.isEmpty();){var o=i.removeFirst();r.add(o),e.computeNodeDepth(o);for(var a=o.getEdges().iterator();a.hasNext();){var u=a.next(),l=u.getSym();if(!l.isVisited()){var c=l.getNode();r.contains(c)||(i.addLast(c),r.add(c))}}}},Ie.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Ie.prototype.getEnvelope=function(){if(this._env===null){for(var t=new j,e=this._dirEdgeList.iterator();e.hasNext();)for(var r=e.next(),i=r.getEdge().getCoordinates(),s=0;s<i.length-1;s++)t.expandToInclude(i[s]);this._env=t}return this._env},Ie.prototype.addReachable=function(t){var e=this,r=new Jr;for(r.add(t);!r.empty();){var i=r.pop();e.add(i,r)}},Ie.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(z.LEFT,t.getDepth(z.RIGHT)),e.setDepth(z.RIGHT,t.getDepth(z.LEFT))},Ie.prototype.add=function(t,e){var r=this;t.setVisited(!0),this._nodes.add(t);for(var i=t.getEdges().iterator();i.hasNext();){var s=i.next();r._dirEdgeList.add(s);var o=s.getSym(),a=o.getNode();a.isVisited()||e.push(a)}},Ie.prototype.getNodes=function(){return this._nodes},Ie.prototype.getDirectedEdges=function(){return this._dirEdgeList},Ie.prototype.interfaces_=function(){return[cr]},Ie.prototype.getClass=function(){return Ie};var At=function n(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var r=arguments[0];this.init(1),this.location[z.ON]=r}else if(arguments[0]instanceof n){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)t.location[s]=i.location[s]}}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];this.init(3),this.location[z.ON]=o,this.location[z.LEFT]=a,this.location[z.RIGHT]=u}};At.prototype.setAllLocations=function(t){for(var e=this,r=0;r<this.location.length;r++)e.location[r]=t},At.prototype.isNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]!==R.NONE)return!1;return!0},At.prototype.setAllLocationsIfNull=function(t){for(var e=this,r=0;r<this.location.length;r++)e.location[r]===R.NONE&&(e.location[r]=t)},At.prototype.isLine=function(){return this.location.length===1},At.prototype.merge=function(t){var e=this;if(t.location.length>this.location.length){var r=new Array(3).fill(null);r[z.ON]=this.location[z.ON],r[z.LEFT]=R.NONE,r[z.RIGHT]=R.NONE,this.location=r}for(var i=0;i<this.location.length;i++)e.location[i]===R.NONE&&i<t.location.length&&(e.location[i]=t.location[i])},At.prototype.getLocations=function(){return this.location},At.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[z.LEFT];this.location[z.LEFT]=this.location[z.RIGHT],this.location[z.RIGHT]=t},At.prototype.toString=function(){var t=new zr;return this.location.length>1&&t.append(R.toLocationSymbol(this.location[z.LEFT])),t.append(R.toLocationSymbol(this.location[z.ON])),this.location.length>1&&t.append(R.toLocationSymbol(this.location[z.RIGHT])),t.toString()},At.prototype.setLocations=function(t,e,r){this.location[z.ON]=t,this.location[z.LEFT]=e,this.location[z.RIGHT]=r},At.prototype.get=function(t){return t<this.location.length?this.location[t]:R.NONE},At.prototype.isArea=function(){return this.location.length>1},At.prototype.isAnyNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]===R.NONE)return!0;return!1},At.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(z.ON,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.location[e]=r}},At.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(R.NONE)},At.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},At.prototype.allPositionsEqual=function(t){for(var e=this,r=0;r<this.location.length;r++)if(e.location[r]!==t)return!1;return!0},At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At};var Ot=function n(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new At(t),this.elt[1]=new At(t)}else if(arguments[0]instanceof n){var e=arguments[0];this.elt[0]=new At(e.elt[0]),this.elt[1]=new At(e.elt[1])}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.elt[0]=new At(R.NONE),this.elt[1]=new At(R.NONE),this.elt[r].setLocation(i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this.elt[0]=new At(s,o,a),this.elt[1]=new At(s,o,a)}else if(arguments.length===4){var u=arguments[0],l=arguments[1],c=arguments[2],h=arguments[3];this.elt[0]=new At(R.NONE,R.NONE,R.NONE),this.elt[1]=new At(R.NONE,R.NONE,R.NONE),this.elt[u].setLocations(l,c,h)}};Ot.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Ot.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Ot.prototype.isNull=function(t){return this.elt[t].isNull()},Ot.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.elt[e].setAllLocationsIfNull(r)}},Ot.prototype.isLine=function(t){return this.elt[t].isLine()},Ot.prototype.merge=function(t){for(var e=this,r=0;r<2;r++)e.elt[r]===null&&t.elt[r]!==null?e.elt[r]=new At(t.elt[r]):e.elt[r].merge(t.elt[r])},Ot.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Ot.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(z.ON)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return this.elt[e].get(r)}},Ot.prototype.toString=function(){var t=new zr;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Ot.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},Ot.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Ot.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(z.ON,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this.elt[r].setLocation(i,s)}},Ot.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Ot.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Ot.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new At(this.elt[t].location[0]))},Ot.prototype.interfaces_=function(){return[]},Ot.prototype.getClass=function(){return Ot},Ot.toLineLabel=function(t){for(var e=new Ot(R.NONE),r=0;r<2;r++)e.setLocation(r,t.getLocation(r));return e};var jt=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new U,this._pts=new U,this._label=new Ot(R.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new U,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};jt.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var e=new Array(this._pts.size()).fill(null),r=0;r<this._pts.size();r++)e[r]=t._pts.get(r);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=W.isCCW(this._ring.getCoordinates())},jt.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},jt.prototype.computePoints=function(t){var e=this;this._startDe=t;var r=t,i=!0;do{if(r===null)throw new Kn("Found null DirectedEdge");if(r.getEdgeRing()===e)throw new Kn("Directed Edge visited twice during ring-building at "+r.getCoordinate());e._edges.add(r);var s=r.getLabel();ct.isTrue(s.isArea()),e.mergeLabel(s),e.addPoints(r.getEdge(),r.isForward(),i),i=!1,e.setEdgeRing(r,e),r=e.getNext(r)}while(r!==this._startDe)},jt.prototype.getLinearRing=function(){return this._ring},jt.prototype.getCoordinate=function(t){return this._pts.get(t)},jt.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var r=e.getNode(),i=r.getEdges().getOutgoingDegree(t);i>t._maxNodeDegree&&(t._maxNodeDegree=i),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},jt.prototype.addPoints=function(t,e,r){var i=this,s=t.getCoordinates();if(e){var o=1;r&&(o=0);for(var a=o;a<s.length;a++)i._pts.add(s[a])}else{var u=s.length-2;r&&(u=s.length-1);for(var l=u;l>=0;l--)i._pts.add(s[l])}},jt.prototype.isHole=function(){return this._isHole},jt.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)},jt.prototype.containsPoint=function(t){var e=this.getLinearRing(),r=e.getEnvelopeInternal();if(!r.contains(t)||!W.isPointInRing(t,e.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(t))return!1}return!0},jt.prototype.addHole=function(t){this._holes.add(t)},jt.prototype.isShell=function(){return this._shell===null},jt.prototype.getLabel=function(){return this._label},jt.prototype.getEdges=function(){return this._edges},jt.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},jt.prototype.getShell=function(){return this._shell},jt.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=e.getLocation(r,z.RIGHT);if(i===R.NONE)return null;if(this._label.getLocation(r)===R.NONE)return this._label.setLocation(r,i),null}},jt.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)},jt.prototype.toPolygon=function(t){for(var e=this,r=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)r[i]=e._holes.get(i).getLinearRing();var s=t.createPolygon(this.getLinearRing(),r);return s},jt.prototype.interfaces_=function(){return[]},jt.prototype.getClass=function(){return jt};var ry=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(r,i){r.setMinEdgeRing(i)},t.prototype.getNext=function(r){return r.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(jt),ny=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var r=this,i=new U,s=this._startDe;do{if(s.getMinEdgeRing()===null){var o=new ry(s,r._geometryFactory);i.add(o)}s=s.getNext()}while(s!==this._startDe);return i},t.prototype.setEdgeRing=function(r,i){r.setEdgeRing(i)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var r=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(r),i=i.getNext()}while(i!==this._startDe)},t.prototype.getNext=function(r){return r.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(jt),rr=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._label=t}}};rr.prototype.setVisited=function(t){this._isVisited=t},rr.prototype.setInResult=function(t){this._isInResult=t},rr.prototype.isCovered=function(){return this._isCovered},rr.prototype.isCoveredSet=function(){return this._isCoveredSet},rr.prototype.setLabel=function(t){this._label=t},rr.prototype.getLabel=function(){return this._label},rr.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},rr.prototype.updateIM=function(t){ct.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},rr.prototype.isInResult=function(){return this._isInResult},rr.prototype.isVisited=function(){return this._isVisited},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr};var ku=function(n){function t(){n.call(this),this._coord=null,this._edges=null;var e=arguments[0],r=arguments[1];this._coord=e,this._edges=r,this._label=new Ot(0,R.NONE)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var r=this.getEdges().getEdges().iterator();r.hasNext();){var i=r.next();if(i.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(r){r.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(r){},t.prototype.computeMergedLocation=function(r,i){var s=R.NONE;if(s=this._label.getLocation(i),!r.isNull(i)){var o=r.getLocation(i);s!==R.BOUNDARY&&(s=o)}return s},t.prototype.setLabel=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];this._label===null?this._label=new Ot(r,i):this._label.setLocation(r,i)}else return n.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var r=this;if(arguments[0]instanceof t){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Ot)for(var s=arguments[0],o=0;o<2;o++){var a=r.computeMergedLocation(s,o),u=r._label.getLocation(o);u===R.NONE&&r._label.setLocation(o,a)}},t.prototype.add=function(r){this._edges.insert(r),r.setNode(this)},t.prototype.setLabelBoundary=function(r){if(this._label===null)return null;var i=R.NONE;this._label!==null&&(i=this._label.getLocation(r));var s=null;switch(i){case R.BOUNDARY:s=R.INTERIOR;break;case R.INTERIOR:s=R.BOUNDARY;break;default:s=R.BOUNDARY;break}this._label.setLocation(r,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(rr),jr=function(){this.nodeMap=new ye,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};jr.prototype.find=function(t){return this.nodeMap.get(t)},jr.prototype.addNode=function(){if(arguments[0]instanceof x){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof ku){var r=arguments[0],i=this.nodeMap.get(r.getCoordinate());return i===null?(this.nodeMap.put(r.getCoordinate(),r),r):(i.mergeLabel(r),i)}},jr.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},jr.prototype.iterator=function(){return this.nodeMap.values().iterator()},jr.prototype.values=function(){return this.nodeMap.values()},jr.prototype.getBoundaryNodes=function(t){for(var e=new U,r=this.iterator();r.hasNext();){var i=r.next();i.getLabel().getLocation(t)===R.BOUNDARY&&e.add(i)}return e},jr.prototype.add=function(t){var e=t.getCoordinate(),r=this.addNode(e);r.add(t)},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr};var xt=function(){},ka={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};xt.prototype.interfaces_=function(){return[]},xt.prototype.getClass=function(){return xt},xt.isNorthern=function(t){return t===xt.NE||t===xt.NW},xt.isOpposite=function(t,e){if(t===e)return!1;var r=(t-e+4)%4;return r===2},xt.commonHalfPlane=function(t,e){if(t===e)return t;var r=(t-e+4)%4;if(r===2)return-1;var i=t<e?t:e,s=t>e?t:e;return i===0&&s===3?3:i},xt.isInHalfPlane=function(t,e){return e===xt.SE?t===xt.SE||t===xt.SW:t===e||t===e+1},xt.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new Vt("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?xt.NE:xt.SE:e>=0?xt.NW:xt.SW}else if(arguments[0]instanceof x&&arguments[1]instanceof x){var r=arguments[0],i=arguments[1];if(i.x===r.x&&i.y===r.y)throw new Vt("Cannot compute the quadrant for two identical points "+r);return i.x>=r.x?i.y>=r.y?xt.NE:xt.SE:i.y>=r.y?xt.NW:xt.SW}},ka.NE.get=function(){return 0},ka.NW.get=function(){return 1},ka.SW.get=function(){return 2},ka.SE.get=function(){return 3},Object.defineProperties(xt,ka);var _e=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=null;this._edge=e,this.init(r,i),this._label=s}else if(arguments.length===4){var o=arguments[0],a=arguments[1],u=arguments[2],l=arguments[3];this._edge=o,this.init(a,u),this._label=l}};_e.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:W.computeOrientation(t._p0,t._p1,this._p1)},_e.prototype.getDy=function(){return this._dy},_e.prototype.getCoordinate=function(){return this._p0},_e.prototype.setNode=function(t){this._node=t},_e.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),r=this.getClass().getName(),i=r.lastIndexOf("."),s=r.substring(i+1);t.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},_e.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},_e.prototype.getDirectedCoordinate=function(){return this._p1},_e.prototype.getDx=function(){return this._dx},_e.prototype.getLabel=function(){return this._label},_e.prototype.getEdge=function(){return this._edge},_e.prototype.getQuadrant=function(){return this._quadrant},_e.prototype.getNode=function(){return this._node},_e.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),r=e.lastIndexOf("."),i=e.substring(r+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},_e.prototype.computeLabel=function(t){},_e.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=xt.quadrant(this._dx,this._dy),ct.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},_e.prototype.interfaces_=function(){return[cr]},_e.prototype.getClass=function(){return _e};var Zl=function(n){function t(){var e=arguments[0],r=arguments[1];if(n.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=r,r)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(r){return this._depth[r]},t.prototype.setVisited=function(r){this._isVisited=r},t.prototype.computeDirectedLabel=function(){this._label=new Ot(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(r,i){if(this._depth[r]!==-999&&this._depth[r]!==i)throw new Kn("assigned depths do not match",this.getCoordinate());this._depth[r]=i},t.prototype.isInteriorAreaEdge=function(){for(var r=this,i=!0,s=0;s<2;s++)r._label.isArea(s)&&r._label.getLocation(s,z.LEFT)===R.INTERIOR&&r._label.getLocation(s,z.RIGHT)===R.INTERIOR||(i=!1);return i},t.prototype.setNextMin=function(r){this._nextMin=r},t.prototype.print=function(r){n.prototype.print.call(this,r),r.print(" "+this._depth[z.LEFT]+"/"+this._depth[z.RIGHT]),r.print(" ("+this.getDepthDelta()+")"),this._isInResult&&r.print(" inResult")},t.prototype.setMinEdgeRing=function(r){this._minEdgeRing=r},t.prototype.isLineEdge=function(){var r=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,R.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,R.EXTERIOR);return r&&i&&s},t.prototype.setEdgeRing=function(r){this._edgeRing=r},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var r=this._edge.getDepthDelta();return this._isForward||(r=-r),r},t.prototype.setInResult=function(r){this._isInResult=r},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(r){this.print(r),r.print(" "),this._isForward?this._edge.print(r):this._edge.printReverse(r)},t.prototype.setSym=function(r){this._sym=r},t.prototype.setVisitedEdge=function(r){this.setVisited(r),this._sym.setVisited(r)},t.prototype.setEdgeDepths=function(r,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var o=1;r===z.LEFT&&(o=-1);var a=z.opposite(r),u=s*o,l=i+u;this.setDepth(r,i),this.setDepth(a,l)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(r){this._next=r},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(r,i){return r===R.EXTERIOR&&i===R.INTERIOR?1:r===R.INTERIOR&&i===R.EXTERIOR?-1:0},t}(_e),So=function(){};So.prototype.createNode=function(t){return new ku(t,null)},So.prototype.interfaces_=function(){return[]},So.prototype.getClass=function(){return So};var Wt=function(){if(this._edges=new U,this._nodes=null,this._edgeEndList=new U,arguments.length===0)this._nodes=new jr(new So);else if(arguments.length===1){var t=arguments[0];this._nodes=new jr(t)}};Wt.prototype.printEdges=function(t){var e=this;t.println("Edges:");for(var r=0;r<this._edges.size();r++){t.println("edge "+r+":");var i=e._edges.get(r);i.print(t),i.eiList.print(t)}},Wt.prototype.find=function(t){return this._nodes.find(t)},Wt.prototype.addNode=function(){if(arguments[0]instanceof ku){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof x){var e=arguments[0];return this._nodes.addNode(e)}},Wt.prototype.getNodeIterator=function(){return this._nodes.iterator()},Wt.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},Wt.prototype.debugPrintln=function(t){ce.out.println(t)},Wt.prototype.isBoundaryNode=function(t,e){var r=this._nodes.find(e);if(r===null)return!1;var i=r.getLabel();return i!==null&&i.getLocation(t)===R.BOUNDARY},Wt.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},Wt.prototype.matchInSameDirection=function(t,e,r,i){return t.equals(r)?W.computeOrientation(t,e,i)===W.COLLINEAR&&xt.quadrant(t,e)===xt.quadrant(r,i):!1},Wt.prototype.getEdgeEnds=function(){return this._edgeEndList},Wt.prototype.debugPrint=function(t){ce.out.print(t)},Wt.prototype.getEdgeIterator=function(){return this._edges.iterator()},Wt.prototype.findEdgeInSameDirection=function(t,e){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(r.matchInSameDirection(t,e,o[0],o[1])||r.matchInSameDirection(t,e,o[o.length-1],o[o.length-2]))return s}return null},Wt.prototype.insertEdge=function(t){this._edges.add(t)},Wt.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var r=e.next();if(r.getEdge()===t)return r}return null},Wt.prototype.addEdges=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next();e._edges.add(i);var s=new Zl(i,!0),o=new Zl(i,!1);s.setSym(o),o.setSym(s),e.add(s),e.add(o)}},Wt.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Wt.prototype.getNodes=function(){return this._nodes.values()},Wt.prototype.findEdge=function(t,e){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(t.equals(o[0])&&e.equals(o[1]))return s}return null},Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var r=e.next();r.getEdges().linkResultDirectedEdges()}};var qe=function(){this._geometryFactory=null,this._shellList=new U;var t=arguments[0];this._geometryFactory=t};qe.prototype.sortShellsAndHoles=function(t,e,r){for(var i=t.iterator();i.hasNext();){var s=i.next();s.isHole()?r.add(s):e.add(s)}},qe.prototype.computePolygons=function(t){for(var e=this,r=new U,i=t.iterator();i.hasNext();){var s=i.next(),o=s.toPolygon(e._geometryFactory);r.add(o)}return r},qe.prototype.placeFreeHoles=function(t,e){for(var r=this,i=e.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var o=r.findEdgeRingContaining(s,t);if(o===null)throw new Kn("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(o)}}},qe.prototype.buildMinimalEdgeRings=function(t,e,r){for(var i=this,s=new U,o=t.iterator();o.hasNext();){var a=o.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var u=a.buildMinimalRings(),l=i.findShell(u);l!==null?(i.placePolygonHoles(l,u),e.add(l)):r.addAll(u)}else s.add(a)}return s},qe.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var r=e.next();if(r.containsPoint(t))return!0}return!1},qe.prototype.buildMaximalEdgeRings=function(t){for(var e=this,r=new U,i=t.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var o=new ny(s,e._geometryFactory);r.add(o),o.setInResult()}}return r},qe.prototype.placePolygonHoles=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next();i.isHole()&&i.setShell(t)}},qe.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t},qe.prototype.findEdgeRingContaining=function(t,e){for(var r=t.getLinearRing(),i=r.getEnvelopeInternal(),s=r.getCoordinateN(0),o=null,a=null,u=e.iterator();u.hasNext();){var l=u.next(),c=l.getLinearRing(),h=c.getEnvelopeInternal();o!==null&&(a=o.getLinearRing().getEnvelopeInternal());var p=!1;h.contains(i)&&W.isPointInRing(s,c.getCoordinates())&&(p=!0),p&&(o===null||a.contains(h))&&(o=l)}return o},qe.prototype.findShell=function(t){for(var e=0,r=null,i=t.iterator();i.hasNext();){var s=i.next();s.isHole()||(r=s,e++)}return ct.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),r},qe.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],r=arguments[1];Wt.linkResultDirectedEdges(r);var i=this.buildMaximalEdgeRings(e),s=new U,o=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(o,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe};var Co=function(){};Co.prototype.getBounds=function(){},Co.prototype.interfaces_=function(){return[]},Co.prototype.getClass=function(){return Co};var Mr=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Mr.prototype.getItem=function(){return this._item},Mr.prototype.getBounds=function(){return this._bounds},Mr.prototype.interfaces_=function(){return[Co,hr]},Mr.prototype.getClass=function(){return Mr};var Qn=function(){this._size=null,this._items=null,this._size=0,this._items=new U,this._items.add(null)};Qn.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Qn.prototype.size=function(){return this._size},Qn.prototype.reorder=function(t){for(var e=this,r=null,i=this._items.get(t);t*2<=this._size&&(r=t*2,r!==e._size&&e._items.get(r+1).compareTo(e._items.get(r))<0&&r++,e._items.get(r).compareTo(i)<0);t=r)e._items.set(t,e._items.get(r));this._items.set(t,i)},Qn.prototype.clear=function(){this._size=0,this._items.clear()},Qn.prototype.isEmpty=function(){return this._size===0},Qn.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var r=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(r/2)))<0;r/=2)e._items.set(r,e._items.get(Math.trunc(r/2)));this._items.set(r,t)},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn};var _i=function(){};_i.prototype.visitItem=function(t){},_i.prototype.interfaces_=function(){return[]},_i.prototype.getClass=function(){return _i};var Ns=function(){};Ns.prototype.insert=function(t,e){},Ns.prototype.remove=function(t,e){},Ns.prototype.query=function(){},Ns.prototype.interfaces_=function(){return[]},Ns.prototype.getClass=function(){return Ns};var ee=function(){if(this._childBoundables=new U,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},Sd={serialVersionUID:{configurable:!0}};ee.prototype.getLevel=function(){return this._level},ee.prototype.size=function(){return this._childBoundables.size()},ee.prototype.getChildBoundables=function(){return this._childBoundables},ee.prototype.addChildBoundable=function(t){ct.isTrue(this._bounds===null),this._childBoundables.add(t)},ee.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},ee.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},ee.prototype.interfaces_=function(){return[Co,hr]},ee.prototype.getClass=function(){return ee},Sd.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(ee,Sd);var Lr=function(){};Lr.reverseOrder=function(){return{compare:function(e,r){return r.compareTo(e)}}},Lr.min=function(t){return Lr.sort(t),t.get(0)},Lr.sort=function(t,e){var r=t.toArray();e?Gi.sort(r,e):Gi.sort(r);for(var i=t.iterator(),s=0,o=r.length;s<o;s++)i.next(),i.set(r[s])},Lr.singletonList=function(t){var e=new U;return e.add(t),e};var Zt=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=r,this._distance=this.distance()};Zt.prototype.expandToQueue=function(t,e){var r=Zt.isComposite(this._boundable1),i=Zt.isComposite(this._boundable2);if(r&&i)return Zt.area(this._boundable1)>Zt.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(r)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new Vt("neither boundable is composite")},Zt.prototype.isLeaves=function(){return!(Zt.isComposite(this._boundable1)||Zt.isComposite(this._boundable2))},Zt.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},Zt.prototype.expand=function(t,e,r,i){for(var s=this,o=t.getChildBoundables(),a=o.iterator();a.hasNext();){var u=a.next(),l=new Zt(u,e,s._itemDistance);l.getDistance()<i&&r.add(l)}},Zt.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2},Zt.prototype.getDistance=function(){return this._distance},Zt.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},Zt.prototype.interfaces_=function(){return[cr]},Zt.prototype.getClass=function(){return Zt},Zt.area=function(t){return t.getBounds().getArea()},Zt.isComposite=function(t){return t instanceof ee};var se=function n(){if(this._root=null,this._built=!1,this._itemBoundables=new U,this._nodeCapacity=null,arguments.length===0){var t=n.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var e=arguments[0];ct.isTrue(e>1,"Node capacity must be greater than 1"),this._nodeCapacity=e}},Vu={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};se.prototype.getNodeCapacity=function(){return this._nodeCapacity},se.prototype.lastNode=function(t){return t.get(t.size()-1)},se.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],r=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof ee?r+=t.size(s):s instanceof Mr&&(r+=1)}return r}},se.prototype.removeItem=function(t,e){for(var r=null,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Mr&&s.getItem()===e&&(r=s)}return r!==null?(t.getChildBoundables().remove(r),!0):!1},se.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new U:e}else if(arguments.length===1){for(var r=arguments[0],i=new U,s=r.getChildBoundables().iterator();s.hasNext();){var o=s.next();if(o instanceof ee){var a=t.itemsTree(o);a!==null&&i.add(a)}else o instanceof Mr?i.add(o.getItem()):ct.shouldNeverReachHere()}return i.size()<=0?null:i}},se.prototype.insert=function(t,e){ct.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Mr(t,e))},se.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],r=new U;return this.boundablesAtLevel(e,this._root,r),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(ct.isTrue(i>-2),s.getLevel()===i)return o.add(s),null;for(var a=s.getChildBoundables().iterator();a.hasNext();){var u=a.next();u instanceof ee?t.boundablesAtLevel(i,u,o):(ct.isTrue(u instanceof Mr),i===-1&&o.add(u))}return null}},se.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var r=new U;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,r),r}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,s)}else if(arguments.length===3){if(nt(arguments[2],_i)&&arguments[0]instanceof Object&&arguments[1]instanceof ee)for(var o=arguments[0],a=arguments[1],u=arguments[2],l=a.getChildBoundables(),c=0;c<l.size();c++){var h=l.get(c);t.getIntersectsOp().intersects(h.getBounds(),o)&&(h instanceof ee?t.query(o,h,u):h instanceof Mr?u.visitItem(h.getItem()):ct.shouldNeverReachHere())}else if(nt(arguments[2],Or)&&arguments[0]instanceof Object&&arguments[1]instanceof ee)for(var p=arguments[0],v=arguments[1],w=arguments[2],I=v.getChildBoundables(),P=0;P<I.size();P++){var O=I.get(P);t.getIntersectsOp().intersects(O.getBounds(),p)&&(O instanceof ee?t.query(p,O,w):O instanceof Mr?w.add(O.getItem()):ct.shouldNeverReachHere())}}},se.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},se.prototype.getRoot=function(){return this.build(),this._root},se.prototype.remove=function(){var t=this;if(arguments.length===2){var e=arguments[0],r=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),e)?this.remove(e,this._root,r):!1}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=this.removeItem(s,o);if(a)return!0;for(var u=null,l=s.getChildBoundables().iterator();l.hasNext();){var c=l.next();if(t.getIntersectsOp().intersects(c.getBounds(),i)&&c instanceof ee&&(a=t.remove(i,c,o),a)){u=c;break}}return u!==null&&u.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(u),a}},se.prototype.createHigherLevels=function(t,e){ct.isTrue(!t.isEmpty());var r=this.createParentBoundables(t,e+1);return r.size()===1?r.get(0):this.createHigherLevels(r,e+1)},se.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var e=arguments[0],r=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof ee){var o=t.depth(s);o>r&&(r=o)}}return r+1}},se.prototype.createParentBoundables=function(t,e){var r=this;ct.isTrue(!t.isEmpty());var i=new U;i.add(this.createNode(e));var s=new U(t);Lr.sort(s,this.getComparator());for(var o=s.iterator();o.hasNext();){var a=o.next();r.lastNode(i).getChildBoundables().size()===r.getNodeCapacity()&&i.add(r.createNode(e)),r.lastNode(i).addChildBoundable(a)}return i},se.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},se.prototype.interfaces_=function(){return[hr]},se.prototype.getClass=function(){return se},se.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},Vu.IntersectsOp.get=function(){return iy},Vu.serialVersionUID.get=function(){return-3886435814360241e3},Vu.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(se,Vu);var iy=function(){},Io=function(){};Io.prototype.distance=function(t,e){},Io.prototype.interfaces_=function(){return[]},Io.prototype.getClass=function(){return Io};var Cd=function(n){function t(r){r=r||t.DEFAULT_NODE_CAPACITY,n.call(this,r)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var o=this;ct.isTrue(i.length>0);for(var a=new U,u=0;u<i.length;u++)a.addAll(o.createParentBoundablesFromVerticalSlice(i[u],s));return a},t.prototype.createNode=function(i){return new Id(i)},t.prototype.size=function(){return arguments.length===0?n.prototype.size.call(this):n.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;n.prototype.insert.call(this,i,s)}else return n.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(i,s){for(var o=Math.trunc(Math.ceil(i.size()/s)),a=new Array(s).fill(null),u=i.iterator(),l=0;l<s;l++){a[l]=new U;for(var c=0;u.hasNext()&&c<o;){var h=u.next();a[l].add(h),c++}}return a},t.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return n.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],o=arguments[1];n.prototype.query.call(this,s,o)}else if(arguments.length===3){if(nt(arguments[2],_i)&&arguments[0]instanceof Object&&arguments[1]instanceof ee){var a=arguments[0],u=arguments[1],l=arguments[2];n.prototype.query.call(this,a,u,l)}else if(nt(arguments[2],Or)&&arguments[0]instanceof Object&&arguments[1]instanceof ee){var c=arguments[0],h=arguments[1],p=arguments[2];n.prototype.query.call(this,c,h,p)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return n.prototype.createParentBoundables.call(this,i,s)},t.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return n.prototype.remove.call(this,i,s)}else return n.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?n.prototype.depth.call(this):n.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(i,s){ct.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new U(i);Lr.sort(a,t.xComparator);var u=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(u,s)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if(nt(arguments[0],Io)){var i=arguments[0],s=new Zt(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof Zt){var o=arguments[0];return this.nearestNeighbour(o,ot.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&nt(arguments[1],Io)){var a=arguments[0],u=arguments[1],l=new Zt(this.getRoot(),a.getRoot(),u);return this.nearestNeighbour(l)}else if(arguments[0]instanceof Zt&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],p=h,v=null,w=new Qn;for(w.add(c);!w.isEmpty()&&p>0;){var I=w.poll(),P=I.getDistance();if(P>=p)break;I.isLeaves()?(p=P,v=I):I.expandToQueue(w,p)}return[v.getBoundable(0).getItem(),v.getBoundable(1).getItem()]}}else if(arguments.length===3){var O=arguments[0],m=arguments[1],_=arguments[2],g=new Mr(O,m),y=new Zt(this.getRoot(),g,_);return this.nearestNeighbour(y)[0]}},t.prototype.interfaces_=function(){return[Ns,hr]},t.prototype.getClass=function(){return t},t.centreX=function(i){return t.avg(i.getMinX(),i.getMaxX())},t.avg=function(i,s){return(i+s)/2},t.centreY=function(i){return t.avg(i.getMinY(),i.getMaxY())},e.STRtreeNode.get=function(){return Id},e.serialVersionUID.get=function(){return 0x39920f7d5f261e0},e.xComparator.get=function(){return{interfaces_:function(){return[lo]},compare:function(r,i){return n.compareDoubles(t.centreX(r.getBounds()),t.centreX(i.getBounds()))}}},e.yComparator.get=function(){return{interfaces_:function(){return[lo]},compare:function(r,i){return n.compareDoubles(t.centreY(r.getBounds()),t.centreY(i.getBounds()))}}},e.intersectsOp.get=function(){return{interfaces_:function(){return[n.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},e.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,e),t}(se),Id=function(n){function t(){var e=arguments[0];n.call(this,e)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var r=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();r===null?r=new j(s.getBounds()):r.expandToInclude(s.getBounds())}return r},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ee),Ae=function(){};Ae.prototype.interfaces_=function(){return[]},Ae.prototype.getClass=function(){return Ae},Ae.relativeSign=function(t,e){return t<e?-1:t>e?1:0},Ae.compare=function(t,e,r){if(e.equals2D(r))return 0;var i=Ae.relativeSign(e.x,r.x),s=Ae.relativeSign(e.y,r.y);switch(t){case 0:return Ae.compareValue(i,s);case 1:return Ae.compareValue(s,i);case 2:return Ae.compareValue(s,-i);case 3:return Ae.compareValue(-i,s);case 4:return Ae.compareValue(-i,-s);case 5:return Ae.compareValue(-s,-i);case 6:return Ae.compareValue(-s,i);case 7:return Ae.compareValue(i,-s)}return ct.shouldNeverReachHere("invalid octant value"),0},Ae.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var wi=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this._segString=t,this.coord=new x(e),this.segmentIndex=r,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(r))};wi.prototype.getCoordinate=function(){return this.coord},wi.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},wi.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:Ae.compare(this._segmentOctant,this.coord,e.coord)},wi.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},wi.prototype.isInterior=function(){return this._isInterior},wi.prototype.interfaces_=function(){return[cr]},wi.prototype.getClass=function(){return wi};var Pe=function(){this._nodeMap=new ye,this._edge=null;var t=arguments[0];this._edge=t};Pe.prototype.getSplitCoordinates=function(){var t=this,e=new Oa;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next();t.addEdgeCoordinates(i,s,e),i=s}return e.toCoordinateArray()},Pe.prototype.addCollapsedNodes=function(){var t=this,e=new U;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var r=e.iterator();r.hasNext();){var i=r.next().intValue();t.add(t._edge.getCoordinate(i),i)}},Pe.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},Pe.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,r=0;r<this._edge.size()-2;r++){var i=e._edge.getCoordinate(r),s=e._edge.getCoordinate(r+2);i.equals2D(s)&&t.add(new Ur(r+1))}},Pe.prototype.addEdgeCoordinates=function(t,e,r){var i=this,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);r.add(new x(t.coord),!1);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)r.add(i._edge.getCoordinate(a));o&&r.add(new x(e.coord))},Pe.prototype.iterator=function(){return this._nodeMap.values().iterator()},Pe.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints(),this.addCollapsedNodes();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},Pe.prototype.findCollapseIndex=function(t,e,r){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,i===1?(r[0]=t.segmentIndex+1,!0):!1},Pe.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=this,r=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var o=i.next(),a=e.findCollapseIndex(s,o,r);a&&t.add(new Ur(r[0])),s=o}},Pe.prototype.getEdge=function(){return this._edge},Pe.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},Pe.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new x(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r._edge.getCoordinate(l);return o&&(a[u]=new x(e.coord)),new Jt(a,this._edge.getData())},Pe.prototype.add=function(t,e){var r=new wi(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(r);return i!==null?(ct.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(r,r),r)},Pe.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),r=t.get(0),i=r.getCoordinate(0);if(!i.equals2D(e[0]))throw new Yn("bad split edge start point at "+i);var s=t.get(t.size()-1),o=s.getCoordinates(),a=o[o.length-1];if(!a.equals2D(e[e.length-1]))throw new Yn("bad split edge end point at "+a)},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe};var Ts=function(){};Ts.prototype.interfaces_=function(){return[]},Ts.prototype.getClass=function(){return Ts},Ts.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new Vt("Cannot compute the octant for point ( "+t+", "+e+" )");var r=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?r>=i?0:1:r>=i?7:6:e>=0?r>=i?3:2:r>=i?4:5}else if(arguments[0]instanceof x&&arguments[1]instanceof x){var s=arguments[0],o=arguments[1],a=o.x-s.x,u=o.y-s.y;if(a===0&&u===0)throw new Vt("Cannot compute the octant for two identical points "+s);return Ts.octant(a,u)}};var In=function(){};In.prototype.getCoordinates=function(){},In.prototype.size=function(){},In.prototype.getCoordinate=function(t){},In.prototype.isClosed=function(){},In.prototype.setData=function(t){},In.prototype.getData=function(){},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In};var Va=function(){};Va.prototype.addIntersection=function(t,e){},Va.prototype.interfaces_=function(){return[In]},Va.prototype.getClass=function(){return Va};var Jt=function(){this._nodeList=new Pe(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Jt.prototype.getCoordinates=function(){return this._pts},Jt.prototype.size=function(){return this._pts.length},Jt.prototype.getCoordinate=function(t){return this._pts[t]},Jt.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Jt.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},Jt.prototype.setData=function(t){this._data=t},Jt.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:Ts.octant(t,e)},Jt.prototype.getData=function(){return this._data},Jt.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[3],o=new x(r.getIntersection(s));this.addIntersection(o,i)}},Jt.prototype.toString=function(){return Tr.toLineString(new Ht(this._pts))},Jt.prototype.getNodeList=function(){return this._nodeList},Jt.prototype.addIntersectionNode=function(t,e){var r=e,i=r+1;if(i<this._pts.length){var s=this._pts[i];t.equals2D(s)&&(r=i)}var o=this._nodeList.add(t,r);return o},Jt.prototype.addIntersections=function(t,e,r){for(var i=this,s=0;s<t.getIntersectionNum();s++)i.addIntersection(t,e,r,s)},Jt.prototype.interfaces_=function(){return[Va]},Jt.prototype.getClass=function(){return Jt},Jt.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new U;return Jt.getNodedSubstrings(t,e),e}else if(arguments.length===2)for(var r=arguments[0],i=arguments[1],s=r.iterator();s.hasNext();){var o=s.next();o.getNodeList().addSplitEdges(i)}};var Z=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new x,this.p1=new x;else if(arguments.length===1){var t=arguments[0];this.p0=new x(t.p0),this.p1=new x(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var e=arguments[0],r=arguments[1],i=arguments[2],s=arguments[3];this.p0=new x(e,r),this.p1=new x(i,s)}},Pd={serialVersionUID:{configurable:!0}};Z.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},Z.prototype.orientationIndex=function(){if(arguments[0]instanceof Z){var t=arguments[0],e=W.orientationIndex(this.p0,this.p1,t.p0),r=W.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&r>=0||e<=0&&r<=0?Math.max(e,r):0}else if(arguments[0]instanceof x){var i=arguments[0];return W.orientationIndex(this.p0,this.p1,i)}},Z.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},Z.prototype.isVertical=function(){return this.p0.x===this.p1.x},Z.prototype.equals=function(t){if(!(t instanceof Z))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},Z.prototype.intersection=function(t){var e=new zi;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},Z.prototype.project=function(){if(arguments[0]instanceof x){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new x(t);var e=this.projectionFactor(t),r=new x;return r.x=this.p0.x+e*(this.p1.x-this.p0.x),r.y=this.p0.y+e*(this.p1.y-this.p0.y),r}else if(arguments[0]instanceof Z){var i=arguments[0],s=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(s>=1&&o>=1||s<=0&&o<=0)return null;var a=this.project(i.p0);s<0&&(a=this.p0),s>1&&(a=this.p1);var u=this.project(i.p1);return o<0&&(u=this.p0),o>1&&(u=this.p1),new Z(a,u)}},Z.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},Z.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},Z.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1},Z.prototype.distancePerpendicular=function(t){return W.distancePointLinePerpendicular(t,this.p0,this.p1)},Z.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},Z.prototype.midPoint=function(){return Z.midPoint(this.p0,this.p1)},Z.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,r=this.p1.y-this.p0.y,i=e*e+r*r;if(i<=0)return ot.NaN;var s=((t.x-this.p0.x)*e+(t.y-this.p0.y)*r)/i;return s},Z.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var r=new Array(2).fill(null),i=ot.MAX_VALUE,s=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),r[0]=o,r[1]=t.p0;var a=this.closestPoint(t.p1);s=a.distance(t.p1),s<i&&(i=s,r[0]=a,r[1]=t.p1);var u=t.closestPoint(this.p0);s=u.distance(this.p0),s<i&&(i=s,r[0]=this.p0,r[1]=u);var l=t.closestPoint(this.p1);return s=l.distance(this.p1),s<i&&(i=s,r[0]=this.p1,r[1]=l),r},Z.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);var r=this.p0.distance(t),i=this.p1.distance(t);return r<i?this.p0:this.p1},Z.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},Z.prototype.getLength=function(){return this.p0.distance(this.p1)},Z.prototype.compareTo=function(t){var e=t,r=this.p0.compareTo(e.p0);return r!==0?r:this.p1.compareTo(e.p1)},Z.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},Z.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},Z.prototype.lineIntersection=function(t){try{var e=Nr.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(r){if(!(r instanceof ho))throw r}finally{}return null},Z.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},Z.prototype.pointAlongOffset=function(t,e){var r=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),s=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(s*s+o*o),u=0,l=0;if(e!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");u=e*s/a,l=e*o/a}var c=r-l,h=i+u,p=new x(c,h);return p},Z.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=r.x,this.p1.y=r.y}},Z.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||ot.isNaN(e))&&(e=1),e},Z.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},Z.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},Z.prototype.distance=function(){if(arguments[0]instanceof Z){var t=arguments[0];return W.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof x){var e=arguments[0];return W.distancePointLine(e,this.p0,this.p1)}},Z.prototype.pointAlong=function(t){var e=new x;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},Z.prototype.hashCode=function(){var t=ot.doubleToLongBits(this.p0.x);t^=ot.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),r=ot.doubleToLongBits(this.p1.x);r^=ot.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(r)^Math.trunc(r>>32);return e^i},Z.prototype.interfaces_=function(){return[cr,hr]},Z.prototype.getClass=function(){return Z},Z.midPoint=function(t,e){return new x((t.x+e.x)/2,(t.y+e.y)/2)},Pd.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(Z,Pd);var za=function(){this.tempEnv1=new j,this.tempEnv2=new j,this._overlapSeg1=new Z,this._overlapSeg2=new Z};za.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),r.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},za.prototype.interfaces_=function(){return[]},za.prototype.getClass=function(){return za};var Xe=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=r,this._context=i};Xe.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},Xe.prototype.computeSelect=function(t,e,r,i){var s=this._pts[e],o=this._pts[r];if(i.tempEnv1.init(s,o),r-e===1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var a=Math.trunc((e+r)/2);e<a&&this.computeSelect(t,e,a,i),a<r&&this.computeSelect(t,a,r,i)},Xe.prototype.getCoordinates=function(){for(var t=this,e=new Array(this._end-this._start+1).fill(null),r=0,i=this._start;i<=this._end;i++)e[r++]=t._pts[i];return e},Xe.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},Xe.prototype.setId=function(t){this._id=t},Xe.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},Xe.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],e=this._pts[this._end];this._env=new j(t,e)}return this._env},Xe.prototype.getEndIndex=function(){return this._end},Xe.prototype.getStartIndex=function(){return this._start},Xe.prototype.getContext=function(){return this._context},Xe.prototype.getId=function(){return this._id},Xe.prototype.computeOverlapsInternal=function(t,e,r,i,s,o){var a=this._pts[t],u=this._pts[e],l=r._pts[i],c=r._pts[s];if(e-t===1&&s-i===1)return o.overlap(this,t,r,i),null;if(o.tempEnv1.init(a,u),o.tempEnv2.init(l,c),!o.tempEnv1.intersects(o.tempEnv2))return null;var h=Math.trunc((t+e)/2),p=Math.trunc((i+s)/2);t<h&&(i<p&&this.computeOverlapsInternal(t,h,r,i,p,o),p<s&&this.computeOverlapsInternal(t,h,r,p,s,o)),h<e&&(i<p&&this.computeOverlapsInternal(h,e,r,i,p,o),p<s&&this.computeOverlapsInternal(h,e,r,p,s,o))},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var Zr=function(){};Zr.prototype.interfaces_=function(){return[]},Zr.prototype.getClass=function(){return Zr},Zr.getChainStartIndices=function(t){var e=0,r=new U;r.add(new Ur(e));do{var i=Zr.findChainEnd(t,e);r.add(new Ur(i)),e=i}while(e<t.length-1);var s=Zr.toIntArray(r);return s},Zr.findChainEnd=function(t,e){for(var r=e;r<t.length-1&&t[r].equals2D(t[r+1]);)r++;if(r>=t.length-1)return t.length-1;for(var i=xt.quadrant(t[r],t[r+1]),s=e+1;s<t.length;){if(!t[s-1].equals2D(t[s])){var o=xt.quadrant(t[s-1],t[s]);if(o!==i)break}s++}return s-1},Zr.getChains=function(){if(arguments.length===1){var t=arguments[0];return Zr.getChains(t,null)}else if(arguments.length===2){for(var e=arguments[0],r=arguments[1],i=new U,s=Zr.getChainStartIndices(e),o=0;o<s.length-1;o++){var a=new Xe(e,s[o],s[o+1],r);i.add(a)}return i}},Zr.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var qi=function(){};qi.prototype.computeNodes=function(t){},qi.prototype.getNodedSubstrings=function(){},qi.prototype.interfaces_=function(){return[]},qi.prototype.getClass=function(){return qi};var Ua=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};Ua.prototype.setSegmentIntersector=function(t){this._segInt=t},Ua.prototype.interfaces_=function(){return[qi]},Ua.prototype.getClass=function(){return Ua};var Kl=function(n){function t(r){r?n.call(this,r):n.call(this),this._monoChains=new U,this._index=new Cd,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return Jt.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(i){for(var s=this,o=Zr.getChains(i.getCoordinates(),i),a=o.iterator();a.hasNext();){var u=a.next();u.setId(s._idCounter++),s._index.insert(u.getEnvelope(),u),s._monoChains.add(u)}},t.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var o=i.iterator();o.hasNext();)s.add(o.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var i=this,s=new bd(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var a=o.next(),u=i._index.query(a.getEnvelope()),l=u.iterator();l.hasNext();){var c=l.next();if(c.getId()>a.getId()&&(a.computeOverlaps(c,s),i._nOverlaps++),i._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.SegmentOverlapAction.get=function(){return bd},Object.defineProperties(t,e),t}(Ua),bd=function(n){function t(){n.call(this),this._si=null;var e=arguments[0];this._si=e}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3],a=r.getContext(),u=s.getContext();this._si.processIntersections(a,i,u,o)}else return n.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(za),bt=function n(){if(this._quadrantSegments=n.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=n.CAP_ROUND,this._joinStyle=n.JOIN_ROUND,this._mitreLimit=n.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=n.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(r)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(o),this.setMitreLimit(a)}}},$n={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}};bt.prototype.getEndCapStyle=function(){return this._endCapStyle},bt.prototype.isSingleSided=function(){return this._isSingleSided},bt.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=bt.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=bt.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==bt.JOIN_ROUND&&(this._quadrantSegments=bt.DEFAULT_QUADRANT_SEGMENTS)},bt.prototype.getJoinStyle=function(){return this._joinStyle},bt.prototype.setJoinStyle=function(t){this._joinStyle=t},bt.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},bt.prototype.getSimplifyFactor=function(){return this._simplifyFactor},bt.prototype.getQuadrantSegments=function(){return this._quadrantSegments},bt.prototype.setEndCapStyle=function(t){this._endCapStyle=t},bt.prototype.getMitreLimit=function(){return this._mitreLimit},bt.prototype.setMitreLimit=function(t){this._mitreLimit=t},bt.prototype.setSingleSided=function(t){this._isSingleSided=t},bt.prototype.interfaces_=function(){return[]},bt.prototype.getClass=function(){return bt},bt.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},$n.CAP_ROUND.get=function(){return 1},$n.CAP_FLAT.get=function(){return 2},$n.CAP_SQUARE.get=function(){return 3},$n.JOIN_ROUND.get=function(){return 1},$n.JOIN_MITRE.get=function(){return 2},$n.JOIN_BEVEL.get=function(){return 3},$n.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},$n.DEFAULT_MITRE_LIMIT.get=function(){return 5},$n.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(bt,$n);var Xt=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=W.COUNTERCLOCKWISE,this._inputLine=t||null},Ga={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Xt.prototype.isDeletable=function(t,e,r,i){var s=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[r];return!this.isConcave(s,o,a)||!this.isShallow(s,o,a,i)?!1:this.isShallowSampled(s,o,t,r,i)},Xt.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,r=this.findNextNonDeletedIndex(e),i=this.findNextNonDeletedIndex(r),s=!1;i<this._inputLine.length;){var o=!1;t.isDeletable(e,r,i,t._distanceTol)&&(t._isDeleted[r]=Xt.DELETE,o=!0,s=!0),o?e=i:e=r,r=t.findNextNonDeletedIndex(e),i=t.findNextNonDeletedIndex(r)}return s},Xt.prototype.isShallowConcavity=function(t,e,r,i){var s=W.computeOrientation(t,e,r),o=s===this._angleOrientation;if(!o)return!1;var a=W.distancePointLine(e,t,r);return a<i},Xt.prototype.isShallowSampled=function(t,e,r,i,s){var o=this,a=Math.trunc((i-r)/Xt.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var u=r;u<i;u+=a)if(!o.isShallow(t,e,o._inputLine[u],s))return!1;return!0},Xt.prototype.isConcave=function(t,e,r){var i=W.computeOrientation(t,e,r),s=i===this._angleOrientation;return s},Xt.prototype.simplify=function(t){var e=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=W.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var r=!1;do r=e.deleteShallowConcavities();while(r);return this.collapseLine()},Xt.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Xt.DELETE;)e++;return e},Xt.prototype.isShallow=function(t,e,r,i){var s=W.distancePointLine(e,t,r);return s<i},Xt.prototype.collapseLine=function(){for(var t=this,e=new Oa,r=0;r<this._inputLine.length;r++)t._isDeleted[r]!==Xt.DELETE&&e.add(t._inputLine[r]);return e.toCoordinateArray()},Xt.prototype.interfaces_=function(){return[]},Xt.prototype.getClass=function(){return Xt},Xt.simplify=function(t,e){var r=new Xt(t);return r.simplify(e)},Ga.INIT.get=function(){return 0},Ga.DELETE.get=function(){return 1},Ga.KEEP.get=function(){return 1},Ga.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Xt,Ga);var nr=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new U},Nd={COORDINATE_ARRAY_TYPE:{configurable:!0}};nr.prototype.getCoordinates=function(){var t=this._ptList.toArray(nr.COORDINATE_ARRAY_TYPE);return t},nr.prototype.setPrecisionModel=function(t){this._precisionModel=t},nr.prototype.addPt=function(t){var e=new x(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},nr.prototype.revere=function(){},nr.prototype.addPts=function(t,e){var r=this;if(e)for(var i=0;i<t.length;i++)r.addPt(t[i]);else for(var s=t.length-1;s>=0;s--)r.addPt(t[s])},nr.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),r=t.distance(e);return r<this._minimimVertexDistance},nr.prototype.toString=function(){var t=new pt,e=t.createLineString(this.getCoordinates());return e.toString()},nr.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new x(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},nr.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},nr.prototype.interfaces_=function(){return[]},nr.prototype.getClass=function(){return nr},Nd.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(nr,Nd);var vt=function(){},Os={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};vt.prototype.interfaces_=function(){return[]},vt.prototype.getClass=function(){return vt},vt.toDegrees=function(t){return t*180/Math.PI},vt.normalize=function(t){for(;t>Math.PI;)t-=vt.PI_TIMES_2;for(;t<=-Math.PI;)t+=vt.PI_TIMES_2;return t},vt.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=r.x-e.x,s=r.y-e.y;return Math.atan2(s,i)}},vt.isAcute=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-e.x,a=r.y-e.y,u=i*o+s*a;return u>0},vt.isObtuse=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-e.x,a=r.y-e.y,u=i*o+s*a;return u<0},vt.interiorAngle=function(t,e,r){var i=vt.angle(e,t),s=vt.angle(e,r);return Math.abs(s-i)},vt.normalizePositive=function(t){if(t<0){for(;t<0;)t+=vt.PI_TIMES_2;t>=vt.PI_TIMES_2&&(t=0)}else{for(;t>=vt.PI_TIMES_2;)t-=vt.PI_TIMES_2;t<0&&(t=0)}return t},vt.angleBetween=function(t,e,r){var i=vt.angle(e,t),s=vt.angle(e,r);return vt.diff(i,s)},vt.diff=function(t,e){var r=null;return t<e?r=e-t:r=t-e,r>Math.PI&&(r=2*Math.PI-r),r},vt.toRadians=function(t){return t*Math.PI/180},vt.getTurn=function(t,e){var r=Math.sin(e-t);return r>0?vt.COUNTERCLOCKWISE:r<0?vt.CLOCKWISE:vt.NONE},vt.angleBetweenOriented=function(t,e,r){var i=vt.angle(e,t),s=vt.angle(e,r),o=s-i;return o<=-Math.PI?o+vt.PI_TIMES_2:o>Math.PI?o-vt.PI_TIMES_2:o},Os.PI_TIMES_2.get=function(){return 2*Math.PI},Os.PI_OVER_2.get=function(){return Math.PI/2},Os.PI_OVER_4.get=function(){return Math.PI/4},Os.COUNTERCLOCKWISE.get=function(){return W.COUNTERCLOCKWISE},Os.CLOCKWISE.get=function(){return W.CLOCKWISE},Os.NONE.get=function(){return W.COLLINEAR},Object.defineProperties(vt,Os);var Ft=function n(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Z,this._seg1=new Z,this._offset0=new Z,this._offset1=new Z,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],r=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new zi,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===bt.JOIN_ROUND&&(this._closingSegLengthFactor=n.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Wa={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}};Ft.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var r=W.computeOrientation(this._s0,this._s1,this._s2),i=r===W.CLOCKWISE&&this._side===z.LEFT||r===W.COUNTERCLOCKWISE&&this._side===z.RIGHT;r===0?this.addCollinear(e):i?this.addOutsideTurn(r,e):this.addInsideTurn(r,e)},Ft.prototype.addLineEndCap=function(t,e){var r=new Z(t,e),i=new Z;this.computeOffsetSegment(r,z.LEFT,this._distance,i);var s=new Z;this.computeOffsetSegment(r,z.RIGHT,this._distance,s);var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case bt.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,u+Math.PI/2,u-Math.PI/2,W.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case bt.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case bt.CAP_SQUARE:var l=new x;l.x=Math.abs(this._distance)*Math.cos(u),l.y=Math.abs(this._distance)*Math.sin(u);var c=new x(i.p1.x+l.x,i.p1.y+l.y),h=new x(s.p1.x+l.x,s.p1.y+l.y);this._segList.addPt(c),this._segList.addPt(h);break}},Ft.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t},Ft.prototype.addMitreJoin=function(t,e,r,i){var s=!0,o=null;try{o=Nr.intersection(e.p0,e.p1,r.p0,r.p1);var a=i<=0?1:o.distance(t)/Math.abs(i);a>this._bufParams.getMitreLimit()&&(s=!1)}catch(u){if(u instanceof ho)o=new x(0,0),s=!1;else throw u}finally{}s?this._segList.addPt(o):this.addLimitedMitreJoin(e,r,i,this._bufParams.getMitreLimit())},Ft.prototype.addFilletCorner=function(t,e,r,i,s){var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o),l=r.x-t.x,c=r.y-t.y,h=Math.atan2(c,l);i===W.CLOCKWISE?u<=h&&(u+=2*Math.PI):u>=h&&(u-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,u,h,i,s),this._segList.addPt(r)},Ft.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Ft.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===bt.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===bt.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},Ft.prototype.createSquare=function(t){this._segList.addPt(new x(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new x(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new x(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new x(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},Ft.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},Ft.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Ft.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Ft.prototype.initSideSegments=function(t,e,r){this._s1=t,this._s2=e,this._side=r,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,r,this._distance,this._offset1)},Ft.prototype.addLimitedMitreJoin=function(t,e,r,i){var s=this._seg0.p1,o=vt.angle(s,this._seg0.p0),a=vt.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),u=a/2,l=vt.normalize(o+u),c=vt.normalize(l+Math.PI),h=i*r,p=h*Math.abs(Math.sin(u)),v=r-p,w=s.x+h*Math.cos(c),I=s.y+h*Math.sin(c),P=new x(w,I),O=new Z(s,P),m=O.pointAlongOffset(1,v),_=O.pointAlongOffset(1,-v);this._side===z.LEFT?(this._segList.addPt(m),this._segList.addPt(_)):(this._segList.addPt(_),this._segList.addPt(m))},Ft.prototype.computeOffsetSegment=function(t,e,r,i){var s=e===z.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,u=Math.sqrt(o*o+a*a),l=s*r*o/u,c=s*r*a/u;i.p0.x=t.p0.x-c,i.p0.y=t.p0.y+l,i.p1.x=t.p1.x-c,i.p1.y=t.p1.y+l},Ft.prototype.addFilletArc=function(t,e,r,i,s){var o=this,a=i===W.CLOCKWISE?-1:1,u=Math.abs(e-r),l=Math.trunc(u/this._filletAngleQuantum+.5);if(l<1)return null;for(var c=0,h=u/l,p=c,v=new x;p<u;){var w=e+a*p;v.x=t.x+s*Math.cos(w),v.y=t.y+s*Math.sin(w),o._segList.addPt(v),p+=h}},Ft.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Ft.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var r=new x((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r);var i=new x((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)}},Ft.prototype.createCircle=function(t){var e=new x(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Ft.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Ft.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new nr,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Ft.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Ft.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===bt.JOIN_BEVEL||this._bufParams.getJoinStyle()===bt.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,W.CLOCKWISE,this._distance))},Ft.prototype.closeRing=function(){this._segList.closeRing()},Ft.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Ft.prototype.interfaces_=function(){return[]},Ft.prototype.getClass=function(){return Ft},Wa.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},Wa.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},Wa.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Wa.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Ft,Wa);var Re=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Re.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var r=e<0,i=Math.abs(e),s=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],s):this.computeOffsetCurve(t,r,s);var o=s.getCoordinates();return r&&dt.reverse(o),o},Re.prototype.computeSingleSidedBufferCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);if(e){r.addSegments(t,!0);var s=Xt.simplify(t,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],z.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{r.addSegments(t,!1);var u=Xt.simplify(t,i),l=u.length-1;r.initSideSegments(u[0],u[1],z.LEFT),r.addFirstSegment();for(var c=2;c<=l;c++)r.addNextSegment(u[c],!0)}r.addLastSegment(),r.closeRing()},Re.prototype.computeRingBufferCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);e===z.RIGHT&&(i=-i);var s=Xt.simplify(t,i),o=s.length-1;r.initSideSegments(s[o-1],s[0],e);for(var a=1;a<=o;a++){var u=a!==1;r.addNextSegment(s[a],u)}r.closeRing()},Re.prototype.computeLineBufferCurve=function(t,e){var r=this.simplifyTolerance(this._distance),i=Xt.simplify(t,r),s=i.length-1;e.initSideSegments(i[0],i[1],z.LEFT);for(var o=2;o<=s;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[s-1],i[s]);var a=Xt.simplify(t,-r),u=a.length-1;e.initSideSegments(a[u],a[u-1],z.LEFT);for(var l=u-2;l>=0;l--)e.addNextSegment(a[l],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},Re.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case bt.CAP_ROUND:e.createCircle(t);break;case bt.CAP_SQUARE:e.createSquare(t);break}},Re.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var r=Math.abs(e),i=this.getSegGen(r);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var s=e<0;this.computeSingleSidedBufferCurve(t,s,i)}else this.computeLineBufferCurve(t,i);var o=i.getCoordinates();return o},Re.prototype.getBufferParameters=function(){return this._bufParams},Re.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Re.prototype.getRingCurve=function(t,e,r){if(this._distance=r,t.length<=2)return this.getLineCurve(t,r);if(r===0)return Re.copyCoordinates(t);var i=this.getSegGen(r);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Re.prototype.computeOffsetCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);if(e){var s=Xt.simplify(t,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],z.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{var u=Xt.simplify(t,i),l=u.length-1;r.initSideSegments(u[0],u[1],z.LEFT),r.addFirstSegment();for(var c=2;c<=l;c++)r.addNextSegment(u[c],!0)}r.addLastSegment()},Re.prototype.getSegGen=function(t){return new Ft(this._precisionModel,this._bufParams,t)},Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re},Re.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),r=0;r<e.length;r++)e[r]=new x(t[r]);return e};var Ds=function(){this._subgraphs=null,this._seg=new Z,this._cga=new W;var t=arguments[0];this._subgraphs=t},Td={DepthSegment:{configurable:!0}};Ds.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=new U,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),o=s.getEnvelope();e.y<o.getMinY()||e.y>o.getMaxY()||t.findStabbedSegments(e,s.getDirectedEdges(),r)}return r}else if(arguments.length===3){if(nt(arguments[2],Or)&&arguments[0]instanceof x&&arguments[1]instanceof Zl)for(var a=arguments[0],u=arguments[1],l=arguments[2],c=u.getEdge().getCoordinates(),h=0;h<c.length-1;h++){t._seg.p0=c[h],t._seg.p1=c[h+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var p=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(p<a.x)&&!t._seg.isHorizontal()&&!(a.y<t._seg.p0.y||a.y>t._seg.p1.y)&&W.computeOrientation(t._seg.p0,t._seg.p1,a)!==W.RIGHT){var v=u.getDepth(z.LEFT);t._seg.p0.equals(c[h])||(v=u.getDepth(z.RIGHT));var w=new Xi(t._seg,v);l.add(w)}}else if(nt(arguments[2],Or)&&arguments[0]instanceof x&&nt(arguments[1],Or))for(var I=arguments[0],P=arguments[1],O=arguments[2],m=P.iterator();m.hasNext();){var _=m.next();_.isForward()&&t.findStabbedSegments(I,_,O)}}},Ds.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var r=Lr.min(e);return r._leftDepth},Ds.prototype.interfaces_=function(){return[]},Ds.prototype.getClass=function(){return Ds},Td.DepthSegment.get=function(){return Xi},Object.defineProperties(Ds,Td);var Xi=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new Z(t),this._leftDepth=e};Xi.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var r=this._upwardSeg.orientationIndex(e._upwardSeg);return r!==0||(r=-1*e._upwardSeg.orientationIndex(this._upwardSeg),r!==0)?r:this._upwardSeg.compareTo(e._upwardSeg)},Xi.prototype.compareX=function(t,e){var r=t.p0.compareTo(e.p0);return r!==0?r:t.p1.compareTo(e.p1)},Xi.prototype.toString=function(){return this._upwardSeg.toString()},Xi.prototype.interfaces_=function(){return[cr]},Xi.prototype.getClass=function(){return Xi};var Nt=function(t,e,r){this.p0=t||null,this.p1=e||null,this.p2=r||null};Nt.prototype.area=function(){return Nt.area(this.p0,this.p1,this.p2)},Nt.prototype.signedArea=function(){return Nt.signedArea(this.p0,this.p1,this.p2)},Nt.prototype.interpolateZ=function(t){if(t===null)throw new Vt("Supplied point is null.");return Nt.interpolateZ(t,this.p0,this.p1,this.p2)},Nt.prototype.longestSideLength=function(){return Nt.longestSideLength(this.p0,this.p1,this.p2)},Nt.prototype.isAcute=function(){return Nt.isAcute(this.p0,this.p1,this.p2)},Nt.prototype.circumcentre=function(){return Nt.circumcentre(this.p0,this.p1,this.p2)},Nt.prototype.area3D=function(){return Nt.area3D(this.p0,this.p1,this.p2)},Nt.prototype.centroid=function(){return Nt.centroid(this.p0,this.p1,this.p2)},Nt.prototype.inCentre=function(){return Nt.inCentre(this.p0,this.p1,this.p2)},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt},Nt.area=function(t,e,r){return Math.abs(((r.x-t.x)*(e.y-t.y)-(e.x-t.x)*(r.y-t.y))/2)},Nt.signedArea=function(t,e,r){return((r.x-t.x)*(e.y-t.y)-(e.x-t.x)*(r.y-t.y))/2},Nt.det=function(t,e,r,i){return t*i-e*r},Nt.interpolateZ=function(t,e,r,i){var s=e.x,o=e.y,a=r.x-s,u=i.x-s,l=r.y-o,c=i.y-o,h=a*c-u*l,p=t.x-s,v=t.y-o,w=(c*p-u*v)/h,I=(-l*p+a*v)/h,P=e.z+w*(r.z-e.z)+I*(i.z-e.z);return P},Nt.longestSideLength=function(t,e,r){var i=t.distance(e),s=e.distance(r),o=r.distance(t),a=i;return s>a&&(a=s),o>a&&(a=o),a},Nt.isAcute=function(t,e,r){return!(!vt.isAcute(t,e,r)||!vt.isAcute(e,r,t)||!vt.isAcute(r,t,e))},Nt.circumcentre=function(t,e,r){var i=r.x,s=r.y,o=t.x-i,a=t.y-s,u=e.x-i,l=e.y-s,c=2*Nt.det(o,a,u,l),h=Nt.det(a,o*o+a*a,l,u*u+l*l),p=Nt.det(o,o*o+a*a,u,u*u+l*l),v=i-h/c,w=s+p/c;return new x(v,w)},Nt.perpendicularBisector=function(t,e){var r=e.x-t.x,i=e.y-t.y,s=new Nr(t.x+r/2,t.y+i/2,1),o=new Nr(t.x-i+r/2,t.y+r+i/2,1);return new Nr(s,o)},Nt.angleBisector=function(t,e,r){var i=e.distance(t),s=e.distance(r),o=i/(i+s),a=r.x-t.x,u=r.y-t.y,l=new x(t.x+o*a,t.y+o*u);return l},Nt.area3D=function(t,e,r){var i=e.x-t.x,s=e.y-t.y,o=e.z-t.z,a=r.x-t.x,u=r.y-t.y,l=r.z-t.z,c=s*l-o*u,h=o*a-i*l,p=i*u-s*a,v=c*c+h*h+p*p,w=Math.sqrt(v)/2;return w},Nt.centroid=function(t,e,r){var i=(t.x+e.x+r.x)/3,s=(t.y+e.y+r.y)/3;return new x(i,s)},Nt.inCentre=function(t,e,r){var i=e.distance(r),s=t.distance(r),o=t.distance(e),a=i+s+o,u=(i*t.x+s*e.x+o*r.x)/a,l=(i*t.y+s*e.y+o*r.y)/a;return new x(u,l)};var mr=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new U;var t=arguments[0],e=arguments[1],r=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=r};mr.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),r=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(r,R.EXTERIOR,R.INTERIOR)},mr.prototype.addPolygon=function(t){var e=this,r=this._distance,i=z.LEFT;this._distance<0&&(r=-this._distance,i=z.RIGHT);var s=t.getExteriorRing(),o=dt.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,r,i,R.EXTERIOR,R.INTERIOR);for(var a=0;a<t.getNumInteriorRing();a++){var u=t.getInteriorRingN(a),l=dt.removeRepeatedPoints(u.getCoordinates());e._distance>0&&e.isErodedCompletely(u,-e._distance)||e.addPolygonRing(l,r,z.opposite(i),R.INTERIOR,R.EXTERIOR)}},mr.prototype.isTriangleErodedCompletely=function(t,e){var r=new Nt(t[0],t[1],t[2]),i=r.inCentre(),s=W.distancePointLine(i,r.p0,r.p1);return s<Math.abs(e)},mr.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=dt.removeRepeatedPoints(t.getCoordinates()),r=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(r,R.EXTERIOR,R.INTERIOR)},mr.prototype.addCurve=function(t,e,r){if(t===null||t.length<2)return null;var i=new Jt(t,new Ot(0,R.BOUNDARY,e,r));this._curveList.add(i)},mr.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},mr.prototype.addPolygonRing=function(t,e,r,i,s){if(e===0&&t.length<En.MINIMUM_VALID_SIZE)return null;var o=i,a=s;t.length>=En.MINIMUM_VALID_SIZE&&W.isCCW(t)&&(o=s,a=i,r=z.opposite(r));var u=this._curveBuilder.getRingCurve(t,r,e);this.addCurve(u,o,a)},mr.prototype.add=function(t){if(t.isEmpty())return null;t instanceof te?this.addPolygon(t):t instanceof qt?this.addLineString(t):t instanceof We?this.addPoint(t):t instanceof Eo?this.addCollection(t):t instanceof Wi?this.addCollection(t):t instanceof Sn?this.addCollection(t):t instanceof Ce&&this.addCollection(t)},mr.prototype.isErodedCompletely=function(t,e){var r=t.getCoordinates();if(r.length<4)return e<0;if(r.length===4)return this.isTriangleErodedCompletely(r,e);var i=t.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>s},mr.prototype.addCollection=function(t){for(var e=this,r=0;r<t.getNumGeometries();r++){var i=t.getGeometryN(r);e.add(i)}},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr};var Po=function(){};Po.prototype.locate=function(t){},Po.prototype.interfaces_=function(){return[]},Po.prototype.getClass=function(){return Po};var Pn=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};Pn.prototype.next=function(){if(this._atStart)return this._atStart=!1,Pn.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 _o;var t=this._parent.getGeometryN(this._index++);return t instanceof Ce?(this._subcollectionIterator=new Pn(t),this._subcollectionIterator.next()):t},Pn.prototype.remove=function(){throw new Error(this.getClass().getName())},Pn.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)},Pn.prototype.interfaces_=function(){return[yo]},Pn.prototype.getClass=function(){return Pn},Pn.isAtomic=function(t){return!(t instanceof Ce)};var ir=function(){this._geom=null;var t=arguments[0];this._geom=t};ir.prototype.locate=function(t){return ir.locate(t,this._geom)},ir.prototype.interfaces_=function(){return[Po]},ir.prototype.getClass=function(){return ir},ir.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?W.isPointInRing(t,e.getCoordinates()):!1},ir.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var r=e.getExteriorRing();if(!ir.isPointInRing(t,r))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var s=e.getInteriorRingN(i);if(ir.isPointInRing(t,s))return!1}return!0},ir.containsPoint=function(t,e){if(e instanceof te)return ir.containsPointInPolygon(t,e);if(e instanceof Ce)for(var r=new Pn(e);r.hasNext();){var i=r.next();if(i!==e&&ir.containsPoint(t,i))return!0}return!1},ir.locate=function(t,e){return e.isEmpty()?R.EXTERIOR:ir.containsPoint(t,e)?R.INTERIOR:R.EXTERIOR};var we=function(){this._edgeMap=new ye,this._edgeList=null,this._ptInAreaLocation=[R.NONE,R.NONE]};we.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),r=e-1;return e===0&&(r=this._edgeList.size()-1),this._edgeList.get(r)},we.prototype.propagateSideLabels=function(t){for(var e=R.NONE,r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.isArea(t)&&s.getLocation(t,z.LEFT)!==R.NONE&&(e=s.getLocation(t,z.LEFT))}if(e===R.NONE)return null;for(var o=e,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();if(l.getLocation(t,z.ON)===R.NONE&&l.setLocation(t,z.ON,o),l.isArea(t)){var c=l.getLocation(t,z.LEFT),h=l.getLocation(t,z.RIGHT);if(h!==R.NONE){if(h!==o)throw new Kn("side location conflict",u.getCoordinate());c===R.NONE&&ct.shouldNeverReachHere("found single null side (at "+u.getCoordinate()+")"),o=c}else ct.isTrue(l.getLocation(t,z.LEFT)===R.NONE,"found single null side"),l.setLocation(t,z.RIGHT,o),l.setLocation(t,z.LEFT,o)}}},we.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},we.prototype.print=function(t){ce.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},we.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},we.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var r=e.size()-1,i=e.get(r).getLabel(),s=i.getLocation(t,z.LEFT);ct.isTrue(s!==R.NONE,"Found unlabelled area edge");for(var o=s,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();ct.isTrue(l.isArea(t),"Found non-area edge");var c=l.getLocation(t,z.LEFT),h=l.getLocation(t,z.RIGHT);if(c===h||h!==o)return!1;o=c}return!0},we.prototype.findIndex=function(t){var e=this;this.iterator();for(var r=0;r<this._edgeList.size();r++){var i=e._edgeList.get(r);if(i===t)return r}return-1},we.prototype.iterator=function(){return this.getEdges().iterator()},we.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new U(this._edgeMap.values())),this._edgeList},we.prototype.getLocation=function(t,e,r){return this._ptInAreaLocation[t]===R.NONE&&(this._ptInAreaLocation[t]=ir.locate(e,r[t].getGeometry())),this._ptInAreaLocation[t]},we.prototype.toString=function(){var t=new zr;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
|
|
41
|
+
`,ze=class ze extends H{constructor(){super();f(this,"_ratio",this.dv(p.react(0)));f(this,"_subPlayers",this.dv(new p.ObservableArray));const e=this.dv(new p.Player);{const o=()=>{e.loop=this.loop??ze.defaults.loop};o(),this.d(this.loopChanged.don(o))}{const o=()=>{(this.loop??ze.defaults.loop)!==e.loop&&(this.loop=e.loop)};o(),this.d(e.loopChangedEvent.don(o))}{const o=()=>{e.currentTime=this.currentTime??ze.defaults.currentTime};o(),this.d(this.currentTimeChanged.don(o))}{const o=()=>{(this.currentTime??ze.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};o(),this.d(e.currentTimeChangedEvent.don(o))}{const o=()=>{e.duration=this.duration??ze.defaults.duration};o(),this.d(this.durationChanged.don(o))}{const o=()=>{(this.duration??ze.defaults.duration)!==e.duration&&(this.duration=e.duration)};o(),this.d(e.durationChangedEvent.don(o))}{const o=()=>{e.speed=this.speed??ze.defaults.speed};o(),this.d(this.speedChanged.don(o))}{const o=()=>{(this.speed??ze.defaults.speed)!==e.speed&&(this.speed=e.speed)};o(),this.d(e.speedChangedEvent.don(o))}{const o=()=>{e.playing=this.playing??ze.defaults.playing};o(),this.d(this.playingChanged.don(o))}{const o=()=>{(this.playing??ze.defaults.playing)!==e.playing&&(this.playing=e.playing)};o(),this.d(e.playingChangedEvent.don(o))}const r=()=>{const o=this.duration??ze.defaults.duration;o>0&&(this._ratio.value=(this.currentTime??ze.defaults.currentTime)/o)};r();const i=this.dv(p.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.d(i.don(r)),this.d(()=>{const{length:o}=this._subPlayers;for(let a=0;a<o;++a)this._subPlayers.get(a).destroy();this._subPlayers.length=0});const s=()=>{for(let a of this._subPlayers)a.destroy();if(this._subPlayers.length=0,!this.channels)return;const o=this.channels.map(a=>{const[u,l,c]=a;return new qm(u,l,c,this)});this._subPlayers.splice(0,0,...o)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??ze.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};f(ze,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),f(ze,"channelsReadMe",Xm);let gn=ze;(n=>{n.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:p.reactDeepArrayWithUndefined(void 0,(t,e)=>t==null?void 0:t.every((r,i)=>r===e[i]),t=>[...t])})})(gn||(gn={})),p.extendClassProps(gn.prototype,gn.createDefaultProps);class Ul extends H{constructor(e){super();f(this,"_sceneObject",this.dv(p.react(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const r=tt.getSceneObjById(this._id);r&&(this._sceneObject.value=r),this.d(tt.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(tt.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class Hm extends H{constructor(e,r){super();f(this,"_sofi");this._id=e,this._sofi=this.dv(new Ul(this._id));{const i=()=>{r.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class Ym extends H{constructor(){super();f(this,"_id",this.dv(p.react(void 0)));f(this,"_sceneObject",this.dv(p.react(void 0)));f(this,"_resetting",this.dv(new p.ObjResettingWithEvent(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new Hm(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class Jm extends H{constructor(t,e,r,i){super(),this.disposeVar(new p.ObjResettingWithEvent(t.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");const o=t.sceneObject;if(o&&e){const a=e.split(".");if(a.length===0)i.debug&&console.warn("propNames.length === 0");else{let u=p.pluckProperty(o,!1,...a);(!u||!(u instanceof V))&&(a[a.length-1]=a[a.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${a[a.length-1]})再试试!`),u=p.pluckProperty(o,!1,...a),i.debug&&u&&console.warn("event仍然获取不到!")),u?u instanceof V?(s=u,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,s)):i.debug&&console.warn(`the prop is not event from ${o.id}-${o.name}-${o.ref}-${e}`):i.debug&&console.warn(`cannot get changed from ${o.id}-${o.name}-${o.ref}-${e}`)}}if(s){const a=new H;return a.d(s.dwon(()=>r.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}const Lf=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:class extends H{constructor(e,r,i){super();f(this,"_doEvalEvent",this.dv(new V));const s=this._doEvalEvent,o=this.disposeVar(p.createNextAnimateFrameEvent(s)),a=e.map(([u,l])=>{const c=new Ul(u),h=l&&new Jm(c,l,s,r)||void 0;return[c,h]});this.d(()=>{a.forEach(([u,l])=>{l==null||l.destroy(),u.destroy()}),a.length=0}),this.d(s.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=r;if(u==="Immediate"){const c=a.map(([h])=>h.sceneObject);(!l||c.every(h=>h!==void 0))&&i(c)}})),this.d(o.don(()=>{const{evalMode:u="NextAnimateFrame",evalOnlyWhenObjsAllExist:l=!0}=r;if(u==="NextAnimateFrame"){const c=a.map(([h])=>h.sceneObject);(!l||c.every(h=>h!==void 0))&&i(c)}}))}forceExecute(){this._doEvalEvent.emit()}}},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:Bm}=Lf;class Oa extends H{constructor(){super();f(this,"_evalFunc");f(this,"_forceExecute",new V);const e=this.dv(p.react(void 0)),r=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(o){console.error(`evalFunc get error! ${o}`),e.value=void 0}};r(),this.dispose(this.evalFuncStrChanged.disposableOn(r));const i=o=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(o),e.value&&e.value(o))},s=this.disposeVar(new p.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new Bm(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var o;(o=s.obj)==null||o.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(n=>{n.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:p.reactDeepArray([],(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[t[0],t[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(Oa||(Oa={})),p.extendClassProps(Oa.prototype,Oa.createDefaultProps);const Af=vs("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function Xn(n){return Af.forward(n)}function Rf(n){return Af.inverse(n)}const Ff=vs("+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 jm(n){const t=Ff.forward([n[0],n[1]]);return[t[0],t[1],n[2]]}function Zm(n){const t=Ff.inverse([n[0],n[1]]);return[t[0],t[1],n[2]]}function Km(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1])&&n.push(n[0]);const e=Me.point(t),r=Me.polygon([n]);return Me.booleanPointInPolygon(e,r)}var Le=63710088e-1,kf={centimeters:Le*100,centimetres:Le*100,degrees:Le/111325,feet:Le*3.28084,inches:Le*39.37,kilometers:Le/1e3,kilometres:Le/1e3,meters:Le,metres:Le,miles:Le/1609.344,millimeters:Le*1e3,millimetres:Le*1e3,nauticalmiles:Le/1852,radians:1,yards:Le*1.0936};function mn(n,t,e){e===void 0&&(e={});var r={type:"Feature"};return(e.id===0||e.id)&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.properties=t||{},r.geometry=n,r}function Ut(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Vf(n[0])||!Vf(n[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:n};return mn(r,t,e)}function tr(n,t,e){e===void 0&&(e={});for(var r=0,i=n;r<i.length;r++){var s=i[r];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<s[s.length-1].length;o++)if(s[s.length-1][o]!==s[0][o])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:n};return mn(a,t,e)}function vn(n,t,e){if(e===void 0&&(e={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:n};return mn(r,t,e)}function ho(n,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=n,e}function Gl(n,t,e){e===void 0&&(e={});var r={type:"MultiPolygon",coordinates:n};return mn(r,t,e)}function Wl(n,t){t===void 0&&(t="kilometers");var e=kf[t];if(!e)throw new Error(t+" units is invalid");return n*e}function ql(n,t){t===void 0&&(t="kilometers");var e=kf[t];if(!e)throw new Error(t+" units is invalid");return n/e}function Iu(n){var t=n%(2*Math.PI);return t*180/Math.PI}function We(n){var t=n%360;return t*Math.PI/180}function Xl(n,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("length must be a positive number");return Wl(ql(n,t),e)}function Vf(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}function er(n){if(!n)throw new Error("coord is required");if(!Array.isArray(n)){if(n.type==="Feature"&&n.geometry!==null&&n.geometry.type==="Point")return n.geometry.coordinates;if(n.type==="Point")return n.coordinates}if(Array.isArray(n)&&n.length>=2&&!Array.isArray(n[0])&&!Array.isArray(n[1]))return n;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ss(n){if(Array.isArray(n))return n;if(n.type==="Feature"){if(n.geometry!==null)return n.geometry.coordinates}else if(n.coordinates)return n.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function zf(n,t,e){if(!n)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!n||n.type!=="Feature"||!n.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!n.geometry||n.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+n.geometry.type)}function br(n){return n.type==="Feature"?n.geometry:n}function Qm(n,t){return n.type==="FeatureCollection"?"FeatureCollection":n.type==="GeometryCollection"?"GeometryCollection":n.type==="Feature"&&n.geometry!==null?n.geometry.type:n.type}function xa(n,t,e){if(e===void 0&&(e={}),e.final===!0)return $m(n,t);var r=er(n),i=er(t),s=We(r[0]),o=We(i[0]),a=We(r[1]),u=We(i[1]),l=Math.sin(o-s)*Math.cos(u),c=Math.cos(a)*Math.sin(u)-Math.sin(a)*Math.cos(u)*Math.cos(o-s);return Iu(Math.atan2(l,c))}function $m(n,t){var e=xa(t,n);return e=(e+180)%360,e}function fo(n,t,e,r){r===void 0&&(r={});var i=er(n),s=We(i[0]),o=We(i[1]),a=We(e),u=ql(t,r.units),l=Math.asin(Math.sin(o)*Math.cos(u)+Math.cos(o)*Math.sin(u)*Math.cos(a)),c=s+Math.atan2(Math.sin(a)*Math.sin(u)*Math.cos(o),Math.cos(u)-Math.sin(o)*Math.sin(l)),h=Iu(c),d=Iu(l);return Ut([h,d],r.properties)}function mi(n,t,e){e===void 0&&(e={});var r=er(n),i=er(t),s=We(i[1]-r[1]),o=We(i[0]-r[0]),a=We(r[1]),u=We(i[1]),l=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(u);return Wl(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),e.units)}function tv(n,t,e){e===void 0&&(e={});for(var r=br(n),i=r.coordinates,s=0,o=0;o<i.length&&!(t>=s&&o===i.length-1);o++)if(s>=t){var a=t-s;if(a){var u=xa(i[o],i[o-1])-180,l=fo(i[o],a,u,e);return l}else return Ut(i[o])}else s+=mi(i[o],i[o+1],e);return Ut(i[i.length-1])}function ev(n,t){const e=vn(n);return tv(e,t,{units:"meters"}).geometry.coordinates}function po(n,t,e){if(n!==null)for(var r,i,s,o,a,u,l,c=0,h=0,d,g=n.type,y=g==="FeatureCollection",C=g==="Feature",P=y?n.features.length:1,T=0;T<P;T++){l=y?n.features[T].geometry:C?n.geometry:n,d=l?l.type==="GeometryCollection":!1,a=d?l.geometries.length:1;for(var v=0;v<a;v++){var w=0,m=0;if(o=d?l.geometries[v]:l,o!==null){u=o.coordinates;var _=o.type;switch(c=e&&(_==="Polygon"||_==="MultiPolygon")?1:0,_){case null:break;case"Point":if(t(u,h,T,w,m)===!1)return!1;h++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(t(u[r],h,T,w,m)===!1)return!1;h++,_==="MultiPoint"&&w++}_==="LineString"&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-c;i++){if(t(u[r][i],h,T,w,m)===!1)return!1;h++}_==="MultiLineString"&&w++,_==="Polygon"&&m++}_==="Polygon"&&w++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(m=0,i=0;i<u[r].length;i++){for(s=0;s<u[r][i].length-c;s++){if(t(u[r][i][s],h,T,w,m)===!1)return!1;h++}m++}w++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(po(o.geometries[r],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Pu(n,t){if(n.type==="Feature")t(n,0);else if(n.type==="FeatureCollection")for(var e=0;e<n.features.length&&t(n.features[e],e)!==!1;e++);}function bu(n,t){var e,r,i,s,o,a,u,l,c,h,d=0,g=n.type==="FeatureCollection",y=n.type==="Feature",C=g?n.features.length:1;for(e=0;e<C;e++){for(a=g?n.features[e].geometry:y?n.geometry:n,l=g?n.features[e].properties:y?n.properties:{},c=g?n.features[e].bbox:y?n.bbox:void 0,h=g?n.features[e].id:y?n.id:void 0,u=a?a.type==="GeometryCollection":!1,o=u?a.geometries.length:1,i=0;i<o;i++){if(s=u?a.geometries[i]:a,s===null){if(t(null,d,l,c,h)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,d,l,c,h)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<s.geometries.length;r++)if(t(s.geometries[r],d,l,c,h)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}d++}}function rv(n,t,e){var r=e;return bu(n,function(i,s,o,a,u){r=t(r,i,s,o,a,u)}),r}function Hl(n,t){bu(n,function(e,r,i,s,o){var a=e===null?null:e.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return t(mn(e,i,{bbox:s,id:o}),r,0)===!1?!1:void 0}var u;switch(a){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var l=0;l<e.coordinates.length;l++){var c=e.coordinates[l],h={type:u,coordinates:c};if(t(mn(h,i),r,l)===!1)return!1}})}function nv(n,t){Hl(n,function(e,r,i){var s=0;if(e.geometry){var o=e.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var a,u=0,l=0,c=0;if(po(e,function(h,d,g,y,C){if(a===void 0||r>u||y>l||C>c){a=h,u=r,l=y,c=C,s=0;return}var P=vn([a,h],e.properties);if(t(P,r,i,C,s)===!1)return!1;s++,a=h})===!1)return!1}}})}var Uf=6378137;function iv(n){return rv(n,function(t,e){return t+sv(e)},0)}function sv(n){var t=0,e;switch(n.type){case"Polygon":return Gf(n.coordinates);case"MultiPolygon":for(e=0;e<n.coordinates.length;e++)t+=Gf(n.coordinates[e]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Gf(n){var t=0;if(n&&n.length>0){t+=Math.abs(Wf(n[0]));for(var e=1;e<n.length;e++)t-=Math.abs(Wf(n[e]))}return t}function Wf(n){var t,e,r,i,s,o,a,u=0,l=n.length;if(l>2){for(a=0;a<l;a++)a===l-2?(i=l-2,s=l-1,o=0):a===l-1?(i=l-1,s=0,o=1):(i=a,s=a+1,o=a+2),t=n[i],e=n[s],r=n[o],u+=(Yl(r[0])-Yl(t[0]))*Math.sin(Yl(e[1]));u=u*Uf*Uf/2}return u}function Yl(n){return n*Math.PI/180}function Jl(n){if((n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),n.length<=3)return 0;const t=tr([n]);return iv(t)}function qf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function ov(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var Nu={exports:{}},Tu={exports:{}},av=Tu.exports,Xf;function Hf(){return Xf||(Xf=1,function(n,t){(function(e,r){n.exports=r()})(av,function(){function e(v,w,m,_,E){(function I(b,O,M,N,x){for(;N>M;){if(N-M>600){var A=N-M+1,F=O-M+1,Y=Math.log(A),G=.5*Math.exp(2*Y/3),K=.5*Math.sqrt(Y*G*(A-G)/A)*(F-A/2<0?-1:1),at=Math.max(M,Math.floor(O-F*G/A+K)),ht=Math.min(N,Math.floor(O+(A-F)*G/A+K));I(b,O,at,ht,x)}var X=b[O],J=M,B=N;for(r(b,M,O),x(b[N],X)>0&&r(b,M,N);J<B;){for(r(b,J,B),J++,B--;x(b[J],X)<0;)J++;for(;x(b[B],X)>0;)B--}x(b[M],X)===0?r(b,M,B):r(b,++B,N),B<=O&&(M=B+1),O<=B&&(N=B-1)}})(v,w,m||0,_||v.length-1,E||i)}function r(v,w,m){var _=v[w];v[w]=v[m],v[m]=_}function i(v,w){return v<w?-1:v>w?1:0}var s=function(v){v===void 0&&(v=9),this._maxEntries=Math.max(4,v),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(v,w,m){if(!m)return w.indexOf(v);for(var _=0;_<w.length;_++)if(m(v,w[_]))return _;return-1}function a(v,w){u(v,0,v.children.length,w,v)}function u(v,w,m,_,E){E||(E=P(null)),E.minX=1/0,E.minY=1/0,E.maxX=-1/0,E.maxY=-1/0;for(var I=w;I<m;I++){var b=v.children[I];l(E,v.leaf?_(b):b)}return E}function l(v,w){return v.minX=Math.min(v.minX,w.minX),v.minY=Math.min(v.minY,w.minY),v.maxX=Math.max(v.maxX,w.maxX),v.maxY=Math.max(v.maxY,w.maxY),v}function c(v,w){return v.minX-w.minX}function h(v,w){return v.minY-w.minY}function d(v){return(v.maxX-v.minX)*(v.maxY-v.minY)}function g(v){return v.maxX-v.minX+(v.maxY-v.minY)}function y(v,w){return v.minX<=w.minX&&v.minY<=w.minY&&w.maxX<=v.maxX&&w.maxY<=v.maxY}function C(v,w){return w.minX<=v.maxX&&w.minY<=v.maxY&&w.maxX>=v.minX&&w.maxY>=v.minY}function P(v){return{children:v,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function T(v,w,m,_,E){for(var I=[w,m];I.length;)if(!((m=I.pop())-(w=I.pop())<=_)){var b=w+Math.ceil((m-w)/_/2)*_;e(v,b,w,m,E),I.push(w,b,b,m)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(v){var w=this.data,m=[];if(!C(v,w))return m;for(var _=this.toBBox,E=[];w;){for(var I=0;I<w.children.length;I++){var b=w.children[I],O=w.leaf?_(b):b;C(v,O)&&(w.leaf?m.push(b):y(v,O)?this._all(b,m):E.push(b))}w=E.pop()}return m},s.prototype.collides=function(v){var w=this.data;if(!C(v,w))return!1;for(var m=[];w;){for(var _=0;_<w.children.length;_++){var E=w.children[_],I=w.leaf?this.toBBox(E):E;if(C(v,I)){if(w.leaf||y(v,I))return!0;m.push(E)}}w=m.pop()}return!1},s.prototype.load=function(v){if(!v||!v.length)return this;if(v.length<this._minEntries){for(var w=0;w<v.length;w++)this.insert(v[w]);return this}var m=this._build(v.slice(),0,v.length-1,0);if(this.data.children.length)if(this.data.height===m.height)this._splitRoot(this.data,m);else{if(this.data.height<m.height){var _=this.data;this.data=m,m=_}this._insert(m,this.data.height-m.height-1,!0)}else this.data=m;return this},s.prototype.insert=function(v){return v&&this._insert(v,this.data.height-1),this},s.prototype.clear=function(){return this.data=P([]),this},s.prototype.remove=function(v,w){if(!v)return this;for(var m,_,E,I=this.data,b=this.toBBox(v),O=[],M=[];I||O.length;){if(I||(I=O.pop(),_=O[O.length-1],m=M.pop(),E=!0),I.leaf){var N=o(v,I.children,w);if(N!==-1)return I.children.splice(N,1),O.push(I),this._condense(O),this}E||I.leaf||!y(I,b)?_?(m++,I=_.children[m],E=!1):I=null:(O.push(I),M.push(m),m=0,_=I,I=I.children[0])}return this},s.prototype.toBBox=function(v){return v},s.prototype.compareMinX=function(v,w){return v.minX-w.minX},s.prototype.compareMinY=function(v,w){return v.minY-w.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(v){return this.data=v,this},s.prototype._all=function(v,w){for(var m=[];v;)v.leaf?w.push.apply(w,v.children):m.push.apply(m,v.children),v=m.pop();return w},s.prototype._build=function(v,w,m,_){var E,I=m-w+1,b=this._maxEntries;if(I<=b)return a(E=P(v.slice(w,m+1)),this.toBBox),E;_||(_=Math.ceil(Math.log(I)/Math.log(b)),b=Math.ceil(I/Math.pow(b,_-1))),(E=P([])).leaf=!1,E.height=_;var O=Math.ceil(I/b),M=O*Math.ceil(Math.sqrt(b));T(v,w,m,M,this.compareMinX);for(var N=w;N<=m;N+=M){var x=Math.min(N+M-1,m);T(v,N,x,O,this.compareMinY);for(var A=N;A<=x;A+=O){var F=Math.min(A+O-1,x);E.children.push(this._build(v,A,F,_-1))}}return a(E,this.toBBox),E},s.prototype._chooseSubtree=function(v,w,m,_){for(;_.push(w),!w.leaf&&_.length-1!==m;){for(var E=1/0,I=1/0,b=void 0,O=0;O<w.children.length;O++){var M=w.children[O],N=d(M),x=(A=v,F=M,(Math.max(F.maxX,A.maxX)-Math.min(F.minX,A.minX))*(Math.max(F.maxY,A.maxY)-Math.min(F.minY,A.minY))-N);x<I?(I=x,E=N<E?N:E,b=M):x===I&&N<E&&(E=N,b=M)}w=b||w.children[0]}var A,F;return w},s.prototype._insert=function(v,w,m){var _=m?v:this.toBBox(v),E=[],I=this._chooseSubtree(_,this.data,w,E);for(I.children.push(v),l(I,_);w>=0&&E[w].children.length>this._maxEntries;)this._split(E,w),w--;this._adjustParentBBoxes(_,E,w)},s.prototype._split=function(v,w){var m=v[w],_=m.children.length,E=this._minEntries;this._chooseSplitAxis(m,E,_);var I=this._chooseSplitIndex(m,E,_),b=P(m.children.splice(I,m.children.length-I));b.height=m.height,b.leaf=m.leaf,a(m,this.toBBox),a(b,this.toBBox),w?v[w-1].children.push(b):this._splitRoot(m,b)},s.prototype._splitRoot=function(v,w){this.data=P([v,w]),this.data.height=v.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(v,w,m){for(var _,E,I,b,O,M,N,x=1/0,A=1/0,F=w;F<=m-w;F++){var Y=u(v,0,F,this.toBBox),G=u(v,F,m,this.toBBox),K=(E=Y,I=G,b=void 0,O=void 0,M=void 0,N=void 0,b=Math.max(E.minX,I.minX),O=Math.max(E.minY,I.minY),M=Math.min(E.maxX,I.maxX),N=Math.min(E.maxY,I.maxY),Math.max(0,M-b)*Math.max(0,N-O)),at=d(Y)+d(G);K<x?(x=K,_=F,A=at<A?at:A):K===x&&at<A&&(A=at,_=F)}return _||m-w},s.prototype._chooseSplitAxis=function(v,w,m){var _=v.leaf?this.compareMinX:c,E=v.leaf?this.compareMinY:h;this._allDistMargin(v,w,m,_)<this._allDistMargin(v,w,m,E)&&v.children.sort(_)},s.prototype._allDistMargin=function(v,w,m,_){v.children.sort(_);for(var E=this.toBBox,I=u(v,0,w,E),b=u(v,m-w,m,E),O=g(I)+g(b),M=w;M<m-w;M++){var N=v.children[M];l(I,v.leaf?E(N):N),O+=g(I)}for(var x=m-w-1;x>=w;x--){var A=v.children[x];l(b,v.leaf?E(A):A),O+=g(b)}return O},s.prototype._adjustParentBBoxes=function(v,w,m){for(var _=m;_>=0;_--)l(w[_],v)},s.prototype._condense=function(v){for(var w=v.length-1,m=void 0;w>=0;w--)v[w].children.length===0?w>0?(m=v[w-1].children).splice(m.indexOf(v[w]),1):this.clear():a(v[w],this.toBBox)},s})}(Tu)),Tu.exports}class uv{constructor(t=[],e=lv){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:r}=this,i=e[t];for(;t>0;){const s=t-1>>1,o=e[s];if(r(i,o)>=0)break;e[t]=o,t=s}e[t]=i}_down(t){const{data:e,compare:r}=this,i=this.length>>1,s=e[t];for(;t<i;){let o=(t<<1)+1,a=e[o];const u=o+1;if(u<this.length&&r(e[u],a)<0&&(o=u,a=e[u]),r(a,s)>=0)break;e[t]=a,t=o}e[t]=s}}function lv(n,t){return n<t?-1:n>t?1:0}const cv=ov(Object.freeze(Object.defineProperty({__proto__:null,default:uv},Symbol.toStringTag,{value:"Module"})));var Da={exports:{}},Bl,Yf;function hv(){return Yf||(Yf=1,Bl=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=(i-r)/2,l=0,c=u-1;l<u;c=l++){var h=e[r+l*2+0],d=e[r+l*2+1],g=e[r+c*2+0],y=e[r+c*2+1],C=d>o!=y>o&&s<(g-h)*(o-d)/(y-d)+h;C&&(a=!a)}return a}),Bl}var jl,Jf;function fv(){return Jf||(Jf=1,jl=function(t,e,r,i){var s=t[0],o=t[1],a=!1;r===void 0&&(r=0),i===void 0&&(i=e.length);for(var u=i-r,l=0,c=u-1;l<u;c=l++){var h=e[l+r][0],d=e[l+r][1],g=e[c+r][0],y=e[c+r][1],C=d>o!=y>o&&s<(g-h)*(o-d)/(y-d)+h;C&&(a=!a)}return a}),jl}var Bf;function dv(){if(Bf)return Da.exports;Bf=1;var n=hv(),t=fv();return Da.exports=function(r,i,s,o){return i.length>0&&Array.isArray(i[0])?t(r,i,s,o):n(r,i,s,o)},Da.exports.nested=t,Da.exports.flat=n,Da.exports}var Ma={exports:{}},pv=Ma.exports,jf;function gv(){return jf||(jf=1,function(n,t){(function(e,r){r(t)})(pv,function(e){const i=33306690738754706e-32;function s(C,P,T,v,w){let m,_,E,I,b=P[0],O=v[0],M=0,N=0;O>b==O>-b?(m=b,b=P[++M]):(m=O,O=v[++N]);let x=0;if(M<C&&N<T)for(O>b==O>-b?(E=m-((_=b+m)-b),b=P[++M]):(E=m-((_=O+m)-O),O=v[++N]),m=_,E!==0&&(w[x++]=E);M<C&&N<T;)O>b==O>-b?(E=m-((_=m+b)-(I=_-m))+(b-I),b=P[++M]):(E=m-((_=m+O)-(I=_-m))+(O-I),O=v[++N]),m=_,E!==0&&(w[x++]=E);for(;M<C;)E=m-((_=m+b)-(I=_-m))+(b-I),b=P[++M],m=_,E!==0&&(w[x++]=E);for(;N<T;)E=m-((_=m+O)-(I=_-m))+(O-I),O=v[++N],m=_,E!==0&&(w[x++]=E);return m===0&&x!==0||(w[x++]=m),x}function o(C){return new Float64Array(C)}const a=33306690738754716e-32,u=22204460492503146e-32,l=11093356479670487e-47,c=o(4),h=o(8),d=o(12),g=o(16),y=o(4);e.orient2d=function(C,P,T,v,w,m){const _=(P-m)*(T-w),E=(C-w)*(v-m),I=_-E;if(_===0||E===0||_>0!=E>0)return I;const b=Math.abs(_+E);return Math.abs(I)>=a*b?I:-function(O,M,N,x,A,F,Y){let G,K,at,ht,X,J,B,gt,xt,St,Ct,Rt,ue,ie,Er,Sr,pi,Cr;const Ir=O-A,Pr=N-A,Wn=M-F,qn=x-F;X=(Er=(gt=Ir-(B=(J=134217729*Ir)-(J-Ir)))*(St=qn-(xt=(J=134217729*qn)-(J-qn)))-((ie=Ir*qn)-B*xt-gt*xt-B*St))-(Ct=Er-(pi=(gt=Wn-(B=(J=134217729*Wn)-(J-Wn)))*(St=Pr-(xt=(J=134217729*Pr)-(J-Pr)))-((Sr=Wn*Pr)-B*xt-gt*xt-B*St))),c[0]=Er-(Ct+X)+(X-pi),X=(ue=ie-((Rt=ie+Ct)-(X=Rt-ie))+(Ct-X))-(Ct=ue-Sr),c[1]=ue-(Ct+X)+(X-Sr),X=(Cr=Rt+Ct)-Rt,c[2]=Rt-(Cr-X)+(Ct-X),c[3]=Cr;let ms=function(K0,Fg){let kg=Fg[0];for(let of=1;of<K0;of++)kg+=Fg[of];return kg}(4,c),_u=u*Y;if(ms>=_u||-ms>=_u||(G=O-(Ir+(X=O-Ir))+(X-A),at=N-(Pr+(X=N-Pr))+(X-A),K=M-(Wn+(X=M-Wn))+(X-F),ht=x-(qn+(X=x-qn))+(X-F),G===0&&K===0&&at===0&&ht===0)||(_u=l*Y+i*Math.abs(ms),(ms+=Ir*ht+qn*G-(Wn*at+Pr*K))>=_u||-ms>=_u))return ms;X=(Er=(gt=G-(B=(J=134217729*G)-(J-G)))*(St=qn-(xt=(J=134217729*qn)-(J-qn)))-((ie=G*qn)-B*xt-gt*xt-B*St))-(Ct=Er-(pi=(gt=K-(B=(J=134217729*K)-(J-K)))*(St=Pr-(xt=(J=134217729*Pr)-(J-Pr)))-((Sr=K*Pr)-B*xt-gt*xt-B*St))),y[0]=Er-(Ct+X)+(X-pi),X=(ue=ie-((Rt=ie+Ct)-(X=Rt-ie))+(Ct-X))-(Ct=ue-Sr),y[1]=ue-(Ct+X)+(X-Sr),X=(Cr=Rt+Ct)-Rt,y[2]=Rt-(Cr-X)+(Ct-X),y[3]=Cr;const B0=s(4,c,4,y,h);X=(Er=(gt=Ir-(B=(J=134217729*Ir)-(J-Ir)))*(St=ht-(xt=(J=134217729*ht)-(J-ht)))-((ie=Ir*ht)-B*xt-gt*xt-B*St))-(Ct=Er-(pi=(gt=Wn-(B=(J=134217729*Wn)-(J-Wn)))*(St=at-(xt=(J=134217729*at)-(J-at)))-((Sr=Wn*at)-B*xt-gt*xt-B*St))),y[0]=Er-(Ct+X)+(X-pi),X=(ue=ie-((Rt=ie+Ct)-(X=Rt-ie))+(Ct-X))-(Ct=ue-Sr),y[1]=ue-(Ct+X)+(X-Sr),X=(Cr=Rt+Ct)-Rt,y[2]=Rt-(Cr-X)+(Ct-X),y[3]=Cr;const j0=s(B0,h,4,y,d);X=(Er=(gt=G-(B=(J=134217729*G)-(J-G)))*(St=ht-(xt=(J=134217729*ht)-(J-ht)))-((ie=G*ht)-B*xt-gt*xt-B*St))-(Ct=Er-(pi=(gt=K-(B=(J=134217729*K)-(J-K)))*(St=at-(xt=(J=134217729*at)-(J-at)))-((Sr=K*at)-B*xt-gt*xt-B*St))),y[0]=Er-(Ct+X)+(X-pi),X=(ue=ie-((Rt=ie+Ct)-(X=Rt-ie))+(Ct-X))-(Ct=ue-Sr),y[1]=ue-(Ct+X)+(X-Sr),X=(Cr=Rt+Ct)-Rt,y[2]=Rt-(Cr-X)+(Ct-X),y[3]=Cr;const Z0=s(j0,d,4,y,g);return g[Z0-1]}(C,P,T,v,w,m,b)},e.orient2dfast=function(C,P,T,v,w,m){return(P-m)*(T-w)-(C-w)*(v-m)},Object.defineProperty(e,"__esModule",{value:!0})})}(Ma,Ma.exports)),Ma.exports}var Zf;function mv(){if(Zf)return Nu.exports;Zf=1;var n=Hf(),t=cv,e=dv(),r=gv().orient2d;t.default&&(t=t.default),Nu.exports=i,Nu.exports.default=i;function i(m,_,E){_=Math.max(0,_===void 0?2:_),E=E||0;var I=g(m),b=new n(16);b.toBBox=function(B){return{minX:B[0],minY:B[1],maxX:B[0],maxY:B[1]}},b.compareMinX=function(B,gt){return B[0]-gt[0]},b.compareMinY=function(B,gt){return B[1]-gt[1]},b.load(m);for(var O=[],M=0,N;M<I.length;M++){var x=I[M];b.remove(x),N=y(x,N),O.push(N)}var A=new n(16);for(M=0;M<O.length;M++)A.insert(d(O[M]));for(var F=_*_,Y=E*E;O.length;){var G=O.shift(),K=G.p,at=G.next.p,ht=C(K,at);if(!(ht<Y)){var X=ht/F;x=s(b,G.prev.p,K,at,G.next.next.p,X,A),x&&Math.min(C(x,K),C(x,at))<=X&&(O.push(G),O.push(y(x,G)),b.remove(x),A.remove(G),A.insert(d(G)),A.insert(d(G.next)))}}G=N;var J=[];do J.push(G.p),G=G.next;while(G!==N);return J.push(G.p),J}function s(m,_,E,I,b,O,M){for(var N=new t([],o),x=m.data;x;){for(var A=0;A<x.children.length;A++){var F=x.children[A],Y=x.leaf?P(F,E,I):a(E,I,F);Y>O||N.push({node:F,dist:Y})}for(;N.length&&!N.peek().node.children;){var G=N.pop(),K=G.node,at=P(K,_,E),ht=P(K,I,b);if(G.dist<at&&G.dist<ht&&l(E,K,M)&&l(I,K,M))return K}x=N.pop(),x&&(x=x.node)}return null}function o(m,_){return m.dist-_.dist}function a(m,_,E){if(u(m,E)||u(_,E))return 0;var I=T(m[0],m[1],_[0],_[1],E.minX,E.minY,E.maxX,E.minY);if(I===0)return 0;var b=T(m[0],m[1],_[0],_[1],E.minX,E.minY,E.minX,E.maxY);if(b===0)return 0;var O=T(m[0],m[1],_[0],_[1],E.maxX,E.minY,E.maxX,E.maxY);if(O===0)return 0;var M=T(m[0],m[1],_[0],_[1],E.minX,E.maxY,E.maxX,E.maxY);return M===0?0:Math.min(I,b,O,M)}function u(m,_){return m[0]>=_.minX&&m[0]<=_.maxX&&m[1]>=_.minY&&m[1]<=_.maxY}function l(m,_,E){for(var I=Math.min(m[0],_[0]),b=Math.min(m[1],_[1]),O=Math.max(m[0],_[0]),M=Math.max(m[1],_[1]),N=E.search({minX:I,minY:b,maxX:O,maxY:M}),x=0;x<N.length;x++)if(h(N[x].p,N[x].next.p,m,_))return!1;return!0}function c(m,_,E){return r(m[0],m[1],_[0],_[1],E[0],E[1])}function h(m,_,E,I){return m!==I&&_!==E&&c(m,_,E)>0!=c(m,_,I)>0&&c(E,I,m)>0!=c(E,I,_)>0}function d(m){var _=m.p,E=m.next.p;return m.minX=Math.min(_[0],E[0]),m.minY=Math.min(_[1],E[1]),m.maxX=Math.max(_[0],E[0]),m.maxY=Math.max(_[1],E[1]),m}function g(m){for(var _=m[0],E=m[0],I=m[0],b=m[0],O=0;O<m.length;O++){var M=m[O];M[0]<_[0]&&(_=M),M[0]>I[0]&&(I=M),M[1]<E[1]&&(E=M),M[1]>b[1]&&(b=M)}var N=[_,E,I,b],x=N.slice();for(O=0;O<m.length;O++)e(m[O],N)||x.push(m[O]);return w(x)}function y(m,_){var E={p:m,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return _?(E.next=_.next,E.prev=_,_.next.prev=E,_.next=E):(E.prev=E,E.next=E),E}function C(m,_){var E=m[0]-_[0],I=m[1]-_[1];return E*E+I*I}function P(m,_,E){var I=_[0],b=_[1],O=E[0]-I,M=E[1]-b;if(O!==0||M!==0){var N=((m[0]-I)*O+(m[1]-b)*M)/(O*O+M*M);N>1?(I=E[0],b=E[1]):N>0&&(I+=O*N,b+=M*N)}return O=m[0]-I,M=m[1]-b,O*O+M*M}function T(m,_,E,I,b,O,M,N){var x=E-m,A=I-_,F=M-b,Y=N-O,G=m-b,K=_-O,at=x*x+A*A,ht=x*F+A*Y,X=F*F+Y*Y,J=x*G+A*K,B=F*G+Y*K,gt=at*X-ht*ht,xt,St,Ct,Rt,ue=gt,ie=gt;gt===0?(St=0,ue=1,Rt=B,ie=X):(St=ht*B-X*J,Rt=at*B-ht*J,St<0?(St=0,Rt=B,ie=X):St>ue&&(St=ue,Rt=B+ht,ie=X)),Rt<0?(Rt=0,-J<0?St=0:-J>at?St=ue:(St=-J,ue=at)):Rt>ie&&(Rt=ie,-J+ht<0?St=0:-J+ht>at?St=ue:(St=-J+ht,ue=at)),xt=St===0?0:St/ue,Ct=Rt===0?0:Rt/ie;var Er=(1-xt)*m+xt*E,Sr=(1-xt)*_+xt*I,pi=(1-Ct)*b+Ct*M,Cr=(1-Ct)*O+Ct*N,Ir=pi-Er,Pr=Cr-Sr;return Ir*Ir+Pr*Pr}function v(m,_){return m[0]===_[0]?m[1]-_[1]:m[0]-_[0]}function w(m){m.sort(v);for(var _=[],E=0;E<m.length;E++){for(;_.length>=2&&c(_[_.length-2],_[_.length-1],m[E])<=0;)_.pop();_.push(m[E])}for(var I=[],b=m.length-1;b>=0;b--){for(;I.length>=2&&c(I[I.length-2],I[I.length-1],m[b])<=0;)I.pop();I.push(m[b])}return I.pop(),_.pop(),_.concat(I)}return Nu.exports}var vv=mv();const yv=qf(vv);function _v(n,t){t===void 0&&(t={}),t.concavity=t.concavity||1/0;var e=[];if(po(n,function(i){e.push([i[0],i[1]])}),!e.length)return null;var r=yv(e,t.concavity);return r.length>3?tr([r]):null}function Kf(n,t){t===void 0&&(t={});var e=0,r=0,i=0;return po(n,function(s){e+=s[0],r+=s[1],i++},!0),Ut([e/i,r/i],t.properties)}function Qf(n,t){switch(t===void 0&&(t={}),Qm(n)){case"Point":return Ut(er(n),t.properties);case"Polygon":var e=[];po(n,function(m){e.push(m)});var r=Kf(n,{properties:t.properties}),i=r.geometry.coordinates,s=0,o=0,a=0,u,l,c,h,d,g,y,C,P=e.map(function(m){return[m[0]-i[0],m[1]-i[1]]});for(u=0;u<e.length-1;u++)l=P[u],h=l[0],g=l[1],c=P[u+1],d=c[0],y=c[1],C=h*y-d*g,a+=C,s+=(h+d)*C,o+=(g+y)*C;if(a===0)return r;var T=a*.5,v=1/(6*T);return Ut([i[0]+v*s,i[1]+v*o],t.properties);default:var w=_v(n);return w?Qf(w,{properties:t.properties}):Kf(n,{properties:t.properties})}}function wv(n){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]);const t=tr([n]),r=Qf(t).geometry.coordinates;return[r[0],r[1],r[2]??n[0][2]??0]}function $f(n,t,e,r){const[i,s,o]=n,a=fo(Ut([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function Ou(n,t){return mi(Ut(n),Ut(t),{units:"meters"})}function La(n,t){return xa(Ut(n),Ut(t))}function td(n){if(!n)throw new Error("geojson is required");var t=[];return Hl(n,function(e){Ev(e,t)}),ho(t)}function Ev(n,t){var e=[],r=n.geometry;if(r!==null){switch(r.type){case"Polygon":e=Ss(r);break;case"LineString":e=[Ss(r)]}e.forEach(function(i){var s=Sv(i,n.properties);s.forEach(function(o){o.id=t.length,t.push(o)})})}}function Sv(n,t){var e=[];return n.reduce(function(r,i){var s=vn([r,i],t);return s.bbox=Cv(r,i),e.push(s),i}),e}function Cv(n,t){var e=n[0],r=n[1],i=t[0],s=t[1],o=e<i?e:i,a=r<s?r:s,u=e>i?e:i,l=r>s?r:s;return[o,a,u,l]}var xu={exports:{}},Zl={},ed;function rd(){return ed||(ed=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.earthRadius=63710088e-1,n.factors={centimeters:n.earthRadius*100,centimetres:n.earthRadius*100,degrees:n.earthRadius/111325,feet:n.earthRadius*3.28084,inches:n.earthRadius*39.37,kilometers:n.earthRadius/1e3,kilometres:n.earthRadius/1e3,meters:n.earthRadius,metres:n.earthRadius,miles:n.earthRadius/1609.344,millimeters:n.earthRadius*1e3,millimetres:n.earthRadius*1e3,nauticalmiles:n.earthRadius/1852,radians:1,yards:n.earthRadius*1.0936},n.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/n.earthRadius,yards:1.0936133},n.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function t(N,x,A){A===void 0&&(A={});var F={type:"Feature"};return(A.id===0||A.id)&&(F.id=A.id),A.bbox&&(F.bbox=A.bbox),F.properties=x||{},F.geometry=N,F}n.feature=t;function e(N,x,A){switch(N){case"Point":return r(x).geometry;case"LineString":return a(x).geometry;case"Polygon":return s(x).geometry;case"MultiPoint":return h(x).geometry;case"MultiLineString":return c(x).geometry;case"MultiPolygon":return d(x).geometry;default:throw new Error(N+" is invalid")}}n.geometry=e;function r(N,x,A){if(A===void 0&&(A={}),!N)throw new Error("coordinates is required");if(!Array.isArray(N))throw new Error("coordinates must be an Array");if(N.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!I(N[0])||!I(N[1]))throw new Error("coordinates must contain numbers");var F={type:"Point",coordinates:N};return t(F,x,A)}n.point=r;function i(N,x,A){return A===void 0&&(A={}),l(N.map(function(F){return r(F,x)}),A)}n.points=i;function s(N,x,A){A===void 0&&(A={});for(var F=0,Y=N;F<Y.length;F++){var G=Y[F];if(G.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var K=0;K<G[G.length-1].length;K++)if(G[G.length-1][K]!==G[0][K])throw new Error("First and last Position are not equivalent.")}var at={type:"Polygon",coordinates:N};return t(at,x,A)}n.polygon=s;function o(N,x,A){return A===void 0&&(A={}),l(N.map(function(F){return s(F,x)}),A)}n.polygons=o;function a(N,x,A){if(A===void 0&&(A={}),N.length<2)throw new Error("coordinates must be an array of two or more positions");var F={type:"LineString",coordinates:N};return t(F,x,A)}n.lineString=a;function u(N,x,A){return A===void 0&&(A={}),l(N.map(function(F){return a(F,x)}),A)}n.lineStrings=u;function l(N,x){x===void 0&&(x={});var A={type:"FeatureCollection"};return x.id&&(A.id=x.id),x.bbox&&(A.bbox=x.bbox),A.features=N,A}n.featureCollection=l;function c(N,x,A){A===void 0&&(A={});var F={type:"MultiLineString",coordinates:N};return t(F,x,A)}n.multiLineString=c;function h(N,x,A){A===void 0&&(A={});var F={type:"MultiPoint",coordinates:N};return t(F,x,A)}n.multiPoint=h;function d(N,x,A){A===void 0&&(A={});var F={type:"MultiPolygon",coordinates:N};return t(F,x,A)}n.multiPolygon=d;function g(N,x,A){A===void 0&&(A={});var F={type:"GeometryCollection",geometries:N};return t(F,x,A)}n.geometryCollection=g;function y(N,x){if(x===void 0&&(x=0),x&&!(x>=0))throw new Error("precision must be a positive number");var A=Math.pow(10,x||0);return Math.round(N*A)/A}n.round=y;function C(N,x){x===void 0&&(x="kilometers");var A=n.factors[x];if(!A)throw new Error(x+" units is invalid");return N*A}n.radiansToLength=C;function P(N,x){x===void 0&&(x="kilometers");var A=n.factors[x];if(!A)throw new Error(x+" units is invalid");return N/A}n.lengthToRadians=P;function T(N,x){return w(P(N,x))}n.lengthToDegrees=T;function v(N){var x=N%360;return x<0&&(x+=360),x}n.bearingToAzimuth=v;function w(N){var x=N%(2*Math.PI);return x*180/Math.PI}n.radiansToDegrees=w;function m(N){var x=N%360;return x*Math.PI/180}n.degreesToRadians=m;function _(N,x,A){if(x===void 0&&(x="kilometers"),A===void 0&&(A="kilometers"),!(N>=0))throw new Error("length must be a positive number");return C(P(N,x),A)}n.convertLength=_;function E(N,x,A){if(x===void 0&&(x="meters"),A===void 0&&(A="kilometers"),!(N>=0))throw new Error("area must be a positive number");var F=n.areaFactors[x];if(!F)throw new Error("invalid original units");var Y=n.areaFactors[A];if(!Y)throw new Error("invalid final units");return N/F*Y}n.convertArea=E;function I(N){return!isNaN(N)&&N!==null&&!Array.isArray(N)}n.isNumber=I;function b(N){return!!N&&N.constructor===Object}n.isObject=b;function O(N){if(!N)throw new Error("bbox is required");if(!Array.isArray(N))throw new Error("bbox must be an Array");if(N.length!==4&&N.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");N.forEach(function(x){if(!I(x))throw new Error("bbox must only contain numbers")})}n.validateBBox=O;function M(N){if(!N)throw new Error("id is required");if(["string","number"].indexOf(typeof N)===-1)throw new Error("id must be a number or a string")}n.validateId=M}(Zl)),Zl}var le={},nd;function id(){if(nd)return le;nd=1,Object.defineProperty(le,"__esModule",{value:!0});var n=rd();function t(v,w,m){if(v!==null)for(var _,E,I,b,O,M,N,x=0,A=0,F,Y=v.type,G=Y==="FeatureCollection",K=Y==="Feature",at=G?v.features.length:1,ht=0;ht<at;ht++){N=G?v.features[ht].geometry:K?v.geometry:v,F=N?N.type==="GeometryCollection":!1,O=F?N.geometries.length:1;for(var X=0;X<O;X++){var J=0,B=0;if(b=F?N.geometries[X]:N,b!==null){M=b.coordinates;var gt=b.type;switch(x=m&&(gt==="Polygon"||gt==="MultiPolygon")?1:0,gt){case null:break;case"Point":if(w(M,A,ht,J,B)===!1)return!1;A++,J++;break;case"LineString":case"MultiPoint":for(_=0;_<M.length;_++){if(w(M[_],A,ht,J,B)===!1)return!1;A++,gt==="MultiPoint"&&J++}gt==="LineString"&&J++;break;case"Polygon":case"MultiLineString":for(_=0;_<M.length;_++){for(E=0;E<M[_].length-x;E++){if(w(M[_][E],A,ht,J,B)===!1)return!1;A++}gt==="MultiLineString"&&J++,gt==="Polygon"&&B++}gt==="Polygon"&&J++;break;case"MultiPolygon":for(_=0;_<M.length;_++){for(B=0,E=0;E<M[_].length;E++){for(I=0;I<M[_][E].length-x;I++){if(w(M[_][E][I],A,ht,J,B)===!1)return!1;A++}B++}J++}break;case"GeometryCollection":for(_=0;_<b.geometries.length;_++)if(t(b.geometries[_],w,m)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function e(v,w,m,_){var E=m;return t(v,function(I,b,O,M,N){b===0&&m===void 0?E=I:E=w(E,I,b,O,M,N)},_),E}function r(v,w){var m;switch(v.type){case"FeatureCollection":for(m=0;m<v.features.length&&w(v.features[m].properties,m)!==!1;m++);break;case"Feature":w(v.properties,0);break}}function i(v,w,m){var _=m;return r(v,function(E,I){I===0&&m===void 0?_=E:_=w(_,E,I)}),_}function s(v,w){if(v.type==="Feature")w(v,0);else if(v.type==="FeatureCollection")for(var m=0;m<v.features.length&&w(v.features[m],m)!==!1;m++);}function o(v,w,m){var _=m;return s(v,function(E,I){I===0&&m===void 0?_=E:_=w(_,E,I)}),_}function a(v){var w=[];return t(v,function(m){w.push(m)}),w}function u(v,w){var m,_,E,I,b,O,M,N,x,A,F=0,Y=v.type==="FeatureCollection",G=v.type==="Feature",K=Y?v.features.length:1;for(m=0;m<K;m++){for(O=Y?v.features[m].geometry:G?v.geometry:v,N=Y?v.features[m].properties:G?v.properties:{},x=Y?v.features[m].bbox:G?v.bbox:void 0,A=Y?v.features[m].id:G?v.id:void 0,M=O?O.type==="GeometryCollection":!1,b=M?O.geometries.length:1,E=0;E<b;E++){if(I=M?O.geometries[E]:O,I===null){if(w(null,F,N,x,A)===!1)return!1;continue}switch(I.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(w(I,F,N,x,A)===!1)return!1;break}case"GeometryCollection":{for(_=0;_<I.geometries.length;_++)if(w(I.geometries[_],F,N,x,A)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}F++}}function l(v,w,m){var _=m;return u(v,function(E,I,b,O,M){I===0&&m===void 0?_=E:_=w(_,E,I,b,O,M)}),_}function c(v,w){u(v,function(m,_,E,I,b){var O=m===null?null:m.type;switch(O){case null:case"Point":case"LineString":case"Polygon":return w(n.feature(m,E,{bbox:I,id:b}),_,0)===!1?!1:void 0}var M;switch(O){case"MultiPoint":M="Point";break;case"MultiLineString":M="LineString";break;case"MultiPolygon":M="Polygon";break}for(var N=0;N<m.coordinates.length;N++){var x=m.coordinates[N],A={type:M,coordinates:x};if(w(n.feature(A,E),_,N)===!1)return!1}})}function h(v,w,m){var _=m;return c(v,function(E,I,b){I===0&&b===0&&m===void 0?_=E:_=w(_,E,I,b)}),_}function d(v,w){c(v,function(m,_,E){var I=0;if(m.geometry){var b=m.geometry.type;if(!(b==="Point"||b==="MultiPoint")){var O,M=0,N=0,x=0;if(t(m,function(A,F,Y,G,K){if(O===void 0||_>M||G>N||K>x){O=A,M=_,N=G,x=K,I=0;return}var at=n.lineString([O,A],m.properties);if(w(at,_,E,K,I)===!1)return!1;I++,O=A})===!1)return!1}}})}function g(v,w,m){var _=m,E=!1;return d(v,function(I,b,O,M,N){E===!1&&m===void 0?_=I:_=w(_,I,b,O,M,N),E=!0}),_}function y(v,w){if(!v)throw new Error("geojson is required");c(v,function(m,_,E){if(m.geometry!==null){var I=m.geometry.type,b=m.geometry.coordinates;switch(I){case"LineString":if(w(m,_,E,0,0)===!1)return!1;break;case"Polygon":for(var O=0;O<b.length;O++)if(w(n.lineString(b[O],m.properties),_,E,O)===!1)return!1;break}}})}function C(v,w,m){var _=m;return y(v,function(E,I,b,O){I===0&&m===void 0?_=E:_=w(_,E,I,b,O)}),_}function P(v,w){if(w=w||{},!n.isObject(w))throw new Error("options is invalid");var m=w.featureIndex||0,_=w.multiFeatureIndex||0,E=w.geometryIndex||0,I=w.segmentIndex||0,b=w.properties,O;switch(v.type){case"FeatureCollection":m<0&&(m=v.features.length+m),b=b||v.features[m].properties,O=v.features[m].geometry;break;case"Feature":b=b||v.properties,O=v.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":O=v;break;default:throw new Error("geojson is invalid")}if(O===null)return null;var M=O.coordinates;switch(O.type){case"Point":case"MultiPoint":return null;case"LineString":return I<0&&(I=M.length+I-1),n.lineString([M[I],M[I+1]],b,w);case"Polygon":return E<0&&(E=M.length+E),I<0&&(I=M[E].length+I-1),n.lineString([M[E][I],M[E][I+1]],b,w);case"MultiLineString":return _<0&&(_=M.length+_),I<0&&(I=M[_].length+I-1),n.lineString([M[_][I],M[_][I+1]],b,w);case"MultiPolygon":return _<0&&(_=M.length+_),E<0&&(E=M[_].length+E),I<0&&(I=M[_][E].length-I-1),n.lineString([M[_][E][I],M[_][E][I+1]],b,w)}throw new Error("geojson is invalid")}function T(v,w){if(w=w||{},!n.isObject(w))throw new Error("options is invalid");var m=w.featureIndex||0,_=w.multiFeatureIndex||0,E=w.geometryIndex||0,I=w.coordIndex||0,b=w.properties,O;switch(v.type){case"FeatureCollection":m<0&&(m=v.features.length+m),b=b||v.features[m].properties,O=v.features[m].geometry;break;case"Feature":b=b||v.properties,O=v.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":O=v;break;default:throw new Error("geojson is invalid")}if(O===null)return null;var M=O.coordinates;switch(O.type){case"Point":return n.point(M,b,w);case"MultiPoint":return _<0&&(_=M.length+_),n.point(M[_],b,w);case"LineString":return I<0&&(I=M.length+I),n.point(M[I],b,w);case"Polygon":return E<0&&(E=M.length+E),I<0&&(I=M[E].length+I),n.point(M[E][I],b,w);case"MultiLineString":return _<0&&(_=M.length+_),I<0&&(I=M[_].length+I),n.point(M[_][I],b,w);case"MultiPolygon":return _<0&&(_=M.length+_),E<0&&(E=M[_].length+E),I<0&&(I=M[_][E].length-I),n.point(M[_][E][I],b,w)}throw new Error("geojson is invalid")}return le.coordAll=a,le.coordEach=t,le.coordReduce=e,le.featureEach=s,le.featureReduce=o,le.findPoint=T,le.findSegment=P,le.flattenEach=c,le.flattenReduce=h,le.geomEach=u,le.geomReduce=l,le.lineEach=y,le.lineReduce=C,le.propEach=r,le.propReduce=i,le.segmentEach=d,le.segmentReduce=g,le}var Du={},sd;function Iv(){if(sd)return Du;sd=1,Object.defineProperty(Du,"__esModule",{value:!0});var n=id();function t(e){var r=[1/0,1/0,-1/0,-1/0];return n.coordEach(e,function(i){r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]<i[0]&&(r[2]=i[0]),r[3]<i[1]&&(r[3]=i[1])}),r}return t.default=t,Du.default=t,Du}var od;function Pv(){if(od)return xu.exports;od=1;var n=Hf(),t=rd(),e=id(),r=Iv().default,i=e.featureEach;e.coordEach,t.polygon;var s=t.featureCollection;function o(a){var u=new n(a);return u.insert=function(l){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.insert.call(this,l)},u.load=function(l){var c=[];return Array.isArray(l)?l.forEach(function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:r(h),c.push(h)}):i(l,function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:r(h),c.push(h)}),n.prototype.load.call(this,c)},u.remove=function(l,c){if(l.type!=="Feature")throw new Error("invalid feature");return l.bbox=l.bbox?l.bbox:r(l),n.prototype.remove.call(this,l,c)},u.clear=function(){return n.prototype.clear.call(this)},u.search=function(l){var c=n.prototype.search.call(this,this.toBBox(l));return s(c)},u.collides=function(l){return n.prototype.collides.call(this,this.toBBox(l))},u.all=function(){var l=n.prototype.all.call(this);return s(l)},u.toJSON=function(){return n.prototype.toJSON.call(this)},u.fromJSON=function(l){return n.prototype.fromJSON.call(this,l)},u.toBBox=function(l){var c;if(l.bbox)c=l.bbox;else if(Array.isArray(l)&&l.length===4)c=l;else if(Array.isArray(l)&&l.length===6)c=[l[0],l[1],l[3],l[4]];else if(l.type==="Feature")c=r(l);else if(l.type==="FeatureCollection")c=r(l);else throw new Error("invalid geojson");return{minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]}},u}return xu.exports=o,xu.exports.default=o,xu.exports}var bv=Pv();const Nv=qf(bv);function ad(n,t){var e={},r=[];if(n.type==="LineString"&&(n=mn(n)),t.type==="LineString"&&(t=mn(t)),n.type==="Feature"&&t.type==="Feature"&&n.geometry!==null&&t.geometry!==null&&n.geometry.type==="LineString"&&t.geometry.type==="LineString"&&n.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=ud(n,t);return i&&r.push(i),ho(r)}var s=Nv();return s.load(td(t)),Pu(td(n),function(o){Pu(s.search(o),function(a){var u=ud(o,a);if(u){var l=Ss(u).join(",");e[l]||(e[l]=!0,r.push(u))}})}),ho(r)}function ud(n,t){var e=Ss(n),r=Ss(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(r.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=e[0][0],s=e[0][1],o=e[1][0],a=e[1][1],u=r[0][0],l=r[0][1],c=r[1][0],h=r[1][1],d=(h-l)*(o-i)-(c-u)*(a-s),g=(c-u)*(s-l)-(h-l)*(i-u),y=(o-i)*(s-l)-(a-s)*(i-u);if(d===0)return null;var C=g/d,P=y/d;if(C>=0&&C<=1&&P>=0&&P<=1){var T=i+C*(o-i),v=s+C*(a-s);return Ut([T,v])}return null}function Tv(n,t){return ad(vn(n),vn(t))}function Ov(n,t){var e=mi(n,t),r=xa(n,t),i=fo(n,e/2,r);return i}function xv(n,t){const e=Ut(n),r=Ut(t),i=Ov(e,r),s=(n[2]+t[2])/2;return[...i.geometry.coordinates,s]}function Dv(n,t,e){e===void 0&&(e={});var r=Ut([1/0,1/0],{dist:1/0}),i=0;return Hl(n,function(s){for(var o=Ss(s),a=0;a<o.length-1;a++){var u=Ut(o[a]);u.properties.dist=mi(t,u,e);var l=Ut(o[a+1]);l.properties.dist=mi(t,l,e);var c=mi(u,l,e),h=Math.max(u.properties.dist,l.properties.dist),d=xa(u,l),g=fo(t,h,d+90,e),y=fo(t,h,d-90,e),C=ad(vn([g.geometry.coordinates,y.geometry.coordinates]),vn([u.geometry.coordinates,l.geometry.coordinates])),P=null;C.features.length>0&&(P=C.features[0],P.properties.dist=mi(t,P,e),P.properties.location=i+mi(u,P,e)),u.properties.dist<r.properties.dist&&(r=u,r.properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&(r=l,r.properties.index=a+1,r.properties.location=i+c),P&&P.properties.dist<r.properties.dist&&(r=P,r.properties.index=a),i+=c}}),r}function Mv(n,t){const e=Ut(t),r=vn(n);return Dv(r,e,{units:"meters"})}function ld(n,t,e){e===void 0&&(e={});var r=er(n),i=er(t);i[0]+=i[0]-r[0]>180?-360:r[0]-i[0]>180?360:0;var s=Lv(r,i),o=Xl(s,"meters",e.units);return o}function Lv(n,t,e){e=e===void 0?Le:Number(e);var r=e,i=n[1]*Math.PI/180,s=t[1]*Math.PI/180,o=s-i,a=Math.abs(t[0]-n[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var u=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),l=Math.abs(u)>1e-11?o/u:Math.cos(i),c=Math.sqrt(o*o+l*l*a*a),h=c*r;return h}function Av(n,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!n)throw new Error("pt is required");if(Array.isArray(n)?n=Ut(n):n.type==="Point"?n=mn(n):zf(n,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=vn(t):t.type==="LineString"?t=mn(t):zf(t,"LineString","line");var r=1/0,i=n.geometry.coordinates;return nv(t,function(s){var o=s.geometry.coordinates[0],a=s.geometry.coordinates[1],u=Rv(i,o,a,e);u<r&&(r=u)}),Xl(r,"degrees",e.units)}function Rv(n,t,e,r){var i=[e[0]-t[0],e[1]-t[1]],s=[n[0]-t[0],n[1]-t[1]],o=cd(s,i);if(o<=0)return Kl(n,t,{method:r.method,units:"degrees"});var a=cd(i,i);if(a<=o)return Kl(n,e,{method:r.method,units:"degrees"});var u=o/a,l=[t[0]+u*i[0],t[1]+u*i[1]];return Kl(n,l,{method:r.method,units:"degrees"})}function cd(n,t){return n[0]*t[0]+n[1]*t[1]}function Kl(n,t,e){return e.method==="planar"?ld(n,t,e):mi(n,t,e)}function Fv(n,t){const e=Ut(n),r=vn(t);return Av(e,r,{units:"meters"})}function kv(n,t,e,r){r===void 0&&(r={});var i=t<0,s=Xl(Math.abs(t),r.units,"meters");i&&(s=-Math.abs(s));var o=er(n),a=Vv(o,s,e);return a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0,Ut(a,r.properties)}function Vv(n,t,e,r){r=r===void 0?Le:Number(r);var i=t/r,s=n[0]*Math.PI/180,o=We(n[1]),a=We(e),u=i*Math.cos(a),l=o+u;Math.abs(l)>Math.PI/2&&(l=l>0?Math.PI-l:-Math.PI-l);var c=Math.log(Math.tan(l/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),h=Math.abs(c)>1e-11?u/c:Math.cos(o),d=i*Math.sin(a)/h,g=s+d;return[(g*180/Math.PI+540)%360-180,l*180/Math.PI]}function zv(n,t,e,r){const[i,s,o]=n,a=kv(Ut([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function hd(n,t){return ld(Ut(n),Ut(t),{units:"meters"})}function Uv(n,t,e){e===void 0&&(e={});var r;e.final?r=fd(er(t),er(n)):r=fd(er(n),er(t));var i=r>180?-(360-r):r;return i}function fd(n,t){var e=We(n[1]),r=We(t[1]),i=We(t[0]-n[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(e/2+Math.PI/4)),o=Math.atan2(i,s);return(Iu(o)+360)%360}function Gv(n,t){return Uv(Ut(n),Ut(t))}function yn(n){var t=[1/0,1/0,-1/0,-1/0];return po(n,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}yn.default=yn;function _n(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r=er(n),i=br(t),s=i.type,o=t.bbox,a=i.coordinates;if(o&&Wv(r,o)===!1)return!1;s==="Polygon"&&(a=[a]);for(var u=!1,l=0;l<a.length&&!u;l++)if(dd(r,a[l][0],e.ignoreBoundary)){for(var c=!1,h=1;h<a[l].length&&!c;)dd(r,a[l][h],!e.ignoreBoundary)&&(c=!0),h++;c||(u=!0)}return u}function dd(n,t,e){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var o=t[i][0],a=t[i][1],u=t[s][0],l=t[s][1],c=n[1]*(o-u)+a*(u-n[0])+l*(n[0]-o)===0&&(o-n[0])*(u-n[0])<=0&&(a-n[1])*(l-n[1])<=0;if(c)return!e;var h=a>n[1]!=l>n[1]&&n[0]<(u-o)*(n[1]-a)/(l-a)+o;h&&(r=!r)}return r}function Wv(n,t){return t[0]<=n[0]&&t[1]<=n[1]&&t[2]>=n[0]&&t[3]>=n[1]}function vi(n,t,e){e===void 0&&(e={});for(var r=er(n),i=Ss(t),s=0;s<i.length-1;s++){var o=!1;if(e.ignoreEndVertices&&(s===0&&(o="start"),s===i.length-2&&(o="end"),s===0&&s+1===i.length-1&&(o="both")),qv(i[s],i[s+1],r,o,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function qv(n,t,e,r,i){var s=e[0],o=e[1],a=n[0],u=n[1],l=t[0],c=t[1],h=e[0]-a,d=e[1]-u,g=l-a,y=c-u,C=h*y-d*g;if(i!==null){if(Math.abs(C)>i)return!1}else if(C!==0)return!1;if(r){if(r==="start")return Math.abs(g)>=Math.abs(y)?g>0?a<s&&s<=l:l<=s&&s<a:y>0?u<o&&o<=c:c<=o&&o<u;if(r==="end")return Math.abs(g)>=Math.abs(y)?g>0?a<=s&&s<l:l<s&&s<=a:y>0?u<=o&&o<c:c<o&&o<=u;if(r==="both")return Math.abs(g)>=Math.abs(y)?g>0?a<s&&s<l:l<s&&s<a:y>0?u<o&&o<c:c<o&&o<u}else return Math.abs(g)>=Math.abs(y)?g>0?a<=s&&s<=l:l<=s&&s<=a:y>0?u<=o&&o<=c:c<=o&&o<=u;return!1}function Xv(n,t){var e=br(n),r=br(t),i=e.type,s=r.type,o=e.coordinates,a=r.coordinates;switch(i){case"Point":switch(s){case"Point":return Ql(o,a);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return Hv(e,r);case"MultiPoint":return Yv(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return vi(r,e,{ignoreEndVertices:!0});case"LineString":return jv(e,r);case"MultiPoint":return Jv(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return _n(r,e,{ignoreBoundary:!0});case"LineString":return Zv(e,r);case"Polygon":return Kv(e,r);case"MultiPoint":return Bv(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Hv(n,t){var e,r=!1;for(e=0;e<n.coordinates.length;e++)if(Ql(n.coordinates[e],t.coordinates)){r=!0;break}return r}function Yv(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){for(var i=r[e],s=!1,o=0,a=n.coordinates;o<a.length;o++){var u=a[o];if(Ql(i,u)){s=!0;break}}if(!s)return!1}return!0}function Jv(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(vi(s,n,{ignoreEndVertices:!0})&&(e=!0),!vi(s,n))return!1}return!!e}function Bv(n,t){for(var e=0,r=t.coordinates;e<r.length;e++){var i=r[e];if(!_n(i,n,{ignoreBoundary:!0}))return!1}return!0}function jv(n,t){for(var e=!1,r=0,i=t.coordinates;r<i.length;r++){var s=i[r];if(vi({type:"Point",coordinates:s},n,{ignoreEndVertices:!0})&&(e=!0),!vi({type:"Point",coordinates:s},n,{ignoreEndVertices:!1}))return!1}return e}function Zv(n,t){var e=!1,r=0,i=yn(n),s=yn(t);if(!pd(i,s))return!1;for(r;r<t.coordinates.length-1;r++){var o=Qv(t.coordinates[r],t.coordinates[r+1]);if(_n({type:"Point",coordinates:o},n,{ignoreBoundary:!0})){e=!0;break}}return e}function Kv(n,t){if(n.type==="Feature"&&n.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var e=yn(n),r=yn(t);if(!pd(e,r))return!1;for(var i=br(t).coordinates,s=0,o=i;s<o.length;s++)for(var a=o[s],u=0,l=a;u<l.length;u++){var c=l[u];if(!_n(c,n))return!1}return!0}function pd(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function Ql(n,t){return n[0]===t[0]&&n[1]===t[1]}function Qv(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function $v(n,t){var e=br(n),r=br(t),i=e.type,s=r.type;switch(i){case"Point":switch(s){case"MultiPoint":return ty(e,r);case"LineString":return vi(e,r,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return _n(e,r,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return ey(e,r);case"LineString":return ry(e,r);case"Polygon":case"MultiPolygon":return ny(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return iy(e,r);case"Polygon":case"MultiPolygon":return sy(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return oy(e,r);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function ty(n,t){var e,r=!1;for(e=0;e<t.coordinates.length;e++)if(md(t.coordinates[e],n.coordinates)){r=!0;break}return r}function ey(n,t){for(var e=0;e<n.coordinates.length;e++){for(var r=!1,i=0;i<t.coordinates.length;i++)md(n.coordinates[e],t.coordinates[i])&&(r=!0);if(!r)return!1}return!0}function ry(n,t){for(var e=!1,r=0;r<n.coordinates.length;r++){if(!vi(n.coordinates[r],t))return!1;e||(e=vi(n.coordinates[r],t,{ignoreEndVertices:!0}))}return e}function ny(n,t){for(var e=!0,r=!1,i=0;i<n.coordinates.length;i++){if(r=_n(n.coordinates[1],t),!r){e=!1;break}r=_n(n.coordinates[1],t,{ignoreBoundary:!0})}return e&&r}function iy(n,t){for(var e=0;e<n.coordinates.length;e++)if(!vi(n.coordinates[e],t))return!1;return!0}function sy(n,t){var e=yn(t),r=yn(n);if(!gd(e,r))return!1;for(var i=!1,s=0;s<n.coordinates.length-1;s++){if(!_n(n.coordinates[s],t))return!1;if(i||(i=_n(n.coordinates[s],t,{ignoreBoundary:!0})),!i){var o=ay(n.coordinates[s],n.coordinates[s+1]);i=_n(o,t,{ignoreBoundary:!0})}}return i}function oy(n,t){var e=yn(n),r=yn(t);if(!gd(r,e))return!1;for(var i=0;i<n.coordinates[0].length;i++)if(!_n(n.coordinates[0][i],t))return!1;return!0}function gd(n,t){return!(n[0]>t[0]||n[2]<t[2]||n[1]>t[1]||n[3]<t[3])}function md(n,t){return n[0]===t[0]&&n[1]===t[1]}function ay(n,t){return[(n[0]+t[0])/2,(n[1]+t[1])/2]}function uy(n,t){t===void 0&&(t={});var e=yn(n),r=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return Ut([r,i],t.properties,t)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),r=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(r+i,0):Math.min(i,r);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:r;for(s=s<0?Math.max(r+arguments[2],0):Math.min(s,r);i<s;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},Number.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(n){return n!==n},Math.trunc=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};var Cs=function(){};Cs.prototype.interfaces_=function(){return[]},Cs.prototype.getClass=function(){return Cs},Cs.prototype.equalsWithTolerance=function(t,e,r){return Math.abs(t-e)<=r};var zt=function(n){function t(e){n.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new n().stack}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Error),ot=function(){},vd={MAX_VALUE:{configurable:!0}};ot.isNaN=function(t){return Number.isNaN(t)},ot.doubleToLongBits=function(t){return t},ot.longBitsToDouble=function(t){return t},ot.isInfinite=function(t){return!Number.isFinite(t)},vd.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(ot,vd);var hr=function(){},Mu=function(){},go=function(){};function fr(){}var D=function n(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=n.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=n.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},Is={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};D.prototype.setOrdinate=function(t,e){switch(t){case D.X:this.x=e;break;case D.Y:this.y=e;break;case D.Z:this.z=e;break;default:throw new zt("Invalid ordinate index: "+t)}},D.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return!(!Cs.equalsWithTolerance(this.x,e.x,r)||!Cs.equalsWithTolerance(this.y,e.y,r))}},D.prototype.getOrdinate=function(t){switch(t){case D.X:return this.x;case D.Y:return this.y;case D.Z:return this.z}throw new zt("Invalid ordinate index: "+t)},D.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||ot.isNaN(this.z))&&ot.isNaN(t.z)},D.prototype.equals=function(t){return t instanceof D?this.equals2D(t):!1},D.prototype.equalInZ=function(t,e){return Cs.equalsWithTolerance(this.z,t.z,e)},D.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},D.prototype.clone=function(){},D.prototype.copy=function(){return new D(this)},D.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},D.prototype.distance3D=function(t){var e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+r*r+i*i)},D.prototype.distance=function(t){var e=this.x-t.x,r=this.y-t.y;return Math.sqrt(e*e+r*r)},D.prototype.hashCode=function(){var t=17;return t=37*t+D.hashCode(this.x),t=37*t+D.hashCode(this.y),t},D.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},D.prototype.interfaces_=function(){return[hr,Mu,fr]},D.prototype.getClass=function(){return D},D.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=ot.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},Is.DimensionalComparator.get=function(){return yi},Is.serialVersionUID.get=function(){return 6683108902428367e3},Is.NULL_ORDINATE.get=function(){return ot.NaN},Is.X.get=function(){return 0},Is.Y.get=function(){return 1},Is.Z.get=function(){return 2},Object.defineProperties(D,Is);var yi=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new zt("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};yi.prototype.compare=function(t,e){var r=t,i=e,s=yi.compare(r.x,i.x);if(s!==0)return s;var o=yi.compare(r.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=yi.compare(r.z,i.z);return a},yi.prototype.interfaces_=function(){return[go]},yi.prototype.getClass=function(){return yi},yi.compare=function(t,e){return t<e?-1:t>e?1:ot.isNaN(t)?ot.isNaN(e)?0:-1:ot.isNaN(e)?1:0};var mo=function(){};mo.prototype.create=function(){},mo.prototype.interfaces_=function(){return[]},mo.prototype.getClass=function(){return mo};var R=function(){},Aa={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};R.prototype.interfaces_=function(){return[]},R.prototype.getClass=function(){return R},R.toLocationSymbol=function(t){switch(t){case R.EXTERIOR:return"e";case R.BOUNDARY:return"b";case R.INTERIOR:return"i";case R.NONE:return"-"}throw new zt("Unknown location value: "+t)},Aa.INTERIOR.get=function(){return 0},Aa.BOUNDARY.get=function(){return 1},Aa.EXTERIOR.get=function(){return 2},Aa.NONE.get=function(){return-1},Object.defineProperties(R,Aa);var nt=function(n,t){return n.interfaces_&&n.interfaces_().indexOf(t)>-1},rr=function(){},yd={LOG_10:{configurable:!0}};rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.log10=function(t){var e=Math.log(t);return ot.isInfinite(e)||ot.isNaN(e)?e:e/rr.LOG_10},rr.min=function(t,e,r,i){var s=t;return e<s&&(s=e),r<s&&(s=r),i<s&&(s=i),s},rr.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],r=arguments[2];return t<e?e:t>r?r:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],s=arguments[1],o=arguments[2];return i<s?s:i>o?o:i}},rr.wrap=function(t,e){return t<0?e- -t%e:t%e},rr.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],r=arguments[2],i=t;return e>i&&(i=e),r>i&&(i=r),i}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=s;return o>l&&(l=o),a>l&&(l=a),u>l&&(l=u),l}},rr.average=function(t,e){return(t+e)/2},yd.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(rr,yd);var Ur=function(t){this.str=t};Ur.prototype.append=function(t){this.str+=t},Ur.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},Ur.prototype.toString=function(t){return this.str};var Gr=function(t){this.value=t};Gr.prototype.intValue=function(){return this.value},Gr.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},Gr.isNaN=function(t){return Number.isNaN(t)};var Ra=function(){};Ra.isWhitespace=function(t){return t<=32&&t>=0||t===127},Ra.toUpperCase=function(t){return t.toUpperCase()};var k=function n(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof n){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var r=arguments[0];n.call(this,n.parse(r))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},Nr={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};k.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},k.prototype.extractSignificantDigits=function(t,e){var r=this.abs(),i=k.magnitude(r._hi),s=k.TEN.pow(i);r=r.divide(s),r.gt(k.TEN)?(r=r.divide(k.TEN),i+=1):r.lt(k.ONE)&&(r=r.multiply(k.TEN),i-=1);for(var o=i+1,a=new Ur,u=k.MAX_PRINT_DIGITS-1,l=0;l<=u;l++){t&&l===o&&a.append(".");var c=Math.trunc(r._hi);if(c<0)break;var h=!1,d=0;c>9?(h=!0,d="9"):d="0"+c,a.append(d),r=r.subtract(k.valueOf(c)).multiply(k.TEN),h&&r.selfAdd(k.TEN);var g=!0,y=k.magnitude(r._hi);if(y<0&&Math.abs(y)>=u-l&&(g=!1),!g)break}return e[0]=i,a.toString()},k.prototype.sqr=function(){return this.multiply(this)},k.prototype.doubleValue=function(){return this._hi+this._lo},k.prototype.subtract=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},k.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},k.prototype.isZero=function(){return this._hi===0&&this._lo===0},k.prototype.selfSubtract=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},k.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},k.prototype.min=function(t){return this.le(t)?this:t},k.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof k){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null,h=null,d=null;return l=this._hi/r,c=k.SPLIT*l,s=c-l,d=k.SPLIT*r,s=c-s,o=l-s,a=d-r,h=l*r,a=d-a,u=r-a,d=s*a-h+s*u+o*a+o*u,c=(this._hi-h-d+this._lo-l*i)/r,d=l+c,this._hi=d,this._lo=l-d+c,this}},k.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},k.prototype.divide=function(){if(arguments[0]instanceof k){var t=arguments[0],e=null,r=null,i=null,s=null,o=null,a=null,u=null,l=null;o=this._hi/t._hi,a=k.SPLIT*o,e=a-o,l=k.SPLIT*t._hi,e=a-e,r=o-e,i=l-t._hi,u=o*t._hi,i=l-i,s=t._hi-i,l=e*i-u+e*s+r*i+r*s,a=(this._hi-u-l+this._lo-o*t._lo)/t._hi,l=o+a;var c=l,h=o-l+a;return new k(c,h)}else if(typeof arguments[0]=="number"){var d=arguments[0];return ot.isNaN(d)?k.createNaN():k.copy(this).selfDivide(d,0)}},k.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},k.prototype.pow=function(t){if(t===0)return k.valueOf(1);var e=new k(this),r=k.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2===1&&r.selfMultiply(e),i/=2,i>0&&(e=e.sqr());else r=e;return t<0?r.reciprocal():r},k.prototype.ceil=function(){if(this.isNaN())return k.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new k(t,e)},k.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},k.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},k.prototype.setValue=function(){if(arguments[0]instanceof k){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},k.prototype.max=function(t){return this.ge(t)?this:t},k.prototype.sqrt=function(){if(this.isZero())return k.valueOf(0);if(this.isNegative())return k.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,r=k.valueOf(e),i=this.subtract(r.sqr()),s=i._hi*(t*.5);return r.add(s)},k.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof k){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],r=null,i=null,s=null,o=null,a=null,u=null;return s=this._hi+e,a=s-this._hi,o=s-a,o=e-a+(this._hi-o),u=o+this._lo,r=s+u,i=u+(s-r),this._hi=r+i,this._lo=i+(r-this._hi),this}}else if(arguments.length===2){var l=arguments[0],c=arguments[1],h=null,d=null,g=null,y=null,C=null,P=null,T=null,v=null;C=this._hi+l,g=this._lo+c,T=C-this._hi,v=g-this._lo,P=C-T,y=g-v,P=l-T+(this._hi-P),y=c-v+(this._lo-y),T=P+g,h=C+T,d=T+(C-h),T=y+d;var w=h+T,m=T+(h-w);return this._hi=w,this._lo=m,this}},k.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof k){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null;l=k.SPLIT*this._hi,s=l-this._hi,c=k.SPLIT*r,s=l-s,o=this._hi-s,a=c-r,l=this._hi*r,a=c-a,u=r-a,c=s*a-l+s*u+o*a+o*u+(this._hi*i+this._lo*r);var h=l+c;s=l-h;var d=c+s;return this._hi=h,this._lo=d,this}},k.prototype.selfSqr=function(){return this.selfMultiply(this)},k.prototype.floor=function(){if(this.isNaN())return k.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new k(t,e)},k.prototype.negate=function(){return this.isNaN()?this:new k(-this._hi,-this._lo)},k.prototype.clone=function(){},k.prototype.multiply=function(){if(arguments[0]instanceof k){var t=arguments[0];return t.isNaN()?k.createNaN():k.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return ot.isNaN(e)?k.createNaN():k.copy(this).selfMultiply(e,0)}},k.prototype.isNaN=function(){return ot.isNaN(this._hi)},k.prototype.intValue=function(){return Math.trunc(this._hi)},k.prototype.toString=function(){var t=k.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},k.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!0,e),i=e[0]+1,s=r;if(r.charAt(0)===".")s="0"+r;else if(i<0)s="0."+k.stringOfChar("0",-i)+r;else if(r.indexOf(".")===-1){var o=i-r.length,a=k.stringOfChar("0",o);s=r+a+".0"}return this.isNegative()?"-"+s:s},k.prototype.reciprocal=function(){var t=null,e=null,r=null,i=null,s=null,o=null,a=null,u=null;s=1/this._hi,o=k.SPLIT*s,t=o-s,u=k.SPLIT*this._hi,t=o-t,e=s-t,r=u-this._hi,a=s*this._hi,r=u-r,i=this._hi-r,u=t*r-a+t*i+e*r+e*i,o=(1-a-u-s*this._lo)/this._hi;var l=s+o,c=s-l+o;return new k(l,c)},k.prototype.toSciNotation=function(){if(this.isZero())return k.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!1,e),i=k.SCI_NOT_EXPONENT_CHAR+e[0];if(r.charAt(0)==="0")throw new Error("Found leading zero: "+r);var s="";r.length>1&&(s=r.substring(1));var o=r.charAt(0)+"."+s;return this.isNegative()?"-"+o+i:o+i},k.prototype.abs=function(){return this.isNaN()?k.NaN:this.isNegative()?this.negate():new k(this)},k.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},k.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},k.prototype.add=function(){if(arguments[0]instanceof k){var t=arguments[0];return k.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return k.copy(this).selfAdd(e)}},k.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof k){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._hi=r,this._lo=i}},k.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},k.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},k.prototype.trunc=function(){return this.isNaN()?k.NaN:this.isPositive()?this.floor():this.ceil()},k.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},k.prototype.interfaces_=function(){return[fr,hr,Mu]},k.prototype.getClass=function(){return k},k.sqr=function(t){return k.valueOf(t).selfMultiply(t)},k.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return k.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new k(e)}},k.sqrt=function(t){return k.valueOf(t).sqrt()},k.parse=function(t){for(var e=0,r=t.length;Ra.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<r){var s=t.charAt(e);(s==="-"||s==="+")&&(e++,s==="-"&&(i=!0))}for(var o=new k,a=0,u=0,l=0;!(e>=r);){var c=t.charAt(e);if(e++,Ra.isDigit(c)){var h=c-"0";o.selfMultiply(k.TEN),o.selfAdd(h),a++;continue}if(c==="."){u=a;continue}if(c==="e"||c==="E"){var d=t.substring(e);try{l=Gr.parseInt(d)}catch(T){throw T instanceof Error?new Error("Invalid exponent "+d+" in string "+t):T}finally{}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}var g=o,y=a-u-l;if(y===0)g=o;else if(y>0){var C=k.TEN.pow(y);g=o.divide(C)}else if(y<0){var P=k.TEN.pow(-y);g=o.multiply(P)}return i?g.negate():g},k.createNaN=function(){return new k(ot.NaN,ot.NaN)},k.copy=function(t){return new k(t)},k.magnitude=function(t){var e=Math.abs(t),r=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(r)),s=Math.pow(10,i);return s*10<=e&&(i+=1),i},k.stringOfChar=function(t,e){for(var r=new Ur,i=0;i<e;i++)r.append(t);return r.toString()},Nr.PI.get=function(){return new k(3.141592653589793,12246467991473532e-32)},Nr.TWO_PI.get=function(){return new k(6.283185307179586,24492935982947064e-32)},Nr.PI_2.get=function(){return new k(1.5707963267948966,6123233995736766e-32)},Nr.E.get=function(){return new k(2.718281828459045,14456468917292502e-32)},Nr.NaN.get=function(){return new k(ot.NaN,ot.NaN)},Nr.EPS.get=function(){return 123259516440783e-46},Nr.SPLIT.get=function(){return 134217729},Nr.MAX_PRINT_DIGITS.get=function(){return 32},Nr.TEN.get=function(){return k.valueOf(10)},Nr.ONE.get=function(){return k.valueOf(1)},Nr.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},Nr.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(k,Nr);var Ae=function(){},_d={DP_SAFE_EPSILON:{configurable:!0}};Ae.prototype.interfaces_=function(){return[]},Ae.prototype.getClass=function(){return Ae},Ae.orientationIndex=function(t,e,r){var i=Ae.orientationIndexFilter(t,e,r);if(i<=1)return i;var s=k.valueOf(e.x).selfAdd(-t.x),o=k.valueOf(e.y).selfAdd(-t.y),a=k.valueOf(r.x).selfAdd(-e.x),u=k.valueOf(r.y).selfAdd(-e.y);return s.selfMultiply(u).selfSubtract(o.selfMultiply(a)).signum()},Ae.signOfDet2x2=function(t,e,r,i){var s=t.multiply(i).selfSubtract(e.multiply(r));return s.signum()},Ae.intersection=function(t,e,r,i){var s=k.valueOf(i.y).selfSubtract(r.y).selfMultiply(k.valueOf(e.x).selfSubtract(t.x)),o=k.valueOf(i.x).selfSubtract(r.x).selfMultiply(k.valueOf(e.y).selfSubtract(t.y)),a=s.subtract(o),u=k.valueOf(i.x).selfSubtract(r.x).selfMultiply(k.valueOf(t.y).selfSubtract(r.y)),l=k.valueOf(i.y).selfSubtract(r.y).selfMultiply(k.valueOf(t.x).selfSubtract(r.x)),c=u.subtract(l),h=c.selfDivide(a).doubleValue(),d=k.valueOf(t.x).selfAdd(k.valueOf(e.x).selfSubtract(t.x).selfMultiply(h)).doubleValue(),g=k.valueOf(e.x).selfSubtract(t.x).selfMultiply(k.valueOf(t.y).selfSubtract(r.y)),y=k.valueOf(e.y).selfSubtract(t.y).selfMultiply(k.valueOf(t.x).selfSubtract(r.x)),C=g.subtract(y),P=C.selfDivide(a).doubleValue(),T=k.valueOf(r.y).selfAdd(k.valueOf(i.y).selfSubtract(r.y).selfMultiply(P)).doubleValue();return new D(d,T)},Ae.orientationIndexFilter=function(t,e,r){var i=null,s=(t.x-r.x)*(e.y-r.y),o=(t.y-r.y)*(e.x-r.x),a=s-o;if(s>0){if(o<=0)return Ae.signum(a);i=s+o}else if(s<0){if(o>=0)return Ae.signum(a);i=-s-o}else return Ae.signum(a);var u=Ae.DP_SAFE_EPSILON*i;return a>=u||-a>=u?Ae.signum(a):2},Ae.signum=function(t){return t>0?1:t<0?-1:0},_d.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(Ae,_d);var _t=function(){},Fa={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Fa.X.get=function(){return 0},Fa.Y.get=function(){return 1},Fa.Z.get=function(){return 2},Fa.M.get=function(){return 3},_t.prototype.setOrdinate=function(t,e,r){},_t.prototype.size=function(){},_t.prototype.getOrdinate=function(t,e){},_t.prototype.getCoordinate=function(){},_t.prototype.getCoordinateCopy=function(t){},_t.prototype.getDimension=function(){},_t.prototype.getX=function(t){},_t.prototype.clone=function(){},_t.prototype.expandEnvelope=function(t){},_t.prototype.copy=function(){},_t.prototype.getY=function(t){},_t.prototype.toCoordinateArray=function(){},_t.prototype.interfaces_=function(){return[Mu]},_t.prototype.getClass=function(){return _t},Object.defineProperties(_t,Fa);var wd=function(){},vo=function(n){function t(){n.call(this,"Projective point not representable on the Cartesian plane.")}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(wd),ce=function(){};ce.arraycopy=function(t,e,r,i,s){for(var o=0,a=e;a<e+s;a++)r[i+o]=t[a],o++},ce.getProperty=function(t){return{"line.separator":`
|
|
42
|
+
`}[t]};var Tr=function n(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],r=arguments[1];this.x=e,this.y=r,this.w=1}else if(arguments[0]instanceof n&&arguments[1]instanceof n){var i=arguments[0],s=arguments[1];this.x=i.y*s.w-s.y*i.w,this.y=s.x*i.w-i.x*s.w,this.w=i.x*s.y-s.x*i.y}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var o=arguments[0],a=arguments[1];this.x=o.y-a.y,this.y=a.x-o.x,this.w=o.x*a.y-a.x*o.y}}else if(arguments.length===3){var u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(arguments.length===4){var h=arguments[0],d=arguments[1],g=arguments[2],y=arguments[3],C=h.y-d.y,P=d.x-h.x,T=h.x*d.y-d.x*h.y,v=g.y-y.y,w=y.x-g.x,m=g.x*y.y-y.x*g.y;this.x=P*m-w*T,this.y=v*T-C*m,this.w=C*w-v*P}};Tr.prototype.getY=function(){var t=this.y/this.w;if(ot.isNaN(t)||ot.isInfinite(t))throw new vo;return t},Tr.prototype.getX=function(){var t=this.x/this.w;if(ot.isNaN(t)||ot.isInfinite(t))throw new vo;return t},Tr.prototype.getCoordinate=function(){var t=new D;return t.x=this.getX(),t.y=this.getY(),t},Tr.prototype.interfaces_=function(){return[]},Tr.prototype.getClass=function(){return Tr},Tr.intersection=function(t,e,r,i){var s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,u=r.y-i.y,l=i.x-r.x,c=r.x*i.y-i.x*r.y,h=o*c-l*a,d=u*a-s*c,g=s*l-u*o,y=h/g,C=d/g;if(ot.isNaN(y)||ot.isInfinite(y)||ot.isNaN(C)||ot.isInfinite(C))throw new vo;return new D(y,C)};var j=function n(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof n){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];this.init(s,o,a,u)}},Ed={serialVersionUID:{configurable:!0}};j.prototype.getArea=function(){return this.getWidth()*this.getHeight()},j.prototype.equals=function(t){if(!(t instanceof j))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},j.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new j;var e=this._minx>t._minx?this._minx:t._minx,r=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,s=this._maxy<t._maxy?this._maxy:t._maxy;return new j(e,i,r,s)},j.prototype.isNull=function(){return this._maxx<this._minx},j.prototype.getMaxX=function(){return this._maxx},j.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];return this.isNull()||e.isNull()?!1:e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:r>=this._minx&&r<=this._maxx&&i>=this._miny&&i<=this._maxy}},j.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof j){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof D){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:!(r>this._maxx||r<this._minx||i>this._maxy||i<this._miny)}},j.prototype.getMinY=function(){return this._miny},j.prototype.getMinX=function(){return this._minx},j.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.isNull()?(this._minx=r,this._maxx=r,this._miny=i,this._maxy=i):(r<this._minx&&(this._minx=r),r>this._maxx&&(this._maxx=r),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},j.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},j.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},j.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},j.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},j.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},j.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},j.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},j.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},j.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=r,this._maxy+=r,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},j.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof j){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof D){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.covers(r,i)}},j.prototype.centre=function(){return this.isNull()?null:new D((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},j.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];s<o?(this._minx=s,this._maxx=o):(this._minx=o,this._maxx=s),a<u?(this._miny=a,this._maxy=u):(this._miny=u,this._maxy=a)}},j.prototype.getMaxY=function(){return this._maxy},j.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var r=0;return this._maxy<t._miny?r=t._miny-this._maxy:this._miny>t._maxy&&(r=this._miny-t._maxy),e===0?r:r===0?e:Math.sqrt(e*e+r*r)},j.prototype.hashCode=function(){var t=17;return t=37*t+D.hashCode(this._minx),t=37*t+D.hashCode(this._maxx),t=37*t+D.hashCode(this._miny),t=37*t+D.hashCode(this._maxy),t},j.prototype.interfaces_=function(){return[hr,fr]},j.prototype.getClass=function(){return j},j.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],r=arguments[2];return r.x>=(t.x<e.x?t.x:e.x)&&r.x<=(t.x>e.x?t.x:e.x)&&r.y>=(t.y<e.y?t.y:e.y)&&r.y<=(t.y>e.y?t.y:e.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=Math.min(o.x,a.x),l=Math.max(o.x,a.x),c=Math.min(i.x,s.x),h=Math.max(i.x,s.x);return!(c>l||h<u||(u=Math.min(o.y,a.y),l=Math.max(o.y,a.y),c=Math.min(i.y,s.y),h=Math.max(i.y,s.y),c>l)||h<u)}},Ed.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(j,Ed);var Wr={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*$/},Lu=function(t){this.geometryFactory=t||new pt};Lu.prototype.read=function(t){var e,r,i;t=t.replace(/[\n\r]/g," ");var s=Wr.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(s=Wr.emptyTypeStr.exec(t),s[2]=void 0),s&&(r=s[1].toLowerCase(),i=s[2],yo[r]&&(e=yo[r].apply(this,[i]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},Lu.prototype.write=function(t){return this.extractGeometry(t)},Lu.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!Hn[e])return null;var r=e.toUpperCase(),i;return t.isEmpty()?i=r+" EMPTY":i=r+"("+Hn[e].apply(this,[t])+")",i};var Hn={coordinate:function(t){return t.x+" "+t.y},point:function(t){return Hn.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Hn.point.apply(e,[t._geometries[i]])+")");return r.join(",")},linestring:function(t){for(var e=this,r=[],i=0,s=t._points._coordinates.length;i<s;++i)r.push(Hn.coordinate.apply(e,[t._points._coordinates[i]]));return r.join(",")},linearring:function(t){for(var e=this,r=[],i=0,s=t._points._coordinates.length;i<s;++i)r.push(Hn.coordinate.apply(e,[t._points._coordinates[i]]));return r.join(",")},multilinestring:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Hn.linestring.apply(e,[t._geometries[i]])+")");return r.join(",")},polygon:function(t){var e=this,r=[];r.push("("+Hn.linestring.apply(this,[t._shell])+")");for(var i=0,s=t._holes.length;i<s;++i)r.push("("+Hn.linestring.apply(e,[t._holes[i]])+")");return r.join(",")},multipolygon:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Hn.polygon.apply(e,[t._geometries[i]])+")");return r.join(",")},geometrycollection:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push(e.extractGeometry(t._geometries[i]));return r.join(",")}},yo={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(Wr.spaces);return this.geometryFactory.createPoint(new D(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var r,i=t.trim().split(","),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(Wr.trimParens,"$1"),s.push(yo.point.apply(e,[r]));return this.geometryFactory.createMultiPoint(s)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),r=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(Wr.spaces),r.push(new D(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(r)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),r=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(Wr.spaces),r.push(new D(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var r,i=t.trim().split(Wr.parenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(Wr.trimParens,"$1"),s.push(yo.linestring.apply(e,[r]));return this.geometryFactory.createMultiLineString(s)},polygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var r,i,s,o=t.trim().split(Wr.parenComma),a,u=[],l=0,c=o.length;l<c;++l)r=o[l].replace(Wr.trimParens,"$1"),i=yo.linestring.apply(e,[r]),s=e.geometryFactory.createLinearRing(i._points),l===0?a=s:u.push(s);return this.geometryFactory.createPolygon(a,u)},multipolygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var r,i=t.trim().split(Wr.doubleParenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(Wr.trimParens,"$1"),s.push(yo.polygon.apply(e,[r]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(t){var e=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var r=t.trim().split("|"),i=[],s=0,o=r.length;s<o;++s)i.push(e.read(r[s]));return this.geometryFactory.createGeometryCollection(i)}},Or=function(t){this.parser=new Lu(t)};Or.prototype.write=function(t){return this.parser.write(t)},Or.toLineString=function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var Yn=function(n){function t(e){n.call(this,e),this.name="RuntimeException",this.message=e,this.stack=new n().stack}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Error),Au=function(n){function t(){if(n.call(this),arguments.length===0)n.call(this);else if(arguments.length===1){var e=arguments[0];n.call(this,e)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Yn),ct=function(){};ct.prototype.interfaces_=function(){return[]},ct.prototype.getClass=function(){return ct},ct.shouldNeverReachHere=function(){if(arguments.length===0)ct.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new Au("Should never reach here"+(t!==null?": "+t:""))}},ct.isTrue=function(){var t,e;if(arguments.length===1)t=arguments[0],ct.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],e=arguments[1],!t))throw e===null?new Au:new Au(e)},ct.equals=function(){var t,e,r;if(arguments.length===2)t=arguments[0],e=arguments[1],ct.equals(t,e,null);else if(arguments.length===3&&(t=arguments[0],e=arguments[1],r=arguments[2],!e.equals(t)))throw new Au("Expected "+t+" but encountered "+e+(r!==null?": "+r:""))};var Gt=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new D,this._intPt[1]=new D,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Ps={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};Gt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},Gt.prototype.getTopologySummary=function(){var t=new Ur;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},Gt.prototype.computeIntersection=function(t,e,r,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=r,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,r,i)},Gt.prototype.getIntersectionNum=function(){return this._result},Gt.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],e=this.getEdgeDistance(t,0),r=this.getEdgeDistance(t,1);e>r?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},Gt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},Gt.prototype.setPrecisionModel=function(t){this._precisionModel=t},Gt.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],r=0;r<this._result;r++)if(!(t._intPt[r].equals2D(t._inputLines[e][0])||t._intPt[r].equals2D(t._inputLines[e][1])))return!0;return!1}},Gt.prototype.getIntersection=function(t){return this._intPt[t]},Gt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},Gt.prototype.hasIntersection=function(){return this._result!==Gt.NO_INTERSECTION},Gt.prototype.getEdgeDistance=function(t,e){var r=Gt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1]);return r},Gt.prototype.isCollinear=function(){return this._result===Gt.COLLINEAR_INTERSECTION},Gt.prototype.toString=function(){return Or.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Or.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},Gt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},Gt.prototype.isIntersection=function(t){for(var e=this,r=0;r<this._result;r++)if(e._intPt[r].equals2D(t))return!0;return!1},Gt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},Gt.prototype.interfaces_=function(){return[]},Gt.prototype.getClass=function(){return Gt},Gt.computeEdgeDistance=function(t,e,r){var i=Math.abs(r.x-e.x),s=Math.abs(r.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(r))i>s?o=i:o=s;else{var a=Math.abs(t.x-e.x),u=Math.abs(t.y-e.y);i>s?o=a:o=u,o===0&&!t.equals(e)&&(o=Math.max(a,u))}return ct.isTrue(!(o===0&&!t.equals(e)),"Bad distance calculation"),o},Gt.nonRobustComputeEdgeDistance=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s);return ct.isTrue(!(o===0&&!t.equals(e)),"Invalid distance calculation"),o},Ps.DONT_INTERSECT.get=function(){return 0},Ps.DO_INTERSECT.get=function(){return 1},Ps.COLLINEAR.get=function(){return 2},Ps.NO_INTERSECTION.get=function(){return 0},Ps.POINT_INTERSECTION.get=function(){return 1},Ps.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(Gt,Ps);var Gi=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(r){var i=new j(this._inputLines[0][0],this._inputLines[0][1]),s=new j(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(r)&&s.contains(r)},t.prototype.computeIntersection=function(){if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,j.intersects(i,s,r)&&W.orientationIndex(i,s,r)===0&&W.orientationIndex(s,i,r)===0)return this._isProper=!0,(r.equals(i)||r.equals(s))&&(this._isProper=!1),this._result=n.POINT_INTERSECTION,null;this._result=n.NO_INTERSECTION}else return n.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(r,i,s,o,a){a.x=this.smallestInAbsValue(r.x,i.x,s.x,o.x),a.y=this.smallestInAbsValue(r.y,i.y,s.y,o.y),r.x-=a.x,r.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.safeHCoordinateIntersection=function(r,i,s,o){var a=null;try{a=Tr.intersection(r,i,s,o)}catch(u){if(u instanceof vo)a=t.nearestEndpoint(r,i,s,o);else throw u}finally{}return a},t.prototype.intersection=function(r,i,s,o){var a=this.intersectionWithNormalization(r,i,s,o);return this.isInSegmentEnvelopes(a)||(a=new D(t.nearestEndpoint(r,i,s,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(a),a},t.prototype.smallestInAbsValue=function(r,i,s,o){var a=r,u=Math.abs(a);return Math.abs(i)<u&&(a=i,u=Math.abs(i)),Math.abs(s)<u&&(a=s,u=Math.abs(s)),Math.abs(o)<u&&(a=o),a},t.prototype.checkDD=function(r,i,s,o,a){var u=Ae.intersection(r,i,s,o),l=this.isInSegmentEnvelopes(u);ce.out.println("DD in env = "+l+" --------------------- "+u),a.distance(u)>1e-4&&ce.out.println("Distance = "+a.distance(u))},t.prototype.intersectionWithNormalization=function(r,i,s,o){var a=new D(r),u=new D(i),l=new D(s),c=new D(o),h=new D;this.normalizeToEnvCentre(a,u,l,c,h);var d=this.safeHCoordinateIntersection(a,u,l,c);return d.x+=h.x,d.y+=h.y,d},t.prototype.computeCollinearIntersection=function(r,i,s,o){var a=j.intersects(r,i,s),u=j.intersects(r,i,o),l=j.intersects(s,o,r),c=j.intersects(s,o,i);return a&&u?(this._intPt[0]=s,this._intPt[1]=o,n.COLLINEAR_INTERSECTION):l&&c?(this._intPt[0]=r,this._intPt[1]=i,n.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=s,this._intPt[1]=r,s.equals(r)&&!u&&!c?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):a&&c?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!u&&!l?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):u&&l?(this._intPt[0]=o,this._intPt[1]=r,o.equals(r)&&!a&&!c?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):u&&c?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!a&&!l?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):n.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(r,i,s,o,a){var u=r.x<i.x?r.x:i.x,l=r.y<i.y?r.y:i.y,c=r.x>i.x?r.x:i.x,h=r.y>i.y?r.y:i.y,d=s.x<o.x?s.x:o.x,g=s.y<o.y?s.y:o.y,y=s.x>o.x?s.x:o.x,C=s.y>o.y?s.y:o.y,P=u>d?u:d,T=c<y?c:y,v=l>g?l:g,w=h<C?h:C,m=(P+T)/2,_=(v+w)/2;a.x=m,a.y=_,r.x-=a.x,r.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.computeIntersect=function(r,i,s,o){if(this._isProper=!1,!j.intersects(r,i,s,o))return n.NO_INTERSECTION;var a=W.orientationIndex(r,i,s),u=W.orientationIndex(r,i,o);if(a>0&&u>0||a<0&&u<0)return n.NO_INTERSECTION;var l=W.orientationIndex(s,o,r),c=W.orientationIndex(s,o,i);if(l>0&&c>0||l<0&&c<0)return n.NO_INTERSECTION;var h=a===0&&u===0&&l===0&&c===0;return h?this.computeCollinearIntersection(r,i,s,o):(a===0||u===0||l===0||c===0?(this._isProper=!1,r.equals2D(s)||r.equals2D(o)?this._intPt[0]=r:i.equals2D(s)||i.equals2D(o)?this._intPt[0]=i:a===0?this._intPt[0]=new D(s):u===0?this._intPt[0]=new D(o):l===0?this._intPt[0]=new D(r):c===0&&(this._intPt[0]=new D(i))):(this._isProper=!0,this._intPt[0]=this.intersection(r,i,s,o)),n.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(r,i,s,o){var a=r,u=W.distancePointLine(r,s,o),l=W.distancePointLine(i,s,o);return l<u&&(u=l,a=i),l=W.distancePointLine(s,r,i),l<u&&(u=l,a=s),l=W.distancePointLine(o,r,i),l<u&&(u=l,a=o),a},t}(Gt),bs=function(){};bs.prototype.interfaces_=function(){return[]},bs.prototype.getClass=function(){return bs},bs.orientationIndex=function(t,e,r){var i=e.x-t.x,s=e.y-t.y,o=r.x-e.x,a=r.y-e.y;return bs.signOfDet2x2(i,s,o,a)},bs.signOfDet2x2=function(t,e,r,i){var s=null,o=null,a=null;if(s=1,t===0||i===0)return e===0||r===0?0:e>0?r>0?-s:s:r>0?s:-s;if(e===0||r===0)return i>0?t>0?s:-s:t>0?-s:s;if(e>0?i>0?e<=i||(s=-s,o=t,t=r,r=o,o=e,e=i,i=o):e<=-i?(s=-s,r=-r,i=-i):(o=t,t=-r,r=o,o=e,e=-i,i=o):i>0?-e<=i?(s=-s,t=-t,e=-e):(o=-t,t=r,r=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,r=-r,i=-i):(s=-s,o=-t,t=-r,r=o,o=-e,e=-i,i=o),t>0)if(r>0){if(!(t<=r))return s}else return s;else{if(r>0)return-s;if(t>=r)s=-s,t=-t,r=-r;else return-s}for(;;){if(a=Math.floor(r/t),r=r-a*t,i=i-a*e,i<0)return-s;if(i>e)return s;if(t>r+r){if(e<i+i)return s}else{if(e>i+i)return-s;r=t-r,i=e-i,s=-s}if(i===0)return r===0?0:-s;if(r===0||(a=Math.floor(t/r),t=t-a*r,e=e-a*i,e<0))return s;if(e>i)return-s;if(r>t+t){if(i<e+e)return-s}else{if(i>e+e)return s;t=r-t,e=i-e,s=-s}if(e===0)return t===0?0:s;if(t===0)return-s}};var qr=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};qr.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var r=t.x,i=e.x;return r>i&&(r=e.x,i=t.x),this._p.x>=r&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var s=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,u=e.y-this._p.y,l=bs.signOfDet2x2(s,o,a,u);if(l===0)return this._isPointOnSegment=!0,null;u<o&&(l=-l),l>0&&this._crossingCount++}},qr.prototype.isPointInPolygon=function(){return this.getLocation()!==R.EXTERIOR},qr.prototype.getLocation=function(){return this._isPointOnSegment?R.BOUNDARY:this._crossingCount%2===1?R.INTERIOR:R.EXTERIOR},qr.prototype.isOnSegment=function(){return this._isPointOnSegment},qr.prototype.interfaces_=function(){return[]},qr.prototype.getClass=function(){return qr},qr.locatePointInRing=function(){if(arguments[0]instanceof D&&nt(arguments[1],_t)){for(var t=arguments[0],e=arguments[1],r=new qr(t),i=new D,s=new D,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,s),r.countSegment(i,s),r.isOnSegment())return r.getLocation();return r.getLocation()}else if(arguments[0]instanceof D&&arguments[1]instanceof Array){for(var a=arguments[0],u=arguments[1],l=new qr(a),c=1;c<u.length;c++){var h=u[c],d=u[c-1];if(l.countSegment(h,d),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var W=function(){},Ns={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};W.prototype.interfaces_=function(){return[]},W.prototype.getClass=function(){return W},W.orientationIndex=function(t,e,r){return Ae.orientationIndex(t,e,r)},W.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,r=t[0].x,i=1;i<t.length-1;i++){var s=t[i].x-r,o=t[i+1].y,a=t[i-1].y;e+=s*(a-o)}return e/2}else if(nt(arguments[0],_t)){var u=arguments[0],l=u.size();if(l<3)return 0;var c=new D,h=new D,d=new D;u.getCoordinate(0,h),u.getCoordinate(1,d);var g=h.x;d.x-=g;for(var y=0,C=1;C<l-1;C++)c.y=h.y,h.x=d.x,h.y=d.y,u.getCoordinate(C+1,d),d.x-=g,y+=h.x*(c.y-d.y);return y/2}},W.distanceLineLine=function(t,e,r,i){if(t.equals(e))return W.distancePointLine(t,r,i);if(r.equals(i))return W.distancePointLine(i,t,e);var s=!1;if(!j.intersects(t,e,r,i))s=!0;else{var o=(e.x-t.x)*(i.y-r.y)-(e.y-t.y)*(i.x-r.x);if(o===0)s=!0;else{var a=(t.y-r.y)*(i.x-r.x)-(t.x-r.x)*(i.y-r.y),u=(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y),l=u/o,c=a/o;(c<0||c>1||l<0||l>1)&&(s=!0)}}return s?rr.min(W.distancePointLine(t,r,i),W.distancePointLine(e,r,i),W.distancePointLine(r,t,e),W.distancePointLine(i,t,e)):0},W.isPointInRing=function(t,e){return W.locatePointInRing(t,e)!==R.EXTERIOR},W.computeLength=function(t){var e=t.size();if(e<=1)return 0;var r=0,i=new D;t.getCoordinate(0,i);for(var s=i.x,o=i.y,a=1;a<e;a++){t.getCoordinate(a,i);var u=i.x,l=i.y,c=u-s,h=l-o;r+=Math.sqrt(c*c+h*h),s=u,o=l}return r},W.isCCW=function(t){var e=t.length-1;if(e<3)throw new zt("Ring has fewer than 4 points, so orientation cannot be determined");for(var r=t[0],i=0,s=1;s<=e;s++){var o=t[s];o.y>r.y&&(r=o,i=s)}var a=i;do a=a-1,a<0&&(a=e);while(t[a].equals2D(r)&&a!==i);var u=i;do u=(u+1)%e;while(t[u].equals2D(r)&&u!==i);var l=t[a],c=t[u];if(l.equals2D(r)||c.equals2D(r)||l.equals2D(c))return!1;var h=W.computeOrientation(l,r,c),d=!1;return h===0?d=l.x>c.x:d=h>0,d},W.locatePointInRing=function(t,e){return qr.locatePointInRing(t,e)},W.distancePointLinePerpendicular=function(t,e,r){var i=(r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y),s=((e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y))/i;return Math.abs(s)*Math.sqrt(i)},W.computeOrientation=function(t,e,r){return W.orientationIndex(t,e,r)},W.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new zt("Line array must contain at least one vertex");for(var r=t.distance(e[0]),i=0;i<e.length-1;i++){var s=W.distancePointLine(t,e[i],e[i+1]);s<r&&(r=s)}return r}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];if(a.x===u.x&&a.y===u.y)return o.distance(a);var l=(u.x-a.x)*(u.x-a.x)+(u.y-a.y)*(u.y-a.y),c=((o.x-a.x)*(u.x-a.x)+(o.y-a.y)*(u.y-a.y))/l;if(c<=0)return o.distance(a);if(c>=1)return o.distance(u);var h=((a.y-o.y)*(u.x-a.x)-(a.x-o.x)*(u.y-a.y))/l;return Math.abs(h)*Math.sqrt(l)}},W.isOnLine=function(t,e){for(var r=new Gi,i=1;i<e.length;i++){var s=e[i-1],o=e[i];if(r.computeIntersection(t,s,o),r.hasIntersection())return!0}return!1},Ns.CLOCKWISE.get=function(){return-1},Ns.RIGHT.get=function(){return W.CLOCKWISE},Ns.COUNTERCLOCKWISE.get=function(){return 1},Ns.LEFT.get=function(){return W.COUNTERCLOCKWISE},Ns.COLLINEAR.get=function(){return 0},Ns.STRAIGHT.get=function(){return W.COLLINEAR},Object.defineProperties(W,Ns);var Jn=function(){};Jn.prototype.filter=function(t){},Jn.prototype.interfaces_=function(){return[]},Jn.prototype.getClass=function(){return Jn};var rt=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},wn={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}};rt.prototype.isGeometryCollection=function(){return this.getSortIndex()===rt.SORTINDEX_GEOMETRYCOLLECTION},rt.prototype.getFactory=function(){return this._factory},rt.prototype.getGeometryN=function(t){return this},rt.prototype.getArea=function(){return 0},rt.prototype.isRectangle=function(){return!1},rt.prototype.equals=function(){if(arguments[0]instanceof rt){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof rt))return!1;var r=e;return this.equalsExact(r)}},rt.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},rt.prototype.geometryChanged=function(){this.apply(rt.geometryChangedFilter)},rt.prototype.geometryChangedAction=function(){this._envelope=null},rt.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())},rt.prototype.getLength=function(){return 0},rt.prototype.getNumGeometries=function(){return 1},rt.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.getSortIndex()!==r.getSortIndex()?this.getSortIndex()-r.getSortIndex():this.isEmpty()&&r.isEmpty()?0:this.isEmpty()?-1:r.isEmpty()?1:this.compareToSameClass(r,i)}},rt.prototype.getUserData=function(){return this._userData},rt.prototype.getSRID=function(){return this._SRID},rt.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},rt.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===rt.SORTINDEX_GEOMETRYCOLLECTION)throw new zt("This method does not support GeometryCollection arguments")},rt.prototype.equal=function(t,e,r){return r===0?t.equals(e):t.distance(e)<=r},rt.prototype.norm=function(){var t=this.copy();return t.normalize(),t},rt.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},rt.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new j(this._envelope)},rt.prototype.setSRID=function(t){this._SRID=t},rt.prototype.setUserData=function(t){this._userData=t},rt.prototype.compare=function(t,e){for(var r=t.iterator(),i=e.iterator();r.hasNext()&&i.hasNext();){var s=r.next(),o=i.next(),a=s.compareTo(o);if(a!==0)return a}return r.hasNext()?1:i.hasNext()?-1:0},rt.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},rt.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===rt.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===rt.SORTINDEX_MULTIPOINT||this.getSortIndex()===rt.SORTINDEX_MULTILINESTRING||this.getSortIndex()===rt.SORTINDEX_MULTIPOLYGON},rt.prototype.interfaces_=function(){return[Mu,hr,fr]},rt.prototype.getClass=function(){return rt},rt.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},rt.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},wn.serialVersionUID.get=function(){return 8763622679187377e3},wn.SORTINDEX_POINT.get=function(){return 0},wn.SORTINDEX_MULTIPOINT.get=function(){return 1},wn.SORTINDEX_LINESTRING.get=function(){return 2},wn.SORTINDEX_LINEARRING.get=function(){return 3},wn.SORTINDEX_MULTILINESTRING.get=function(){return 4},wn.SORTINDEX_POLYGON.get=function(){return 5},wn.SORTINDEX_MULTIPOLYGON.get=function(){return 6},wn.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},wn.geometryChangedFilter.get=function(){return $l},Object.defineProperties(rt,wn);var $l=function(){};$l.interfaces_=function(){return[Jn]},$l.filter=function(t){t.geometryChangedAction()};var En=function(){};En.prototype.filter=function(t){},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En};var dr=function(){},Bn={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}};dr.prototype.isInBoundary=function(t){},dr.prototype.interfaces_=function(){return[]},dr.prototype.getClass=function(){return dr},Bn.Mod2BoundaryNodeRule.get=function(){return _o},Bn.EndPointBoundaryNodeRule.get=function(){return wo},Bn.MultiValentEndPointBoundaryNodeRule.get=function(){return Eo},Bn.MonoValentEndPointBoundaryNodeRule.get=function(){return So},Bn.MOD2_BOUNDARY_RULE.get=function(){return new _o},Bn.ENDPOINT_BOUNDARY_RULE.get=function(){return new wo},Bn.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new Eo},Bn.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new So},Bn.OGC_SFS_BOUNDARY_RULE.get=function(){return dr.MOD2_BOUNDARY_RULE},Object.defineProperties(dr,Bn);var _o=function(){};_o.prototype.isInBoundary=function(t){return t%2===1},_o.prototype.interfaces_=function(){return[dr]},_o.prototype.getClass=function(){return _o};var wo=function(){};wo.prototype.isInBoundary=function(t){return t>0},wo.prototype.interfaces_=function(){return[dr]},wo.prototype.getClass=function(){return wo};var Eo=function(){};Eo.prototype.isInBoundary=function(t){return t>1},Eo.prototype.interfaces_=function(){return[dr]},Eo.prototype.getClass=function(){return Eo};var So=function(){};So.prototype.isInBoundary=function(t){return t===1},So.prototype.interfaces_=function(){return[dr]},So.prototype.getClass=function(){return So};var $t=function(){};$t.prototype.add=function(){},$t.prototype.addAll=function(){},$t.prototype.isEmpty=function(){},$t.prototype.iterator=function(){},$t.prototype.size=function(){},$t.prototype.toArray=function(){},$t.prototype.remove=function(){};function tc(n){this.message=n||""}tc.prototype=new Error,tc.prototype.name="IndexOutOfBoundsException";var Co=function(){};Co.prototype.hasNext=function(){},Co.prototype.next=function(){},Co.prototype.remove=function(){};var xr=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}($t);function Io(n){this.message=n||""}Io.prototype=new Error,Io.prototype.name="NoSuchElementException";var U=function(n){function t(){n.call(this),this.array_=[],arguments[0]instanceof $t&&this.addAll(arguments[0])}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[n,$t]},t.prototype.add=function(r){return arguments.length===1?this.array_.push(r):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.set=function(r,i){var s=this.array_[r];return this.array_[r]=i,s},t.prototype.iterator=function(){return new ly(this)},t.prototype.get=function(r){if(r<0||r>=this.size())throw new tc;return this.array_[r]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},t.prototype.remove=function(r){for(var i=this,s=!1,o=0,a=this.array_.length;o<a;o++)if(i.array_[o]===r){i.array_.splice(o,1),s=!0;break}return s},t}(xr),ly=function(n){function t(e){n.call(this),this.arrayList_=e,this.position_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new Io;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(r){return this.arrayList_.set(this.position_-1,r)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(Co),ka=function(n){function t(){if(n.call(this),arguments.length!==0){if(arguments.length===1){var r=arguments[0];this.ensureCapacity(r.length),this.add(r,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={coordArrayType:{configurable:!0}};return e.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(i){return this.get(i)},t.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=!1,u=s.iterator();u.hasNext();)i.add(u.next(),o),a=!0;return a}else return n.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var i=this,s=n.prototype.clone.call(this),o=0;o<this.size();o++)s.add(o,i.get(o).copy());return s},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];n.prototype.add.call(this,s)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1];return this.add(o,a,!0),!0}else if(arguments[0]instanceof D&&typeof arguments[1]=="boolean"){var u=arguments[0],l=arguments[1];if(!l&&this.size()>=1){var c=this.get(this.size()-1);if(c.equals2D(u))return null}n.prototype.add.call(this,u)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var h=arguments[0],d=arguments[1];return this.add(h,d),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var g=arguments[0],y=arguments[1],C=arguments[2];if(C)for(var P=0;P<g.length;P++)i.add(g[P],y);else for(var T=g.length-1;T>=0;T--)i.add(g[T],y);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof D){var v=arguments[0],w=arguments[1],m=arguments[2];if(!m){var _=this.size();if(_>0){if(v>0){var E=this.get(v-1);if(E.equals2D(w))return null}if(v<_){var I=this.get(v);if(I.equals2D(w))return null}}}n.prototype.add.call(this,v,w)}}else if(arguments.length===4){var b=arguments[0],O=arguments[1],M=arguments[2],N=arguments[3],x=1;M>N&&(x=-1);for(var A=M;A!==N;A+=x)i.add(b[A],O);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new D(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,e),t}(U),dt=function(){},Ru={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Ru.ForwardComparator.get=function(){return Va},Ru.BidirectionalComparator.get=function(){return Po},Ru.coordArrayType.get=function(){return new Array(0).fill(null)},dt.prototype.interfaces_=function(){return[]},dt.prototype.getClass=function(){return dt},dt.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},dt.ptNotInList=function(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(dt.indexOf(i,e)<0)return i}return null},dt.scroll=function(t,e){var r=dt.indexOf(e,t);if(r<0)return null;var i=new Array(t.length).fill(null);ce.arraycopy(t,r,i,0,t.length-r),ce.arraycopy(t,0,i,t.length-r,r),ce.arraycopy(i,0,t,0,t.length)},dt.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!t[r].equals(e[r]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(i===s)return!0;if(i===null||s===null||i.length!==s.length)return!1;for(var a=0;a<i.length;a++)if(o.compare(i[a],s[a])!==0)return!1;return!0}},dt.intersection=function(t,e){for(var r=new ka,i=0;i<t.length;i++)e.intersects(t[i])&&r.add(t[i],!0);return r.toCoordinateArray()},dt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},dt.removeRepeatedPoints=function(t){if(!dt.hasRepeatedPoints(t))return t;var e=new ka(t,!1);return e.toCoordinateArray()},dt.reverse=function(t){for(var e=t.length-1,r=Math.trunc(e/2),i=0;i<=r;i++){var s=t[i];t[i]=t[e-i],t[e-i]=s}},dt.removeNull=function(t){for(var e=0,r=0;r<t.length;r++)t[r]!==null&&e++;var i=new Array(e).fill(null);if(e===0)return i;for(var s=0,o=0;o<t.length;o++)t[o]!==null&&(i[s++]=t[o]);return i},dt.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),r=0;r<t.length;r++)e[r]=new D(t[r]);return e}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=arguments[4],l=0;l<u;l++)o[a+l]=new D(i[s+l])},dt.isEqualReversed=function(t,e){for(var r=0;r<t.length;r++){var i=t[r],s=e[t.length-r-1];if(i.compareTo(s)!==0)return!1}return!0},dt.envelope=function(t){for(var e=new j,r=0;r<t.length;r++)e.expandToInclude(t[r]);return e},dt.toCoordinateArray=function(t){return t.toArray(dt.coordArrayType)},dt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},dt.indexOf=function(t,e){for(var r=0;r<e.length;r++)if(t.equals(e[r]))return r;return-1},dt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var r=t.length-1-e,i=t[e].compareTo(t[r]);if(i!==0)return i}return 1},dt.compare=function(t,e){for(var r=0;r<t.length&&r<e.length;){var i=t[r].compareTo(e[r]);if(i!==0)return i;r++}return r<e.length?-1:r<t.length?1:0},dt.minCoordinate=function(t){for(var e=null,r=0;r<t.length;r++)(e===null||e.compareTo(t[r])>0)&&(e=t[r]);return e},dt.extract=function(t,e,r){e=rr.clamp(e,0,t.length),r=rr.clamp(r,-1,t.length);var i=r-e+1;r<0&&(i=0),e>=t.length&&(i=0),r<e&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var o=0,a=e;a<=r;a++)s[o++]=t[a];return s},Object.defineProperties(dt,Ru);var Va=function(){};Va.prototype.compare=function(t,e){var r=t,i=e;return dt.compare(r,i)},Va.prototype.interfaces_=function(){return[go]},Va.prototype.getClass=function(){return Va};var Po=function(){};Po.prototype.compare=function(t,e){var r=t,i=e;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;var s=dt.compare(r,i),o=dt.isEqualReversed(r,i);return o?0:s},Po.prototype.OLDcompare=function(t,e){var r=t,i=e;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;for(var s=dt.increasingDirection(r),o=dt.increasingDirection(i),a=s>0?0:r.length-1,u=o>0?0:r.length-1,l=0;l<r.length;l++){var c=r[a].compareTo(i[u]);if(c!==0)return c;a+=s,u+=o}return 0},Po.prototype.interfaces_=function(){return[go]},Po.prototype.getClass=function(){return Po};var Ts=function(){};Ts.prototype.get=function(){},Ts.prototype.put=function(){},Ts.prototype.size=function(){},Ts.prototype.values=function(){},Ts.prototype.entrySet=function(){};var cy=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Ts);function za(n){this.message=n||""}za.prototype=new Error,za.prototype.name="OperationNotSupported";function Fu(){}Fu.prototype=new $t,Fu.prototype.contains=function(){};var ec=function(n){function t(){n.call(this),this.array_=[],arguments[0]instanceof $t&&this.addAll(arguments[0])}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.contains=function(r){for(var i=this,s=0,o=this.array_.length;s<o;s++){var a=i.array_[s];if(a===r)return!0}return!1},t.prototype.add=function(r){return this.contains(r)?!1:(this.array_.push(r),!0)},t.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.remove=function(r){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},t.prototype.iterator=function(){return new hy(this)},t}(Fu),hy=function(n){function t(e){n.call(this),this.hashSet_=e,this.position_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new Io;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new za},t}(Co),jn=0,Wi=1;function Sd(n){return n===null?jn:n.color}function Lt(n){return n===null?null:n.parent}function Zn(n,t){n!==null&&(n.color=t)}function rc(n){return n===null?null:n.left}function Cd(n){return n===null?null:n.right}function ye(){this.root_=null,this.size_=0}ye.prototype=new cy,ye.prototype.get=function(n){for(var t=this.root_;t!==null;){var e=n.compareTo(t.key);if(e<0)t=t.left;else if(e>0)t=t.right;else return t.value}return null},ye.prototype.put=function(n,t){if(this.root_===null)return this.root_={key:n,value:t,left:null,right:null,parent:null,color:jn,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var e=this.root_,r,i;do if(r=e,i=n.compareTo(e.key),i<0)e=e.left;else if(i>0)e=e.right;else{var s=e.value;return e.value=t,s}while(e!==null);var o={key:n,left:null,right:null,value:t,parent:r,color:jn,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=o:r.right=o,this.fixAfterInsertion(o),this.size_++,null},ye.prototype.fixAfterInsertion=function(n){var t=this;for(n.color=Wi;n!=null&&n!==this.root_&&n.parent.color===Wi;)if(Lt(n)===rc(Lt(Lt(n)))){var e=Cd(Lt(Lt(n)));Sd(e)===Wi?(Zn(Lt(n),jn),Zn(e,jn),Zn(Lt(Lt(n)),Wi),n=Lt(Lt(n))):(n===Cd(Lt(n))&&(n=Lt(n),t.rotateLeft(n)),Zn(Lt(n),jn),Zn(Lt(Lt(n)),Wi),t.rotateRight(Lt(Lt(n))))}else{var r=rc(Lt(Lt(n)));Sd(r)===Wi?(Zn(Lt(n),jn),Zn(r,jn),Zn(Lt(Lt(n)),Wi),n=Lt(Lt(n))):(n===rc(Lt(n))&&(n=Lt(n),t.rotateRight(n)),Zn(Lt(n),jn),Zn(Lt(Lt(n)),Wi),t.rotateLeft(Lt(Lt(n))))}this.root_.color=jn},ye.prototype.values=function(){var n=new U,t=this.getFirstEntry();if(t!==null)for(n.add(t.value);(t=ye.successor(t))!==null;)n.add(t.value);return n},ye.prototype.entrySet=function(){var n=new ec,t=this.getFirstEntry();if(t!==null)for(n.add(t);(t=ye.successor(t))!==null;)n.add(t);return n},ye.prototype.rotateLeft=function(n){if(n!=null){var t=n.right;n.right=t.left,t.left!=null&&(t.left.parent=n),t.parent=n.parent,n.parent===null?this.root_=t:n.parent.left===n?n.parent.left=t:n.parent.right=t,t.left=n,n.parent=t}},ye.prototype.rotateRight=function(n){if(n!=null){var t=n.left;n.left=t.right,t.right!=null&&(t.right.parent=n),t.parent=n.parent,n.parent===null?this.root_=t:n.parent.right===n?n.parent.right=t:n.parent.left=t,t.right=n,n.parent=t}},ye.prototype.getFirstEntry=function(){var n=this.root_;if(n!=null)for(;n.left!=null;)n=n.left;return n},ye.successor=function(n){if(n===null)return null;if(n.right!==null){for(var t=n.right;t.left!==null;)t=t.left;return t}else{for(var e=n.parent,r=n;e!==null&&r===e.right;)r=e,e=e.parent;return e}},ye.prototype.size=function(){return this.size_};var Ua=function(){};Ua.prototype.interfaces_=function(){return[]},Ua.prototype.getClass=function(){return Ua};function Id(){}Id.prototype=new Fu;function Xr(){this.array_=[],arguments[0]instanceof $t&&this.addAll(arguments[0])}Xr.prototype=new Id,Xr.prototype.contains=function(n){for(var t=this,e=0,r=this.array_.length;e<r;e++){var i=t.array_[e];if(i.compareTo(n)===0)return!0}return!1},Xr.prototype.add=function(n){var t=this;if(this.contains(n))return!1;for(var e=0,r=this.array_.length;e<r;e++){var i=t.array_[e];if(i.compareTo(n)===1)return t.array_.splice(e,0,n),!0}return this.array_.push(n),!0},Xr.prototype.addAll=function(n){for(var t=this,e=n.iterator();e.hasNext();)t.add(e.next());return!0},Xr.prototype.remove=function(n){throw new za},Xr.prototype.size=function(){return this.array_.length},Xr.prototype.isEmpty=function(){return this.array_.length===0},Xr.prototype.toArray=function(){for(var n=this,t=[],e=0,r=this.array_.length;e<r;e++)t.push(n.array_[e]);return t},Xr.prototype.iterator=function(){return new ku(this)};var ku=function(n){this.treeSet_=n,this.position_=0};ku.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new Io;return this.treeSet_.array_[this.position_++]},ku.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},ku.prototype.remove=function(){throw new za};var qi=function(){};qi.sort=function(){var t=arguments[0],e,r,i,s;if(arguments.length===1)s=function(a,u){return a.compareTo(u)},t.sort(s);else if(arguments.length===2)i=arguments[1],s=function(a,u){return i.compare(a,u)},t.sort(s);else if(arguments.length===3){r=t.slice(arguments[1],arguments[2]),r.sort();var o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length));for(t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])}else if(arguments.length===4)for(r=t.slice(arguments[1],arguments[2]),i=arguments[3],s=function(a,u){return i.compare(a,u)},r.sort(s),o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length)),t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])},qi.asList=function(t){for(var e=new U,r=0,i=t.length;r<i;r++)e.add(t[r]);return e};var It=function(){},Dr={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}};Dr.P.get=function(){return 0},Dr.L.get=function(){return 1},Dr.A.get=function(){return 2},Dr.FALSE.get=function(){return-1},Dr.TRUE.get=function(){return-2},Dr.DONTCARE.get=function(){return-3},Dr.SYM_FALSE.get=function(){return"F"},Dr.SYM_TRUE.get=function(){return"T"},Dr.SYM_DONTCARE.get=function(){return"*"},Dr.SYM_P.get=function(){return"0"},Dr.SYM_L.get=function(){return"1"},Dr.SYM_A.get=function(){return"2"},It.prototype.interfaces_=function(){return[]},It.prototype.getClass=function(){return It},It.toDimensionSymbol=function(t){switch(t){case It.FALSE:return It.SYM_FALSE;case It.TRUE:return It.SYM_TRUE;case It.DONTCARE:return It.SYM_DONTCARE;case It.P:return It.SYM_P;case It.L:return It.SYM_L;case It.A:return It.SYM_A}throw new zt("Unknown dimension value: "+t)},It.toDimensionValue=function(t){switch(Ra.toUpperCase(t)){case It.SYM_FALSE:return It.FALSE;case It.SYM_TRUE:return It.TRUE;case It.SYM_DONTCARE:return It.DONTCARE;case It.SYM_P:return It.P;case It.SYM_L:return It.L;case It.SYM_A:return It.A}throw new zt("Unknown dimension symbol: "+t)},Object.defineProperties(It,Dr);var Hr=function(){};Hr.prototype.filter=function(t){},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr};var Mr=function(){};Mr.prototype.filter=function(t,e){},Mr.prototype.isDone=function(){},Mr.prototype.isGeometryChanged=function(){},Mr.prototype.interfaces_=function(){return[]},Mr.prototype.getClass=function(){return Mr};var Ce=function(n){function t(r,i){if(n.call(this,i),this._geometries=r||[],n.hasNullElements(this._geometries))throw new zt("geometries must not contain null elements")}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new j,o=0;o<this._geometries.length;o++)s.expandToInclude(i._geometries[o].getEnvelopeInternal());return s},t.prototype.getGeometryN=function(i){return this._geometries[i]},t.prototype.getSortIndex=function(){return n.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var i=this,s=new Array(this.getNumPoints()).fill(null),o=-1,a=0;a<this._geometries.length;a++)for(var u=i._geometries[a].getCoordinates(),l=0;l<u.length;l++)o++,s[o]=u[l];return s},t.prototype.getArea=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getArea();return s},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._geometries.length!==a._geometries.length)return!1;for(var u=0;u<this._geometries.length;u++)if(!i._geometries[u].equalsExact(a._geometries[u],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();qi.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var i=this,s=It.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getBoundaryDimension());return s},t.prototype.getDimension=function(){for(var i=this,s=It.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getDimension());return s},t.prototype.getLength=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getNumPoints();return s},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createGeometryCollection(o)},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=new Xr(qi.asList(this._geometries)),a=new Xr(qi.asList(s._geometries));return this.compare(o,a)}else if(arguments.length===2){for(var u=arguments[0],l=arguments[1],c=u,h=this.getNumGeometries(),d=c.getNumGeometries(),g=0;g<h&&g<d;){var y=i.getGeometryN(g),C=c.getGeometryN(g),P=y.compareToSameClass(C,l);if(P!==0)return P;g++}return g<h?1:g<d?-1:0}},t.prototype.apply=function(){var i=this;if(nt(arguments[0],En))for(var s=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(s);else if(nt(arguments[0],Mr)){var a=arguments[0];if(this._geometries.length===0)return null;for(var u=0;u<this._geometries.length&&(i._geometries[u].apply(a),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(nt(arguments[0],Hr)){var l=arguments[0];l.filter(this);for(var c=0;c<this._geometries.length;c++)i._geometries[c].apply(l)}else if(nt(arguments[0],Jn)){var h=arguments[0];h.filter(this);for(var d=0;d<this._geometries.length;d++)i._geometries[d].apply(h)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),ct.shouldNeverReachHere(),null},t.prototype.clone=function(){var i=this,s=n.prototype.clone.call(this);s._geometries=new Array(this._geometries.length).fill(null);for(var o=0;o<this._geometries.length;o++)s._geometries[o]=i._geometries[o].clone();return s},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,e),t}(rt),Xi=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return rt.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?It.FALSE:0},t.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var s=0;s<this._geometries.length;s++)if(!i._geometries[s].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[s-1-a]=i._geometries[a].reverse();return this.getFactory().createMultiLineString(o)},t.prototype.getBoundary=function(){return new pr(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[Ua]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,e),t}(Ce),pr=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],e=dr.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._geom=r,this._geomFact=r.getFactory(),this._bnRule=i}};pr.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},pr.prototype.getBoundary=function(){return this._geom instanceof qt?this.boundaryLineString(this._geom):this._geom instanceof Xi?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},pr.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this._bnRule.isInBoundary(2);return e?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},pr.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},pr.prototype.computeBoundaryCoordinates=function(t){var e=this,r=new U;this._endpointMap=new ye;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);s.getNumPoints()!==0&&(e.addEndpoint(s.getCoordinateN(0)),e.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),u=a.getValue(),l=u.count;e._bnRule.isInBoundary(l)&&r.add(a.getKey())}return dt.toCoordinateArray(r)},pr.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);e===null&&(e=new Vu,this._endpointMap.put(t,e)),e.count++},pr.prototype.interfaces_=function(){return[]},pr.prototype.getClass=function(){return pr},pr.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new pr(t);return e.getBoundary()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new pr(r,i);return s.getBoundary()}};var Vu=function(){this.count=null};Vu.prototype.interfaces_=function(){return[]},Vu.prototype.getClass=function(){return Vu};function fy(){}function dy(){}var py=function(){};function gy(){}function my(){}function vy(){}var gr=function(){},nc={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr},gr.chars=function(t,e){for(var r=new Array(e).fill(null),i=0;i<e;i++)r[i]=t;return String(r)},gr.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new gy,r=new fy;return t.printStackTrace(r),e.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],o="";new dy(gr.getStackTrace(i));for(var a=new vy,u=0;u<s;u++)try{o+=a.readLine()+gr.NEWLINE}catch(l){if(l instanceof my)ct.shouldNeverReachHere();else throw l}finally{}return o}},gr.split=function(t,e){for(var r=e.length,i=new U,s=""+t,o=s.indexOf(e);o>=0;){var a=s.substring(0,o);i.add(a),s=s.substring(o+r),o=s.indexOf(e)}s.length>0&&i.add(s);for(var u=new Array(i.size()).fill(null),l=0;l<u.length;l++)u[l]=i.get(l);return u},gr.toString=function(){if(arguments.length===1){var t=arguments[0];return gr.SIMPLE_ORDINATE_FORMAT.format(t)}},gr.spaces=function(t){return gr.chars(" ",t)},nc.NEWLINE.get=function(){return ce.getProperty("line.separator")},nc.SIMPLE_ORDINATE_FORMAT.get=function(){return new py},Object.defineProperties(gr,nc);var Ht=function(){};Ht.prototype.interfaces_=function(){return[]},Ht.prototype.getClass=function(){return Ht},Ht.copyCoord=function(t,e,r,i){for(var s=Math.min(t.getDimension(),r.getDimension()),o=0;o<s;o++)r.setOrdinate(i,o,t.getOrdinate(e,o))},Ht.isRing=function(t){var e=t.size();return e===0?!0:e<=3?!1:t.getOrdinate(0,_t.X)===t.getOrdinate(e-1,_t.X)&&t.getOrdinate(0,_t.Y)===t.getOrdinate(e-1,_t.Y)},Ht.isEqual=function(t,e){var r=t.size(),i=e.size();if(r!==i)return!1;for(var s=Math.min(t.getDimension(),e.getDimension()),o=0;o<r;o++)for(var a=0;a<s;a++){var u=t.getOrdinate(o,a),l=e.getOrdinate(o,a);if(t.getOrdinate(o,a)!==e.getOrdinate(o,a)&&!(ot.isNaN(u)&&ot.isNaN(l)))return!1}return!0},Ht.extend=function(t,e,r){var i=t.create(r,e.getDimension()),s=e.size();if(Ht.copy(e,0,i,0,s),s>0)for(var o=s;o<r;o++)Ht.copy(e,s-1,i,o,1);return i},Ht.reverse=function(t){for(var e=t.size()-1,r=Math.trunc(e/2),i=0;i<=r;i++)Ht.swap(t,i,e-i)},Ht.swap=function(t,e,r){if(e===r)return null;for(var i=0;i<t.getDimension();i++){var s=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(r,i)),t.setOrdinate(r,i,s)}},Ht.copy=function(t,e,r,i,s){for(var o=0;o<s;o++)Ht.copyCoord(t,e+o,r,i+o)},Ht.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var r=t.getDimension(),i=new Ur;i.append("(");for(var s=0;s<e;s++){s>0&&i.append(" ");for(var o=0;o<r;o++)o>0&&i.append(","),i.append(gr.toString(t.getOrdinate(s,o)))}return i.append(")"),i.toString()}},Ht.ensureValidRing=function(t,e){var r=e.size();if(r===0)return e;if(r<=3)return Ht.createClosedRing(t,e,4);var i=e.getOrdinate(0,_t.X)===e.getOrdinate(r-1,_t.X)&&e.getOrdinate(0,_t.Y)===e.getOrdinate(r-1,_t.Y);return i?e:Ht.createClosedRing(t,e,r+1)},Ht.createClosedRing=function(t,e,r){var i=t.create(r,e.getDimension()),s=e.size();Ht.copy(e,0,i,0,s);for(var o=s;o<r;o++)Ht.copy(e,0,i,o,1);return i};var qt=function(n){function t(r,i){n.call(this,i),this._points=null,this.init(r)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new j:this._points.expandEnvelope(new j)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return n.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._points.size()!==a._points.size())return!1;for(var u=0;u<this._points.size();u++)if(!i.equal(i._points.getCoordinate(u),a._points.getCoordinate(u),o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<Math.trunc(this._points.size()/2);s++){var o=i._points.size()-1-s;if(!i._points.getCoordinate(s).equals(i._points.getCoordinate(o)))return i._points.getCoordinate(s).compareTo(i._points.getCoordinate(o))>0&&Ht.reverse(i._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?It.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return W.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var i=this._points.copy();Ht.reverse(i);var s=this.getFactory().createLineString(i);return s},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],o=s,a=0,u=0;a<this._points.size()&&u<o._points.size();){var l=i._points.getCoordinate(a).compareTo(o._points.getCoordinate(u));if(l!==0)return l;a++,u++}return a<this._points.size()?1:u<o._points.size()?-1:0}else if(arguments.length===2){var c=arguments[0],h=arguments[1],d=c;return h.compare(this._points,d._points)}},t.prototype.apply=function(){var i=this;if(nt(arguments[0],En))for(var s=arguments[0],o=0;o<this._points.size();o++)s.filter(i._points.getCoordinate(o));else if(nt(arguments[0],Mr)){var a=arguments[0];if(this._points.size()===0)return null;for(var u=0;u<this._points.size()&&(a.filter(i._points,u),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(nt(arguments[0],Hr)){var l=arguments[0];l.filter(this)}else if(nt(arguments[0],Jn)){var c=arguments[0];c.filter(this)}},t.prototype.getBoundary=function(){return new pr(this).getBoundary()},t.prototype.isEquivalentClass=function(i){return i instanceof t},t.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._points=this._points.clone(),i},t.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new zt("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},t.prototype.isCoordinate=function(i){for(var s=this,o=0;o<this._points.size();o++)if(s._points.getCoordinate(o).equals(i))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},t.prototype.interfaces_=function(){return[Ua]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,e),t}(rt),Ga=function(){};Ga.prototype.interfaces_=function(){return[]},Ga.prototype.getClass=function(){return Ga};var qe=function(n){function t(r,i){n.call(this,i),this._coordinates=r||null,this.init(this._coordinates)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new j;var i=new j;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},t.prototype.getSortIndex=function(){return n.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return It.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],s=i;return this.getCoordinate().compareTo(s.getCoordinate())}else if(arguments.length===2){var o=arguments[0],a=arguments[1],u=o;return a.compare(this._coordinates,u._coordinates)}},t.prototype.apply=function(){if(nt(arguments[0],En)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(nt(arguments[0],Mr)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(nt(arguments[0],Hr)){var o=arguments[0];o.filter(this)}else if(nt(arguments[0],Jn)){var a=arguments[0];a.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),ct.isTrue(i.size()<=1),this._coordinates=i},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[Ga]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,e),t}(rt),_i=function(){};_i.prototype.interfaces_=function(){return[]},_i.prototype.getClass=function(){return _i};var te=function(n){function t(r,i,s){if(n.call(this,s),this._shell=null,this._holes=null,r===null&&(r=this.getFactory().createLinearRing()),i===null&&(i=[]),n.hasNullElements(i))throw new zt("holes must not contain null elements");if(r.isEmpty()&&n.hasNonEmptyElements(i))throw new zt("shell is empty but holes are not");this._shell=r,this._holes=i}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return n.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var s=new Array(this.getNumPoints()).fill(null),o=-1,a=this._shell.getCoordinates(),u=0;u<a.length;u++)o++,s[o]=a[u];for(var l=0;l<this._holes.length;l++)for(var c=i._holes[l].getCoordinates(),h=0;h<c.length;h++)o++,s[o]=c[h];return s},t.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(W.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)s-=Math.abs(W.signedArea(i._holes[o].getCoordinateSequence()));return s},t.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),s=this.getEnvelopeInternal(),o=0;o<5;o++){var a=i.getX(o);if(!(a===s.getMinX()||a===s.getMaxX()))return!1;var u=i.getY(o);if(!(u===s.getMinY()||u===s.getMaxY()))return!1}for(var l=i.getX(0),c=i.getY(0),h=1;h<=4;h++){var d=i.getX(h),g=i.getY(h),y=d!==l,C=g!==c;if(y===C)return!1;l=d,c=g}return!0},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s,u=this._shell,l=a._shell;if(!u.equalsExact(l,o)||this._holes.length!==a._holes.length)return!1;for(var c=0;c<this._holes.length;c++)if(!i._holes[c].equalsExact(a._holes[c],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var s=0;s<this._holes.length;s++)i.normalize(i._holes[s],!1);qi.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];if(o.isEmpty())return null;var u=new Array(o.getCoordinates().length-1).fill(null);ce.arraycopy(o.getCoordinates(),0,u,0,u.length);var l=dt.minCoordinate(o.getCoordinates());dt.scroll(u,l),ce.arraycopy(u,0,o.getCoordinates(),0,u.length),o.getCoordinates()[u.length]=u[0],W.isCCW(o.getCoordinates())===a&&dt.reverse(o.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var i=this,s=0;s+=this._shell.getLength();for(var o=0;o<this._holes.length;o++)s+=i._holes[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=this._shell.getNumPoints(),o=0;o<this._holes.length;o++)s+=i._holes[o].getNumPoints();return s},t.prototype.reverse=function(){var i=this,s=this.copy();s._shell=this._shell.copy().reverse(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].copy().reverse();return s},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=this._shell,a=s._shell;return o.compareToSameClass(a)}else if(arguments.length===2){var u=arguments[0],l=arguments[1],c=u,h=this._shell,d=c._shell,g=h.compareToSameClass(d,l);if(g!==0)return g;for(var y=this.getNumInteriorRing(),C=c.getNumInteriorRing(),P=0;P<y&&P<C;){var T=i.getInteriorRingN(P),v=c.getInteriorRingN(P),w=T.compareToSameClass(v,l);if(w!==0)return w;P++}return P<y?1:P<C?-1:0}},t.prototype.apply=function(i){var s=this;if(nt(i,En)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)s._holes[o].apply(i)}else if(nt(i,Mr)){if(this._shell.apply(i),!i.isDone())for(var a=0;a<this._holes.length&&(s._holes[a].apply(i),!i.isDone());a++);i.isGeometryChanged()&&this.geometryChanged()}else if(nt(i,Hr))i.filter(this);else if(nt(i,Jn)){i.filter(this),this._shell.apply(i);for(var u=0;u<this._holes.length;u++)s._holes[u].apply(i)}},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var s=new Array(this._holes.length+1).fill(null);s[0]=this._shell;for(var o=0;o<this._holes.length;o++)s[o+1]=i._holes[o];return s.length<=1?this.getFactory().createLinearRing(s[0].getCoordinateSequence()):this.getFactory().createMultiLineString(s)},t.prototype.clone=function(){var i=this,s=n.prototype.clone.call(this);s._shell=this._shell.clone(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].clone();return s},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var i=this,s=this._shell.copy(),o=new Array(this._holes.length).fill(null),a=0;a<o.length;a++)o[a]=i._holes[a].copy();return new t(s,o,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(i){return this._holes[i]},t.prototype.interfaces_=function(){return[_i]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,e),t}(rt),bo=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return rt.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return n.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return It.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[Ga]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,e),t}(Ce),Sn=function(n){function t(r,i){r instanceof D&&i instanceof pt&&(r=i.getCoordinateSequenceFactory().create(r)),n.call(this,r,i),this.validateConstruction()}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return rt.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return It.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:n.prototype.isClosed.call(this)},t.prototype.reverse=function(){var i=this._points.copy();Ht.reverse(i);var s=this.getFactory().createLinearRing(i);return s},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!n.prototype.isClosed.call(this))throw new zt("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new zt("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t}(qt),Cn=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return rt.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createMultiPolygon(o)},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new U,o=0;o<this._geometries.length;o++)for(var a=i._geometries[o],u=a.getBoundary(),l=0;l<u.getNumGeometries();l++)s.add(u.getGeometryN(l));var c=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(c))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[_i]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,e),t}(Ce),mr=function(t){this._factory=t||null,this._isUserDataCopied=!1},zu={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};mr.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},mr.prototype.edit=function(t,e){if(t===null)return null;var r=this.editInternal(t,e);return this._isUserDataCopied&&r.setUserData(t.getUserData()),r},mr.prototype.editInternal=function(t,e){return this._factory===null&&(this._factory=t.getFactory()),t instanceof Ce?this.editGeometryCollection(t,e):t instanceof te?this.editPolygon(t,e):t instanceof qe?e.edit(t,this._factory):t instanceof qt?e.edit(t,this._factory):(ct.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},mr.prototype.editGeometryCollection=function(t,e){for(var r=this,i=e.edit(t,this._factory),s=new U,o=0;o<i.getNumGeometries();o++){var a=r.edit(i.getGeometryN(o),e);a===null||a.isEmpty()||s.add(a)}return i.getClass()===bo?this._factory.createMultiPoint(s.toArray([])):i.getClass()===Xi?this._factory.createMultiLineString(s.toArray([])):i.getClass()===Cn?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},mr.prototype.editPolygon=function(t,e){var r=this,i=e.edit(t,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),e);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var o=new U,a=0;a<i.getNumInteriorRing();a++){var u=r.edit(i.getInteriorRingN(a),e);u===null||u.isEmpty()||o.add(u)}return this._factory.createPolygon(s,o.toArray([]))},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr},mr.GeometryEditorOperation=function(){},zu.NoOpGeometryOperation.get=function(){return Wa},zu.CoordinateOperation.get=function(){return qa},zu.CoordinateSequenceOperation.get=function(){return Xa},Object.defineProperties(mr,zu);var Wa=function(){};Wa.prototype.edit=function(t,e){return t},Wa.prototype.interfaces_=function(){return[mr.GeometryEditorOperation]},Wa.prototype.getClass=function(){return Wa};var qa=function(){};qa.prototype.edit=function(t,e){var r=this.editCoordinates(t.getCoordinates(),t);return r===null?t:t instanceof Sn?e.createLinearRing(r):t instanceof qt?e.createLineString(r):t instanceof qe?r.length>0?e.createPoint(r[0]):e.createPoint():t},qa.prototype.interfaces_=function(){return[mr.GeometryEditorOperation]},qa.prototype.getClass=function(){return qa};var Xa=function(){};Xa.prototype.edit=function(t,e){return t instanceof Sn?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof qt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof qe?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},Xa.prototype.interfaces_=function(){return[mr.GeometryEditorOperation]},Xa.prototype.getClass=function(){return Xa};var Yt=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var r=0;r<e;r++)t._coordinates[r]=new D}else if(nt(arguments[0],_t)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var s=0;s<this._coordinates.length;s++)t._coordinates[s]=i.getCoordinateCopy(s)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,o===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var u=arguments[0],l=arguments[1];this._coordinates=new Array(u).fill(null),this._dimension=l;for(var c=0;c<u;c++)t._coordinates[c]=new D}}},Pd={serialVersionUID:{configurable:!0}};Yt.prototype.setOrdinate=function(t,e,r){switch(e){case _t.X:this._coordinates[t].x=r;break;case _t.Y:this._coordinates[t].y=r;break;case _t.Z:this._coordinates[t].z=r;break;default:throw new zt("invalid ordinateIndex")}},Yt.prototype.size=function(){return this._coordinates.length},Yt.prototype.getOrdinate=function(t,e){switch(e){case _t.X:return this._coordinates[t].x;case _t.Y:return this._coordinates[t].y;case _t.Z:return this._coordinates[t].z}return ot.NaN},Yt.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var e=arguments[0],r=arguments[1];r.x=this._coordinates[e].x,r.y=this._coordinates[e].y,r.z=this._coordinates[e].z}},Yt.prototype.getCoordinateCopy=function(t){return new D(this._coordinates[t])},Yt.prototype.getDimension=function(){return this._dimension},Yt.prototype.getX=function(t){return this._coordinates[t].x},Yt.prototype.clone=function(){for(var t=this,e=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)e[r]=t._coordinates[r].clone();return new Yt(e,this._dimension)},Yt.prototype.expandEnvelope=function(t){for(var e=this,r=0;r<this._coordinates.length;r++)t.expandToInclude(e._coordinates[r]);return t},Yt.prototype.copy=function(){for(var t=this,e=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)e[r]=t._coordinates[r].copy();return new Yt(e,this._dimension)},Yt.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var e=new Ur(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var r=1;r<this._coordinates.length;r++)e.append(", "),e.append(t._coordinates[r]);return e.append(")"),e.toString()}else return"()"},Yt.prototype.getY=function(t){return this._coordinates[t].y},Yt.prototype.toCoordinateArray=function(){return this._coordinates},Yt.prototype.interfaces_=function(){return[_t,fr]},Yt.prototype.getClass=function(){return Yt},Pd.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(Yt,Pd);var In=function(){},ic={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};In.prototype.readResolve=function(){return In.instance()},In.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new Yt(t)}else if(nt(arguments[0],_t)){var e=arguments[0];return new Yt(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new Yt(r):new Yt(r,i)}},In.prototype.interfaces_=function(){return[mo,fr]},In.prototype.getClass=function(){return In},In.instance=function(){return In.instanceObject},ic.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},ic.instanceObject.get=function(){return new In},Object.defineProperties(In,ic);var bd=function(n){function t(){n.call(this),this.map_=new Map}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(r){return this.map_.get(r)||null},t.prototype.put=function(r,i){return this.map_.set(r,i),i},t.prototype.values=function(){for(var r=new U,i=this.map_.values(),s=i.next();!s.done;)r.add(s.value),s=i.next();return r},t.prototype.entrySet=function(){var r=new ec;return this.map_.entries().forEach(function(i){return r.add(i)}),r},t.prototype.size=function(){return this.map_.size()},t}(Ts),Pt=function n(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=n.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Yr){var t=arguments[0];this._modelType=t,t===n.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this._modelType=n.FIXED,this.setScale(e)}else if(arguments[0]instanceof n){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},sc={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Pt.prototype.equals=function(t){if(!(t instanceof Pt))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},Pt.prototype.compareTo=function(t){var e=t,r=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new Gr(r).compareTo(new Gr(i))},Pt.prototype.getScale=function(){return this._scale},Pt.prototype.isFloating=function(){return this._modelType===Pt.FLOATING||this._modelType===Pt.FLOATING_SINGLE},Pt.prototype.getType=function(){return this._modelType},Pt.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Pt.FLOATING?t="Floating":this._modelType===Pt.FLOATING_SINGLE?t="Floating-Single":this._modelType===Pt.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},Pt.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(ot.isNaN(t))return t;if(this._modelType===Pt.FLOATING_SINGLE){var e=t;return e}return this._modelType===Pt.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof D){var r=arguments[0];if(this._modelType===Pt.FLOATING)return null;r.x=this.makePrecise(r.x),r.y=this.makePrecise(r.y)}},Pt.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Pt.FLOATING?t=16:this._modelType===Pt.FLOATING_SINGLE?t=6:this._modelType===Pt.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},Pt.prototype.setScale=function(t){this._scale=Math.abs(t)},Pt.prototype.interfaces_=function(){return[fr,hr]},Pt.prototype.getClass=function(){return Pt},Pt.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},sc.serialVersionUID.get=function(){return 7777263578777804e3},sc.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Pt,sc);var Yr=function n(t){this._name=t||null,n.nameToTypeMap.put(t,this)},oc={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Yr.prototype.readResolve=function(){return Yr.nameToTypeMap.get(this._name)},Yr.prototype.toString=function(){return this._name},Yr.prototype.interfaces_=function(){return[fr]},Yr.prototype.getClass=function(){return Yr},oc.serialVersionUID.get=function(){return-552860263173159e4},oc.nameToTypeMap.get=function(){return new bd},Object.defineProperties(Yr,oc),Pt.Type=Yr,Pt.FIXED=new Yr("FIXED"),Pt.FLOATING=new Yr("FLOATING"),Pt.FLOATING_SINGLE=new Yr("FLOATING SINGLE");var pt=function n(){this._precisionModel=new Pt,this._SRID=0,this._coordinateSequenceFactory=n.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?nt(arguments[0],mo)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Pt&&(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]))},Nd={serialVersionUID:{configurable:!0}};pt.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new D(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new D(t.getMinX(),t.getMinY()),new D(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new D(t.getMinX(),t.getMinY()),new D(t.getMinX(),t.getMaxY()),new D(t.getMaxX(),t.getMaxY()),new D(t.getMaxX(),t.getMinY()),new D(t.getMinX(),t.getMinY())]),null)},pt.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new qt(this.getCoordinateSequenceFactory().create(t),this);if(nt(t,_t))return new qt(t,this)}else return new qt(this.getCoordinateSequenceFactory().create([]),this)},pt.prototype.createMultiLineString=function(){if(arguments.length===0)return new Xi(null,this);if(arguments.length===1){var t=arguments[0];return new Xi(t,this)}},pt.prototype.buildGeometry=function(t){for(var e=null,r=!1,i=!1,s=t.iterator();s.hasNext();){var o=s.next(),a=o.getClass();e===null&&(e=a),a!==e&&(r=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(e===null)return this.createGeometryCollection();if(r||i)return this.createGeometryCollection(pt.toGeometryArray(t));var u=t.iterator().next(),l=t.size()>1;if(l){if(u instanceof te)return this.createMultiPolygon(pt.toPolygonArray(t));if(u instanceof qt)return this.createMultiLineString(pt.toLineStringArray(t));if(u instanceof qe)return this.createMultiPoint(pt.toPointArray(t));ct.shouldNeverReachHere("Unhandled class: "+u.getClass().getName())}return u},pt.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},pt.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(nt(arguments[0],_t)){var e=arguments[0];return new qe(e,this)}}},pt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},pt.prototype.createPolygon=function(){if(arguments.length===0)return new te(null,null,this);if(arguments.length===1){if(nt(arguments[0],_t)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof Sn){var r=arguments[0];return this.createPolygon(r,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new te(i,s,this)}},pt.prototype.getSRID=function(){return this._SRID},pt.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Ce(null,this);if(arguments.length===1){var t=arguments[0];return new Ce(t,this)}},pt.prototype.createGeometry=function(t){var e=new mr(this);return e.edit(t,{edit:function(){if(arguments.length===2){var r=arguments[0];return this._coordinateSequenceFactory.create(r)}}})},pt.prototype.getPrecisionModel=function(){return this._precisionModel},pt.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(nt(arguments[0],_t)){var e=arguments[0];return new Sn(e,this)}}},pt.prototype.createMultiPolygon=function(){if(arguments.length===0)return new Cn(null,this);if(arguments.length===1){var t=arguments[0];return new Cn(t,this)}},pt.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new bo(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new bo(e,this)}else if(arguments[0]instanceof Array){var r=arguments[0];return this.createMultiPoint(r!==null?this.getCoordinateSequenceFactory().create(r):null)}else if(nt(arguments[0],_t)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(i.size()).fill(null),o=0;o<i.size();o++){var a=t.getCoordinateSequenceFactory().create(1,i.getDimension());Ht.copy(i,o,a,0,1),s[o]=t.createPoint(a)}return this.createMultiPoint(s)}}},pt.prototype.interfaces_=function(){return[fr]},pt.prototype.getClass=function(){return pt},pt.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.getDefaultCoordinateSequenceFactory=function(){return In.instance()},pt.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},pt.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},Nd.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(pt,Nd);var yy=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],Uu=function(t){this.geometryFactory=t||new pt};Uu.prototype.read=function(t){var e;typeof t=="string"?e=JSON.parse(t):e=t;var r=e.type;if(!Jr[r])throw new Error("Unknown GeoJSON type: "+e.type);return yy.indexOf(r)!==-1?Jr[r].apply(this,[e.coordinates]):r==="GeometryCollection"?Jr[r].apply(this,[e.geometries]):Jr[r].apply(this,[e])},Uu.prototype.write=function(t){var e=t.getGeometryType();if(!Kn[e])throw new Error("Geometry is not supported");return Kn[e].apply(this,[t])};var Jr={Feature:function(n){var t={};for(var e in n)t[e]=n[e];if(n.geometry){var r=n.geometry.type;if(!Jr[r])throw new Error("Unknown GeoJSON type: "+n.type);t.geometry=this.read(n.geometry)}return n.bbox&&(t.bbox=Jr.bbox.apply(this,[n.bbox])),t},FeatureCollection:function(n){var t=this,e={};if(n.features){e.features=[];for(var r=0;r<n.features.length;++r)e.features.push(t.read(n.features[r]))}return n.bbox&&(e.bbox=this.parse.bbox.apply(this,[n.bbox])),e},coordinates:function(n){for(var t=[],e=0;e<n.length;++e){var r=n[e];t.push(new D(r[0],r[1]))}return t},bbox:function(n){return this.geometryFactory.createLinearRing([new D(n[0],n[1]),new D(n[2],n[1]),new D(n[2],n[3]),new D(n[0],n[3]),new D(n[0],n[1])])},Point:function(n){var t=new D(n[0],n[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(n){for(var t=this,e=[],r=0;r<n.length;++r)e.push(Jr.Point.apply(t,[n[r]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(n){var t=Jr.coordinates.apply(this,[n]);return this.geometryFactory.createLineString(t)},MultiLineString:function(n){for(var t=this,e=[],r=0;r<n.length;++r)e.push(Jr.LineString.apply(t,[n[r]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(n){for(var t=this,e=Jr.coordinates.apply(this,[n[0]]),r=this.geometryFactory.createLinearRing(e),i=[],s=1;s<n.length;++s){var o=n[s],a=Jr.coordinates.apply(t,[o]),u=t.geometryFactory.createLinearRing(a);i.push(u)}return this.geometryFactory.createPolygon(r,i)},MultiPolygon:function(n){for(var t=this,e=[],r=0;r<n.length;++r){var i=n[r];e.push(Jr.Polygon.apply(t,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(n){for(var t=this,e=[],r=0;r<n.length;++r){var i=n[r];e.push(t.read(i))}return this.geometryFactory.createGeometryCollection(e)}},Kn={coordinate:function(n){return[n.x,n.y]},Point:function(n){var t=Kn.coordinate.apply(this,[n.getCoordinate()]);return{type:"Point",coordinates:t}},MultiPoint:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Kn.Point.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(n){for(var t=this,e=[],r=n.getCoordinates(),i=0;i<r.length;++i){var s=r[i];e.push(Kn.coordinate.apply(t,[s]))}return{type:"LineString",coordinates:e}},MultiLineString:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Kn.LineString.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(n){var t=this,e=[],r=Kn.LineString.apply(this,[n._shell]);e.push(r.coordinates);for(var i=0;i<n._holes.length;++i){var s=n._holes[i],o=Kn.LineString.apply(t,[s]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Kn.Polygon.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=i.getGeometryType();e.push(Kn[s].apply(t,[i]))}return{type:"GeometryCollection",geometries:e}}},ac=function(t){this.geometryFactory=t||new pt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Uu(this.geometryFactory)};ac.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===Pt.FIXED&&this.reducePrecision(e),e},ac.prototype.reducePrecision=function(t){var e=this,r,i;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(r=0,i=t.points.length;r<i;r++)e.precisionModel.makePrecise(t.points[r]);else if(t.geometries)for(r=0,i=t.geometries.length;r<i;r++)e.reducePrecision(t.geometries[r])};var Td=function(){this.parser=new Uu(this.geometryFactory)};Td.prototype.write=function(t){return this.parser.write(t)};var z=function(){},Gu={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};z.prototype.interfaces_=function(){return[]},z.prototype.getClass=function(){return z},z.opposite=function(t){return t===z.LEFT?z.RIGHT:t===z.RIGHT?z.LEFT:t},Gu.ON.get=function(){return 0},Gu.LEFT.get=function(){return 1},Gu.RIGHT.get=function(){return 2},Object.defineProperties(z,Gu);function Wu(n){this.message=n||""}Wu.prototype=new Error,Wu.prototype.name="EmptyStackException";function Br(){this.array_=[]}Br.prototype=new xr,Br.prototype.add=function(n){return this.array_.push(n),!0},Br.prototype.get=function(n){if(n<0||n>=this.size())throw new Error;return this.array_[n]},Br.prototype.push=function(n){return this.array_.push(n),n},Br.prototype.pop=function(n){if(this.array_.length===0)throw new Wu;return this.array_.pop()},Br.prototype.peek=function(){if(this.array_.length===0)throw new Wu;return this.array_[this.array_.length-1]},Br.prototype.empty=function(){return this.array_.length===0},Br.prototype.isEmpty=function(){return this.empty()},Br.prototype.search=function(n){return this.array_.indexOf(n)},Br.prototype.size=function(){return this.array_.length},Br.prototype.toArray=function(){for(var n=this,t=[],e=0,r=this.array_.length;e<r;e++)t.push(n.array_[e]);return t};var jr=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};jr.prototype.getCoordinate=function(){return this._minCoord},jr.prototype.getRightmostSide=function(t,e){var r=this.getRightmostSideOfSegment(t,e);return r<0&&(r=this.getRightmostSideOfSegment(t,e-1)),r<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),r},jr.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();ct.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],r=t[this._minIndex+1],i=W.computeOrientation(this._minCoord,r,e),s=!1;(e.y<this._minCoord.y&&r.y<this._minCoord.y&&i===W.COUNTERCLOCKWISE||e.y>this._minCoord.y&&r.y>this._minCoord.y&&i===W.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},jr.prototype.getRightmostSideOfSegment=function(t,e){var r=t.getEdge(),i=r.getCoordinates();if(e<0||e+1>=i.length||i[e].y===i[e+1].y)return-1;var s=z.LEFT;return i[e].y<i[e+1].y&&(s=z.RIGHT),s},jr.prototype.getEdge=function(){return this._orientedDe},jr.prototype.checkForRightmostCoordinate=function(t){for(var e=this,r=t.getEdge().getCoordinates(),i=0;i<r.length-1;i++)(e._minCoord===null||r[i].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=i,e._minCoord=r[i])},jr.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},jr.prototype.findEdge=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next();i.isForward()&&e.checkForRightmostCoordinate(i)}ct.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var s=this.getRightmostSide(this._minDe,this._minIndex);s===z.LEFT&&(this._orientedDe=this._minDe.getSym())},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr};var Qn=function(n){function t(e,r){n.call(this,t.msgWithCoord(e,r)),this.pt=r?new D(r):null,this.name="TopologyException"}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(r,i){return i?r:r+" [ "+i+" ]"},t}(Yn),qu=function(){this.array_=[]};qu.prototype.addLast=function(t){this.array_.push(t)},qu.prototype.removeFirst=function(){return this.array_.shift()},qu.prototype.isEmpty=function(){return this.array_.length===0};var Ie=function(){this._finder=null,this._dirEdgeList=new U,this._nodes=new U,this._rightMostCoord=null,this._env=null,this._finder=new jr};Ie.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},Ie.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Ie.prototype.computeNodeDepth=function(t){for(var e=this,r=null,i=t.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){r=s;break}}if(r===null)throw new Qn("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(r);for(var o=t.getEdges().iterator();o.hasNext();){var a=o.next();a.setVisited(!0),e.copySymDepths(a)}},Ie.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(z.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Ie.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Ie.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(z.RIGHT)>=1&&e.getDepth(z.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Ie.prototype.computeDepths=function(t){var e=this,r=new ec,i=new qu,s=t.getNode();for(i.addLast(s),r.add(s),t.setVisited(!0);!i.isEmpty();){var o=i.removeFirst();r.add(o),e.computeNodeDepth(o);for(var a=o.getEdges().iterator();a.hasNext();){var u=a.next(),l=u.getSym();if(!l.isVisited()){var c=l.getNode();r.contains(c)||(i.addLast(c),r.add(c))}}}},Ie.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Ie.prototype.getEnvelope=function(){if(this._env===null){for(var t=new j,e=this._dirEdgeList.iterator();e.hasNext();)for(var r=e.next(),i=r.getEdge().getCoordinates(),s=0;s<i.length-1;s++)t.expandToInclude(i[s]);this._env=t}return this._env},Ie.prototype.addReachable=function(t){var e=this,r=new Br;for(r.add(t);!r.empty();){var i=r.pop();e.add(i,r)}},Ie.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(z.LEFT,t.getDepth(z.RIGHT)),e.setDepth(z.RIGHT,t.getDepth(z.LEFT))},Ie.prototype.add=function(t,e){var r=this;t.setVisited(!0),this._nodes.add(t);for(var i=t.getEdges().iterator();i.hasNext();){var s=i.next();r._dirEdgeList.add(s);var o=s.getSym(),a=o.getNode();a.isVisited()||e.push(a)}},Ie.prototype.getNodes=function(){return this._nodes},Ie.prototype.getDirectedEdges=function(){return this._dirEdgeList},Ie.prototype.interfaces_=function(){return[hr]},Ie.prototype.getClass=function(){return Ie};var At=function n(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var r=arguments[0];this.init(1),this.location[z.ON]=r}else if(arguments[0]instanceof n){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)t.location[s]=i.location[s]}}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];this.init(3),this.location[z.ON]=o,this.location[z.LEFT]=a,this.location[z.RIGHT]=u}};At.prototype.setAllLocations=function(t){for(var e=this,r=0;r<this.location.length;r++)e.location[r]=t},At.prototype.isNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]!==R.NONE)return!1;return!0},At.prototype.setAllLocationsIfNull=function(t){for(var e=this,r=0;r<this.location.length;r++)e.location[r]===R.NONE&&(e.location[r]=t)},At.prototype.isLine=function(){return this.location.length===1},At.prototype.merge=function(t){var e=this;if(t.location.length>this.location.length){var r=new Array(3).fill(null);r[z.ON]=this.location[z.ON],r[z.LEFT]=R.NONE,r[z.RIGHT]=R.NONE,this.location=r}for(var i=0;i<this.location.length;i++)e.location[i]===R.NONE&&i<t.location.length&&(e.location[i]=t.location[i])},At.prototype.getLocations=function(){return this.location},At.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[z.LEFT];this.location[z.LEFT]=this.location[z.RIGHT],this.location[z.RIGHT]=t},At.prototype.toString=function(){var t=new Ur;return this.location.length>1&&t.append(R.toLocationSymbol(this.location[z.LEFT])),t.append(R.toLocationSymbol(this.location[z.ON])),this.location.length>1&&t.append(R.toLocationSymbol(this.location[z.RIGHT])),t.toString()},At.prototype.setLocations=function(t,e,r){this.location[z.ON]=t,this.location[z.LEFT]=e,this.location[z.RIGHT]=r},At.prototype.get=function(t){return t<this.location.length?this.location[t]:R.NONE},At.prototype.isArea=function(){return this.location.length>1},At.prototype.isAnyNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]===R.NONE)return!0;return!1},At.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(z.ON,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.location[e]=r}},At.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(R.NONE)},At.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},At.prototype.allPositionsEqual=function(t){for(var e=this,r=0;r<this.location.length;r++)if(e.location[r]!==t)return!1;return!0},At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At};var Ot=function n(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new At(t),this.elt[1]=new At(t)}else if(arguments[0]instanceof n){var e=arguments[0];this.elt[0]=new At(e.elt[0]),this.elt[1]=new At(e.elt[1])}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.elt[0]=new At(R.NONE),this.elt[1]=new At(R.NONE),this.elt[r].setLocation(i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this.elt[0]=new At(s,o,a),this.elt[1]=new At(s,o,a)}else if(arguments.length===4){var u=arguments[0],l=arguments[1],c=arguments[2],h=arguments[3];this.elt[0]=new At(R.NONE,R.NONE,R.NONE),this.elt[1]=new At(R.NONE,R.NONE,R.NONE),this.elt[u].setLocations(l,c,h)}};Ot.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Ot.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Ot.prototype.isNull=function(t){return this.elt[t].isNull()},Ot.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.elt[e].setAllLocationsIfNull(r)}},Ot.prototype.isLine=function(t){return this.elt[t].isLine()},Ot.prototype.merge=function(t){for(var e=this,r=0;r<2;r++)e.elt[r]===null&&t.elt[r]!==null?e.elt[r]=new At(t.elt[r]):e.elt[r].merge(t.elt[r])},Ot.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Ot.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(z.ON)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return this.elt[e].get(r)}},Ot.prototype.toString=function(){var t=new Ur;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Ot.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},Ot.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Ot.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(z.ON,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this.elt[r].setLocation(i,s)}},Ot.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Ot.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Ot.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new At(this.elt[t].location[0]))},Ot.prototype.interfaces_=function(){return[]},Ot.prototype.getClass=function(){return Ot},Ot.toLineLabel=function(t){for(var e=new Ot(R.NONE),r=0;r<2;r++)e.setLocation(r,t.getLocation(r));return e};var jt=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new U,this._pts=new U,this._label=new Ot(R.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new U,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};jt.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var e=new Array(this._pts.size()).fill(null),r=0;r<this._pts.size();r++)e[r]=t._pts.get(r);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=W.isCCW(this._ring.getCoordinates())},jt.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},jt.prototype.computePoints=function(t){var e=this;this._startDe=t;var r=t,i=!0;do{if(r===null)throw new Qn("Found null DirectedEdge");if(r.getEdgeRing()===e)throw new Qn("Directed Edge visited twice during ring-building at "+r.getCoordinate());e._edges.add(r);var s=r.getLabel();ct.isTrue(s.isArea()),e.mergeLabel(s),e.addPoints(r.getEdge(),r.isForward(),i),i=!1,e.setEdgeRing(r,e),r=e.getNext(r)}while(r!==this._startDe)},jt.prototype.getLinearRing=function(){return this._ring},jt.prototype.getCoordinate=function(t){return this._pts.get(t)},jt.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var r=e.getNode(),i=r.getEdges().getOutgoingDegree(t);i>t._maxNodeDegree&&(t._maxNodeDegree=i),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},jt.prototype.addPoints=function(t,e,r){var i=this,s=t.getCoordinates();if(e){var o=1;r&&(o=0);for(var a=o;a<s.length;a++)i._pts.add(s[a])}else{var u=s.length-2;r&&(u=s.length-1);for(var l=u;l>=0;l--)i._pts.add(s[l])}},jt.prototype.isHole=function(){return this._isHole},jt.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)},jt.prototype.containsPoint=function(t){var e=this.getLinearRing(),r=e.getEnvelopeInternal();if(!r.contains(t)||!W.isPointInRing(t,e.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(t))return!1}return!0},jt.prototype.addHole=function(t){this._holes.add(t)},jt.prototype.isShell=function(){return this._shell===null},jt.prototype.getLabel=function(){return this._label},jt.prototype.getEdges=function(){return this._edges},jt.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},jt.prototype.getShell=function(){return this._shell},jt.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=e.getLocation(r,z.RIGHT);if(i===R.NONE)return null;if(this._label.getLocation(r)===R.NONE)return this._label.setLocation(r,i),null}},jt.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)},jt.prototype.toPolygon=function(t){for(var e=this,r=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)r[i]=e._holes.get(i).getLinearRing();var s=t.createPolygon(this.getLinearRing(),r);return s},jt.prototype.interfaces_=function(){return[]},jt.prototype.getClass=function(){return jt};var _y=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(r,i){r.setMinEdgeRing(i)},t.prototype.getNext=function(r){return r.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(jt),wy=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var r=this,i=new U,s=this._startDe;do{if(s.getMinEdgeRing()===null){var o=new _y(s,r._geometryFactory);i.add(o)}s=s.getNext()}while(s!==this._startDe);return i},t.prototype.setEdgeRing=function(r,i){r.setEdgeRing(i)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var r=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(r),i=i.getNext()}while(i!==this._startDe)},t.prototype.getNext=function(r){return r.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(jt),nr=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._label=t}}};nr.prototype.setVisited=function(t){this._isVisited=t},nr.prototype.setInResult=function(t){this._isInResult=t},nr.prototype.isCovered=function(){return this._isCovered},nr.prototype.isCoveredSet=function(){return this._isCoveredSet},nr.prototype.setLabel=function(t){this._label=t},nr.prototype.getLabel=function(){return this._label},nr.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},nr.prototype.updateIM=function(t){ct.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},nr.prototype.isInResult=function(){return this._isInResult},nr.prototype.isVisited=function(){return this._isVisited},nr.prototype.interfaces_=function(){return[]},nr.prototype.getClass=function(){return nr};var Xu=function(n){function t(){n.call(this),this._coord=null,this._edges=null;var e=arguments[0],r=arguments[1];this._coord=e,this._edges=r,this._label=new Ot(0,R.NONE)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var r=this.getEdges().getEdges().iterator();r.hasNext();){var i=r.next();if(i.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(r){r.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(r){},t.prototype.computeMergedLocation=function(r,i){var s=R.NONE;if(s=this._label.getLocation(i),!r.isNull(i)){var o=r.getLocation(i);s!==R.BOUNDARY&&(s=o)}return s},t.prototype.setLabel=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];this._label===null?this._label=new Ot(r,i):this._label.setLocation(r,i)}else return n.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var r=this;if(arguments[0]instanceof t){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Ot)for(var s=arguments[0],o=0;o<2;o++){var a=r.computeMergedLocation(s,o),u=r._label.getLocation(o);u===R.NONE&&r._label.setLocation(o,a)}},t.prototype.add=function(r){this._edges.insert(r),r.setNode(this)},t.prototype.setLabelBoundary=function(r){if(this._label===null)return null;var i=R.NONE;this._label!==null&&(i=this._label.getLocation(r));var s=null;switch(i){case R.BOUNDARY:s=R.INTERIOR;break;case R.INTERIOR:s=R.BOUNDARY;break;default:s=R.BOUNDARY;break}this._label.setLocation(r,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(nr),Zr=function(){this.nodeMap=new ye,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Zr.prototype.find=function(t){return this.nodeMap.get(t)},Zr.prototype.addNode=function(){if(arguments[0]instanceof D){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof Xu){var r=arguments[0],i=this.nodeMap.get(r.getCoordinate());return i===null?(this.nodeMap.put(r.getCoordinate(),r),r):(i.mergeLabel(r),i)}},Zr.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},Zr.prototype.iterator=function(){return this.nodeMap.values().iterator()},Zr.prototype.values=function(){return this.nodeMap.values()},Zr.prototype.getBoundaryNodes=function(t){for(var e=new U,r=this.iterator();r.hasNext();){var i=r.next();i.getLabel().getLocation(t)===R.BOUNDARY&&e.add(i)}return e},Zr.prototype.add=function(t){var e=t.getCoordinate(),r=this.addNode(e);r.add(t)},Zr.prototype.interfaces_=function(){return[]},Zr.prototype.getClass=function(){return Zr};var Dt=function(){},Ha={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Dt.prototype.interfaces_=function(){return[]},Dt.prototype.getClass=function(){return Dt},Dt.isNorthern=function(t){return t===Dt.NE||t===Dt.NW},Dt.isOpposite=function(t,e){if(t===e)return!1;var r=(t-e+4)%4;return r===2},Dt.commonHalfPlane=function(t,e){if(t===e)return t;var r=(t-e+4)%4;if(r===2)return-1;var i=t<e?t:e,s=t>e?t:e;return i===0&&s===3?3:i},Dt.isInHalfPlane=function(t,e){return e===Dt.SE?t===Dt.SE||t===Dt.SW:t===e||t===e+1},Dt.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new zt("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Dt.NE:Dt.SE:e>=0?Dt.NW:Dt.SW}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var r=arguments[0],i=arguments[1];if(i.x===r.x&&i.y===r.y)throw new zt("Cannot compute the quadrant for two identical points "+r);return i.x>=r.x?i.y>=r.y?Dt.NE:Dt.SE:i.y>=r.y?Dt.NW:Dt.SW}},Ha.NE.get=function(){return 0},Ha.NW.get=function(){return 1},Ha.SW.get=function(){return 2},Ha.SE.get=function(){return 3},Object.defineProperties(Dt,Ha);var _e=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=null;this._edge=e,this.init(r,i),this._label=s}else if(arguments.length===4){var o=arguments[0],a=arguments[1],u=arguments[2],l=arguments[3];this._edge=o,this.init(a,u),this._label=l}};_e.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:W.computeOrientation(t._p0,t._p1,this._p1)},_e.prototype.getDy=function(){return this._dy},_e.prototype.getCoordinate=function(){return this._p0},_e.prototype.setNode=function(t){this._node=t},_e.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),r=this.getClass().getName(),i=r.lastIndexOf("."),s=r.substring(i+1);t.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},_e.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},_e.prototype.getDirectedCoordinate=function(){return this._p1},_e.prototype.getDx=function(){return this._dx},_e.prototype.getLabel=function(){return this._label},_e.prototype.getEdge=function(){return this._edge},_e.prototype.getQuadrant=function(){return this._quadrant},_e.prototype.getNode=function(){return this._node},_e.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),r=e.lastIndexOf("."),i=e.substring(r+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},_e.prototype.computeLabel=function(t){},_e.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Dt.quadrant(this._dx,this._dy),ct.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},_e.prototype.interfaces_=function(){return[hr]},_e.prototype.getClass=function(){return _e};var uc=function(n){function t(){var e=arguments[0],r=arguments[1];if(n.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=r,r)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(r){return this._depth[r]},t.prototype.setVisited=function(r){this._isVisited=r},t.prototype.computeDirectedLabel=function(){this._label=new Ot(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(r,i){if(this._depth[r]!==-999&&this._depth[r]!==i)throw new Qn("assigned depths do not match",this.getCoordinate());this._depth[r]=i},t.prototype.isInteriorAreaEdge=function(){for(var r=this,i=!0,s=0;s<2;s++)r._label.isArea(s)&&r._label.getLocation(s,z.LEFT)===R.INTERIOR&&r._label.getLocation(s,z.RIGHT)===R.INTERIOR||(i=!1);return i},t.prototype.setNextMin=function(r){this._nextMin=r},t.prototype.print=function(r){n.prototype.print.call(this,r),r.print(" "+this._depth[z.LEFT]+"/"+this._depth[z.RIGHT]),r.print(" ("+this.getDepthDelta()+")"),this._isInResult&&r.print(" inResult")},t.prototype.setMinEdgeRing=function(r){this._minEdgeRing=r},t.prototype.isLineEdge=function(){var r=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,R.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,R.EXTERIOR);return r&&i&&s},t.prototype.setEdgeRing=function(r){this._edgeRing=r},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var r=this._edge.getDepthDelta();return this._isForward||(r=-r),r},t.prototype.setInResult=function(r){this._isInResult=r},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(r){this.print(r),r.print(" "),this._isForward?this._edge.print(r):this._edge.printReverse(r)},t.prototype.setSym=function(r){this._sym=r},t.prototype.setVisitedEdge=function(r){this.setVisited(r),this._sym.setVisited(r)},t.prototype.setEdgeDepths=function(r,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var o=1;r===z.LEFT&&(o=-1);var a=z.opposite(r),u=s*o,l=i+u;this.setDepth(r,i),this.setDepth(a,l)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(r){this._next=r},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(r,i){return r===R.EXTERIOR&&i===R.INTERIOR?1:r===R.INTERIOR&&i===R.EXTERIOR?-1:0},t}(_e),No=function(){};No.prototype.createNode=function(t){return new Xu(t,null)},No.prototype.interfaces_=function(){return[]},No.prototype.getClass=function(){return No};var Wt=function(){if(this._edges=new U,this._nodes=null,this._edgeEndList=new U,arguments.length===0)this._nodes=new Zr(new No);else if(arguments.length===1){var t=arguments[0];this._nodes=new Zr(t)}};Wt.prototype.printEdges=function(t){var e=this;t.println("Edges:");for(var r=0;r<this._edges.size();r++){t.println("edge "+r+":");var i=e._edges.get(r);i.print(t),i.eiList.print(t)}},Wt.prototype.find=function(t){return this._nodes.find(t)},Wt.prototype.addNode=function(){if(arguments[0]instanceof Xu){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof D){var e=arguments[0];return this._nodes.addNode(e)}},Wt.prototype.getNodeIterator=function(){return this._nodes.iterator()},Wt.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},Wt.prototype.debugPrintln=function(t){ce.out.println(t)},Wt.prototype.isBoundaryNode=function(t,e){var r=this._nodes.find(e);if(r===null)return!1;var i=r.getLabel();return i!==null&&i.getLocation(t)===R.BOUNDARY},Wt.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},Wt.prototype.matchInSameDirection=function(t,e,r,i){return t.equals(r)?W.computeOrientation(t,e,i)===W.COLLINEAR&&Dt.quadrant(t,e)===Dt.quadrant(r,i):!1},Wt.prototype.getEdgeEnds=function(){return this._edgeEndList},Wt.prototype.debugPrint=function(t){ce.out.print(t)},Wt.prototype.getEdgeIterator=function(){return this._edges.iterator()},Wt.prototype.findEdgeInSameDirection=function(t,e){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(r.matchInSameDirection(t,e,o[0],o[1])||r.matchInSameDirection(t,e,o[o.length-1],o[o.length-2]))return s}return null},Wt.prototype.insertEdge=function(t){this._edges.add(t)},Wt.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var r=e.next();if(r.getEdge()===t)return r}return null},Wt.prototype.addEdges=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next();e._edges.add(i);var s=new uc(i,!0),o=new uc(i,!1);s.setSym(o),o.setSym(s),e.add(s),e.add(o)}},Wt.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Wt.prototype.getNodes=function(){return this._nodes.values()},Wt.prototype.findEdge=function(t,e){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(t.equals(o[0])&&e.equals(o[1]))return s}return null},Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var r=e.next();r.getEdges().linkResultDirectedEdges()}};var Xe=function(){this._geometryFactory=null,this._shellList=new U;var t=arguments[0];this._geometryFactory=t};Xe.prototype.sortShellsAndHoles=function(t,e,r){for(var i=t.iterator();i.hasNext();){var s=i.next();s.isHole()?r.add(s):e.add(s)}},Xe.prototype.computePolygons=function(t){for(var e=this,r=new U,i=t.iterator();i.hasNext();){var s=i.next(),o=s.toPolygon(e._geometryFactory);r.add(o)}return r},Xe.prototype.placeFreeHoles=function(t,e){for(var r=this,i=e.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var o=r.findEdgeRingContaining(s,t);if(o===null)throw new Qn("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(o)}}},Xe.prototype.buildMinimalEdgeRings=function(t,e,r){for(var i=this,s=new U,o=t.iterator();o.hasNext();){var a=o.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var u=a.buildMinimalRings(),l=i.findShell(u);l!==null?(i.placePolygonHoles(l,u),e.add(l)):r.addAll(u)}else s.add(a)}return s},Xe.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var r=e.next();if(r.containsPoint(t))return!0}return!1},Xe.prototype.buildMaximalEdgeRings=function(t){for(var e=this,r=new U,i=t.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var o=new wy(s,e._geometryFactory);r.add(o),o.setInResult()}}return r},Xe.prototype.placePolygonHoles=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next();i.isHole()&&i.setShell(t)}},Xe.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t},Xe.prototype.findEdgeRingContaining=function(t,e){for(var r=t.getLinearRing(),i=r.getEnvelopeInternal(),s=r.getCoordinateN(0),o=null,a=null,u=e.iterator();u.hasNext();){var l=u.next(),c=l.getLinearRing(),h=c.getEnvelopeInternal();o!==null&&(a=o.getLinearRing().getEnvelopeInternal());var d=!1;h.contains(i)&&W.isPointInRing(s,c.getCoordinates())&&(d=!0),d&&(o===null||a.contains(h))&&(o=l)}return o},Xe.prototype.findShell=function(t){for(var e=0,r=null,i=t.iterator();i.hasNext();){var s=i.next();s.isHole()||(r=s,e++)}return ct.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),r},Xe.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],r=arguments[1];Wt.linkResultDirectedEdges(r);var i=this.buildMaximalEdgeRings(e),s=new U,o=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(o,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var To=function(){};To.prototype.getBounds=function(){},To.prototype.interfaces_=function(){return[]},To.prototype.getClass=function(){return To};var Lr=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Lr.prototype.getItem=function(){return this._item},Lr.prototype.getBounds=function(){return this._bounds},Lr.prototype.interfaces_=function(){return[To,fr]},Lr.prototype.getClass=function(){return Lr};var $n=function(){this._size=null,this._items=null,this._size=0,this._items=new U,this._items.add(null)};$n.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},$n.prototype.size=function(){return this._size},$n.prototype.reorder=function(t){for(var e=this,r=null,i=this._items.get(t);t*2<=this._size&&(r=t*2,r!==e._size&&e._items.get(r+1).compareTo(e._items.get(r))<0&&r++,e._items.get(r).compareTo(i)<0);t=r)e._items.set(t,e._items.get(r));this._items.set(t,i)},$n.prototype.clear=function(){this._size=0,this._items.clear()},$n.prototype.isEmpty=function(){return this._size===0},$n.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var r=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(r/2)))<0;r/=2)e._items.set(r,e._items.get(Math.trunc(r/2)));this._items.set(r,t)},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n};var wi=function(){};wi.prototype.visitItem=function(t){},wi.prototype.interfaces_=function(){return[]},wi.prototype.getClass=function(){return wi};var Os=function(){};Os.prototype.insert=function(t,e){},Os.prototype.remove=function(t,e){},Os.prototype.query=function(){},Os.prototype.interfaces_=function(){return[]},Os.prototype.getClass=function(){return Os};var ee=function(){if(this._childBoundables=new U,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},Od={serialVersionUID:{configurable:!0}};ee.prototype.getLevel=function(){return this._level},ee.prototype.size=function(){return this._childBoundables.size()},ee.prototype.getChildBoundables=function(){return this._childBoundables},ee.prototype.addChildBoundable=function(t){ct.isTrue(this._bounds===null),this._childBoundables.add(t)},ee.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},ee.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},ee.prototype.interfaces_=function(){return[To,fr]},ee.prototype.getClass=function(){return ee},Od.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(ee,Od);var Ar=function(){};Ar.reverseOrder=function(){return{compare:function(e,r){return r.compareTo(e)}}},Ar.min=function(t){return Ar.sort(t),t.get(0)},Ar.sort=function(t,e){var r=t.toArray();e?qi.sort(r,e):qi.sort(r);for(var i=t.iterator(),s=0,o=r.length;s<o;s++)i.next(),i.set(r[s])},Ar.singletonList=function(t){var e=new U;return e.add(t),e};var Zt=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=r,this._distance=this.distance()};Zt.prototype.expandToQueue=function(t,e){var r=Zt.isComposite(this._boundable1),i=Zt.isComposite(this._boundable2);if(r&&i)return Zt.area(this._boundable1)>Zt.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(r)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new zt("neither boundable is composite")},Zt.prototype.isLeaves=function(){return!(Zt.isComposite(this._boundable1)||Zt.isComposite(this._boundable2))},Zt.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},Zt.prototype.expand=function(t,e,r,i){for(var s=this,o=t.getChildBoundables(),a=o.iterator();a.hasNext();){var u=a.next(),l=new Zt(u,e,s._itemDistance);l.getDistance()<i&&r.add(l)}},Zt.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2},Zt.prototype.getDistance=function(){return this._distance},Zt.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},Zt.prototype.interfaces_=function(){return[hr]},Zt.prototype.getClass=function(){return Zt},Zt.area=function(t){return t.getBounds().getArea()},Zt.isComposite=function(t){return t instanceof ee};var se=function n(){if(this._root=null,this._built=!1,this._itemBoundables=new U,this._nodeCapacity=null,arguments.length===0){var t=n.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var e=arguments[0];ct.isTrue(e>1,"Node capacity must be greater than 1"),this._nodeCapacity=e}},Hu={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};se.prototype.getNodeCapacity=function(){return this._nodeCapacity},se.prototype.lastNode=function(t){return t.get(t.size()-1)},se.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],r=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof ee?r+=t.size(s):s instanceof Lr&&(r+=1)}return r}},se.prototype.removeItem=function(t,e){for(var r=null,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Lr&&s.getItem()===e&&(r=s)}return r!==null?(t.getChildBoundables().remove(r),!0):!1},se.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new U:e}else if(arguments.length===1){for(var r=arguments[0],i=new U,s=r.getChildBoundables().iterator();s.hasNext();){var o=s.next();if(o instanceof ee){var a=t.itemsTree(o);a!==null&&i.add(a)}else o instanceof Lr?i.add(o.getItem()):ct.shouldNeverReachHere()}return i.size()<=0?null:i}},se.prototype.insert=function(t,e){ct.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Lr(t,e))},se.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],r=new U;return this.boundablesAtLevel(e,this._root,r),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(ct.isTrue(i>-2),s.getLevel()===i)return o.add(s),null;for(var a=s.getChildBoundables().iterator();a.hasNext();){var u=a.next();u instanceof ee?t.boundablesAtLevel(i,u,o):(ct.isTrue(u instanceof Lr),i===-1&&o.add(u))}return null}},se.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var r=new U;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,r),r}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,s)}else if(arguments.length===3){if(nt(arguments[2],wi)&&arguments[0]instanceof Object&&arguments[1]instanceof ee)for(var o=arguments[0],a=arguments[1],u=arguments[2],l=a.getChildBoundables(),c=0;c<l.size();c++){var h=l.get(c);t.getIntersectsOp().intersects(h.getBounds(),o)&&(h instanceof ee?t.query(o,h,u):h instanceof Lr?u.visitItem(h.getItem()):ct.shouldNeverReachHere())}else if(nt(arguments[2],xr)&&arguments[0]instanceof Object&&arguments[1]instanceof ee)for(var d=arguments[0],g=arguments[1],y=arguments[2],C=g.getChildBoundables(),P=0;P<C.size();P++){var T=C.get(P);t.getIntersectsOp().intersects(T.getBounds(),d)&&(T instanceof ee?t.query(d,T,y):T instanceof Lr?y.add(T.getItem()):ct.shouldNeverReachHere())}}},se.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},se.prototype.getRoot=function(){return this.build(),this._root},se.prototype.remove=function(){var t=this;if(arguments.length===2){var e=arguments[0],r=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),e)?this.remove(e,this._root,r):!1}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=this.removeItem(s,o);if(a)return!0;for(var u=null,l=s.getChildBoundables().iterator();l.hasNext();){var c=l.next();if(t.getIntersectsOp().intersects(c.getBounds(),i)&&c instanceof ee&&(a=t.remove(i,c,o),a)){u=c;break}}return u!==null&&u.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(u),a}},se.prototype.createHigherLevels=function(t,e){ct.isTrue(!t.isEmpty());var r=this.createParentBoundables(t,e+1);return r.size()===1?r.get(0):this.createHigherLevels(r,e+1)},se.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var e=arguments[0],r=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof ee){var o=t.depth(s);o>r&&(r=o)}}return r+1}},se.prototype.createParentBoundables=function(t,e){var r=this;ct.isTrue(!t.isEmpty());var i=new U;i.add(this.createNode(e));var s=new U(t);Ar.sort(s,this.getComparator());for(var o=s.iterator();o.hasNext();){var a=o.next();r.lastNode(i).getChildBoundables().size()===r.getNodeCapacity()&&i.add(r.createNode(e)),r.lastNode(i).addChildBoundable(a)}return i},se.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},se.prototype.interfaces_=function(){return[fr]},se.prototype.getClass=function(){return se},se.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},Hu.IntersectsOp.get=function(){return Ey},Hu.serialVersionUID.get=function(){return-3886435814360241e3},Hu.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(se,Hu);var Ey=function(){},Oo=function(){};Oo.prototype.distance=function(t,e){},Oo.prototype.interfaces_=function(){return[]},Oo.prototype.getClass=function(){return Oo};var xd=function(n){function t(r){r=r||t.DEFAULT_NODE_CAPACITY,n.call(this,r)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var o=this;ct.isTrue(i.length>0);for(var a=new U,u=0;u<i.length;u++)a.addAll(o.createParentBoundablesFromVerticalSlice(i[u],s));return a},t.prototype.createNode=function(i){return new Dd(i)},t.prototype.size=function(){return arguments.length===0?n.prototype.size.call(this):n.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;n.prototype.insert.call(this,i,s)}else return n.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(i,s){for(var o=Math.trunc(Math.ceil(i.size()/s)),a=new Array(s).fill(null),u=i.iterator(),l=0;l<s;l++){a[l]=new U;for(var c=0;u.hasNext()&&c<o;){var h=u.next();a[l].add(h),c++}}return a},t.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return n.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],o=arguments[1];n.prototype.query.call(this,s,o)}else if(arguments.length===3){if(nt(arguments[2],wi)&&arguments[0]instanceof Object&&arguments[1]instanceof ee){var a=arguments[0],u=arguments[1],l=arguments[2];n.prototype.query.call(this,a,u,l)}else if(nt(arguments[2],xr)&&arguments[0]instanceof Object&&arguments[1]instanceof ee){var c=arguments[0],h=arguments[1],d=arguments[2];n.prototype.query.call(this,c,h,d)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return n.prototype.createParentBoundables.call(this,i,s)},t.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return n.prototype.remove.call(this,i,s)}else return n.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?n.prototype.depth.call(this):n.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(i,s){ct.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new U(i);Ar.sort(a,t.xComparator);var u=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(u,s)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if(nt(arguments[0],Oo)){var i=arguments[0],s=new Zt(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof Zt){var o=arguments[0];return this.nearestNeighbour(o,ot.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&nt(arguments[1],Oo)){var a=arguments[0],u=arguments[1],l=new Zt(this.getRoot(),a.getRoot(),u);return this.nearestNeighbour(l)}else if(arguments[0]instanceof Zt&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],d=h,g=null,y=new $n;for(y.add(c);!y.isEmpty()&&d>0;){var C=y.poll(),P=C.getDistance();if(P>=d)break;C.isLeaves()?(d=P,g=C):C.expandToQueue(y,d)}return[g.getBoundable(0).getItem(),g.getBoundable(1).getItem()]}}else if(arguments.length===3){var T=arguments[0],v=arguments[1],w=arguments[2],m=new Lr(T,v),_=new Zt(this.getRoot(),m,w);return this.nearestNeighbour(_)[0]}},t.prototype.interfaces_=function(){return[Os,fr]},t.prototype.getClass=function(){return t},t.centreX=function(i){return t.avg(i.getMinX(),i.getMaxX())},t.avg=function(i,s){return(i+s)/2},t.centreY=function(i){return t.avg(i.getMinY(),i.getMaxY())},e.STRtreeNode.get=function(){return Dd},e.serialVersionUID.get=function(){return 0x39920f7d5f261e0},e.xComparator.get=function(){return{interfaces_:function(){return[go]},compare:function(r,i){return n.compareDoubles(t.centreX(r.getBounds()),t.centreX(i.getBounds()))}}},e.yComparator.get=function(){return{interfaces_:function(){return[go]},compare:function(r,i){return n.compareDoubles(t.centreY(r.getBounds()),t.centreY(i.getBounds()))}}},e.intersectsOp.get=function(){return{interfaces_:function(){return[n.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},e.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,e),t}(se),Dd=function(n){function t(){var e=arguments[0];n.call(this,e)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var r=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();r===null?r=new j(s.getBounds()):r.expandToInclude(s.getBounds())}return r},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ee),Re=function(){};Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re},Re.relativeSign=function(t,e){return t<e?-1:t>e?1:0},Re.compare=function(t,e,r){if(e.equals2D(r))return 0;var i=Re.relativeSign(e.x,r.x),s=Re.relativeSign(e.y,r.y);switch(t){case 0:return Re.compareValue(i,s);case 1:return Re.compareValue(s,i);case 2:return Re.compareValue(s,-i);case 3:return Re.compareValue(-i,s);case 4:return Re.compareValue(-i,-s);case 5:return Re.compareValue(-s,-i);case 6:return Re.compareValue(-s,i);case 7:return Re.compareValue(i,-s)}return ct.shouldNeverReachHere("invalid octant value"),0},Re.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var Ei=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this._segString=t,this.coord=new D(e),this.segmentIndex=r,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(r))};Ei.prototype.getCoordinate=function(){return this.coord},Ei.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},Ei.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:Re.compare(this._segmentOctant,this.coord,e.coord)},Ei.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},Ei.prototype.isInterior=function(){return this._isInterior},Ei.prototype.interfaces_=function(){return[hr]},Ei.prototype.getClass=function(){return Ei};var Pe=function(){this._nodeMap=new ye,this._edge=null;var t=arguments[0];this._edge=t};Pe.prototype.getSplitCoordinates=function(){var t=this,e=new ka;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next();t.addEdgeCoordinates(i,s,e),i=s}return e.toCoordinateArray()},Pe.prototype.addCollapsedNodes=function(){var t=this,e=new U;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var r=e.iterator();r.hasNext();){var i=r.next().intValue();t.add(t._edge.getCoordinate(i),i)}},Pe.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},Pe.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,r=0;r<this._edge.size()-2;r++){var i=e._edge.getCoordinate(r),s=e._edge.getCoordinate(r+2);i.equals2D(s)&&t.add(new Gr(r+1))}},Pe.prototype.addEdgeCoordinates=function(t,e,r){var i=this,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);r.add(new D(t.coord),!1);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)r.add(i._edge.getCoordinate(a));o&&r.add(new D(e.coord))},Pe.prototype.iterator=function(){return this._nodeMap.values().iterator()},Pe.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints(),this.addCollapsedNodes();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},Pe.prototype.findCollapseIndex=function(t,e,r){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,i===1?(r[0]=t.segmentIndex+1,!0):!1},Pe.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=this,r=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var o=i.next(),a=e.findCollapseIndex(s,o,r);a&&t.add(new Gr(r[0])),s=o}},Pe.prototype.getEdge=function(){return this._edge},Pe.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},Pe.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r._edge.getCoordinate(l);return o&&(a[u]=new D(e.coord)),new Jt(a,this._edge.getData())},Pe.prototype.add=function(t,e){var r=new Ei(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(r);return i!==null?(ct.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(r,r),r)},Pe.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),r=t.get(0),i=r.getCoordinate(0);if(!i.equals2D(e[0]))throw new Yn("bad split edge start point at "+i);var s=t.get(t.size()-1),o=s.getCoordinates(),a=o[o.length-1];if(!a.equals2D(e[e.length-1]))throw new Yn("bad split edge end point at "+a)},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe};var xs=function(){};xs.prototype.interfaces_=function(){return[]},xs.prototype.getClass=function(){return xs},xs.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new zt("Cannot compute the octant for point ( "+t+", "+e+" )");var r=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?r>=i?0:1:r>=i?7:6:e>=0?r>=i?3:2:r>=i?4:5}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var s=arguments[0],o=arguments[1],a=o.x-s.x,u=o.y-s.y;if(a===0&&u===0)throw new zt("Cannot compute the octant for two identical points "+s);return xs.octant(a,u)}};var Pn=function(){};Pn.prototype.getCoordinates=function(){},Pn.prototype.size=function(){},Pn.prototype.getCoordinate=function(t){},Pn.prototype.isClosed=function(){},Pn.prototype.setData=function(t){},Pn.prototype.getData=function(){},Pn.prototype.interfaces_=function(){return[]},Pn.prototype.getClass=function(){return Pn};var Ya=function(){};Ya.prototype.addIntersection=function(t,e){},Ya.prototype.interfaces_=function(){return[Pn]},Ya.prototype.getClass=function(){return Ya};var Jt=function(){this._nodeList=new Pe(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Jt.prototype.getCoordinates=function(){return this._pts},Jt.prototype.size=function(){return this._pts.length},Jt.prototype.getCoordinate=function(t){return this._pts[t]},Jt.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Jt.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},Jt.prototype.setData=function(t){this._data=t},Jt.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:xs.octant(t,e)},Jt.prototype.getData=function(){return this._data},Jt.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[3],o=new D(r.getIntersection(s));this.addIntersection(o,i)}},Jt.prototype.toString=function(){return Or.toLineString(new Yt(this._pts))},Jt.prototype.getNodeList=function(){return this._nodeList},Jt.prototype.addIntersectionNode=function(t,e){var r=e,i=r+1;if(i<this._pts.length){var s=this._pts[i];t.equals2D(s)&&(r=i)}var o=this._nodeList.add(t,r);return o},Jt.prototype.addIntersections=function(t,e,r){for(var i=this,s=0;s<t.getIntersectionNum();s++)i.addIntersection(t,e,r,s)},Jt.prototype.interfaces_=function(){return[Ya]},Jt.prototype.getClass=function(){return Jt},Jt.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new U;return Jt.getNodedSubstrings(t,e),e}else if(arguments.length===2)for(var r=arguments[0],i=arguments[1],s=r.iterator();s.hasNext();){var o=s.next();o.getNodeList().addSplitEdges(i)}};var Z=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new D,this.p1=new D;else if(arguments.length===1){var t=arguments[0];this.p0=new D(t.p0),this.p1=new D(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var e=arguments[0],r=arguments[1],i=arguments[2],s=arguments[3];this.p0=new D(e,r),this.p1=new D(i,s)}},Md={serialVersionUID:{configurable:!0}};Z.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},Z.prototype.orientationIndex=function(){if(arguments[0]instanceof Z){var t=arguments[0],e=W.orientationIndex(this.p0,this.p1,t.p0),r=W.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&r>=0||e<=0&&r<=0?Math.max(e,r):0}else if(arguments[0]instanceof D){var i=arguments[0];return W.orientationIndex(this.p0,this.p1,i)}},Z.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},Z.prototype.isVertical=function(){return this.p0.x===this.p1.x},Z.prototype.equals=function(t){if(!(t instanceof Z))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},Z.prototype.intersection=function(t){var e=new Gi;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},Z.prototype.project=function(){if(arguments[0]instanceof D){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new D(t);var e=this.projectionFactor(t),r=new D;return r.x=this.p0.x+e*(this.p1.x-this.p0.x),r.y=this.p0.y+e*(this.p1.y-this.p0.y),r}else if(arguments[0]instanceof Z){var i=arguments[0],s=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(s>=1&&o>=1||s<=0&&o<=0)return null;var a=this.project(i.p0);s<0&&(a=this.p0),s>1&&(a=this.p1);var u=this.project(i.p1);return o<0&&(u=this.p0),o>1&&(u=this.p1),new Z(a,u)}},Z.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},Z.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},Z.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1},Z.prototype.distancePerpendicular=function(t){return W.distancePointLinePerpendicular(t,this.p0,this.p1)},Z.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},Z.prototype.midPoint=function(){return Z.midPoint(this.p0,this.p1)},Z.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,r=this.p1.y-this.p0.y,i=e*e+r*r;if(i<=0)return ot.NaN;var s=((t.x-this.p0.x)*e+(t.y-this.p0.y)*r)/i;return s},Z.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var r=new Array(2).fill(null),i=ot.MAX_VALUE,s=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),r[0]=o,r[1]=t.p0;var a=this.closestPoint(t.p1);s=a.distance(t.p1),s<i&&(i=s,r[0]=a,r[1]=t.p1);var u=t.closestPoint(this.p0);s=u.distance(this.p0),s<i&&(i=s,r[0]=this.p0,r[1]=u);var l=t.closestPoint(this.p1);return s=l.distance(this.p1),s<i&&(i=s,r[0]=this.p1,r[1]=l),r},Z.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);var r=this.p0.distance(t),i=this.p1.distance(t);return r<i?this.p0:this.p1},Z.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},Z.prototype.getLength=function(){return this.p0.distance(this.p1)},Z.prototype.compareTo=function(t){var e=t,r=this.p0.compareTo(e.p0);return r!==0?r:this.p1.compareTo(e.p1)},Z.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},Z.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},Z.prototype.lineIntersection=function(t){try{var e=Tr.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(r){if(!(r instanceof vo))throw r}finally{}return null},Z.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},Z.prototype.pointAlongOffset=function(t,e){var r=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),s=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(s*s+o*o),u=0,l=0;if(e!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");u=e*s/a,l=e*o/a}var c=r-l,h=i+u,d=new D(c,h);return d},Z.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=r.x,this.p1.y=r.y}},Z.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||ot.isNaN(e))&&(e=1),e},Z.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},Z.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},Z.prototype.distance=function(){if(arguments[0]instanceof Z){var t=arguments[0];return W.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof D){var e=arguments[0];return W.distancePointLine(e,this.p0,this.p1)}},Z.prototype.pointAlong=function(t){var e=new D;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},Z.prototype.hashCode=function(){var t=ot.doubleToLongBits(this.p0.x);t^=ot.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),r=ot.doubleToLongBits(this.p1.x);r^=ot.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(r)^Math.trunc(r>>32);return e^i},Z.prototype.interfaces_=function(){return[hr,fr]},Z.prototype.getClass=function(){return Z},Z.midPoint=function(t,e){return new D((t.x+e.x)/2,(t.y+e.y)/2)},Md.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(Z,Md);var Ja=function(){this.tempEnv1=new j,this.tempEnv2=new j,this._overlapSeg1=new Z,this._overlapSeg2=new Z};Ja.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),r.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},Ja.prototype.interfaces_=function(){return[]},Ja.prototype.getClass=function(){return Ja};var He=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=r,this._context=i};He.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},He.prototype.computeSelect=function(t,e,r,i){var s=this._pts[e],o=this._pts[r];if(i.tempEnv1.init(s,o),r-e===1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var a=Math.trunc((e+r)/2);e<a&&this.computeSelect(t,e,a,i),a<r&&this.computeSelect(t,a,r,i)},He.prototype.getCoordinates=function(){for(var t=this,e=new Array(this._end-this._start+1).fill(null),r=0,i=this._start;i<=this._end;i++)e[r++]=t._pts[i];return e},He.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},He.prototype.setId=function(t){this._id=t},He.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},He.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],e=this._pts[this._end];this._env=new j(t,e)}return this._env},He.prototype.getEndIndex=function(){return this._end},He.prototype.getStartIndex=function(){return this._start},He.prototype.getContext=function(){return this._context},He.prototype.getId=function(){return this._id},He.prototype.computeOverlapsInternal=function(t,e,r,i,s,o){var a=this._pts[t],u=this._pts[e],l=r._pts[i],c=r._pts[s];if(e-t===1&&s-i===1)return o.overlap(this,t,r,i),null;if(o.tempEnv1.init(a,u),o.tempEnv2.init(l,c),!o.tempEnv1.intersects(o.tempEnv2))return null;var h=Math.trunc((t+e)/2),d=Math.trunc((i+s)/2);t<h&&(i<d&&this.computeOverlapsInternal(t,h,r,i,d,o),d<s&&this.computeOverlapsInternal(t,h,r,d,s,o)),h<e&&(i<d&&this.computeOverlapsInternal(h,e,r,i,d,o),d<s&&this.computeOverlapsInternal(h,e,r,d,s,o))},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He};var Kr=function(){};Kr.prototype.interfaces_=function(){return[]},Kr.prototype.getClass=function(){return Kr},Kr.getChainStartIndices=function(t){var e=0,r=new U;r.add(new Gr(e));do{var i=Kr.findChainEnd(t,e);r.add(new Gr(i)),e=i}while(e<t.length-1);var s=Kr.toIntArray(r);return s},Kr.findChainEnd=function(t,e){for(var r=e;r<t.length-1&&t[r].equals2D(t[r+1]);)r++;if(r>=t.length-1)return t.length-1;for(var i=Dt.quadrant(t[r],t[r+1]),s=e+1;s<t.length;){if(!t[s-1].equals2D(t[s])){var o=Dt.quadrant(t[s-1],t[s]);if(o!==i)break}s++}return s-1},Kr.getChains=function(){if(arguments.length===1){var t=arguments[0];return Kr.getChains(t,null)}else if(arguments.length===2){for(var e=arguments[0],r=arguments[1],i=new U,s=Kr.getChainStartIndices(e),o=0;o<s.length-1;o++){var a=new He(e,s[o],s[o+1],r);i.add(a)}return i}},Kr.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var Hi=function(){};Hi.prototype.computeNodes=function(t){},Hi.prototype.getNodedSubstrings=function(){},Hi.prototype.interfaces_=function(){return[]},Hi.prototype.getClass=function(){return Hi};var Ba=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};Ba.prototype.setSegmentIntersector=function(t){this._segInt=t},Ba.prototype.interfaces_=function(){return[Hi]},Ba.prototype.getClass=function(){return Ba};var lc=function(n){function t(r){r?n.call(this,r):n.call(this),this._monoChains=new U,this._index=new xd,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return Jt.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(i){for(var s=this,o=Kr.getChains(i.getCoordinates(),i),a=o.iterator();a.hasNext();){var u=a.next();u.setId(s._idCounter++),s._index.insert(u.getEnvelope(),u),s._monoChains.add(u)}},t.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var o=i.iterator();o.hasNext();)s.add(o.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var i=this,s=new Ld(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var a=o.next(),u=i._index.query(a.getEnvelope()),l=u.iterator();l.hasNext();){var c=l.next();if(c.getId()>a.getId()&&(a.computeOverlaps(c,s),i._nOverlaps++),i._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.SegmentOverlapAction.get=function(){return Ld},Object.defineProperties(t,e),t}(Ba),Ld=function(n){function t(){n.call(this),this._si=null;var e=arguments[0];this._si=e}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3],a=r.getContext(),u=s.getContext();this._si.processIntersections(a,i,u,o)}else return n.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ja),bt=function n(){if(this._quadrantSegments=n.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=n.CAP_ROUND,this._joinStyle=n.JOIN_ROUND,this._mitreLimit=n.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=n.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(r)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(o),this.setMitreLimit(a)}}},ti={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}};bt.prototype.getEndCapStyle=function(){return this._endCapStyle},bt.prototype.isSingleSided=function(){return this._isSingleSided},bt.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=bt.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=bt.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==bt.JOIN_ROUND&&(this._quadrantSegments=bt.DEFAULT_QUADRANT_SEGMENTS)},bt.prototype.getJoinStyle=function(){return this._joinStyle},bt.prototype.setJoinStyle=function(t){this._joinStyle=t},bt.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},bt.prototype.getSimplifyFactor=function(){return this._simplifyFactor},bt.prototype.getQuadrantSegments=function(){return this._quadrantSegments},bt.prototype.setEndCapStyle=function(t){this._endCapStyle=t},bt.prototype.getMitreLimit=function(){return this._mitreLimit},bt.prototype.setMitreLimit=function(t){this._mitreLimit=t},bt.prototype.setSingleSided=function(t){this._isSingleSided=t},bt.prototype.interfaces_=function(){return[]},bt.prototype.getClass=function(){return bt},bt.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},ti.CAP_ROUND.get=function(){return 1},ti.CAP_FLAT.get=function(){return 2},ti.CAP_SQUARE.get=function(){return 3},ti.JOIN_ROUND.get=function(){return 1},ti.JOIN_MITRE.get=function(){return 2},ti.JOIN_BEVEL.get=function(){return 3},ti.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},ti.DEFAULT_MITRE_LIMIT.get=function(){return 5},ti.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(bt,ti);var Xt=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=W.COUNTERCLOCKWISE,this._inputLine=t||null},ja={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Xt.prototype.isDeletable=function(t,e,r,i){var s=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[r];return!this.isConcave(s,o,a)||!this.isShallow(s,o,a,i)?!1:this.isShallowSampled(s,o,t,r,i)},Xt.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,r=this.findNextNonDeletedIndex(e),i=this.findNextNonDeletedIndex(r),s=!1;i<this._inputLine.length;){var o=!1;t.isDeletable(e,r,i,t._distanceTol)&&(t._isDeleted[r]=Xt.DELETE,o=!0,s=!0),o?e=i:e=r,r=t.findNextNonDeletedIndex(e),i=t.findNextNonDeletedIndex(r)}return s},Xt.prototype.isShallowConcavity=function(t,e,r,i){var s=W.computeOrientation(t,e,r),o=s===this._angleOrientation;if(!o)return!1;var a=W.distancePointLine(e,t,r);return a<i},Xt.prototype.isShallowSampled=function(t,e,r,i,s){var o=this,a=Math.trunc((i-r)/Xt.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var u=r;u<i;u+=a)if(!o.isShallow(t,e,o._inputLine[u],s))return!1;return!0},Xt.prototype.isConcave=function(t,e,r){var i=W.computeOrientation(t,e,r),s=i===this._angleOrientation;return s},Xt.prototype.simplify=function(t){var e=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=W.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var r=!1;do r=e.deleteShallowConcavities();while(r);return this.collapseLine()},Xt.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Xt.DELETE;)e++;return e},Xt.prototype.isShallow=function(t,e,r,i){var s=W.distancePointLine(e,t,r);return s<i},Xt.prototype.collapseLine=function(){for(var t=this,e=new ka,r=0;r<this._inputLine.length;r++)t._isDeleted[r]!==Xt.DELETE&&e.add(t._inputLine[r]);return e.toCoordinateArray()},Xt.prototype.interfaces_=function(){return[]},Xt.prototype.getClass=function(){return Xt},Xt.simplify=function(t,e){var r=new Xt(t);return r.simplify(e)},ja.INIT.get=function(){return 0},ja.DELETE.get=function(){return 1},ja.KEEP.get=function(){return 1},ja.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Xt,ja);var ir=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new U},Ad={COORDINATE_ARRAY_TYPE:{configurable:!0}};ir.prototype.getCoordinates=function(){var t=this._ptList.toArray(ir.COORDINATE_ARRAY_TYPE);return t},ir.prototype.setPrecisionModel=function(t){this._precisionModel=t},ir.prototype.addPt=function(t){var e=new D(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},ir.prototype.revere=function(){},ir.prototype.addPts=function(t,e){var r=this;if(e)for(var i=0;i<t.length;i++)r.addPt(t[i]);else for(var s=t.length-1;s>=0;s--)r.addPt(t[s])},ir.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),r=t.distance(e);return r<this._minimimVertexDistance},ir.prototype.toString=function(){var t=new pt,e=t.createLineString(this.getCoordinates());return e.toString()},ir.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new D(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},ir.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},ir.prototype.interfaces_=function(){return[]},ir.prototype.getClass=function(){return ir},Ad.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(ir,Ad);var vt=function(){},Ds={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};vt.prototype.interfaces_=function(){return[]},vt.prototype.getClass=function(){return vt},vt.toDegrees=function(t){return t*180/Math.PI},vt.normalize=function(t){for(;t>Math.PI;)t-=vt.PI_TIMES_2;for(;t<=-Math.PI;)t+=vt.PI_TIMES_2;return t},vt.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=r.x-e.x,s=r.y-e.y;return Math.atan2(s,i)}},vt.isAcute=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-e.x,a=r.y-e.y,u=i*o+s*a;return u>0},vt.isObtuse=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-e.x,a=r.y-e.y,u=i*o+s*a;return u<0},vt.interiorAngle=function(t,e,r){var i=vt.angle(e,t),s=vt.angle(e,r);return Math.abs(s-i)},vt.normalizePositive=function(t){if(t<0){for(;t<0;)t+=vt.PI_TIMES_2;t>=vt.PI_TIMES_2&&(t=0)}else{for(;t>=vt.PI_TIMES_2;)t-=vt.PI_TIMES_2;t<0&&(t=0)}return t},vt.angleBetween=function(t,e,r){var i=vt.angle(e,t),s=vt.angle(e,r);return vt.diff(i,s)},vt.diff=function(t,e){var r=null;return t<e?r=e-t:r=t-e,r>Math.PI&&(r=2*Math.PI-r),r},vt.toRadians=function(t){return t*Math.PI/180},vt.getTurn=function(t,e){var r=Math.sin(e-t);return r>0?vt.COUNTERCLOCKWISE:r<0?vt.CLOCKWISE:vt.NONE},vt.angleBetweenOriented=function(t,e,r){var i=vt.angle(e,t),s=vt.angle(e,r),o=s-i;return o<=-Math.PI?o+vt.PI_TIMES_2:o>Math.PI?o-vt.PI_TIMES_2:o},Ds.PI_TIMES_2.get=function(){return 2*Math.PI},Ds.PI_OVER_2.get=function(){return Math.PI/2},Ds.PI_OVER_4.get=function(){return Math.PI/4},Ds.COUNTERCLOCKWISE.get=function(){return W.COUNTERCLOCKWISE},Ds.CLOCKWISE.get=function(){return W.CLOCKWISE},Ds.NONE.get=function(){return W.COLLINEAR},Object.defineProperties(vt,Ds);var kt=function n(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Z,this._seg1=new Z,this._offset0=new Z,this._offset1=new Z,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],r=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new Gi,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===bt.JOIN_ROUND&&(this._closingSegLengthFactor=n.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Za={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}};kt.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var r=W.computeOrientation(this._s0,this._s1,this._s2),i=r===W.CLOCKWISE&&this._side===z.LEFT||r===W.COUNTERCLOCKWISE&&this._side===z.RIGHT;r===0?this.addCollinear(e):i?this.addOutsideTurn(r,e):this.addInsideTurn(r,e)},kt.prototype.addLineEndCap=function(t,e){var r=new Z(t,e),i=new Z;this.computeOffsetSegment(r,z.LEFT,this._distance,i);var s=new Z;this.computeOffsetSegment(r,z.RIGHT,this._distance,s);var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case bt.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,u+Math.PI/2,u-Math.PI/2,W.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case bt.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case bt.CAP_SQUARE:var l=new D;l.x=Math.abs(this._distance)*Math.cos(u),l.y=Math.abs(this._distance)*Math.sin(u);var c=new D(i.p1.x+l.x,i.p1.y+l.y),h=new D(s.p1.x+l.x,s.p1.y+l.y);this._segList.addPt(c),this._segList.addPt(h);break}},kt.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t},kt.prototype.addMitreJoin=function(t,e,r,i){var s=!0,o=null;try{o=Tr.intersection(e.p0,e.p1,r.p0,r.p1);var a=i<=0?1:o.distance(t)/Math.abs(i);a>this._bufParams.getMitreLimit()&&(s=!1)}catch(u){if(u instanceof vo)o=new D(0,0),s=!1;else throw u}finally{}s?this._segList.addPt(o):this.addLimitedMitreJoin(e,r,i,this._bufParams.getMitreLimit())},kt.prototype.addFilletCorner=function(t,e,r,i,s){var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o),l=r.x-t.x,c=r.y-t.y,h=Math.atan2(c,l);i===W.CLOCKWISE?u<=h&&(u+=2*Math.PI):u>=h&&(u-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,u,h,i,s),this._segList.addPt(r)},kt.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*kt.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===bt.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===bt.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},kt.prototype.createSquare=function(t){this._segList.addPt(new D(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new D(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new D(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new D(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},kt.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},kt.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},kt.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},kt.prototype.initSideSegments=function(t,e,r){this._s1=t,this._s2=e,this._side=r,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,r,this._distance,this._offset1)},kt.prototype.addLimitedMitreJoin=function(t,e,r,i){var s=this._seg0.p1,o=vt.angle(s,this._seg0.p0),a=vt.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),u=a/2,l=vt.normalize(o+u),c=vt.normalize(l+Math.PI),h=i*r,d=h*Math.abs(Math.sin(u)),g=r-d,y=s.x+h*Math.cos(c),C=s.y+h*Math.sin(c),P=new D(y,C),T=new Z(s,P),v=T.pointAlongOffset(1,g),w=T.pointAlongOffset(1,-g);this._side===z.LEFT?(this._segList.addPt(v),this._segList.addPt(w)):(this._segList.addPt(w),this._segList.addPt(v))},kt.prototype.computeOffsetSegment=function(t,e,r,i){var s=e===z.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,u=Math.sqrt(o*o+a*a),l=s*r*o/u,c=s*r*a/u;i.p0.x=t.p0.x-c,i.p0.y=t.p0.y+l,i.p1.x=t.p1.x-c,i.p1.y=t.p1.y+l},kt.prototype.addFilletArc=function(t,e,r,i,s){var o=this,a=i===W.CLOCKWISE?-1:1,u=Math.abs(e-r),l=Math.trunc(u/this._filletAngleQuantum+.5);if(l<1)return null;for(var c=0,h=u/l,d=c,g=new D;d<u;){var y=e+a*d;g.x=t.x+s*Math.cos(y),g.y=t.y+s*Math.sin(y),o._segList.addPt(g),d+=h}},kt.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*kt.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var r=new D((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r);var i=new D((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},kt.prototype.createCircle=function(t){var e=new D(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},kt.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},kt.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new ir,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*kt.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},kt.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===bt.JOIN_BEVEL||this._bufParams.getJoinStyle()===bt.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,W.CLOCKWISE,this._distance))},kt.prototype.closeRing=function(){this._segList.closeRing()},kt.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},kt.prototype.interfaces_=function(){return[]},kt.prototype.getClass=function(){return kt},Za.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},Za.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},Za.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Za.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(kt,Za);var Fe=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Fe.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var r=e<0,i=Math.abs(e),s=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],s):this.computeOffsetCurve(t,r,s);var o=s.getCoordinates();return r&&dt.reverse(o),o},Fe.prototype.computeSingleSidedBufferCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);if(e){r.addSegments(t,!0);var s=Xt.simplify(t,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],z.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{r.addSegments(t,!1);var u=Xt.simplify(t,i),l=u.length-1;r.initSideSegments(u[0],u[1],z.LEFT),r.addFirstSegment();for(var c=2;c<=l;c++)r.addNextSegment(u[c],!0)}r.addLastSegment(),r.closeRing()},Fe.prototype.computeRingBufferCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);e===z.RIGHT&&(i=-i);var s=Xt.simplify(t,i),o=s.length-1;r.initSideSegments(s[o-1],s[0],e);for(var a=1;a<=o;a++){var u=a!==1;r.addNextSegment(s[a],u)}r.closeRing()},Fe.prototype.computeLineBufferCurve=function(t,e){var r=this.simplifyTolerance(this._distance),i=Xt.simplify(t,r),s=i.length-1;e.initSideSegments(i[0],i[1],z.LEFT);for(var o=2;o<=s;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[s-1],i[s]);var a=Xt.simplify(t,-r),u=a.length-1;e.initSideSegments(a[u],a[u-1],z.LEFT);for(var l=u-2;l>=0;l--)e.addNextSegment(a[l],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},Fe.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case bt.CAP_ROUND:e.createCircle(t);break;case bt.CAP_SQUARE:e.createSquare(t);break}},Fe.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var r=Math.abs(e),i=this.getSegGen(r);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var s=e<0;this.computeSingleSidedBufferCurve(t,s,i)}else this.computeLineBufferCurve(t,i);var o=i.getCoordinates();return o},Fe.prototype.getBufferParameters=function(){return this._bufParams},Fe.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Fe.prototype.getRingCurve=function(t,e,r){if(this._distance=r,t.length<=2)return this.getLineCurve(t,r);if(r===0)return Fe.copyCoordinates(t);var i=this.getSegGen(r);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Fe.prototype.computeOffsetCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);if(e){var s=Xt.simplify(t,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],z.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{var u=Xt.simplify(t,i),l=u.length-1;r.initSideSegments(u[0],u[1],z.LEFT),r.addFirstSegment();for(var c=2;c<=l;c++)r.addNextSegment(u[c],!0)}r.addLastSegment()},Fe.prototype.getSegGen=function(t){return new kt(this._precisionModel,this._bufParams,t)},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe},Fe.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),r=0;r<e.length;r++)e[r]=new D(t[r]);return e};var Ms=function(){this._subgraphs=null,this._seg=new Z,this._cga=new W;var t=arguments[0];this._subgraphs=t},Rd={DepthSegment:{configurable:!0}};Ms.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=new U,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),o=s.getEnvelope();e.y<o.getMinY()||e.y>o.getMaxY()||t.findStabbedSegments(e,s.getDirectedEdges(),r)}return r}else if(arguments.length===3){if(nt(arguments[2],xr)&&arguments[0]instanceof D&&arguments[1]instanceof uc)for(var a=arguments[0],u=arguments[1],l=arguments[2],c=u.getEdge().getCoordinates(),h=0;h<c.length-1;h++){t._seg.p0=c[h],t._seg.p1=c[h+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var d=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(d<a.x)&&!t._seg.isHorizontal()&&!(a.y<t._seg.p0.y||a.y>t._seg.p1.y)&&W.computeOrientation(t._seg.p0,t._seg.p1,a)!==W.RIGHT){var g=u.getDepth(z.LEFT);t._seg.p0.equals(c[h])||(g=u.getDepth(z.RIGHT));var y=new Yi(t._seg,g);l.add(y)}}else if(nt(arguments[2],xr)&&arguments[0]instanceof D&&nt(arguments[1],xr))for(var C=arguments[0],P=arguments[1],T=arguments[2],v=P.iterator();v.hasNext();){var w=v.next();w.isForward()&&t.findStabbedSegments(C,w,T)}}},Ms.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var r=Ar.min(e);return r._leftDepth},Ms.prototype.interfaces_=function(){return[]},Ms.prototype.getClass=function(){return Ms},Rd.DepthSegment.get=function(){return Yi},Object.defineProperties(Ms,Rd);var Yi=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new Z(t),this._leftDepth=e};Yi.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var r=this._upwardSeg.orientationIndex(e._upwardSeg);return r!==0||(r=-1*e._upwardSeg.orientationIndex(this._upwardSeg),r!==0)?r:this._upwardSeg.compareTo(e._upwardSeg)},Yi.prototype.compareX=function(t,e){var r=t.p0.compareTo(e.p0);return r!==0?r:t.p1.compareTo(e.p1)},Yi.prototype.toString=function(){return this._upwardSeg.toString()},Yi.prototype.interfaces_=function(){return[hr]},Yi.prototype.getClass=function(){return Yi};var Nt=function(t,e,r){this.p0=t||null,this.p1=e||null,this.p2=r||null};Nt.prototype.area=function(){return Nt.area(this.p0,this.p1,this.p2)},Nt.prototype.signedArea=function(){return Nt.signedArea(this.p0,this.p1,this.p2)},Nt.prototype.interpolateZ=function(t){if(t===null)throw new zt("Supplied point is null.");return Nt.interpolateZ(t,this.p0,this.p1,this.p2)},Nt.prototype.longestSideLength=function(){return Nt.longestSideLength(this.p0,this.p1,this.p2)},Nt.prototype.isAcute=function(){return Nt.isAcute(this.p0,this.p1,this.p2)},Nt.prototype.circumcentre=function(){return Nt.circumcentre(this.p0,this.p1,this.p2)},Nt.prototype.area3D=function(){return Nt.area3D(this.p0,this.p1,this.p2)},Nt.prototype.centroid=function(){return Nt.centroid(this.p0,this.p1,this.p2)},Nt.prototype.inCentre=function(){return Nt.inCentre(this.p0,this.p1,this.p2)},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt},Nt.area=function(t,e,r){return Math.abs(((r.x-t.x)*(e.y-t.y)-(e.x-t.x)*(r.y-t.y))/2)},Nt.signedArea=function(t,e,r){return((r.x-t.x)*(e.y-t.y)-(e.x-t.x)*(r.y-t.y))/2},Nt.det=function(t,e,r,i){return t*i-e*r},Nt.interpolateZ=function(t,e,r,i){var s=e.x,o=e.y,a=r.x-s,u=i.x-s,l=r.y-o,c=i.y-o,h=a*c-u*l,d=t.x-s,g=t.y-o,y=(c*d-u*g)/h,C=(-l*d+a*g)/h,P=e.z+y*(r.z-e.z)+C*(i.z-e.z);return P},Nt.longestSideLength=function(t,e,r){var i=t.distance(e),s=e.distance(r),o=r.distance(t),a=i;return s>a&&(a=s),o>a&&(a=o),a},Nt.isAcute=function(t,e,r){return!(!vt.isAcute(t,e,r)||!vt.isAcute(e,r,t)||!vt.isAcute(r,t,e))},Nt.circumcentre=function(t,e,r){var i=r.x,s=r.y,o=t.x-i,a=t.y-s,u=e.x-i,l=e.y-s,c=2*Nt.det(o,a,u,l),h=Nt.det(a,o*o+a*a,l,u*u+l*l),d=Nt.det(o,o*o+a*a,u,u*u+l*l),g=i-h/c,y=s+d/c;return new D(g,y)},Nt.perpendicularBisector=function(t,e){var r=e.x-t.x,i=e.y-t.y,s=new Tr(t.x+r/2,t.y+i/2,1),o=new Tr(t.x-i+r/2,t.y+r+i/2,1);return new Tr(s,o)},Nt.angleBisector=function(t,e,r){var i=e.distance(t),s=e.distance(r),o=i/(i+s),a=r.x-t.x,u=r.y-t.y,l=new D(t.x+o*a,t.y+o*u);return l},Nt.area3D=function(t,e,r){var i=e.x-t.x,s=e.y-t.y,o=e.z-t.z,a=r.x-t.x,u=r.y-t.y,l=r.z-t.z,c=s*l-o*u,h=o*a-i*l,d=i*u-s*a,g=c*c+h*h+d*d,y=Math.sqrt(g)/2;return y},Nt.centroid=function(t,e,r){var i=(t.x+e.x+r.x)/3,s=(t.y+e.y+r.y)/3;return new D(i,s)},Nt.inCentre=function(t,e,r){var i=e.distance(r),s=t.distance(r),o=t.distance(e),a=i+s+o,u=(i*t.x+s*e.x+o*r.x)/a,l=(i*t.y+s*e.y+o*r.y)/a;return new D(u,l)};var vr=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new U;var t=arguments[0],e=arguments[1],r=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=r};vr.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),r=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(r,R.EXTERIOR,R.INTERIOR)},vr.prototype.addPolygon=function(t){var e=this,r=this._distance,i=z.LEFT;this._distance<0&&(r=-this._distance,i=z.RIGHT);var s=t.getExteriorRing(),o=dt.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,r,i,R.EXTERIOR,R.INTERIOR);for(var a=0;a<t.getNumInteriorRing();a++){var u=t.getInteriorRingN(a),l=dt.removeRepeatedPoints(u.getCoordinates());e._distance>0&&e.isErodedCompletely(u,-e._distance)||e.addPolygonRing(l,r,z.opposite(i),R.INTERIOR,R.EXTERIOR)}},vr.prototype.isTriangleErodedCompletely=function(t,e){var r=new Nt(t[0],t[1],t[2]),i=r.inCentre(),s=W.distancePointLine(i,r.p0,r.p1);return s<Math.abs(e)},vr.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=dt.removeRepeatedPoints(t.getCoordinates()),r=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(r,R.EXTERIOR,R.INTERIOR)},vr.prototype.addCurve=function(t,e,r){if(t===null||t.length<2)return null;var i=new Jt(t,new Ot(0,R.BOUNDARY,e,r));this._curveList.add(i)},vr.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},vr.prototype.addPolygonRing=function(t,e,r,i,s){if(e===0&&t.length<Sn.MINIMUM_VALID_SIZE)return null;var o=i,a=s;t.length>=Sn.MINIMUM_VALID_SIZE&&W.isCCW(t)&&(o=s,a=i,r=z.opposite(r));var u=this._curveBuilder.getRingCurve(t,r,e);this.addCurve(u,o,a)},vr.prototype.add=function(t){if(t.isEmpty())return null;t instanceof te?this.addPolygon(t):t instanceof qt?this.addLineString(t):t instanceof qe?this.addPoint(t):t instanceof bo?this.addCollection(t):t instanceof Xi?this.addCollection(t):t instanceof Cn?this.addCollection(t):t instanceof Ce&&this.addCollection(t)},vr.prototype.isErodedCompletely=function(t,e){var r=t.getCoordinates();if(r.length<4)return e<0;if(r.length===4)return this.isTriangleErodedCompletely(r,e);var i=t.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>s},vr.prototype.addCollection=function(t){for(var e=this,r=0;r<t.getNumGeometries();r++){var i=t.getGeometryN(r);e.add(i)}},vr.prototype.interfaces_=function(){return[]},vr.prototype.getClass=function(){return vr};var xo=function(){};xo.prototype.locate=function(t){},xo.prototype.interfaces_=function(){return[]},xo.prototype.getClass=function(){return xo};var bn=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};bn.prototype.next=function(){if(this._atStart)return this._atStart=!1,bn.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 Io;var t=this._parent.getGeometryN(this._index++);return t instanceof Ce?(this._subcollectionIterator=new bn(t),this._subcollectionIterator.next()):t},bn.prototype.remove=function(){throw new Error(this.getClass().getName())},bn.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)},bn.prototype.interfaces_=function(){return[Co]},bn.prototype.getClass=function(){return bn},bn.isAtomic=function(t){return!(t instanceof Ce)};var sr=function(){this._geom=null;var t=arguments[0];this._geom=t};sr.prototype.locate=function(t){return sr.locate(t,this._geom)},sr.prototype.interfaces_=function(){return[xo]},sr.prototype.getClass=function(){return sr},sr.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?W.isPointInRing(t,e.getCoordinates()):!1},sr.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var r=e.getExteriorRing();if(!sr.isPointInRing(t,r))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var s=e.getInteriorRingN(i);if(sr.isPointInRing(t,s))return!1}return!0},sr.containsPoint=function(t,e){if(e instanceof te)return sr.containsPointInPolygon(t,e);if(e instanceof Ce)for(var r=new bn(e);r.hasNext();){var i=r.next();if(i!==e&&sr.containsPoint(t,i))return!0}return!1},sr.locate=function(t,e){return e.isEmpty()?R.EXTERIOR:sr.containsPoint(t,e)?R.INTERIOR:R.EXTERIOR};var we=function(){this._edgeMap=new ye,this._edgeList=null,this._ptInAreaLocation=[R.NONE,R.NONE]};we.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),r=e-1;return e===0&&(r=this._edgeList.size()-1),this._edgeList.get(r)},we.prototype.propagateSideLabels=function(t){for(var e=R.NONE,r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.isArea(t)&&s.getLocation(t,z.LEFT)!==R.NONE&&(e=s.getLocation(t,z.LEFT))}if(e===R.NONE)return null;for(var o=e,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();if(l.getLocation(t,z.ON)===R.NONE&&l.setLocation(t,z.ON,o),l.isArea(t)){var c=l.getLocation(t,z.LEFT),h=l.getLocation(t,z.RIGHT);if(h!==R.NONE){if(h!==o)throw new Qn("side location conflict",u.getCoordinate());c===R.NONE&&ct.shouldNeverReachHere("found single null side (at "+u.getCoordinate()+")"),o=c}else ct.isTrue(l.getLocation(t,z.LEFT)===R.NONE,"found single null side"),l.setLocation(t,z.RIGHT,o),l.setLocation(t,z.LEFT,o)}}},we.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},we.prototype.print=function(t){ce.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},we.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},we.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var r=e.size()-1,i=e.get(r).getLabel(),s=i.getLocation(t,z.LEFT);ct.isTrue(s!==R.NONE,"Found unlabelled area edge");for(var o=s,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();ct.isTrue(l.isArea(t),"Found non-area edge");var c=l.getLocation(t,z.LEFT),h=l.getLocation(t,z.RIGHT);if(c===h||h!==o)return!1;o=c}return!0},we.prototype.findIndex=function(t){var e=this;this.iterator();for(var r=0;r<this._edgeList.size();r++){var i=e._edgeList.get(r);if(i===t)return r}return-1},we.prototype.iterator=function(){return this.getEdges().iterator()},we.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new U(this._edgeMap.values())),this._edgeList},we.prototype.getLocation=function(t,e,r){return this._ptInAreaLocation[t]===R.NONE&&(this._ptInAreaLocation[t]=sr.locate(e,r[t].getGeometry())),this._ptInAreaLocation[t]},we.prototype.toString=function(){var t=new Ur;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
|
|
43
43
|
`);for(var e=this.iterator();e.hasNext();){var r=e.next();t.append(r),t.append(`
|
|
44
|
-
`)}return t.toString()},we.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.computeLabel(t)}},we.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var r=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),o=s.getLabel(),a=0;a<2;a++)o.isLine(a)&&o.getLocation(a)===R.BOUNDARY&&(r[a]=!0);for(var u=this.iterator();u.hasNext();)for(var l=u.next(),c=l.getLabel(),h=0;h<2;h++)if(c.isAnyNull(h)){var p=R.NONE;if(r[h])p=R.EXTERIOR;else{var v=l.getCoordinate();p=e.getLocation(h,v,t)}c.setAllLocationsIfNull(h,p)}},we.prototype.getDegree=function(){return this._edgeMap.size()},we.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we};var sy=function(n){function t(){n.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var r=this;this.getResultAreaEdges();for(var i=null,s=null,o=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var u=r._resultAreaEdgeList.get(a),l=u.getSym();if(u.getLabel().isArea())switch(i===null&&u.isInResult()&&(i=u),o){case r._SCANNING_FOR_INCOMING:if(!l.isInResult())continue;s=l,o=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(!u.isInResult())continue;s.setNext(u),o=r._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new Kn("no outgoing dirEdge found",this.getCoordinate());ct.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},t.prototype.insert=function(r){var i=r;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var r=this.getEdges(),i=r.size();if(i<1)return null;var s=r.get(0);if(i===1)return s;var o=r.get(i-1),a=s.getQuadrant(),u=o.getQuadrant();return xt.isNorthern(a)&&xt.isNorthern(u)?s:!xt.isNorthern(a)&&!xt.isNorthern(u)?o:s.getDy()!==0?s:o.getDy()!==0?o:(ct.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(r){ce.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();r.print("out "),s.print(r),r.println(),r.print("in "),s.getSym().print(r),r.println()}},t.prototype.getResultAreaEdges=function(){var r=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new U;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&r._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(r){for(var i=this.iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.setAllLocationsIfNull(0,r.getLocation(0)),o.setAllLocationsIfNull(1,r.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var r=this;this.getEdges();for(var i=null,s=null,o=this._edgeList.size()-1;o>=0;o--){var a=r._edgeList.get(o),u=a.getSym();s===null&&(s=u),i!==null&&u.setNext(i),i=a}s.setNext(i)},t.prototype.computeDepths=function(){var r=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),o=i.getDepth(z.LEFT),a=i.getDepth(z.RIGHT),u=this.computeDepths(s+1,this._edgeList.size(),o),l=this.computeDepths(0,s,u);if(l!==a)throw new Kn("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var c=arguments[0],h=arguments[1],p=arguments[2],v=p,w=c;w<h;w++){var I=r._edgeList.get(w);I.setEdgeDepths(z.RIGHT,v),v=I.getDepth(z.LEFT)}return v}},t.prototype.mergeSymLabels=function(){for(var r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(r){for(var i=this,s=null,o=null,a=this._SCANNING_FOR_INCOMING,u=this._resultAreaEdgeList.size()-1;u>=0;u--){var l=i._resultAreaEdgeList.get(u),c=l.getSym();switch(s===null&&l.getEdgeRing()===r&&(s=l),a){case i._SCANNING_FOR_INCOMING:if(c.getEdgeRing()!==r)continue;o=c,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(l.getEdgeRing()!==r)continue;o.setNextMin(l),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(ct.isTrue(s!==null,"found null for first outgoing dirEdge"),ct.isTrue(s.getEdgeRing()===r,"unable to link last incoming dirEdge"),o.setNextMin(s))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var r=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&r++}return r}else if(arguments.length===1){for(var o=arguments[0],a=0,u=this.iterator();u.hasNext();){var l=u.next();l.getEdgeRing()===o&&a++}return a}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var r=R.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){r=R.INTERIOR;break}if(o.isInResult()){r=R.EXTERIOR;break}}}if(r===R.NONE)return null;for(var a=r,u=this.iterator();u.hasNext();){var l=u.next(),c=l.getSym();l.isLineEdge()?l.getEdge().setCovered(a===R.INTERIOR):(l.isInResult()&&(a=R.EXTERIOR),c.isInResult()&&(a=R.INTERIOR))}},t.prototype.computeLabelling=function(r){var i=this;n.prototype.computeLabelling.call(this,r),this._label=new Ot(R.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),u=a.getLabel(),l=0;l<2;l++){var c=u.getLocation(l);(c===R.INTERIOR||c===R.BOUNDARY)&&i._label.setLocation(l,R.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(we),Od=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createNode=function(r){return new ku(r,new sy)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(So),Ei=function n(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=n.orientation(t)};Ei.prototype.compareTo=function(t){var e=t,r=Ei.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return r},Ei.prototype.interfaces_=function(){return[cr]},Ei.prototype.getClass=function(){return Ei},Ei.orientation=function(t){return dt.increasingDirection(t)===1},Ei.compareOriented=function(t,e,r,i){for(var s=e?1:-1,o=i?1:-1,a=e?t.length:-1,u=i?r.length:-1,l=e?0:t.length-1,c=i?0:r.length-1;;){var h=t[l].compareTo(r[c]);if(h!==0)return h;l+=s,c+=o;var p=l===a,v=c===u;if(p&&!v)return-1;if(!p&&v)return 1;if(p&&v)return 0}};var Ar=function(){this._edges=new U,this._ocaMap=new ye};Ar.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var r=0;r<this._edges.size();r++){var i=e._edges.get(r);r>0&&t.print(","),t.print("(");for(var s=i.getCoordinates(),o=0;o<s.length;o++)o>0&&t.print(","),t.print(s[o].x+" "+s[o].y);t.println(")")}t.print(") ")},Ar.prototype.addAll=function(t){for(var e=this,r=t.iterator();r.hasNext();)e.add(r.next())},Ar.prototype.findEdgeIndex=function(t){for(var e=this,r=0;r<this._edges.size();r++)if(e._edges.get(r).equals(t))return r;return-1},Ar.prototype.iterator=function(){return this._edges.iterator()},Ar.prototype.getEdges=function(){return this._edges},Ar.prototype.get=function(t){return this._edges.get(t)},Ar.prototype.findEqualEdge=function(t){var e=new Ei(t.getCoordinates()),r=this._ocaMap.get(e);return r},Ar.prototype.add=function(t){this._edges.add(t);var e=new Ei(t.getCoordinates());this._ocaMap.put(e,t)},Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar};var Yi=function(){};Yi.prototype.processIntersections=function(t,e,r,i){},Yi.prototype.isDone=function(){},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi};var sr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};sr.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(sr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.size()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},sr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},sr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},sr.prototype.getLineIntersector=function(){return this._li},sr.prototype.hasProperIntersection=function(){return this._hasProper},sr.prototype.processIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},sr.prototype.hasIntersection=function(){return this._hasIntersection},sr.prototype.isDone=function(){return!1},sr.prototype.hasInteriorIntersection=function(){return this._hasInterior},sr.prototype.interfaces_=function(){return[Yi]},sr.prototype.getClass=function(){return sr},sr.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var Kr=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],r=arguments[2];this.coord=new x(t),this.segmentIndex=e,this.dist=r};Kr.prototype.getSegmentIndex=function(){return this.segmentIndex},Kr.prototype.getCoordinate=function(){return this.coord},Kr.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},Kr.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Kr.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},Kr.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Kr.prototype.getDistance=function(){return this.dist},Kr.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Kr.prototype.interfaces_=function(){return[cr]},Kr.prototype.getClass=function(){return Kr};var bn=function(){this._nodeMap=new ye,this.edge=null;var t=arguments[0];this.edge=t};bn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},bn.prototype.iterator=function(){return this._nodeMap.values().iterator()},bn.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},bn.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},bn.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],o=e.dist>0||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new x(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r.edge.pts[l];return o&&(a[u]=e.coord),new zu(a,new Ot(this.edge._label))},bn.prototype.add=function(t,e,r){var i=new Kr(t,e,r),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},bn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();if(r.coord.equals(t))return!0}return!1},bn.prototype.interfaces_=function(){return[]},bn.prototype.getClass=function(){return bn};var Hi=function(){};Hi.prototype.getChainStartIndices=function(t){var e=this,r=0,i=new U;i.add(new Ur(r));do{var s=e.findChainEnd(t,r);i.add(new Ur(s)),r=s}while(r<t.length-1);var o=Hi.toIntArray(i);return o},Hi.prototype.findChainEnd=function(t,e){for(var r=xt.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){var s=xt.quadrant(t[i-1],t[i]);if(s!==r)break;i++}return i-1},Hi.prototype.interfaces_=function(){return[]},Hi.prototype.getClass=function(){return Hi},Hi.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var ti=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new j,this.env2=new j;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Hi;this.startIndex=e.getChainStartIndices(this.pts)};ti.prototype.getCoordinates=function(){return this.pts},ti.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e>r?e:r},ti.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e<r?e:r},ti.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[r],e.startIndex[r+1],i)}else if(arguments.length===6){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=arguments[4],c=arguments[5],h=this.pts[s],p=this.pts[o],v=a.pts[u],w=a.pts[l];if(o-s===1&&l-u===1)return c.addIntersections(this.e,s,a.e,u),null;if(this.env1.init(h,p),this.env2.init(v,w),!this.env1.intersects(this.env2))return null;var I=Math.trunc((s+o)/2),P=Math.trunc((u+l)/2);s<I&&(u<P&&this.computeIntersectsForChain(s,I,a,u,P,c),P<l&&this.computeIntersectsForChain(s,I,a,P,l,c)),I<o&&(u<P&&this.computeIntersectsForChain(I,o,a,u,P,c),P<l&&this.computeIntersectsForChain(I,o,a,P,l,c))}},ti.prototype.getStartIndexes=function(){return this.startIndex},ti.prototype.computeIntersects=function(t,e){for(var r=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<t.startIndex.length-1;s++)r.computeIntersectsForChain(i,t,s,e)},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti};var he=function n(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var r=0;r<3;r++)t._depth[e][r]=n.NULL_VALUE},Dd={NULL_VALUE:{configurable:!0}};he.prototype.getDepth=function(t,e){return this._depth[t][e]},he.prototype.setDepth=function(t,e,r){this._depth[t][e]=r},he.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var r=0;r<3;r++)if(t._depth[e][r]!==he.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===he.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===he.NULL_VALUE}},he.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var r=t._depth[e][1];t._depth[e][2]<r&&(r=t._depth[e][2]),r<0&&(r=0);for(var i=1;i<3;i++){var s=0;t._depth[e][i]>r&&(s=1),t._depth[e][i]=s}}},he.prototype.getDelta=function(t){return this._depth[t][z.RIGHT]-this._depth[t][z.LEFT]},he.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?R.EXTERIOR:R.INTERIOR},he.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},he.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],r=0;r<2;r++)for(var i=1;i<3;i++){var s=e.getLocation(r,i);(s===R.EXTERIOR||s===R.INTERIOR)&&(t.isNull(r,i)?t._depth[r][i]=he.depthAtLocation(s):t._depth[r][i]+=he.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];u===R.INTERIOR&&this._depth[o][a]++}},he.prototype.interfaces_=function(){return[]},he.prototype.getClass=function(){return he},he.depthAtLocation=function(t){return t===R.EXTERIOR?0:t===R.INTERIOR?1:he.NULL_VALUE},Dd.NULL_VALUE.get=function(){return-1},Object.defineProperties(he,Dd);var zu=function(n){function t(){if(n.call(this),this.pts=null,this._env=null,this.eiList=new bn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new he,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var r=new Array(2).fill(null);r[0]=this.pts[0],r[1]=this.pts[1];var i=new t(r,Ot.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(r){this._isIsolated=r},t.prototype.setName=function(r){this._name=r},t.prototype.equals=function(r){var i=this;if(!(r instanceof t))return!1;var s=r;if(this.pts.length!==s.pts.length)return!1;for(var o=!0,a=!0,u=this.pts.length,l=0;l<this.pts.length;l++)if(i.pts[l].equals2D(s.pts[l])||(o=!1),i.pts[l].equals2D(s.pts[--u])||(a=!1),!o&&!a)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var r=arguments[0];return this.pts[r]}},t.prototype.print=function(r){var i=this;r.print("edge "+this._name+": "),r.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&r.print(","),r.print(i.pts[s].x+" "+i.pts[s].y);r.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(r){t.updateIM(this._label,r)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(r){var i=this;r.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)r.print(i.pts[s]+" ");r.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new ti(this)),this._mce},t.prototype.getEnvelope=function(){var r=this;if(this._env===null){this._env=new j;for(var i=0;i<this.pts.length;i++)r._env.expandToInclude(r.pts[i])}return this._env},t.prototype.addIntersection=function(r,i,s,o){var a=new x(r.getIntersection(o)),u=i,l=r.getEdgeDistance(s,o),c=u+1;if(c<this.pts.length){var h=this.pts[c];a.equals2D(h)&&(u=c,l=0)}this.eiList.add(a,u,l)},t.prototype.toString=function(){var r=this,i=new zr;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(r.pts[s].x+" "+r.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(r){var i=this;if(this.pts.length!==r.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(r.pts[s]))return!1;return!0},t.prototype.setDepthDelta=function(r){this._depthDelta=r},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(r,i,s){for(var o=this,a=0;a<r.getIntersectionNum();a++)o.addIntersection(r,i,s,a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];i.setAtLeastIfValid(r.getLocation(0,z.ON),r.getLocation(1,z.ON),1),r.isArea()&&(i.setAtLeastIfValid(r.getLocation(0,z.LEFT),r.getLocation(1,z.LEFT),2),i.setAtLeastIfValid(r.getLocation(0,z.RIGHT),r.getLocation(1,z.RIGHT),2))}else return n.prototype.updateIM.apply(this,arguments)},t}(rr),be=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Ar,this._bufParams=t||null};be.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},be.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var r=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Ot(t.getLabel()),i.flip()),r.merge(i);var s=be.depthDelta(i),o=e.getDepthDelta(),a=o+s;e.setDepthDelta(a)}else this._edgeList.add(t),t.setDepthDelta(be.depthDelta(t.getLabel()))},be.prototype.buildSubgraphs=function(t,e){for(var r=new U,i=t.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new Ds(r),u=a.getDepth(o);s.computeDepth(u),s.findResultEdges(),r.add(s),e.add(s.getDirectedEdges(),s.getNodes())}},be.prototype.createSubgraphs=function(t){for(var e=new U,r=t.getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isVisited()){var s=new Ie;s.create(i),e.add(s)}}return Lr.sort(e,Lr.reverseOrder()),e},be.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},be.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new Kl,r=new zi;return r.setPrecisionModel(t),e.setSegmentIntersector(new sr(r)),e},be.prototype.buffer=function(t,e){var r=this._workingPrecisionModel;r===null&&(r=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new Re(r,this._bufParams),s=new mr(t,e,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,r),this._graph=new Wt(new Od),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),u=new qe(this._geomFact);this.buildSubgraphs(a,u);var l=u.getPolygons();if(l.size()<=0)return this.createEmptyResultGeometry();var c=this._geomFact.buildGeometry(l);return c},be.prototype.computeNodedEdges=function(t,e){var r=this,i=this.getNoder(e);i.computeNodes(t);for(var s=i.getNodedSubstrings(),o=s.iterator();o.hasNext();){var a=o.next(),u=a.getCoordinates();if(!(u.length===2&&u[0].equals2D(u[1]))){var l=a.getData(),c=new zu(a.getCoordinates(),new Ot(l));r.insertUniqueEdge(c)}}},be.prototype.setNoder=function(t){this._workingNoder=t},be.prototype.interfaces_=function(){return[]},be.prototype.getClass=function(){return be},be.depthDelta=function(t){var e=t.getLocation(0,z.LEFT),r=t.getLocation(0,z.RIGHT);return e===R.INTERIOR&&r===R.EXTERIOR?1:e===R.EXTERIOR&&r===R.INTERIOR?-1:0},be.convertSegStrings=function(t){for(var e=new pt,r=new U;t.hasNext();){var i=t.next(),s=e.createLineString(i.getCoordinates());r.add(s)}return e.buildGeometry(r)};var Si=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3];this._noder=r,this._scaleFactor=i,this._offsetX=s,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};Si.prototype.rescale=function(){var t=this;if(nt(arguments[0],$t))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],o=0;o<s.length;o++)s[o].x=s[o].x/t._scaleFactor+t._offsetX,s[o].y=s[o].y/t._scaleFactor+t._offsetY;s.length===2&&s[0].equals2D(s[1])&&ce.out.println(s)}},Si.prototype.scale=function(){var t=this;if(nt(arguments[0],$t)){for(var e=arguments[0],r=new U,i=e.iterator();i.hasNext();){var s=i.next();r.add(new Jt(t.scale(s.getCoordinates()),s.getData()))}return r}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),u=0;u<o.length;u++)a[u]=new x(Math.round((o[u].x-t._offsetX)*t._scaleFactor),Math.round((o[u].y-t._offsetY)*t._scaleFactor),o[u].z);var l=dt.removeRepeatedPoints(a);return l}},Si.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},Si.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},Si.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},Si.prototype.interfaces_=function(){return[qi]},Si.prototype.getClass=function(){return Si};var Qr=function(){this._li=new zi,this._segStrings=null;var t=arguments[0];this._segStrings=t},xd={fact:{configurable:!0}};Qr.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next(),i=r.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var u=a.next(),l=u.getCoordinates(),c=1;c<l.length-1;c++)if(l[c].equals(s))throw new Yn("found endpt/interior pt intersection at index "+c+" :pt "+s)}},Qr.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var r=e.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();t.checkInteriorIntersections(r,s)}else if(arguments.length===2)for(var o=arguments[0],a=arguments[1],u=o.getCoordinates(),l=a.getCoordinates(),c=0;c<u.length-1;c++)for(var h=0;h<l.length-1;h++)t.checkInteriorIntersections(o,c,a,h);else if(arguments.length===4){var p=arguments[0],v=arguments[1],w=arguments[2],I=arguments[3];if(p===w&&v===I)return null;var P=p.getCoordinates()[v],O=p.getCoordinates()[v+1],m=w.getCoordinates()[I],_=w.getCoordinates()[I+1];if(this._li.computeIntersection(P,O,m,_),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,P,O)||this.hasInteriorIntersection(this._li,m,_)))throw new Yn("found non-noded intersection at "+P+"-"+O+" and "+m+"-"+_)}},Qr.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},Qr.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next();t.checkCollapses(r)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),o=0;o<s.length-2;o++)t.checkCollapse(s[o],s[o+1],s[o+2])},Qr.prototype.hasInteriorIntersection=function(t,e,r){for(var i=0;i<t.getIntersectionNum();i++){var s=t.getIntersection(i);if(!(s.equals(e)||s.equals(r)))return!0}return!1},Qr.prototype.checkCollapse=function(t,e,r){if(t.equals(r))throw new Yn("found non-noded collapse at "+Qr.fact.createLineString([t,e,r]))},Qr.prototype.interfaces_=function(){return[]},Qr.prototype.getClass=function(){return Qr},xd.fact.get=function(){return new pt},Object.defineProperties(Qr,xd);var Fe=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],r=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=r,e<=0)throw new Vt("Scale factor must be non-zero");e!==1&&(this._pt=new x(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new x,this._p1Scaled=new x),this.initCorners(this._pt)},Md={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};Fe.prototype.intersectsScaled=function(t,e){var r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<r||this._minx>i||this._maxy<s||this._miny>o;if(a)return!1;var u=this.intersectsToleranceSquare(t,e);return ct.isTrue(!(a&&u),"Found bad envelope test"),u},Fe.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new x(this._maxx,this._maxy),this._corner[1]=new x(this._minx,this._maxy),this._corner[2]=new x(this._minx,this._miny),this._corner[3]=new x(this._maxx,this._miny)},Fe.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},Fe.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},Fe.prototype.getCoordinate=function(){return this._originalPt},Fe.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},Fe.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=Fe.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new j(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},Fe.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},Fe.prototype.intersectsToleranceSquare=function(t,e){var r=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||r&&i||t.equals(this._pt)||e.equals(this._pt))},Fe.prototype.addSnappedNode=function(t,e){var r=t.getCoordinate(e),i=t.getCoordinate(e+1);return this.intersects(r,i)?(t.addIntersection(this.getCoordinate(),e),!0):!1},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe},Md.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(Fe,Md);var qa=function(){this.tempEnv1=new j,this.selectedSegment=new Z};qa.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},qa.prototype.interfaces_=function(){return[]},qa.prototype.getClass=function(){return qa};var bo=function(){this._index=null;var t=arguments[0];this._index=t},Ld={HotPixelSnapAction:{configurable:!0}};bo.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),o=new Ad(e,r,i);return this._index.query(s,{interfaces_:function(){return[_i]},visitItem:function(a){var u=a;u.select(s,o)}}),o.isNodeAdded()}},bo.prototype.interfaces_=function(){return[]},bo.prototype.getClass=function(){return bo},Ld.HotPixelSnapAction.get=function(){return Ad},Object.defineProperties(bo,Ld);var Ad=function(n){function t(){n.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=r,this._hotPixelVertexIndex=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1],s=r.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return n.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(qa),xs=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new U};xs.prototype.processIntersections=function(t,e,r,i){var s=this;if(t===r&&e===i)return null;var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var c=0;c<this._li.getIntersectionNum();c++)s._interiorIntersections.add(s._li.getIntersection(c));t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)}},xs.prototype.isDone=function(){return!1},xs.prototype.getInteriorIntersections=function(){return this._interiorIntersections},xs.prototype.interfaces_=function(){return[Yi]},xs.prototype.getClass=function(){return xs};var Nn=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new zi,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};Nn.prototype.checkCorrectness=function(t){var e=Jt.getNodedSubstrings(t),r=new Qr(e);try{r.checkValid()}catch(i){if(i instanceof dd)i.printStackTrace();else throw i}finally{}},Nn.prototype.getNodedSubstrings=function(){return Jt.getNodedSubstrings(this._nodedSegStrings)},Nn.prototype.snapRound=function(t,e){var r=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(r),this.computeVertexSnaps(t)},Nn.prototype.findInteriorIntersections=function(t,e){var r=new xs(e);return this._noder.setSegmentIntersector(r),this._noder.computeNodes(t),r.getInteriorIntersections()},Nn.prototype.computeVertexSnaps=function(){var t=this;if(nt(arguments[0],$t))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof Jt)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var u=new Fe(o[a],t._scaleFactor,t._li),l=t._pointSnapper.snap(u,s,a);l&&s.addIntersection(o[a],a)}},Nn.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new Kl,this._pointSnapper=new bo(this._noder.getIndex()),this.snapRound(t,this._li)},Nn.prototype.computeIntersectionSnaps=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=new Fe(i,e._scaleFactor,e._li);e._pointSnapper.snap(s)}},Nn.prototype.interfaces_=function(){return[qi]},Nn.prototype.getClass=function(){return Nn};var fe=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new bt,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._argGeom=e,this._bufParams=r}},No={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};fe.prototype.bufferFixedPrecision=function(t){var e=new Si(new Nn(new Pt(1)),t.getScale()),r=new be(this._bufParams);r.setWorkingPrecisionModel(t),r.setNoder(e),this._resultGeometry=r.buffer(this._argGeom,this._distance)},fe.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=fe.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(o){if(o instanceof Kn)t._saveException=o;else throw o}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var r=arguments[0],i=fe.precisionScaleFactor(this._argGeom,this._distance,r),s=new Pt(i);this.bufferFixedPrecision(s)}},fe.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Pt.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},fe.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},fe.prototype.bufferOriginalPrecision=function(){try{var t=new be(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof Yn)this._saveException=e;else throw e}finally{}},fe.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},fe.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},fe.prototype.interfaces_=function(){return[]},fe.prototype.getClass=function(){return fe},fe.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new fe(t),i=r.getResultGeometry(e);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof rt&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],u=new fe(s);u.setQuadrantSegments(a);var l=u.getResultGeometry(o);return l}else if(arguments[2]instanceof bt&&arguments[0]instanceof rt&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],p=arguments[2],v=new fe(c,p),w=v.getResultGeometry(h);return w}}else if(arguments.length===4){var I=arguments[0],P=arguments[1],O=arguments[2],m=arguments[3],_=new fe(I);_.setQuadrantSegments(O),_.setEndCapStyle(m);var g=_.getResultGeometry(P);return g}},fe.precisionScaleFactor=function(t,e,r){var i=t.getEnvelopeInternal(),s=er.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=e>0?e:0,a=s+2*o,u=Math.trunc(Math.log(a)/Math.log(10)+1),l=r-u,c=Math.pow(10,l);return c},No.CAP_ROUND.get=function(){return bt.CAP_ROUND},No.CAP_BUTT.get=function(){return bt.CAP_FLAT},No.CAP_FLAT.get=function(){return bt.CAP_FLAT},No.CAP_SQUARE.get=function(){return bt.CAP_SQUARE},No.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(fe,No);var Ne=function(){this._pt=[new x,new x],this._distance=ot.NaN,this._isNull=!0};Ne.prototype.getCoordinates=function(){return this._pt},Ne.prototype.getCoordinate=function(t){return this._pt[t]},Ne.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},Ne.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Ne.prototype.getDistance=function(){return this._distance},Ne.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne};var Tn=function(){};Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn},Tn.computeDistance=function(){if(arguments[2]instanceof Ne&&arguments[0]instanceof qt&&arguments[1]instanceof x)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=t.getCoordinates(),s=new Z,o=0;o<i.length-1;o++){s.setCoordinates(i[o],i[o+1]);var a=s.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof Ne&&arguments[0]instanceof te&&arguments[1]instanceof x){var u=arguments[0],l=arguments[1],c=arguments[2];Tn.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)Tn.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof Ne&&arguments[0]instanceof rt&&arguments[1]instanceof x){var p=arguments[0],v=arguments[1],w=arguments[2];if(p instanceof qt)Tn.computeDistance(p,v,w);else if(p instanceof te)Tn.computeDistance(p,v,w);else if(p instanceof Ce)for(var I=p,P=0;P<I.getNumGeometries();P++){var O=I.getGeometryN(P);Tn.computeDistance(O,v,w)}else w.setMinimum(p.getCoordinate(),v)}else if(arguments[2]instanceof Ne&&arguments[0]instanceof Z&&arguments[1]instanceof x){var m=arguments[0],_=arguments[1],g=arguments[2],y=m.closestPoint(_);g.setMinimum(y,_)}};var Ji=function(t){this._maxPtDist=new Ne,this._inputGeom=t||null},Ql={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};Ji.prototype.computeMaxMidpointDistance=function(t){var e=new Ci(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Ji.prototype.computeMaxVertexDistance=function(t){var e=new Ms(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Ji.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},Ji.prototype.getDistancePoints=function(){return this._maxPtDist},Ji.prototype.interfaces_=function(){return[]},Ji.prototype.getClass=function(){return Ji},Ql.MaxPointDistanceFilter.get=function(){return Ms},Ql.MaxMidpointDistanceFilter.get=function(){return Ci},Object.defineProperties(Ji,Ql);var Ms=function(t){this._maxPtDist=new Ne,this._minPtDist=new Ne,this._geom=t||null};Ms.prototype.filter=function(t){this._minPtDist.initialize(),Tn.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ms.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ms.prototype.interfaces_=function(){return[wn]},Ms.prototype.getClass=function(){return Ms};var Ci=function(t){this._maxPtDist=new Ne,this._minPtDist=new Ne,this._geom=t||null};Ci.prototype.filter=function(t,e){if(e===0)return null;var r=t.getCoordinate(e-1),i=t.getCoordinate(e),s=new x((r.x+i.x)/2,(r.y+i.y)/2);this._minPtDist.initialize(),Tn.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ci.prototype.isDone=function(){return!1},Ci.prototype.isGeometryChanged=function(){return!1},Ci.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ci.prototype.interfaces_=function(){return[xr]},Ci.prototype.getClass=function(){return Ci};var ei=function(t){this._comps=t||null};ei.prototype.filter=function(t){t instanceof te&&this._comps.add(t)},ei.prototype.interfaces_=function(){return[Xr]},ei.prototype.getClass=function(){return ei},ei.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return ei.getPolygons(t,new U)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof te?r.add(e):e instanceof Ce&&e.apply(new ei(r)),r}};var de=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._lines=e,this._isForcedToLineString=r}};de.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof En){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof qt&&this._lines.add(t)},de.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},de.prototype.interfaces_=function(){return[Hn]},de.prototype.getClass=function(){return de},de.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(de.getLines(t))}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e.getFactory().buildGeometry(de.getLines(e,r))}},de.getLines=function(){if(arguments.length===1){var t=arguments[0];return de.getLines(t,!1)}else if(arguments.length===2){if(nt(arguments[0],$t)&&nt(arguments[1],$t)){for(var e=arguments[0],r=arguments[1],i=e.iterator();i.hasNext();){var s=i.next();de.getLines(s,r)}return r}else if(arguments[0]instanceof rt&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],u=new U;return o.apply(new de(u,a)),u}else if(arguments[0]instanceof rt&&nt(arguments[1],$t)){var l=arguments[0],c=arguments[1];return l instanceof qt?c.add(l):l.apply(new de(c)),c}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&nt(arguments[0],$t)&&nt(arguments[1],$t)){for(var h=arguments[0],p=arguments[1],v=arguments[2],w=h.iterator();w.hasNext();){var I=w.next();de.getLines(I,p,v)}return p}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof rt&&nt(arguments[1],$t)){var P=arguments[0],O=arguments[1],m=arguments[2];return P.apply(new de(O,m)),O}}};var Rr=function(){if(this._boundaryRule=fr.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new Vt("Rule must be non-null");this._boundaryRule=t}}};Rr.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof x&&arguments[1]instanceof te){var e=arguments[0],r=arguments[1];if(r.isEmpty())return R.EXTERIOR;var i=r.getExteriorRing(),s=this.locateInPolygonRing(e,i);if(s===R.EXTERIOR)return R.EXTERIOR;if(s===R.BOUNDARY)return R.BOUNDARY;for(var o=0;o<r.getNumInteriorRing();o++){var a=r.getInteriorRingN(o),u=t.locateInPolygonRing(e,a);if(u===R.INTERIOR)return R.EXTERIOR;if(u===R.BOUNDARY)return R.BOUNDARY}return R.INTERIOR}else if(arguments[0]instanceof x&&arguments[1]instanceof qt){var l=arguments[0],c=arguments[1];if(!c.getEnvelopeInternal().intersects(l))return R.EXTERIOR;var h=c.getCoordinates();return!c.isClosed()&&(l.equals(h[0])||l.equals(h[h.length-1]))?R.BOUNDARY:W.isOnLine(l,h)?R.INTERIOR:R.EXTERIOR}else if(arguments[0]instanceof x&&arguments[1]instanceof We){var p=arguments[0],v=arguments[1],w=v.getCoordinate();return w.equals2D(p)?R.INTERIOR:R.EXTERIOR}},Rr.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?W.locatePointInRing(t,e.getCoordinates()):R.EXTERIOR},Rr.prototype.intersects=function(t,e){return this.locate(t,e)!==R.EXTERIOR},Rr.prototype.updateLocationInfo=function(t){t===R.INTERIOR&&(this._isIn=!0),t===R.BOUNDARY&&this._numBoundaries++},Rr.prototype.computeLocation=function(t,e){var r=this;if(e instanceof We&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof qt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof te)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Wi)for(var i=e,s=0;s<i.getNumGeometries();s++){var o=i.getGeometryN(s);r.updateLocationInfo(r.locateInternal(t,o))}else if(e instanceof Sn)for(var a=e,u=0;u<a.getNumGeometries();u++){var l=a.getGeometryN(u);r.updateLocationInfo(r.locateInternal(t,l))}else if(e instanceof Ce)for(var c=new Pn(e);c.hasNext();){var h=c.next();h!==e&&r.computeLocation(t,h)}},Rr.prototype.locate=function(t,e){return e.isEmpty()?R.EXTERIOR:e instanceof qt?this.locateInternal(t,e):e instanceof te?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?R.BOUNDARY:this._numBoundaries>0||this._isIn?R.INTERIOR:R.EXTERIOR)},Rr.prototype.interfaces_=function(){return[]},Rr.prototype.getClass=function(){return Rr};var Te=function n(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];n.call(this,t,n.INSIDE_AREA,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._component=r,this._segIndex=i,this._pt=s}},Rd={INSIDE_AREA:{configurable:!0}};Te.prototype.isInsideArea=function(){return this._segIndex===Te.INSIDE_AREA},Te.prototype.getCoordinate=function(){return this._pt},Te.prototype.getGeometryComponent=function(){return this._component},Te.prototype.getSegmentIndex=function(){return this._segIndex},Te.prototype.interfaces_=function(){return[]},Te.prototype.getClass=function(){return Te},Rd.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Te,Rd);var Ii=function(t){this._pts=t||null};Ii.prototype.filter=function(t){t instanceof We&&this._pts.add(t)},Ii.prototype.interfaces_=function(){return[Xr]},Ii.prototype.getClass=function(){return Ii},Ii.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof We?Lr.singletonList(t):Ii.getPoints(t,new U)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof We?r.add(e):e instanceof Ce&&e.apply(new Ii(r)),r}};var Ls=function(){this._locations=null;var t=arguments[0];this._locations=t};Ls.prototype.filter=function(t){(t instanceof We||t instanceof qt||t instanceof te)&&this._locations.add(new Te(t,0,t.getCoordinate()))},Ls.prototype.interfaces_=function(){return[Xr]},Ls.prototype.getClass=function(){return Ls},Ls.getLocations=function(t){var e=new U;return t.apply(new Ls(e)),e};var pe=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Rr,this._minDistanceLocation=null,this._minDistance=ot.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=r,this._geom[1]=i,this._terminateDistance=s}};pe.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=1-r,o=ei.getPolygons(this._geom[r]);if(o.size()>0){var a=Ls.getLocations(this._geom[s]);if(this.computeContainmentDistance(a,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[r]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&nt(arguments[0],Or)&&nt(arguments[1],Or)){for(var u=arguments[0],l=arguments[1],c=arguments[2],h=0;h<u.size();h++)for(var p=u.get(h),v=0;v<l.size();v++)if(t.computeContainmentDistance(p,l.get(v),c),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Te&&arguments[1]instanceof te){var w=arguments[0],I=arguments[1],P=arguments[2],O=w.getCoordinate();if(R.EXTERIOR!==this._ptLocator.locate(O,I))return this._minDistance=0,P[0]=w,P[1]=new Te(I,O),null}}},pe.prototype.computeMinDistanceLinesPoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},pe.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=de.getLines(this._geom[0]),r=de.getLines(this._geom[1]),i=Ii.getPoints(this._geom[0]),s=Ii.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,s,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(r,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,s,t),this.updateMinDistance(t,!1)},pe.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},pe.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},pe.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},pe.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof qt&&arguments[1]instanceof We){var e=arguments[0],r=arguments[1],i=arguments[2];if(e.getEnvelopeInternal().distance(r.getEnvelopeInternal())>this._minDistance)return null;for(var s=e.getCoordinates(),o=r.getCoordinate(),a=0;a<s.length-1;a++){var u=W.distancePointLine(o,s[a],s[a+1]);if(u<t._minDistance){t._minDistance=u;var l=new Z(s[a],s[a+1]),c=l.closestPoint(o);i[0]=new Te(e,a,c),i[1]=new Te(r,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof qt&&arguments[1]instanceof qt){var h=arguments[0],p=arguments[1],v=arguments[2];if(h.getEnvelopeInternal().distance(p.getEnvelopeInternal())>this._minDistance)return null;for(var w=h.getCoordinates(),I=p.getCoordinates(),P=0;P<w.length-1;P++)for(var O=0;O<I.length-1;O++){var m=W.distanceLineLine(w[P],w[P+1],I[O],I[O+1]);if(m<t._minDistance){t._minDistance=m;var _=new Z(w[P],w[P+1]),g=new Z(I[O],I[O+1]),y=_.closestPoints(g);v[0]=new Te(h,P,y[0]),v[1]=new Te(p,O,y[1])}if(t._minDistance<=t._terminateDistance)return null}}}},pe.prototype.computeMinDistancePoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a),l=o.getCoordinate().distance(u.getCoordinate());if(l<i._minDistance&&(i._minDistance=l,r[0]=new Te(o,0,o.getCoordinate()),r[1]=new Te(u,0,u.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},pe.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new Vt("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},pe.prototype.computeMinDistanceLines=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},pe.prototype.interfaces_=function(){return[]},pe.prototype.getClass=function(){return pe},pe.distance=function(t,e){var r=new pe(t,e);return r.distance()},pe.isWithinDistance=function(t,e,r){var i=new pe(t,e,r);return i.distance()<=r},pe.nearestPoints=function(t,e){var r=new pe(t,e);return r.nearestPoints()};var Ee=function(){this._pt=[new x,new x],this._distance=ot.NaN,this._isNull=!0};Ee.prototype.getCoordinates=function(){return this._pt},Ee.prototype.getCoordinate=function(t){return this._pt[t]},Ee.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},Ee.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Ee.prototype.toString=function(){return Tr.toLineString(this._pt[0],this._pt[1])},Ee.prototype.getDistance=function(){return this._distance},Ee.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},Ee.prototype.interfaces_=function(){return[]},Ee.prototype.getClass=function(){return Ee};var $r=function(){};$r.prototype.interfaces_=function(){return[]},$r.prototype.getClass=function(){return $r},$r.computeDistance=function(){if(arguments[2]instanceof Ee&&arguments[0]instanceof qt&&arguments[1]instanceof x)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=new Z,s=t.getCoordinates(),o=0;o<s.length-1;o++){i.setCoordinates(s[o],s[o+1]);var a=i.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof Ee&&arguments[0]instanceof te&&arguments[1]instanceof x){var u=arguments[0],l=arguments[1],c=arguments[2];$r.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)$r.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof Ee&&arguments[0]instanceof rt&&arguments[1]instanceof x){var p=arguments[0],v=arguments[1],w=arguments[2];if(p instanceof qt)$r.computeDistance(p,v,w);else if(p instanceof te)$r.computeDistance(p,v,w);else if(p instanceof Ce)for(var I=p,P=0;P<I.getNumGeometries();P++){var O=I.getGeometryN(P);$r.computeDistance(O,v,w)}else w.setMinimum(p.getCoordinate(),v)}else if(arguments[2]instanceof Ee&&arguments[0]instanceof Z&&arguments[1]instanceof x){var m=arguments[0],_=arguments[1],g=arguments[2],y=m.closestPoint(_);g.setMinimum(y,_)}};var vr=function(){this._g0=null,this._g1=null,this._ptDist=new Ee,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},$l={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};vr.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},vr.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new Vt("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},vr.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},vr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},vr.prototype.computeOrientedDistance=function(t,e,r){var i=new As(e);if(t.apply(i),r.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new Pi(e,this._densifyFrac);t.apply(s),r.setMaximum(s.getMaxPointDistance())}},vr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},vr.prototype.interfaces_=function(){return[]},vr.prototype.getClass=function(){return vr},vr.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new vr(t,e);return r.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new vr(i,s);return a.setDensifyFraction(o),a.distance()}},$l.MaxPointDistanceFilter.get=function(){return As},$l.MaxDensifiedByFractionDistanceFilter.get=function(){return Pi},Object.defineProperties(vr,$l);var As=function(){this._maxPtDist=new Ee,this._minPtDist=new Ee,this._euclideanDist=new $r,this._geom=null;var t=arguments[0];this._geom=t};As.prototype.filter=function(t){this._minPtDist.initialize(),$r.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},As.prototype.getMaxPointDistance=function(){return this._maxPtDist},As.prototype.interfaces_=function(){return[wn]},As.prototype.getClass=function(){return As};var Pi=function(){this._maxPtDist=new Ee,this._minPtDist=new Ee,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Pi.prototype.filter=function(t,e){var r=this;if(e===0)return null;for(var i=t.getCoordinate(e-1),s=t.getCoordinate(e),o=(s.x-i.x)/this._numSubSegs,a=(s.y-i.y)/this._numSubSegs,u=0;u<this._numSubSegs;u++){var l=i.x+u*o,c=i.y+u*a,h=new x(l,c);r._minPtDist.initialize(),$r.computeDistance(r._geom,h,r._minPtDist),r._maxPtDist.setMaximum(r._minPtDist)}},Pi.prototype.isDone=function(){return!1},Pi.prototype.isGeometryChanged=function(){return!1},Pi.prototype.getMaxPointDistance=function(){return this._maxPtDist},Pi.prototype.interfaces_=function(){return[xr]},Pi.prototype.getClass=function(){return Pi};var Ye=function(t,e,r){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=r||null},tc={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Ye.prototype.checkMaximumDistance=function(t,e,r){var i=new vr(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>r){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Tr.toLineString(s[0],s[1])+")"}},Ye.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Ye.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Ye.VERBOSE&&ce.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Ye.prototype.checkNegativeValid=function(){if(!(this._input instanceof te||this._input instanceof Sn||this._input instanceof Ce))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Ye.prototype.getErrorIndicator=function(){return this._errorIndicator},Ye.prototype.checkMinimumDistance=function(t,e,r){var i=new pe(t,e,r);if(this._minDistanceFound=i.distance(),this._minDistanceFound<r){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Tr.toLineString(s[0],s[1])+" )"}},Ye.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Ye.prototype.getErrorLocation=function(){return this._errorLocation},Ye.prototype.getPolygonLines=function(t){for(var e=new U,r=new de(e),i=ei.getPolygons(t),s=i.iterator();s.hasNext();){var o=s.next();o.apply(r)}return t.getFactory().buildGeometry(e)},Ye.prototype.getErrorMessage=function(){return this._errMsg},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye},tc.VERBOSE.get=function(){return!1},tc.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Ye,tc);var ge=function(t,e,r){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=r||null},ec={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};ge.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},ge.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*ge.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new j(this._input.getEnvelopeInternal());e.expandBy(this._distance);var r=new j(this._result.getEnvelopeInternal());r.expandBy(t),r.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(r)),this.report("Envelope")},ge.prototype.checkDistance=function(){var t=new Ye(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},ge.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},ge.prototype.checkPolygonal=function(){this._result instanceof te||this._result instanceof Sn||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},ge.prototype.getErrorIndicator=function(){return this._errorIndicator},ge.prototype.getErrorLocation=function(){return this._errorLocation},ge.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")},ge.prototype.report=function(t){if(!ge.VERBOSE)return null;ce.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},ge.prototype.getErrorMessage=function(){return this._errorMsg},ge.prototype.interfaces_=function(){return[]},ge.prototype.getClass=function(){return ge},ge.isValidMsg=function(t,e,r){var i=new ge(t,e,r);return i.isValid()?null:i.getErrorMessage()},ge.isValid=function(t,e,r){var i=new ge(t,e,r);return!!i.isValid()},ec.VERBOSE.get=function(){return!1},ec.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(ge,ec);var tn=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};tn.prototype.getCoordinates=function(){return this._pts},tn.prototype.size=function(){return this._pts.length},tn.prototype.getCoordinate=function(t){return this._pts[t]},tn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},tn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:Ts.octant(this.getCoordinate(t),this.getCoordinate(t+1))},tn.prototype.setData=function(t){this._data=t},tn.prototype.getData=function(){return this._data},tn.prototype.toString=function(){return Tr.toLineString(new Ht(this._pts))},tn.prototype.interfaces_=function(){return[In]},tn.prototype.getClass=function(){return tn};var oe=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new U,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};oe.prototype.getInteriorIntersection=function(){return this._interiorIntersection},oe.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},oe.prototype.getIntersectionSegments=function(){return this._intSegments},oe.prototype.count=function(){return this._intersectionCount},oe.prototype.getIntersections=function(){return this._intersections},oe.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},oe.prototype.setKeepIntersections=function(t){this._keepIntersections=t},oe.prototype.processIntersections=function(t,e,r,i){if(!this._findAllIntersections&&this.hasIntersection()||t===r&&e===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(r,i);if(!s)return null}var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=u,this._intSegments[3]=l,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},oe.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},oe.prototype.hasIntersection=function(){return this._interiorIntersection!==null},oe.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},oe.prototype.interfaces_=function(){return[Yi]},oe.prototype.getClass=function(){return oe},oe.createAllIntersectionsFinder=function(t){var e=new oe(t);return e.setFindAllIntersections(!0),e},oe.createAnyIntersectionFinder=function(t){return new oe(t)},oe.createIntersectionCounter=function(t){var e=new oe(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Fr=function(){this._li=new zi,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Fr.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},Fr.prototype.getIntersections=function(){return this._segInt.getIntersections()},Fr.prototype.isValid=function(){return this.execute(),this._isValid},Fr.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Fr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new oe(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Kl;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Fr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Kn(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Fr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Tr.toLineString(t[0],t[1])+" and "+Tr.toLineString(t[2],t[3])},Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr},Fr.computeIntersections=function(t){var e=new Fr(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Bi=function n(){this._nv=null;var t=arguments[0];this._nv=new Fr(n.toSegmentStrings(t))};Bi.prototype.checkValid=function(){this._nv.checkValid()},Bi.prototype.interfaces_=function(){return[]},Bi.prototype.getClass=function(){return Bi},Bi.toSegmentStrings=function(t){for(var e=new U,r=t.iterator();r.hasNext();){var i=r.next();e.add(new tn(i.getCoordinates(),i))}return e},Bi.checkValid=function(t){var e=new Bi(t);e.checkValid()};var Rs=function(t){this._mapOp=t};Rs.prototype.map=function(t){for(var e=this,r=new U,i=0;i<t.getNumGeometries();i++){var s=e._mapOp.map(t.getGeometryN(i));s.isEmpty()||r.add(s)}return t.getFactory().createGeometryCollection(pt.toGeometryArray(r))},Rs.prototype.interfaces_=function(){return[]},Rs.prototype.getClass=function(){return Rs},Rs.map=function(t,e){var r=new Rs(e);return r.map(t)};var en=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new U,this._resultLineList=new U;var t=arguments[0],e=arguments[1],r=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=r};en.prototype.collectLines=function(t){for(var e=this,r=this._op.getGraph().getEdgeEnds().iterator();r.hasNext();){var i=r.next();e.collectLineEdge(i,t,e._lineEdgesList),e.collectBoundaryTouchEdge(i,t,e._lineEdgesList)}},en.prototype.labelIsolatedLine=function(t,e){var r=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,r)},en.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},en.prototype.collectLineEdge=function(t,e,r){var i=t.getLabel(),s=t.getEdge();t.isLineEdge()&&!t.isVisited()&<.isResultOfOp(i,e)&&!s.isCovered()&&(r.add(s),t.setVisitedEdge(!0))},en.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var r=e.next();r.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getEdge();if(s.isLineEdge()&&!o.isCoveredSet()){var a=t._op.isCoveredByA(s.getCoordinate());o.setCovered(a)}}},en.prototype.labelIsolatedLines=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?e.labelIsolatedLine(i,0):e.labelIsolatedLine(i,1))}},en.prototype.buildLines=function(t){for(var e=this,r=this._lineEdgesList.iterator();r.hasNext();){var i=r.next(),s=e._geometryFactory.createLineString(i.getCoordinates());e._resultLineList.add(s),i.setInResult(!0)}},en.prototype.collectBoundaryTouchEdge=function(t,e,r){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;ct.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),lt.isResultOfOp(i,e)&&e===lt.INTERSECTION&&(r.add(t.getEdge()),t.setVisitedEdge(!0))},en.prototype.interfaces_=function(){return[]},en.prototype.getClass=function(){return en};var Fs=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new U;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Fs.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var r=this._geometryFactory.createPoint(e);this._resultPointList.add(r)}},Fs.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,r=this._op.getGraph().getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===lt.INTERSECTION)){var s=i.getLabel();lt.isResultOfOp(s,t)&&e.filterCoveredNodeToPoint(i)}}},Fs.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Fs.prototype.interfaces_=function(){return[]},Fs.prototype.getClass=function(){return Fs};var ke=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};ke.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},ke.prototype.transformPolygon=function(t,e){var r=this,i=!0,s=this.transformLinearRing(t.getExteriorRing(),t);(s===null||!(s instanceof En)||s.isEmpty())&&(i=!1);for(var o=new U,a=0;a<t.getNumInteriorRing();a++){var u=r.transformLinearRing(t.getInteriorRingN(a),t);u===null||u.isEmpty()||(u instanceof En||(i=!1),o.add(u))}if(i)return this._factory.createPolygon(s,o.toArray([]));var l=new U;return s!==null&&l.add(s),l.addAll(o),this._factory.buildGeometry(l)},ke.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},ke.prototype.getInputGeometry=function(){return this._inputGeom},ke.prototype.transformMultiLineString=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transformLineString(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},ke.prototype.transformCoordinates=function(t,e){return this.copy(t)},ke.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},ke.prototype.transformMultiPoint=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transformPoint(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},ke.prototype.transformMultiPolygon=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transformPolygon(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},ke.prototype.copy=function(t){return t.copy()},ke.prototype.transformGeometryCollection=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transform(t.getGeometryN(s));o!==null&&(r._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(pt.toGeometryArray(i)):this._factory.buildGeometry(i)},ke.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof We)return this.transformPoint(t,null);if(t instanceof Eo)return this.transformMultiPoint(t,null);if(t instanceof En)return this.transformLinearRing(t,null);if(t instanceof qt)return this.transformLineString(t,null);if(t instanceof Wi)return this.transformMultiLineString(t,null);if(t instanceof te)return this.transformPolygon(t,null);if(t instanceof Sn)return this.transformMultiPolygon(t,null);if(t instanceof Ce)return this.transformGeometryCollection(t,null);throw new Vt("Unknown Geometry subtype: "+t.getClass().getName())},ke.prototype.transformLinearRing=function(t,e){var r=this.transformCoordinates(t.getCoordinateSequence(),t);if(r===null)return this._factory.createLinearRing(null);var i=r.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(r):this._factory.createLinearRing(r)},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke};var On=function n(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Z,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof qt&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];n.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=n.isClosed(r),this._snapTolerance=i}};On.prototype.snapVertices=function(t,e){for(var r=this,i=this._isClosed?t.size()-1:t.size(),s=0;s<i;s++){var o=t.get(s),a=r.findSnapForVertex(o,e);a!==null&&(t.set(s,new x(a)),s===0&&r._isClosed&&t.set(t.size()-1,new x(a)))}},On.prototype.findSnapForVertex=function(t,e){for(var r=this,i=0;i<e.length;i++){if(t.equals2D(e[i]))return null;if(t.distance(e[i])<r._snapTolerance)return e[i]}return null},On.prototype.snapTo=function(t){var e=new Oa(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var r=e.toCoordinateArray();return r},On.prototype.snapSegments=function(t,e){var r=this;if(e.length===0)return null;var i=e.length;e[0].equals2D(e[e.length-1])&&(i=e.length-1);for(var s=0;s<i;s++){var o=e[s],a=r.findSegmentIndexToSnap(o,t);a>=0&&t.add(a+1,new x(o),!1)}},On.prototype.findSegmentIndexToSnap=function(t,e){for(var r=this,i=ot.MAX_VALUE,s=-1,o=0;o<e.size()-1;o++){if(r._seg.p0=e.get(o),r._seg.p1=e.get(o+1),r._seg.p0.equals2D(t)||r._seg.p1.equals2D(t)){if(r._allowSnappingToSourceVertices)continue;return-1}var a=r._seg.distance(t);a<r._snapTolerance&&a<i&&(i=a,s=o)}return s},On.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},On.prototype.interfaces_=function(){return[]},On.prototype.getClass=function(){return On},On.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var Bt=function(t){this._srcGeom=t||null},Fd={SNAP_PRECISION_FACTOR:{configurable:!0}};Bt.prototype.snapTo=function(t,e){var r=this.extractTargetCoordinates(t),i=new kd(e,r);return i.transform(this._srcGeom)},Bt.prototype.snapToSelf=function(t,e){var r=this.extractTargetCoordinates(this._srcGeom),i=new kd(t,r,!0),s=i.transform(this._srcGeom),o=s;return e&&nt(o,yi)&&(o=s.buffer(0)),o},Bt.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),r=e/10;return r},Bt.prototype.extractTargetCoordinates=function(t){for(var e=new qr,r=t.getCoordinates(),i=0;i<r.length;i++)e.add(r[i]);return e.toArray(new Array(0).fill(null))},Bt.prototype.computeMinimumSegmentLength=function(t){for(var e=ot.MAX_VALUE,r=0;r<t.length-1;r++){var i=t[r].distance(t[r+1]);i<e&&(e=i)}return e},Bt.prototype.interfaces_=function(){return[]},Bt.prototype.getClass=function(){return Bt},Bt.snap=function(t,e,r){var i=new Array(2).fill(null),s=new Bt(t);i[0]=s.snapTo(e,r);var o=new Bt(e);return i[1]=o.snapTo(i[0],r),i},Bt.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=Bt.computeSizeBasedSnapTolerance(t),r=t.getPrecisionModel();if(r.getType()===Pt.FIXED){var i=1/r.getScale()*2/1.415;i>e&&(e=i)}return e}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min(Bt.computeOverlaySnapTolerance(s),Bt.computeOverlaySnapTolerance(o))}},Bt.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),r=Math.min(e.getHeight(),e.getWidth()),i=r*Bt.SNAP_PRECISION_FACTOR;return i},Bt.snapToSelf=function(t,e,r){var i=new Bt(t);return i.snapToSelf(e,r)},Fd.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Bt,Fd);var kd=function(n){function t(e,r,i){n.call(this),this._snapTolerance=e||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(r,i){var s=new On(r,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},t.prototype.transformCoordinates=function(r,i){var s=r.toCoordinateArray(),o=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ke),Oe=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Oe.prototype.getCommon=function(){return ot.longBitsToDouble(this._commonBits)},Oe.prototype.add=function(t){var e=ot.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=Oe.signExpBits(this._commonBits),this._isFirst=!1,null;var r=Oe.signExpBits(e);if(r!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Oe.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=Oe.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},Oe.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=ot.longBitsToDouble(t),r=ot.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+r,s=i.substring(i.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return o}},Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe},Oe.getBit=function(t,e){var r=1<<e;return(t&r)!==0?1:0},Oe.signExpBits=function(t){return t>>52},Oe.zeroLowerBits=function(t,e){var r=(1<<e)-1,i=~r,s=t&i;return s},Oe.numCommonMostSigMantissaBits=function(t,e){for(var r=0,i=52;i>=0;i--){if(Oe.getBit(t,i)!==Oe.getBit(e,i))return r;r++}return 52};var bi=function(){this._commonCoord=null,this._ccFilter=new ks},rc={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};bi.prototype.addCommonBits=function(t){var e=new Ni(this._commonCoord);t.apply(e),t.geometryChanged()},bi.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new x(this._commonCoord);e.x=-e.x,e.y=-e.y;var r=new Ni(e);return t.apply(r),t.geometryChanged(),t},bi.prototype.getCommonCoordinate=function(){return this._commonCoord},bi.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},bi.prototype.interfaces_=function(){return[]},bi.prototype.getClass=function(){return bi},rc.CommonCoordinateFilter.get=function(){return ks},rc.Translater.get=function(){return Ni},Object.defineProperties(bi,rc);var ks=function(){this._commonBitsX=new Oe,this._commonBitsY=new Oe};ks.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},ks.prototype.getCommonCoordinate=function(){return new x(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},ks.prototype.interfaces_=function(){return[wn]},ks.prototype.getClass=function(){return ks};var Ni=function(){this.trans=null;var t=arguments[0];this.trans=t};Ni.prototype.filter=function(t,e){var r=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,r),t.setOrdinate(e,1,i)},Ni.prototype.isDone=function(){return!1},Ni.prototype.isGeometryChanged=function(){return!0},Ni.prototype.interfaces_=function(){return[xr]},Ni.prototype.getClass=function(){return Ni};var ae=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};ae.prototype.selfSnap=function(t){var e=new Bt(t),r=e.snapTo(t,this._snapTolerance);return r},ae.prototype.removeCommonBits=function(t){this._cbr=new bi,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},ae.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},ae.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),r=lt.overlayOp(e[0],e[1],t);return this.prepareResult(r)},ae.prototype.checkValid=function(t){t.isValid()||ce.out.println("Snapped geometry is invalid")},ae.prototype.computeSnapTolerance=function(){this._snapTolerance=Bt.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ae.prototype.snap=function(t){var e=this.removeCommonBits(t),r=Bt.snap(e[0],e[1],this._snapTolerance);return r},ae.prototype.interfaces_=function(){return[]},ae.prototype.getClass=function(){return ae},ae.overlayOp=function(t,e,r){var i=new ae(t,e);return i.getResultGeometry(r)},ae.union=function(t,e){return ae.overlayOp(t,e,lt.UNION)},ae.intersection=function(t,e){return ae.overlayOp(t,e,lt.INTERSECTION)},ae.symDifference=function(t,e){return ae.overlayOp(t,e,lt.SYMDIFFERENCE)},ae.difference=function(t,e){return ae.overlayOp(t,e,lt.DIFFERENCE)};var De=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};De.prototype.getResultGeometry=function(t){var e=null,r=!1,i=null;try{e=lt.overlayOp(this._geom[0],this._geom[1],t);var s=!0;s&&(r=!0)}catch(o){if(o instanceof Yn)i=o;else throw o}finally{}if(!r)try{e=ae.overlayOp(this._geom[0],this._geom[1],t)}catch(o){throw o instanceof Yn?i:o}finally{}return e},De.prototype.interfaces_=function(){return[]},De.prototype.getClass=function(){return De},De.overlayOp=function(t,e,r){var i=new De(t,e);return i.getResultGeometry(r)},De.union=function(t,e){return De.overlayOp(t,e,lt.UNION)},De.intersection=function(t,e){return De.overlayOp(t,e,lt.INTERSECTION)},De.symDifference=function(t,e){return De.overlayOp(t,e,lt.SYMDIFFERENCE)},De.difference=function(t,e){return De.overlayOp(t,e,lt.DIFFERENCE)};var Xa=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};Xa.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},Xa.prototype.interfaces_=function(){return[]},Xa.prototype.getClass=function(){return Xa};var He=function n(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=n.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._eventType=n.INSERT,this._label=r,this._xValue=i,this._obj=s}},nc={INSERT:{configurable:!0},DELETE:{configurable:!0}};He.prototype.isDelete=function(){return this._eventType===He.DELETE},He.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},He.prototype.getObject=function(){return this._obj},He.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},He.prototype.getInsertEvent=function(){return this._insertEvent},He.prototype.isInsert=function(){return this._eventType===He.INSERT},He.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},He.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},He.prototype.interfaces_=function(){return[cr]},He.prototype.getClass=function(){return He},nc.INSERT.get=function(){return 1},nc.DELETE.get=function(){return 2},Object.defineProperties(He,nc);var Uu=function(){};Uu.prototype.interfaces_=function(){return[]},Uu.prototype.getClass=function(){return Uu};var me=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],r=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=r};me.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(me.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},me.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},me.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},me.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},me.prototype.isBoundaryPointInternal=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next(),s=i.getCoordinate();if(t.isIntersection(s))return!0}return!1},me.prototype.hasProperIntersection=function(){return this._hasProper},me.prototype.hasIntersection=function(){return this._hasIntersection},me.prototype.isDone=function(){return this._isDone},me.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},me.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},me.prototype.addIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),r.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},me.prototype.interfaces_=function(){return[]},me.prototype.getClass=function(){return me},me.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var oy=function(n){function t(){n.call(this),this.events=new U,this.nOverlaps=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var r=this;Lr.sort(this.events);for(var i=0;i<this.events.size();i++){var s=r.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var r=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var o=r.events.get(s);if(o.isInsert()&&r.processOverlaps(s,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof me&&nt(arguments[0],Or)&&nt(arguments[1],Or)){var a=arguments[0],u=arguments[1],l=arguments[2];this.addEdges(a,a),this.addEdges(u,u),this.computeIntersections(l)}else if(typeof arguments[2]=="boolean"&&nt(arguments[0],Or)&&arguments[1]instanceof me){var c=arguments[0],h=arguments[1],p=arguments[2];p?this.addEdges(c,null):this.addEdges(c),this.computeIntersections(h)}}},t.prototype.addEdge=function(r,i){for(var s=this,o=r.getMonotoneChainEdge(),a=o.getStartIndexes(),u=0;u<a.length-1;u++){var l=new Xa(o,u),c=new He(i,o.getMinX(u),l);s.events.add(c),s.events.add(new He(o.getMaxX(u),c))}},t.prototype.processOverlaps=function(r,i,s,o){for(var a=this,u=s.getObject(),l=r;l<i;l++){var c=a.events.get(l);if(c.isInsert()){var h=c.getObject();s.isSameLabel(c)||(u.computeIntersections(h,o),a.nOverlaps++)}}},t.prototype.addEdges=function(){var r=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var o=s.next();r.addEdge(o,o)}else if(arguments.length===2)for(var a=arguments[0],u=arguments[1],l=a.iterator();l.hasNext();){var c=l.next();r.addEdge(c,u)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Uu),Dn=function(){this._min=ot.POSITIVE_INFINITY,this._max=ot.NEGATIVE_INFINITY},Vd={NodeComparator:{configurable:!0}};Dn.prototype.getMin=function(){return this._min},Dn.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},Dn.prototype.getMax=function(){return this._max},Dn.prototype.toString=function(){return Tr.toLineString(new x(this._min,0),new x(this._max,0))},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Vd.NodeComparator.get=function(){return Ya},Object.defineProperties(Dn,Vd);var Ya=function(){};Ya.prototype.compare=function(t,e){var r=t,i=e,s=(r._min+r._max)/2,o=(i._min+i._max)/2;return s<o?-1:s>o?1:0},Ya.prototype.interfaces_=function(){return[lo]},Ya.prototype.getClass=function(){return Ya};var ay=function(n){function t(){n.call(this),this._item=null;var e=arguments[0],r=arguments[1],i=arguments[2];this._min=e,this._max=r,this._item=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;s.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Dn),uy=function(n){function t(){n.call(this),this._node1=null,this._node2=null;var e=arguments[0],r=arguments[1];this._node1=e,this._node2=r,this.buildExtent(this._node1,this._node2)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(r,i){this._min=Math.min(r._min,i._min),this._max=Math.max(r._max,i._max)},t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;this._node1!==null&&this._node1.query(r,i,s),this._node2!==null&&this._node2.query(r,i,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Dn),xn=function(){this._leaves=new U,this._root=null,this._level=0};xn.prototype.buildTree=function(){var t=this;Lr.sort(this._leaves,new Dn.NodeComparator);for(var e=this._leaves,r=null,i=new U;;){if(t.buildLevel(e,i),i.size()===1)return i.get(0);r=e,e=i,i=r}},xn.prototype.insert=function(t,e,r){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new ay(t,e,r))},xn.prototype.query=function(t,e,r){this.init(),this._root.query(t,e,r)},xn.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},xn.prototype.printNode=function(t){ce.out.println(Tr.toLineString(new x(t._min,this._level),new x(t._max,this._level)))},xn.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},xn.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var r=0;r<t.size();r+=2){var i=t.get(r),s=r+1<t.size()?t.get(r):null;if(s===null)e.add(i);else{var o=new uy(t.get(r),t.get(r+1));e.add(o)}}},xn.prototype.interfaces_=function(){return[]},xn.prototype.getClass=function(){return xn};var To=function(){this._items=new U};To.prototype.visitItem=function(t){this._items.add(t)},To.prototype.getItems=function(){return this._items},To.prototype.interfaces_=function(){return[_i]},To.prototype.getClass=function(){return To};var Oo=function(){this._index=null;var t=arguments[0];if(!nt(t,yi))throw new Vt("Argument must be Polygonal");this._index=new ji(t)},ic={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Oo.prototype.locate=function(t){var e=new Wr(t),r=new Do(e);return this._index.query(t.y,t.y,r),e.getLocation()},Oo.prototype.interfaces_=function(){return[Po]},Oo.prototype.getClass=function(){return Oo},ic.SegmentVisitor.get=function(){return Do},ic.IntervalIndexedGeometry.get=function(){return ji},Object.defineProperties(Oo,ic);var Do=function(){this._counter=null;var t=arguments[0];this._counter=t};Do.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},Do.prototype.interfaces_=function(){return[_i]},Do.prototype.getClass=function(){return Do};var ji=function(){this._index=new xn;var t=arguments[0];this.init(t)};ji.prototype.init=function(t){for(var e=this,r=de.getLines(t),i=r.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();e.addLine(o)}},ji.prototype.addLine=function(t){for(var e=this,r=1;r<t.length;r++){var i=new Z(t[r-1],t[r]),s=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);e._index.insert(s,o,i)}},ji.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new To;return this._index.query(t,e,r),r.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];this._index.query(i,s,o)}},ji.prototype.interfaces_=function(){return[]},ji.prototype.getClass=function(){return ji};var Ha=function(n){function t(){if(n.call(this),this._parentGeom=null,this._lineEdgeMap=new _d,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Rr,arguments.length===2){var e=arguments[0],r=arguments[1],i=fr.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=r,this._boundaryNodeRule=i,r!==null&&this.add(r)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=s,this._parentGeom=o,this._boundaryNodeRule=a,o!==null&&this.add(o)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(r,i){var s=this._nodes.addNode(i),o=s.getLabel(),a=1,u=R.NONE;u=o.getLocation(r,z.ON),u===R.BOUNDARY&&a++;var l=t.determineBoundary(this._boundaryNodeRule,a);o.setLocation(r,l)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.computeSelfNodes(r,i,!1)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2],u=new me(s,!0,!1);u.setIsDoneIfProperInt(a);var l=this.createEdgeSetIntersector(),c=this._parentGeom instanceof En||this._parentGeom instanceof te||this._parentGeom instanceof Sn,h=o||!c;return l.computeIntersections(this._edges,u,h),this.addSelfIntersectionNodes(this._argIndex),u}},t.prototype.computeSplitEdges=function(r){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(r)}},t.prototype.computeEdgeIntersections=function(r,i,s){var o=new me(i,s,!0);o.setBoundaryNodes(this.getBoundaryNodes(),r.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,r._edges,o),o},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof We){var r=arguments[0],i=r.getCoordinate();this.insertPoint(this._argIndex,i,R.INTERIOR)}else if(arguments[0]instanceof x){var s=arguments[0];this.insertPoint(this._argIndex,s,R.INTERIOR)}},t.prototype.addPolygon=function(r){var i=this;this.addPolygonRing(r.getExteriorRing(),R.EXTERIOR,R.INTERIOR);for(var s=0;s<r.getNumInteriorRing();s++){var o=r.getInteriorRingN(s);i.addPolygonRing(o,R.INTERIOR,R.EXTERIOR)}},t.prototype.addEdge=function(r){this.insertEdge(r);var i=r.getCoordinates();this.insertPoint(this._argIndex,i[0],R.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],R.BOUNDARY)},t.prototype.addLineString=function(r){var i=dt.removeRepeatedPoints(r.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new zu(i,new Ot(this._argIndex,R.INTERIOR));this._lineEdgeMap.put(r,s),this.insertEdge(s),ct.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var r=this.getBoundaryNodes(),i=new Array(r.size()).fill(null),s=0,o=r.iterator();o.hasNext();){var a=o.next();i[s++]=a.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(r,i,s){if(this.isBoundaryNode(r,i))return null;s===R.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(r,i):this.insertPoint(r,i,s)},t.prototype.addPolygonRing=function(r,i,s){if(r.isEmpty())return null;var o=dt.removeRepeatedPoints(r.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,u=s;W.isCCW(o)&&(a=s,u=i);var l=new zu(o,new Ot(this._argIndex,R.BOUNDARY,a,u));this._lineEdgeMap.put(r,l),this.insertEdge(l),this.insertPoint(this._argIndex,o[0],R.BOUNDARY)},t.prototype.insertPoint=function(r,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new Ot(r,s):a.setLocation(r,s)},t.prototype.createEdgeSetIntersector=function(){return new oy},t.prototype.addSelfIntersectionNodes=function(r){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var o=s.next(),a=o.getLabel().getLocation(r),u=o.eiList.iterator();u.hasNext();){var l=u.next();i.addSelfIntersectionNode(r,l.coord,a)}},t.prototype.add=function(){if(arguments.length===1){var r=arguments[0];if(r.isEmpty())return null;if(r instanceof Sn&&(this._useBoundaryDeterminationRule=!1),r instanceof te)this.addPolygon(r);else if(r instanceof qt)this.addLineString(r);else if(r instanceof We)this.addPoint(r);else if(r instanceof Eo)this.addCollection(r);else if(r instanceof Wi)this.addCollection(r);else if(r instanceof Sn)this.addCollection(r);else if(r instanceof Ce)this.addCollection(r);else throw new Error(r.getClass().getName())}else return n.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(r){for(var i=this,s=0;s<r.getNumGeometries();s++){var o=r.getGeometryN(s);i.add(o)}},t.prototype.locate=function(r){return nt(this._parentGeom,yi)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new Oo(this._parentGeom)),this._areaPtLocator.locate(r)):this._ptLocator.locate(r,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var r=arguments[0];return this._lineEdgeMap.get(r)}else return n.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(r,i){return r.isInBoundary(i)?R.BOUNDARY:R.INTERIOR},t}(Wt),xo=function(){if(this._li=new zi,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Ha(0,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=fr.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(r.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(r.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ha(0,e,i),this._arg[1]=new Ha(1,r,i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];s.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ha(0,s,a),this._arg[1]=new Ha(1,o,a)}};xo.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},xo.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},xo.prototype.interfaces_=function(){return[]},xo.prototype.getClass=function(){return xo};var Zi=function(){};Zi.prototype.interfaces_=function(){return[]},Zi.prototype.getClass=function(){return Zi},Zi.map=function(){if(arguments[0]instanceof rt&&nt(arguments[1],Zi.MapOp)){for(var t=arguments[0],e=arguments[1],r=new U,i=0;i<t.getNumGeometries();i++){var s=e.map(t.getGeometryN(i));s!==null&&r.add(s)}return t.getFactory().buildGeometry(r)}else if(nt(arguments[0],$t)&&nt(arguments[1],Zi.MapOp)){for(var o=arguments[0],a=arguments[1],u=new U,l=o.iterator();l.hasNext();){var c=l.next(),h=a.map(c);h!==null&&u.add(h)}return u}},Zi.MapOp=function(){};var lt=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r),this._ptLocator=new Rr,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Ar,this._resultPolyList=new U,this._resultLineList=new U,this._resultPointList=new U,this._graph=new Wt(new Od),this._geomFact=e.getFactory()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(r){var i=this._edgeList.findEqualEdge(r);if(i!==null){var s=i.getLabel(),o=r.getLabel();i.isPointwiseEqual(r)||(o=new Ot(r.getLabel()),o.flip());var a=i.getDepth();a.isNull()&&a.add(s),a.add(o),s.merge(o)}else this._edgeList.add(r)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var r=this._graph.getEdgeEnds().iterator();r.hasNext();){var i=r.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},t.prototype.isCoveredByLA=function(r){return!!(this.isCovered(r,this._resultLineList)||this.isCovered(r,this._resultPolyList))},t.prototype.computeGeometry=function(r,i,s,o){var a=new U;return a.addAll(r),a.addAll(i),a.addAll(s),a.isEmpty()?t.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},t.prototype.mergeSymLabels=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(r,i){for(var s=this,o=i.iterator();o.hasNext();){var a=o.next(),u=s._ptLocator.locate(r,a);if(u!==R.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var r=new U,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),r.add(s.getCollapsedEdge()))}this._edgeList.addAll(r)},t.prototype.updateNodeLabelling=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},t.prototype.getResultGeometry=function(r){return this.computeOverlay(r),this._resultGeom},t.prototype.insertUniqueEdges=function(r){for(var i=this,s=r.iterator();s.hasNext();){var o=s.next();i.insertUniqueEdge(o)}},t.prototype.computeOverlay=function(r){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new U;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Bi.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(r),this.cancelDuplicateResultEdges();var s=new qe(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new en(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(r);var a=new Fs(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(r),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,r)},t.prototype.labelIncompleteNode=function(r,i){var s=this._ptLocator.locate(r.getCoordinate(),this._arg[i].getGeometry());r.getLabel().setLocation(i,s)},t.prototype.copyPoints=function(r){for(var i=this,s=this._arg[r].getNodeIterator();s.hasNext();){var o=s.next(),a=i._graph.addNode(o.getCoordinate());a.setLabel(r,o.getLabel().getLocation(r))}},t.prototype.findResultAreaEdges=function(r){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.isArea()&&!s.isInteriorAreaEdge()&&t.isResultOfOp(o.getLocation(0,z.RIGHT),o.getLocation(1,z.RIGHT),r)&&s.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var r=this._edgeList.iterator();r.hasNext();){var i=r.next(),s=i.getLabel(),o=i.getDepth();if(!o.isNull()){o.normalize();for(var a=0;a<2;a++)!s.isNull(a)&&s.isArea()&&!o.isNull(a)&&(o.getDelta(a)===0?s.toLine(a):(ct.isTrue(!o.isNull(a,z.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,z.LEFT,o.getLocation(a,z.LEFT)),ct.isTrue(!o.isNull(a,z.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,z.RIGHT,o.getLocation(a,z.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(r._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();s.isIsolated()&&(o.isNull(0)?r.labelIncompleteNode(s,0):r.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(o)}},t.prototype.isCoveredByA=function(r){return!!this.isCovered(r,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(xo);lt.overlayOp=function(n,t,e){var r=new lt(n,t),i=r.getResultGeometry(e);return i},lt.intersection=function(n,t){if(n.isEmpty()||t.isEmpty())return lt.createEmptyResult(lt.INTERSECTION,n,t,n.getFactory());if(n.isGeometryCollection()){var e=t;return Rs.map(n,{interfaces_:function(){return[Zi.MapOp]},map:function(r){return r.intersection(e)}})}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),De.overlayOp(n,t,lt.INTERSECTION)},lt.symDifference=function(n,t){if(n.isEmpty()||t.isEmpty()){if(n.isEmpty()&&t.isEmpty())return lt.createEmptyResult(lt.SYMDIFFERENCE,n,t,n.getFactory());if(n.isEmpty())return t.copy();if(t.isEmpty())return n.copy()}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),De.overlayOp(n,t,lt.SYMDIFFERENCE)},lt.resultDimension=function(n,t,e){var r=t.getDimension(),i=e.getDimension(),s=-1;switch(n){case lt.INTERSECTION:s=Math.min(r,i);break;case lt.UNION:s=Math.max(r,i);break;case lt.DIFFERENCE:s=r;break;case lt.SYMDIFFERENCE:s=Math.max(r,i);break}return s},lt.createEmptyResult=function(n,t,e,r){var i=null;switch(lt.resultDimension(n,t,e)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon();break}return i},lt.difference=function(n,t){return n.isEmpty()?lt.createEmptyResult(lt.DIFFERENCE,n,t,n.getFactory()):t.isEmpty()?n.copy():(n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),De.overlayOp(n,t,lt.DIFFERENCE))},lt.isResultOfOp=function(){if(arguments.length===2){var n=arguments[0],t=arguments[1],e=n.getLocation(0),r=n.getLocation(1);return lt.isResultOfOp(e,r,t)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===R.BOUNDARY&&(i=R.INTERIOR),s===R.BOUNDARY&&(s=R.INTERIOR),o){case lt.INTERSECTION:return i===R.INTERIOR&&s===R.INTERIOR;case lt.UNION:return i===R.INTERIOR||s===R.INTERIOR;case lt.DIFFERENCE:return i===R.INTERIOR&&s!==R.INTERIOR;case lt.SYMDIFFERENCE:return i===R.INTERIOR&&s!==R.INTERIOR||i!==R.INTERIOR&&s===R.INTERIOR}return!1}},lt.INTERSECTION=1,lt.UNION=2,lt.DIFFERENCE=3,lt.SYMDIFFERENCE=4;var Ti=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Rr,this._seg=new Z;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};Ti.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,r=0;r<this._linework.getNumGeometries();r++)for(var i=e._linework.getGeometryN(r),s=i.getCoordinateSequence(),o=0;o<s.size()-1;o++){s.getCoordinate(o,e._seg.p0),s.getCoordinate(o+1,e._seg.p1);var a=e._seg.distance(t);if(a<=e._boundaryDistanceTolerance)return!0}return!1},Ti.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?R.BOUNDARY:this._ptLocator.locate(t,this._g)},Ti.prototype.extractLinework=function(t){var e=new Mo;t.apply(e);var r=e.getLinework(),i=pt.toLineStringArray(r);return t.getFactory().createMultiLineString(i)},Ti.prototype.interfaces_=function(){return[]},Ti.prototype.getClass=function(){return Ti};var Mo=function(){this._linework=null,this._linework=new U};Mo.prototype.getLinework=function(){return this._linework},Mo.prototype.filter=function(t){var e=this;if(t instanceof te){var r=t;this._linework.add(r.getExteriorRing());for(var i=0;i<r.getNumInteriorRing();i++)e._linework.add(r.getInteriorRingN(i))}},Mo.prototype.interfaces_=function(){return[Xr]},Mo.prototype.getClass=function(){return Mo};var Ki=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Ki.prototype.extractPoints=function(t,e,r){for(var i=this,s=t.getCoordinates(),o=0;o<s.length-1;o++)i.computeOffsetPoints(s[o],s[o+1],e,r)},Ki.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Ki.prototype.getPoints=function(t){for(var e=this,r=new U,i=de.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();e.extractPoints(o,t,r)}return r},Ki.prototype.computeOffsetPoints=function(t,e,r,i){var s=e.x-t.x,o=e.y-t.y,a=Math.sqrt(s*s+o*o),u=r*s/a,l=r*o/a,c=(e.x+t.x)/2,h=(e.y+t.y)/2;if(this._doLeft){var p=new x(c-l,h+u);i.add(p)}if(this._doRight){var v=new x(c+l,h-u);i.add(v)}},Ki.prototype.interfaces_=function(){return[]},Ki.prototype.getClass=function(){return Ki};var or=function n(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=n.TOLERANCE,this._testCoords=new U;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=n.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,r],this._locFinder=[new Ti(this._geom[0],this._boundaryDistanceTolerance),new Ti(this._geom[1],this._boundaryDistanceTolerance),new Ti(this._geom[2],this._boundaryDistanceTolerance)]},zd={TOLERANCE:{configurable:!0}};or.prototype.reportResult=function(t,e,r){ce.out.println("Overlay result invalid - A:"+R.toLocationSymbol(e[0])+" B:"+R.toLocationSymbol(e[1])+" expected:"+(r?"i":"e")+" actual:"+R.toLocationSymbol(e[2]))},or.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},or.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=0;r<this._testCoords.size();r++){var i=t._testCoords.get(r);if(!t.checkValid(e,i))return t._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),or.hasLocation(this._location,R.BOUNDARY)?!0:this.isValidResult(s,this._location)}},or.prototype.addTestPts=function(t){var e=new Ki(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},or.prototype.isValidResult=function(t,e){var r=lt.isResultOfOp(e[0],e[1],t),i=e[2]===R.INTERIOR,s=!(r^i);return s||this.reportResult(t,e,r),s},or.prototype.getInvalidLocation=function(){return this._invalidLocation},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.hasLocation=function(t,e){for(var r=0;r<3;r++)if(t[r]===e)return!0;return!1},or.computeBoundaryDistanceTolerance=function(t,e){return Math.min(Bt.computeSizeBasedSnapTolerance(t),Bt.computeSizeBasedSnapTolerance(e))},or.isValid=function(t,e,r,i){var s=new or(t,e,i);return s.isValid(r)},zd.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(or,zd);var ar=function n(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=n.extractFactory(t),this._inputGeoms=t};ar.prototype.extractElements=function(t,e){var r=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);r._skipEmpty&&s.isEmpty()||e.add(s)}},ar.prototype.combine=function(){for(var t=this,e=new U,r=this._inputGeoms.iterator();r.hasNext();){var i=r.next();t.extractElements(i,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},ar.combine=function(){if(arguments.length===1){var t=arguments[0],e=new ar(t);return e.combine()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new ar(ar.createList(r,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2],l=new ar(ar.createList(o,a,u));return l.combine()}},ar.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},ar.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new U;return r.add(t),r.add(e),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new U;return a.add(i),a.add(s),a.add(o),a}};var Kt=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new U)},Ud={STRTREE_NODE_CAPACITY:{configurable:!0}};Kt.prototype.reduceToGeometries=function(t){for(var e=this,r=new U,i=t.iterator();i.hasNext();){var s=i.next(),o=null;nt(s,Or)?o=e.unionTree(s):s instanceof rt&&(o=s),r.add(o)}return r},Kt.prototype.extractByEnvelope=function(t,e,r){for(var i=new U,s=0;s<e.getNumGeometries();s++){var o=e.getGeometryN(s);o.getEnvelopeInternal().intersects(t)?i.add(o):r.add(o)}return this._geomFactory.buildGeometry(i)},Kt.prototype.unionOptimized=function(t,e){var r=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!r.intersects(i)){var s=ar.combine(t,e);return s}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var o=r.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,o)},Kt.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new Cd(Kt.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var r=e.next();t.insert(r.getEnvelopeInternal(),r)}this._inputPolys=null;var i=t.itemsTree(),s=this.unionTree(i);return s},Kt.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2];if(i-r<=1){var s=Kt.getGeometry(e,r);return this.unionSafe(s,null)}else{if(i-r===2)return this.unionSafe(Kt.getGeometry(e,r),Kt.getGeometry(e,r+1));var o=Math.trunc((i+r)/2),a=this.binaryUnion(e,r,o),u=this.binaryUnion(e,o,i);return this.unionSafe(a,u)}}},Kt.prototype.repeatedUnion=function(t){for(var e=null,r=t.iterator();r.hasNext();){var i=r.next();e===null?e=i.copy():e=e.union(i)}return e},Kt.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},Kt.prototype.unionActual=function(t,e){return Kt.restrictToPolygons(t.union(e))},Kt.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),r=this.binaryUnion(e);return r},Kt.prototype.unionUsingEnvelopeIntersection=function(t,e,r){var i=new U,s=this.extractByEnvelope(r,t,i),o=this.extractByEnvelope(r,e,i),a=this.unionActual(s,o);i.add(a);var u=ar.combine(i);return u},Kt.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),r=e.buildGeometry(t),i=r.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],o=arguments[1],a=s.getFactory(),u=a.createGeometryCollection([s,o]),l=u.buffer(0);return l}},Kt.prototype.interfaces_=function(){return[]},Kt.prototype.getClass=function(){return Kt},Kt.restrictToPolygons=function(t){if(nt(t,yi))return t;var e=ei.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(pt.toPolygonArray(e))},Kt.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Kt.union=function(t){var e=new Kt(t);return e.union()},Ud.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Kt,Ud);var Gu=function(){};Gu.prototype.interfaces_=function(){return[]},Gu.prototype.getClass=function(){return Gu},Gu.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return lt.createEmptyResult(lt.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),De.overlayOp(t,e,lt.UNION)};function Qi(){return new Wu}function Wu(){this.reset()}Wu.prototype={constructor:Wu,reset:function(){this.s=this.t=0},add:function(n){Gd(qu,n,this.t),Gd(this,qu.s,this.s),this.s?this.t+=qu.t:this.s=qu.t},valueOf:function(){return this.s}};var qu=new Wu;function Gd(n,t,e){var r=n.s=t+e,i=r-t,s=r-i;n.t=t-s+(e-i)}var Qt=1e-6,Mt=Math.PI,ri=Mt/2,Wd=Mt/4,ni=Mt*2,$i=180/Mt,rn=Mt/180,xe=Math.abs,ly=Math.atan,Lo=Math.atan2,re=Math.cos,ne=Math.sin,Ao=Math.sqrt;function qd(n){return n>1?0:n<-1?Mt:Math.acos(n)}function Vs(n){return n>1?ri:n<-1?-ri:Math.asin(n)}function Ja(){}function Xu(n,t){n&&Yd.hasOwnProperty(n.type)&&Yd[n.type](n,t)}var Xd={Feature:function(n,t){Xu(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)Xu(e[r].geometry,t)}},Yd={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){sc(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)sc(e[r],t,0)},Polygon:function(n,t){Hd(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)Hd(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)Xu(e[r],t)}};function sc(n,t,e){var r=-1,i=n.length-e,s;for(t.lineStart();++r<i;)s=n[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function Hd(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)sc(n[e],t,1);t.polygonEnd()}function cy(n,t){n&&Xd.hasOwnProperty(n.type)?Xd[n.type](n,t):Xu(n,t)}Qi(),Qi();function oc(n){return[Lo(n[1],n[0]),Vs(n[2])]}function Ro(n){var t=n[0],e=n[1],r=re(e);return[r*re(t),r*ne(t),ne(e)]}function Yu(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function Hu(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function ac(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Ju(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function uc(n){var t=Ao(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}Qi();function Jd(n,t){function e(r,i){return r=n(r,i),t(r[0],r[1])}return n.invert&&t.invert&&(e.invert=function(r,i){return r=t.invert(r,i),r&&n.invert(r[0],r[1])}),e}function lc(n,t){return[n>Mt?n-ni:n<-Mt?n+ni:n,t]}lc.invert=lc;function hy(n,t,e){return(n%=ni)?t||e?Jd(jd(n),Zd(t,e)):jd(n):t||e?Zd(t,e):lc}function Bd(n){return function(t,e){return t+=n,[t>Mt?t-ni:t<-Mt?t+ni:t,e]}}function jd(n){var t=Bd(n);return t.invert=Bd(-n),t}function Zd(n,t){var e=re(n),r=ne(n),i=re(t),s=ne(t);function o(a,u){var l=re(u),c=re(a)*l,h=ne(a)*l,p=ne(u),v=p*e+c*r;return[Lo(h*i-v*s,c*e-p*r),Vs(v*i+h*s)]}return o.invert=function(a,u){var l=re(u),c=re(a)*l,h=ne(a)*l,p=ne(u),v=p*i-h*s;return[Lo(h*i+p*s,c*e+v*r),Vs(v*e-c*r)]},o}function fy(n,t,e,r,i,s){if(e){var o=re(t),a=ne(t),u=r*e;i==null?(i=t+r*ni,s=t-u/2):(i=Kd(o,i),s=Kd(o,s),(r>0?i<s:i>s)&&(i+=r*ni));for(var l,c=i;r>0?c>s:c<s;c-=u)l=oc([o,-a*re(c),-a*ne(c)]),n.point(l[0],l[1])}}function Kd(n,t){t=Ro(t),t[0]-=n,uc(t);var e=qd(-t[1]);return((-t[2]<0?-e:e)+ni-Qt)%ni}function Qd(){var n=[],t;return{point:function(e,r){t.push([e,r])},lineStart:function(){n.push(t=[])},lineEnd:Ja,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function dy(n,t,e,r,i,s){var o=n[0],a=n[1],u=t[0],l=t[1],c=0,h=1,p=u-o,v=l-a,w;if(w=e-o,!(!p&&w>0)){if(w/=p,p<0){if(w<c)return;w<h&&(h=w)}else if(p>0){if(w>h)return;w>c&&(c=w)}if(w=i-o,!(!p&&w<0)){if(w/=p,p<0){if(w>h)return;w>c&&(c=w)}else if(p>0){if(w<c)return;w<h&&(h=w)}if(w=r-a,!(!v&&w>0)){if(w/=v,v<0){if(w<c)return;w<h&&(h=w)}else if(v>0){if(w>h)return;w>c&&(c=w)}if(w=s-a,!(!v&&w<0)){if(w/=v,v<0){if(w>h)return;w>c&&(c=w)}else if(v>0){if(w<c)return;w<h&&(h=w)}return c>0&&(n[0]=o+c*p,n[1]=a+c*v),h<1&&(t[0]=o+h*p,t[1]=a+h*v),!0}}}}}function Bu(n,t){return xe(n[0]-t[0])<Qt&&xe(n[1]-t[1])<Qt}function ju(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function $d(n,t,e,r,i){var s=[],o=[],a,u;if(n.forEach(function(w){if(!((I=w.length-1)<=0)){var I,P=w[0],O=w[I],m;if(Bu(P,O)){for(i.lineStart(),a=0;a<I;++a)i.point((P=w[a])[0],P[1]);i.lineEnd();return}s.push(m=new ju(P,w,null,!0)),o.push(m.o=new ju(P,null,m,!1)),s.push(m=new ju(O,w,null,!1)),o.push(m.o=new ju(O,null,m,!0))}}),!!s.length){for(o.sort(t),tp(s),tp(o),a=0,u=o.length;a<u;++a)o[a].e=e=!e;for(var l=s[0],c,h;;){for(var p=l,v=!0;p.v;)if((p=p.n)===l)return;c=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(v)for(a=0,u=c.length;a<u;++a)i.point((h=c[a])[0],h[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(v)for(c=p.p.z,a=c.length-1;a>=0;--a)i.point((h=c[a])[0],h[1]);else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,c=p.z,v=!v}while(!p.v);i.lineEnd()}}}function tp(n){if(t=n.length){for(var t,e=0,r=n[0],i;++e<t;)r.n=i=n[e],i.p=r,r=i;r.n=i=n[0],i.p=r}}function ep(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function py(n){return n.length===1&&(n=gy(n)),{left:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)<0?r=s+1:i=s}return r},right:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)>0?i=s:r=s+1}return r}}}function gy(n){return function(t,e){return ep(n(t),e)}}py(ep);function rp(n){for(var t=n.length,e,r=-1,i=0,s,o;++r<t;)i+=n[r].length;for(s=new Array(i);--t>=0;)for(o=n[t],e=o.length;--e>=0;)s[--i]=o[e];return s}var Zu=1e9,Ku=-1e9;function my(n,t,e,r){function i(l,c){return n<=l&&l<=e&&t<=c&&c<=r}function s(l,c,h,p){var v=0,w=0;if(l==null||(v=o(l,h))!==(w=o(c,h))||u(l,c)<0^h>0)do p.point(v===0||v===3?n:e,v>1?r:t);while((v=(v+h+4)%4)!==w);else p.point(c[0],c[1])}function o(l,c){return xe(l[0]-n)<Qt?c>0?0:3:xe(l[0]-e)<Qt?c>0?2:1:xe(l[1]-t)<Qt?c>0?1:0:c>0?3:2}function a(l,c){return u(l.x,c.x)}function u(l,c){var h=o(l,1),p=o(c,1);return h!==p?h-p:h===0?c[1]-l[1]:h===1?l[0]-c[0]:h===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,h=Qd(),p,v,w,I,P,O,m,_,g,y,E,C={point:b,lineStart:D,lineEnd:A,polygonStart:M,polygonEnd:N};function b(Y,G){i(Y,G)&&c.point(Y,G)}function T(){for(var Y=0,G=0,K=v.length;G<K;++G)for(var at=v[G],ht=1,X=at.length,H=at[0],B,gt,Dt=H[0],St=H[1];ht<X;++ht)B=Dt,gt=St,H=at[ht],Dt=H[0],St=H[1],gt<=r?St>r&&(Dt-B)*(r-gt)>(St-gt)*(n-B)&&++Y:St<=r&&(Dt-B)*(r-gt)<(St-gt)*(n-B)&&--Y;return Y}function M(){c=h,p=[],v=[],E=!0}function N(){var Y=T(),G=E&&Y,K=(p=rp(p)).length;(G||K)&&(l.polygonStart(),G&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),K&&$d(p,a,Y,s,l),l.polygonEnd()),c=l,p=v=w=null}function D(){C.point=F,v&&v.push(w=[]),y=!0,g=!1,m=_=NaN}function A(){p&&(F(I,P),O&&g&&h.rejoin(),p.push(h.result())),C.point=b,g&&c.lineEnd()}function F(Y,G){var K=i(Y,G);if(v&&w.push([Y,G]),y)I=Y,P=G,O=K,y=!1,K&&(c.lineStart(),c.point(Y,G));else if(K&&g)c.point(Y,G);else{var at=[m=Math.max(Ku,Math.min(Zu,m)),_=Math.max(Ku,Math.min(Zu,_))],ht=[Y=Math.max(Ku,Math.min(Zu,Y)),G=Math.max(Ku,Math.min(Zu,G))];dy(at,ht,n,t,e,r)?(g||(c.lineStart(),c.point(at[0],at[1])),c.point(ht[0],ht[1]),K||c.lineEnd(),E=!1):K&&(c.lineStart(),c.point(Y,G),E=!1)}m=Y,_=G,g=K}return C}}var cc=Qi();function vy(n,t){var e=t[0],r=t[1],i=[ne(e),-re(e),0],s=0,o=0;cc.reset();for(var a=0,u=n.length;a<u;++a)if(c=(l=n[a]).length)for(var l,c,h=l[c-1],p=h[0],v=h[1]/2+Wd,w=ne(v),I=re(v),P=0;P<c;++P,p=m,w=g,I=y,h=O){var O=l[P],m=O[0],_=O[1]/2+Wd,g=ne(_),y=re(_),E=m-p,C=E>=0?1:-1,b=C*E,T=b>Mt,M=w*g;if(cc.add(Lo(M*C*ne(b),I*y+M*re(b))),s+=T?E+C*ni:E,T^p>=e^m>=e){var N=Hu(Ro(h),Ro(O));uc(N);var D=Hu(i,N);uc(D);var A=(T^E>=0?-1:1)*Vs(D[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=T^E>=0?1:-1)}}return(s<-1e-6||s<Qt&&cc<-1e-6)^o&1}Qi();function np(n){return n}Qi(),Qi();var Fo=1/0,Qu=Fo,Ba=-Fo,$u=Ba,ip={point:yy,lineStart:Ja,lineEnd:Ja,polygonStart:Ja,polygonEnd:Ja,result:function(){var n=[[Fo,Qu],[Ba,$u]];return Ba=$u=-(Qu=Fo=1/0),n}};function yy(n,t){n<Fo&&(Fo=n),n>Ba&&(Ba=n),t<Qu&&(Qu=t),t>$u&&($u=t)}Qi();function sp(n,t,e,r){return function(i,s){var o=t(s),a=i.invert(r[0],r[1]),u=Qd(),l=t(u),c=!1,h,p,v,w={point:I,lineStart:O,lineEnd:m,polygonStart:function(){w.point=_,w.lineStart=g,w.lineEnd=y,p=[],h=[]},polygonEnd:function(){w.point=I,w.lineStart=O,w.lineEnd=m,p=rp(p);var E=vy(h,a);p.length?(c||(s.polygonStart(),c=!0),$d(p,wy,E,e,s)):E&&(c||(s.polygonStart(),c=!0),s.lineStart(),e(null,null,1,s),s.lineEnd()),c&&(s.polygonEnd(),c=!1),p=h=null},sphere:function(){s.polygonStart(),s.lineStart(),e(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function I(E,C){var b=i(E,C);n(E=b[0],C=b[1])&&s.point(E,C)}function P(E,C){var b=i(E,C);o.point(b[0],b[1])}function O(){w.point=P,o.lineStart()}function m(){w.point=I,o.lineEnd()}function _(E,C){v.push([E,C]);var b=i(E,C);l.point(b[0],b[1])}function g(){l.lineStart(),v=[]}function y(){_(v[0][0],v[0][1]),l.lineEnd();var E=l.clean(),C=u.result(),b,T=C.length,M,N,D;if(v.pop(),h.push(v),v=null,!!T){if(E&1){if(N=C[0],(M=N.length-1)>0){for(c||(s.polygonStart(),c=!0),s.lineStart(),b=0;b<M;++b)s.point((D=N[b])[0],D[1]);s.lineEnd()}return}T>1&&E&2&&C.push(C.pop().concat(C.shift())),p.push(C.filter(_y))}}return w}}function _y(n){return n.length>1}function wy(n,t){return((n=n.x)[0]<0?n[1]-ri-Qt:ri-n[1])-((t=t.x)[0]<0?t[1]-ri-Qt:ri-t[1])}const op=sp(function(){return!0},Ey,Cy,[-Mt,-ri]);function Ey(n){var t=NaN,e=NaN,r=NaN,i;return{lineStart:function(){n.lineStart(),i=1},point:function(s,o){var a=s>0?Mt:-Mt,u=xe(s-t);xe(u-Mt)<Qt?(n.point(t,e=(e+o)/2>0?ri:-ri),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),n.point(s,e),i=0):r!==a&&u>=Mt&&(xe(t-r)<Qt&&(t-=r*Qt),xe(s-a)<Qt&&(s-=a*Qt),e=Sy(t,e,s,o),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),i=0),n.point(t=s,e=o),r=a},lineEnd:function(){n.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function Sy(n,t,e,r){var i,s,o=ne(n-e);return xe(o)>Qt?ly((ne(t)*(s=re(r))*ne(e)-ne(r)*(i=re(t))*ne(n))/(i*s*o)):(t+r)/2}function Cy(n,t,e,r){var i;if(n==null)i=e*ri,r.point(-Mt,i),r.point(0,i),r.point(Mt,i),r.point(Mt,0),r.point(Mt,-i),r.point(0,-i),r.point(-Mt,-i),r.point(-Mt,0),r.point(-Mt,i);else if(xe(n[0]-t[0])>Qt){var s=n[0]<t[0]?Mt:-Mt;i=e*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function Iy(n,t){var e=re(n),r=e>0,i=xe(e)>Qt;function s(c,h,p,v){fy(v,n,t,p,c,h)}function o(c,h){return re(c)*re(h)>e}function a(c){var h,p,v,w,I;return{lineStart:function(){w=v=!1,I=1},point:function(P,O){var m=[P,O],_,g=o(P,O),y=r?g?0:l(P,O):g?l(P+(P<0?Mt:-Mt),O):0;if(!h&&(w=v=g)&&c.lineStart(),g!==v&&(_=u(h,m),(!_||Bu(h,_)||Bu(m,_))&&(m[0]+=Qt,m[1]+=Qt,g=o(m[0],m[1]))),g!==v)I=0,g?(c.lineStart(),_=u(m,h),c.point(_[0],_[1])):(_=u(h,m),c.point(_[0],_[1]),c.lineEnd()),h=_;else if(i&&h&&r^g){var E;!(y&p)&&(E=u(m,h,!0))&&(I=0,r?(c.lineStart(),c.point(E[0][0],E[0][1]),c.point(E[1][0],E[1][1]),c.lineEnd()):(c.point(E[1][0],E[1][1]),c.lineEnd(),c.lineStart(),c.point(E[0][0],E[0][1])))}g&&(!h||!Bu(h,m))&&c.point(m[0],m[1]),h=m,v=g,p=y},lineEnd:function(){v&&c.lineEnd(),h=null},clean:function(){return I|(w&&v)<<1}}}function u(c,h,p){var v=Ro(c),w=Ro(h),I=[1,0,0],P=Hu(v,w),O=Yu(P,P),m=P[0],_=O-m*m;if(!_)return!p&&c;var g=e*O/_,y=-e*m/_,E=Hu(I,P),C=Ju(I,g),b=Ju(P,y);ac(C,b);var T=E,M=Yu(C,T),N=Yu(T,T),D=M*M-N*(Yu(C,C)-1);if(!(D<0)){var A=Ao(D),F=Ju(T,(-M-A)/N);if(ac(F,C),F=oc(F),!p)return F;var Y=c[0],G=h[0],K=c[1],at=h[1],ht;G<Y&&(ht=Y,Y=G,G=ht);var X=G-Y,H=xe(X-Mt)<Qt,B=H||X<Qt;if(!H&&at<K&&(ht=K,K=at,at=ht),B?H?K+at>0^F[1]<(xe(F[0]-Y)<Qt?K:at):K<=F[1]&&F[1]<=at:X>Mt^(Y<=F[0]&&F[0]<=G)){var gt=Ju(T,(-M+A)/N);return ac(gt,C),[F,oc(gt)]}}}function l(c,h){var p=r?n:Mt-n,v=0;return c<-p?v|=1:c>p&&(v|=2),h<-p?v|=4:h>p&&(v|=8),v}return sp(o,a,s,r?[0,-n]:[-Mt,n-Mt])}function ap(n){return function(t){var e=new hc;for(var r in n)e[r]=n[r];return e.stream=t,e}}function hc(){}hc.prototype={constructor:hc,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function up(n,t,e){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],s=n.clipExtent&&n.clipExtent();n.scale(150).translate([0,0]),s!=null&&n.clipExtent(null),cy(e,n.stream(ip));var o=ip.result(),a=Math.min(r/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),u=+t[0][0]+(r-a*(o[1][0]+o[0][0]))/2,l=+t[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&n.clipExtent(s),n.scale(a*150).translate([u,l])}function Py(n,t,e){return up(n,[[0,0],t],e)}var lp=16,by=re(30*rn);function cp(n,t){return+t?Ty(n,t):Ny(n)}function Ny(n){return ap({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}})}function Ty(n,t){function e(r,i,s,o,a,u,l,c,h,p,v,w,I,P){var O=l-r,m=c-i,_=O*O+m*m;if(_>4*t&&I--){var g=o+p,y=a+v,E=u+w,C=Ao(g*g+y*y+E*E),b=Vs(E/=C),T=xe(xe(E)-1)<Qt||xe(s-h)<Qt?(s+h)/2:Lo(y,g),M=n(T,b),N=M[0],D=M[1],A=N-r,F=D-i,Y=m*A-O*F;(Y*Y/_>t||xe((O*A+m*F)/_-.5)>.3||o*p+a*v+u*w<by)&&(e(r,i,s,o,a,u,N,D,T,g/=C,y/=C,E,I,P),P.point(N,D),e(N,D,T,g,y,E,l,c,h,p,v,w,I,P))}}return function(r){var i,s,o,a,u,l,c,h,p,v,w,I,P={point:O,lineStart:m,lineEnd:g,polygonStart:function(){r.polygonStart(),P.lineStart=y},polygonEnd:function(){r.polygonEnd(),P.lineStart=m}};function O(b,T){b=n(b,T),r.point(b[0],b[1])}function m(){h=NaN,P.point=_,r.lineStart()}function _(b,T){var M=Ro([b,T]),N=n(b,T);e(h,p,c,v,w,I,h=N[0],p=N[1],c=b,v=M[0],w=M[1],I=M[2],lp,r),r.point(h,p)}function g(){P.point=O,r.lineEnd()}function y(){m(),P.point=E,P.lineEnd=C}function E(b,T){_(i=b,T),s=h,o=p,a=v,u=w,l=I,P.point=_}function C(){e(h,p,c,v,w,I,s,o,i,a,u,l,lp,r),P.lineEnd=g,g()}return P}}var Oy=ap({point:function(n,t){this.stream.point(n*rn,t*rn)}});function Dy(n){return xy(function(){return n})()}function xy(n){var t,e=150,r=480,i=250,s,o,a=0,u=0,l=0,c=0,h=0,p,v,w=null,I=op,P=null,O,m,_,g=np,y=.5,E=cp(N,y),C,b;function T(F){return F=v(F[0]*rn,F[1]*rn),[F[0]*e+s,o-F[1]*e]}function M(F){return F=v.invert((F[0]-s)/e,(o-F[1])/e),F&&[F[0]*$i,F[1]*$i]}function N(F,Y){return F=t(F,Y),[F[0]*e+s,o-F[1]*e]}T.stream=function(F){return C&&b===F?C:C=Oy(I(p,E(g(b=F))))},T.clipAngle=function(F){return arguments.length?(I=+F?Iy(w=F*rn,6*rn):(w=null,op),A()):w*$i},T.clipExtent=function(F){return arguments.length?(g=F==null?(P=O=m=_=null,np):my(P=+F[0][0],O=+F[0][1],m=+F[1][0],_=+F[1][1]),A()):P==null?null:[[P,O],[m,_]]},T.scale=function(F){return arguments.length?(e=+F,D()):e},T.translate=function(F){return arguments.length?(r=+F[0],i=+F[1],D()):[r,i]},T.center=function(F){return arguments.length?(a=F[0]%360*rn,u=F[1]%360*rn,D()):[a*$i,u*$i]},T.rotate=function(F){return arguments.length?(l=F[0]%360*rn,c=F[1]%360*rn,h=F.length>2?F[2]%360*rn:0,D()):[l*$i,c*$i,h*$i]},T.precision=function(F){return arguments.length?(E=cp(N,y=F*F),A()):Ao(y)},T.fitExtent=function(F,Y){return up(T,F,Y)},T.fitSize=function(F,Y){return Py(T,F,Y)};function D(){v=Jd(p=hy(l,c,h),t);var F=t(a,u);return s=r-F[0]*e,o=i+F[1]*e,A()}function A(){return C=b=null,T}return function(){return t=n.apply(this,arguments),T.invert=t.invert&&M,D()}}function hp(n){return function(t,e){var r=re(t),i=re(e),s=n(r*i);return[s*i*ne(t),s*ne(e)]}}function fp(n){return function(t,e){var r=Ao(t*t+e*e),i=n(r),s=ne(i),o=re(i);return[Lo(t*s,r*o),Vs(r&&e*s/r)]}}var My=hp(function(n){return Ao(2/(1+n))});My.invert=fp(function(n){return 2*Vs(n/2)});var dp=hp(function(n){return(n=qd(n))&&n/ne(n)});dp.invert=fp(function(n){return n});function Ly(){return Dy(dp).scale(79.4188).clipAngle(180-.001)}function pp(n,t){return[n,t]}pp.invert=pp;function Ay(n,t,e){e=e||{};var r=e.units||"kilometers",i=e.steps||8;if(!n)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(n.type){case"GeometryCollection":return _u(n,function(o){var a=tl(o,t,r,i);a&&s.push(a)}),oo(s);case"FeatureCollection":return yu(n,function(o){var a=tl(o,t,r,i);a&&yu(a,function(u){u&&s.push(u)})}),oo(s)}return tl(n,t,r,i)}function tl(n,t,e,r){var i=n.properties||{},s=n.type==="Feature"?n.geometry:n;if(s.type==="GeometryCollection"){var o=[];return _u(n,function(I){var P=tl(I,t,e,r);P&&o.push(P)}),oo(o)}var a=Ry(s),u={type:s.type,coordinates:mp(s.coordinates,a)},l=new jl,c=l.read(u),h=Dl(xl(t,e),"meters"),p=fe.bufferOp(c,h,r),v=new Ed;if(p=v.write(p),!gp(p.coordinates)){var w={type:p.type,coordinates:vp(p.coordinates,a)};return gn(w,i)}}function gp(n){return Array.isArray(n[0])?gp(n[0]):isNaN(n[0])}function mp(n,t){return typeof n[0]!="object"?t(n):n.map(function(e){return mp(e,t)})}function vp(n,t){return typeof n[0]!="object"?t.invert(n):n.map(function(e){return vp(e,t)})}function Ry(n){var t=Yv(n).geometry.coordinates,e=[-t[0],-t[1]];return Ly().rotate(e).scale(Me)}function Fy(n,t,e){e===void 0&&(e={});for(var r=e.steps||64,i=e.properties?e.properties:!Array.isArray(n)&&n.type==="Feature"&&n.properties?n.properties:{},s=[],o=0;o<r;o++)s.push(ao(n,t,o*-360/r,e).geometry.coordinates);return s.push(s[0]),$e([s],i)}/**
|
|
44
|
+
`)}return t.toString()},we.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.computeLabel(t)}},we.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var r=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),o=s.getLabel(),a=0;a<2;a++)o.isLine(a)&&o.getLocation(a)===R.BOUNDARY&&(r[a]=!0);for(var u=this.iterator();u.hasNext();)for(var l=u.next(),c=l.getLabel(),h=0;h<2;h++)if(c.isAnyNull(h)){var d=R.NONE;if(r[h])d=R.EXTERIOR;else{var g=l.getCoordinate();d=e.getLocation(h,g,t)}c.setAllLocationsIfNull(h,d)}},we.prototype.getDegree=function(){return this._edgeMap.size()},we.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we};var Sy=function(n){function t(){n.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var r=this;this.getResultAreaEdges();for(var i=null,s=null,o=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var u=r._resultAreaEdgeList.get(a),l=u.getSym();if(u.getLabel().isArea())switch(i===null&&u.isInResult()&&(i=u),o){case r._SCANNING_FOR_INCOMING:if(!l.isInResult())continue;s=l,o=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(!u.isInResult())continue;s.setNext(u),o=r._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new Qn("no outgoing dirEdge found",this.getCoordinate());ct.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},t.prototype.insert=function(r){var i=r;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var r=this.getEdges(),i=r.size();if(i<1)return null;var s=r.get(0);if(i===1)return s;var o=r.get(i-1),a=s.getQuadrant(),u=o.getQuadrant();return Dt.isNorthern(a)&&Dt.isNorthern(u)?s:!Dt.isNorthern(a)&&!Dt.isNorthern(u)?o:s.getDy()!==0?s:o.getDy()!==0?o:(ct.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(r){ce.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();r.print("out "),s.print(r),r.println(),r.print("in "),s.getSym().print(r),r.println()}},t.prototype.getResultAreaEdges=function(){var r=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new U;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&r._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(r){for(var i=this.iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.setAllLocationsIfNull(0,r.getLocation(0)),o.setAllLocationsIfNull(1,r.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var r=this;this.getEdges();for(var i=null,s=null,o=this._edgeList.size()-1;o>=0;o--){var a=r._edgeList.get(o),u=a.getSym();s===null&&(s=u),i!==null&&u.setNext(i),i=a}s.setNext(i)},t.prototype.computeDepths=function(){var r=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),o=i.getDepth(z.LEFT),a=i.getDepth(z.RIGHT),u=this.computeDepths(s+1,this._edgeList.size(),o),l=this.computeDepths(0,s,u);if(l!==a)throw new Qn("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var c=arguments[0],h=arguments[1],d=arguments[2],g=d,y=c;y<h;y++){var C=r._edgeList.get(y);C.setEdgeDepths(z.RIGHT,g),g=C.getDepth(z.LEFT)}return g}},t.prototype.mergeSymLabels=function(){for(var r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(r){for(var i=this,s=null,o=null,a=this._SCANNING_FOR_INCOMING,u=this._resultAreaEdgeList.size()-1;u>=0;u--){var l=i._resultAreaEdgeList.get(u),c=l.getSym();switch(s===null&&l.getEdgeRing()===r&&(s=l),a){case i._SCANNING_FOR_INCOMING:if(c.getEdgeRing()!==r)continue;o=c,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(l.getEdgeRing()!==r)continue;o.setNextMin(l),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(ct.isTrue(s!==null,"found null for first outgoing dirEdge"),ct.isTrue(s.getEdgeRing()===r,"unable to link last incoming dirEdge"),o.setNextMin(s))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var r=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&r++}return r}else if(arguments.length===1){for(var o=arguments[0],a=0,u=this.iterator();u.hasNext();){var l=u.next();l.getEdgeRing()===o&&a++}return a}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var r=R.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){r=R.INTERIOR;break}if(o.isInResult()){r=R.EXTERIOR;break}}}if(r===R.NONE)return null;for(var a=r,u=this.iterator();u.hasNext();){var l=u.next(),c=l.getSym();l.isLineEdge()?l.getEdge().setCovered(a===R.INTERIOR):(l.isInResult()&&(a=R.EXTERIOR),c.isInResult()&&(a=R.INTERIOR))}},t.prototype.computeLabelling=function(r){var i=this;n.prototype.computeLabelling.call(this,r),this._label=new Ot(R.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),u=a.getLabel(),l=0;l<2;l++){var c=u.getLocation(l);(c===R.INTERIOR||c===R.BOUNDARY)&&i._label.setLocation(l,R.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(we),Fd=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createNode=function(r){return new Xu(r,new Sy)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(No),Si=function n(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=n.orientation(t)};Si.prototype.compareTo=function(t){var e=t,r=Si.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return r},Si.prototype.interfaces_=function(){return[hr]},Si.prototype.getClass=function(){return Si},Si.orientation=function(t){return dt.increasingDirection(t)===1},Si.compareOriented=function(t,e,r,i){for(var s=e?1:-1,o=i?1:-1,a=e?t.length:-1,u=i?r.length:-1,l=e?0:t.length-1,c=i?0:r.length-1;;){var h=t[l].compareTo(r[c]);if(h!==0)return h;l+=s,c+=o;var d=l===a,g=c===u;if(d&&!g)return-1;if(!d&&g)return 1;if(d&&g)return 0}};var Rr=function(){this._edges=new U,this._ocaMap=new ye};Rr.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var r=0;r<this._edges.size();r++){var i=e._edges.get(r);r>0&&t.print(","),t.print("(");for(var s=i.getCoordinates(),o=0;o<s.length;o++)o>0&&t.print(","),t.print(s[o].x+" "+s[o].y);t.println(")")}t.print(") ")},Rr.prototype.addAll=function(t){for(var e=this,r=t.iterator();r.hasNext();)e.add(r.next())},Rr.prototype.findEdgeIndex=function(t){for(var e=this,r=0;r<this._edges.size();r++)if(e._edges.get(r).equals(t))return r;return-1},Rr.prototype.iterator=function(){return this._edges.iterator()},Rr.prototype.getEdges=function(){return this._edges},Rr.prototype.get=function(t){return this._edges.get(t)},Rr.prototype.findEqualEdge=function(t){var e=new Si(t.getCoordinates()),r=this._ocaMap.get(e);return r},Rr.prototype.add=function(t){this._edges.add(t);var e=new Si(t.getCoordinates());this._ocaMap.put(e,t)},Rr.prototype.interfaces_=function(){return[]},Rr.prototype.getClass=function(){return Rr};var Ji=function(){};Ji.prototype.processIntersections=function(t,e,r,i){},Ji.prototype.isDone=function(){},Ji.prototype.interfaces_=function(){return[]},Ji.prototype.getClass=function(){return Ji};var or=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};or.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(or.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.size()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},or.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},or.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},or.prototype.getLineIntersector=function(){return this._li},or.prototype.hasProperIntersection=function(){return this._hasProper},or.prototype.processIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},or.prototype.hasIntersection=function(){return this._hasIntersection},or.prototype.isDone=function(){return!1},or.prototype.hasInteriorIntersection=function(){return this._hasInterior},or.prototype.interfaces_=function(){return[Ji]},or.prototype.getClass=function(){return or},or.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var Qr=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],r=arguments[2];this.coord=new D(t),this.segmentIndex=e,this.dist=r};Qr.prototype.getSegmentIndex=function(){return this.segmentIndex},Qr.prototype.getCoordinate=function(){return this.coord},Qr.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},Qr.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Qr.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},Qr.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Qr.prototype.getDistance=function(){return this.dist},Qr.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Qr.prototype.interfaces_=function(){return[hr]},Qr.prototype.getClass=function(){return Qr};var Nn=function(){this._nodeMap=new ye,this.edge=null;var t=arguments[0];this.edge=t};Nn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},Nn.prototype.iterator=function(){return this._nodeMap.values().iterator()},Nn.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},Nn.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},Nn.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],o=e.dist>0||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r.edge.pts[l];return o&&(a[u]=e.coord),new Yu(a,new Ot(this.edge._label))},Nn.prototype.add=function(t,e,r){var i=new Qr(t,e,r),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},Nn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();if(r.coord.equals(t))return!0}return!1},Nn.prototype.interfaces_=function(){return[]},Nn.prototype.getClass=function(){return Nn};var Bi=function(){};Bi.prototype.getChainStartIndices=function(t){var e=this,r=0,i=new U;i.add(new Gr(r));do{var s=e.findChainEnd(t,r);i.add(new Gr(s)),r=s}while(r<t.length-1);var o=Bi.toIntArray(i);return o},Bi.prototype.findChainEnd=function(t,e){for(var r=Dt.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){var s=Dt.quadrant(t[i-1],t[i]);if(s!==r)break;i++}return i-1},Bi.prototype.interfaces_=function(){return[]},Bi.prototype.getClass=function(){return Bi},Bi.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var ei=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new j,this.env2=new j;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Bi;this.startIndex=e.getChainStartIndices(this.pts)};ei.prototype.getCoordinates=function(){return this.pts},ei.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e>r?e:r},ei.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e<r?e:r},ei.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[r],e.startIndex[r+1],i)}else if(arguments.length===6){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=arguments[4],c=arguments[5],h=this.pts[s],d=this.pts[o],g=a.pts[u],y=a.pts[l];if(o-s===1&&l-u===1)return c.addIntersections(this.e,s,a.e,u),null;if(this.env1.init(h,d),this.env2.init(g,y),!this.env1.intersects(this.env2))return null;var C=Math.trunc((s+o)/2),P=Math.trunc((u+l)/2);s<C&&(u<P&&this.computeIntersectsForChain(s,C,a,u,P,c),P<l&&this.computeIntersectsForChain(s,C,a,P,l,c)),C<o&&(u<P&&this.computeIntersectsForChain(C,o,a,u,P,c),P<l&&this.computeIntersectsForChain(C,o,a,P,l,c))}},ei.prototype.getStartIndexes=function(){return this.startIndex},ei.prototype.computeIntersects=function(t,e){for(var r=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<t.startIndex.length-1;s++)r.computeIntersectsForChain(i,t,s,e)},ei.prototype.interfaces_=function(){return[]},ei.prototype.getClass=function(){return ei};var he=function n(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var r=0;r<3;r++)t._depth[e][r]=n.NULL_VALUE},kd={NULL_VALUE:{configurable:!0}};he.prototype.getDepth=function(t,e){return this._depth[t][e]},he.prototype.setDepth=function(t,e,r){this._depth[t][e]=r},he.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var r=0;r<3;r++)if(t._depth[e][r]!==he.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===he.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===he.NULL_VALUE}},he.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var r=t._depth[e][1];t._depth[e][2]<r&&(r=t._depth[e][2]),r<0&&(r=0);for(var i=1;i<3;i++){var s=0;t._depth[e][i]>r&&(s=1),t._depth[e][i]=s}}},he.prototype.getDelta=function(t){return this._depth[t][z.RIGHT]-this._depth[t][z.LEFT]},he.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?R.EXTERIOR:R.INTERIOR},he.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},he.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],r=0;r<2;r++)for(var i=1;i<3;i++){var s=e.getLocation(r,i);(s===R.EXTERIOR||s===R.INTERIOR)&&(t.isNull(r,i)?t._depth[r][i]=he.depthAtLocation(s):t._depth[r][i]+=he.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];u===R.INTERIOR&&this._depth[o][a]++}},he.prototype.interfaces_=function(){return[]},he.prototype.getClass=function(){return he},he.depthAtLocation=function(t){return t===R.EXTERIOR?0:t===R.INTERIOR?1:he.NULL_VALUE},kd.NULL_VALUE.get=function(){return-1},Object.defineProperties(he,kd);var Yu=function(n){function t(){if(n.call(this),this.pts=null,this._env=null,this.eiList=new Nn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new he,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var r=new Array(2).fill(null);r[0]=this.pts[0],r[1]=this.pts[1];var i=new t(r,Ot.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(r){this._isIsolated=r},t.prototype.setName=function(r){this._name=r},t.prototype.equals=function(r){var i=this;if(!(r instanceof t))return!1;var s=r;if(this.pts.length!==s.pts.length)return!1;for(var o=!0,a=!0,u=this.pts.length,l=0;l<this.pts.length;l++)if(i.pts[l].equals2D(s.pts[l])||(o=!1),i.pts[l].equals2D(s.pts[--u])||(a=!1),!o&&!a)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var r=arguments[0];return this.pts[r]}},t.prototype.print=function(r){var i=this;r.print("edge "+this._name+": "),r.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&r.print(","),r.print(i.pts[s].x+" "+i.pts[s].y);r.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(r){t.updateIM(this._label,r)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(r){var i=this;r.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)r.print(i.pts[s]+" ");r.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new ei(this)),this._mce},t.prototype.getEnvelope=function(){var r=this;if(this._env===null){this._env=new j;for(var i=0;i<this.pts.length;i++)r._env.expandToInclude(r.pts[i])}return this._env},t.prototype.addIntersection=function(r,i,s,o){var a=new D(r.getIntersection(o)),u=i,l=r.getEdgeDistance(s,o),c=u+1;if(c<this.pts.length){var h=this.pts[c];a.equals2D(h)&&(u=c,l=0)}this.eiList.add(a,u,l)},t.prototype.toString=function(){var r=this,i=new Ur;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(r.pts[s].x+" "+r.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(r){var i=this;if(this.pts.length!==r.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(r.pts[s]))return!1;return!0},t.prototype.setDepthDelta=function(r){this._depthDelta=r},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(r,i,s){for(var o=this,a=0;a<r.getIntersectionNum();a++)o.addIntersection(r,i,s,a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];i.setAtLeastIfValid(r.getLocation(0,z.ON),r.getLocation(1,z.ON),1),r.isArea()&&(i.setAtLeastIfValid(r.getLocation(0,z.LEFT),r.getLocation(1,z.LEFT),2),i.setAtLeastIfValid(r.getLocation(0,z.RIGHT),r.getLocation(1,z.RIGHT),2))}else return n.prototype.updateIM.apply(this,arguments)},t}(nr),be=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Rr,this._bufParams=t||null};be.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},be.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var r=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Ot(t.getLabel()),i.flip()),r.merge(i);var s=be.depthDelta(i),o=e.getDepthDelta(),a=o+s;e.setDepthDelta(a)}else this._edgeList.add(t),t.setDepthDelta(be.depthDelta(t.getLabel()))},be.prototype.buildSubgraphs=function(t,e){for(var r=new U,i=t.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new Ms(r),u=a.getDepth(o);s.computeDepth(u),s.findResultEdges(),r.add(s),e.add(s.getDirectedEdges(),s.getNodes())}},be.prototype.createSubgraphs=function(t){for(var e=new U,r=t.getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isVisited()){var s=new Ie;s.create(i),e.add(s)}}return Ar.sort(e,Ar.reverseOrder()),e},be.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},be.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new lc,r=new Gi;return r.setPrecisionModel(t),e.setSegmentIntersector(new or(r)),e},be.prototype.buffer=function(t,e){var r=this._workingPrecisionModel;r===null&&(r=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new Fe(r,this._bufParams),s=new vr(t,e,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,r),this._graph=new Wt(new Fd),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),u=new Xe(this._geomFact);this.buildSubgraphs(a,u);var l=u.getPolygons();if(l.size()<=0)return this.createEmptyResultGeometry();var c=this._geomFact.buildGeometry(l);return c},be.prototype.computeNodedEdges=function(t,e){var r=this,i=this.getNoder(e);i.computeNodes(t);for(var s=i.getNodedSubstrings(),o=s.iterator();o.hasNext();){var a=o.next(),u=a.getCoordinates();if(!(u.length===2&&u[0].equals2D(u[1]))){var l=a.getData(),c=new Yu(a.getCoordinates(),new Ot(l));r.insertUniqueEdge(c)}}},be.prototype.setNoder=function(t){this._workingNoder=t},be.prototype.interfaces_=function(){return[]},be.prototype.getClass=function(){return be},be.depthDelta=function(t){var e=t.getLocation(0,z.LEFT),r=t.getLocation(0,z.RIGHT);return e===R.INTERIOR&&r===R.EXTERIOR?1:e===R.EXTERIOR&&r===R.INTERIOR?-1:0},be.convertSegStrings=function(t){for(var e=new pt,r=new U;t.hasNext();){var i=t.next(),s=e.createLineString(i.getCoordinates());r.add(s)}return e.buildGeometry(r)};var Ci=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3];this._noder=r,this._scaleFactor=i,this._offsetX=s,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};Ci.prototype.rescale=function(){var t=this;if(nt(arguments[0],$t))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],o=0;o<s.length;o++)s[o].x=s[o].x/t._scaleFactor+t._offsetX,s[o].y=s[o].y/t._scaleFactor+t._offsetY;s.length===2&&s[0].equals2D(s[1])&&ce.out.println(s)}},Ci.prototype.scale=function(){var t=this;if(nt(arguments[0],$t)){for(var e=arguments[0],r=new U,i=e.iterator();i.hasNext();){var s=i.next();r.add(new Jt(t.scale(s.getCoordinates()),s.getData()))}return r}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),u=0;u<o.length;u++)a[u]=new D(Math.round((o[u].x-t._offsetX)*t._scaleFactor),Math.round((o[u].y-t._offsetY)*t._scaleFactor),o[u].z);var l=dt.removeRepeatedPoints(a);return l}},Ci.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},Ci.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},Ci.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},Ci.prototype.interfaces_=function(){return[Hi]},Ci.prototype.getClass=function(){return Ci};var $r=function(){this._li=new Gi,this._segStrings=null;var t=arguments[0];this._segStrings=t},Vd={fact:{configurable:!0}};$r.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next(),i=r.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var u=a.next(),l=u.getCoordinates(),c=1;c<l.length-1;c++)if(l[c].equals(s))throw new Yn("found endpt/interior pt intersection at index "+c+" :pt "+s)}},$r.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var r=e.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();t.checkInteriorIntersections(r,s)}else if(arguments.length===2)for(var o=arguments[0],a=arguments[1],u=o.getCoordinates(),l=a.getCoordinates(),c=0;c<u.length-1;c++)for(var h=0;h<l.length-1;h++)t.checkInteriorIntersections(o,c,a,h);else if(arguments.length===4){var d=arguments[0],g=arguments[1],y=arguments[2],C=arguments[3];if(d===y&&g===C)return null;var P=d.getCoordinates()[g],T=d.getCoordinates()[g+1],v=y.getCoordinates()[C],w=y.getCoordinates()[C+1];if(this._li.computeIntersection(P,T,v,w),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,P,T)||this.hasInteriorIntersection(this._li,v,w)))throw new Yn("found non-noded intersection at "+P+"-"+T+" and "+v+"-"+w)}},$r.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},$r.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next();t.checkCollapses(r)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),o=0;o<s.length-2;o++)t.checkCollapse(s[o],s[o+1],s[o+2])},$r.prototype.hasInteriorIntersection=function(t,e,r){for(var i=0;i<t.getIntersectionNum();i++){var s=t.getIntersection(i);if(!(s.equals(e)||s.equals(r)))return!0}return!1},$r.prototype.checkCollapse=function(t,e,r){if(t.equals(r))throw new Yn("found non-noded collapse at "+$r.fact.createLineString([t,e,r]))},$r.prototype.interfaces_=function(){return[]},$r.prototype.getClass=function(){return $r},Vd.fact.get=function(){return new pt},Object.defineProperties($r,Vd);var ke=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],r=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=r,e<=0)throw new zt("Scale factor must be non-zero");e!==1&&(this._pt=new D(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new D,this._p1Scaled=new D),this.initCorners(this._pt)},zd={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};ke.prototype.intersectsScaled=function(t,e){var r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<r||this._minx>i||this._maxy<s||this._miny>o;if(a)return!1;var u=this.intersectsToleranceSquare(t,e);return ct.isTrue(!(a&&u),"Found bad envelope test"),u},ke.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new D(this._maxx,this._maxy),this._corner[1]=new D(this._minx,this._maxy),this._corner[2]=new D(this._minx,this._miny),this._corner[3]=new D(this._maxx,this._miny)},ke.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ke.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ke.prototype.getCoordinate=function(){return this._originalPt},ke.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ke.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=ke.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new j(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ke.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},ke.prototype.intersectsToleranceSquare=function(t,e){var r=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||r&&i||t.equals(this._pt)||e.equals(this._pt))},ke.prototype.addSnappedNode=function(t,e){var r=t.getCoordinate(e),i=t.getCoordinate(e+1);return this.intersects(r,i)?(t.addIntersection(this.getCoordinate(),e),!0):!1},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},zd.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(ke,zd);var Ka=function(){this.tempEnv1=new j,this.selectedSegment=new Z};Ka.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},Ka.prototype.interfaces_=function(){return[]},Ka.prototype.getClass=function(){return Ka};var Do=function(){this._index=null;var t=arguments[0];this._index=t},Ud={HotPixelSnapAction:{configurable:!0}};Do.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),o=new Gd(e,r,i);return this._index.query(s,{interfaces_:function(){return[wi]},visitItem:function(a){var u=a;u.select(s,o)}}),o.isNodeAdded()}},Do.prototype.interfaces_=function(){return[]},Do.prototype.getClass=function(){return Do},Ud.HotPixelSnapAction.get=function(){return Gd},Object.defineProperties(Do,Ud);var Gd=function(n){function t(){n.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=r,this._hotPixelVertexIndex=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1],s=r.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return n.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ka),Ls=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new U};Ls.prototype.processIntersections=function(t,e,r,i){var s=this;if(t===r&&e===i)return null;var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var c=0;c<this._li.getIntersectionNum();c++)s._interiorIntersections.add(s._li.getIntersection(c));t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)}},Ls.prototype.isDone=function(){return!1},Ls.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Ls.prototype.interfaces_=function(){return[Ji]},Ls.prototype.getClass=function(){return Ls};var Tn=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new Gi,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};Tn.prototype.checkCorrectness=function(t){var e=Jt.getNodedSubstrings(t),r=new $r(e);try{r.checkValid()}catch(i){if(i instanceof wd)i.printStackTrace();else throw i}finally{}},Tn.prototype.getNodedSubstrings=function(){return Jt.getNodedSubstrings(this._nodedSegStrings)},Tn.prototype.snapRound=function(t,e){var r=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(r),this.computeVertexSnaps(t)},Tn.prototype.findInteriorIntersections=function(t,e){var r=new Ls(e);return this._noder.setSegmentIntersector(r),this._noder.computeNodes(t),r.getInteriorIntersections()},Tn.prototype.computeVertexSnaps=function(){var t=this;if(nt(arguments[0],$t))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof Jt)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var u=new ke(o[a],t._scaleFactor,t._li),l=t._pointSnapper.snap(u,s,a);l&&s.addIntersection(o[a],a)}},Tn.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new lc,this._pointSnapper=new Do(this._noder.getIndex()),this.snapRound(t,this._li)},Tn.prototype.computeIntersectionSnaps=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=new ke(i,e._scaleFactor,e._li);e._pointSnapper.snap(s)}},Tn.prototype.interfaces_=function(){return[Hi]},Tn.prototype.getClass=function(){return Tn};var fe=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new bt,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._argGeom=e,this._bufParams=r}},Mo={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};fe.prototype.bufferFixedPrecision=function(t){var e=new Ci(new Tn(new Pt(1)),t.getScale()),r=new be(this._bufParams);r.setWorkingPrecisionModel(t),r.setNoder(e),this._resultGeometry=r.buffer(this._argGeom,this._distance)},fe.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=fe.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(o){if(o instanceof Qn)t._saveException=o;else throw o}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var r=arguments[0],i=fe.precisionScaleFactor(this._argGeom,this._distance,r),s=new Pt(i);this.bufferFixedPrecision(s)}},fe.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Pt.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},fe.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},fe.prototype.bufferOriginalPrecision=function(){try{var t=new be(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof Yn)this._saveException=e;else throw e}finally{}},fe.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},fe.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},fe.prototype.interfaces_=function(){return[]},fe.prototype.getClass=function(){return fe},fe.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new fe(t),i=r.getResultGeometry(e);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof rt&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],u=new fe(s);u.setQuadrantSegments(a);var l=u.getResultGeometry(o);return l}else if(arguments[2]instanceof bt&&arguments[0]instanceof rt&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],d=arguments[2],g=new fe(c,d),y=g.getResultGeometry(h);return y}}else if(arguments.length===4){var C=arguments[0],P=arguments[1],T=arguments[2],v=arguments[3],w=new fe(C);w.setQuadrantSegments(T),w.setEndCapStyle(v);var m=w.getResultGeometry(P);return m}},fe.precisionScaleFactor=function(t,e,r){var i=t.getEnvelopeInternal(),s=rr.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=e>0?e:0,a=s+2*o,u=Math.trunc(Math.log(a)/Math.log(10)+1),l=r-u,c=Math.pow(10,l);return c},Mo.CAP_ROUND.get=function(){return bt.CAP_ROUND},Mo.CAP_BUTT.get=function(){return bt.CAP_FLAT},Mo.CAP_FLAT.get=function(){return bt.CAP_FLAT},Mo.CAP_SQUARE.get=function(){return bt.CAP_SQUARE},Mo.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(fe,Mo);var Ne=function(){this._pt=[new D,new D],this._distance=ot.NaN,this._isNull=!0};Ne.prototype.getCoordinates=function(){return this._pt},Ne.prototype.getCoordinate=function(t){return this._pt[t]},Ne.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},Ne.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Ne.prototype.getDistance=function(){return this._distance},Ne.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne};var On=function(){};On.prototype.interfaces_=function(){return[]},On.prototype.getClass=function(){return On},On.computeDistance=function(){if(arguments[2]instanceof Ne&&arguments[0]instanceof qt&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=t.getCoordinates(),s=new Z,o=0;o<i.length-1;o++){s.setCoordinates(i[o],i[o+1]);var a=s.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof Ne&&arguments[0]instanceof te&&arguments[1]instanceof D){var u=arguments[0],l=arguments[1],c=arguments[2];On.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)On.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof Ne&&arguments[0]instanceof rt&&arguments[1]instanceof D){var d=arguments[0],g=arguments[1],y=arguments[2];if(d instanceof qt)On.computeDistance(d,g,y);else if(d instanceof te)On.computeDistance(d,g,y);else if(d instanceof Ce)for(var C=d,P=0;P<C.getNumGeometries();P++){var T=C.getGeometryN(P);On.computeDistance(T,g,y)}else y.setMinimum(d.getCoordinate(),g)}else if(arguments[2]instanceof Ne&&arguments[0]instanceof Z&&arguments[1]instanceof D){var v=arguments[0],w=arguments[1],m=arguments[2],_=v.closestPoint(w);m.setMinimum(_,w)}};var ji=function(t){this._maxPtDist=new Ne,this._inputGeom=t||null},cc={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};ji.prototype.computeMaxMidpointDistance=function(t){var e=new Ii(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},ji.prototype.computeMaxVertexDistance=function(t){var e=new As(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},ji.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},ji.prototype.getDistancePoints=function(){return this._maxPtDist},ji.prototype.interfaces_=function(){return[]},ji.prototype.getClass=function(){return ji},cc.MaxPointDistanceFilter.get=function(){return As},cc.MaxMidpointDistanceFilter.get=function(){return Ii},Object.defineProperties(ji,cc);var As=function(t){this._maxPtDist=new Ne,this._minPtDist=new Ne,this._geom=t||null};As.prototype.filter=function(t){this._minPtDist.initialize(),On.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},As.prototype.getMaxPointDistance=function(){return this._maxPtDist},As.prototype.interfaces_=function(){return[En]},As.prototype.getClass=function(){return As};var Ii=function(t){this._maxPtDist=new Ne,this._minPtDist=new Ne,this._geom=t||null};Ii.prototype.filter=function(t,e){if(e===0)return null;var r=t.getCoordinate(e-1),i=t.getCoordinate(e),s=new D((r.x+i.x)/2,(r.y+i.y)/2);this._minPtDist.initialize(),On.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ii.prototype.isDone=function(){return!1},Ii.prototype.isGeometryChanged=function(){return!1},Ii.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ii.prototype.interfaces_=function(){return[Mr]},Ii.prototype.getClass=function(){return Ii};var ri=function(t){this._comps=t||null};ri.prototype.filter=function(t){t instanceof te&&this._comps.add(t)},ri.prototype.interfaces_=function(){return[Hr]},ri.prototype.getClass=function(){return ri},ri.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return ri.getPolygons(t,new U)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof te?r.add(e):e instanceof Ce&&e.apply(new ri(r)),r}};var de=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._lines=e,this._isForcedToLineString=r}};de.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof Sn){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof qt&&this._lines.add(t)},de.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},de.prototype.interfaces_=function(){return[Jn]},de.prototype.getClass=function(){return de},de.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(de.getLines(t))}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e.getFactory().buildGeometry(de.getLines(e,r))}},de.getLines=function(){if(arguments.length===1){var t=arguments[0];return de.getLines(t,!1)}else if(arguments.length===2){if(nt(arguments[0],$t)&&nt(arguments[1],$t)){for(var e=arguments[0],r=arguments[1],i=e.iterator();i.hasNext();){var s=i.next();de.getLines(s,r)}return r}else if(arguments[0]instanceof rt&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],u=new U;return o.apply(new de(u,a)),u}else if(arguments[0]instanceof rt&&nt(arguments[1],$t)){var l=arguments[0],c=arguments[1];return l instanceof qt?c.add(l):l.apply(new de(c)),c}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&nt(arguments[0],$t)&&nt(arguments[1],$t)){for(var h=arguments[0],d=arguments[1],g=arguments[2],y=h.iterator();y.hasNext();){var C=y.next();de.getLines(C,d,g)}return d}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof rt&&nt(arguments[1],$t)){var P=arguments[0],T=arguments[1],v=arguments[2];return P.apply(new de(T,v)),T}}};var Fr=function(){if(this._boundaryRule=dr.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new zt("Rule must be non-null");this._boundaryRule=t}}};Fr.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof D&&arguments[1]instanceof te){var e=arguments[0],r=arguments[1];if(r.isEmpty())return R.EXTERIOR;var i=r.getExteriorRing(),s=this.locateInPolygonRing(e,i);if(s===R.EXTERIOR)return R.EXTERIOR;if(s===R.BOUNDARY)return R.BOUNDARY;for(var o=0;o<r.getNumInteriorRing();o++){var a=r.getInteriorRingN(o),u=t.locateInPolygonRing(e,a);if(u===R.INTERIOR)return R.EXTERIOR;if(u===R.BOUNDARY)return R.BOUNDARY}return R.INTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof qt){var l=arguments[0],c=arguments[1];if(!c.getEnvelopeInternal().intersects(l))return R.EXTERIOR;var h=c.getCoordinates();return!c.isClosed()&&(l.equals(h[0])||l.equals(h[h.length-1]))?R.BOUNDARY:W.isOnLine(l,h)?R.INTERIOR:R.EXTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof qe){var d=arguments[0],g=arguments[1],y=g.getCoordinate();return y.equals2D(d)?R.INTERIOR:R.EXTERIOR}},Fr.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?W.locatePointInRing(t,e.getCoordinates()):R.EXTERIOR},Fr.prototype.intersects=function(t,e){return this.locate(t,e)!==R.EXTERIOR},Fr.prototype.updateLocationInfo=function(t){t===R.INTERIOR&&(this._isIn=!0),t===R.BOUNDARY&&this._numBoundaries++},Fr.prototype.computeLocation=function(t,e){var r=this;if(e instanceof qe&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof qt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof te)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Xi)for(var i=e,s=0;s<i.getNumGeometries();s++){var o=i.getGeometryN(s);r.updateLocationInfo(r.locateInternal(t,o))}else if(e instanceof Cn)for(var a=e,u=0;u<a.getNumGeometries();u++){var l=a.getGeometryN(u);r.updateLocationInfo(r.locateInternal(t,l))}else if(e instanceof Ce)for(var c=new bn(e);c.hasNext();){var h=c.next();h!==e&&r.computeLocation(t,h)}},Fr.prototype.locate=function(t,e){return e.isEmpty()?R.EXTERIOR:e instanceof qt?this.locateInternal(t,e):e instanceof te?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?R.BOUNDARY:this._numBoundaries>0||this._isIn?R.INTERIOR:R.EXTERIOR)},Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr};var Te=function n(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];n.call(this,t,n.INSIDE_AREA,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._component=r,this._segIndex=i,this._pt=s}},Wd={INSIDE_AREA:{configurable:!0}};Te.prototype.isInsideArea=function(){return this._segIndex===Te.INSIDE_AREA},Te.prototype.getCoordinate=function(){return this._pt},Te.prototype.getGeometryComponent=function(){return this._component},Te.prototype.getSegmentIndex=function(){return this._segIndex},Te.prototype.interfaces_=function(){return[]},Te.prototype.getClass=function(){return Te},Wd.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Te,Wd);var Pi=function(t){this._pts=t||null};Pi.prototype.filter=function(t){t instanceof qe&&this._pts.add(t)},Pi.prototype.interfaces_=function(){return[Hr]},Pi.prototype.getClass=function(){return Pi},Pi.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof qe?Ar.singletonList(t):Pi.getPoints(t,new U)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof qe?r.add(e):e instanceof Ce&&e.apply(new Pi(r)),r}};var Rs=function(){this._locations=null;var t=arguments[0];this._locations=t};Rs.prototype.filter=function(t){(t instanceof qe||t instanceof qt||t instanceof te)&&this._locations.add(new Te(t,0,t.getCoordinate()))},Rs.prototype.interfaces_=function(){return[Hr]},Rs.prototype.getClass=function(){return Rs},Rs.getLocations=function(t){var e=new U;return t.apply(new Rs(e)),e};var pe=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Fr,this._minDistanceLocation=null,this._minDistance=ot.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=r,this._geom[1]=i,this._terminateDistance=s}};pe.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=1-r,o=ri.getPolygons(this._geom[r]);if(o.size()>0){var a=Rs.getLocations(this._geom[s]);if(this.computeContainmentDistance(a,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[r]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&nt(arguments[0],xr)&&nt(arguments[1],xr)){for(var u=arguments[0],l=arguments[1],c=arguments[2],h=0;h<u.size();h++)for(var d=u.get(h),g=0;g<l.size();g++)if(t.computeContainmentDistance(d,l.get(g),c),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Te&&arguments[1]instanceof te){var y=arguments[0],C=arguments[1],P=arguments[2],T=y.getCoordinate();if(R.EXTERIOR!==this._ptLocator.locate(T,C))return this._minDistance=0,P[0]=y,P[1]=new Te(C,T),null}}},pe.prototype.computeMinDistanceLinesPoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},pe.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=de.getLines(this._geom[0]),r=de.getLines(this._geom[1]),i=Pi.getPoints(this._geom[0]),s=Pi.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,s,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(r,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,s,t),this.updateMinDistance(t,!1)},pe.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},pe.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},pe.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},pe.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof qt&&arguments[1]instanceof qe){var e=arguments[0],r=arguments[1],i=arguments[2];if(e.getEnvelopeInternal().distance(r.getEnvelopeInternal())>this._minDistance)return null;for(var s=e.getCoordinates(),o=r.getCoordinate(),a=0;a<s.length-1;a++){var u=W.distancePointLine(o,s[a],s[a+1]);if(u<t._minDistance){t._minDistance=u;var l=new Z(s[a],s[a+1]),c=l.closestPoint(o);i[0]=new Te(e,a,c),i[1]=new Te(r,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof qt&&arguments[1]instanceof qt){var h=arguments[0],d=arguments[1],g=arguments[2];if(h.getEnvelopeInternal().distance(d.getEnvelopeInternal())>this._minDistance)return null;for(var y=h.getCoordinates(),C=d.getCoordinates(),P=0;P<y.length-1;P++)for(var T=0;T<C.length-1;T++){var v=W.distanceLineLine(y[P],y[P+1],C[T],C[T+1]);if(v<t._minDistance){t._minDistance=v;var w=new Z(y[P],y[P+1]),m=new Z(C[T],C[T+1]),_=w.closestPoints(m);g[0]=new Te(h,P,_[0]),g[1]=new Te(d,T,_[1])}if(t._minDistance<=t._terminateDistance)return null}}}},pe.prototype.computeMinDistancePoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a),l=o.getCoordinate().distance(u.getCoordinate());if(l<i._minDistance&&(i._minDistance=l,r[0]=new Te(o,0,o.getCoordinate()),r[1]=new Te(u,0,u.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},pe.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new zt("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},pe.prototype.computeMinDistanceLines=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},pe.prototype.interfaces_=function(){return[]},pe.prototype.getClass=function(){return pe},pe.distance=function(t,e){var r=new pe(t,e);return r.distance()},pe.isWithinDistance=function(t,e,r){var i=new pe(t,e,r);return i.distance()<=r},pe.nearestPoints=function(t,e){var r=new pe(t,e);return r.nearestPoints()};var Ee=function(){this._pt=[new D,new D],this._distance=ot.NaN,this._isNull=!0};Ee.prototype.getCoordinates=function(){return this._pt},Ee.prototype.getCoordinate=function(t){return this._pt[t]},Ee.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},Ee.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Ee.prototype.toString=function(){return Or.toLineString(this._pt[0],this._pt[1])},Ee.prototype.getDistance=function(){return this._distance},Ee.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},Ee.prototype.interfaces_=function(){return[]},Ee.prototype.getClass=function(){return Ee};var tn=function(){};tn.prototype.interfaces_=function(){return[]},tn.prototype.getClass=function(){return tn},tn.computeDistance=function(){if(arguments[2]instanceof Ee&&arguments[0]instanceof qt&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=new Z,s=t.getCoordinates(),o=0;o<s.length-1;o++){i.setCoordinates(s[o],s[o+1]);var a=i.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof Ee&&arguments[0]instanceof te&&arguments[1]instanceof D){var u=arguments[0],l=arguments[1],c=arguments[2];tn.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)tn.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof Ee&&arguments[0]instanceof rt&&arguments[1]instanceof D){var d=arguments[0],g=arguments[1],y=arguments[2];if(d instanceof qt)tn.computeDistance(d,g,y);else if(d instanceof te)tn.computeDistance(d,g,y);else if(d instanceof Ce)for(var C=d,P=0;P<C.getNumGeometries();P++){var T=C.getGeometryN(P);tn.computeDistance(T,g,y)}else y.setMinimum(d.getCoordinate(),g)}else if(arguments[2]instanceof Ee&&arguments[0]instanceof Z&&arguments[1]instanceof D){var v=arguments[0],w=arguments[1],m=arguments[2],_=v.closestPoint(w);m.setMinimum(_,w)}};var yr=function(){this._g0=null,this._g1=null,this._ptDist=new Ee,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},hc={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};yr.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},yr.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new zt("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},yr.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},yr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},yr.prototype.computeOrientedDistance=function(t,e,r){var i=new Fs(e);if(t.apply(i),r.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new bi(e,this._densifyFrac);t.apply(s),r.setMaximum(s.getMaxPointDistance())}},yr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},yr.prototype.interfaces_=function(){return[]},yr.prototype.getClass=function(){return yr},yr.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new yr(t,e);return r.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new yr(i,s);return a.setDensifyFraction(o),a.distance()}},hc.MaxPointDistanceFilter.get=function(){return Fs},hc.MaxDensifiedByFractionDistanceFilter.get=function(){return bi},Object.defineProperties(yr,hc);var Fs=function(){this._maxPtDist=new Ee,this._minPtDist=new Ee,this._euclideanDist=new tn,this._geom=null;var t=arguments[0];this._geom=t};Fs.prototype.filter=function(t){this._minPtDist.initialize(),tn.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Fs.prototype.getMaxPointDistance=function(){return this._maxPtDist},Fs.prototype.interfaces_=function(){return[En]},Fs.prototype.getClass=function(){return Fs};var bi=function(){this._maxPtDist=new Ee,this._minPtDist=new Ee,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};bi.prototype.filter=function(t,e){var r=this;if(e===0)return null;for(var i=t.getCoordinate(e-1),s=t.getCoordinate(e),o=(s.x-i.x)/this._numSubSegs,a=(s.y-i.y)/this._numSubSegs,u=0;u<this._numSubSegs;u++){var l=i.x+u*o,c=i.y+u*a,h=new D(l,c);r._minPtDist.initialize(),tn.computeDistance(r._geom,h,r._minPtDist),r._maxPtDist.setMaximum(r._minPtDist)}},bi.prototype.isDone=function(){return!1},bi.prototype.isGeometryChanged=function(){return!1},bi.prototype.getMaxPointDistance=function(){return this._maxPtDist},bi.prototype.interfaces_=function(){return[Mr]},bi.prototype.getClass=function(){return bi};var Ye=function(t,e,r){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=r||null},fc={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Ye.prototype.checkMaximumDistance=function(t,e,r){var i=new yr(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>r){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Or.toLineString(s[0],s[1])+")"}},Ye.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Ye.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Ye.VERBOSE&&ce.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Ye.prototype.checkNegativeValid=function(){if(!(this._input instanceof te||this._input instanceof Cn||this._input instanceof Ce))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Ye.prototype.getErrorIndicator=function(){return this._errorIndicator},Ye.prototype.checkMinimumDistance=function(t,e,r){var i=new pe(t,e,r);if(this._minDistanceFound=i.distance(),this._minDistanceFound<r){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Or.toLineString(s[0],s[1])+" )"}},Ye.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Ye.prototype.getErrorLocation=function(){return this._errorLocation},Ye.prototype.getPolygonLines=function(t){for(var e=new U,r=new de(e),i=ri.getPolygons(t),s=i.iterator();s.hasNext();){var o=s.next();o.apply(r)}return t.getFactory().buildGeometry(e)},Ye.prototype.getErrorMessage=function(){return this._errMsg},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye},fc.VERBOSE.get=function(){return!1},fc.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Ye,fc);var ge=function(t,e,r){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=r||null},dc={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};ge.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},ge.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*ge.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new j(this._input.getEnvelopeInternal());e.expandBy(this._distance);var r=new j(this._result.getEnvelopeInternal());r.expandBy(t),r.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(r)),this.report("Envelope")},ge.prototype.checkDistance=function(){var t=new Ye(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},ge.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},ge.prototype.checkPolygonal=function(){this._result instanceof te||this._result instanceof Cn||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},ge.prototype.getErrorIndicator=function(){return this._errorIndicator},ge.prototype.getErrorLocation=function(){return this._errorLocation},ge.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")},ge.prototype.report=function(t){if(!ge.VERBOSE)return null;ce.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},ge.prototype.getErrorMessage=function(){return this._errorMsg},ge.prototype.interfaces_=function(){return[]},ge.prototype.getClass=function(){return ge},ge.isValidMsg=function(t,e,r){var i=new ge(t,e,r);return i.isValid()?null:i.getErrorMessage()},ge.isValid=function(t,e,r){var i=new ge(t,e,r);return!!i.isValid()},dc.VERBOSE.get=function(){return!1},dc.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(ge,dc);var en=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};en.prototype.getCoordinates=function(){return this._pts},en.prototype.size=function(){return this._pts.length},en.prototype.getCoordinate=function(t){return this._pts[t]},en.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},en.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:xs.octant(this.getCoordinate(t),this.getCoordinate(t+1))},en.prototype.setData=function(t){this._data=t},en.prototype.getData=function(){return this._data},en.prototype.toString=function(){return Or.toLineString(new Yt(this._pts))},en.prototype.interfaces_=function(){return[Pn]},en.prototype.getClass=function(){return en};var oe=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new U,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};oe.prototype.getInteriorIntersection=function(){return this._interiorIntersection},oe.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},oe.prototype.getIntersectionSegments=function(){return this._intSegments},oe.prototype.count=function(){return this._intersectionCount},oe.prototype.getIntersections=function(){return this._intersections},oe.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},oe.prototype.setKeepIntersections=function(t){this._keepIntersections=t},oe.prototype.processIntersections=function(t,e,r,i){if(!this._findAllIntersections&&this.hasIntersection()||t===r&&e===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(r,i);if(!s)return null}var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=u,this._intSegments[3]=l,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},oe.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},oe.prototype.hasIntersection=function(){return this._interiorIntersection!==null},oe.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},oe.prototype.interfaces_=function(){return[Ji]},oe.prototype.getClass=function(){return oe},oe.createAllIntersectionsFinder=function(t){var e=new oe(t);return e.setFindAllIntersections(!0),e},oe.createAnyIntersectionFinder=function(t){return new oe(t)},oe.createIntersectionCounter=function(t){var e=new oe(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var kr=function(){this._li=new Gi,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};kr.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},kr.prototype.getIntersections=function(){return this._segInt.getIntersections()},kr.prototype.isValid=function(){return this.execute(),this._isValid},kr.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},kr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new oe(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new lc;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},kr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Qn(this.getErrorMessage(),this._segInt.getInteriorIntersection())},kr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Or.toLineString(t[0],t[1])+" and "+Or.toLineString(t[2],t[3])},kr.prototype.interfaces_=function(){return[]},kr.prototype.getClass=function(){return kr},kr.computeIntersections=function(t){var e=new kr(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Zi=function n(){this._nv=null;var t=arguments[0];this._nv=new kr(n.toSegmentStrings(t))};Zi.prototype.checkValid=function(){this._nv.checkValid()},Zi.prototype.interfaces_=function(){return[]},Zi.prototype.getClass=function(){return Zi},Zi.toSegmentStrings=function(t){for(var e=new U,r=t.iterator();r.hasNext();){var i=r.next();e.add(new en(i.getCoordinates(),i))}return e},Zi.checkValid=function(t){var e=new Zi(t);e.checkValid()};var ks=function(t){this._mapOp=t};ks.prototype.map=function(t){for(var e=this,r=new U,i=0;i<t.getNumGeometries();i++){var s=e._mapOp.map(t.getGeometryN(i));s.isEmpty()||r.add(s)}return t.getFactory().createGeometryCollection(pt.toGeometryArray(r))},ks.prototype.interfaces_=function(){return[]},ks.prototype.getClass=function(){return ks},ks.map=function(t,e){var r=new ks(e);return r.map(t)};var rn=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new U,this._resultLineList=new U;var t=arguments[0],e=arguments[1],r=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=r};rn.prototype.collectLines=function(t){for(var e=this,r=this._op.getGraph().getEdgeEnds().iterator();r.hasNext();){var i=r.next();e.collectLineEdge(i,t,e._lineEdgesList),e.collectBoundaryTouchEdge(i,t,e._lineEdgesList)}},rn.prototype.labelIsolatedLine=function(t,e){var r=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,r)},rn.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},rn.prototype.collectLineEdge=function(t,e,r){var i=t.getLabel(),s=t.getEdge();t.isLineEdge()&&!t.isVisited()&<.isResultOfOp(i,e)&&!s.isCovered()&&(r.add(s),t.setVisitedEdge(!0))},rn.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var r=e.next();r.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getEdge();if(s.isLineEdge()&&!o.isCoveredSet()){var a=t._op.isCoveredByA(s.getCoordinate());o.setCovered(a)}}},rn.prototype.labelIsolatedLines=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?e.labelIsolatedLine(i,0):e.labelIsolatedLine(i,1))}},rn.prototype.buildLines=function(t){for(var e=this,r=this._lineEdgesList.iterator();r.hasNext();){var i=r.next(),s=e._geometryFactory.createLineString(i.getCoordinates());e._resultLineList.add(s),i.setInResult(!0)}},rn.prototype.collectBoundaryTouchEdge=function(t,e,r){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;ct.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),lt.isResultOfOp(i,e)&&e===lt.INTERSECTION&&(r.add(t.getEdge()),t.setVisitedEdge(!0))},rn.prototype.interfaces_=function(){return[]},rn.prototype.getClass=function(){return rn};var Vs=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new U;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Vs.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var r=this._geometryFactory.createPoint(e);this._resultPointList.add(r)}},Vs.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,r=this._op.getGraph().getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===lt.INTERSECTION)){var s=i.getLabel();lt.isResultOfOp(s,t)&&e.filterCoveredNodeToPoint(i)}}},Vs.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Vs.prototype.interfaces_=function(){return[]},Vs.prototype.getClass=function(){return Vs};var Ve=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Ve.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Ve.prototype.transformPolygon=function(t,e){var r=this,i=!0,s=this.transformLinearRing(t.getExteriorRing(),t);(s===null||!(s instanceof Sn)||s.isEmpty())&&(i=!1);for(var o=new U,a=0;a<t.getNumInteriorRing();a++){var u=r.transformLinearRing(t.getInteriorRingN(a),t);u===null||u.isEmpty()||(u instanceof Sn||(i=!1),o.add(u))}if(i)return this._factory.createPolygon(s,o.toArray([]));var l=new U;return s!==null&&l.add(s),l.addAll(o),this._factory.buildGeometry(l)},Ve.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Ve.prototype.getInputGeometry=function(){return this._inputGeom},Ve.prototype.transformMultiLineString=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transformLineString(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},Ve.prototype.transformCoordinates=function(t,e){return this.copy(t)},Ve.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Ve.prototype.transformMultiPoint=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transformPoint(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},Ve.prototype.transformMultiPolygon=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transformPolygon(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},Ve.prototype.copy=function(t){return t.copy()},Ve.prototype.transformGeometryCollection=function(t,e){for(var r=this,i=new U,s=0;s<t.getNumGeometries();s++){var o=r.transform(t.getGeometryN(s));o!==null&&(r._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(pt.toGeometryArray(i)):this._factory.buildGeometry(i)},Ve.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof qe)return this.transformPoint(t,null);if(t instanceof bo)return this.transformMultiPoint(t,null);if(t instanceof Sn)return this.transformLinearRing(t,null);if(t instanceof qt)return this.transformLineString(t,null);if(t instanceof Xi)return this.transformMultiLineString(t,null);if(t instanceof te)return this.transformPolygon(t,null);if(t instanceof Cn)return this.transformMultiPolygon(t,null);if(t instanceof Ce)return this.transformGeometryCollection(t,null);throw new zt("Unknown Geometry subtype: "+t.getClass().getName())},Ve.prototype.transformLinearRing=function(t,e){var r=this.transformCoordinates(t.getCoordinateSequence(),t);if(r===null)return this._factory.createLinearRing(null);var i=r.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(r):this._factory.createLinearRing(r)},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve};var xn=function n(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Z,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof qt&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];n.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=n.isClosed(r),this._snapTolerance=i}};xn.prototype.snapVertices=function(t,e){for(var r=this,i=this._isClosed?t.size()-1:t.size(),s=0;s<i;s++){var o=t.get(s),a=r.findSnapForVertex(o,e);a!==null&&(t.set(s,new D(a)),s===0&&r._isClosed&&t.set(t.size()-1,new D(a)))}},xn.prototype.findSnapForVertex=function(t,e){for(var r=this,i=0;i<e.length;i++){if(t.equals2D(e[i]))return null;if(t.distance(e[i])<r._snapTolerance)return e[i]}return null},xn.prototype.snapTo=function(t){var e=new ka(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var r=e.toCoordinateArray();return r},xn.prototype.snapSegments=function(t,e){var r=this;if(e.length===0)return null;var i=e.length;e[0].equals2D(e[e.length-1])&&(i=e.length-1);for(var s=0;s<i;s++){var o=e[s],a=r.findSegmentIndexToSnap(o,t);a>=0&&t.add(a+1,new D(o),!1)}},xn.prototype.findSegmentIndexToSnap=function(t,e){for(var r=this,i=ot.MAX_VALUE,s=-1,o=0;o<e.size()-1;o++){if(r._seg.p0=e.get(o),r._seg.p1=e.get(o+1),r._seg.p0.equals2D(t)||r._seg.p1.equals2D(t)){if(r._allowSnappingToSourceVertices)continue;return-1}var a=r._seg.distance(t);a<r._snapTolerance&&a<i&&(i=a,s=o)}return s},xn.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},xn.prototype.interfaces_=function(){return[]},xn.prototype.getClass=function(){return xn},xn.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var Bt=function(t){this._srcGeom=t||null},qd={SNAP_PRECISION_FACTOR:{configurable:!0}};Bt.prototype.snapTo=function(t,e){var r=this.extractTargetCoordinates(t),i=new Xd(e,r);return i.transform(this._srcGeom)},Bt.prototype.snapToSelf=function(t,e){var r=this.extractTargetCoordinates(this._srcGeom),i=new Xd(t,r,!0),s=i.transform(this._srcGeom),o=s;return e&&nt(o,_i)&&(o=s.buffer(0)),o},Bt.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),r=e/10;return r},Bt.prototype.extractTargetCoordinates=function(t){for(var e=new Xr,r=t.getCoordinates(),i=0;i<r.length;i++)e.add(r[i]);return e.toArray(new Array(0).fill(null))},Bt.prototype.computeMinimumSegmentLength=function(t){for(var e=ot.MAX_VALUE,r=0;r<t.length-1;r++){var i=t[r].distance(t[r+1]);i<e&&(e=i)}return e},Bt.prototype.interfaces_=function(){return[]},Bt.prototype.getClass=function(){return Bt},Bt.snap=function(t,e,r){var i=new Array(2).fill(null),s=new Bt(t);i[0]=s.snapTo(e,r);var o=new Bt(e);return i[1]=o.snapTo(i[0],r),i},Bt.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=Bt.computeSizeBasedSnapTolerance(t),r=t.getPrecisionModel();if(r.getType()===Pt.FIXED){var i=1/r.getScale()*2/1.415;i>e&&(e=i)}return e}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min(Bt.computeOverlaySnapTolerance(s),Bt.computeOverlaySnapTolerance(o))}},Bt.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),r=Math.min(e.getHeight(),e.getWidth()),i=r*Bt.SNAP_PRECISION_FACTOR;return i},Bt.snapToSelf=function(t,e,r){var i=new Bt(t);return i.snapToSelf(e,r)},qd.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Bt,qd);var Xd=function(n){function t(e,r,i){n.call(this),this._snapTolerance=e||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(r,i){var s=new xn(r,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},t.prototype.transformCoordinates=function(r,i){var s=r.toCoordinateArray(),o=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ve),Oe=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Oe.prototype.getCommon=function(){return ot.longBitsToDouble(this._commonBits)},Oe.prototype.add=function(t){var e=ot.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=Oe.signExpBits(this._commonBits),this._isFirst=!1,null;var r=Oe.signExpBits(e);if(r!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Oe.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=Oe.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},Oe.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=ot.longBitsToDouble(t),r=ot.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+r,s=i.substring(i.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return o}},Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe},Oe.getBit=function(t,e){var r=1<<e;return(t&r)!==0?1:0},Oe.signExpBits=function(t){return t>>52},Oe.zeroLowerBits=function(t,e){var r=(1<<e)-1,i=~r,s=t&i;return s},Oe.numCommonMostSigMantissaBits=function(t,e){for(var r=0,i=52;i>=0;i--){if(Oe.getBit(t,i)!==Oe.getBit(e,i))return r;r++}return 52};var Ni=function(){this._commonCoord=null,this._ccFilter=new zs},pc={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};Ni.prototype.addCommonBits=function(t){var e=new Ti(this._commonCoord);t.apply(e),t.geometryChanged()},Ni.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new D(this._commonCoord);e.x=-e.x,e.y=-e.y;var r=new Ti(e);return t.apply(r),t.geometryChanged(),t},Ni.prototype.getCommonCoordinate=function(){return this._commonCoord},Ni.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},Ni.prototype.interfaces_=function(){return[]},Ni.prototype.getClass=function(){return Ni},pc.CommonCoordinateFilter.get=function(){return zs},pc.Translater.get=function(){return Ti},Object.defineProperties(Ni,pc);var zs=function(){this._commonBitsX=new Oe,this._commonBitsY=new Oe};zs.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},zs.prototype.getCommonCoordinate=function(){return new D(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},zs.prototype.interfaces_=function(){return[En]},zs.prototype.getClass=function(){return zs};var Ti=function(){this.trans=null;var t=arguments[0];this.trans=t};Ti.prototype.filter=function(t,e){var r=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,r),t.setOrdinate(e,1,i)},Ti.prototype.isDone=function(){return!1},Ti.prototype.isGeometryChanged=function(){return!0},Ti.prototype.interfaces_=function(){return[Mr]},Ti.prototype.getClass=function(){return Ti};var ae=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};ae.prototype.selfSnap=function(t){var e=new Bt(t),r=e.snapTo(t,this._snapTolerance);return r},ae.prototype.removeCommonBits=function(t){this._cbr=new Ni,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},ae.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},ae.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),r=lt.overlayOp(e[0],e[1],t);return this.prepareResult(r)},ae.prototype.checkValid=function(t){t.isValid()||ce.out.println("Snapped geometry is invalid")},ae.prototype.computeSnapTolerance=function(){this._snapTolerance=Bt.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ae.prototype.snap=function(t){var e=this.removeCommonBits(t),r=Bt.snap(e[0],e[1],this._snapTolerance);return r},ae.prototype.interfaces_=function(){return[]},ae.prototype.getClass=function(){return ae},ae.overlayOp=function(t,e,r){var i=new ae(t,e);return i.getResultGeometry(r)},ae.union=function(t,e){return ae.overlayOp(t,e,lt.UNION)},ae.intersection=function(t,e){return ae.overlayOp(t,e,lt.INTERSECTION)},ae.symDifference=function(t,e){return ae.overlayOp(t,e,lt.SYMDIFFERENCE)},ae.difference=function(t,e){return ae.overlayOp(t,e,lt.DIFFERENCE)};var xe=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};xe.prototype.getResultGeometry=function(t){var e=null,r=!1,i=null;try{e=lt.overlayOp(this._geom[0],this._geom[1],t);var s=!0;s&&(r=!0)}catch(o){if(o instanceof Yn)i=o;else throw o}finally{}if(!r)try{e=ae.overlayOp(this._geom[0],this._geom[1],t)}catch(o){throw o instanceof Yn?i:o}finally{}return e},xe.prototype.interfaces_=function(){return[]},xe.prototype.getClass=function(){return xe},xe.overlayOp=function(t,e,r){var i=new xe(t,e);return i.getResultGeometry(r)},xe.union=function(t,e){return xe.overlayOp(t,e,lt.UNION)},xe.intersection=function(t,e){return xe.overlayOp(t,e,lt.INTERSECTION)},xe.symDifference=function(t,e){return xe.overlayOp(t,e,lt.SYMDIFFERENCE)},xe.difference=function(t,e){return xe.overlayOp(t,e,lt.DIFFERENCE)};var Qa=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};Qa.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},Qa.prototype.interfaces_=function(){return[]},Qa.prototype.getClass=function(){return Qa};var Je=function n(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=n.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._eventType=n.INSERT,this._label=r,this._xValue=i,this._obj=s}},gc={INSERT:{configurable:!0},DELETE:{configurable:!0}};Je.prototype.isDelete=function(){return this._eventType===Je.DELETE},Je.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},Je.prototype.getObject=function(){return this._obj},Je.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},Je.prototype.getInsertEvent=function(){return this._insertEvent},Je.prototype.isInsert=function(){return this._eventType===Je.INSERT},Je.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},Je.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Je.prototype.interfaces_=function(){return[hr]},Je.prototype.getClass=function(){return Je},gc.INSERT.get=function(){return 1},gc.DELETE.get=function(){return 2},Object.defineProperties(Je,gc);var Ju=function(){};Ju.prototype.interfaces_=function(){return[]},Ju.prototype.getClass=function(){return Ju};var me=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],r=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=r};me.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(me.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},me.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},me.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},me.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},me.prototype.isBoundaryPointInternal=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next(),s=i.getCoordinate();if(t.isIntersection(s))return!0}return!1},me.prototype.hasProperIntersection=function(){return this._hasProper},me.prototype.hasIntersection=function(){return this._hasIntersection},me.prototype.isDone=function(){return this._isDone},me.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},me.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},me.prototype.addIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),r.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},me.prototype.interfaces_=function(){return[]},me.prototype.getClass=function(){return me},me.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var Cy=function(n){function t(){n.call(this),this.events=new U,this.nOverlaps=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var r=this;Ar.sort(this.events);for(var i=0;i<this.events.size();i++){var s=r.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var r=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var o=r.events.get(s);if(o.isInsert()&&r.processOverlaps(s,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof me&&nt(arguments[0],xr)&&nt(arguments[1],xr)){var a=arguments[0],u=arguments[1],l=arguments[2];this.addEdges(a,a),this.addEdges(u,u),this.computeIntersections(l)}else if(typeof arguments[2]=="boolean"&&nt(arguments[0],xr)&&arguments[1]instanceof me){var c=arguments[0],h=arguments[1],d=arguments[2];d?this.addEdges(c,null):this.addEdges(c),this.computeIntersections(h)}}},t.prototype.addEdge=function(r,i){for(var s=this,o=r.getMonotoneChainEdge(),a=o.getStartIndexes(),u=0;u<a.length-1;u++){var l=new Qa(o,u),c=new Je(i,o.getMinX(u),l);s.events.add(c),s.events.add(new Je(o.getMaxX(u),c))}},t.prototype.processOverlaps=function(r,i,s,o){for(var a=this,u=s.getObject(),l=r;l<i;l++){var c=a.events.get(l);if(c.isInsert()){var h=c.getObject();s.isSameLabel(c)||(u.computeIntersections(h,o),a.nOverlaps++)}}},t.prototype.addEdges=function(){var r=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var o=s.next();r.addEdge(o,o)}else if(arguments.length===2)for(var a=arguments[0],u=arguments[1],l=a.iterator();l.hasNext();){var c=l.next();r.addEdge(c,u)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ju),Dn=function(){this._min=ot.POSITIVE_INFINITY,this._max=ot.NEGATIVE_INFINITY},Hd={NodeComparator:{configurable:!0}};Dn.prototype.getMin=function(){return this._min},Dn.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},Dn.prototype.getMax=function(){return this._max},Dn.prototype.toString=function(){return Or.toLineString(new D(this._min,0),new D(this._max,0))},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Hd.NodeComparator.get=function(){return $a},Object.defineProperties(Dn,Hd);var $a=function(){};$a.prototype.compare=function(t,e){var r=t,i=e,s=(r._min+r._max)/2,o=(i._min+i._max)/2;return s<o?-1:s>o?1:0},$a.prototype.interfaces_=function(){return[go]},$a.prototype.getClass=function(){return $a};var Iy=function(n){function t(){n.call(this),this._item=null;var e=arguments[0],r=arguments[1],i=arguments[2];this._min=e,this._max=r,this._item=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;s.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Dn),Py=function(n){function t(){n.call(this),this._node1=null,this._node2=null;var e=arguments[0],r=arguments[1];this._node1=e,this._node2=r,this.buildExtent(this._node1,this._node2)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(r,i){this._min=Math.min(r._min,i._min),this._max=Math.max(r._max,i._max)},t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;this._node1!==null&&this._node1.query(r,i,s),this._node2!==null&&this._node2.query(r,i,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Dn),Mn=function(){this._leaves=new U,this._root=null,this._level=0};Mn.prototype.buildTree=function(){var t=this;Ar.sort(this._leaves,new Dn.NodeComparator);for(var e=this._leaves,r=null,i=new U;;){if(t.buildLevel(e,i),i.size()===1)return i.get(0);r=e,e=i,i=r}},Mn.prototype.insert=function(t,e,r){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new Iy(t,e,r))},Mn.prototype.query=function(t,e,r){this.init(),this._root.query(t,e,r)},Mn.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},Mn.prototype.printNode=function(t){ce.out.println(Or.toLineString(new D(t._min,this._level),new D(t._max,this._level)))},Mn.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},Mn.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var r=0;r<t.size();r+=2){var i=t.get(r),s=r+1<t.size()?t.get(r):null;if(s===null)e.add(i);else{var o=new Py(t.get(r),t.get(r+1));e.add(o)}}},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn};var Lo=function(){this._items=new U};Lo.prototype.visitItem=function(t){this._items.add(t)},Lo.prototype.getItems=function(){return this._items},Lo.prototype.interfaces_=function(){return[wi]},Lo.prototype.getClass=function(){return Lo};var Ao=function(){this._index=null;var t=arguments[0];if(!nt(t,_i))throw new zt("Argument must be Polygonal");this._index=new Ki(t)},mc={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Ao.prototype.locate=function(t){var e=new qr(t),r=new Ro(e);return this._index.query(t.y,t.y,r),e.getLocation()},Ao.prototype.interfaces_=function(){return[xo]},Ao.prototype.getClass=function(){return Ao},mc.SegmentVisitor.get=function(){return Ro},mc.IntervalIndexedGeometry.get=function(){return Ki},Object.defineProperties(Ao,mc);var Ro=function(){this._counter=null;var t=arguments[0];this._counter=t};Ro.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},Ro.prototype.interfaces_=function(){return[wi]},Ro.prototype.getClass=function(){return Ro};var Ki=function(){this._index=new Mn;var t=arguments[0];this.init(t)};Ki.prototype.init=function(t){for(var e=this,r=de.getLines(t),i=r.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();e.addLine(o)}},Ki.prototype.addLine=function(t){for(var e=this,r=1;r<t.length;r++){var i=new Z(t[r-1],t[r]),s=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);e._index.insert(s,o,i)}},Ki.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new Lo;return this._index.query(t,e,r),r.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];this._index.query(i,s,o)}},Ki.prototype.interfaces_=function(){return[]},Ki.prototype.getClass=function(){return Ki};var tu=function(n){function t(){if(n.call(this),this._parentGeom=null,this._lineEdgeMap=new bd,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Fr,arguments.length===2){var e=arguments[0],r=arguments[1],i=dr.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=r,this._boundaryNodeRule=i,r!==null&&this.add(r)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=s,this._parentGeom=o,this._boundaryNodeRule=a,o!==null&&this.add(o)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(r,i){var s=this._nodes.addNode(i),o=s.getLabel(),a=1,u=R.NONE;u=o.getLocation(r,z.ON),u===R.BOUNDARY&&a++;var l=t.determineBoundary(this._boundaryNodeRule,a);o.setLocation(r,l)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.computeSelfNodes(r,i,!1)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2],u=new me(s,!0,!1);u.setIsDoneIfProperInt(a);var l=this.createEdgeSetIntersector(),c=this._parentGeom instanceof Sn||this._parentGeom instanceof te||this._parentGeom instanceof Cn,h=o||!c;return l.computeIntersections(this._edges,u,h),this.addSelfIntersectionNodes(this._argIndex),u}},t.prototype.computeSplitEdges=function(r){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(r)}},t.prototype.computeEdgeIntersections=function(r,i,s){var o=new me(i,s,!0);o.setBoundaryNodes(this.getBoundaryNodes(),r.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,r._edges,o),o},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof qe){var r=arguments[0],i=r.getCoordinate();this.insertPoint(this._argIndex,i,R.INTERIOR)}else if(arguments[0]instanceof D){var s=arguments[0];this.insertPoint(this._argIndex,s,R.INTERIOR)}},t.prototype.addPolygon=function(r){var i=this;this.addPolygonRing(r.getExteriorRing(),R.EXTERIOR,R.INTERIOR);for(var s=0;s<r.getNumInteriorRing();s++){var o=r.getInteriorRingN(s);i.addPolygonRing(o,R.INTERIOR,R.EXTERIOR)}},t.prototype.addEdge=function(r){this.insertEdge(r);var i=r.getCoordinates();this.insertPoint(this._argIndex,i[0],R.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],R.BOUNDARY)},t.prototype.addLineString=function(r){var i=dt.removeRepeatedPoints(r.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new Yu(i,new Ot(this._argIndex,R.INTERIOR));this._lineEdgeMap.put(r,s),this.insertEdge(s),ct.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var r=this.getBoundaryNodes(),i=new Array(r.size()).fill(null),s=0,o=r.iterator();o.hasNext();){var a=o.next();i[s++]=a.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(r,i,s){if(this.isBoundaryNode(r,i))return null;s===R.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(r,i):this.insertPoint(r,i,s)},t.prototype.addPolygonRing=function(r,i,s){if(r.isEmpty())return null;var o=dt.removeRepeatedPoints(r.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,u=s;W.isCCW(o)&&(a=s,u=i);var l=new Yu(o,new Ot(this._argIndex,R.BOUNDARY,a,u));this._lineEdgeMap.put(r,l),this.insertEdge(l),this.insertPoint(this._argIndex,o[0],R.BOUNDARY)},t.prototype.insertPoint=function(r,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new Ot(r,s):a.setLocation(r,s)},t.prototype.createEdgeSetIntersector=function(){return new Cy},t.prototype.addSelfIntersectionNodes=function(r){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var o=s.next(),a=o.getLabel().getLocation(r),u=o.eiList.iterator();u.hasNext();){var l=u.next();i.addSelfIntersectionNode(r,l.coord,a)}},t.prototype.add=function(){if(arguments.length===1){var r=arguments[0];if(r.isEmpty())return null;if(r instanceof Cn&&(this._useBoundaryDeterminationRule=!1),r instanceof te)this.addPolygon(r);else if(r instanceof qt)this.addLineString(r);else if(r instanceof qe)this.addPoint(r);else if(r instanceof bo)this.addCollection(r);else if(r instanceof Xi)this.addCollection(r);else if(r instanceof Cn)this.addCollection(r);else if(r instanceof Ce)this.addCollection(r);else throw new Error(r.getClass().getName())}else return n.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(r){for(var i=this,s=0;s<r.getNumGeometries();s++){var o=r.getGeometryN(s);i.add(o)}},t.prototype.locate=function(r){return nt(this._parentGeom,_i)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new Ao(this._parentGeom)),this._areaPtLocator.locate(r)):this._ptLocator.locate(r,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var r=arguments[0];return this._lineEdgeMap.get(r)}else return n.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(r,i){return r.isInBoundary(i)?R.BOUNDARY:R.INTERIOR},t}(Wt),Fo=function(){if(this._li=new Gi,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new tu(0,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=dr.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(r.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(r.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new tu(0,e,i),this._arg[1]=new tu(1,r,i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];s.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new tu(0,s,a),this._arg[1]=new tu(1,o,a)}};Fo.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Fo.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Fo.prototype.interfaces_=function(){return[]},Fo.prototype.getClass=function(){return Fo};var Qi=function(){};Qi.prototype.interfaces_=function(){return[]},Qi.prototype.getClass=function(){return Qi},Qi.map=function(){if(arguments[0]instanceof rt&&nt(arguments[1],Qi.MapOp)){for(var t=arguments[0],e=arguments[1],r=new U,i=0;i<t.getNumGeometries();i++){var s=e.map(t.getGeometryN(i));s!==null&&r.add(s)}return t.getFactory().buildGeometry(r)}else if(nt(arguments[0],$t)&&nt(arguments[1],Qi.MapOp)){for(var o=arguments[0],a=arguments[1],u=new U,l=o.iterator();l.hasNext();){var c=l.next(),h=a.map(c);h!==null&&u.add(h)}return u}},Qi.MapOp=function(){};var lt=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r),this._ptLocator=new Fr,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Rr,this._resultPolyList=new U,this._resultLineList=new U,this._resultPointList=new U,this._graph=new Wt(new Fd),this._geomFact=e.getFactory()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(r){var i=this._edgeList.findEqualEdge(r);if(i!==null){var s=i.getLabel(),o=r.getLabel();i.isPointwiseEqual(r)||(o=new Ot(r.getLabel()),o.flip());var a=i.getDepth();a.isNull()&&a.add(s),a.add(o),s.merge(o)}else this._edgeList.add(r)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var r=this._graph.getEdgeEnds().iterator();r.hasNext();){var i=r.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},t.prototype.isCoveredByLA=function(r){return!!(this.isCovered(r,this._resultLineList)||this.isCovered(r,this._resultPolyList))},t.prototype.computeGeometry=function(r,i,s,o){var a=new U;return a.addAll(r),a.addAll(i),a.addAll(s),a.isEmpty()?t.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},t.prototype.mergeSymLabels=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(r,i){for(var s=this,o=i.iterator();o.hasNext();){var a=o.next(),u=s._ptLocator.locate(r,a);if(u!==R.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var r=new U,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),r.add(s.getCollapsedEdge()))}this._edgeList.addAll(r)},t.prototype.updateNodeLabelling=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},t.prototype.getResultGeometry=function(r){return this.computeOverlay(r),this._resultGeom},t.prototype.insertUniqueEdges=function(r){for(var i=this,s=r.iterator();s.hasNext();){var o=s.next();i.insertUniqueEdge(o)}},t.prototype.computeOverlay=function(r){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new U;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Zi.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(r),this.cancelDuplicateResultEdges();var s=new Xe(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new rn(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(r);var a=new Vs(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(r),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,r)},t.prototype.labelIncompleteNode=function(r,i){var s=this._ptLocator.locate(r.getCoordinate(),this._arg[i].getGeometry());r.getLabel().setLocation(i,s)},t.prototype.copyPoints=function(r){for(var i=this,s=this._arg[r].getNodeIterator();s.hasNext();){var o=s.next(),a=i._graph.addNode(o.getCoordinate());a.setLabel(r,o.getLabel().getLocation(r))}},t.prototype.findResultAreaEdges=function(r){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.isArea()&&!s.isInteriorAreaEdge()&&t.isResultOfOp(o.getLocation(0,z.RIGHT),o.getLocation(1,z.RIGHT),r)&&s.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var r=this._edgeList.iterator();r.hasNext();){var i=r.next(),s=i.getLabel(),o=i.getDepth();if(!o.isNull()){o.normalize();for(var a=0;a<2;a++)!s.isNull(a)&&s.isArea()&&!o.isNull(a)&&(o.getDelta(a)===0?s.toLine(a):(ct.isTrue(!o.isNull(a,z.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,z.LEFT,o.getLocation(a,z.LEFT)),ct.isTrue(!o.isNull(a,z.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,z.RIGHT,o.getLocation(a,z.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(r._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();s.isIsolated()&&(o.isNull(0)?r.labelIncompleteNode(s,0):r.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(o)}},t.prototype.isCoveredByA=function(r){return!!this.isCovered(r,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Fo);lt.overlayOp=function(n,t,e){var r=new lt(n,t),i=r.getResultGeometry(e);return i},lt.intersection=function(n,t){if(n.isEmpty()||t.isEmpty())return lt.createEmptyResult(lt.INTERSECTION,n,t,n.getFactory());if(n.isGeometryCollection()){var e=t;return ks.map(n,{interfaces_:function(){return[Qi.MapOp]},map:function(r){return r.intersection(e)}})}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),xe.overlayOp(n,t,lt.INTERSECTION)},lt.symDifference=function(n,t){if(n.isEmpty()||t.isEmpty()){if(n.isEmpty()&&t.isEmpty())return lt.createEmptyResult(lt.SYMDIFFERENCE,n,t,n.getFactory());if(n.isEmpty())return t.copy();if(t.isEmpty())return n.copy()}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),xe.overlayOp(n,t,lt.SYMDIFFERENCE)},lt.resultDimension=function(n,t,e){var r=t.getDimension(),i=e.getDimension(),s=-1;switch(n){case lt.INTERSECTION:s=Math.min(r,i);break;case lt.UNION:s=Math.max(r,i);break;case lt.DIFFERENCE:s=r;break;case lt.SYMDIFFERENCE:s=Math.max(r,i);break}return s},lt.createEmptyResult=function(n,t,e,r){var i=null;switch(lt.resultDimension(n,t,e)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon();break}return i},lt.difference=function(n,t){return n.isEmpty()?lt.createEmptyResult(lt.DIFFERENCE,n,t,n.getFactory()):t.isEmpty()?n.copy():(n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),xe.overlayOp(n,t,lt.DIFFERENCE))},lt.isResultOfOp=function(){if(arguments.length===2){var n=arguments[0],t=arguments[1],e=n.getLocation(0),r=n.getLocation(1);return lt.isResultOfOp(e,r,t)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===R.BOUNDARY&&(i=R.INTERIOR),s===R.BOUNDARY&&(s=R.INTERIOR),o){case lt.INTERSECTION:return i===R.INTERIOR&&s===R.INTERIOR;case lt.UNION:return i===R.INTERIOR||s===R.INTERIOR;case lt.DIFFERENCE:return i===R.INTERIOR&&s!==R.INTERIOR;case lt.SYMDIFFERENCE:return i===R.INTERIOR&&s!==R.INTERIOR||i!==R.INTERIOR&&s===R.INTERIOR}return!1}},lt.INTERSECTION=1,lt.UNION=2,lt.DIFFERENCE=3,lt.SYMDIFFERENCE=4;var Oi=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Fr,this._seg=new Z;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};Oi.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,r=0;r<this._linework.getNumGeometries();r++)for(var i=e._linework.getGeometryN(r),s=i.getCoordinateSequence(),o=0;o<s.size()-1;o++){s.getCoordinate(o,e._seg.p0),s.getCoordinate(o+1,e._seg.p1);var a=e._seg.distance(t);if(a<=e._boundaryDistanceTolerance)return!0}return!1},Oi.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?R.BOUNDARY:this._ptLocator.locate(t,this._g)},Oi.prototype.extractLinework=function(t){var e=new ko;t.apply(e);var r=e.getLinework(),i=pt.toLineStringArray(r);return t.getFactory().createMultiLineString(i)},Oi.prototype.interfaces_=function(){return[]},Oi.prototype.getClass=function(){return Oi};var ko=function(){this._linework=null,this._linework=new U};ko.prototype.getLinework=function(){return this._linework},ko.prototype.filter=function(t){var e=this;if(t instanceof te){var r=t;this._linework.add(r.getExteriorRing());for(var i=0;i<r.getNumInteriorRing();i++)e._linework.add(r.getInteriorRingN(i))}},ko.prototype.interfaces_=function(){return[Hr]},ko.prototype.getClass=function(){return ko};var $i=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};$i.prototype.extractPoints=function(t,e,r){for(var i=this,s=t.getCoordinates(),o=0;o<s.length-1;o++)i.computeOffsetPoints(s[o],s[o+1],e,r)},$i.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},$i.prototype.getPoints=function(t){for(var e=this,r=new U,i=de.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();e.extractPoints(o,t,r)}return r},$i.prototype.computeOffsetPoints=function(t,e,r,i){var s=e.x-t.x,o=e.y-t.y,a=Math.sqrt(s*s+o*o),u=r*s/a,l=r*o/a,c=(e.x+t.x)/2,h=(e.y+t.y)/2;if(this._doLeft){var d=new D(c-l,h+u);i.add(d)}if(this._doRight){var g=new D(c+l,h-u);i.add(g)}},$i.prototype.interfaces_=function(){return[]},$i.prototype.getClass=function(){return $i};var ar=function n(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=n.TOLERANCE,this._testCoords=new U;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=n.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,r],this._locFinder=[new Oi(this._geom[0],this._boundaryDistanceTolerance),new Oi(this._geom[1],this._boundaryDistanceTolerance),new Oi(this._geom[2],this._boundaryDistanceTolerance)]},Yd={TOLERANCE:{configurable:!0}};ar.prototype.reportResult=function(t,e,r){ce.out.println("Overlay result invalid - A:"+R.toLocationSymbol(e[0])+" B:"+R.toLocationSymbol(e[1])+" expected:"+(r?"i":"e")+" actual:"+R.toLocationSymbol(e[2]))},ar.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},ar.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=0;r<this._testCoords.size();r++){var i=t._testCoords.get(r);if(!t.checkValid(e,i))return t._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),ar.hasLocation(this._location,R.BOUNDARY)?!0:this.isValidResult(s,this._location)}},ar.prototype.addTestPts=function(t){var e=new $i(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},ar.prototype.isValidResult=function(t,e){var r=lt.isResultOfOp(e[0],e[1],t),i=e[2]===R.INTERIOR,s=!(r^i);return s||this.reportResult(t,e,r),s},ar.prototype.getInvalidLocation=function(){return this._invalidLocation},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},ar.hasLocation=function(t,e){for(var r=0;r<3;r++)if(t[r]===e)return!0;return!1},ar.computeBoundaryDistanceTolerance=function(t,e){return Math.min(Bt.computeSizeBasedSnapTolerance(t),Bt.computeSizeBasedSnapTolerance(e))},ar.isValid=function(t,e,r,i){var s=new ar(t,e,i);return s.isValid(r)},Yd.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(ar,Yd);var ur=function n(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=n.extractFactory(t),this._inputGeoms=t};ur.prototype.extractElements=function(t,e){var r=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);r._skipEmpty&&s.isEmpty()||e.add(s)}},ur.prototype.combine=function(){for(var t=this,e=new U,r=this._inputGeoms.iterator();r.hasNext();){var i=r.next();t.extractElements(i,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur},ur.combine=function(){if(arguments.length===1){var t=arguments[0],e=new ur(t);return e.combine()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new ur(ur.createList(r,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2],l=new ur(ur.createList(o,a,u));return l.combine()}},ur.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},ur.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new U;return r.add(t),r.add(e),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new U;return a.add(i),a.add(s),a.add(o),a}};var Kt=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new U)},Jd={STRTREE_NODE_CAPACITY:{configurable:!0}};Kt.prototype.reduceToGeometries=function(t){for(var e=this,r=new U,i=t.iterator();i.hasNext();){var s=i.next(),o=null;nt(s,xr)?o=e.unionTree(s):s instanceof rt&&(o=s),r.add(o)}return r},Kt.prototype.extractByEnvelope=function(t,e,r){for(var i=new U,s=0;s<e.getNumGeometries();s++){var o=e.getGeometryN(s);o.getEnvelopeInternal().intersects(t)?i.add(o):r.add(o)}return this._geomFactory.buildGeometry(i)},Kt.prototype.unionOptimized=function(t,e){var r=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!r.intersects(i)){var s=ur.combine(t,e);return s}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var o=r.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,o)},Kt.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new xd(Kt.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var r=e.next();t.insert(r.getEnvelopeInternal(),r)}this._inputPolys=null;var i=t.itemsTree(),s=this.unionTree(i);return s},Kt.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2];if(i-r<=1){var s=Kt.getGeometry(e,r);return this.unionSafe(s,null)}else{if(i-r===2)return this.unionSafe(Kt.getGeometry(e,r),Kt.getGeometry(e,r+1));var o=Math.trunc((i+r)/2),a=this.binaryUnion(e,r,o),u=this.binaryUnion(e,o,i);return this.unionSafe(a,u)}}},Kt.prototype.repeatedUnion=function(t){for(var e=null,r=t.iterator();r.hasNext();){var i=r.next();e===null?e=i.copy():e=e.union(i)}return e},Kt.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},Kt.prototype.unionActual=function(t,e){return Kt.restrictToPolygons(t.union(e))},Kt.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),r=this.binaryUnion(e);return r},Kt.prototype.unionUsingEnvelopeIntersection=function(t,e,r){var i=new U,s=this.extractByEnvelope(r,t,i),o=this.extractByEnvelope(r,e,i),a=this.unionActual(s,o);i.add(a);var u=ur.combine(i);return u},Kt.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),r=e.buildGeometry(t),i=r.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],o=arguments[1],a=s.getFactory(),u=a.createGeometryCollection([s,o]),l=u.buffer(0);return l}},Kt.prototype.interfaces_=function(){return[]},Kt.prototype.getClass=function(){return Kt},Kt.restrictToPolygons=function(t){if(nt(t,_i))return t;var e=ri.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(pt.toPolygonArray(e))},Kt.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Kt.union=function(t){var e=new Kt(t);return e.union()},Jd.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Kt,Jd);var Bu=function(){};Bu.prototype.interfaces_=function(){return[]},Bu.prototype.getClass=function(){return Bu},Bu.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return lt.createEmptyResult(lt.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),xe.overlayOp(t,e,lt.UNION)};function ts(){return new ju}function ju(){this.reset()}ju.prototype={constructor:ju,reset:function(){this.s=this.t=0},add:function(n){Bd(Zu,n,this.t),Bd(this,Zu.s,this.s),this.s?this.t+=Zu.t:this.s=Zu.t},valueOf:function(){return this.s}};var Zu=new ju;function Bd(n,t,e){var r=n.s=t+e,i=r-t,s=r-i;n.t=t-s+(e-i)}var Qt=1e-6,Mt=Math.PI,ni=Mt/2,jd=Mt/4,ii=Mt*2,es=180/Mt,nn=Mt/180,De=Math.abs,by=Math.atan,Vo=Math.atan2,re=Math.cos,ne=Math.sin,zo=Math.sqrt;function Zd(n){return n>1?0:n<-1?Mt:Math.acos(n)}function Us(n){return n>1?ni:n<-1?-ni:Math.asin(n)}function eu(){}function Ku(n,t){n&&Qd.hasOwnProperty(n.type)&&Qd[n.type](n,t)}var Kd={Feature:function(n,t){Ku(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)Ku(e[r].geometry,t)}},Qd={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){vc(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)vc(e[r],t,0)},Polygon:function(n,t){$d(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)$d(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)Ku(e[r],t)}};function vc(n,t,e){var r=-1,i=n.length-e,s;for(t.lineStart();++r<i;)s=n[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function $d(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)vc(n[e],t,1);t.polygonEnd()}function Ny(n,t){n&&Kd.hasOwnProperty(n.type)?Kd[n.type](n,t):Ku(n,t)}ts(),ts();function yc(n){return[Vo(n[1],n[0]),Us(n[2])]}function Uo(n){var t=n[0],e=n[1],r=re(e);return[r*re(t),r*ne(t),ne(e)]}function Qu(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function $u(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function _c(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function tl(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function wc(n){var t=zo(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}ts();function tp(n,t){function e(r,i){return r=n(r,i),t(r[0],r[1])}return n.invert&&t.invert&&(e.invert=function(r,i){return r=t.invert(r,i),r&&n.invert(r[0],r[1])}),e}function Ec(n,t){return[n>Mt?n-ii:n<-Mt?n+ii:n,t]}Ec.invert=Ec;function Ty(n,t,e){return(n%=ii)?t||e?tp(rp(n),np(t,e)):rp(n):t||e?np(t,e):Ec}function ep(n){return function(t,e){return t+=n,[t>Mt?t-ii:t<-Mt?t+ii:t,e]}}function rp(n){var t=ep(n);return t.invert=ep(-n),t}function np(n,t){var e=re(n),r=ne(n),i=re(t),s=ne(t);function o(a,u){var l=re(u),c=re(a)*l,h=ne(a)*l,d=ne(u),g=d*e+c*r;return[Vo(h*i-g*s,c*e-d*r),Us(g*i+h*s)]}return o.invert=function(a,u){var l=re(u),c=re(a)*l,h=ne(a)*l,d=ne(u),g=d*i-h*s;return[Vo(h*i+d*s,c*e+g*r),Us(g*e-c*r)]},o}function Oy(n,t,e,r,i,s){if(e){var o=re(t),a=ne(t),u=r*e;i==null?(i=t+r*ii,s=t-u/2):(i=ip(o,i),s=ip(o,s),(r>0?i<s:i>s)&&(i+=r*ii));for(var l,c=i;r>0?c>s:c<s;c-=u)l=yc([o,-a*re(c),-a*ne(c)]),n.point(l[0],l[1])}}function ip(n,t){t=Uo(t),t[0]-=n,wc(t);var e=Zd(-t[1]);return((-t[2]<0?-e:e)+ii-Qt)%ii}function sp(){var n=[],t;return{point:function(e,r){t.push([e,r])},lineStart:function(){n.push(t=[])},lineEnd:eu,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function xy(n,t,e,r,i,s){var o=n[0],a=n[1],u=t[0],l=t[1],c=0,h=1,d=u-o,g=l-a,y;if(y=e-o,!(!d&&y>0)){if(y/=d,d<0){if(y<c)return;y<h&&(h=y)}else if(d>0){if(y>h)return;y>c&&(c=y)}if(y=i-o,!(!d&&y<0)){if(y/=d,d<0){if(y>h)return;y>c&&(c=y)}else if(d>0){if(y<c)return;y<h&&(h=y)}if(y=r-a,!(!g&&y>0)){if(y/=g,g<0){if(y<c)return;y<h&&(h=y)}else if(g>0){if(y>h)return;y>c&&(c=y)}if(y=s-a,!(!g&&y<0)){if(y/=g,g<0){if(y>h)return;y>c&&(c=y)}else if(g>0){if(y<c)return;y<h&&(h=y)}return c>0&&(n[0]=o+c*d,n[1]=a+c*g),h<1&&(t[0]=o+h*d,t[1]=a+h*g),!0}}}}}function el(n,t){return De(n[0]-t[0])<Qt&&De(n[1]-t[1])<Qt}function rl(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function op(n,t,e,r,i){var s=[],o=[],a,u;if(n.forEach(function(y){if(!((C=y.length-1)<=0)){var C,P=y[0],T=y[C],v;if(el(P,T)){for(i.lineStart(),a=0;a<C;++a)i.point((P=y[a])[0],P[1]);i.lineEnd();return}s.push(v=new rl(P,y,null,!0)),o.push(v.o=new rl(P,null,v,!1)),s.push(v=new rl(T,y,null,!1)),o.push(v.o=new rl(T,null,v,!0))}}),!!s.length){for(o.sort(t),ap(s),ap(o),a=0,u=o.length;a<u;++a)o[a].e=e=!e;for(var l=s[0],c,h;;){for(var d=l,g=!0;d.v;)if((d=d.n)===l)return;c=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(g)for(a=0,u=c.length;a<u;++a)i.point((h=c[a])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(g)for(c=d.p.z,a=c.length-1;a>=0;--a)i.point((h=c[a])[0],h[1]);else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,c=d.z,g=!g}while(!d.v);i.lineEnd()}}}function ap(n){if(t=n.length){for(var t,e=0,r=n[0],i;++e<t;)r.n=i=n[e],i.p=r,r=i;r.n=i=n[0],i.p=r}}function up(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function Dy(n){return n.length===1&&(n=My(n)),{left:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)<0?r=s+1:i=s}return r},right:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)>0?i=s:r=s+1}return r}}}function My(n){return function(t,e){return up(n(t),e)}}Dy(up);function lp(n){for(var t=n.length,e,r=-1,i=0,s,o;++r<t;)i+=n[r].length;for(s=new Array(i);--t>=0;)for(o=n[t],e=o.length;--e>=0;)s[--i]=o[e];return s}var nl=1e9,il=-1e9;function Ly(n,t,e,r){function i(l,c){return n<=l&&l<=e&&t<=c&&c<=r}function s(l,c,h,d){var g=0,y=0;if(l==null||(g=o(l,h))!==(y=o(c,h))||u(l,c)<0^h>0)do d.point(g===0||g===3?n:e,g>1?r:t);while((g=(g+h+4)%4)!==y);else d.point(c[0],c[1])}function o(l,c){return De(l[0]-n)<Qt?c>0?0:3:De(l[0]-e)<Qt?c>0?2:1:De(l[1]-t)<Qt?c>0?1:0:c>0?3:2}function a(l,c){return u(l.x,c.x)}function u(l,c){var h=o(l,1),d=o(c,1);return h!==d?h-d:h===0?c[1]-l[1]:h===1?l[0]-c[0]:h===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,h=sp(),d,g,y,C,P,T,v,w,m,_,E,I={point:b,lineStart:x,lineEnd:A,polygonStart:M,polygonEnd:N};function b(Y,G){i(Y,G)&&c.point(Y,G)}function O(){for(var Y=0,G=0,K=g.length;G<K;++G)for(var at=g[G],ht=1,X=at.length,J=at[0],B,gt,xt=J[0],St=J[1];ht<X;++ht)B=xt,gt=St,J=at[ht],xt=J[0],St=J[1],gt<=r?St>r&&(xt-B)*(r-gt)>(St-gt)*(n-B)&&++Y:St<=r&&(xt-B)*(r-gt)<(St-gt)*(n-B)&&--Y;return Y}function M(){c=h,d=[],g=[],E=!0}function N(){var Y=O(),G=E&&Y,K=(d=lp(d)).length;(G||K)&&(l.polygonStart(),G&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),K&&op(d,a,Y,s,l),l.polygonEnd()),c=l,d=g=y=null}function x(){I.point=F,g&&g.push(y=[]),_=!0,m=!1,v=w=NaN}function A(){d&&(F(C,P),T&&m&&h.rejoin(),d.push(h.result())),I.point=b,m&&c.lineEnd()}function F(Y,G){var K=i(Y,G);if(g&&y.push([Y,G]),_)C=Y,P=G,T=K,_=!1,K&&(c.lineStart(),c.point(Y,G));else if(K&&m)c.point(Y,G);else{var at=[v=Math.max(il,Math.min(nl,v)),w=Math.max(il,Math.min(nl,w))],ht=[Y=Math.max(il,Math.min(nl,Y)),G=Math.max(il,Math.min(nl,G))];xy(at,ht,n,t,e,r)?(m||(c.lineStart(),c.point(at[0],at[1])),c.point(ht[0],ht[1]),K||c.lineEnd(),E=!1):K&&(c.lineStart(),c.point(Y,G),E=!1)}v=Y,w=G,m=K}return I}}var Sc=ts();function Ay(n,t){var e=t[0],r=t[1],i=[ne(e),-re(e),0],s=0,o=0;Sc.reset();for(var a=0,u=n.length;a<u;++a)if(c=(l=n[a]).length)for(var l,c,h=l[c-1],d=h[0],g=h[1]/2+jd,y=ne(g),C=re(g),P=0;P<c;++P,d=v,y=m,C=_,h=T){var T=l[P],v=T[0],w=T[1]/2+jd,m=ne(w),_=re(w),E=v-d,I=E>=0?1:-1,b=I*E,O=b>Mt,M=y*m;if(Sc.add(Vo(M*I*ne(b),C*_+M*re(b))),s+=O?E+I*ii:E,O^d>=e^v>=e){var N=$u(Uo(h),Uo(T));wc(N);var x=$u(i,N);wc(x);var A=(O^E>=0?-1:1)*Us(x[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=O^E>=0?1:-1)}}return(s<-1e-6||s<Qt&&Sc<-1e-6)^o&1}ts();function cp(n){return n}ts(),ts();var Go=1/0,sl=Go,ru=-Go,ol=ru,hp={point:Ry,lineStart:eu,lineEnd:eu,polygonStart:eu,polygonEnd:eu,result:function(){var n=[[Go,sl],[ru,ol]];return ru=ol=-(sl=Go=1/0),n}};function Ry(n,t){n<Go&&(Go=n),n>ru&&(ru=n),t<sl&&(sl=t),t>ol&&(ol=t)}ts();function fp(n,t,e,r){return function(i,s){var o=t(s),a=i.invert(r[0],r[1]),u=sp(),l=t(u),c=!1,h,d,g,y={point:C,lineStart:T,lineEnd:v,polygonStart:function(){y.point=w,y.lineStart=m,y.lineEnd=_,d=[],h=[]},polygonEnd:function(){y.point=C,y.lineStart=T,y.lineEnd=v,d=lp(d);var E=Ay(h,a);d.length?(c||(s.polygonStart(),c=!0),op(d,ky,E,e,s)):E&&(c||(s.polygonStart(),c=!0),s.lineStart(),e(null,null,1,s),s.lineEnd()),c&&(s.polygonEnd(),c=!1),d=h=null},sphere:function(){s.polygonStart(),s.lineStart(),e(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function C(E,I){var b=i(E,I);n(E=b[0],I=b[1])&&s.point(E,I)}function P(E,I){var b=i(E,I);o.point(b[0],b[1])}function T(){y.point=P,o.lineStart()}function v(){y.point=C,o.lineEnd()}function w(E,I){g.push([E,I]);var b=i(E,I);l.point(b[0],b[1])}function m(){l.lineStart(),g=[]}function _(){w(g[0][0],g[0][1]),l.lineEnd();var E=l.clean(),I=u.result(),b,O=I.length,M,N,x;if(g.pop(),h.push(g),g=null,!!O){if(E&1){if(N=I[0],(M=N.length-1)>0){for(c||(s.polygonStart(),c=!0),s.lineStart(),b=0;b<M;++b)s.point((x=N[b])[0],x[1]);s.lineEnd()}return}O>1&&E&2&&I.push(I.pop().concat(I.shift())),d.push(I.filter(Fy))}}return y}}function Fy(n){return n.length>1}function ky(n,t){return((n=n.x)[0]<0?n[1]-ni-Qt:ni-n[1])-((t=t.x)[0]<0?t[1]-ni-Qt:ni-t[1])}const dp=fp(function(){return!0},Vy,Uy,[-Mt,-ni]);function Vy(n){var t=NaN,e=NaN,r=NaN,i;return{lineStart:function(){n.lineStart(),i=1},point:function(s,o){var a=s>0?Mt:-Mt,u=De(s-t);De(u-Mt)<Qt?(n.point(t,e=(e+o)/2>0?ni:-ni),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),n.point(s,e),i=0):r!==a&&u>=Mt&&(De(t-r)<Qt&&(t-=r*Qt),De(s-a)<Qt&&(s-=a*Qt),e=zy(t,e,s,o),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),i=0),n.point(t=s,e=o),r=a},lineEnd:function(){n.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function zy(n,t,e,r){var i,s,o=ne(n-e);return De(o)>Qt?by((ne(t)*(s=re(r))*ne(e)-ne(r)*(i=re(t))*ne(n))/(i*s*o)):(t+r)/2}function Uy(n,t,e,r){var i;if(n==null)i=e*ni,r.point(-Mt,i),r.point(0,i),r.point(Mt,i),r.point(Mt,0),r.point(Mt,-i),r.point(0,-i),r.point(-Mt,-i),r.point(-Mt,0),r.point(-Mt,i);else if(De(n[0]-t[0])>Qt){var s=n[0]<t[0]?Mt:-Mt;i=e*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function Gy(n,t){var e=re(n),r=e>0,i=De(e)>Qt;function s(c,h,d,g){Oy(g,n,t,d,c,h)}function o(c,h){return re(c)*re(h)>e}function a(c){var h,d,g,y,C;return{lineStart:function(){y=g=!1,C=1},point:function(P,T){var v=[P,T],w,m=o(P,T),_=r?m?0:l(P,T):m?l(P+(P<0?Mt:-Mt),T):0;if(!h&&(y=g=m)&&c.lineStart(),m!==g&&(w=u(h,v),(!w||el(h,w)||el(v,w))&&(v[0]+=Qt,v[1]+=Qt,m=o(v[0],v[1]))),m!==g)C=0,m?(c.lineStart(),w=u(v,h),c.point(w[0],w[1])):(w=u(h,v),c.point(w[0],w[1]),c.lineEnd()),h=w;else if(i&&h&&r^m){var E;!(_&d)&&(E=u(v,h,!0))&&(C=0,r?(c.lineStart(),c.point(E[0][0],E[0][1]),c.point(E[1][0],E[1][1]),c.lineEnd()):(c.point(E[1][0],E[1][1]),c.lineEnd(),c.lineStart(),c.point(E[0][0],E[0][1])))}m&&(!h||!el(h,v))&&c.point(v[0],v[1]),h=v,g=m,d=_},lineEnd:function(){g&&c.lineEnd(),h=null},clean:function(){return C|(y&&g)<<1}}}function u(c,h,d){var g=Uo(c),y=Uo(h),C=[1,0,0],P=$u(g,y),T=Qu(P,P),v=P[0],w=T-v*v;if(!w)return!d&&c;var m=e*T/w,_=-e*v/w,E=$u(C,P),I=tl(C,m),b=tl(P,_);_c(I,b);var O=E,M=Qu(I,O),N=Qu(O,O),x=M*M-N*(Qu(I,I)-1);if(!(x<0)){var A=zo(x),F=tl(O,(-M-A)/N);if(_c(F,I),F=yc(F),!d)return F;var Y=c[0],G=h[0],K=c[1],at=h[1],ht;G<Y&&(ht=Y,Y=G,G=ht);var X=G-Y,J=De(X-Mt)<Qt,B=J||X<Qt;if(!J&&at<K&&(ht=K,K=at,at=ht),B?J?K+at>0^F[1]<(De(F[0]-Y)<Qt?K:at):K<=F[1]&&F[1]<=at:X>Mt^(Y<=F[0]&&F[0]<=G)){var gt=tl(O,(-M+A)/N);return _c(gt,I),[F,yc(gt)]}}}function l(c,h){var d=r?n:Mt-n,g=0;return c<-d?g|=1:c>d&&(g|=2),h<-d?g|=4:h>d&&(g|=8),g}return fp(o,a,s,r?[0,-n]:[-Mt,n-Mt])}function pp(n){return function(t){var e=new Cc;for(var r in n)e[r]=n[r];return e.stream=t,e}}function Cc(){}Cc.prototype={constructor:Cc,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function gp(n,t,e){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],s=n.clipExtent&&n.clipExtent();n.scale(150).translate([0,0]),s!=null&&n.clipExtent(null),Ny(e,n.stream(hp));var o=hp.result(),a=Math.min(r/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),u=+t[0][0]+(r-a*(o[1][0]+o[0][0]))/2,l=+t[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&n.clipExtent(s),n.scale(a*150).translate([u,l])}function Wy(n,t,e){return gp(n,[[0,0],t],e)}var mp=16,qy=re(30*nn);function vp(n,t){return+t?Hy(n,t):Xy(n)}function Xy(n){return pp({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}})}function Hy(n,t){function e(r,i,s,o,a,u,l,c,h,d,g,y,C,P){var T=l-r,v=c-i,w=T*T+v*v;if(w>4*t&&C--){var m=o+d,_=a+g,E=u+y,I=zo(m*m+_*_+E*E),b=Us(E/=I),O=De(De(E)-1)<Qt||De(s-h)<Qt?(s+h)/2:Vo(_,m),M=n(O,b),N=M[0],x=M[1],A=N-r,F=x-i,Y=v*A-T*F;(Y*Y/w>t||De((T*A+v*F)/w-.5)>.3||o*d+a*g+u*y<qy)&&(e(r,i,s,o,a,u,N,x,O,m/=I,_/=I,E,C,P),P.point(N,x),e(N,x,O,m,_,E,l,c,h,d,g,y,C,P))}}return function(r){var i,s,o,a,u,l,c,h,d,g,y,C,P={point:T,lineStart:v,lineEnd:m,polygonStart:function(){r.polygonStart(),P.lineStart=_},polygonEnd:function(){r.polygonEnd(),P.lineStart=v}};function T(b,O){b=n(b,O),r.point(b[0],b[1])}function v(){h=NaN,P.point=w,r.lineStart()}function w(b,O){var M=Uo([b,O]),N=n(b,O);e(h,d,c,g,y,C,h=N[0],d=N[1],c=b,g=M[0],y=M[1],C=M[2],mp,r),r.point(h,d)}function m(){P.point=T,r.lineEnd()}function _(){v(),P.point=E,P.lineEnd=I}function E(b,O){w(i=b,O),s=h,o=d,a=g,u=y,l=C,P.point=w}function I(){e(h,d,c,g,y,C,s,o,i,a,u,l,mp,r),P.lineEnd=m,m()}return P}}var Yy=pp({point:function(n,t){this.stream.point(n*nn,t*nn)}});function Jy(n){return By(function(){return n})()}function By(n){var t,e=150,r=480,i=250,s,o,a=0,u=0,l=0,c=0,h=0,d,g,y=null,C=dp,P=null,T,v,w,m=cp,_=.5,E=vp(N,_),I,b;function O(F){return F=g(F[0]*nn,F[1]*nn),[F[0]*e+s,o-F[1]*e]}function M(F){return F=g.invert((F[0]-s)/e,(o-F[1])/e),F&&[F[0]*es,F[1]*es]}function N(F,Y){return F=t(F,Y),[F[0]*e+s,o-F[1]*e]}O.stream=function(F){return I&&b===F?I:I=Yy(C(d,E(m(b=F))))},O.clipAngle=function(F){return arguments.length?(C=+F?Gy(y=F*nn,6*nn):(y=null,dp),A()):y*es},O.clipExtent=function(F){return arguments.length?(m=F==null?(P=T=v=w=null,cp):Ly(P=+F[0][0],T=+F[0][1],v=+F[1][0],w=+F[1][1]),A()):P==null?null:[[P,T],[v,w]]},O.scale=function(F){return arguments.length?(e=+F,x()):e},O.translate=function(F){return arguments.length?(r=+F[0],i=+F[1],x()):[r,i]},O.center=function(F){return arguments.length?(a=F[0]%360*nn,u=F[1]%360*nn,x()):[a*es,u*es]},O.rotate=function(F){return arguments.length?(l=F[0]%360*nn,c=F[1]%360*nn,h=F.length>2?F[2]%360*nn:0,x()):[l*es,c*es,h*es]},O.precision=function(F){return arguments.length?(E=vp(N,_=F*F),A()):zo(_)},O.fitExtent=function(F,Y){return gp(O,F,Y)},O.fitSize=function(F,Y){return Wy(O,F,Y)};function x(){g=tp(d=Ty(l,c,h),t);var F=t(a,u);return s=r-F[0]*e,o=i+F[1]*e,A()}function A(){return I=b=null,O}return function(){return t=n.apply(this,arguments),O.invert=t.invert&&M,x()}}function yp(n){return function(t,e){var r=re(t),i=re(e),s=n(r*i);return[s*i*ne(t),s*ne(e)]}}function _p(n){return function(t,e){var r=zo(t*t+e*e),i=n(r),s=ne(i),o=re(i);return[Vo(t*s,r*o),Us(r&&e*s/r)]}}var jy=yp(function(n){return zo(2/(1+n))});jy.invert=_p(function(n){return 2*Us(n/2)});var wp=yp(function(n){return(n=Zd(n))&&n/ne(n)});wp.invert=_p(function(n){return n});function Zy(){return Jy(wp).scale(79.4188).clipAngle(180-.001)}function Ep(n,t){return[n,t]}Ep.invert=Ep;function Ky(n,t,e){e=e||{};var r=e.units||"kilometers",i=e.steps||8;if(!n)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(n.type){case"GeometryCollection":return bu(n,function(o){var a=al(o,t,r,i);a&&s.push(a)}),ho(s);case"FeatureCollection":return Pu(n,function(o){var a=al(o,t,r,i);a&&Pu(a,function(u){u&&s.push(u)})}),ho(s)}return al(n,t,r,i)}function al(n,t,e,r){var i=n.properties||{},s=n.type==="Feature"?n.geometry:n;if(s.type==="GeometryCollection"){var o=[];return bu(n,function(C){var P=al(C,t,e,r);P&&o.push(P)}),ho(o)}var a=Qy(s),u={type:s.type,coordinates:Cp(s.coordinates,a)},l=new ac,c=l.read(u),h=Wl(ql(t,e),"meters"),d=fe.bufferOp(c,h,r),g=new Td;if(d=g.write(d),!Sp(d.coordinates)){var y={type:d.type,coordinates:Ip(d.coordinates,a)};return mn(y,i)}}function Sp(n){return Array.isArray(n[0])?Sp(n[0]):isNaN(n[0])}function Cp(n,t){return typeof n[0]!="object"?t(n):n.map(function(e){return Cp(e,t)})}function Ip(n,t){return typeof n[0]!="object"?t.invert(n):n.map(function(e){return Ip(e,t)})}function Qy(n){var t=uy(n).geometry.coordinates,e=[-t[0],-t[1]];return Zy().rotate(e).scale(Le)}function $y(n,t,e){e===void 0&&(e={});for(var r=e.steps||64,i=e.properties?e.properties:!Array.isArray(n)&&n.type==="Feature"&&n.properties?n.properties:{},s=[],o=0;o<r;o++)s.push(fo(n,t,o*-360/r,e).geometry.coordinates);return s.push(s[0]),tr([s],i)}/**
|
|
45
45
|
* splaytree v3.1.2
|
|
46
46
|
* Fast Splay tree for Node and browser
|
|
47
47
|
*
|
|
@@ -61,11 +61,11 @@ ${u.map(c=>`${c.id} ${c.typeName}
|
|
|
61
61
|
|
|
62
62
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
63
63
|
and limitations under the License.
|
|
64
|
-
***************************************************************************** */function
|
|
65
|
-
`);var s=t+(e?" ":"│ ");n.left&&dc(n.left,s,!1,r,i),n.right&&dc(n.right,s,!0,r,i)}}var pc=function(){function n(t){t===void 0&&(t=Vy),this._root=null,this._size=0,this._comparator=t}return n.prototype.insert=function(t,e){return this._size++,this._root=fc(t,e,this._root,this._comparator)},n.prototype.add=function(t,e){var r=new ts(t,e);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,s=es(t,this._root,i),o=i(t,s.key);return o===0?this._root=s:(o<0?(r.left=s.left,r.right=s,s.left=null):o>0&&(r.right=s.right,r.left=s,s.right=null),this._size++,this._root=r),this._root},n.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},n.prototype._remove=function(t,e,r){var i;if(e===null)return null;e=es(t,e,r);var s=r(t,e.key);return s===0?(e.left===null?i=e.right:(i=es(t,e.left,r),i.right=e.right),this._size--,i):e},n.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=es(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},n.prototype.findStatic=function(t){for(var e=this._root,r=this._comparator;e;){var i=r(t,e.key);if(i===0)return e;i<0?e=e.left:e=e.right}return null},n.prototype.find=function(t){return this._root&&(this._root=es(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},n.prototype.contains=function(t){for(var e=this._root,r=this._comparator;e;){var i=r(t,e.key);if(i===0)return!0;i<0?e=e.left:e=e.right}return!1},n.prototype.forEach=function(t,e){for(var r=this._root,i=[],s=!1;!s;)r!==null?(i.push(r),r=r.left):i.length!==0?(r=i.pop(),t.call(e,r),r=r.right):s=!0;return this},n.prototype.range=function(t,e,r,i){for(var s=[],o=this._comparator,a=this._root,u;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),u=o(a.key,e),u>0)break;if(o(a.key,t)>=0&&r.call(i,a))return this;a=a.right}return this},n.prototype.keys=function(){var t=[];return this.forEach(function(e){var r=e.key;return t.push(r)}),t},n.prototype.values=function(){var t=[];return this.forEach(function(e){var r=e.data;return t.push(r)}),t},n.prototype.min=function(){return this._root?this.minNode(this._root).key:null},n.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},n.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},n.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},n.prototype.at=function(t){for(var e=this._root,r=!1,i=0,s=[];!r;)if(e)s.push(e),e=e.left;else if(s.length>0){if(e=s.pop(),i===t)return e;i++,e=e.right}else r=!0;return null},n.prototype.next=function(t){var e=this._root,r=null;if(t.right){for(r=t.right;r.left;)r=r.left;return r}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?(r=e,e=e.left):e=e.right}return r},n.prototype.prev=function(t){var e=this._root,r=null;if(t.left!==null){for(r=t.left;r.right;)r=r.right;return r}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?e=e.left:(r=e,e=e.right)}return r},n.prototype.clear=function(){return this._root=null,this._size=0,this},n.prototype.toList=function(){return Gy(this._root)},n.prototype.load=function(t,e,r){e===void 0&&(e=[]),r===void 0&&(r=!1);var i=t.length,s=this._comparator;if(r&&vc(t,e,0,i-1,s),this._root===null)this._root=gc(t,e,0,i),this._size=i;else{var o=Wy(this.toList(),Uy(t,e),s);i=this._size+i,this._root=mc({head:o},0,i)}return this},n.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),n.prototype.toString=function(t){t===void 0&&(t=function(r){return String(r.key)});var e=[];return dc(this._root,"",!0,function(r){return e.push(r)},t),e.join("")},n.prototype.update=function(t,e,r){var i=this._comparator,s=yp(t,this._root,i),o=s.left,a=s.right;i(t,e)<0?a=fc(e,r,a,i):o=fc(e,r,o,i),this._root=zy(o,a,i)},n.prototype.split=function(t){return yp(t,this._root,this._comparator)},n.prototype[Symbol.iterator]=function(){var t,e,r;return ky(this,function(i){switch(i.label){case 0:t=this._root,e=[],r=!1,i.label=1;case 1:return r?[3,6]:t===null?[3,2]:(e.push(t),t=t.left,[3,5]);case 2:return e.length===0?[3,4]:(t=e.pop(),[4,t]);case 3:return i.sent(),t=t.right,[3,5];case 4:r=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},n}();function gc(n,t,e,r){var i=r-e;if(i>0){var s=e+Math.floor(i/2),o=n[s],a=t[s],u=new ts(o,a);return u.left=gc(n,t,e,s),u.right=gc(n,t,s+1,r),u}return null}function Uy(n,t){for(var e=new ts(null,null),r=e,i=0;i<n.length;i++)r=r.next=new ts(n[i],t[i]);return r.next=null,e.next}function Gy(n){for(var t=n,e=[],r=!1,i=new ts(null,null),s=i;!r;)t?(e.push(t),t=t.left):e.length>0?(t=s=s.next=e.pop(),t=t.right):r=!0;return s.next=null,i.next}function mc(n,t,e){var r=e-t;if(r>0){var i=t+Math.floor(r/2),s=mc(n,t,i),o=n.head;return o.left=s,n.head=n.head.next,o.right=mc(n,i+1,e),o}return null}function Wy(n,t,e){for(var r=new ts(null,null),i=r,s=n,o=t;s!==null&&o!==null;)e(s.key,o.key)<0?(i.next=s,s=s.next):(i.next=o,o=o.next),i=i.next;return s!==null?i.next=s:o!==null&&(i.next=o),r.next}function vc(n,t,e,r,i){if(!(e>=r)){for(var s=n[e+r>>1],o=e-1,a=r+1;;){do o++;while(i(n[o],s)<0);do a--;while(i(n[a],s)>0);if(o>=a)break;var u=n[o];n[o]=n[a],n[a]=u,u=t[o],t[o]=t[a],t[a]=u}vc(n,t,e,a,i),vc(n,t,a+1,r,i)}}const Oi=11102230246251565e-32,Je=134217729,qy=(3+8*Oi)*Oi;function yc(n,t,e,r,i){let s,o,a,u,l=t[0],c=r[0],h=0,p=0;c>l==c>-l?(s=l,l=t[++h]):(s=c,c=r[++p]);let v=0;if(h<n&&p<e)for(c>l==c>-l?(o=l+s,a=s-(o-l),l=t[++h]):(o=c+s,a=s-(o-c),c=r[++p]),s=o,a!==0&&(i[v++]=a);h<n&&p<e;)c>l==c>-l?(o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++h]):(o=s+c,u=o-s,a=s-(o-u)+(c-u),c=r[++p]),s=o,a!==0&&(i[v++]=a);for(;h<n;)o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++h],s=o,a!==0&&(i[v++]=a);for(;p<e;)o=s+c,u=o-s,a=s-(o-u)+(c-u),c=r[++p],s=o,a!==0&&(i[v++]=a);return(s!==0||v===0)&&(i[v++]=s),v}function Xy(n,t){let e=t[0];for(let r=1;r<n;r++)e+=t[r];return e}function ja(n){return new Float64Array(n)}const Yy=(3+16*Oi)*Oi,Hy=(2+12*Oi)*Oi,Jy=(9+64*Oi)*Oi*Oi,ko=ja(4),_p=ja(8),wp=ja(12),Ep=ja(16),ur=ja(4);function By(n,t,e,r,i,s,o){let a,u,l,c,h,p,v,w,I,P,O,m,_,g,y,E,C,b;const T=n-i,M=e-i,N=t-s,D=r-s;g=T*D,p=Je*T,v=p-(p-T),w=T-v,p=Je*D,I=p-(p-D),P=D-I,y=w*P-(g-v*I-w*I-v*P),E=N*M,p=Je*N,v=p-(p-N),w=N-v,p=Je*M,I=p-(p-M),P=M-I,C=w*P-(E-v*I-w*I-v*P),O=y-C,h=y-O,ko[0]=y-(O+h)+(h-C),m=g+O,h=m-g,_=g-(m-h)+(O-h),O=_-E,h=_-O,ko[1]=_-(O+h)+(h-E),b=m+O,h=b-m,ko[2]=m-(b-h)+(O-h),ko[3]=b;let A=Xy(4,ko),F=Hy*o;if(A>=F||-A>=F||(h=n-T,a=n-(T+h)+(h-i),h=e-M,l=e-(M+h)+(h-i),h=t-N,u=t-(N+h)+(h-s),h=r-D,c=r-(D+h)+(h-s),a===0&&u===0&&l===0&&c===0)||(F=Jy*o+qy*Math.abs(A),A+=T*c+D*a-(N*l+M*u),A>=F||-A>=F))return A;g=a*D,p=Je*a,v=p-(p-a),w=a-v,p=Je*D,I=p-(p-D),P=D-I,y=w*P-(g-v*I-w*I-v*P),E=u*M,p=Je*u,v=p-(p-u),w=u-v,p=Je*M,I=p-(p-M),P=M-I,C=w*P-(E-v*I-w*I-v*P),O=y-C,h=y-O,ur[0]=y-(O+h)+(h-C),m=g+O,h=m-g,_=g-(m-h)+(O-h),O=_-E,h=_-O,ur[1]=_-(O+h)+(h-E),b=m+O,h=b-m,ur[2]=m-(b-h)+(O-h),ur[3]=b;const Y=yc(4,ko,4,ur,_p);g=T*c,p=Je*T,v=p-(p-T),w=T-v,p=Je*c,I=p-(p-c),P=c-I,y=w*P-(g-v*I-w*I-v*P),E=N*l,p=Je*N,v=p-(p-N),w=N-v,p=Je*l,I=p-(p-l),P=l-I,C=w*P-(E-v*I-w*I-v*P),O=y-C,h=y-O,ur[0]=y-(O+h)+(h-C),m=g+O,h=m-g,_=g-(m-h)+(O-h),O=_-E,h=_-O,ur[1]=_-(O+h)+(h-E),b=m+O,h=b-m,ur[2]=m-(b-h)+(O-h),ur[3]=b;const G=yc(Y,_p,4,ur,wp);g=a*c,p=Je*a,v=p-(p-a),w=a-v,p=Je*c,I=p-(p-c),P=c-I,y=w*P-(g-v*I-w*I-v*P),E=u*l,p=Je*u,v=p-(p-u),w=u-v,p=Je*l,I=p-(p-l),P=l-I,C=w*P-(E-v*I-w*I-v*P),O=y-C,h=y-O,ur[0]=y-(O+h)+(h-C),m=g+O,h=m-g,_=g-(m-h)+(O-h),O=_-E,h=_-O,ur[1]=_-(O+h)+(h-E),b=m+O,h=b-m,ur[2]=m-(b-h)+(O-h),ur[3]=b;const K=yc(G,wp,4,ur,Ep);return Ep[K-1]}function jy(n,t,e,r,i,s){const o=(t-s)*(e-i),a=(n-i)*(r-s),u=o-a,l=Math.abs(o+a);return Math.abs(u)>=Yy*l?u:-By(n,t,e,r,i,s,l)}const Za=(n,t)=>n.ll.x<=t.x&&t.x<=n.ur.x&&n.ll.y<=t.y&&t.y<=n.ur.y,_c=(n,t)=>{if(t.ur.x<n.ll.x||n.ur.x<t.ll.x||t.ur.y<n.ll.y||n.ur.y<t.ll.y)return null;const e=n.ll.x<t.ll.x?t.ll.x:n.ll.x,r=n.ur.x<t.ur.x?n.ur.x:t.ur.x,i=n.ll.y<t.ll.y?t.ll.y:n.ll.y,s=n.ur.y<t.ur.y?n.ur.y:t.ur.y;return{ll:{x:e,y:i},ur:{x:r,y:s}}};let rs=Number.EPSILON;rs===void 0&&(rs=Math.pow(2,-52));const Zy=rs*rs,Sp=(n,t)=>{if(-rs<n&&n<rs&&-rs<t&&t<rs)return 0;const e=n-t;return e*e<Zy*n*t?0:n<t?-1:1};class Ky{constructor(){this.reset()}reset(){this.xRounder=new Cp,this.yRounder=new Cp}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}class Cp{constructor(){this.tree=new pc,this.round(0)}round(t){const e=this.tree.add(t),r=this.tree.prev(e);if(r!==null&&Sp(e.key,r.key)===0)return this.tree.remove(t),r.key;const i=this.tree.next(e);return i!==null&&Sp(e.key,i.key)===0?(this.tree.remove(t),i.key):t}}const Ka=new Ky,el=(n,t)=>n.x*t.y-n.y*t.x,Ip=(n,t)=>n.x*t.x+n.y*t.y,Pp=(n,t,e)=>{const r=jy(n.x,n.y,t.x,t.y,e.x,e.y);return r>0?-1:r<0?1:0},rl=n=>Math.sqrt(Ip(n,n)),Qy=(n,t,e)=>{const r={x:t.x-n.x,y:t.y-n.y},i={x:e.x-n.x,y:e.y-n.y};return el(i,r)/rl(i)/rl(r)},$y=(n,t,e)=>{const r={x:t.x-n.x,y:t.y-n.y},i={x:e.x-n.x,y:e.y-n.y};return Ip(i,r)/rl(i)/rl(r)},bp=(n,t,e)=>t.y===0?null:{x:n.x+t.x/t.y*(e-n.y),y:e},Np=(n,t,e)=>t.x===0?null:{x:e,y:n.y+t.y/t.x*(e-n.x)},t_=(n,t,e,r)=>{if(t.x===0)return Np(e,r,n.x);if(r.x===0)return Np(n,t,e.x);if(t.y===0)return bp(e,r,n.y);if(r.y===0)return bp(n,t,e.y);const i=el(t,r);if(i==0)return null;const s={x:e.x-n.x,y:e.y-n.y},o=el(s,t)/i,a=el(s,r)/i,u=n.x+a*t.x,l=e.x+o*r.x,c=n.y+a*t.y,h=e.y+o*r.y,p=(u+l)/2,v=(c+h)/2;return{x:p,y:v}};class nn{static compare(t,e){const r=nn.comparePoints(t.point,e.point);return r!==0?r:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:ns.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let r=0,i=e.length;r<i;r++){const s=e[r];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const r=this.point.events[e];if(r.segment.consumedBy===void 0)for(let i=e+1;i<t;i++){const s=this.point.events[i];s.consumedBy===void 0&&r.otherSE.point.events===s.otherSE.point.events&&r.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const t=[];for(let e=0,r=this.point.events.length;e<r;e++){const i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){const e=new Map,r=i=>{const s=i.otherSE;e.set(i,{sine:Qy(this.point,t.point,s.point),cosine:$y(this.point,t.point,s.point)})};return(i,s)=>{e.has(i)||r(i),e.has(s)||r(s);const{sine:o,cosine:a}=e.get(i),{sine:u,cosine:l}=e.get(s);return o>=0&&u>=0?a<l?1:a>l?-1:0:o<0&&u<0?a<l?-1:a>l?1:0:u<o?-1:u>o?1:0}}}let e_=0;class ns{static compare(t,e){const r=t.leftSE.point.x,i=e.leftSE.point.x,s=t.rightSE.point.x,o=e.rightSE.point.x;if(o<r)return 1;if(s<i)return-1;const a=t.leftSE.point.y,u=e.leftSE.point.y,l=t.rightSE.point.y,c=e.rightSE.point.y;if(r<i){if(u<a&&u<l)return 1;if(u>a&&u>l)return-1;const h=t.comparePoint(e.leftSE.point);if(h<0)return 1;if(h>0)return-1;const p=e.comparePoint(t.rightSE.point);return p!==0?p:-1}if(r>i){if(a<u&&a<c)return-1;if(a>u&&a>c)return 1;const h=e.comparePoint(t.leftSE.point);if(h!==0)return h;const p=t.comparePoint(e.rightSE.point);return p<0?1:p>0?-1:1}if(a<u)return-1;if(a>u)return 1;if(s<o){const h=e.comparePoint(t.rightSE.point);if(h!==0)return h}if(s>o){const h=t.comparePoint(e.rightSE.point);if(h<0)return 1;if(h>0)return-1}if(s!==o){const h=l-a,p=s-r,v=c-u,w=o-i;if(h>p&&v<w)return 1;if(h<p&&v>w)return-1}return s>o?1:s<o||l<c?-1:l>c?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,r,i){this.id=++e_,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=r,this.windings=i}static fromRing(t,e,r){let i,s,o;const a=nn.comparePoints(t,e);if(a<0)i=t,s=e,o=1;else if(a>0)i=e,s=t,o=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);const u=new nn(i,!0),l=new nn(s,!1);return new ns(u,l,[r],[o])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,r=this.rightSE.point,i=this.vector();if(e.x===r.x)return t.x===e.x?0:t.x<e.x?1:-1;const s=(t.y-e.y)/i.y,o=e.x+s*i.x;if(t.x===o)return 0;const a=(t.x-e.x)/i.x,u=e.y+a*i.y;return t.y===u?0:t.y<u?-1:1}getIntersection(t){const e=this.bbox(),r=t.bbox(),i=_c(e,r);if(i===null)return null;const s=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,u=t.rightSE.point,l=Za(e,a)&&this.comparePoint(a)===0,c=Za(r,s)&&t.comparePoint(s)===0,h=Za(e,u)&&this.comparePoint(u)===0,p=Za(r,o)&&t.comparePoint(o)===0;if(c&&l)return p&&!h?o:!p&&h?u:null;if(c)return h&&s.x===u.x&&s.y===u.y?null:s;if(l)return p&&o.x===a.x&&o.y===a.y?null:a;if(p&&h)return null;if(p)return o;if(h)return u;const v=t_(s,this.vector(),a,t.vector());return v===null||!Za(i,v)?null:Ka.round(v.x,v.y)}split(t){const e=[],r=t.events!==void 0,i=new nn(t,!0),s=new nn(t,!1),o=this.rightSE;this.replaceRightSE(s),e.push(s),e.push(i);const a=new ns(i,o,this.rings.slice(),this.windings.slice());return nn.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),nn.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),s.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,r=this.windings.length;e<r;e++)this.windings[e]*=-1}consume(t){let e=this,r=t;for(;e.consumedBy;)e=e.consumedBy;for(;r.consumedBy;)r=r.consumedBy;const i=ns.compare(e,r);if(i!==0){if(i>0){const s=e;e=r,r=s}if(e.prev===r){const s=e;e=r,r=s}for(let s=0,o=r.rings.length;s<o;s++){const a=r.rings[s],u=r.windings[s],l=e.rings.indexOf(a);l===-1?(e.rings.push(a),e.windings.push(u)):e.windings[l]+=u}r.rings=null,r.windings=null,r.consumedBy=e,r.leftSE.consumedBy=e.leftSE,r.rightSE.consumedBy=e.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,r=this._afterState.windings,i=this._afterState.multiPolys;for(let a=0,u=this.rings.length;a<u;a++){const l=this.rings[a],c=this.windings[a],h=e.indexOf(l);h===-1?(e.push(l),r.push(c)):r[h]+=c}const s=[],o=[];for(let a=0,u=e.length;a<u;a++){if(r[a]===0)continue;const l=e[a],c=l.poly;if(o.indexOf(c)===-1)if(l.isExterior)s.push(c);else{o.indexOf(c)===-1&&o.push(c);const h=s.indexOf(l.poly);h!==-1&&s.splice(h,1)}}for(let a=0,u=s.length;a<u;a++){const l=s[a].multiPoly;i.indexOf(l)===-1&&i.push(l)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(Mn.type){case"union":{const r=t.length===0,i=e.length===0;this._isInResult=r!==i;break}case"intersection":{let r,i;t.length<e.length?(r=t.length,i=e.length):(r=e.length,i=t.length),this._isInResult=i===Mn.numMultiPolys&&r<i;break}case"xor":{const r=Math.abs(t.length-e.length);this._isInResult=r%2===1;break}case"difference":{const r=i=>i.length===1&&i[0].isSubject;this._isInResult=r(t)!==r(e);break}default:throw new Error(`Unrecognized operation type found ${Mn.type}`)}return this._isInResult}}class Tp{constructor(t,e,r){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=r,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=Ka.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let o=1,a=t.length;o<a;o++){if(typeof t[o][0]!="number"||typeof t[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let u=Ka.round(t[o][0],t[o][1]);u.x===s.x&&u.y===s.y||(this.segments.push(ns.fromRing(s,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),s=u)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(ns.fromRing(s,i,this))}getSweepEvents(){const t=[];for(let e=0,r=this.segments.length;e<r;e++){const i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}class r_{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Tp(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let r=1,i=t.length;r<i;r++){const s=new Tp(t[r],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,r=this.interiorRings.length;e<r;e++){const i=this.interiorRings[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class Op{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let r=0,i=t.length;r<i;r++){const s=new r_(t[r],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,r=this.polys.length;e<r;e++){const i=this.polys[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class nl{static factory(t){const e=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,u=s.rightSE;const l=[a],c=a.point,h=[];for(;o=a,a=u,l.push(a),a.point!==c;)for(;;){const p=a.getAvailableLinkedEvents();if(p.length===0){const I=l[0].point,P=l[l.length-1].point;throw new Error(`Unable to complete output ring starting at [${I.x}, ${I.y}]. Last matching segment found ends at [${P.x}, ${P.y}].`)}if(p.length===1){u=p[0].otherSE;break}let v=null;for(let I=0,P=h.length;I<P;I++)if(h[I].point===a.point){v=I;break}if(v!==null){const I=h.splice(v)[0],P=l.splice(I.index);P.unshift(P[0].otherSE),e.push(new nl(P.reverse()));continue}h.push({index:l.length,point:a.point});const w=a.getLeftmostComparator(o);u=p.sort(w)[0].otherSE;break}e.push(new nl(l))}return e}constructor(t){this.events=t;for(let e=0,r=t.length;e<r;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let l=1,c=this.events.length-1;l<c;l++){const h=this.events[l].point,p=this.events[l+1].point;Pp(h,t,p)!==0&&(e.push(h),t=h)}if(e.length===1)return null;const r=e[0],i=e[1];Pp(r,t,i)===0&&e.shift(),e.push(e[0]);const s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,a=this.isExteriorRing()?e.length:-1,u=[];for(let l=o;l!=a;l+=s)u.push([e[l].x,e[l].y]);return u}isExteriorRing(){if(this._isExteriorRing===void 0){const t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const o=this.events[i];nn.compare(t,o)>0&&(t=o)}let e=t.segment.prevInResult(),r=e?e.prevInResult():null;for(;;){if(!e)return null;if(!r)return e.ringOut;if(r.ringOut!==e.ringOut)return r.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=r.prevInResult(),r=e?e.prevInResult():null}}}class Dp{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(let e=0,r=this.interiorRings.length;e<r;e++){const i=this.interiorRings[e].getGeom();i!==null&&t.push(i)}return t}}class n_{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,r=this.polys.length;e<r;e++){const i=this.polys[e].getGeom();i!==null&&t.push(i)}return t}_composePolys(t){const e=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];if(!s.poly)if(s.isExteriorRing())e.push(new Dp(s));else{const o=s.enclosingRing();o.poly||e.push(new Dp(o)),o.poly.addInterior(s)}}return e}}class i_{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ns.compare;this.queue=t,this.tree=new pc(e),this.segments=[]}process(t){const e=t.segment,r=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),r;const i=t.isLeft?this.tree.add(e):this.tree.find(e);if(!i)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let s=i,o=i,a,u;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;u===void 0;)o=this.tree.next(o),o===null?u=null:o.key.consumedBy===void 0&&(u=o.key);if(t.isLeft){let l=null;if(a){const h=a.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(l=h),!a.isAnEndpoint(h))){const p=this._splitSafely(a,h);for(let v=0,w=p.length;v<w;v++)r.push(p[v])}}let c=null;if(u){const h=u.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(c=h),!u.isAnEndpoint(h))){const p=this._splitSafely(u,h);for(let v=0,w=p.length;v<w;v++)r.push(p[v])}}if(l!==null||c!==null){let h=null;l===null?h=c:c===null?h=l:h=nn.comparePoints(l,c)<=0?l:c,this.queue.remove(e.rightSE),r.push(e.rightSE);const p=e.split(h);for(let v=0,w=p.length;v<w;v++)r.push(p[v])}r.length>0?(this.tree.remove(e),r.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&u){const l=a.getIntersection(u);if(l!==null){if(!a.isAnEndpoint(l)){const c=this._splitSafely(a,l);for(let h=0,p=c.length;h<p;h++)r.push(c[h])}if(!u.isAnEndpoint(l)){const c=this._splitSafely(u,l);for(let h=0,p=c.length;h<p;h++)r.push(c[h])}}}this.tree.remove(e)}return r}_splitSafely(t,e){this.tree.remove(t);const r=t.rightSE;this.queue.remove(r);const i=t.split(e);return i.push(r),t.consumedBy===void 0&&this.tree.add(t),i}}const xp=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,s_=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class o_{run(t,e,r){Mn.type=t,Ka.reset();const i=[new Op(e,!0)];for(let h=0,p=r.length;h<p;h++)i.push(new Op(r[h],!1));if(Mn.numMultiPolys=i.length,Mn.type==="difference"){const h=i[0];let p=1;for(;p<i.length;)_c(i[p].bbox,h.bbox)!==null?p++:i.splice(p,1)}if(Mn.type==="intersection")for(let h=0,p=i.length;h<p;h++){const v=i[h];for(let w=h+1,I=i.length;w<I;w++)if(_c(v.bbox,i[w].bbox)===null)return[]}const s=new pc(nn.compare);for(let h=0,p=i.length;h<p;h++){const v=i[h].getSweepEvents();for(let w=0,I=v.length;w<I;w++)if(s.insert(v[w]),s.size>xp)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new i_(s);let a=s.size,u=s.pop();for(;u;){const h=u.key;if(s.size===a){const v=h.segment;throw new Error(`Unable to pop() ${h.isLeft?"left":"right"} SweepEvent [${h.point.x}, ${h.point.y}] from segment #${v.id} [${v.leftSE.point.x}, ${v.leftSE.point.y}] -> [${v.rightSE.point.x}, ${v.rightSE.point.y}] from queue.`)}if(s.size>xp)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>s_)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const p=o.process(h);for(let v=0,w=p.length;v<w;v++){const I=p[v];I.consumedBy===void 0&&s.insert(I)}a=s.size,u=s.pop()}Ka.reset();const l=nl.factory(o.segments);return new n_(l).getGeom()}}const Mn=new o_;var wc={union:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Mn.run("union",n,e)},intersection:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Mn.run("intersection",n,e)},xor:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Mn.run("xor",n,e)},difference:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Mn.run("difference",n,e)}};function a_(n,t){var e=Pr(n),r=Pr(t),i=n.properties||{},s=wc.difference(e.coordinates,r.coordinates);return s.length===0?null:s.length===1?$e(s[0],i):Ol(s,i)}function u_(n,t,e){e===void 0&&(e={});var r=Pr(n),i=Pr(t),s=wc.intersection(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?$e(s[0],e.properties):Ol(s,e.properties)}function l_(n,t,e){e===void 0&&(e={});var r=Pr(n),i=Pr(t),s=wc.union(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?$e(s[0],e.properties):Ol(s,e.properties)}function Mp(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=u_($e([n]),$e([t]));if(e)return e.geometry.coordinates}function Lp(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=l_($e([n]),$e([t]));if(e)return e.geometry.coordinates}function Ap(n,t=500,e="meters"){const r=Ay(mn(n),t,{units:e});if(r)return r.geometry.coordinates}function Rp(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=a_($e([n]),$e([t]));if(e)return e.geometry.coordinates}function Fp(n,t,e=10,r="meters"){return Fy(n,t,{steps:e,units:r}).geometry.coordinates}function Ec(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=$e([n]),r=$e([t]);return Nv(e,r)?"oneBig":Fv(e,r)?"twoBig":!1}function kp(n){const t=d.min(d.objsIterator(n,["0"])),e=d.min(d.objsIterator(n,["1"])),r=d.min(d.objsIterator(n,["2"])),i=d.max(d.objsIterator(n,["0"])),s=d.max(d.objsIterator(n,["1"])),o=d.max(d.objsIterator(n,["2"]));return{minPos:[t,e,r],maxPos:[i,s,o],center:[(t+i)*.5,(e+s)*.5,(r+o)*.5]}}function c_(n){const{minPos:t,maxPos:e,center:r}=kp(n);if(t.some(a=>!Number.isFinite(a)||e.some(u=>!Number.isFinite(u))||r.some(u=>!Number.isFinite(u)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=Su(t,e);let s=i*.5;const o=Math.abs(t[2]-e[2]);return o!=0&&(s=Math.sqrt(i*i+o*o)*.5),{center:r,radius:s}}function Vp(n,t){const e=qn(n),r=qn(t);return d.Vector.distance(e,r)}function Qa(n,t){const e=[],r=n.length;let i=0;for(let s=0;s<r-1;++s){if(t===void 0||t==="GEODESIC"){const o=Su(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="RHUMB"){const o=id(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="NONE"){const o=Vp(n[s],n[s+1]);i+=o}else console.warn(`未知的arcType: ${t},导致距离无法计算!`);e.push(i)}return e}function Sc(n){const t="__getXyzFromPostion";let e=d.getExtProp(n,t);return(!e||!d.Vector.equals(e[0],n))&&(e=[[...n],qn(n)],d.setExtProp(n,t,e)),e[1]}class zp extends d.Tree{constructor(t){super(t)}get propUiTree(){return this.uiTree}}class Cc extends d.TreeItem{constructor(t,e,r){super(t,e),this._property=r}get property(){return this._property}}class Ic extends Cc{constructor(t,e){super(t,!1,e)}}class Pc extends Cc{constructor(t,e){super(t,!0,e)}get groupChildren(){return this.children}}function Up(n,t){const e=new zp(t),r=n.getProperties("chinese"),i=[];for(let s of r)if(s instanceof it){const o=new Pc(e,s);o.d(()=>s.destroy()),e.children.push(o),i.push(o)}else{const o=new Ic(e,s);e.children.push(o),o.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const o=s;if(!(o.property instanceof it))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of o.property.children)if(a instanceof it){const u=new Pc(e,a);u.d(()=>a.destroy()),o.groupChildren.push(u),i.push(u)}else{const u=new Ic(e,a);o.groupChildren.push(u),u.d(()=>a.destroy())}}return e.d(()=>{e.itemChildrenChanged.reset(),e.itemChildrenToChange.reset();const s=[...e.getDescendants()];s.forEach(o=>{o.children&&(o.children.length=0),o.destroy()}),s.length=0}),e}class Vo extends J{constructor(e){super();f(this,"_propTreeReact",this.dv(d.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new d.ObjResettingWithEvent(this.sceneObjectChanged,r=>{if(!r)return;const i=new J;return i.d(r.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(r=>{this._propTreeReact.value=void 0,!(!r||!(r instanceof tt))&&(this._propTreeReact.value=Up(r,e))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(n=>{n.createDefaultProps=()=>({sceneObject:void 0})})(Vo||(Vo={})),d.extendClassProps(Vo.prototype,Vo.createDefaultProps);function bc(n){return d.reactDeepArrayWithUndefined(n,(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[...t])}function Gp(n,t){const e=new Array;for(let r of n)e.push(t(r));return e}function Nc(n,t){return n===void 0&&t===void 0?!0:!n||!t?!1:n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function h_(n,t,e){var i;((i=t.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(t))?e.call(n):n.dispose(t.createdEvent.don(()=>e.call(n)))}function f_(n,t,e,r=!0){r&&e(),n.dispose(t.disposableOn(e))}function d_(n,t){const{type:e,id:r}=n;if(e){const i=tt.create(e,r);if(i)return i.json=n,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function Wp(n){const t=n.children&&d.every(n.children,r=>{if(!(r instanceof Be))throw new Error("!(treeItem instanceof SceneTreeItem)");return!r.show})||!1,e=n.sceneTree.getSceneObjectShowFunc(n.sceneObject);return!t||e}class Be extends d.TreeItem{constructor(e,r=!1,i,s,o=!0){super(e,r,i);f(this,"_dragDrop");f(this,"_showChangedNotAffectChildren",!1);f(this,"_showChangedNotAffectParent",!1);f(this,"_type",this.dv(d.react("Unknown")));f(this,"_isExport",this.dv(d.react(!0)));const a=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(a)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=o;let u;const l=()=>{u&&(u(),u=void 0)};this.dispose(l),this.dispose(this.sceneObjectChanged.disposableOn(c=>{l(),c&&(u=d.bind([this,"name"],[c,"name"]))})),this.dispose(this.showChanged.disposableOn(c=>{if(e.setSceneObjectShowFunc(this.sceneObject,c),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let h of this.children)h instanceof Be&&(h._showChangedNotAffectParent=!0,h.show=c,h._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof Be&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=Wp(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new d.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const c=new J;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof V){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.showChanged.disposableOn(h))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof V){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.enabledChanged.disposableOn(h))}return c})),this.childrenChangedEvent.disposableOn(()=>{const c=Wp(this);this._showChangedNotAffectChildren=!0,this.show=c,this._showChangedNotAffectChildren=!1});{const c=()=>{let h="Unknown";this.sceneObject?h=this.sceneObject.typeName:this.children&&(h="Folder"),this._type.value=h};this.dispose(this.sceneObjectChanged.disposableOn(c)),this.dispose(this.childrenResetedEvent.disposableOn(c)),c()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(r){console.error(`sceneTreeItem.jsonStr error ${r}`,r)}}get json(){const e=this.children&&[...this.children].filter(r=>r.isExport).map(r=>r.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let r of e.children){const i=new Be(this.tree,!0);i.json=r,this.children.push(i)}}}clone(){try{const e=new Be(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,r){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(r&&r.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return r&&this.children.push(r),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",r);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",r);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,r)}}(n=>{n.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:d.reactJsonWithUndefined(void 0)})})(Be||(Be={})),d.extendClassProps(Be.prototype,Be.createDefaultProps);function qp(n,t,e){let{offsetY:r}=t;if(!t.target||!("clientTop"in t.target))return"none";r+=2,r+=t.target.clientTop;let i="none";return n.children?r<=e*.3?i="before":r>=e*.7?!n.uiTreeObject.collapsed&&n.children.length>0?i="inner":i="after":i="inner":r<=e*.5?i="before":i="after",i}class Xp extends Sf{constructor(t){super(),this._treeItem=t;const{dragStartDataManager:e}=this._treeItem.sceneTree;let r="none";const i=this.disposeVar(d.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=r,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${r});`)},200));function s(o){r!==o&&(r=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const a=e;if(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0){const u=a.data.value,l=this._treeItem,{tree:c}=l;if(c){const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const p=qp(l,o,c.itemDivHeight);if(p!=="none"&&d.Tree.canMoveToTreeItems(h,l,p)){o.dataTransfer.dropEffect="move",s(p);return}}}o.dataTransfer.dropEffect="none",s("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const a=e;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const u=a.data.value,l=this._treeItem,{tree:c}=l;if(!c)return;const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const p=qp(l,o,c.itemDivHeight);p!=="none"&&d.Tree.canMoveToTreeItems(h,l,p)&&(d.Tree.moveToTreeItems(h,l,p),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{r="none",i.restart()}))}}function p_(n){if(!(n instanceof Be))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new Xp(n)}function g_(n){let t=!1;return n&&("show"in n?t=n.show??!0:"enabled"in n&&(t=n.enabled??!0)),t}function m_(n,t){n&&("show"in n?n.show=t:"enabled"in n&&(n.enabled=t))}const v_=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function y_(n){const t=[],{root:e={}}=n,r=[e];for(;r.length>0;){const i=r.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&r.unshift(s),s.sceneObj){const{type:o=void 0}=s.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),o&&v_.includes(o)&&t.push(s.sceneObj)}}}return t}async function __(n,t){const e=y_(n);let r=0;const i=e.length;for(let s of e)if(++r,t){const o=r/i;t(o,r,i)}}class Yp extends J{constructor(e,r){super();f(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=r}get sceneTree(){return this._sceneTree}}class w_ extends J{constructor(e){super();f(this,"_jsonLoadingEvent",this.disposeVar(new V));f(this,"_setJsonProcessing",this.disposeVar(d.createProcessingFromAsyncFunc(async(e,r)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),r&&await e.promise(this._sceneTree.preloadFunc(r)),this._setJson(r),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=r=>{this._jsonLoadingEvent.emit({type:"error",error:r})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(r){console.error(`json数据装配时发生错误!error: ${r}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new d.CancelError("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function E_(n){return n.name+"_clone"}function Tc(n,t,e){if(n instanceof Be)return n.insertNewTreeItem(t,e);{const r={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return n.insertNewTreeItem(r[t],e)}}function S_(n){[n,...n.getDescendants()].forEach(t=>t.destroy())}const _r=class _r extends d.Tree{constructor(e,r,i,s){super(i);f(this,"_jsonLoading",this.disposeVar(new w_(this)));f(this,"createSceneObjectFunc",_r.defaultCreateSceneObjectFunc);f(this,"createTreeItemDragDropFunc",_r.defaultCreateTreeItemDragDropFunc);f(this,"preloadFunc",_r.defaultPreload);f(this,"getSceneObjectShowFunc",_r.defaultGetSceneObjectShow);f(this,"setSceneObjectShowFunc",_r.defaultSetSceneObjectShow);f(this,"getSceneTreeItemCloneNameFunc",_r.defaultGetSceneTreeItemCloneNameFunc);f(this,"debug",!1);f(this,"_contextMenu",this.disposeVar(new Yp(this,this.projectManager)));f(this,"_showPropUiOnSelecting",this.disposeVar(d.react(!0)));this._name=e,this._dragStartDataManager=r,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,u;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((u=this.lastSelectedItem)==null?void 0:u.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let u of a){const l=u,{sceneObject:c}=l;c&&o.deleteSceneObject(c)&&c.destroy()&&gu(c,void 0);for(let h of l.getDescendants()){const{sceneObject:p}=h;p&&o.deleteSceneObject(p)&&p.destroy()&&gu(p,void 0)}S_(u)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let u of a){const l=u;l.sceneObject&&o.addSceneObject(l.sceneObject)&&gu(l.sceneObject,l)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:a}=this;a&&(this._projectManager.propUiTreeManager.sceneObject=a.sceneObject)}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const r=this.getDescendants();let i;for(let s of r)if(s.sceneObject&&s.sceneObject.id===e){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const r=e.root.children??[];this.root.resetChildren(!0);for(let s of r){const o=new Be(this,!0);o.json=s,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,r){const i=e||this.lastSelectedItem||this.root;return i?Tc(i,r):!1}addNewTreeItem(e,r,i,s){const o=e||this.lastSelectedItem||this.root;if(o&&Tc(o,r)){const a=new Be(this,i);if(a.sceneObject=s,!Tc(o,r,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=tt.create(e,r);return a?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!a){console.warn("addNewTreeItem error!");return}return a.name=e??"未命名组节点",a}createSceneObjectTreeItemFromClass(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const a=tt.createFromClass(e,r);return a?this.addNewTreeItem(i,o,!0,a):void 0}createSceneObjectTreeItemFromJson(e,r,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(r,s))return;const o=tt.createFromJson(e);return console.log(o),o?this.addNewTreeItem(r,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let r of e)this.destroySceneObjectTreeItem(r)}};f(_r,"defaultCreateSceneObjectFunc",d_),f(_r,"defaultCreateTreeItemDragDropFunc",p_),f(_r,"defaultPreload",__),f(_r,"defaultGetSceneObjectShow",g_),f(_r,"defaultSetSceneObjectShow",m_),f(_r,"defaultGetSceneTreeItemCloneNameFunc",E_);let $a=_r;const Oc={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class C_ extends J{constructor(e){super();f(this,"_currentPosition",this.disposeVar(d.reactArrayWithUndefined(void 0)));f(this,"_currentRotation",this.disposeVar(d.reactArrayWithUndefined(void 0)));f(this,"_currentHeading",this.disposeVar(d.react(void 0)));f(this,"_isRotating",this.disposeVar(d.react(!1)));f(this,"_isGround",this.disposeVar(d.react(!1)));f(this,"_startPosition",[0,0,0]);f(this,"_startRotation",[0,0,0]);f(this,"_processing",this.disposeVar(d.createProcessingFromAsyncFunc(async(e,r,i,s)=>{const{currentPosition:o,currentRotation:a}=this;if(!o||s<=0||!a){this._currentPosition.value=r,this._currentRotation.value=i;return}const u=this._startPosition;u.splice(0,3,...o);const l=this._startRotation;l.splice(0,3,...a);let c=Date.now();const h=Pa(u,r);this._currentHeading.value=h;const v=Su(u,r)/s,w=[i[0]-l[0],i[1]-l[1],i[2]-l[2]],I=r[2]-u[2];await e.promise(new Promise(P=>{e.disposer.dispose(d.animateFrame(async()=>{let O=Date.now()-c;O=O<0?0:O,O=O>s?s:O;const m=O*v,_=Hf(u,m,h);if(this.isGround&&_){const g=await this._esviewer.getTerrainHeight([_[0],_[1]]);this._currentPosition.value=[_[0],_[1],g??0]}else _&&(_[2]+=I*(O/s)),this._currentPosition.value=_;if(this.isRotating){const[g,y,E]=w,C=O/s;this._currentRotation.value=[l[0]+g*C,l[1]+y*C,l[2]+E*C]}O===s&&(this._currentPosition.value=r,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,P())}))}))})));this._esviewer=e}get currentPosition(){return this._currentPosition.value}get currentPositionChanged(){return this._currentPosition.changed}get currentRotation(){return this._currentRotation.value}get currentRotationChanged(){return this._currentRotation.changed}get currentHeading(){return this._currentHeading.value}get currentHeadingChanged(){return this._currentHeading.changed}get isRotating(){return this._isRotating.value}set isRotating(e){this._isRotating.value=e}get isRotatingChanged(){return this._isRotating.changed}get isGround(){return this._isGround.value}set isGround(e){this._isGround.value=e}get isGroundChanged(){return this._isGround.changed}get processing(){return this._processing}restart(e,r,i){this._processing.restart(void 0,e,r,i)}cancel(){this._processing.cancel()}}function Hp(n){let t=0;function e(r,i){i++,t=Math.max(i,t),r.forEach(s=>{Array.isArray(s)&&e(s,i)})}return e(n,0),t}const ii=class ii extends kt{constructor(e){super(e);f(this,"editingBindMode","lineString");f(this,"_area",this.dv(d.react(0)));f(this,"_perimeter",this.dv(d.react(0)));const r=()=>{this._updateArea(),this._updatePerimeter()};r(),this.d(this.pointsChanged.don(r))}updateEditing(){var r;const e=[];this.editingBindMode=="doublePoints"?e.push($.DoublePointsAppend,$.DoublePointsModify):this.editingBindMode=="lineString"?e.push($.LineStringAppend,$.LineStringInsert,$.Translation):this.editingBindMode=="circular"?(e.push($.CircularAppend,$.CircularInsert,$.Translation),this.supportEditingModes().includes($.HeightModify)&&e.push($.HeightModify)):this.editingBindMode=="visibility"?e.push($.VisibilityAppend,$.VisibilityModify):this.editingBindMode=="scatter"&&e.push($.ScatterAppend,$.ScatterModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return Rl([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=Qa(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],r=Qa(e,"GEODESIC");return r[r.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=Mp(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=Lp(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let r=[...e];const i=e[0],s=e[e.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||r.push(i);const o=Rp([...this.points,this.points[0]],[...r]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(Hp(a)===3){const u=a.map(p=>p.map(v=>[...v,0]));if(u.length<=1)return{status:"notIncluded",positions:u};const l=u[0],c=u[1];return Ec([...l],[...c])==="oneBig"?{status:"included",positions:u}:{status:"notIncluded",positions:u}}else if(Hp(a)===4){const l=[...a.map(h=>h.map(p=>p.map(v=>[...v,0])))],c=[];return l.forEach(h=>{c.push(h[0])}),{status:"notIncluded",positions:c}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,r){if(this.points&&this.points.length>=2){const i=Ap(this.points,e,r);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=Ec(this.points,e);return r==="oneBig"?!0:r==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new q([this,"editing"],"编辑",!1),new Q([this,"points"],"位置数组",ii.defaults.points,void 0,!0)],style:[...e.style,new it([],"点样式"),new q([this,"pointed"],"开启",!1),new L([this,"pointSize"],"点大小",1),new mt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Et([this,"pointColor"],"点颜色",[1,1,1,1]),new Et([this,"pointOutlineColor"],"轮廓颜色",ii.defaults.pointStyle.outlineColor),new L([this,"pointOutlineWidth"],"轮廓宽度",ii.defaults.pointStyle.outlineWidth),new it([],"线样式"),new q([this,"stroked"],"开启线样式",!0),new q([this,"strokeGround"],"贴地",!1),new L([this,"strokeWidth"],"线宽",1),new mt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Et([this,"strokeColor"],"线颜色",[1,1,1,1]),new it([],"面样式"),new q([this,"filled"],"开启",!1),new q([this,"fillGround"],"贴地",!1),new Et([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new it([],"点样式集合"),new ut([this,"pointMaterial"],"点材质"),new Q([this,"pointMaterialParams"],"点材质参数"),new it([],"线样式集合"),new ut([this,"strokeMaterial"],"线材质"),new Q([this,"strokeMaterialParams"],"线材质参数"),new it([],"面样式集合"),new ut([this,"fillMaterial"],"面材质"),new Q([this,"fillMaterialParams"],"面材质参数")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(e){this.pointStyle={...this.pointStyle,outlineColor:[...e]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(e){this.pointStyle={...this.pointStyle,outlineWidth:e}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};f(ii,"createDefaultProps",()=>({...kt.createDefaultProps(),pointed:!1,pointStyle:d.reactJson({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:d.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:d.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:d.reactPositions(void 0)})),f(ii,"type",ii.register("ESGeoVector",ii,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),f(ii,"supportEditingModes",[...kt.supportEditingModes,$.Translation]);let wt=ii;const zs=class zs extends kt{constructor(){super(...arguments);f(this,"_statusDis",this.dv(d.react(!0)));f(this,"_smoothMoveEvent",this.dv(new V));f(this,"_smoothMoveWithRotationEvent",this.dv(new V));f(this,"_smoothMoveOnGroundEvent",this.dv(new V));f(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new V));f(this,"_automaticLandingEvent",this.dv(new V));f(this,"_smoothMoveKeepPitchEvent",this.dv(new V));f(this,"_smoothMoveRelativelyEvent",this.dv(new V));f(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new V));f(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var r;const e=[];this.editingBindMode=="singlePoint"?(e.push($.Place,$.Translation),["ESLocationMeasurement"].includes(this.typeName)||e.push($.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push($.Scale)):this.editingBindMode=="doublePoints"&&e.push($.DoublePointsAppend,$.DoublePointsModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,r){this._smoothMoveEvent.emit(e,r)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,r,i){this._smoothMoveWithRotationEvent.emit(e,r,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,r,i,s){this._smoothMoveOnGroundEvent.emit(e,r,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,r,i,s,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,r,i,s,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,r){this._smoothMoveKeepPitchEvent.emit(e,r)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,r){this._smoothMoveRelativelyEvent.emit(e,r)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,r,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,r,i)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",location:[...e.location,new q([this,"editing"],"是否编辑"),new st([],()=>this.automaticLanding(),[],"自动落地"),new io([this,"position"],"位置数组",[0,0,0]),new bl([this,"rotation"],"姿态数组",[0,0,0]),new Ue([this,"scale"],"缩放",[1,1,1]),new L([this,"minVisibleDistance"],"最小可见距离",0),new L([this,"maxVisibleDistance"],"最大可见距离",0)],more:[...e.more,new st(["numbers","number"],(r,i)=>this.smoothMove(r,i),[[0,0,0],0],"平滑移动","smoothMove"),new st(["numbers","number"],(r,i)=>this.smoothMoveKeepPitch(r,i),[[0,0,0],0],"固定方向平滑移动","smoothMoveKeepPitch"),new st(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"平滑偏移","smoothMoveWithRotation"),new st(["number","number","number","string"],(r,i,s,o)=>this.smoothMoveOnGround(r,i,s,o),[0,0,0,""],"贴地平滑移动","smoothMoveOnGround"),new st(["numbers","number","number","number","string"],(r,i,s,o,a)=>this.smoothMoveWithRotationOnGround(r,i,s,o,a),[[0,0,0],0,0,0,""],"贴地平滑偏移","smoothMoveWithRotationOnGround"),new st(["numbers","number"],(r,i)=>this.smoothMoveRelatively(r,i),[[0,0,0],0],"smoothMoveRelatively","smoothMoveRelatively"),new st(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveRelativelyWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation"),new q([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};f(zs,"createDefaultProps",()=>({...kt.createDefaultProps(),pointed:!1,pointStyle:d.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:d.reactArray([0,0,0]),rotation:d.reactArray([0,0,0]),scale:d.reactArray([1,1,1]),minVisibleDistance:d.react(0),maxVisibleDistance:d.react(0)})),f(zs,"type",zs.register("ESObjectWithLocation",zs,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),f(zs,"supportEditingModes",[...kt.supportEditingModes,$.Place,$.Translation,$.Rotation,$.Scale,$.DoublePointsAppend,$.DoublePointsModify]);let et=zs;const Wo=class Wo extends et{getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new it([],"点样式集合"),new q([this,"pointed"],"开启点样式",!1),new L([this,"pointSize"],"点大小",1),new mt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Et([this,"pointColor"],"点颜色",[1,1,1,1]),new it([],"线样式集合"),new q([this,"stroked"],"开启线样式",!1),new q([this,"strokeGround"],"是否贴地(线)",!1),new L([this,"strokeWidth"],"线宽",1),new mt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Et([this,"strokeColor"],"线颜色",[1,1,1,1]),new it([],"面样式集合"),new q([this,"filled"],"开启填充样式",!1),new q([this,"fillGround"],"是否贴地",!1),new Et([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...t.more,new it([],"点样式"),new ut([this,"pointMaterial"],"点材质",""),new Q([this,"pointMaterialParams"],"点材质参数",{}),new it([],"线样式"),new ut([this,"strokeMaterial"],"线材质",""),new Q([this,"strokeMaterialParams"],"线材质参数",{}),new it([],"填充样式"),new ut([this,"fillMaterial"],"面材质",""),new Q([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}};f(Wo,"createDefaultProps",()=>({...et.createDefaultProps(),pointed:!1,pointStyle:d.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:d.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:d.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(Wo,"type",Wo.register("ESLocalVector",Wo,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let zo=Wo;const uu=class uu extends zo{};f(uu,"type",uu.register("ESLocalVector2D",uu,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let Di=uu;const I_=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],P_=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],qo=class qo extends et{constructor(){super(...arguments);f(this,"_widgetEvent",this.dv(new V))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new q([this,"screenRender"],"屏幕渲染",!0),new q([this,"sizeByContent"],"尺寸自适应",!0),new ve([this,"size"],"尺寸大小",[100,100]),new ve([this,"anchor"],"偏移比例",[.5,1]),new ve([this,"offset"],"像素偏移",[0,0]),new mt([this,"renderMode"],P_,"渲染模式",0),new mt([this,"rotationType"],I_,"漫游旋转类型",1),new ut([this,"actorTag"],"绑定对象"),new ut([this,"socketName"],"插槽名称"),new Ue([this,"positionOffset"],"位置偏移"),new Ue([this,"rotationOffset"],"相对姿态")],more:[...e.more,new L([this,"zOrder"],"排序",0)]}}};f(qo,"createDefaultProps",()=>({...et.createDefaultProps(),screenRender:!0,size:d.reactArray([100,100]),anchor:d.reactArray([.5,1]),offset:d.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:d.reactArray([0,0,0]),rotationOffset:d.reactArray([0,0,0])})),f(qo,"type",qo.register("ESLabel",qo,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let kr=qo;const Xo=class Xo extends tt{constructor(t){super(t)}};f(Xo,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,fillStyle:d.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(Xo,"type",Xo.register("ESTestObject",Xo,{chsName:"测试",tags:["ESObjects"],description:""}));let Dc=Xo;const si=class si extends kt{constructor(e){super(e);f(this,"_refreshTilesetEvent",this.dv(new V));f(this,"_tilesetReadyEvent",this.dv(new V));f(this,"_supportEdit",this.dv(d.react(!0)));f(this,"_highlightFeatureEvent",this.dv(new V));f(this,"_highlightFeatureAndFlyToEvent",this.dv(new V));f(this,"_strokeFeatureEvent",this.disposeVar(new V));f(this,"_getFeatureTableEvent",this.dv(new V));f(this,"_featureTableResultEvent",this.dv(new V));f(this,"_getMaterialNameListEvent",this.disposeVar(new V));f(this,"_setFeatureStyleEvent",this.dv(new V));f(this,"_setFeatureColorEvent",this.dv(new V));f(this,"_setFeatureVisableEvent",this.dv(new V));f(this,"_resetFeatureStyleEvent",this.dv(new V));f(this,"setMaterialInfoEvent",this.ad(new V));f(this,"_setMaterialEvent",this.disposeVar(new V));f(this,"_clippingPlanesId",this.dv(d.react("")));f(this,"_clippingPlaneIds",this.dv(d.react([])));f(this,"_flattenedPlaneId",this.dv(d.react("")));f(this,"_flattenedPlaneEnabled",this.dv(d.react(!1)));f(this,"_clippingPlaneId",this.dv(d.react("")));f(this,"_excavateId",this.dv(d.reactArray([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[$.Translation,$.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,r){this._highlightFeatureEvent.emit(e,r)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,r,i,s){this._highlightFeatureAndFlyToEvent.emit(e,r,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,r=[1,0,0,1]){this._strokeFeatureEvent.emit(e,r)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const r=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{r(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const r=new J;r.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(r.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{r.isDestroyed()||(r.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e){this._setFeatureStyleEvent.emit(e)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,r){this._setFeatureColorEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,r){this._setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(r=>{const i=new J;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),r(s)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...Oc}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new Se([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new mt([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new mt([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new Q([this,"materialOverrideMap"],"材质替换",si.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new Q([this,"url"],"服务地址",si.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new q([this,"editing"],"编辑",!1,!0),new Ue([this,"offset"],"偏移量",[0,0,0],!0),new bl([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new Q([this,"materialParams"],"materialParams",si.defaults.materialParams),new st(["string","string"],(r,i)=>this.highlightFeature(r,i),["","rgba(255,0,0,1)"],"highlightFeature"),new st(["string","string"],(r,i)=>this.setFeatureColor(r,i),["",""],"setFeatureColor"),new st(["string","string"],(r,i)=>this.setFeatureVisable(r,i),["",""],"setFeatureVisable"),new st([],()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new it([],"ue"),new st([],()=>this.refreshTileset(),[],"refreshTileset"),new ut([this,"actorTag"]),new q([this,"highlight"],"是否高亮"),new Et([this,"highlightColor"]),new L([this,"highlightID"]),new it([],"czm"),new it([],"可视化"),new ve([this,"czmImageBasedLightingFactor"],"反射强度"),new L([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new Q([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new L([this,"czmMaximumMemoryUsage"],"最大内存"),new it([],"常用"),new mt([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new Q([this,"czmStyleJson"],"czmStyle"),new q([this,"czmBackFaceCulling"]),new q([this,"czmSkipLevelOfDetail"]),new L([this,"cacheBytes"],"最大缓存",512*1024*1024),new it([],"调试信息"),new q([this,"czmDebugShowBoundingVolume"]),new q([this,"czmDebugShowContentBoundingVolume"]),new it([],"clippingPlanes"),new q([this,"clippingPlaneEnabled"]),new q([this,"unionClippingRegions"]),new Et([this,"clippingPlaneEdgeColor"]),new L([this,"clippingPlaneEdgeWidth"])]}}};f(si,"createDefaultProps",()=>({...kt.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:d.reactArray([1,0,0,1]),offset:d.reactArrayWithUndefined([0,0,0]),rotation:d.reactArray([0,0,0]),czmImageBasedLightingFactor:d.reactArray([1,1]),czmEnvironmentMapManager:d.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:d.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:512*1024*1024,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:d.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:d.reactJsonWithUndefined({}),featureIdLabel:0,splitDirection:"NONE"})),f(si,"type",si.register("ES3DTileset",si,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),f(si,"supportEditingModes",[...kt.supportEditingModes,$.Translation,$.Rotation]);let sn=si;const Yo=class Yo extends et{constructor(e){super(e);f(this,"_isFlyInCreated",this.dv(d.react(!1)));f(this,"_readyEvent",this.dv(new V));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(_a([this.positionChanged,this.editingChanged],()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()},{time:"donce"}));else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}get readyEvent(){return this._readyEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new L([this,"radius"],"半径",10)]}}};f(Yo,"createDefaultProps",()=>({...et.createDefaultProps(),mode:"cylinder",radius:10})),f(Yo,"type",Yo.register("ESAlarm",Yo,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let xc=Yo;const Us=class Us extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"radius"],"半径",1),new mt([this,"mode"],[["扫描","scan"],["扩散","diffuse"]],"模式",Us.defaults.mode)]}}};f(Us,"createDefaultProps",()=>({...et.createDefaultProps(),radius:1,mode:"scan",collision:!1})),f(Us,"type",Us.register("ESApertureEffect",Us,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let Mc=Us;const Gs=class Gs extends wt{constructor(e){super(e);f(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};f(Gs,"createDefaultProps",()=>({...wt.createDefaultProps(),fillStyle:d.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:d.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),f(Gs,"type",Gs.register("ESGeoPolygon",Gs,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),f(Gs,"supportEditingModes",[...wt.supportEditingModes,$.CircularAppend,$.CircularInsert]);let zt=Gs;const xi=class xi extends zt{get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:xi.defaults.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle??xi.defaults.fillStyle,materialParams:t??xi.defaults.fillStyle.materialParams}}constructor(t){super(t)}};f(xi,"createDefaultProps",()=>({...zt.createDefaultProps(),stroked:!0,filled:!0,units:d.reactArray(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:d.reactJson({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:d.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(xi,"type",xi.register("ESAreaMeasurement",xi,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let Lc=xi;const Ho=class Ho extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new it([],"czm"),new wa([this,"image"],"图片"),new Ue([this,"translation"],"偏移")]}}};f(Ho,"createDefaultProps",()=>({...et.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:d.reactArray([0,0,0])})),f(Ho,"type",Ho.register("ESBlastParticleSystem",Ho,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let Ac=Ho;const An=class An extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new q([this,"reverse"],"反转",An.defaults.reverse),new Ue([this,"size"],"尺寸",An.defaults.size),new Et([this,"edgeColor"],"边框颜色",An.defaults.edgeColor),new L([this,"edgeWidth"],"边框宽度",An.defaults.edgeWidth),new ut([this,"targetID"],"瓦片图层",An.defaults.targetID)]}}};f(An,"createDefaultProps",()=>({...et.createDefaultProps(),reverse:!1,edgeColor:d.reactArray([1,1,1,1]),edgeWidth:2,size:d.reactArray([10,10,10]),targetID:""})),f(An,"type",An.register("ESBoxClipping",An,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let Rc=An;const lu=class lu extends et{constructor(){super(...arguments);f(this,"_thumbnail",this.dv(d.react("")));f(this,"_duration",this.dv(d.react(1)));f(this,"_resetWithCurrentCameraEvent",this.dv(new V));f(this,"_captureEvent",this.dv(new V))}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,r="default"){this.flyInEvent.emit(e,-1,r)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,r){this._captureEvent.emit(e,r)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"ESCameraView"),new st([],()=>this.resetWithCurrentCamera(),[],"设置为当前视角"),new st(["number","number"],(r,i)=>this.capture(r,i),[64,64],"获取缩略图"),new ut([this,"thumbnail"],"缩略图","",!0),new L([this,"duration"],"飞行时间",1,!0)]}}};f(lu,"type",lu.register("ESCameraView",lu,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let il=lu;class sl extends J{constructor(e,r,i){super();f(this,"_view",this.dv(new il));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,r){const a=this._view,u=r;a.duration=u.duration??1,a.position=u.position,a.rotation=u.rotation??[0,0,0],a.thumbnail=u.thumbnail??"",a.name=u.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(d.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(d.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(o.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const an=class an extends tt{constructor(e){super(e);f(this,"_currentViewIndex",this.dv(d.react(-1)));f(this,"_viewWrappers",this.dv(new d.ObservableArray));f(this,"_currentViewWrapper",this.dv(d.react(void 0)));f(this,"_container",this.dv(d.react(void 0)));this.initProcessing();{const r=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};r(),this.d(this._viewWrappers.changedEvent.don(r))}{const r=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};r(),this.d(this._viewWrappers.changedEvent.don(r)),this.d(this._currentViewWrapper.changed.don(r))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return Gp(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const r=this._viewWrappers;if(e.every((i,s)=>{const o=r.get(s).view;return i.duration===o.duration&&Nc(i.position,o.position)&&Nc(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let r of e)this._viewWrappers.push(new sl(this,r))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,r=[64,64]){this._viewWrappers.push(new sl(this,void 0,{name:e,size:r}))}update(e,r,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(e);return r&&(s.view.name=r),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new sl(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new sl(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const r=this._viewWrappers.get(e);return this._currentViewWrapper.value=r,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const r=this._viewWrappers.get(e);r.view.resetWithCurrentCamera(),r.view.capture()}resetViewName(e,r){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=r}updateView(e,r){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=r.position,i.view.rotation=r.rotation??[0,0,0],i.view.duration=r.duration??1,i.view.thumbnail=r.thumbnail??"",i.view.name=r.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const r=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(r,this.flyMode??an.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??an.defaults.loop?(this.flyToView((this._viewWrappers.length+r-1)%this._viewWrappers.length),!0):r-1<0?!1:(this.flyToView(r-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===0)return;const i=this._viewWrappers.splice(r-1,1,e)[0];this._viewWrappers.set(r,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(r+1,1,e)[0];this._viewWrappers.set(r,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??an.defaults.loop?(this.flyToView((r+1)%this._viewWrappers.length),!0):r+1>this._viewWrappers.length-1?!1:(this.flyToView(r+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const r=this._getIndex(e);if(r===-1){console.warn("index === -1");return}this.deleteView(r)}transitionImageUrl(e){return tt.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const r=this.intervalTime??an.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+r)*1e3;return e.promise(d.sleep(s)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(d.createProcessingFromAsyncFunc(async i=>this._flyStep(i))),r=()=>{this.playing?e.restart():e.cancel()};r(),this.d(this.playingChanged.don(r))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new mt([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",an.defaults.flyMode),new st([],()=>this.addView(),[],"添加视角"),new st(["number"],r=>this.insertView(r),[0],"插入视角"),new st([],()=>this.clearAllViews(),[],"清空所有视角"),new st([],()=>this.insertView(this.currentViewIndex+1),[],"当前位置插入视角"),new st([],()=>this.flyToPrevView(),[],"上一个视角"),new st([],()=>this.flyToNextView(),[],"下一个视角"),new st([],()=>this.moveToPreView(),[],"当前视角移动到上一个视角"),new st([],()=>this.moveToNextView(),[],"当前视角移动到下一个视角"),new st(["number"],r=>this.flyToView(r),[0],"飞入指定视角"),new st(["number"],r=>this.setCurrentView(r),[0],"设置当前视角"),new st([],()=>this.deleteCurrentView(),[],"删除当前视角"),new st(["number"],r=>this.deleteView(r),[0],"删除指定视角"),new st(["number"],r=>this.resetView(r),[0],"重置视角"),new L([this,"currentViewIndex"],"当前序号",-1,!1,!0),new mf([this,"playing"],()=>this.stop(),[this,"loop"],"播放",an.defaults),new q([this,"playing"],"是否播放"),new st([],()=>this.stop(),[],"停止"),new q([this,"loop"],"是否循环"),new L([this,"intervalTime"],"间隔时间"),new Q([this,"views"],"视角集合",[],void 0,!0)]}}};f(an,"createDefaultProps",()=>({...tt.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),f(an,"type",an.register("ESCameraViewCollection",an,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let ol=an;const Jo=class Jo extends et{constructor(e){super(e);f(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"aspectRatio"],"宽高比",1.77778),new L([this,"fov"],"横向夹角",90),new L([this,"far"],"视野长度",100),new L([this,"near"],"近面距离",5)]}}};f(Jo,"createDefaultProps",()=>({...et.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),f(Jo,"type",Jo.register("ESCameraVisibleRange",Jo,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let Fc=Jo;const Bo=class Bo extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new mt([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};f(Bo,"createDefaultProps",()=>({...et.createDefaultProps(),mode:"policeCar",allowPicking:!0})),f(Bo,"type",Bo.register("ESCar",Bo,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let kc=Bo;const Ws=class Ws extends wt{constructor(e){super(e);f(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"height"],"高度",10)],coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};f(Ws,"createDefaultProps",()=>({...wt.createDefaultProps(),height:10,filled:!0,fillStyle:d.reactJson({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),f(Ws,"type",Ws.register("ESClassification",Ws,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),f(Ws,"supportEditingModes",[...wt.supportEditingModes,$.CircularAppend,$.CircularInsert,$.HeightModify]);let al=Ws;const jo=class jo extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new q([this,"showArrow"],"显示箭头",!0),new Et([this,"edgeColor"],"线框颜色",[1,1,1,1]),new L([this,"edgetWidth"],"线框宽度",2),new L([this,"width"],"裁剪宽度",200),new L([this,"height"],"裁剪高度",200),new ut([this,"targetID"],"瓦片图层","")]}}};f(jo,"createDefaultProps",()=>({...et.createDefaultProps(),showArrow:!0,edgeColor:d.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),f(jo,"type",jo.register("ESClippingPlane",jo,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let Vc=jo;class b_ extends J{constructor(t,e,r){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container`);{const u=()=>{const c=` ${e.cssText}
|
|
64
|
+
***************************************************************************** */function t_(n,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,i=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){e.label=l[1];break}if(l[0]===6&&e.label<s[1]){e.label=s[1],s=l;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(l);break}s[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(n,e)}catch(c){l=[6,c],i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var rs=function(){function n(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return n}();function e_(n,t){return n>t?1:n<t?-1:0}function ns(n,t,e){for(var r=new rs(null,null),i=r,s=r;;){var o=e(n,t.key);if(o<0){if(t.left===null)break;if(e(n,t.left.key)<0){var a=t.left;if(t.left=a.right,a.right=t,t=a,t.left===null)break}s.left=t,s=t,t=t.left}else if(o>0){if(t.right===null)break;if(e(n,t.right.key)>0){var a=t.right;if(t.right=a.left,a.left=t,t=a,t.right===null)break}i.right=t,i=t,t=t.right}else break}return i.right=t.left,s.left=t.right,t.left=r.right,t.right=r.left,t}function Ic(n,t,e,r){var i=new rs(n,t);if(e===null)return i.left=i.right=null,i;e=ns(n,e,r);var s=r(n,e.key);return s<0?(i.left=e.left,i.right=e,e.left=null):s>=0&&(i.right=e.right,i.left=e,e.right=null),i}function Pp(n,t,e){var r=null,i=null;if(t){t=ns(n,t,e);var s=e(t.key,n);s===0?(r=t.left,i=t.right):s<0?(i=t.right,t.right=null,r=t):(r=t.left,t.left=null,i=t)}return{left:r,right:i}}function r_(n,t,e){return t===null?n:(n===null||(t=ns(n.key,t,e),t.left=n),t)}function Pc(n,t,e,r,i){if(n){r(""+t+(e?"└── ":"├── ")+i(n)+`
|
|
65
|
+
`);var s=t+(e?" ":"│ ");n.left&&Pc(n.left,s,!1,r,i),n.right&&Pc(n.right,s,!0,r,i)}}var bc=function(){function n(t){t===void 0&&(t=e_),this._root=null,this._size=0,this._comparator=t}return n.prototype.insert=function(t,e){return this._size++,this._root=Ic(t,e,this._root,this._comparator)},n.prototype.add=function(t,e){var r=new rs(t,e);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,s=ns(t,this._root,i),o=i(t,s.key);return o===0?this._root=s:(o<0?(r.left=s.left,r.right=s,s.left=null):o>0&&(r.right=s.right,r.left=s,s.right=null),this._size++,this._root=r),this._root},n.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},n.prototype._remove=function(t,e,r){var i;if(e===null)return null;e=ns(t,e,r);var s=r(t,e.key);return s===0?(e.left===null?i=e.right:(i=ns(t,e.left,r),i.right=e.right),this._size--,i):e},n.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=ns(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},n.prototype.findStatic=function(t){for(var e=this._root,r=this._comparator;e;){var i=r(t,e.key);if(i===0)return e;i<0?e=e.left:e=e.right}return null},n.prototype.find=function(t){return this._root&&(this._root=ns(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},n.prototype.contains=function(t){for(var e=this._root,r=this._comparator;e;){var i=r(t,e.key);if(i===0)return!0;i<0?e=e.left:e=e.right}return!1},n.prototype.forEach=function(t,e){for(var r=this._root,i=[],s=!1;!s;)r!==null?(i.push(r),r=r.left):i.length!==0?(r=i.pop(),t.call(e,r),r=r.right):s=!0;return this},n.prototype.range=function(t,e,r,i){for(var s=[],o=this._comparator,a=this._root,u;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),u=o(a.key,e),u>0)break;if(o(a.key,t)>=0&&r.call(i,a))return this;a=a.right}return this},n.prototype.keys=function(){var t=[];return this.forEach(function(e){var r=e.key;return t.push(r)}),t},n.prototype.values=function(){var t=[];return this.forEach(function(e){var r=e.data;return t.push(r)}),t},n.prototype.min=function(){return this._root?this.minNode(this._root).key:null},n.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},n.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},n.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},n.prototype.at=function(t){for(var e=this._root,r=!1,i=0,s=[];!r;)if(e)s.push(e),e=e.left;else if(s.length>0){if(e=s.pop(),i===t)return e;i++,e=e.right}else r=!0;return null},n.prototype.next=function(t){var e=this._root,r=null;if(t.right){for(r=t.right;r.left;)r=r.left;return r}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?(r=e,e=e.left):e=e.right}return r},n.prototype.prev=function(t){var e=this._root,r=null;if(t.left!==null){for(r=t.left;r.right;)r=r.right;return r}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?e=e.left:(r=e,e=e.right)}return r},n.prototype.clear=function(){return this._root=null,this._size=0,this},n.prototype.toList=function(){return i_(this._root)},n.prototype.load=function(t,e,r){e===void 0&&(e=[]),r===void 0&&(r=!1);var i=t.length,s=this._comparator;if(r&&Oc(t,e,0,i-1,s),this._root===null)this._root=Nc(t,e,0,i),this._size=i;else{var o=s_(this.toList(),n_(t,e),s);i=this._size+i,this._root=Tc({head:o},0,i)}return this},n.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),n.prototype.toString=function(t){t===void 0&&(t=function(r){return String(r.key)});var e=[];return Pc(this._root,"",!0,function(r){return e.push(r)},t),e.join("")},n.prototype.update=function(t,e,r){var i=this._comparator,s=Pp(t,this._root,i),o=s.left,a=s.right;i(t,e)<0?a=Ic(e,r,a,i):o=Ic(e,r,o,i),this._root=r_(o,a,i)},n.prototype.split=function(t){return Pp(t,this._root,this._comparator)},n.prototype[Symbol.iterator]=function(){var t,e,r;return t_(this,function(i){switch(i.label){case 0:t=this._root,e=[],r=!1,i.label=1;case 1:return r?[3,6]:t===null?[3,2]:(e.push(t),t=t.left,[3,5]);case 2:return e.length===0?[3,4]:(t=e.pop(),[4,t]);case 3:return i.sent(),t=t.right,[3,5];case 4:r=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},n}();function Nc(n,t,e,r){var i=r-e;if(i>0){var s=e+Math.floor(i/2),o=n[s],a=t[s],u=new rs(o,a);return u.left=Nc(n,t,e,s),u.right=Nc(n,t,s+1,r),u}return null}function n_(n,t){for(var e=new rs(null,null),r=e,i=0;i<n.length;i++)r=r.next=new rs(n[i],t[i]);return r.next=null,e.next}function i_(n){for(var t=n,e=[],r=!1,i=new rs(null,null),s=i;!r;)t?(e.push(t),t=t.left):e.length>0?(t=s=s.next=e.pop(),t=t.right):r=!0;return s.next=null,i.next}function Tc(n,t,e){var r=e-t;if(r>0){var i=t+Math.floor(r/2),s=Tc(n,t,i),o=n.head;return o.left=s,n.head=n.head.next,o.right=Tc(n,i+1,e),o}return null}function s_(n,t,e){for(var r=new rs(null,null),i=r,s=n,o=t;s!==null&&o!==null;)e(s.key,o.key)<0?(i.next=s,s=s.next):(i.next=o,o=o.next),i=i.next;return s!==null?i.next=s:o!==null&&(i.next=o),r.next}function Oc(n,t,e,r,i){if(!(e>=r)){for(var s=n[e+r>>1],o=e-1,a=r+1;;){do o++;while(i(n[o],s)<0);do a--;while(i(n[a],s)>0);if(o>=a)break;var u=n[o];n[o]=n[a],n[a]=u,u=t[o],t[o]=t[a],t[a]=u}Oc(n,t,e,a,i),Oc(n,t,a+1,r,i)}}const xi=11102230246251565e-32,Be=134217729,o_=(3+8*xi)*xi;function xc(n,t,e,r,i){let s,o,a,u,l=t[0],c=r[0],h=0,d=0;c>l==c>-l?(s=l,l=t[++h]):(s=c,c=r[++d]);let g=0;if(h<n&&d<e)for(c>l==c>-l?(o=l+s,a=s-(o-l),l=t[++h]):(o=c+s,a=s-(o-c),c=r[++d]),s=o,a!==0&&(i[g++]=a);h<n&&d<e;)c>l==c>-l?(o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++h]):(o=s+c,u=o-s,a=s-(o-u)+(c-u),c=r[++d]),s=o,a!==0&&(i[g++]=a);for(;h<n;)o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++h],s=o,a!==0&&(i[g++]=a);for(;d<e;)o=s+c,u=o-s,a=s-(o-u)+(c-u),c=r[++d],s=o,a!==0&&(i[g++]=a);return(s!==0||g===0)&&(i[g++]=s),g}function a_(n,t){let e=t[0];for(let r=1;r<n;r++)e+=t[r];return e}function nu(n){return new Float64Array(n)}const u_=(3+16*xi)*xi,l_=(2+12*xi)*xi,c_=(9+64*xi)*xi*xi,Wo=nu(4),bp=nu(8),Np=nu(12),Tp=nu(16),lr=nu(4);function h_(n,t,e,r,i,s,o){let a,u,l,c,h,d,g,y,C,P,T,v,w,m,_,E,I,b;const O=n-i,M=e-i,N=t-s,x=r-s;m=O*x,d=Be*O,g=d-(d-O),y=O-g,d=Be*x,C=d-(d-x),P=x-C,_=y*P-(m-g*C-y*C-g*P),E=N*M,d=Be*N,g=d-(d-N),y=N-g,d=Be*M,C=d-(d-M),P=M-C,I=y*P-(E-g*C-y*C-g*P),T=_-I,h=_-T,Wo[0]=_-(T+h)+(h-I),v=m+T,h=v-m,w=m-(v-h)+(T-h),T=w-E,h=w-T,Wo[1]=w-(T+h)+(h-E),b=v+T,h=b-v,Wo[2]=v-(b-h)+(T-h),Wo[3]=b;let A=a_(4,Wo),F=l_*o;if(A>=F||-A>=F||(h=n-O,a=n-(O+h)+(h-i),h=e-M,l=e-(M+h)+(h-i),h=t-N,u=t-(N+h)+(h-s),h=r-x,c=r-(x+h)+(h-s),a===0&&u===0&&l===0&&c===0)||(F=c_*o+o_*Math.abs(A),A+=O*c+x*a-(N*l+M*u),A>=F||-A>=F))return A;m=a*x,d=Be*a,g=d-(d-a),y=a-g,d=Be*x,C=d-(d-x),P=x-C,_=y*P-(m-g*C-y*C-g*P),E=u*M,d=Be*u,g=d-(d-u),y=u-g,d=Be*M,C=d-(d-M),P=M-C,I=y*P-(E-g*C-y*C-g*P),T=_-I,h=_-T,lr[0]=_-(T+h)+(h-I),v=m+T,h=v-m,w=m-(v-h)+(T-h),T=w-E,h=w-T,lr[1]=w-(T+h)+(h-E),b=v+T,h=b-v,lr[2]=v-(b-h)+(T-h),lr[3]=b;const Y=xc(4,Wo,4,lr,bp);m=O*c,d=Be*O,g=d-(d-O),y=O-g,d=Be*c,C=d-(d-c),P=c-C,_=y*P-(m-g*C-y*C-g*P),E=N*l,d=Be*N,g=d-(d-N),y=N-g,d=Be*l,C=d-(d-l),P=l-C,I=y*P-(E-g*C-y*C-g*P),T=_-I,h=_-T,lr[0]=_-(T+h)+(h-I),v=m+T,h=v-m,w=m-(v-h)+(T-h),T=w-E,h=w-T,lr[1]=w-(T+h)+(h-E),b=v+T,h=b-v,lr[2]=v-(b-h)+(T-h),lr[3]=b;const G=xc(Y,bp,4,lr,Np);m=a*c,d=Be*a,g=d-(d-a),y=a-g,d=Be*c,C=d-(d-c),P=c-C,_=y*P-(m-g*C-y*C-g*P),E=u*l,d=Be*u,g=d-(d-u),y=u-g,d=Be*l,C=d-(d-l),P=l-C,I=y*P-(E-g*C-y*C-g*P),T=_-I,h=_-T,lr[0]=_-(T+h)+(h-I),v=m+T,h=v-m,w=m-(v-h)+(T-h),T=w-E,h=w-T,lr[1]=w-(T+h)+(h-E),b=v+T,h=b-v,lr[2]=v-(b-h)+(T-h),lr[3]=b;const K=xc(G,Np,4,lr,Tp);return Tp[K-1]}function f_(n,t,e,r,i,s){const o=(t-s)*(e-i),a=(n-i)*(r-s),u=o-a,l=Math.abs(o+a);return Math.abs(u)>=u_*l?u:-h_(n,t,e,r,i,s,l)}const iu=(n,t)=>n.ll.x<=t.x&&t.x<=n.ur.x&&n.ll.y<=t.y&&t.y<=n.ur.y,Dc=(n,t)=>{if(t.ur.x<n.ll.x||n.ur.x<t.ll.x||t.ur.y<n.ll.y||n.ur.y<t.ll.y)return null;const e=n.ll.x<t.ll.x?t.ll.x:n.ll.x,r=n.ur.x<t.ur.x?n.ur.x:t.ur.x,i=n.ll.y<t.ll.y?t.ll.y:n.ll.y,s=n.ur.y<t.ur.y?n.ur.y:t.ur.y;return{ll:{x:e,y:i},ur:{x:r,y:s}}};let is=Number.EPSILON;is===void 0&&(is=Math.pow(2,-52));const d_=is*is,Op=(n,t)=>{if(-is<n&&n<is&&-is<t&&t<is)return 0;const e=n-t;return e*e<d_*n*t?0:n<t?-1:1};class p_{constructor(){this.reset()}reset(){this.xRounder=new xp,this.yRounder=new xp}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}class xp{constructor(){this.tree=new bc,this.round(0)}round(t){const e=this.tree.add(t),r=this.tree.prev(e);if(r!==null&&Op(e.key,r.key)===0)return this.tree.remove(t),r.key;const i=this.tree.next(e);return i!==null&&Op(e.key,i.key)===0?(this.tree.remove(t),i.key):t}}const su=new p_,ul=(n,t)=>n.x*t.y-n.y*t.x,Dp=(n,t)=>n.x*t.x+n.y*t.y,Mp=(n,t,e)=>{const r=f_(n.x,n.y,t.x,t.y,e.x,e.y);return r>0?-1:r<0?1:0},ll=n=>Math.sqrt(Dp(n,n)),g_=(n,t,e)=>{const r={x:t.x-n.x,y:t.y-n.y},i={x:e.x-n.x,y:e.y-n.y};return ul(i,r)/ll(i)/ll(r)},m_=(n,t,e)=>{const r={x:t.x-n.x,y:t.y-n.y},i={x:e.x-n.x,y:e.y-n.y};return Dp(i,r)/ll(i)/ll(r)},Lp=(n,t,e)=>t.y===0?null:{x:n.x+t.x/t.y*(e-n.y),y:e},Ap=(n,t,e)=>t.x===0?null:{x:e,y:n.y+t.y/t.x*(e-n.x)},v_=(n,t,e,r)=>{if(t.x===0)return Ap(e,r,n.x);if(r.x===0)return Ap(n,t,e.x);if(t.y===0)return Lp(e,r,n.y);if(r.y===0)return Lp(n,t,e.y);const i=ul(t,r);if(i==0)return null;const s={x:e.x-n.x,y:e.y-n.y},o=ul(s,t)/i,a=ul(s,r)/i,u=n.x+a*t.x,l=e.x+o*r.x,c=n.y+a*t.y,h=e.y+o*r.y,d=(u+l)/2,g=(c+h)/2;return{x:d,y:g}};class sn{static compare(t,e){const r=sn.comparePoints(t.point,e.point);return r!==0?r:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:ss.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let r=0,i=e.length;r<i;r++){const s=e[r];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const r=this.point.events[e];if(r.segment.consumedBy===void 0)for(let i=e+1;i<t;i++){const s=this.point.events[i];s.consumedBy===void 0&&r.otherSE.point.events===s.otherSE.point.events&&r.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const t=[];for(let e=0,r=this.point.events.length;e<r;e++){const i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){const e=new Map,r=i=>{const s=i.otherSE;e.set(i,{sine:g_(this.point,t.point,s.point),cosine:m_(this.point,t.point,s.point)})};return(i,s)=>{e.has(i)||r(i),e.has(s)||r(s);const{sine:o,cosine:a}=e.get(i),{sine:u,cosine:l}=e.get(s);return o>=0&&u>=0?a<l?1:a>l?-1:0:o<0&&u<0?a<l?-1:a>l?1:0:u<o?-1:u>o?1:0}}}let y_=0;class ss{static compare(t,e){const r=t.leftSE.point.x,i=e.leftSE.point.x,s=t.rightSE.point.x,o=e.rightSE.point.x;if(o<r)return 1;if(s<i)return-1;const a=t.leftSE.point.y,u=e.leftSE.point.y,l=t.rightSE.point.y,c=e.rightSE.point.y;if(r<i){if(u<a&&u<l)return 1;if(u>a&&u>l)return-1;const h=t.comparePoint(e.leftSE.point);if(h<0)return 1;if(h>0)return-1;const d=e.comparePoint(t.rightSE.point);return d!==0?d:-1}if(r>i){if(a<u&&a<c)return-1;if(a>u&&a>c)return 1;const h=e.comparePoint(t.leftSE.point);if(h!==0)return h;const d=t.comparePoint(e.rightSE.point);return d<0?1:d>0?-1:1}if(a<u)return-1;if(a>u)return 1;if(s<o){const h=e.comparePoint(t.rightSE.point);if(h!==0)return h}if(s>o){const h=t.comparePoint(e.rightSE.point);if(h<0)return 1;if(h>0)return-1}if(s!==o){const h=l-a,d=s-r,g=c-u,y=o-i;if(h>d&&g<y)return 1;if(h<d&&g>y)return-1}return s>o?1:s<o||l<c?-1:l>c?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,r,i){this.id=++y_,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=r,this.windings=i}static fromRing(t,e,r){let i,s,o;const a=sn.comparePoints(t,e);if(a<0)i=t,s=e,o=1;else if(a>0)i=e,s=t,o=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);const u=new sn(i,!0),l=new sn(s,!1);return new ss(u,l,[r],[o])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,r=this.rightSE.point,i=this.vector();if(e.x===r.x)return t.x===e.x?0:t.x<e.x?1:-1;const s=(t.y-e.y)/i.y,o=e.x+s*i.x;if(t.x===o)return 0;const a=(t.x-e.x)/i.x,u=e.y+a*i.y;return t.y===u?0:t.y<u?-1:1}getIntersection(t){const e=this.bbox(),r=t.bbox(),i=Dc(e,r);if(i===null)return null;const s=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,u=t.rightSE.point,l=iu(e,a)&&this.comparePoint(a)===0,c=iu(r,s)&&t.comparePoint(s)===0,h=iu(e,u)&&this.comparePoint(u)===0,d=iu(r,o)&&t.comparePoint(o)===0;if(c&&l)return d&&!h?o:!d&&h?u:null;if(c)return h&&s.x===u.x&&s.y===u.y?null:s;if(l)return d&&o.x===a.x&&o.y===a.y?null:a;if(d&&h)return null;if(d)return o;if(h)return u;const g=v_(s,this.vector(),a,t.vector());return g===null||!iu(i,g)?null:su.round(g.x,g.y)}split(t){const e=[],r=t.events!==void 0,i=new sn(t,!0),s=new sn(t,!1),o=this.rightSE;this.replaceRightSE(s),e.push(s),e.push(i);const a=new ss(i,o,this.rings.slice(),this.windings.slice());return sn.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),sn.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),s.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,r=this.windings.length;e<r;e++)this.windings[e]*=-1}consume(t){let e=this,r=t;for(;e.consumedBy;)e=e.consumedBy;for(;r.consumedBy;)r=r.consumedBy;const i=ss.compare(e,r);if(i!==0){if(i>0){const s=e;e=r,r=s}if(e.prev===r){const s=e;e=r,r=s}for(let s=0,o=r.rings.length;s<o;s++){const a=r.rings[s],u=r.windings[s],l=e.rings.indexOf(a);l===-1?(e.rings.push(a),e.windings.push(u)):e.windings[l]+=u}r.rings=null,r.windings=null,r.consumedBy=e,r.leftSE.consumedBy=e.leftSE,r.rightSE.consumedBy=e.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,r=this._afterState.windings,i=this._afterState.multiPolys;for(let a=0,u=this.rings.length;a<u;a++){const l=this.rings[a],c=this.windings[a],h=e.indexOf(l);h===-1?(e.push(l),r.push(c)):r[h]+=c}const s=[],o=[];for(let a=0,u=e.length;a<u;a++){if(r[a]===0)continue;const l=e[a],c=l.poly;if(o.indexOf(c)===-1)if(l.isExterior)s.push(c);else{o.indexOf(c)===-1&&o.push(c);const h=s.indexOf(l.poly);h!==-1&&s.splice(h,1)}}for(let a=0,u=s.length;a<u;a++){const l=s[a].multiPoly;i.indexOf(l)===-1&&i.push(l)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(Ln.type){case"union":{const r=t.length===0,i=e.length===0;this._isInResult=r!==i;break}case"intersection":{let r,i;t.length<e.length?(r=t.length,i=e.length):(r=e.length,i=t.length),this._isInResult=i===Ln.numMultiPolys&&r<i;break}case"xor":{const r=Math.abs(t.length-e.length);this._isInResult=r%2===1;break}case"difference":{const r=i=>i.length===1&&i[0].isSubject;this._isInResult=r(t)!==r(e);break}default:throw new Error(`Unrecognized operation type found ${Ln.type}`)}return this._isInResult}}class Rp{constructor(t,e,r){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=r,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=su.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let o=1,a=t.length;o<a;o++){if(typeof t[o][0]!="number"||typeof t[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let u=su.round(t[o][0],t[o][1]);u.x===s.x&&u.y===s.y||(this.segments.push(ss.fromRing(s,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),s=u)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(ss.fromRing(s,i,this))}getSweepEvents(){const t=[];for(let e=0,r=this.segments.length;e<r;e++){const i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}class __{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Rp(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let r=1,i=t.length;r<i;r++){const s=new Rp(t[r],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,r=this.interiorRings.length;e<r;e++){const i=this.interiorRings[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class Fp{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let r=0,i=t.length;r<i;r++){const s=new __(t[r],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,r=this.polys.length;e<r;e++){const i=this.polys[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class cl{static factory(t){const e=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,u=s.rightSE;const l=[a],c=a.point,h=[];for(;o=a,a=u,l.push(a),a.point!==c;)for(;;){const d=a.getAvailableLinkedEvents();if(d.length===0){const C=l[0].point,P=l[l.length-1].point;throw new Error(`Unable to complete output ring starting at [${C.x}, ${C.y}]. Last matching segment found ends at [${P.x}, ${P.y}].`)}if(d.length===1){u=d[0].otherSE;break}let g=null;for(let C=0,P=h.length;C<P;C++)if(h[C].point===a.point){g=C;break}if(g!==null){const C=h.splice(g)[0],P=l.splice(C.index);P.unshift(P[0].otherSE),e.push(new cl(P.reverse()));continue}h.push({index:l.length,point:a.point});const y=a.getLeftmostComparator(o);u=d.sort(y)[0].otherSE;break}e.push(new cl(l))}return e}constructor(t){this.events=t;for(let e=0,r=t.length;e<r;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let l=1,c=this.events.length-1;l<c;l++){const h=this.events[l].point,d=this.events[l+1].point;Mp(h,t,d)!==0&&(e.push(h),t=h)}if(e.length===1)return null;const r=e[0],i=e[1];Mp(r,t,i)===0&&e.shift(),e.push(e[0]);const s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,a=this.isExteriorRing()?e.length:-1,u=[];for(let l=o;l!=a;l+=s)u.push([e[l].x,e[l].y]);return u}isExteriorRing(){if(this._isExteriorRing===void 0){const t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const o=this.events[i];sn.compare(t,o)>0&&(t=o)}let e=t.segment.prevInResult(),r=e?e.prevInResult():null;for(;;){if(!e)return null;if(!r)return e.ringOut;if(r.ringOut!==e.ringOut)return r.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=r.prevInResult(),r=e?e.prevInResult():null}}}class kp{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(let e=0,r=this.interiorRings.length;e<r;e++){const i=this.interiorRings[e].getGeom();i!==null&&t.push(i)}return t}}class w_{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,r=this.polys.length;e<r;e++){const i=this.polys[e].getGeom();i!==null&&t.push(i)}return t}_composePolys(t){const e=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];if(!s.poly)if(s.isExteriorRing())e.push(new kp(s));else{const o=s.enclosingRing();o.poly||e.push(new kp(o)),o.poly.addInterior(s)}}return e}}class E_{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ss.compare;this.queue=t,this.tree=new bc(e),this.segments=[]}process(t){const e=t.segment,r=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),r;const i=t.isLeft?this.tree.add(e):this.tree.find(e);if(!i)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let s=i,o=i,a,u;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;u===void 0;)o=this.tree.next(o),o===null?u=null:o.key.consumedBy===void 0&&(u=o.key);if(t.isLeft){let l=null;if(a){const h=a.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(l=h),!a.isAnEndpoint(h))){const d=this._splitSafely(a,h);for(let g=0,y=d.length;g<y;g++)r.push(d[g])}}let c=null;if(u){const h=u.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(c=h),!u.isAnEndpoint(h))){const d=this._splitSafely(u,h);for(let g=0,y=d.length;g<y;g++)r.push(d[g])}}if(l!==null||c!==null){let h=null;l===null?h=c:c===null?h=l:h=sn.comparePoints(l,c)<=0?l:c,this.queue.remove(e.rightSE),r.push(e.rightSE);const d=e.split(h);for(let g=0,y=d.length;g<y;g++)r.push(d[g])}r.length>0?(this.tree.remove(e),r.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&u){const l=a.getIntersection(u);if(l!==null){if(!a.isAnEndpoint(l)){const c=this._splitSafely(a,l);for(let h=0,d=c.length;h<d;h++)r.push(c[h])}if(!u.isAnEndpoint(l)){const c=this._splitSafely(u,l);for(let h=0,d=c.length;h<d;h++)r.push(c[h])}}}this.tree.remove(e)}return r}_splitSafely(t,e){this.tree.remove(t);const r=t.rightSE;this.queue.remove(r);const i=t.split(e);return i.push(r),t.consumedBy===void 0&&this.tree.add(t),i}}const Vp=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,S_=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class C_{run(t,e,r){Ln.type=t,su.reset();const i=[new Fp(e,!0)];for(let h=0,d=r.length;h<d;h++)i.push(new Fp(r[h],!1));if(Ln.numMultiPolys=i.length,Ln.type==="difference"){const h=i[0];let d=1;for(;d<i.length;)Dc(i[d].bbox,h.bbox)!==null?d++:i.splice(d,1)}if(Ln.type==="intersection")for(let h=0,d=i.length;h<d;h++){const g=i[h];for(let y=h+1,C=i.length;y<C;y++)if(Dc(g.bbox,i[y].bbox)===null)return[]}const s=new bc(sn.compare);for(let h=0,d=i.length;h<d;h++){const g=i[h].getSweepEvents();for(let y=0,C=g.length;y<C;y++)if(s.insert(g[y]),s.size>Vp)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new E_(s);let a=s.size,u=s.pop();for(;u;){const h=u.key;if(s.size===a){const g=h.segment;throw new Error(`Unable to pop() ${h.isLeft?"left":"right"} SweepEvent [${h.point.x}, ${h.point.y}] from segment #${g.id} [${g.leftSE.point.x}, ${g.leftSE.point.y}] -> [${g.rightSE.point.x}, ${g.rightSE.point.y}] from queue.`)}if(s.size>Vp)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>S_)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const d=o.process(h);for(let g=0,y=d.length;g<y;g++){const C=d[g];C.consumedBy===void 0&&s.insert(C)}a=s.size,u=s.pop()}su.reset();const l=cl.factory(o.segments);return new w_(l).getGeom()}}const Ln=new C_;var Mc={union:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Ln.run("union",n,e)},intersection:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Ln.run("intersection",n,e)},xor:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Ln.run("xor",n,e)},difference:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Ln.run("difference",n,e)}};function I_(n,t){var e=br(n),r=br(t),i=n.properties||{},s=Mc.difference(e.coordinates,r.coordinates);return s.length===0?null:s.length===1?tr(s[0],i):Gl(s,i)}function P_(n,t,e){e===void 0&&(e={});var r=br(n),i=br(t),s=Mc.intersection(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?tr(s[0],e.properties):Gl(s,e.properties)}function b_(n,t,e){e===void 0&&(e={});var r=br(n),i=br(t),s=Mc.union(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?tr(s[0],e.properties):Gl(s,e.properties)}function zp(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=P_(tr([n]),tr([t]));if(e)return e.geometry.coordinates}function Up(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=b_(tr([n]),tr([t]));if(e)return e.geometry.coordinates}function Gp(n,t=500,e="meters"){const r=Ky(vn(n),t,{units:e});if(r)return r.geometry.coordinates}function Wp(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=I_(tr([n]),tr([t]));if(e)return e.geometry.coordinates}function qp(n,t,e=10,r="meters"){return $y(n,t,{steps:e,units:r}).geometry.coordinates}function Lc(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=tr([n]),r=tr([t]);return Xv(e,r)?"oneBig":$v(e,r)?"twoBig":!1}function Xp(n){const t=p.min(p.objsIterator(n,["0"])),e=p.min(p.objsIterator(n,["1"])),r=p.min(p.objsIterator(n,["2"])),i=p.max(p.objsIterator(n,["0"])),s=p.max(p.objsIterator(n,["1"])),o=p.max(p.objsIterator(n,["2"]));return{minPos:[t,e,r],maxPos:[i,s,o],center:[(t+i)*.5,(e+s)*.5,(r+o)*.5]}}function Hp(n){const{minPos:t,maxPos:e,center:r}=Xp(n);if(t.some(a=>!Number.isFinite(a)||e.some(u=>!Number.isFinite(u))||r.some(u=>!Number.isFinite(u)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=Ou(t,e);let s=i*.5;const o=Math.abs(t[2]-e[2]);return o!=0&&(s=Math.sqrt(i*i+o*o)*.5),{center:r,radius:s}}function Yp(n,t){const e=Xn(n),r=Xn(t);return p.Vector.distance(e,r)}function ou(n,t){const e=[],r=n.length;let i=0;for(let s=0;s<r-1;++s){if(t===void 0||t==="GEODESIC"){const o=Ou(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="RHUMB"){const o=hd(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="NONE"){const o=Yp(n[s],n[s+1]);i+=o}else console.warn(`未知的arcType: ${t},导致距离无法计算!`);e.push(i)}return e}function Ac(n){const t="__getXyzFromPostion";let e=p.getExtProp(n,t);return(!e||!p.Vector.equals(e[0],n))&&(e=[[...n],Xn(n)],p.setExtProp(n,t,e)),e[1]}class Jp extends p.Tree{constructor(t){super(t)}get propUiTree(){return this.uiTree}}class Rc extends p.TreeItem{constructor(t,e,r){super(t,e),this._property=r}get property(){return this._property}}class Fc extends Rc{constructor(t,e){super(t,!1,e)}}class kc extends Rc{constructor(t,e){super(t,!0,e)}get groupChildren(){return this.children}}function Bp(n,t){const e=new Jp(t),r=n.getProperties("chinese"),i=[];for(let s of r)if(s instanceof it){const o=new kc(e,s);o.d(()=>s.destroy()),e.children.push(o),i.push(o)}else{const o=new Fc(e,s);e.children.push(o),o.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const o=s;if(!(o.property instanceof it))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of o.property.children)if(a instanceof it){const u=new kc(e,a);u.d(()=>a.destroy()),o.groupChildren.push(u),i.push(u)}else{const u=new Fc(e,a);o.groupChildren.push(u),u.d(()=>a.destroy())}}return e.d(()=>{e.itemChildrenChanged.reset(),e.itemChildrenToChange.reset();const s=[...e.getDescendants()];s.forEach(o=>{o.children&&(o.children.length=0),o.destroy()}),s.length=0}),e}class qo extends H{constructor(e){super();f(this,"_propTreeReact",this.dv(p.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new p.ObjResettingWithEvent(this.sceneObjectChanged,r=>{if(!r)return;const i=new H;return i.d(r.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(r=>{this._propTreeReact.value=void 0,!(!r||!(r instanceof tt))&&(this._propTreeReact.value=Bp(r,e))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(n=>{n.createDefaultProps=()=>({sceneObject:void 0})})(qo||(qo={})),p.extendClassProps(qo.prototype,qo.createDefaultProps);function Vc(n){return p.reactDeepArrayWithUndefined(n,(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[...t])}function jp(n,t){const e=new Array;for(let r of n)e.push(t(r));return e}function zc(n,t){return n===void 0&&t===void 0?!0:!n||!t?!1:n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function N_(n,t,e){var i;((i=t.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(t))?e.call(n):n.dispose(t.createdEvent.don(()=>e.call(n)))}function T_(n,t,e,r=!0){r&&e(),n.dispose(t.disposableOn(e))}function O_(n,t){const{type:e,id:r}=n;if(e){const i=tt.create(e,r);if(i)return i.json=n,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function Zp(n){const t=n.children&&p.every(n.children,r=>{if(!(r instanceof je))throw new Error("!(treeItem instanceof SceneTreeItem)");return!r.show})||!1,e=n.sceneTree.getSceneObjectShowFunc(n.sceneObject);return!t||e}class je extends p.TreeItem{constructor(e,r=!1,i,s,o=!0){super(e,r,i);f(this,"_dragDrop");f(this,"_showChangedNotAffectChildren",!1);f(this,"_showChangedNotAffectParent",!1);f(this,"_type",this.dv(p.react("Unknown")));f(this,"_isExport",this.dv(p.react(!0)));const a=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(a)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=o;let u;const l=()=>{u&&(u(),u=void 0)};this.dispose(l),this.dispose(this.sceneObjectChanged.disposableOn(c=>{l(),c&&(u=p.bind([this,"name"],[c,"name"]))})),this.dispose(this.showChanged.disposableOn(c=>{if(e.setSceneObjectShowFunc(this.sceneObject,c),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let h of this.children)h instanceof je&&(h._showChangedNotAffectParent=!0,h.show=c,h._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof je&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=Zp(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new p.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const c=new H;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof V){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.showChanged.disposableOn(h))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof V){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.enabledChanged.disposableOn(h))}return c})),this.childrenChangedEvent.disposableOn(()=>{const c=Zp(this);this._showChangedNotAffectChildren=!0,this.show=c,this._showChangedNotAffectChildren=!1});{const c=()=>{let h="Unknown";this.sceneObject?h=this.sceneObject.typeName:this.children&&(h="Folder"),this._type.value=h};this.dispose(this.sceneObjectChanged.disposableOn(c)),this.dispose(this.childrenResetedEvent.disposableOn(c)),c()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(r){console.error(`sceneTreeItem.jsonStr error ${r}`,r)}}get json(){const e=this.children&&[...this.children].filter(r=>r.isExport).map(r=>r.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let r of e.children){const i=new je(this.tree,!0);i.json=r,this.children.push(i)}}}clone(){try{const e=new je(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,r){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(r&&r.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return r&&this.children.push(r),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",r);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",r);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,r)}}(n=>{n.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:p.reactJsonWithUndefined(void 0)})})(je||(je={})),p.extendClassProps(je.prototype,je.createDefaultProps);function Kp(n,t,e){let{offsetY:r}=t;if(!t.target||!("clientTop"in t.target))return"none";r+=2,r+=t.target.clientTop;let i="none";return n.children?r<=e*.3?i="before":r>=e*.7?!n.uiTreeObject.collapsed&&n.children.length>0?i="inner":i="after":i="inner":r<=e*.5?i="before":i="after",i}class Qp extends Of{constructor(t){super(),this._treeItem=t;const{dragStartDataManager:e}=this._treeItem.sceneTree;let r="none";const i=this.disposeVar(p.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=r,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${r});`)},200));function s(o){r!==o&&(r=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const a=e;if(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0){const u=a.data.value,l=this._treeItem,{tree:c}=l;if(c){const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const d=Kp(l,o,c.itemDivHeight);if(d!=="none"&&p.Tree.canMoveToTreeItems(h,l,d)){o.dataTransfer.dropEffect="move",s(d);return}}}o.dataTransfer.dropEffect="none",s("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const a=e;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const u=a.data.value,l=this._treeItem,{tree:c}=l;if(!c)return;const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const d=Kp(l,o,c.itemDivHeight);d!=="none"&&p.Tree.canMoveToTreeItems(h,l,d)&&(p.Tree.moveToTreeItems(h,l,d),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{r="none",i.restart()}))}}function x_(n){if(!(n instanceof je))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new Qp(n)}function D_(n){let t=!1;return n&&("show"in n?t=n.show??!0:"enabled"in n&&(t=n.enabled??!0)),t}function M_(n,t){n&&("show"in n?n.show=t:"enabled"in n&&(n.enabled=t))}const L_=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function A_(n){const t=[],{root:e={}}=n,r=[e];for(;r.length>0;){const i=r.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&r.unshift(s),s.sceneObj){const{type:o=void 0}=s.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),o&&L_.includes(o)&&t.push(s.sceneObj)}}}return t}async function R_(n,t){const e=A_(n);let r=0;const i=e.length;for(let s of e)if(++r,t){const o=r/i;t(o,r,i)}}class $p extends H{constructor(e,r){super();f(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=r}get sceneTree(){return this._sceneTree}}class F_ extends H{constructor(e){super();f(this,"_jsonLoadingEvent",this.disposeVar(new V));f(this,"_setJsonProcessing",this.disposeVar(p.createProcessingFromAsyncFunc(async(e,r)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),r&&await e.promise(this._sceneTree.preloadFunc(r)),this._setJson(r),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=r=>{this._jsonLoadingEvent.emit({type:"error",error:r})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(r){console.error(`json数据装配时发生错误!error: ${r}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new p.CancelError("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function k_(n){return n.name+"_clone"}function Uc(n,t,e){if(n instanceof je)return n.insertNewTreeItem(t,e);{const r={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return n.insertNewTreeItem(r[t],e)}}function V_(n){[n,...n.getDescendants()].forEach(t=>t.destroy())}const wr=class wr extends p.Tree{constructor(e,r,i,s){super(i);f(this,"_jsonLoading",this.disposeVar(new F_(this)));f(this,"createSceneObjectFunc",wr.defaultCreateSceneObjectFunc);f(this,"createTreeItemDragDropFunc",wr.defaultCreateTreeItemDragDropFunc);f(this,"preloadFunc",wr.defaultPreload);f(this,"getSceneObjectShowFunc",wr.defaultGetSceneObjectShow);f(this,"setSceneObjectShowFunc",wr.defaultSetSceneObjectShow);f(this,"getSceneTreeItemCloneNameFunc",wr.defaultGetSceneTreeItemCloneNameFunc);f(this,"debug",!1);f(this,"_contextMenu",this.disposeVar(new $p(this,this.projectManager)));f(this,"_showPropUiOnSelecting",this.disposeVar(p.react(!0)));this._name=e,this._dragStartDataManager=r,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,u;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((u=this.lastSelectedItem)==null?void 0:u.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let u of a){const l=u,{sceneObject:c}=l;c&&o.deleteSceneObject(c)&&c.destroy()&&Su(c,void 0);for(let h of l.getDescendants()){const{sceneObject:d}=h;d&&o.deleteSceneObject(d)&&d.destroy()&&Su(d,void 0)}V_(u)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let u of a){const l=u;l.sceneObject&&o.addSceneObject(l.sceneObject)&&Su(l.sceneObject,l)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:a}=this;a&&(this._projectManager.propUiTreeManager.sceneObject=a.sceneObject)}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const r=this.getDescendants();let i;for(let s of r)if(s.sceneObject&&s.sceneObject.id===e){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const r=e.root.children??[];this.root.resetChildren(!0);for(let s of r){const o=new je(this,!0);o.json=s,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,r){const i=e||this.lastSelectedItem||this.root;return i?Uc(i,r):!1}addNewTreeItem(e,r,i,s){const o=e||this.lastSelectedItem||this.root;if(o&&Uc(o,r)){const a=new je(this,i);if(a.sceneObject=s,!Uc(o,r,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=tt.create(e,r);return a?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!a){console.warn("addNewTreeItem error!");return}return a.name=e??"未命名组节点",a}createSceneObjectTreeItemFromClass(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const a=tt.createFromClass(e,r);return a?this.addNewTreeItem(i,o,!0,a):void 0}createSceneObjectTreeItemFromJson(e,r,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(r,s))return;const o=tt.createFromJson(e);return console.log(o),o?this.addNewTreeItem(r,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let r of e)this.destroySceneObjectTreeItem(r)}};f(wr,"defaultCreateSceneObjectFunc",O_),f(wr,"defaultCreateTreeItemDragDropFunc",x_),f(wr,"defaultPreload",R_),f(wr,"defaultGetSceneObjectShow",D_),f(wr,"defaultSetSceneObjectShow",M_),f(wr,"defaultGetSceneTreeItemCloneNameFunc",k_);let au=wr;const Gc={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class z_ extends H{constructor(e){super();f(this,"_currentPosition",this.disposeVar(p.reactArrayWithUndefined(void 0)));f(this,"_currentRotation",this.disposeVar(p.reactArrayWithUndefined(void 0)));f(this,"_currentHeading",this.disposeVar(p.react(void 0)));f(this,"_isRotating",this.disposeVar(p.react(!1)));f(this,"_isGround",this.disposeVar(p.react(!1)));f(this,"_startPosition",[0,0,0]);f(this,"_startRotation",[0,0,0]);f(this,"_processing",this.disposeVar(p.createProcessingFromAsyncFunc(async(e,r,i,s)=>{const{currentPosition:o,currentRotation:a}=this;if(!o||s<=0||!a){this._currentPosition.value=r,this._currentRotation.value=i;return}const u=this._startPosition;u.splice(0,3,...o);const l=this._startRotation;l.splice(0,3,...a);let c=Date.now();const h=La(u,r);this._currentHeading.value=h;const g=Ou(u,r)/s,y=[i[0]-l[0],i[1]-l[1],i[2]-l[2]],C=r[2]-u[2];await e.promise(new Promise(P=>{e.disposer.dispose(p.animateFrame(async()=>{let T=Date.now()-c;T=T<0?0:T,T=T>s?s:T;const v=T*g,w=$f(u,v,h);if(this.isGround&&w){const m=await this._esviewer.getTerrainHeight([w[0],w[1]]);this._currentPosition.value=[w[0],w[1],m??0]}else w&&(w[2]+=C*(T/s)),this._currentPosition.value=w;if(this.isRotating){const[m,_,E]=y,I=T/s;this._currentRotation.value=[l[0]+m*I,l[1]+_*I,l[2]+E*I]}T===s&&(this._currentPosition.value=r,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,P())}))}))})));this._esviewer=e}get currentPosition(){return this._currentPosition.value}get currentPositionChanged(){return this._currentPosition.changed}get currentRotation(){return this._currentRotation.value}get currentRotationChanged(){return this._currentRotation.changed}get currentHeading(){return this._currentHeading.value}get currentHeadingChanged(){return this._currentHeading.changed}get isRotating(){return this._isRotating.value}set isRotating(e){this._isRotating.value=e}get isRotatingChanged(){return this._isRotating.changed}get isGround(){return this._isGround.value}set isGround(e){this._isGround.value=e}get isGroundChanged(){return this._isGround.changed}get processing(){return this._processing}restart(e,r,i){this._processing.restart(void 0,e,r,i)}cancel(){this._processing.cancel()}}function tg(n){let t=0;function e(r,i){i++,t=Math.max(i,t),r.forEach(s=>{Array.isArray(s)&&e(s,i)})}return e(n,0),t}const si=class si extends Ft{constructor(e){super(e);f(this,"editingBindMode","lineString");f(this,"_area",this.dv(p.react(0)));f(this,"_perimeter",this.dv(p.react(0)));const r=()=>{this._updateArea(),this._updatePerimeter()};r(),this.d(this.pointsChanged.don(r))}updateEditing(){var r;const e=[];this.editingBindMode=="doublePoints"?e.push($.DoublePointsAppend,$.DoublePointsModify):this.editingBindMode=="lineString"?e.push($.LineStringAppend,$.LineStringInsert,$.Translation):this.editingBindMode=="circular"?(e.push($.CircularAppend,$.CircularInsert,$.Translation),this.supportEditingModes().includes($.HeightModify)&&e.push($.HeightModify)):this.editingBindMode=="visibility"?e.push($.VisibilityAppend,$.VisibilityModify):this.editingBindMode=="scatter"&&e.push($.ScatterAppend,$.ScatterModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return Jl([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=ou(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],r=ou(e,"GEODESIC");return r[r.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=zp(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=Up(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let r=[...e];const i=e[0],s=e[e.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||r.push(i);const o=Wp([...this.points,this.points[0]],[...r]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(tg(a)===3){const u=a.map(d=>d.map(g=>[...g,0]));if(u.length<=1)return{status:"notIncluded",positions:u};const l=u[0],c=u[1];return Lc([...l],[...c])==="oneBig"?{status:"included",positions:u}:{status:"notIncluded",positions:u}}else if(tg(a)===4){const l=[...a.map(h=>h.map(d=>d.map(g=>[...g,0])))],c=[];return l.forEach(h=>{c.push(h[0])}),{status:"notIncluded",positions:c}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,r){if(this.points&&this.points.length>=2){const i=Gp(this.points,e,r);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=Lc(this.points,e);return r==="oneBig"?!0:r==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new q([this,"editing"],"编辑",!1),new Q([this,"points"],"位置数组",si.defaults.points,void 0,!0)],style:[...e.style,new it([],"点样式"),new q([this,"pointed"],"开启",!1),new L([this,"pointSize"],"点大小",1),new mt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Et([this,"pointColor"],"点颜色",[1,1,1,1]),new Et([this,"pointOutlineColor"],"轮廓颜色",si.defaults.pointStyle.outlineColor),new L([this,"pointOutlineWidth"],"轮廓宽度",si.defaults.pointStyle.outlineWidth),new it([],"线样式"),new q([this,"stroked"],"开启线样式",!0),new q([this,"strokeGround"],"贴地",!1),new L([this,"strokeWidth"],"线宽",1),new mt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Et([this,"strokeColor"],"线颜色",[1,1,1,1]),new it([],"面样式"),new q([this,"filled"],"开启",!1),new q([this,"fillGround"],"贴地",!1),new Et([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new it([],"点样式集合"),new ut([this,"pointMaterial"],"点材质"),new Q([this,"pointMaterialParams"],"点材质参数"),new it([],"线样式集合"),new ut([this,"strokeMaterial"],"线材质"),new Q([this,"strokeMaterialParams"],"线材质参数"),new it([],"面样式集合"),new ut([this,"fillMaterial"],"面材质"),new Q([this,"fillMaterialParams"],"面材质参数")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(e){this.pointStyle={...this.pointStyle,outlineColor:[...e]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(e){this.pointStyle={...this.pointStyle,outlineWidth:e}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};f(si,"createDefaultProps",()=>({...Ft.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:p.reactPositions(void 0)})),f(si,"type",si.register("ESGeoVector",si,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),f(si,"supportEditingModes",[...Ft.supportEditingModes,$.Translation]);let wt=si;const qs=class qs extends Ft{constructor(){super(...arguments);f(this,"_statusDis",this.dv(p.react(!0)));f(this,"_smoothMoveEvent",this.dv(new V));f(this,"_smoothMoveWithRotationEvent",this.dv(new V));f(this,"_smoothMoveOnGroundEvent",this.dv(new V));f(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new V));f(this,"_automaticLandingEvent",this.dv(new V));f(this,"_smoothMoveKeepPitchEvent",this.dv(new V));f(this,"_smoothMoveRelativelyEvent",this.dv(new V));f(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new V));f(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var r;const e=[];this.editingBindMode=="singlePoint"?(e.push($.Place,$.Translation),["ESLocationMeasurement"].includes(this.typeName)||e.push($.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push($.Scale)):this.editingBindMode=="doublePoints"&&e.push($.DoublePointsAppend,$.DoublePointsModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,r){this._smoothMoveEvent.emit(e,r)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,r,i){this._smoothMoveWithRotationEvent.emit(e,r,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,r,i,s){this._smoothMoveOnGroundEvent.emit(e,r,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,r,i,s,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,r,i,s,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,r){this._smoothMoveKeepPitchEvent.emit(e,r)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,r){this._smoothMoveRelativelyEvent.emit(e,r)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,r,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,r,i)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",location:[...e.location,new q([this,"editing"],"是否编辑"),new st([],()=>this.automaticLanding(),[],"自动落地"),new lo([this,"position"],"位置数组",[0,0,0]),new Vl([this,"rotation"],"姿态数组",[0,0,0]),new Ge([this,"scale"],"缩放",[1,1,1]),new L([this,"minVisibleDistance"],"最小可见距离",0),new L([this,"maxVisibleDistance"],"最大可见距离",0)],more:[...e.more,new st(["numbers","number"],(r,i)=>this.smoothMove(r,i),[[0,0,0],0],"平滑移动","smoothMove"),new st(["numbers","number"],(r,i)=>this.smoothMoveKeepPitch(r,i),[[0,0,0],0],"固定方向平滑移动","smoothMoveKeepPitch"),new st(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"平滑偏移","smoothMoveWithRotation"),new st(["number","number","number","string"],(r,i,s,o)=>this.smoothMoveOnGround(r,i,s,o),[0,0,0,""],"贴地平滑移动","smoothMoveOnGround"),new st(["numbers","number","number","number","string"],(r,i,s,o,a)=>this.smoothMoveWithRotationOnGround(r,i,s,o,a),[[0,0,0],0,0,0,""],"贴地平滑偏移","smoothMoveWithRotationOnGround"),new st(["numbers","number"],(r,i)=>this.smoothMoveRelatively(r,i),[[0,0,0],0],"smoothMoveRelatively","smoothMoveRelatively"),new st(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveRelativelyWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation"),new q([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};f(qs,"createDefaultProps",()=>({...Ft.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:p.reactArray([0,0,0]),rotation:p.reactArray([0,0,0]),scale:p.reactArray([1,1,1]),minVisibleDistance:p.react(0),maxVisibleDistance:p.react(0)})),f(qs,"type",qs.register("ESObjectWithLocation",qs,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),f(qs,"supportEditingModes",[...Ft.supportEditingModes,$.Place,$.Translation,$.Rotation,$.Scale,$.DoublePointsAppend,$.DoublePointsModify]);let et=qs;const Zo=class Zo extends et{getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new it([],"点样式集合"),new q([this,"pointed"],"开启点样式",!1),new L([this,"pointSize"],"点大小",1),new mt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Et([this,"pointColor"],"点颜色",[1,1,1,1]),new it([],"线样式集合"),new q([this,"stroked"],"开启线样式",!1),new q([this,"strokeGround"],"是否贴地(线)",!1),new L([this,"strokeWidth"],"线宽",1),new mt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Et([this,"strokeColor"],"线颜色",[1,1,1,1]),new it([],"面样式集合"),new q([this,"filled"],"开启填充样式",!1),new q([this,"fillGround"],"是否贴地",!1),new Et([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...t.more,new it([],"点样式"),new ut([this,"pointMaterial"],"点材质",""),new Q([this,"pointMaterialParams"],"点材质参数",{}),new it([],"线样式"),new ut([this,"strokeMaterial"],"线材质",""),new Q([this,"strokeMaterialParams"],"线材质参数",{}),new it([],"填充样式"),new ut([this,"fillMaterial"],"面材质",""),new Q([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}};f(Zo,"createDefaultProps",()=>({...et.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(Zo,"type",Zo.register("ESLocalVector",Zo,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let Xo=Zo;const gu=class gu extends Xo{};f(gu,"type",gu.register("ESLocalVector2D",gu,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let Di=gu;const U_=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],G_=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],Ko=class Ko extends et{constructor(){super(...arguments);f(this,"_widgetEvent",this.dv(new V))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new q([this,"screenRender"],"屏幕渲染",!0),new q([this,"sizeByContent"],"尺寸自适应",!0),new ve([this,"size"],"尺寸大小",[100,100]),new ve([this,"anchor"],"偏移比例",[.5,1]),new ve([this,"offset"],"像素偏移",[0,0]),new mt([this,"renderMode"],G_,"渲染模式",0),new mt([this,"rotationType"],U_,"漫游旋转类型",1),new ut([this,"actorTag"],"绑定对象"),new ut([this,"socketName"],"插槽名称"),new Ge([this,"positionOffset"],"位置偏移"),new Ge([this,"rotationOffset"],"相对姿态")],more:[...e.more,new L([this,"zOrder"],"排序",0)]}}};f(Ko,"createDefaultProps",()=>({...et.createDefaultProps(),screenRender:!0,size:p.reactArray([100,100]),anchor:p.reactArray([.5,1]),offset:p.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:p.reactArray([0,0,0]),rotationOffset:p.reactArray([0,0,0])})),f(Ko,"type",Ko.register("ESLabel",Ko,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let Vr=Ko;const Qo=class Qo extends tt{constructor(t){super(t)}};f(Qo,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(Qo,"type",Qo.register("ESTestObject",Qo,{chsName:"测试",tags:["ESObjects"],description:""}));let Wc=Qo;const oi=class oi extends Ft{constructor(e){super(e);f(this,"_refreshTilesetEvent",this.dv(new V));f(this,"_tilesetReadyEvent",this.dv(new V));f(this,"_supportEdit",this.dv(p.react(!0)));f(this,"_highlightFeatureEvent",this.dv(new V));f(this,"_highlightFeatureAndFlyToEvent",this.dv(new V));f(this,"_strokeFeatureEvent",this.disposeVar(new V));f(this,"_getFeatureTableEvent",this.dv(new V));f(this,"_featureTableResultEvent",this.dv(new V));f(this,"_getMaterialNameListEvent",this.disposeVar(new V));f(this,"_setFeatureStyleEvent",this.dv(new V));f(this,"_setFeatureColorEvent",this.dv(new V));f(this,"_setFeatureVisableEvent",this.dv(new V));f(this,"_resetFeatureStyleEvent",this.dv(new V));f(this,"setMaterialInfoEvent",this.ad(new V));f(this,"_setMaterialEvent",this.disposeVar(new V));f(this,"_clippingPlanesId",this.dv(p.react("")));f(this,"_clippingPlaneIds",this.dv(p.react([])));f(this,"_flattenedPlaneId",this.dv(p.react("")));f(this,"_flattenedPlaneEnabled",this.dv(p.react(!1)));f(this,"_clippingPlaneId",this.dv(p.react("")));f(this,"_excavateId",this.dv(p.reactArray([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[$.Translation,$.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,r){this._highlightFeatureEvent.emit(e,r)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,r,i,s){this._highlightFeatureAndFlyToEvent.emit(e,r,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,r=[1,0,0,1]){this._strokeFeatureEvent.emit(e,r)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const r=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{r(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const r=new H;r.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(r.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{r.isDestroyed()||(r.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e){this._setFeatureStyleEvent.emit(e)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,r){this._setFeatureColorEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,r){this._setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(r=>{const i=new H;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),r(s)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...Gc}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new Se([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new mt([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new mt([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new Q([this,"materialOverrideMap"],"材质替换",oi.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new Q([this,"url"],"服务地址",oi.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new q([this,"editing"],"编辑",!1,!0),new Ge([this,"offset"],"偏移量",[0,0,0],!0),new Vl([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new Q([this,"materialParams"],"materialParams",oi.defaults.materialParams),new st(["string","string"],(r,i)=>this.highlightFeature(r,i),["","rgba(255,0,0,1)"],"highlightFeature"),new st(["string","string"],(r,i)=>this.setFeatureColor(r,i),["",""],"setFeatureColor"),new st(["string","string"],(r,i)=>this.setFeatureVisable(r,i),["",""],"setFeatureVisable"),new st([],()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new it([],"ue"),new st([],()=>this.refreshTileset(),[],"refreshTileset"),new ut([this,"actorTag"]),new q([this,"highlight"],"是否高亮"),new Et([this,"highlightColor"]),new L([this,"highlightID"]),new it([],"czm"),new it([],"可视化"),new ve([this,"czmImageBasedLightingFactor"],"反射强度"),new L([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new Q([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new L([this,"czmMaximumMemoryUsage"],"最大内存"),new it([],"常用"),new mt([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new Q([this,"czmStyleJson"],"czmStyle"),new q([this,"czmBackFaceCulling"]),new q([this,"czmSkipLevelOfDetail"]),new L([this,"cacheBytes"],"最大缓存",512*1024*1024),new it([],"调试信息"),new q([this,"czmDebugShowBoundingVolume"]),new q([this,"czmDebugShowContentBoundingVolume"]),new it([],"clippingPlanes"),new q([this,"clippingPlaneEnabled"]),new q([this,"unionClippingRegions"]),new Et([this,"clippingPlaneEdgeColor"]),new L([this,"clippingPlaneEdgeWidth"])]}}};f(oi,"createDefaultProps",()=>({...Ft.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:p.reactArray([1,0,0,1]),offset:p.reactArrayWithUndefined([0,0,0]),rotation:p.reactArray([0,0,0]),czmImageBasedLightingFactor:p.reactArray([1,1]),czmEnvironmentMapManager:p.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:p.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:512*1024*1024,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:p.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:p.reactJsonWithUndefined({}),featureIdLabel:0,splitDirection:"NONE"})),f(oi,"type",oi.register("ES3DTileset",oi,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),f(oi,"supportEditingModes",[...Ft.supportEditingModes,$.Translation,$.Rotation]);let on=oi;const $o=class $o extends et{constructor(e){super(e);f(this,"_isFlyInCreated",this.dv(p.react(!1)));f(this,"_readyEvent",this.dv(new V));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(uo([this.positionChanged,this.editingChanged],()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()},{time:"donce"}));else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}get readyEvent(){return this._readyEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new L([this,"radius"],"半径",10)]}}};f($o,"createDefaultProps",()=>({...et.createDefaultProps(),mode:"cylinder",radius:10})),f($o,"type",$o.register("ESAlarm",$o,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let qc=$o;const Xs=class Xs extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"radius"],"半径",1),new mt([this,"mode"],[["扫描","scan"],["扩散","diffuse"]],"模式",Xs.defaults.mode)]}}};f(Xs,"createDefaultProps",()=>({...et.createDefaultProps(),radius:1,mode:"scan",collision:!1})),f(Xs,"type",Xs.register("ESApertureEffect",Xs,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let Xc=Xs;const Hs=class Hs extends wt{constructor(e){super(e);f(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};f(Hs,"createDefaultProps",()=>({...wt.createDefaultProps(),fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),f(Hs,"type",Hs.register("ESGeoPolygon",Hs,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),f(Hs,"supportEditingModes",[...wt.supportEditingModes,$.CircularAppend,$.CircularInsert]);let Vt=Hs;const Li=class Li extends Vt{get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:Li.defaults.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle??Li.defaults.fillStyle,materialParams:t??Li.defaults.fillStyle.materialParams}}constructor(t){super(t)}};f(Li,"createDefaultProps",()=>({...Vt.createDefaultProps(),stroked:!0,filled:!0,units:p.reactArray(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:p.reactJson({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(Li,"type",Li.register("ESAreaMeasurement",Li,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let Hc=Li;const ta=class ta extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new it([],"czm"),new Ta([this,"image"],"图片"),new Ge([this,"translation"],"偏移")]}}};f(ta,"createDefaultProps",()=>({...et.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:p.reactArray([0,0,0])})),f(ta,"type",ta.register("ESBlastParticleSystem",ta,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let Yc=ta;const Rn=class Rn extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new q([this,"reverse"],"反转",Rn.defaults.reverse),new Ge([this,"size"],"尺寸",Rn.defaults.size),new Et([this,"edgeColor"],"边框颜色",Rn.defaults.edgeColor),new L([this,"edgeWidth"],"边框宽度",Rn.defaults.edgeWidth),new ut([this,"targetID"],"瓦片图层",Rn.defaults.targetID)]}}};f(Rn,"createDefaultProps",()=>({...et.createDefaultProps(),reverse:!1,edgeColor:p.reactArray([1,1,1,1]),edgeWidth:2,size:p.reactArray([10,10,10]),targetID:""})),f(Rn,"type",Rn.register("ESBoxClipping",Rn,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let Jc=Rn;const mu=class mu extends et{constructor(){super(...arguments);f(this,"_thumbnail",this.dv(p.react("")));f(this,"_duration",this.dv(p.react(1)));f(this,"_resetWithCurrentCameraEvent",this.dv(new V));f(this,"_captureEvent",this.dv(new V))}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,r="default"){this.flyInEvent.emit(e,-1,r)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,r){this._captureEvent.emit(e,r)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"ESCameraView"),new st([],()=>this.resetWithCurrentCamera(),[],"设置为当前视角"),new st(["number","number"],(r,i)=>this.capture(r,i),[64,64],"获取缩略图"),new ut([this,"thumbnail"],"缩略图","",!0),new L([this,"duration"],"飞行时间",1,!0)]}}};f(mu,"type",mu.register("ESCameraView",mu,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let hl=mu;class fl extends H{constructor(e,r,i){super();f(this,"_view",this.dv(new hl));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,r){const a=this._view,u=r;a.duration=u.duration??1,a.position=u.position,a.rotation=u.rotation??[0,0,0],a.thumbnail=u.thumbnail??"",a.name=u.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(p.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(p.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(o.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const un=class un extends tt{constructor(e){super(e);f(this,"_currentViewIndex",this.dv(p.react(-1)));f(this,"_viewWrappers",this.dv(new p.ObservableArray));f(this,"_currentViewWrapper",this.dv(p.react(void 0)));f(this,"_container",this.dv(p.react(void 0)));this.initProcessing();{const r=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};r(),this.d(this._viewWrappers.changedEvent.don(r))}{const r=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};r(),this.d(this._viewWrappers.changedEvent.don(r)),this.d(this._currentViewWrapper.changed.don(r))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return jp(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const r=this._viewWrappers;if(e.every((i,s)=>{const o=r.get(s).view;return i.duration===o.duration&&zc(i.position,o.position)&&zc(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let r of e)this._viewWrappers.push(new fl(this,r))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,r=[64,64]){this._viewWrappers.push(new fl(this,void 0,{name:e,size:r}))}update(e,r,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(e);return r&&(s.view.name=r),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new fl(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new fl(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const r=this._viewWrappers.get(e);return this._currentViewWrapper.value=r,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const r=this._viewWrappers.get(e);r.view.resetWithCurrentCamera(),r.view.capture()}resetViewName(e,r){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=r}updateView(e,r){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=r.position,i.view.rotation=r.rotation??[0,0,0],i.view.duration=r.duration??1,i.view.thumbnail=r.thumbnail??"",i.view.name=r.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const r=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(r,this.flyMode??un.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??un.defaults.loop?(this.flyToView((this._viewWrappers.length+r-1)%this._viewWrappers.length),!0):r-1<0?!1:(this.flyToView(r-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===0)return;const i=this._viewWrappers.splice(r-1,1,e)[0];this._viewWrappers.set(r,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(r+1,1,e)[0];this._viewWrappers.set(r,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??un.defaults.loop?(this.flyToView((r+1)%this._viewWrappers.length),!0):r+1>this._viewWrappers.length-1?!1:(this.flyToView(r+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const r=this._getIndex(e);if(r===-1){console.warn("index === -1");return}this.deleteView(r)}transitionImageUrl(e){return tt.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const r=this.intervalTime??un.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+r)*1e3;return e.promise(p.sleep(s)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(p.createProcessingFromAsyncFunc(async i=>this._flyStep(i))),r=()=>{this.playing?e.restart():e.cancel()};r(),this.d(this.playingChanged.don(r))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new mt([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",un.defaults.flyMode),new st([],()=>this.addView(),[],"添加视角"),new st(["number"],r=>this.insertView(r),[0],"插入视角"),new st([],()=>this.clearAllViews(),[],"清空所有视角"),new st([],()=>this.insertView(this.currentViewIndex+1),[],"当前位置插入视角"),new st([],()=>this.flyToPrevView(),[],"上一个视角"),new st([],()=>this.flyToNextView(),[],"下一个视角"),new st([],()=>this.moveToPreView(),[],"当前视角移动到上一个视角"),new st([],()=>this.moveToNextView(),[],"当前视角移动到下一个视角"),new st(["number"],r=>this.flyToView(r),[0],"飞入指定视角"),new st(["number"],r=>this.setCurrentView(r),[0],"设置当前视角"),new st([],()=>this.deleteCurrentView(),[],"删除当前视角"),new st(["number"],r=>this.deleteView(r),[0],"删除指定视角"),new st(["number"],r=>this.resetView(r),[0],"重置视角"),new L([this,"currentViewIndex"],"当前序号",-1,!1,!0),new Cf([this,"playing"],()=>this.stop(),[this,"loop"],"播放",un.defaults),new q([this,"playing"],"是否播放"),new st([],()=>this.stop(),[],"停止"),new q([this,"loop"],"是否循环"),new L([this,"intervalTime"],"间隔时间"),new Q([this,"views"],"视角集合",[],void 0,!0)]}}};f(un,"createDefaultProps",()=>({...tt.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),f(un,"type",un.register("ESCameraViewCollection",un,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let dl=un;const ea=class ea extends et{constructor(e){super(e);f(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"aspectRatio"],"宽高比",1.77778),new L([this,"fov"],"横向夹角",90),new L([this,"far"],"视野长度",100),new L([this,"near"],"近面距离",5)]}}};f(ea,"createDefaultProps",()=>({...et.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),f(ea,"type",ea.register("ESCameraVisibleRange",ea,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let Bc=ea;const ra=class ra extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new mt([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};f(ra,"createDefaultProps",()=>({...et.createDefaultProps(),mode:"policeCar",allowPicking:!0})),f(ra,"type",ra.register("ESCar",ra,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let pl=ra;const Ys=class Ys extends wt{constructor(e){super(e);f(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"height"],"高度",10)],coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};f(Ys,"createDefaultProps",()=>({...wt.createDefaultProps(),height:10,filled:!0,fillStyle:p.reactJson({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),f(Ys,"type",Ys.register("ESClassification",Ys,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),f(Ys,"supportEditingModes",[...wt.supportEditingModes,$.CircularAppend,$.CircularInsert,$.HeightModify]);let gl=Ys;const na=class na extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new q([this,"showArrow"],"显示箭头",!0),new Et([this,"edgeColor"],"线框颜色",[1,1,1,1]),new L([this,"edgetWidth"],"线框宽度",2),new L([this,"width"],"裁剪宽度",200),new L([this,"height"],"裁剪高度",200),new ut([this,"targetID"],"瓦片图层","")]}}};f(na,"createDefaultProps",()=>({...et.createDefaultProps(),showArrow:!0,edgeColor:p.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),f(na,"type",na.register("ESClippingPlane",na,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let jc=na;class W_ extends H{constructor(t,e,r){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container`);{const u=()=>{const c=` ${e.cssText}
|
|
66
66
|
${e.cssAllInitial?"all: initial;":""}
|
|
67
67
|
${e.show?"":"display: none"}
|
|
68
|
-
`;i.style.cssText=c};u();const l=this.dv(
|
|
68
|
+
`;i.style.cssText=c};u();const l=this.dv(p.createNextAnimateFrameEvent(e.cssAllInitialChanged,e.cssTextChanged,e.showChanged));this.d(l.don(u))}t.appendChild(i),this.d(()=>t.removeChild(i));const s=this.dv(p.createNextAnimateFrameEvent(e.instanceClassChanged,e.containerChanged,e.shadowDomChanged)),o=this.dv(new p.ObjResettingWithEvent(s,()=>{const{instanceClass:u,container:l}=e;if(!u||l)return;let c=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),e.shadowDom){const h=i.appendChild(document.createElement("div"));h.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container shadowDiv`),c=h.attachShadow({mode:"open"}).appendChild(document.createElement("div")),c.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container shadowDiv div`)}return new u(c,e,r)})),{_updateEvent:a}=e;this.d(a.don(u=>{if(o.obj)try{u(o.obj,e,r)}catch(l){console.error(`ESCustomDiv update error! ${l}`)}}))}}const eg=`class MyDiv {
|
|
69
69
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
70
70
|
// customDiv指向当前的CustomDiv场景对象
|
|
71
71
|
// viewer指定当前的视口
|
|
@@ -103,11 +103,11 @@ ${u.map(c=>`${c.id} ${c.typeName}
|
|
|
103
103
|
destroy() {
|
|
104
104
|
this._container.removeChild(this._div);
|
|
105
105
|
}
|
|
106
|
-
}`,
|
|
106
|
+
}`,q_=`示例代码:
|
|
107
107
|
\`\`\`
|
|
108
|
-
${
|
|
108
|
+
${eg}
|
|
109
109
|
\`\`\`
|
|
110
|
-
`,
|
|
110
|
+
`,ln=class ln extends tt{constructor(e){super(e);f(this,"_updateEvent",this.dv(new V));f(this,"_instanceClassReact",this.dv(p.react(void 0)));f(this,"_innerHtmlMounted",this.dv(new V));f(this,"_container",this.dv(p.react(void 0)));this.registerAttachedObjectForContainer((i,s)=>new W_(s,this,i));{const i=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};i(),this.d(this.instanceClassStrChanged.don(i))}{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const s=`class MyDiv {
|
|
111
111
|
// subContainer是外部视口的div容器,可以在这里创建自己需要的DOM元素
|
|
112
112
|
// customDiv指向当前的CustomDiv场景对象
|
|
113
113
|
// viewer指定当前的视口
|
|
@@ -128,13 +128,13 @@ ${Jp}
|
|
|
128
128
|
}`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}const r=document.createElement("div");r.setAttribute("xe2-div",`ESCustomDiv(${this.id}) container`);{const i=()=>{const o=` ${this.cssText};
|
|
129
129
|
${this.cssAllInitial?"all: initial;":""}
|
|
130
130
|
${this.show?"":"display: none;"}
|
|
131
|
-
`;r.style.cssText=o};i();const s=this.dv(
|
|
131
|
+
`;r.style.cssText=o};i();const s=this.dv(p.createNextAnimateFrameEvent(this.cssAllInitialChanged,this.cssTextChanged,this.showChanged));this.d(s.don(i))}{const i=()=>{if(this.containerId===void 0||this.containerId==="")this.container=void 0;else{const s=document.getElementById(this.containerId);s instanceof HTMLElement?this.container=s:(this.container=void 0,console.warn(`Div from containerId(${this.containerId}) is not HTMLDivElement!`))}};i(),this.d(this.containerIdChanged.don(i))}{class i extends H{constructor(o){super(),o.appendChild(r),this.d(()=>o.removeChild(r))}}this.dv(new p.ObjResettingWithEvent(this.containerChanged,()=>{if(this.container)return new i(this.container)}))}{const i=this.dv(p.createNextAnimateFrameEvent(this.containerChanged,this.instanceClassChanged,this.shadowDomChanged));this.dv(new p.ObjResettingWithEvent(i,()=>{if(!this.container||!this.instanceClass)return;let s=r;if(r.firstElementChild&&r.removeChild(r.firstElementChild),this.shadowDom){const o=r.appendChild(document.createElement("div"));o.setAttribute("xe2-div","ESCustomDiv container shadowDiv"),s=o.attachShadow({mode:"open"}).appendChild(document.createElement("div")),s.setAttribute("xe2-div","ESCustomDiv container shadowDiv div")}return new this.instanceClass(s,this,void 0)}))}}update(e){this._updateEvent.emit(e)}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}get innerHtmlMounted(){return this._innerHtmlMounted}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}getESProperties(){const e={...super.getESProperties()},r=i=>{i||alert("evalFuncStr为空,无法执行!");try{const s=i&&Function(`"use strict";return (${i})`)();this.update(s)}catch(s){alert(`updateDivFunc error: ${s}`)}};return{...e,more:[...e.more,new it([new q([this,"show"],"显示"),new Ui([this,"instanceClassStr"],"实例类",eg,q_,!0),new Ui([this,"innerHTML"],"innerHTML",ln.defaultInnerHTML,ln.innerHTMLReadMe,!0),new st(["string"],r,["(divClass, dom, viewer) => divClass.update && divClass.update()"],"强制更新"),new q([this,"allowPicking"],"允许拾取",!0),new ut([this,"containerId"],"容器ID",ln.defaults.containerId,!0),new q([this,"shadowDom"],"shadowDom"),new q([this,"cssAllInitial"],"cssAllInitial"),new ut([this,"cssText"],"cssText")],"ESCustomDiv")]}}};f(ln,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,instanceClassStr:void 0,innerHTML:void 0,allowPicking:void 0,containerId:"",shadowDom:!1,cssAllInitial:!1,cssText:""})),f(ln,"type",ln.register("ESCustomDiv",ln,{chsName:"ESCustomDiv",tags:["ESObjects"],description:"自定义div"})),f(ln,"defaultInnerHTML",` <!-- z-index样式需要设置,否则可能导致看不到!-->
|
|
132
132
|
<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>
|
|
133
|
-
`),f(
|
|
133
|
+
`),f(ln,"innerHTMLReadMe",` 示例代码:
|
|
134
134
|
\`\`\`
|
|
135
|
-
${
|
|
135
|
+
${ln.defaultInnerHTML}
|
|
136
136
|
\`\`\`
|
|
137
|
-
`);let
|
|
137
|
+
`);let ml=ln;const Js=class Js extends et{constructor(e){super(e);f(this,"_maxTime",this.dv(p.react(23)))}get maxTime(){return this._maxTime.value}get maxTimeChanged(){return this._maxTime.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Q([this,"url"]),new L([this,"maxTime"],"maxTime",23,!0,!0),new L([this,"currentTime"]),new L([this,"minPropValue"]),new L([this,"maxPropValue"]),new Q([this,"colorStops"],"colorStops",Js.defaults.colorStops,void 0,!0)]}}};f(Js,"createDefaultProps",()=>({...et.createDefaultProps(),url:"http://114.242.26.126:6003/ESDataMesh/water-assets2/",currentTime:0,minPropValue:0,maxPropValue:1,colorStops:p.reactJsonWithUndefined([{ratio:0,rgba:[0,0,1,1]},{ratio:.2,rgba:[0,1,0,1]},{ratio:.8,rgba:[1,1,0,1]},{ratio:1,rgba:[1,0,0,1]}])})),f(Js,"type",Js.register("ESDataMesh",Js,{chsName:"数值面着色",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"数值面着色"}));let Zc=Js;const Bs=class Bs extends wt{constructor(e){super(e);f(this,"_distance",this.dv(p.react(0)));f(this,"editingBindMode","lineString");const r=()=>{this._distance.value=this.getDistance()??0};r(),this.d(this.pointsChanged.don(r))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new L([this,"distance"],"长度",0,!1,!0)]}}};f(Bs,"createDefaultProps",()=>({...wt.createDefaultProps(),stroked:!0,strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(Bs,"type",Bs.register("ESGeoLineString",Bs,{chsName:"地理折线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理折线"})),f(Bs,"supportEditingModes",[...wt.supportEditingModes,$.LineStringAppend,$.LineStringInsert]);let Mi=Bs;const ia=class ia extends Mi{constructor(t){super(t)}};f(ia,"createDefaultProps",()=>({...Mi.createDefaultProps(),strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(ia,"type",ia.register("ESDistanceMeasurement",ia,{chsName:"距离测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"距离测量"}));let Kc=ia;const ls=class ls extends Vt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new mt([this,"mode"],ls.modes,"模式","in"),new ut([this,"targetID"],"瓦片图层","")]}}};f(ls,"createDefaultProps",()=>({...Vt.createDefaultProps(),mode:"in",targetID:"",filled:!1})),f(ls,"type",ls.register("ESExcavate",ls,{chsName:"挖坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"挖坑"})),f(ls,"modes",[["向内","in"],["向外","out"]]);let uu=ls;const sa=class sa extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new Ta([this,"image"],"图片"),new Ge([this,"translation"],"偏移")]}}};f(sa,"createDefaultProps",()=>({...et.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:p.reactArray([0,0,0])})),f(sa,"type",sa.register("ESFireParticleSystem",sa,{chsName:"粒子烟火",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子烟火"}));let Qc=sa;const X_=`
|
|
138
138
|
## 参数类型为 ESTreeType
|
|
139
139
|
\`\`\`js
|
|
140
140
|
type ESJVector2D = [number, number]
|
|
@@ -144,7 +144,7 @@ ${Jp}
|
|
|
144
144
|
space: number
|
|
145
145
|
}
|
|
146
146
|
\`\`\`
|
|
147
|
-
`,
|
|
147
|
+
`,js=class js extends Ft{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new Q([this,"url"],"路径",!0),new Q([this,"treeTypes"],"treeTypes",[],void 0,!0),new Q([this,"xiaoBanWidget"],"xiaoBanWidget",js.defaults.xiaoBanWidget,X_,!0),new ut([this,"youShiSZ"]),new ut([this,"diLei"]),new ut([this,"senLinLB"]),new ut([this,"labelMaterial"]),new L([this,"heightOffset"])]}}};f(js,"createDefaultProps",()=>({...Ft.createDefaultProps(),url:"",treeTypes:p.reactJsonWithUndefined([]),xiaoBanWidget:p.reactJsonWithUndefined({class:"WidgetBlueprint'/ESFoliage/ESDefaultXiaoBan.ESDefaultXiaoBan",pivot:[.5,1],space:1}),youShiSZ:"StringTable'/ESFoliage/You_Shi_SZ.You_Shi_SZ'",diLei:"StringTable'/ESFoliage/Di_Lei.Di_Lei'",senLinLB:"StringTable'/ESFoliage/Sen_Lin_LB.Sen_Lin_LB'",labelMaterial:"Material'/ESFoliage/ES3DWidgetMaterial.ES3DWidgetMaterial'",heightOffset:40})),f(js,"type",js.register("ESForestTileset",js,{chsName:"森林切片图层",tags:["ESObjects","_ES_Impl_UE"],description:"ESForestTileset"}));let $c=js;const rg=`class MyDiv {
|
|
148
148
|
// container是Poi的div
|
|
149
149
|
// geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
|
|
150
150
|
// viewer指定当前的视口
|
|
@@ -175,16 +175,16 @@ ${Jp}
|
|
|
175
175
|
destroy() {
|
|
176
176
|
this._container.removeChild(this._div);
|
|
177
177
|
}
|
|
178
|
-
}`,
|
|
178
|
+
}`,H_=`示例代码:
|
|
179
179
|
\`\`\`
|
|
180
|
-
${
|
|
180
|
+
${rg}
|
|
181
181
|
\`\`\`
|
|
182
|
-
`,
|
|
183
|
-
`,
|
|
182
|
+
`,ng=`<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>
|
|
183
|
+
`,Y_=`示例代码:
|
|
184
184
|
\`\`\`
|
|
185
|
-
${
|
|
185
|
+
${ng}
|
|
186
186
|
\`\`\`
|
|
187
|
-
`,
|
|
187
|
+
`,Fn=class Fn extends et{constructor(e){super(e);f(this,"_widgetEvent",this.dv(new V));f(this,"_echartsFunReact",this.dv(p.react(void 0)));f(this,"_instanceClassReact",this.dv(p.react(void 0)));const r=()=>{try{this.instanceClass=this.instanceClassStr&&Function(`"use strict";return (${this.instanceClassStr})`)()}catch{this.instanceClass=void 0}};r(),this.d(this.instanceClassStrChanged.don(r));{const i=()=>{if(this.innerHTML===void 0){this.instanceClassStr=void 0;return}const s=`class MyDiv {
|
|
188
188
|
// container是Poi的div
|
|
189
189
|
// geoCustomDivPoi指向当前的GeoCustomDivPoi场景对象
|
|
190
190
|
// viewer指定当前的视口
|
|
@@ -200,7 +200,7 @@ ${jp}
|
|
|
200
200
|
destroy() {
|
|
201
201
|
this._container.removeChild(this._div);
|
|
202
202
|
}
|
|
203
|
-
}`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(e){this._echartsFunReact.value=e}get echartsFunChanged(){return this._echartsFunReact.changed}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"opacity"],"透明度",
|
|
203
|
+
}`;this.instanceClassStr=s};i(),this.d(this.innerHTMLChanged.don(i))}}get widgetEvent(){return this._widgetEvent}get echartsFun(){return this._echartsFunReact.value}set echartsFun(e){this._echartsFunReact.value=e}get echartsFunChanged(){return this._echartsFunReact.changed}get instanceClass(){return this._instanceClassReact.value}set instanceClass(e){this._instanceClassReact.value=e}get instanceClassChanged(){return this._instanceClassReact.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new L([this,"opacity"],"透明度",Fn.defaults.opacity,!0),new L([this,"zOrder"],"zOrder",Fn.defaults.zOrder,!0),new ve([this,"anchor"],"偏移比例",Fn.defaults.anchor,!0),new Ui([this,"innerHTML"],"innerHTML",Fn.defaults.innerHTML,Y_,!0),new Ui([this,"instanceClassStr"],"实例类",Fn.defaults.instanceClassStr,H_,!0),new q([this,"renderInUE"],"是否在UE中渲染",!0,!1)]}}};f(Fn,"createDefaultProps",()=>({...et.createDefaultProps(),opacity:1,anchor:p.reactArray([.5,1]),instanceClassStr:rg,innerHTML:ng,zOrder:0,renderInUE:!1})),f(Fn,"type",Fn.register("ESGeoDiv",Fn,{chsName:"ESGeoDiv",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESGeoDiv"}));let th=Fn;const Zs=class Zs extends wt{constructor(e){super(e);f(this,"editingBindMode","doublePoints")}toPolygon(){if(this.points&&this.points.length>=2){const e=[...this.points][0],r=[...this.points][1];return[e,[e[0],r[1],e[2]],r,[r[0],e[1],r[2]]]}else return}_updateArea(){if(this.points&&this.points.length>=2){const e=[...this.points],r=e[0],i=e[1],s=[r,[r[0],i[1],r[2]],i,[i[0],r[1],i[2]]];this._area.value=Jl(s)}else this._area.value=0}_updatePerimeter(){if(this.points&&this.points.length>=2){const e=[...this.points],r=e[0],i=e[1],s=[r,[r[0],i[1],r[2]],i,[i[0],r[1],i[2]]],o=[...s,s[0]],a=ou(o,"GEODESIC"),u=a[a.length-1];this._perimeter.value=u}else this._perimeter.value=0}getESProperties(){const e=super.getESProperties();return{...e,coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};f(Zs,"createDefaultProps",()=>({...wt.createDefaultProps(),collision:!1,stroked:!0,filled:!0,fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),f(Zs,"type",Zs.register("ESGeoRectangle",Zs,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),f(Zs,"supportEditingModes",[...wt.supportEditingModes,$.DoublePointsAppend,$.DoublePointsModify]);let eh=Zs;const rh={translationX:0,translationY:0,translationZ:0,rotationHeading:0,rotationPitch:0,rotationRoll:0,scaleX:1,scaleY:1,scaleZ:1},cs=class cs extends et{constructor(e){super(e);f(this,"_nodeTransformations",this.dv(p.react(void 0)));f(this,"_czmModelReadyEvent",this.dv(new V));f(this,"_setNodePositionEvent",this.dv(new V));f(this,"_setNodeRotationEvent",this.dv(new V));f(this,"_setNodeScaleEvent",this.dv(new V));f(this,"_printDebugInfoEvent",this.dv(new V));f(this,"setMaterialInfoEvent",this.ad(new V));f(this,"_setMaterialEvent",this.disposeVar(new V))}get nodeTransformations(){return this._nodeTransformations.value}set nodeTransformations(e){this._nodeTransformations.value=e}get nodeTransformationsChanged(){return this._nodeTransformations.changed}get czmModelReadyEvent(){return this._czmModelReadyEvent}deleteNodeTransformation(e){if(!this.nodeTransformations||!this.nodeTransformations[e])return;const r={...this.nodeTransformations};delete r[e],this.nodeTransformations=r}get setNodePositionEvent(){return this._setNodePositionEvent}setNodePosition(e,r){this._setNodePositionEvent.emit(e,r),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...rh};if(r.some(s=>!Number.isFinite(s))){console.error(`setNodePosition error: ${e} ${r}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,translationX:r[0],translationY:r[1],translationZ:r[2]}}}get setNodeRotationEvent(){return this._setNodeRotationEvent}setNodeRotation(e,r){this._setNodeRotationEvent.emit(e,r),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...rh};if(r.some(s=>!Number.isFinite(s))){console.error(`setNodeRotation error: ${e} ${r}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,rotationHeading:r[0],rotationPitch:r[1],rotationRoll:r[2]}}}get setNodeScaleEvent(){return this._setNodeScaleEvent}setNodeScale(e,r){this._setNodeScaleEvent.emit(e,r),this._nodeTransformations.value||(this._nodeTransformations.value={});const i=this._nodeTransformations.value[e]??{...rh};if(r.some(s=>!Number.isFinite(s)||s<0)){console.error(`setNodeScale error: !Number.isFinite(e) || e < 0 ${e} ${r}`);return}this._nodeTransformations.value={...this.nodeTransformations,[e]:{...i,scaleX:r[0],scaleY:r[1],scaleZ:r[2]}}}getNodePosition(e){if(!this.nodeTransformations)return;const r=this.nodeTransformations[e];if(r)return[r.translationX,r.translationY,r.translationZ]}getNodeRotation(e){if(!this.nodeTransformations)return;const r=this.nodeTransformations[e];if(r)return[r.rotationHeading,r.rotationPitch,r.rotationRoll]}getNodeScale(e){if(!this.nodeTransformations)return;const r=this.nodeTransformations[e];if(r)return[r.scaleX,r.scaleY,r.scaleZ]}get printDebugInfoEvent(){return this._printDebugInfoEvent}printDebugInfo(){this._printDebugInfoEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(r=>{const i=new H;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),r(s)})),this._setMaterialEvent.emit(e)})}setLight122(){this.czmEnvironmentMapManager={...Gc}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",dataSource:[...e.dataSource,new Q([this,"url"],"模型路径",cs.defaults.url,void 0,!0),new Q([this,"instances"],"实例化矩阵",cs.defaults.instances,void 0,!0)],more:[...e.more,new ve([this,"czmImageBasedLightingFactor"]),new L([this,"czmAtmosphereScatteringIntensity"]),new Q([this,"czmEnvironmentMapManager"]),new st([],()=>this.printDebugInfo(),[],"控制台输出模型信息"),new L([this,"czmMaximumScale"],"最大缩放比例",void 0,!0),new L([this,"czmNativeScale"],"统一缩放值"),new L([this,"czmMinimumPixelSize"],"最小像素尺寸"),new Et([this,"czmColor"],"颜色")]}}};f(cs,"createDefaultProps",()=>({...et.createDefaultProps(),url:"${earthsdk3-assets-script-dir}/assets/glb/building.glb",czmMaximumScale:void 0,czmMinimumPixelSize:0,czmNativeScale:1,czmColor:p.reactArray([1,1,1,1]),allowPicking:!0,instances:p.reactArrayWithUndefined([]),czmImageBasedLightingFactor:p.reactArray([1,1]),czmAtmosphereScatteringIntensity:2,czmEnvironmentMapManager:p.reactJsonWithUndefined(void 0)})),f(cs,"type",cs.register("ESGltfModel",cs,{chsName:"模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"gltf模型"}));let os=cs;const cn=class cn extends et{constructor(e){super(e);f(this,"_aiMoveToEvent",this.dv(new V));f(this,"_stopAIMoveEvent",this.dv(new V))}get aiMoveToEvent(){return this._aiMoveToEvent}aiMoveTo(e,r){this._aiMoveToEvent.emit(e,r)}get stopAIMoveEvent(){return this._stopAIMoveEvent}stopAIMove(){this._stopAIMoveEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"mode"],cn.modes,"模式",cn.defaults.mode,!0),new mt([this,"animation"],cn.animations,"动画",cn.defaults.animation,!0)],more:[...e.more,new st(["numbers","number"],(r,i)=>this.aiMoveTo(r,i),[[0,0,0],0],"自动寻路"),new st([],()=>this.stopAIMove(),[],"停止自动寻路")]}}};f(cn,"createDefaultProps",()=>({...et.createDefaultProps(),mode:"worker",animation:"standing",allowPicking:!0})),f(cn,"type",cn.register("ESHuman",cn,{chsName:"人员",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"工人 警察 路人"})),f(cn,"modes",[["工人","worker"],["警察","police"],["路人","pedestrian"],["陌生人","stranger"],["男士","suitMan"],["女士","suitWoman"]]),f(cn,"animations",[["站立","standing"],["行走","walking"],["奔跑","running"]]);let Gs=cn;const Ks=class Ks extends Vr{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Q([this,"url"],"图片路径",Ks.defaults.url),new q([this,"isHoverZoom"],"悬浮放大")]}}};f(Ks,"createDefaultProps",()=>({...Vr.createDefaultProps(),url:"inner://CameraBlue.png",isHoverZoom:!1,renderMode:4})),f(Ks,"type",Ks.register("ESImageLabel",Ks,{chsName:"图片标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"基础图片标签。"}));let vl=Ks;const ai=class ai extends Ft{constructor(t){super(t),this.ad(p.bind([this,"czmSplitDirection"],[this,"splitDirection"])),this.ad(p.bind([this,"czmAlpha"],[this,"opacity"]))}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new L([this,"zIndex"],"层级序号",ai.defaults.zIndex)],dataSource:[...t.dataSource,new Q([this,"url"],"影像服务地址"),new pn([this,"rectangle"],"矩形范围",ai.defaults.rectangle,!0),new Se([this,"maximumLevel"],1,[1,24],"最大级别",ai.defaults.maximumLevel,!0),new Q([this,"options"],"options",ai.defaults.options,void 0,!0),new ut([this,"targetID"],"targetID"),new Se([this,"opacity"],.01,[0,1],"opacity",1)],more:[...t.more,new it([],"通用"),new L([this,"height"],"高度"),new ut([this,"actorTag"]),new ut([this,"componentTag"]),new L([this,"minimumLevel"]),new it([],"图像"),new L([this,"czmAlpha"],"透明度"),new L([this,"czmBrightness"],"亮度"),new L([this,"czmContrast"],"对比度"),new L([this,"czmHue"],"色相"),new L([this,"czmSaturation"],"饱和度"),new L([this,"czmGamma"],"伽马值")]}}};f(ai,"createDefaultProps",()=>({...Ft.createDefaultProps(),url:"",rectangle:p.reactJsonWithUndefined([-180,-90,180,90]),options:p.reactJsonWithUndefined(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,opacity:1,splitDirection:"NONE"})),f(ai,"type",ai.register("ESImageryLayer",ai,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"影像图层"}));let nh=ai;const J_=`
|
|
204
204
|
# 声明文件
|
|
205
205
|
### options 类型
|
|
206
206
|
\`\`\`javascript
|
|
@@ -306,14 +306,14 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
306
306
|
};
|
|
307
307
|
|
|
308
308
|
\`\`\`
|
|
309
|
-
`,Fn=class Fn extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"size"],"尺寸",Fn.defaults.size),new q([this,"autoFollow"],"自动跟随",Fn.defaults.autoFollow),new mt([this,"mode"],Fn.modes,"模式","blueSky")],more:[...t.more,new L([this,"autoOpacityFactor"],"自动消失系数",Fn.defaults.autoOpacityFactor)]}}};f(Fn,"createDefaultProps",()=>({...et.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),f(Fn,"type",Fn.register("ESLocalSkyBox",Fn,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),f(Fn,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let jc=Fn;const cu=class cu extends et{constructor(e){super(e);f(this,"_location",this.disposeVar(d.react(void 0)));{const r=()=>{this.location=this.position};r(),this.ad(this.positionChanged.don(r))}}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}};f(cu,"type",cu.register("ESLocationMeasurement",cu,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"位置测量点"}));let Zc=cu;const ze=class ze extends et{constructor(e){super(e);f(this,"_player",this.dv(new pn));{const r=ze.defaults;this.d(d.bind([this._player,"loop"],[this,"playingLoop"],i=>i??r.playingLoop,i=>i??r.playingLoop)),this.d(d.bind([this._player,"currentTime"],[this,"currentTime"],i=>i??r.currentTime,i=>i??r.currentTime)),this.d(d.bind([this._player,"duration"],[this,"duration"],i=>i??r.duration,i=>i??r.duration)),this.d(d.bind([this._player,"playing"],[this,"playing"],i=>i??r.playing,i=>i??r.playing)),this.d(d.bind([this._player,"speed"],[this,"playingSpeed"],i=>i??r.playingSpeed,i=>i??r.playingSpeed))}}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"通用","通用"),new st(["number"],r=>this.flyTo(r),[1e3],"飞入"),new Vi([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new L([this,"emissionRate"],"发射率",5,!0),new q([this,"loop"],"是否循环",!0,!0),new L([this,"particleScale"],"等级",1,!0),new L([this,"startScale"],"初始等级",void 0,!0),new L([this,"endScale"],"结束等级",ze.defaults.endScale,!0),new Et([this,"color"],"颜色",void 0,!0),new Et([this,"startColor"],"初始颜色",void 0,!0),new Et([this,"endColor"],"结束颜色",void 0,!0),new q([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new L([this,"speed"],"速度",1,!0),new L([this,"minimumSpeed"],"最小速度",void 0,!0),new L([this,"maximumSpeed"],"最大速度",void 0,!0),new L([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new L([this,"particleLife"],"粒子生命周期",ze.defaults.particleLife,!0),new L([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new L([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new L([this,"mass"],"块数量",1,!0),new L([this,"minimumMass"],"最小块数量",void 0,!0),new L([this,"maximumMass"],"最大块数量",void 0,!0),new ve([this,"imageSize"],"图片尺寸",ze.defaults.imageSize,!0),new ve([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new ve([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new wa([this,"image"],"图片",ze.defaults.image,!0),new Ue([this,"translation"],"偏移",[0,0,0],!0),new Il([this,"bursts"],"bursts",void 0,!0),new Q([this,"emitter"],"emitter",ze.defaults.emitter),new it([],"播放器","播放器"),new L([this,"ratio"],"播放比率",0,!0),new pu([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new q([this,"playingLoop"],"是否循环",ze.defaults.playingLoop,!0),new L([this,"currentTime"],"当前时间",ze.defaults.currentTime,!0),new L([this,"duration"],"过渡时间",ze.defaults.duration,!0),new q([this,"playing"],"是否播放",ze.defaults.playing,!0),new L([this,"playingSpeed"],"播放速度",ze.defaults.playingSpeed,!0)]}}};f(ze,"createDefaultProps",()=>({...et.createDefaultProps(),emitter:d.reactJsonWithUndefined({type:"CircleEmitter",radius:.5}),bursts:d.reactArrayCollectionWithUndefined(void 0),translation:d.reactArrayWithUndefined(void 0),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",imageSize:d.reactArrayWithUndefined([20,20]),minimumImageSize:d.reactArrayWithUndefined(void 0),maximumImageSize:d.reactArrayWithUndefined(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:d.reactArrayWithUndefined(void 0),startColor:d.reactArrayWithUndefined(void 0),endColor:d.reactArrayWithUndefined(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:.5,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:!0,currentTime:0,duration:6e3,playingSpeed:1,playing:!0})),f(ze,"type",ze.register("ESParticleSystemPrimitive",ze,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"}));let Kc=ze;const kn=class kn extends kr{constructor(e){super(e);f(this,"initialStyle",this.ad(d.reactJsonWithUndefined(void 0)));f(this,"_getInitialStyleEvent",this.disposeVar(new V))}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const r=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{r(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"mode"],kn.modes,"模式",kn.defaults.mode),new Q([this,"style"],"样式",kn.defaults.style),new q([this,"autoAnchor"],"自动锚点对齐",kn.defaults.autoAnchor)]}}};f(kn,"createDefaultProps",()=>({...kr.createDefaultProps(),mode:"SquareH01",style:d.reactJson({fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"}),autoAnchor:!0})),f(kn,"type",kn.register("ESPoi2D",kn,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),f(kn,"modes",[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]]);let eu=kn;const ai=class ai extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new mt([this,"mode"],ai.modes,"模式",ai.defaults.mode),new Q([this,"style"],"样式",ai.defaults.style)]}}};f(ai,"createDefaultProps",()=>({...et.createDefaultProps(),mode:"triangle",style:d.reactJson({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),f(ai,"type",ai.register("ESPoi3D",ai,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),f(ai,"modes",[["三角形","triangle"],["菱形","diamond"],["制(存)梁场","BridgePrefabricationSite"],["汽车运输便道","ExportRoad"],["拌合站","MixingStation"],["小型预制构件厂","PrefabricatedComponentsSite"],["项目部","ProjectDepartment"],["铁路岔线","RailwayFork"],["钢筋加工厂","RebarMachining"],["临时电力干线","TempElectricMain"],["铺轨基地","TrackLayingBase"],["汽车运梁通道","TransportationBridge"]]);let Qc=ai;const Qo=class Qo extends zt{constructor(e){super(e);f(this,"_czmFlattenedPlaneId",this.dv(d.react("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ut([this,"targetID"],"瓦片图层","")]}}};f(Qo,"createDefaultProps",()=>({...zt.createDefaultProps(),targetID:"",filled:!1})),f(Qo,"type",Qo.register("ESPolygonFlattenedPlane",Qo,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"}));let $c=Qo;const Zp=async(n,t,e)=>{const{viewer:r}=n;if(!r){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await r.callUeFunc({f:"AddTrees",p:{id:t,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},Kp=async(n,t)=>{const{viewer:e}=n;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const r=await e.callUeFunc({f:"RemoveAllTrees",p:{id:t}});return r.error&&console.error("RemoveAllTrees:",r.error),r},Qp=async(n,t,e)=>{const{viewer:r}=n;if(!r){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await r.callUeFunc({f:"UpdateTreeParams",p:{id:t,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},$p=async(n,t,e,r)=>{const{viewer:i}=n;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const s=await i.callUeFunc({f:"CutDownTrees",p:{id:t,TreeIds:e,TimeLength:r}});return s.error&&console.error("CutDownTrees:",s.error),s},tg=async(n,t,e,r,i)=>{const{viewer:s}=n;if(!s){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await s.callUeFunc({f:"GrowthSimulation",p:{id:t,ToParams:e,SwitchTime:i,TimeLength:r}});return o.error&&console.error("GrowthSimulation:",o.error),o},$o=class $o extends kt{constructor(e){super(e);f(this,"_addTreesEvent",this.dv(new V));f(this,"_removeAllTreesEvent",this.dv(new V));f(this,"_updateTreeParamsEvent",this.dv(new V));f(this,"_cutDownTreesEvent",this.dv(new V));f(this,"_growthSimulationEvent",this.dv(new V))}async addTreesCallFunc(e,r){return await Zp(e,this.id,r)}async updateTreeParamsCallFunc(e,r){return await Qp(e,this.id,r)}async cutDownTreesCallFunc(e,r,i){return await $p(e,this.id,r,i)}async removeAllTreesCallFunc(e){return await Kp(e,this.id)}async growthSimulationCallFunc(e,r,i,s){return await tg(e,this.id,r,i,s)}async getIdByComponentNameAndHitItem(e,r,i){return await e.getIdByComponentNameAndHitItem(this.id,r,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(e){this._addTreesEvent.emit(e)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(e){this._updateTreeParamsEvent.emit(e)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(e,r){this._cutDownTreesEvent.emit(e,r)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,r,i){this._growthSimulationEvent.emit(e,r,i)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"通用"),new Q([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new L([this,"stumpId"],"树桩id"),new L([this,"intervalTime"],"动画间隔时间"),new L([this,"switchIntervalTime"],"切换间隔时间")]}}};f($o,"createDefaultProps",()=>({...kt.createDefaultProps(),treeTypes:d.reactJsonWithUndefined([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),f($o,"type",$o.register("ESSeparateFoliage",$o,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"}));let th=$o;function ll(n,t,e){const r="buffer"in n,i=r?n.buffer:n;r&&(t+=n.byteOffset);const s=new Array(e),o=new DataView(i);for(let a=0;a<e;++a){const u=o.getUint8(t+a);s[a]=String.fromCharCode(u)}return s.join("")}function cl(n,t){const e="buffer"in n,r=e?n.buffer:n;return e&&(t+=n.byteOffset),new DataView(r).getUint32(t,!0)}function eg(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,t,e)}function M_(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,t,e)}function L_(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,t,e)}function A_(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,t,e)}function rg(n){if(ll(n,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=cl(n,4);if(e!==2){console.error("Unsupported glTF version");return}const r=cl(n,8);if(r!==n.byteLength){console.error("Invalid glTF length");return}const i=cl(n,12);if(i+12+4>r){console.error("Invalid glTF chunk length");return}if(ll(n,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=ll(n,20,i),a={version:e,length:r,gltfJson:o};if(20+i<n.byteLength){const u=cl(n,20+i);if(ll(n,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const c=eg(n,20+i+8,u);a.gltfBinary=c}return a}window.parseGlb=rg;function ng(n){const t=rg(n);if(t===void 0||!t.gltfBinary)return;const e=JSON.parse(t.gltfJson);return e.nodes.map(r=>{var i=e.meshes[r.mesh],s=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,a=e.accessors[s],u=e.bufferViews[a.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const l=A_(t.gltfBinary,u.byteOffset??0,u.byteLength/4);var c=e.accessors[o],h=e.bufferViews[c.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let p;return c.componentType===5121?p=eg(t.gltfBinary,h.byteOffset??0,h.byteLength/1):c.componentType===5123?p=M_(t.gltfBinary,h.byteOffset??0,h.byteLength/2):c.componentType===5125&&(p=L_(t.gltfBinary,h.byteOffset??0,h.byteLength/4)),{name:r.name,posBuffer:l,indicesBuffer:p}})}window.parseWaterGlb=ng;const je=class je extends et{constructor(e){super(e);f(this,"_submergingData");f(this,"_allMoments",[]);f(this,"readyEvent",this.dv(new V));{const r=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=ng(s);const o=this._submergingData.map(a=>Date.parse(a.name)).sort();this._allMoments=o,this.currentTime==0&&(this.currentTime=o[0]),this.readyEvent.emit()})}).catch(i=>{console.log(i)})};r(),this.d(this.urlChanged.don(()=>{r()}))}}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ut([this,"url"],"Url地址",je.defaults.url),new Se([this,"amplitude"],.01,[0,1],"振幅",je.defaults.amplitude),new L([this,"frequency"],"频率",je.defaults.frequency),new L([this,"currentTime"],"当前时间",je.defaults.currentTime),new Q([this,"materialParams"],"材质参数",je.defaults.materialParams),new mt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new Et([this,"waterColor"],"水的底色",je.defaults.waterColor),new Se([this,"waveVelocity"],.01,[0,1],"波动频率",je.defaults.waveVelocity),new L([this,"flowSpeed"],"水流速度",je.defaults.flowSpeed),new Se([this,"specularIntensity"],.01,[0,1],"镜面反射强度",je.defaults.specularIntensity),new Se([this,"murkiness"],.01,[0,10],"水体浑浊度",je.defaults.murkiness)]}}};f(je,"createDefaultProps",()=>({...et.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:d.reactJson({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),f(je,"type",je.register("ESSubmergingAnalysis",je,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"}));let eh=je;const Bs=class Bs extends zt{constructor(e){super(e);f(this,"_startEvent",this.dv(new V));f(this,"_stopEvent",this.dv(new V))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Et([this,"startColor"],"起始颜色"),new Et([this,"endColor"],"结束颜色"),new L([this,"progress"],"计算进度"),new L([this,"extrudedHeight"],"高度m"),new L([this,"height"],"底面高度"),new L([this,"sampleDistance"],"采样间距m"),new L([this,"startTime"],"起始时间,时间戳"),new L([this,"endTime"],"结束时间,时间戳"),new L([this,"spanTime"],"时间跨度,默认1小时时间戳"),new st([],()=>this.start(),[],"开始分析"),new st([],()=>this.stop(),[],"结束分析")]}}};f(Bs,"createDefaultProps",()=>({...zt.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:d.reactArray([1,1,0,1]),endColor:d.reactArray([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),f(Bs,"type",Bs.register("ESSunshineAnalysis",Bs,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),f(Bs,"supportEditingModes",[...zt.supportEditingModes,$.HeightModify]);let rh=Bs;const cn=class cn extends kt{constructor(e){super(e);f(this,"_activateEvent",this.disposeVar(new V));f(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new L([this,"zIndex"],"层级序号",cn.defaults.zIndex),new mt([this,"renderMode"],cn.renderModes,"渲染模式","default"),new L([this,"opacity"],"透明度",cn.defaults.opacity)],dataSource:[...e.dataSource,new Q([this,"url"],"地形服务地址",cn.defaults.url),new dn([this,"rectangle"],"矩形范围",cn.defaults.rectangle)],more:[...e.more,new L([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new L([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};f(cn,"createDefaultProps",()=>({...kt.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:d.reactArray([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0,renderMode:"default",opacity:1})),f(cn,"type",cn.register("ESTerrainLayer",cn,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"})),f(cn,"renderModes",[["使用深度检测","default"],["不使用深度检测","disableDepthTest"],["透明","transparent"]]);let nh=cn;const ui=class ui extends kr{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"color"],"文本颜色",[1,1,1,1]),new L([this,"fontSize"],"文字大小",14),new Pl([this,"text"],"内容",ui.defaults.text,void 0,!0),new Et([this,"backgroundColor"],"背景颜色",ui.defaults.backgroundColor),new dn([this,"padding"],"内边距",ui.defaults.padding),new Et([this,"borderColor"],"边界颜色"),new dn([this,"borderRadius"],"边界圆角"),new L([this,"borderWidth"],"边界宽度")],more:[...t.more,new it([],"czm","czm"),new q([this,"textEditingInteraction"],"文本编辑交互"),new q([this,"textEditing"],"文本编辑"),new L([this,"width"],"宽度",ui.defaults.width,!0),new L([this,"opacity"],"透明度"),new mt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new mt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};f(ui,"createDefaultProps",()=>({...kr.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:d.reactArray([1,1,1,1]),backgroundColor:d.reactArray([0,0,0,.8]),padding:d.reactArray([5,5,5,5]),borderRadius:d.reactArray([6,6,6,6]),borderWidth:0,borderColor:d.reactArray([1,1,1,1]),borderStyle:"solid"})),f(ui,"type",ui.register("ESTextLabel",ui,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"}));let ih=ui;const R_=`
|
|
309
|
+
`,kn=class kn extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"size"],"尺寸",kn.defaults.size),new q([this,"autoFollow"],"自动跟随",kn.defaults.autoFollow),new mt([this,"mode"],kn.modes,"模式","blueSky")],more:[...t.more,new L([this,"autoOpacityFactor"],"自动消失系数",kn.defaults.autoOpacityFactor)]}}};f(kn,"createDefaultProps",()=>({...et.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky",collision:!1,allowPicking:!1})),f(kn,"type",kn.register("ESLocalSkyBox",kn,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),f(kn,"modes",[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]);let ih=kn;const vu=class vu extends et{constructor(e){super(e);f(this,"_location",this.disposeVar(p.react(void 0)));{const r=()=>{this.location=this.position};r(),this.ad(this.positionChanged.don(r))}}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}};f(vu,"type",vu.register("ESLocationMeasurement",vu,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"位置测量点"}));let sh=vu;const Ue=class Ue extends et{constructor(e){super(e);f(this,"_player",this.dv(new gn));{const r=Ue.defaults;this.d(p.bind([this._player,"loop"],[this,"playingLoop"],i=>i??r.playingLoop,i=>i??r.playingLoop)),this.d(p.bind([this._player,"currentTime"],[this,"currentTime"],i=>i??r.currentTime,i=>i??r.currentTime)),this.d(p.bind([this._player,"duration"],[this,"duration"],i=>i??r.duration,i=>i??r.duration)),this.d(p.bind([this._player,"playing"],[this,"playing"],i=>i??r.playing,i=>i??r.playing)),this.d(p.bind([this._player,"speed"],[this,"playingSpeed"],i=>i??r.playingSpeed,i=>i??r.playingSpeed))}}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"通用","通用"),new st(["number"],r=>this.flyTo(r),[1e3],"飞入"),new Ui([this,"updateCallback"],"更新回调函数",void 0,void 0,!0),new L([this,"emissionRate"],"发射率",5,!0),new q([this,"loop"],"是否循环",!0,!0),new L([this,"particleScale"],"等级",1,!0),new L([this,"startScale"],"初始等级",void 0,!0),new L([this,"endScale"],"结束等级",Ue.defaults.endScale,!0),new Et([this,"color"],"颜色",void 0,!0),new Et([this,"startColor"],"初始颜色",void 0,!0),new Et([this,"endColor"],"结束颜色",void 0,!0),new q([this,"sizeInMeters"],"尺寸单位为米",void 0,!0),new L([this,"speed"],"速度",1,!0),new L([this,"minimumSpeed"],"最小速度",void 0,!0),new L([this,"maximumSpeed"],"最大速度",void 0,!0),new L([this,"lifetime"],"生命周期",Number.MAX_VALUE,!0),new L([this,"particleLife"],"粒子生命周期",Ue.defaults.particleLife,!0),new L([this,"minimumParticleLife"],"最小粒子生命周期",void 0,!0),new L([this,"maximumParticleLife"],"最大粒子生命周期",void 0,!0),new L([this,"mass"],"块数量",1,!0),new L([this,"minimumMass"],"最小块数量",void 0,!0),new L([this,"maximumMass"],"最大块数量",void 0,!0),new ve([this,"imageSize"],"图片尺寸",Ue.defaults.imageSize,!0),new ve([this,"minimumImageSize"],"最小图片尺寸",void 0,!0),new ve([this,"maximumImageSize"],"最大图片尺寸",void 0,!0),new Ta([this,"image"],"图片",Ue.defaults.image,!0),new Ge([this,"translation"],"偏移",[0,0,0],!0),new Fl([this,"bursts"],"bursts",void 0,!0),new Q([this,"emitter"],"emitter",Ue.defaults.emitter),new it([],"播放器","播放器"),new L([this,"ratio"],"播放比率",0,!0),new Eu([this,"playing"],[this,"ratio"],[this,"playingLoop"],"播放器"),new q([this,"playingLoop"],"是否循环",Ue.defaults.playingLoop,!0),new L([this,"currentTime"],"当前时间",Ue.defaults.currentTime,!0),new L([this,"duration"],"过渡时间",Ue.defaults.duration,!0),new q([this,"playing"],"是否播放",Ue.defaults.playing,!0),new L([this,"playingSpeed"],"播放速度",Ue.defaults.playingSpeed,!0)]}}};f(Ue,"createDefaultProps",()=>({...et.createDefaultProps(),emitter:p.reactJsonWithUndefined({type:"CircleEmitter",radius:.5}),bursts:p.reactArrayCollectionWithUndefined(void 0),translation:p.reactArrayWithUndefined(void 0),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",imageSize:p.reactArrayWithUndefined([20,20]),minimumImageSize:p.reactArrayWithUndefined(void 0),maximumImageSize:p.reactArrayWithUndefined(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:4,color:p.reactArrayWithUndefined(void 0),startColor:p.reactArrayWithUndefined(void 0),endColor:p.reactArrayWithUndefined(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:.5,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:!0,currentTime:0,duration:6e3,playingSpeed:1,playing:!0})),f(Ue,"type",Ue.register("ESParticleSystemPrimitive",Ue,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"}));let yl=Ue;const Vn=class Vn extends Vr{constructor(e){super(e);f(this,"initialStyle",this.ad(p.reactJsonWithUndefined(void 0)));f(this,"_getInitialStyleEvent",this.disposeVar(new V))}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const r=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{r(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"mode"],Vn.modes,"模式",Vn.defaults.mode),new Q([this,"style"],"样式",Vn.defaults.style),new q([this,"autoAnchor"],"自动锚点对齐",Vn.defaults.autoAnchor)]}}};f(Vn,"createDefaultProps",()=>({...Vr.createDefaultProps(),mode:"SquareH01",style:p.reactJson({fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"}),autoAnchor:!0})),f(Vn,"type",Vn.register("ESPoi2D",Vn,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),f(Vn,"modes",[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]]);let lu=Vn;const ui=class ui extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new mt([this,"mode"],ui.modes,"模式",ui.defaults.mode),new Q([this,"style"],"样式",ui.defaults.style)]}}};f(ui,"createDefaultProps",()=>({...et.createDefaultProps(),mode:"triangle",style:p.reactJson({UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]})})),f(ui,"type",ui.register("ESPoi3D",ui,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),f(ui,"modes",[["三角形","triangle"],["菱形","diamond"],["制(存)梁场","BridgePrefabricationSite"],["汽车运输便道","ExportRoad"],["拌合站","MixingStation"],["小型预制构件厂","PrefabricatedComponentsSite"],["项目部","ProjectDepartment"],["铁路岔线","RailwayFork"],["钢筋加工厂","RebarMachining"],["临时电力干线","TempElectricMain"],["铺轨基地","TrackLayingBase"],["汽车运梁通道","TransportationBridge"]]);let oh=ui;const oa=class oa extends Vt{constructor(e){super(e);f(this,"_czmFlattenedPlaneId",this.dv(p.react("")))}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ut([this,"targetID"],"瓦片图层","")]}}};f(oa,"createDefaultProps",()=>({...Vt.createDefaultProps(),targetID:"",filled:!1})),f(oa,"type",oa.register("ESPolygonFlattenedPlane",oa,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"}));let ah=oa;const ig=async(n,t,e)=>{const{viewer:r}=n;if(!r){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await r.callUeFunc({f:"AddTrees",p:{id:t,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},sg=async(n,t)=>{const{viewer:e}=n;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const r=await e.callUeFunc({f:"RemoveAllTrees",p:{id:t}});return r.error&&console.error("RemoveAllTrees:",r.error),r},og=async(n,t,e)=>{const{viewer:r}=n;if(!r){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await r.callUeFunc({f:"UpdateTreeParams",p:{id:t,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},ag=async(n,t,e,r)=>{const{viewer:i}=n;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const s=await i.callUeFunc({f:"CutDownTrees",p:{id:t,TreeIds:e,TimeLength:r}});return s.error&&console.error("CutDownTrees:",s.error),s},ug=async(n,t,e,r,i)=>{const{viewer:s}=n;if(!s){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const o=await s.callUeFunc({f:"GrowthSimulation",p:{id:t,ToParams:e,SwitchTime:i,TimeLength:r}});return o.error&&console.error("GrowthSimulation:",o.error),o},aa=class aa extends Ft{constructor(e){super(e);f(this,"_addTreesEvent",this.dv(new V));f(this,"_removeAllTreesEvent",this.dv(new V));f(this,"_updateTreeParamsEvent",this.dv(new V));f(this,"_cutDownTreesEvent",this.dv(new V));f(this,"_growthSimulationEvent",this.dv(new V))}async addTreesCallFunc(e,r){return await ig(e,this.id,r)}async updateTreeParamsCallFunc(e,r){return await og(e,this.id,r)}async cutDownTreesCallFunc(e,r,i){return await ag(e,this.id,r,i)}async removeAllTreesCallFunc(e){return await sg(e,this.id)}async growthSimulationCallFunc(e,r,i,s){return await ug(e,this.id,r,i,s)}async getIdByComponentNameAndHitItem(e,r,i){return await e.getIdByComponentNameAndHitItem(this.id,r,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(e){this._addTreesEvent.emit(e)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(e){this._updateTreeParamsEvent.emit(e)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(e,r){this._cutDownTreesEvent.emit(e,r)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,r,i){this._growthSimulationEvent.emit(e,r,i)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"通用"),new Q([this,"treeTypes"],"treeTypes",[],"{ name: string, meshPath: string }[]",!0),new L([this,"stumpId"],"树桩id"),new L([this,"intervalTime"],"动画间隔时间"),new L([this,"switchIntervalTime"],"切换间隔时间")]}}};f(aa,"createDefaultProps",()=>({...Ft.createDefaultProps(),treeTypes:p.reactJsonWithUndefined([]),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})),f(aa,"type",aa.register("ESSeparateFoliage",aa,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"}));let uh=aa;function _l(n,t,e){const r="buffer"in n,i=r?n.buffer:n;r&&(t+=n.byteOffset);const s=new Array(e),o=new DataView(i);for(let a=0;a<e;++a){const u=o.getUint8(t+a);s[a]=String.fromCharCode(u)}return s.join("")}function wl(n,t){const e="buffer"in n,r=e?n.buffer:n;return e&&(t+=n.byteOffset),new DataView(r).getUint32(t,!0)}function lg(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,t,e)}function B_(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,t,e)}function j_(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,t,e)}function Z_(n,t,e){const r="buffer"in n,i=r?n.buffer:n;if(r&&(t+=n.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,t,e)}function cg(n){if(_l(n,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=wl(n,4);if(e!==2){console.error("Unsupported glTF version");return}const r=wl(n,8);if(r!==n.byteLength){console.error("Invalid glTF length");return}const i=wl(n,12);if(i+12+4>r){console.error("Invalid glTF chunk length");return}if(_l(n,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const o=_l(n,20,i),a={version:e,length:r,gltfJson:o};if(20+i<n.byteLength){const u=wl(n,20+i);if(_l(n,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const c=lg(n,20+i+8,u);a.gltfBinary=c}return a}window.parseGlb=cg;function hg(n){const t=cg(n);if(t===void 0||!t.gltfBinary)return;const e=JSON.parse(t.gltfJson);return e.nodes.map(r=>{var i=e.meshes[r.mesh],s=i.primitives[0].attributes.POSITION,o=i.primitives[0].indices,a=e.accessors[s],u=e.bufferViews[a.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const l=Z_(t.gltfBinary,u.byteOffset??0,u.byteLength/4);var c=e.accessors[o],h=e.bufferViews[c.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let d;return c.componentType===5121?d=lg(t.gltfBinary,h.byteOffset??0,h.byteLength/1):c.componentType===5123?d=B_(t.gltfBinary,h.byteOffset??0,h.byteLength/2):c.componentType===5125&&(d=j_(t.gltfBinary,h.byteOffset??0,h.byteLength/4)),{name:r.name,posBuffer:l,indicesBuffer:d}})}window.parseWaterGlb=hg;const Ze=class Ze extends et{constructor(e){super(e);f(this,"_submergingData");f(this,"_allMoments",[]);f(this,"readyEvent",this.dv(new V));{const r=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=hg(s);const o=this._submergingData.map(a=>Date.parse(a.name)).sort();this._allMoments=o,this.currentTime==0&&(this.currentTime=o[0]),this.readyEvent.emit()})}).catch(i=>{console.log(i)})};r(),this.d(this.urlChanged.don(()=>{r()}))}}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ut([this,"url"],"Url地址",Ze.defaults.url),new Se([this,"amplitude"],.01,[0,1],"振幅",Ze.defaults.amplitude),new L([this,"frequency"],"频率",Ze.defaults.frequency),new L([this,"currentTime"],"当前时间",Ze.defaults.currentTime),new Q([this,"materialParams"],"材质参数",Ze.defaults.materialParams),new mt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型","river"),new Et([this,"waterColor"],"水的底色",Ze.defaults.waterColor),new Se([this,"waveVelocity"],.01,[0,1],"波动频率",Ze.defaults.waveVelocity),new L([this,"flowSpeed"],"水流速度",Ze.defaults.flowSpeed),new Se([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Ze.defaults.specularIntensity),new Se([this,"murkiness"],.01,[0,10],"水体浑浊度",Ze.defaults.murkiness)]}}};f(Ze,"createDefaultProps",()=>({...et.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:p.reactJson({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})),f(Ze,"type",Ze.register("ESSubmergingAnalysis",Ze,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"}));let lh=Ze;const Qs=class Qs extends Vt{constructor(e){super(e);f(this,"_startEvent",this.dv(new V));f(this,"_stopEvent",this.dv(new V))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Et([this,"startColor"],"起始颜色"),new Et([this,"endColor"],"结束颜色"),new L([this,"progress"],"计算进度"),new L([this,"extrudedHeight"],"高度m"),new L([this,"height"],"底面高度"),new L([this,"sampleDistance"],"采样间距m"),new L([this,"startTime"],"起始时间,时间戳"),new L([this,"endTime"],"结束时间,时间戳"),new L([this,"spanTime"],"时间跨度,默认1小时时间戳"),new st([],()=>this.start(),[],"开始分析"),new st([],()=>this.stop(),[],"结束分析")]}}};f(Qs,"createDefaultProps",()=>({...Vt.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:p.reactArray([1,1,0,1]),endColor:p.reactArray([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0,filled:!1,stroked:!1})),f(Qs,"type",Qs.register("ESSunshineAnalysis",Qs,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),f(Qs,"supportEditingModes",[...Vt.supportEditingModes,$.HeightModify]);let ch=Qs;const hn=class hn extends Ft{constructor(e){super(e);f(this,"_activateEvent",this.disposeVar(new V));f(this,"activate",!1)}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new L([this,"zIndex"],"层级序号",hn.defaults.zIndex),new mt([this,"renderMode"],hn.renderModes,"渲染模式","default"),new L([this,"opacity"],"透明度",hn.defaults.opacity)],dataSource:[...e.dataSource,new Q([this,"url"],"地形服务地址",hn.defaults.url),new pn([this,"rectangle"],"矩形范围",hn.defaults.rectangle)],more:[...e.more,new L([this,"czmMinzoom"],"czmMinzoom",void 0,!0),new L([this,"czmMaxzoom"],"czmMaxzoom",void 0,!0)]}}};f(hn,"createDefaultProps",()=>({...Ft.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:p.reactArray([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0,renderMode:"default",opacity:1})),f(hn,"type",hn.register("ESTerrainLayer",hn,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"})),f(hn,"renderModes",[["使用深度检测","default"],["不使用深度检测","disableDepthTest"],["透明","transparent"]]);let hh=hn;const li=class li extends Vr{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"color"],"文本颜色",[1,1,1,1]),new L([this,"fontSize"],"文字大小",14),new kl([this,"text"],"内容",li.defaults.text,void 0,!0),new Et([this,"backgroundColor"],"背景颜色",li.defaults.backgroundColor),new pn([this,"padding"],"内边距",li.defaults.padding),new Et([this,"borderColor"],"边界颜色"),new pn([this,"borderRadius"],"边界圆角"),new L([this,"borderWidth"],"边界宽度")],more:[...t.more,new it([],"czm","czm"),new q([this,"textEditingInteraction"],"文本编辑交互"),new q([this,"textEditing"],"文本编辑"),new L([this,"width"],"宽度",li.defaults.width,!0),new L([this,"opacity"],"透明度"),new mt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置","left"),new mt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};f(li,"createDefaultProps",()=>({...Vr.createDefaultProps(),text:"请输入文字",width:80,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:p.reactArray([1,1,1,1]),backgroundColor:p.reactArray([0,0,0,.8]),padding:p.reactArray([5,5,5,5]),borderRadius:p.reactArray([6,6,6,6]),borderWidth:0,borderColor:p.reactArray([1,1,1,1]),borderStyle:"solid"})),f(li,"type",li.register("ESTextLabel",li,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"}));let Ho=li;const K_=`
|
|
310
310
|
#### 默认值如下
|
|
311
311
|
\`\`\`js
|
|
312
312
|
{
|
|
313
313
|
"Title": "示例",
|
|
314
314
|
"Content": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
|
|
315
315
|
}
|
|
316
|
-
\`\`\``,
|
|
316
|
+
\`\`\``,fn=class fn extends Vr{constructor(e){super(e);f(this,"_callFunctionEvent",this.disposeVar(new V));f(this,"_callFunctionResultEvent",this.dv(new V))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,r){return new Promise(i=>{const s=new H,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(e,r)})}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Ge([this,"positionOffset"],"positionOffset",fn.defaults.positionOffset),new Ge([this,"rotationOffset"],"rotationOffset",fn.defaults.rotationOffset),new ut([this,"actorTag"],"actorTag",fn.defaults.actorTag),new ut([this,"widgetClass"],"widgetClass",fn.defaults.widgetClass),new ut([this,"socketName"],"socketName",fn.defaults.socketName),new Q([this,"info"],"info",fn.defaults.info,K_,!0)],more:[...e.more,new st(["string","string"],(r,i)=>this.callFunction(r,JSON.parse(i)),["",""],"callFunction")]}}};f(fn,"createDefaultProps",()=>({...Vr.createDefaultProps(),widgetClass:"",info:p.reactJsonWithUndefined({Title:"标题示例",Content:"内容示例"})})),f(fn,"type",fn.register("ESUEWidget",fn,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"}));let fh=fn;const ua=class ua extends et{constructor(){super(...arguments);f(this,"_callFunctionEvent",this.dv(new V));f(this,"_callFunctionResultEvent",this.dv(new V));f(this,"_actorEvent",this.dv(new V));f(this,"_lastActorStatus",this.dv(p.react("null")))}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,r){return new Promise(i=>{const s=new H,o=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(a=>{s.isDestroyed()||(s.destroy(),i(a),clearTimeout(o))})),this._callFunctionEvent.emit(e,r)})}getBoundSphereWithChildren(e){return new Promise((r,i)=>{r(void 0)})}get actorEvent(){return this._actorEvent}get lastActorStatus(){return this._lastActorStatus.value}set lastActorStatus(e){this._lastActorStatus.value=e}get lastActorStatusChanged(){return this._lastActorStatus.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ut([this,"actorTag"],"actorTag",""),new ut([this,"actorClass"],"actorClass",""),new q([this,"highlight"],"是否高亮",!1)],more:[...e.more,new st(["string","string"],(r,i)=>this.callFunction(r,JSON.parse(i)),["",""],"callFunction")]}}};f(ua,"createDefaultProps",()=>({...et.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})),f(ua,"type",ua.register("ESUnrealActor",ua,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"UnrealActor"}));let dh=ua;const Ke=class Ke extends et{constructor(e){super(e);f(this,"editingBindMode","doublePoints");f(this,"_resetWithCameraInfoEvent",this.dv(new V));this.collision=!1}get resetWithCameraInfoEvent(){return this._resetWithCameraInfoEvent}resetWithCameraInfo(){this._resetWithCameraInfoEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new q([this,"looping"],"循环",Ke.defaults.looping),new q([this,"showFrustum"],"视椎体",Ke.defaults.showFrustum),new L([this,"aspectRatio"],"宽高比",Ke.defaults.aspectRatio),new L([this,"fov"],"横向夹角",Ke.defaults.fov),new L([this,"far"],"视野长度",Ke.defaults.far),new L([this,"near"],"近面距离",Ke.defaults.near),new Q([this,"videoStreamUrl"],"视频路径",Ke.defaults.videoStreamUrl),new L([this,"zIndex"],"显示优先级",Ke.defaults.zIndex),new mt([this,"videoStreamType"],Ke.videoStreamTypes,"视频类型","video")],more:[...e.more,new st([],()=>this.resetWithCameraInfo(),[],"以当前相机状态重置")]}}};f(Ke,"createDefaultProps",()=>({...et.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamType:"video"})),f(Ke,"type",Ke.register("ESVideoFusion",Ke,{chsName:"视频融合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视频融合"})),f(Ke,"videoStreamTypes",[["video","video"],["hls","hls"],["flv","flv"],["img","img"],["gif","gif"]]);let ph=Ke;const dn=class dn extends et{constructor(e){super(e);f(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new q([this,"showFrustum"],"视椎体",dn.defaults.showFrustum),new L([this,"aspectRatio"],"宽高比",dn.defaults.aspectRatio),new L([this,"fov"],"横向夹角",dn.defaults.fov),new L([this,"near"],"近面距离",dn.defaults.near),new L([this,"far"],"视野长度",dn.defaults.far),new L([this,"zIndex"],"显示优先级",dn.defaults.zIndex)]}}};f(dn,"createDefaultProps",()=>({...et.createDefaultProps(),fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0,collision:!1})),f(dn,"type",dn.register("ESViewShed",dn,{chsName:"视域分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"信号传输器"}));let gh=dn;const Q_=`
|
|
317
317
|
#### 默认值如下
|
|
318
318
|
\`\`\`js
|
|
319
319
|
{
|
|
@@ -321,7 +321,7 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
321
321
|
"Key":"Value",
|
|
322
322
|
"内容": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
|
|
323
323
|
}
|
|
324
|
-
\`\`\``,
|
|
324
|
+
\`\`\``,hs=class hs extends Vr{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Q([this,"info"],"信息",hs.defaults.info,Q_,!0)],more:[...t.more,new it([],"通用","通用"),new it([],"ue","ue"),new lo([this,"positionOffset"],"坐标偏移"),new lo([this,"rotationOffset"],"旋转偏移"),new ut([this,"actorTag"]),new ut([this,"widgetClass"]),new ut([this,"socketName"]),new it([],"czm","czm"),new L([this,"opacity"],"透明度",hs.defaults.opacity,!0)]}}};f(hs,"createDefaultProps",()=>({...Vr.createDefaultProps(),info:p.reactJson({title:"标题示例",内容:"内容示例"}),widgetClass:"WidgetBlueprint'/EarthSDKForUE/Widget/WBP_ES_DefaultInfo.WBP_ES_DefaultInfo'",actorTag:"",socketName:"",positionOffset:p.reactArray([0,0,0]),rotationOffset:p.reactArray([0,0,0]),opacity:1})),f(hs,"type",hs.register("ESWidget",hs,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ES组件"}));let mh=hs;const $s=class $s extends wt{constructor(e){super(e);f(this,"_direction",this.disposeVar(p.react(0)));f(this,"editingBindMode","doublePoints");{const r=()=>{this.direction=this.points&&this.points.length>=2?co(La(this.points[0],this.points[1])):0};r(),this.ad(this.pointsChanged.don(r))}}get direction(){return this._direction.value}set direction(e){this._direction.value=e}get directionChanged(){return this._direction.changed}};f($s,"createDefaultProps",()=>({...wt.createDefaultProps(),stroked:!0,strokeStyle:p.reactJson({width:10,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f($s,"type",$s.register("ESDirectionMeasurement",$s,{chsName:"方位角测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"方位角测量"})),f($s,"supportEditingModes",[...wt.supportEditingModes,$.Rotation,$.Scale,$.DoublePointsAppend,$.DoublePointsModify]);let vh=$s;const fg=`// dataSource
|
|
325
325
|
(dataSource) => {
|
|
326
326
|
if (dataSource) {
|
|
327
327
|
dataSource.show = true;
|
|
@@ -347,11 +347,11 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
|
|
350
|
+
`,$_=`示例代码
|
|
351
351
|
\`\`\`
|
|
352
|
-
${
|
|
352
|
+
${fg}
|
|
353
353
|
\`\`\`
|
|
354
|
-
`;function sg(n){try{return JSON.parse(n),!0}catch{return!1}}const V_="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",Tt=class Tt extends kt{constructor(e){super(e);f(this,"_flyToFeatureEvent",this.dv(new V));f(this,"_flyToFeatureIndexEvent",this.dv(new V));f(this,"_features",this.disposeVar(d.reactJsonWithUndefined(void 0)));f(this,"pickedInfoType","FeatureCollection");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,r,i){this._flyToFeatureEvent.emit(e,r,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,r){this._flyToFeatureIndexEvent.emit(e,r)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}async _updateUrl(){var e;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:sg(this.url)?this.features=JSON.parse(this.url):await fetch(tt.context.getStrFromEnv(this.url)).then(r=>r.json()).then(r=>{this.features=r}).catch(r=>{console.warn("ESEntityCluster数据加载失败",r)}),this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new Q([this,"url"],"服务地址",Tt.defaults.url),new L([this,"minFeatureVisibleDistance"],"要素最小可视距离",Tt.defaults.minFeatureVisibleDistance),new L([this,"maxFeatureVisibleDistance"],"要素最大可视距离",Tt.defaults.maxFeatureVisibleDistance),new mt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...e.style,new it([],"点样式集合"),new q([this,"textShow"],"是否显示",Tt.defaults.textShow),new ve([this,"textAnchor"],"锚点",Tt.defaults.anchor),new ut([this,"textProperty"],"标注显示属性",Tt.defaults.textStyle.textProperty),new ut([this,"textDefaultText"],"默认文本",Tt.defaults.textStyle.defaultText),new Et([this,"textColor"],"文本颜色",Tt.defaults.textStyle.color),new Et([this,"textBackgroundColor"],"文本背景颜色",Tt.defaults.textStyle.backgroundColor),new ut([this,"textFontStyle"],"字体样式",Tt.defaults.textStyle.fontStyle),new ut([this,"textFontWeight"],"字体粗细",Tt.defaults.textStyle.fontWeight),new L([this,"textFontSize"],"字体大小",Tt.defaults.textStyle.fontSize),new ve([this,"textOffset"],"像素偏移",Tt.defaults.textStyle.offset),new it([],"点图片样式集合"),new q([this,"imageShow"],"是否显示",Tt.defaults.imageShow),new ve([this,"imageAnchor"],"锚点",Tt.defaults.imageStyle.anchor),new Q([this,"imageUrl"],"图片地址",Tt.defaults.imageStyle.url),new ve([this,"imageSize"],"图片大小",Tt.defaults.imageStyle.size),new ve([this,"imageOffset"],"像素偏移",Tt.defaults.imageStyle.offset),new it([],"线样式集合"),new q([this,"stroked"],"是否显示",Tt.defaults.stroked),new q([this,"strokeGround"],"贴地",Tt.defaults.strokeStyle.ground),new L([this,"strokeWidth"],"线宽",Tt.defaults.strokeStyle.width),new mt([this,"strokeWidthType"],Tt.defaults.strokeStyle.widthTypes,"线宽类型"),new Et([this,"strokeColor"],"线颜色",Tt.defaults.strokeStyle.color),new ut([this,"strokeMaterial"],"线材质",Tt.defaults.strokeStyle.material),new Q([this,"strokeMaterialParams"],"线材质参数",Tt.defaults.strokeStyle.materialParams),new it([],"面样式集合"),new q([this,"filled"],"是否显示",Tt.defaults.filled),new q([this,"fillGround"],"贴地",Tt.defaults.fillStyle.ground),new Et([this,"fillColor"],"填充颜色",Tt.defaults.fillStyle.color),new ut([this,"fillMaterial"],"填充材质",Tt.defaults.fillStyle.material),new Q([this,"fillMaterialParams"],"填充材质参数",Tt.defaults.fillStyle.materialParams)],more:[...e.more,new it([],"标注文本样式"),new ut([this,"textFontFamily"],"字体",Tt.defaults.textStyle.fontFamily),new it([],"通用"),new Vi([this,"loadFuncStr"],"loadFnStr",ig,k_,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};f(Tt,"createDefaultProps",()=>({...kt.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:V_,stroked:!0,strokeStyle:d.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:d.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:d.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:d.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})),f(Tt,"type",Tt.register("ESGeoJson",Tt,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"}));let hh=Tt;const Zs=class Zs extends wt{constructor(e){super(e);f(this,"editingBindMode","doublePoints");f(this,"_height",this.disposeVar(d.react(0)));{const r=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};r(),this.ad(this.pointsChanged.don(r))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};f(Zs,"createDefaultProps",()=>({...wt.createDefaultProps(),stroked:!0,strokeStyle:d.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(Zs,"type",Zs.register("ESHeightMeasurement",Zs,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),f(Zs,"supportEditingModes",[...wt.supportEditingModes,$.DoublePointsAppend,$.DoublePointsModify]);let fh=Zs;const ea=class ea extends Di{constructor(e){super(e);f(this,"_area",this.dv(d.react(0)));f(this,"_perimeter",this.dv(d.react(0)));f(this,"editingBindMode","doublePoints");const r=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};r(),this.d(this.radiusChanged.don(r))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,r){return Fp([...this.position],this.radius,e,r)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new L([this,"radius"],"圆半径",1,!0)],coordinate:[...e.coordinate,new q([this,"editing"],"是否编辑"),new io([this,"position"],"三维坐标",[0,0,0],!0),new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};f(ea,"createDefaultProps",()=>({...Di.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:d.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),f(ea,"type",ea.register("ESLocalCircle",ea,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let dh=ea;const ra=class ra extends Di{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new ff([this,"points"],"坐标",[])]}}};f(ra,"createDefaultProps",()=>({...Di.createDefaultProps(),points:bc([]),filled:!0})),f(ra,"type",ra.register("ESLocalPolygon",ra,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let ru=ra;const na=class na extends zo{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Il([this,"points"],"本地位置数组")]}}};f(na,"createDefaultProps",()=>({...zo.createDefaultProps(),points:d.reactPositions(void 0),filled:!0})),f(na,"type",na.register("ESLocalPolygonZ",na,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let ph=na;const ia=class ia extends Di{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"width"],"宽度"),new L([this,"height"],"高度")]}}};f(ia,"createDefaultProps",()=>({...Di.createDefaultProps(),width:5e5,height:3e5,filled:!0})),f(ia,"type",ia.register("ESLocalRectangle",ia,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let gh=ia;const Mi=class Mi extends wt{constructor(e){super(e);f(this,"editingBindMode","lineString");f(this,"_distance",this.dv(d.react(0)));f(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const r=()=>{if(this.points&&this.points.length>=2){const i=Qa(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};r(),this.d(this.pointsChanged.don(r))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"width"],"宽度",10),new mt([this,"materialMode"],Mi.materialModes,"模式","purple")],coordinate:[...e.coordinate,new L([this,"distance"],"距离",0,!1,!0)]}}};f(Mi,"createDefaultProps",()=>({...wt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:d.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),f(Mi,"type",Mi.register("ESPipeFence",Mi,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),f(Mi,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),f(Mi,"supportEditingModes",[...wt.supportEditingModes,$.LineStringAppend,$.LineStringInsert]);let mh=Mi;const Li=class Li extends sn{constructor(e){super(e);f(this,"_setLayerVisibleEvent",this.dv(new V));f(this,"_setLayerColorEvent",this.dv(new V))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,r){this._setLayerVisibleEvent.emit(e,r)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,r){this._setLayerColorEvent.emit(e,r)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"ESPipeserTileset"),new st(["string","string"],(r,i)=>this.setLayerVisible(r,i),["",""],"setLayerVisible"),new st(["string","string"],(r,i)=>this.setLayerColor(r,i),["",""],"setLayerColor"),new mt([this,"colorMode"],Li.colorModes,"colorMode",Li.defaults.colorMode,!0)]}}};f(Li,"createDefaultProps",()=>({...sn.createDefaultProps(),colorMode:"default"})),f(Li,"type",Li.register("ESPipeserTileset",Li,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),f(Li,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let vh=Li;const Ai=class Ai extends wt{constructor(e){super(e);f(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new L([this,"height"],"高度",10),new mt([this,"materialMode"],Ai.materialModes,"模式","danger")]}}};f(Ai,"createDefaultProps",()=>({...wt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),f(Ai,"type",Ai.register("ESPolygonFence",Ai,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),f(Ai,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),f(Ai,"supportEditingModes",[...wt.supportEditingModes,$.CircularAppend,$.CircularInsert,$.HeightModify]);let yh=Ai;const cs=class cs extends wt{constructor(e){super(e);f(this,"_deprecated",["ground"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());f(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"通用","通用"),new q([this,"ground"],"是否贴地"),new q([this,"outlineTranslucent"],"轮廓线半透明"),new L([this,"height"],"高度"),new L([this,"extrudedHeight"],"拉伸高度"),new dn([this,"rectangle"],"范围",cs.defaults.rectangle,!0),new L([this,"stRotation"],"纹理旋转角度"),new L([this,"rotation"],"旋转角度"),new q([this,"pointEditing"],"是否单点编辑")]}}};f(cs,"createDefaultProps",()=>({...wt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:d.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),f(cs,"type",cs.register("ESRectangle",cs,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),f(cs,"supportEditingModes",[...wt.supportEditingModes,$.DoublePointsAppend,$.DoublePointsModify]);let _h=cs;const sa=class sa extends zt{getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Q([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};f(sa,"createDefaultProps",()=>({...zt.createDefaultProps(),innerRings:d.reactPositionsSet([])})),f(sa,"type",sa.register("ESPolygonWithHole",sa,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let wh=sa;const hs=class hs extends zt{constructor(e){super(e);f(this,"_startEvent",this.disposeVar(new V));f(this,"_stopEvent",this.dv(new V));f(this,"_surfaceArea",this.disposeVar(d.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"表面积测量","表面积测量"),new st([],()=>this.start(),[],"开始计算"),new L([this,"interpolation"],"插值距离",hs.defaults.interpolation),new L([this,"offsetHeight"],"偏移高度",hs.defaults.offsetHeight)]}}};f(hs,"createDefaultProps",()=>({...zt.createDefaultProps(),interpolation:.5,offsetHeight:0,units:d.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:d.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),f(hs,"type",hs.register("ESSurfaceAreaMeasurement",hs,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let Eh=hs;const fs=class fs extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"downloadProgress"],"下载进度",fs.defaults.downloadProgress,!0,!0),new Q([this,"importOptions"],"导入参数",fs.defaults.importOptions,void 0,!0)],dataSource:[...t.dataSource,new Q([this,"url"],"路径")]}}};f(fs,"createDefaultProps",()=>({...et.createDefaultProps(),url:"",importOptions:d.reactJsonWithUndefined({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),f(fs,"type",fs.register("ESDatasmithRuntimeModel",fs,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let Sh=fs;const Ke=class Ke extends ru{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new mt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Ke.defaults.waterType),new L([this,"frequency"],"频率",Ke.defaults.frequency),new Se([this,"amplitude"],.01,[0,1],"振幅",Ke.defaults.amplitude),new Se([this,"flowDirection"],1,[0,360],"流向",Ke.defaults.flowDirection),new Se([this,"waveVelocity"],.01,[0,1],"波动频率",Ke.defaults.waveVelocity),new Se([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Ke.defaults.specularIntensity),new Se([this,"murkiness"],.1,[0,10],"水体浑浊度",Ke.defaults.murkiness),new L([this,"flowSpeed"],"水流速度",Ke.defaults.flowSpeed),new Et([this,"waterColor"],"水的底色",Ke.defaults.waterColor),new Q([this,"waterImage"],"水的图片",Ke.defaults.waterImage)]}}};f(Ke,"createDefaultProps",()=>({...ru.createDefaultProps(),allowPicking:!0,waterImage:d.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),f(Ke,"type",Ke.register("ESDynamicWater",Ke,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let Ch=Ke;const Qe=class Qe extends zt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new mt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Qe.defaults.waterType),new L([this,"frequency"],"频率",Qe.defaults.frequency),new Se([this,"amplitude"],.01,[0,1],"振幅",Qe.defaults.amplitude),new Se([this,"flowDirection"],1,[0,360],"流向",Qe.defaults.flowDirection),new Se([this,"waveVelocity"],.01,[0,1],"波动频率",Qe.defaults.waveVelocity),new Se([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Qe.defaults.specularIntensity),new Se([this,"murkiness"],.1,[0,10],"水体浑浊度",Qe.defaults.murkiness),new L([this,"flowSpeed"],"水流速度",Qe.defaults.flowSpeed),new Et([this,"waterColor"],"水的底色",Qe.defaults.waterColor),new Q([this,"waterImage"],"水的图片",Qe.defaults.waterImage)]}}};f(Qe,"createDefaultProps",()=>({...zt.createDefaultProps(),allowPicking:!0,waterImage:d.reactJsonWithUndefined({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),f(Qe,"type",Qe.register("ESGeoWater",Qe,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let Ih=Qe;const Ks=class Ks extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"downloadProgress"],"下载进度",Ks.defaults.downloadProgress,!0,!0),new ut([this,"levelName"],"levelName",""),new L([this,"levelLoadDistance"],"levelLoadDistance",1e3),new Ue([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...t.dataSource,new Q([this,"url"],"url","")]}}};f(Ks,"createDefaultProps",()=>({...et.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:d.reactArray([0,0,0]),levelLoadDistance:1e3})),f(Ks,"type",Ks.register("ESLevelRuntimeModel",Ks,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let Ph=Ks;const Vr=class Vr extends is{constructor(e){super(e);f(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"radius"],"半径",Vr.defaults.radius),new L([this,"sides"],"圆边数",Vr.defaults.sides),new L([this,"speed"],"材质速度",Vr.defaults.speed),new mt([this,"materialMode"],Vr.materialModes,"材质模式",Vr.defaults.materialMode),new Q([this,"materialImage"],"材质图片和重复度",Vr.defaults.materialImage)]}}};f(Vr,"createDefaultProps",()=>({...is.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:d.reactJson({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:d.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),f(Vr,"type",Vr.register("ESPipeline",Vr,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),f(Vr,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let bh=Vr;const li=class li extends wt{constructor(e){super(e);f(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"visibleColor"],"可视区域颜色",li.defaults.visibleColor),new Et([this,"invisibleColor"],"遮挡区域颜色",li.defaults.invisibleColor),new L([this,"heightOffset"],"视点高度偏移",li.defaults.heightOffset)]}}};f(li,"createDefaultProps",()=>({...wt.createDefaultProps(),visibleColor:d.reactArray([0,1,0,1]),invisibleColor:d.reactArray([1,0,0,1]),heightOffset:0})),f(li,"type",li.register("ESVisibilityAnalysis",li,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),f(li,"supportEditingModes",[...wt.supportEditingModes,$.VisibilityAppend,$.VisibilityModify]);let Nh=li;const oa=class oa extends zt{constructor(e){super(e);f(this,"_startEvent",this.dv(new V));f(this,"_clearEvent",this.dv(new V));f(this,"_volume",this.disposeVar(d.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"通用","通用"),new L([this,"planeHeight"],"基准面高程",void 0,!0),new L([this,"gridWidth"],"采样间距 m"),new L([this,"cutVolume"],"挖方",0,!1,!0),new L([this,"fillVolume"],"填方",0,!1,!0),new L([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new L([this,"progress"],"计算进度",0,!1,!0),new st([],()=>this.start(),[],"开始分析"),new st([],()=>this.clear(),[],"清空分析结果"),new q([this,"depthTest"],"是否开启深度检测")]}}};f(oa,"createDefaultProps",()=>({...zt.createDefaultProps(),planeHeight:d.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:d.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(oa,"type",oa.register("ESVolumeMeasurement",oa,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let Th=oa;const aa=class aa extends Uo{constructor(e){super(e);f(this,"_human",this.dv(new Uo));f(this,"_poi",this.dv(new eu));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:r,_poi:i}=this;this.d(d.track([r,"show"],[this,"show"])),this.d(d.track([i,"show"],[this,"show"])),this.d(d.track([r,"allowPicking"],[this,"allowPicking"])),this.d(d.track([i,"allowPicking"],[this,"allowPicking"])),this.d(d.bind([r,"scale"],[this,"scale"])),this.d(d.bind([i,"scale"],[this,"scale"])),this.d(d.track([r,"collision"],[this,"collision"])),this.d(d.track([i,"collision"],[this,"collision"])),this.d(d.bind([r,"flyInParam"],[this,"flyInParam"])),this.d(d.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(d.track([r,"animation"],[this,"animation"])),this.d(d.track([r,"mode"],[this,"mode"])),this.d(d.track([r,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(d.track([r,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(d.track([i,"name"],[this,"name"])),this.d(d.track([i,"mode"],[this,"poiMode"])),this.d(d.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(d.track([i,"screenRender"],[this,"screenRender"])),this.d(d.track([i,"size"],[this,"size"])),this.d(d.track([i,"anchor"],[this,"anchor"])),this.d(d.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(d.track([i,"renderMode"],[this,"renderMode"])),this.d(d.track([i,"rotationType"],[this,"rotationType"])),this.d(d.track([i,"zOrder"],[this,"zOrder"])),this.d(d.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(d.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(d.bind([r,"position"],[this,"position"])),this.d(d.bind([r,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{r.flyIn(s)})),this.d(this.flyToEvent.don(s=>{r.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{r.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{r.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{r.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{r.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,u)=>{r.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,l)=>{r.smoothMoveWithRotationOnGround(s,o,a,u,l)})),this.d(this.automaticLandingEvent.don(()=>{r.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"poiMode"],eu.modes,"poi模式","SquareH01"),new L([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};f(aa,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:d.reactJson({}),autoAnchor:!0,screenRender:!0,size:d.reactArray([100,100]),anchor:d.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...Uo.createDefaultProps()})),f(aa,"type",aa.register("ESHumanPoi",aa,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let Oh=aa;const Vn=class Vn extends zt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"depth"],"深度",Vn.defaults.depth),new L([this,"interpolation"],"插值",Vn.defaults.interpolation),new L([this,"opacity"],"透明度",Vn.defaults.opacity),new Q([this,"sideImage"],"侧面图片",Vn.defaults.sideImage),new Q([this,"bottomImage"],"底面图片",Vn.defaults.bottomImage)]}}};f(Vn,"createDefaultProps",()=>({...zt.createDefaultProps(),depth:100,sideImage:d.reactJson({url:tt.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:d.reactJson({url:tt.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0})),f(Vn,"type",Vn.register("ESPit",Vn,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let Go=Vn;const ua=class ua extends Go{constructor(e){super(e);f(this,"_excavate",this.dv(new tu));f(this,"_pit",this.dv(new Go));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:r,_pit:i}=this;this.d(d.track([r,"show"],[this,"show"])),this.d(d.track([i,"show"],[this,"show"])),this.d(d.track([r,"allowPicking"],[this,"allowPicking"])),this.d(d.track([i,"allowPicking"],[this,"allowPicking"])),this.d(d.track([r,"collision"],[this,"collision"])),this.d(d.track([i,"collision"],[this,"collision"])),this.d(d.bind([i,"points"],[this,"points"])),this.d(d.track([r,"points"],[this,"points"])),this.d(d.track([i,"pointed"],[this,"pointed"])),this.d(d.track([r,"pointed"],[this,"pointed"])),this.d(d.track([i,"pointStyle"],[this,"pointStyle"])),this.d(d.track([r,"pointStyle"],[this,"pointStyle"])),this.d(d.track([i,"stroked"],[this,"stroked"])),this.d(d.track([r,"stroked"],[this,"stroked"])),this.d(d.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(d.track([r,"strokeStyle"],[this,"strokeStyle"])),this.d(d.track([i,"filled"],[this,"filled"])),this.d(d.track([i,"fillStyle"],[this,"fillStyle"])),this.d(d.track([r,"fillStyle"],[this,"fillStyle"])),this.d(d.track([r,"mode"],[this,"mode"])),this.d(d.track([r,"targetID"],[this,"targetID"])),this.d(d.track([i,"depth"],[this,"depth"])),this.d(d.track([i,"sideImage"],[this,"sideImage"])),this.d(d.track([i,"bottomImage"],[this,"bottomImage"])),this.d(d.track([i,"opacity"],[this,"opacity"])),this.d(d.track([i,"interpolation"],[this,"interpolation"])),this.d(d.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(d.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"mode"],tu.modes,"模式","in"),new ut([this,"targetID"],"瓦片图层","")]}}};f(ua,"createDefaultProps",()=>({...Go.createDefaultProps(),mode:"in",targetID:""})),f(ua,"type",ua.register("ESHole",ua,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let Dh=ua;const xh={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},z_=async(n,t,e,r)=>{try{const i=window.localStorage.getItem("Authorization");let s=n+`${xh.layerconfigfind}?tileServiceName=${t}`;e&&(s+=`&earthdstoken=${encodeURIComponent(r)}`);const o={headers:{...!e&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},U_=async(n,t,e,r,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=n+xh.layerconfigsave;const a=i??{};e&&(o+=`?earthdstoken=${encodeURIComponent(r)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(a)})},c=await(await fetch(o,u)).text();return JSON.parse(c)}catch(s){console.error(s)}},G_=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},W_=async(n,t,e,r,i)=>{try{const s={tileServiceName:t,featureId:e},o=window.localStorage.getItem("Authorization");let a=n+xh.featureproperty;r&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const l=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!r&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),c=JSON.parse(l);if(c.status=="ok")return c.data;console.error(c.data.status);return}catch(s){console.error(s)}},la=class la extends sn{constructor(e){super(e);f(this,"_es3DTileset",this.dv(new sn));f(this,"_ids",this.dv(d.reactJson([])));f(this,"_useEarthDSToken",this.dv(d.react(!1)));f(this,"_earthdstoken",this.dv(d.react("")));f(this,"_visJson",this.disposeVar(d.react({})));f(this,"_highlightInner3DtilesetEvent",this.dv(new V));f(this,"_removeHighlightInner3DtilesetEvent",this.dv(new V));f(this,"_tilesetServePort",this.dv(d.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(d.track([r,"allowPicking"],[this,"allowPicking"])),this.d(d.track([r,"collision"],[this,"collision"])),this.d(d.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(d.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(d.track([r,"actorTag"],[this,"actorTag"])),this.d(d.track([r,"materialMode"],[this,"materialMode"])),this.d(d.track([r,"highlight"],[this,"highlight"])),this.d(d.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(d.track([r,"highlightID"],[this,"highlightID"])),this.d(d.track([r,"highlightColor"],[this,"highlightColor"])),this.d(d.bind([r,"offset"],[this,"offset"])),this.d(d.bind([r,"rotation"],[this,"rotation"])),this.d(d.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(d.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(d.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(d.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(d.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(d.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(d.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(d.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(d.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(d.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(d.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(d.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(d.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(d.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(d.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(d.track([r,"materialParams"],[this,"materialParams"])),this.d(d.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(d.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(d.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(d.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(d.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(d.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(d.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{r.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,r){var i;if((i=this.layerConfig)!=null&&i.length){const s={};s[r[0].value]=r[0].visable,this.visJson={...this.visJson,...s}}else this.setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}async getFeatureProperty(e){return await W_(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const e=await z_(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await U_(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,r){var a,u,l;const i=await e.pick(r),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(l=i==null?void 0:i.sceneObject)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await G_(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Q([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};f(la,"createDefaultProps",()=>({...sn.createDefaultProps(),layerConfig:d.reactJsonWithUndefined([])})),f(la,"type",la.register("ESRtsTileset",la,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Mh=la;function q_(n){return typeof n=="number"&&!isNaN(n)}const ca=class ca extends sn{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation}}set json(t){this._innerSetJson(t)}async init(t,e){this.featureId=e;const r=await t.getFeatureProperty(e);this.uiShowprops=r.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:q_(a.value)?Number(a.value.toFixed(3)):""}))})),this.datasetName=r.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:t}),t.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}constructor(t){super(t)}};f(ca,"createDefaultProps",()=>({...sn.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:d.reactJson({}),changeMaterial:d.reactJsonWithUndefined(void 0),uiShowprops:d.reactJson({}),props:d.reactJson({})})),f(ca,"type",ca.register("ESRtsFeatureEditing",ca,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Lh=ca;const X_=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},hu=class hu extends sn{constructor(e){super(e);f(this,"_es3DTileset",this.dv(new sn));f(this,"_tilesetServePort",this.dv(d.react("")));f(this,"_useEarthDSToken",this.dv(d.react(!1)));f(this,"_earthdstoken",this.dv(d.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(d.track([r,"allowPicking"],[this,"allowPicking"])),this.d(d.track([r,"collision"],[this,"collision"])),this.d(d.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(d.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(d.track([r,"actorTag"],[this,"actorTag"])),this.d(d.track([r,"materialMode"],[this,"materialMode"])),this.d(d.track([r,"highlight"],[this,"highlight"])),this.d(d.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(d.track([r,"highlightID"],[this,"highlightID"])),this.d(d.track([r,"highlightColor"],[this,"highlightColor"])),this.d(d.bind([r,"offset"],[this,"offset"])),this.d(d.bind([r,"rotation"],[this,"rotation"])),this.d(d.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(d.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(d.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(d.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(d.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(d.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(d.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(d.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(d.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(d.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(d.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(d.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(d.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(d.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(d.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(d.track([r,"materialParams"],[this,"materialParams"])),this.d(d.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(d.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(d.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(d.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(d.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(d.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(d.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getport(){const e=await X_(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};f(hu,"type",hu.register("ESMsTileset",hu,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Ah=hu;const og={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:`
|
|
354
|
+
`;function dg(n){try{return JSON.parse(n),!0}catch{return!1}}const t0="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",Tt=class Tt extends Ft{constructor(e){super(e);f(this,"_flyToFeatureEvent",this.dv(new V));f(this,"_flyToFeatureIndexEvent",this.dv(new V));f(this,"_features",this.disposeVar(p.reactJsonWithUndefined(void 0)));f(this,"pickedInfoType","FeatureCollection");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,r,i){this._flyToFeatureEvent.emit(e,r,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,r){this._flyToFeatureIndexEvent.emit(e,r)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}async _updateUrl(){var e;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:dg(this.url)?this.features=JSON.parse(this.url):await fetch(tt.context.getStrFromEnv(this.url)).then(r=>r.json()).then(r=>{this.features=r}).catch(r=>{console.warn("ESEntityCluster数据加载失败",r)}),this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new Q([this,"url"],"服务地址",Tt.defaults.url),new L([this,"minFeatureVisibleDistance"],"要素最小可视距离",Tt.defaults.minFeatureVisibleDistance),new L([this,"maxFeatureVisibleDistance"],"要素最大可视距离",Tt.defaults.maxFeatureVisibleDistance),new mt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...e.style,new it([],"点样式集合"),new q([this,"textShow"],"是否显示",Tt.defaults.textShow),new ve([this,"textAnchor"],"锚点",Tt.defaults.anchor),new ut([this,"textProperty"],"标注显示属性",Tt.defaults.textStyle.textProperty),new ut([this,"textDefaultText"],"默认文本",Tt.defaults.textStyle.defaultText),new Et([this,"textColor"],"文本颜色",Tt.defaults.textStyle.color),new Et([this,"textBackgroundColor"],"文本背景颜色",Tt.defaults.textStyle.backgroundColor),new ut([this,"textFontStyle"],"字体样式",Tt.defaults.textStyle.fontStyle),new ut([this,"textFontWeight"],"字体粗细",Tt.defaults.textStyle.fontWeight),new L([this,"textFontSize"],"字体大小",Tt.defaults.textStyle.fontSize),new ve([this,"textOffset"],"像素偏移",Tt.defaults.textStyle.offset),new it([],"点图片样式集合"),new q([this,"imageShow"],"是否显示",Tt.defaults.imageShow),new ve([this,"imageAnchor"],"锚点",Tt.defaults.imageStyle.anchor),new Q([this,"imageUrl"],"图片地址",Tt.defaults.imageStyle.url),new ve([this,"imageSize"],"图片大小",Tt.defaults.imageStyle.size),new ve([this,"imageOffset"],"像素偏移",Tt.defaults.imageStyle.offset),new it([],"线样式集合"),new q([this,"stroked"],"是否显示",Tt.defaults.stroked),new q([this,"strokeGround"],"贴地",Tt.defaults.strokeStyle.ground),new L([this,"strokeWidth"],"线宽",Tt.defaults.strokeStyle.width),new mt([this,"strokeWidthType"],Tt.defaults.strokeStyle.widthTypes,"线宽类型"),new Et([this,"strokeColor"],"线颜色",Tt.defaults.strokeStyle.color),new ut([this,"strokeMaterial"],"线材质",Tt.defaults.strokeStyle.material),new Q([this,"strokeMaterialParams"],"线材质参数",Tt.defaults.strokeStyle.materialParams),new it([],"面样式集合"),new q([this,"filled"],"是否显示",Tt.defaults.filled),new q([this,"fillGround"],"贴地",Tt.defaults.fillStyle.ground),new Et([this,"fillColor"],"填充颜色",Tt.defaults.fillStyle.color),new ut([this,"fillMaterial"],"填充材质",Tt.defaults.fillStyle.material),new Q([this,"fillMaterialParams"],"填充材质参数",Tt.defaults.fillStyle.materialParams)],more:[...e.more,new it([],"标注文本样式"),new ut([this,"textFontFamily"],"字体",Tt.defaults.textStyle.fontFamily),new it([],"通用"),new Ui([this,"loadFuncStr"],"loadFnStr",fg,$_,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};f(Tt,"createDefaultProps",()=>({...Ft.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:t0,stroked:!0,strokeStyle:p.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:p.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:p.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:p.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})),f(Tt,"type",Tt.register("ESGeoJson",Tt,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"}));let cu=Tt;const to=class to extends wt{constructor(e){super(e);f(this,"editingBindMode","doublePoints");f(this,"_height",this.disposeVar(p.react(0)));{const r=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};r(),this.ad(this.pointsChanged.don(r))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};f(to,"createDefaultProps",()=>({...wt.createDefaultProps(),stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(to,"type",to.register("ESHeightMeasurement",to,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),f(to,"supportEditingModes",[...wt.supportEditingModes,$.DoublePointsAppend,$.DoublePointsModify]);let yh=to;const la=class la extends Di{constructor(e){super(e);f(this,"_area",this.dv(p.react(0)));f(this,"_perimeter",this.dv(p.react(0)));f(this,"editingBindMode","doublePoints");const r=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};r(),this.d(this.radiusChanged.don(r))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,r){return qp([...this.position],this.radius,e,r)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new L([this,"radius"],"圆半径",1,!0)],coordinate:[...e.coordinate,new q([this,"editing"],"是否编辑"),new lo([this,"position"],"三维坐标",[0,0,0],!0),new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)]}}};f(la,"createDefaultProps",()=>({...Di.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),f(la,"type",la.register("ESLocalCircle",la,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let _h=la;const ca=class ca extends Di{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new _f([this,"points"],"坐标",[])]}}};f(ca,"createDefaultProps",()=>({...Di.createDefaultProps(),points:Vc([]),filled:!0})),f(ca,"type",ca.register("ESLocalPolygon",ca,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let hu=ca;const ha=class ha extends Xo{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Fl([this,"points"],"本地位置数组")]}}};f(ha,"createDefaultProps",()=>({...Xo.createDefaultProps(),points:p.reactPositions(void 0),filled:!0})),f(ha,"type",ha.register("ESLocalPolygonZ",ha,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let wh=ha;const fa=class fa extends Di{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"width"],"宽度"),new L([this,"height"],"高度")]}}};f(fa,"createDefaultProps",()=>({...Di.createDefaultProps(),width:5e5,height:3e5,filled:!0})),f(fa,"type",fa.register("ESLocalRectangle",fa,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let Eh=fa;const Ai=class Ai extends wt{constructor(e){super(e);f(this,"editingBindMode","lineString");f(this,"_distance",this.dv(p.react(0)));f(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const r=()=>{if(this.points&&this.points.length>=2){const i=ou(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};r(),this.d(this.pointsChanged.don(r))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"width"],"宽度",10),new mt([this,"materialMode"],Ai.materialModes,"模式","purple")],coordinate:[...e.coordinate,new L([this,"distance"],"距离",0,!1,!0)]}}};f(Ai,"createDefaultProps",()=>({...wt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),f(Ai,"type",Ai.register("ESPipeFence",Ai,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),f(Ai,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),f(Ai,"supportEditingModes",[...wt.supportEditingModes,$.LineStringAppend,$.LineStringInsert]);let El=Ai;const Ri=class Ri extends on{constructor(e){super(e);f(this,"_setLayerVisibleEvent",this.dv(new V));f(this,"_setLayerColorEvent",this.dv(new V))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,r){this._setLayerVisibleEvent.emit(e,r)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,r){this._setLayerColorEvent.emit(e,r)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"ESPipeserTileset"),new st(["string","string"],(r,i)=>this.setLayerVisible(r,i),["",""],"setLayerVisible"),new st(["string","string"],(r,i)=>this.setLayerColor(r,i),["",""],"setLayerColor"),new mt([this,"colorMode"],Ri.colorModes,"colorMode",Ri.defaults.colorMode,!0)]}}};f(Ri,"createDefaultProps",()=>({...on.createDefaultProps(),colorMode:"default"})),f(Ri,"type",Ri.register("ESPipeserTileset",Ri,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),f(Ri,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let Sh=Ri;const Fi=class Fi extends wt{constructor(e){super(e);f(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new L([this,"area"],"面积",0,!1,!0),new L([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new L([this,"height"],"高度",10),new mt([this,"materialMode"],Fi.materialModes,"模式","danger")]}}};f(Fi,"createDefaultProps",()=>({...wt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),f(Fi,"type",Fi.register("ESPolygonFence",Fi,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),f(Fi,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),f(Fi,"supportEditingModes",[...wt.supportEditingModes,$.CircularAppend,$.CircularInsert,$.HeightModify]);let Sl=Fi;const fs=class fs extends wt{constructor(e){super(e);f(this,"_deprecated",["ground"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());f(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"通用","通用"),new q([this,"ground"],"是否贴地"),new q([this,"outlineTranslucent"],"轮廓线半透明"),new L([this,"height"],"高度"),new L([this,"extrudedHeight"],"拉伸高度"),new pn([this,"rectangle"],"范围",fs.defaults.rectangle,!0),new L([this,"stRotation"],"纹理旋转角度"),new L([this,"rotation"],"旋转角度"),new q([this,"pointEditing"],"是否单点编辑")]}}};f(fs,"createDefaultProps",()=>({...wt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:p.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),f(fs,"type",fs.register("ESRectangle",fs,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),f(fs,"supportEditingModes",[...wt.supportEditingModes,$.DoublePointsAppend,$.DoublePointsModify]);let Ch=fs;const da=class da extends Vt{getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Q([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};f(da,"createDefaultProps",()=>({...Vt.createDefaultProps(),innerRings:p.reactPositionsSet([])})),f(da,"type",da.register("ESPolygonWithHole",da,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let Ih=da;const ds=class ds extends Vt{constructor(e){super(e);f(this,"_startEvent",this.disposeVar(new V));f(this,"_stopEvent",this.dv(new V));f(this,"_surfaceArea",this.disposeVar(p.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"表面积测量","表面积测量"),new st([],()=>this.start(),[],"开始计算"),new L([this,"interpolation"],"插值距离",ds.defaults.interpolation),new L([this,"offsetHeight"],"偏移高度",ds.defaults.offsetHeight)]}}};f(ds,"createDefaultProps",()=>({...Vt.createDefaultProps(),interpolation:.5,offsetHeight:0,units:p.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),f(ds,"type",ds.register("ESSurfaceAreaMeasurement",ds,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let Ph=ds;const ps=class ps extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"downloadProgress"],"下载进度",ps.defaults.downloadProgress,!0,!0),new Q([this,"importOptions"],"导入参数",ps.defaults.importOptions,void 0,!0)],dataSource:[...t.dataSource,new Q([this,"url"],"路径")]}}};f(ps,"createDefaultProps",()=>({...et.createDefaultProps(),url:"",importOptions:p.reactJsonWithUndefined({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),f(ps,"type",ps.register("ESDatasmithRuntimeModel",ps,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let bh=ps;const Qe=class Qe extends hu{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new mt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Qe.defaults.waterType),new L([this,"frequency"],"频率",Qe.defaults.frequency),new Se([this,"amplitude"],.01,[0,1],"振幅",Qe.defaults.amplitude),new Se([this,"flowDirection"],1,[0,360],"流向",Qe.defaults.flowDirection),new Se([this,"waveVelocity"],.01,[0,1],"波动频率",Qe.defaults.waveVelocity),new Se([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Qe.defaults.specularIntensity),new Se([this,"murkiness"],.1,[0,10],"水体浑浊度",Qe.defaults.murkiness),new L([this,"flowSpeed"],"水流速度",Qe.defaults.flowSpeed),new Et([this,"waterColor"],"水的底色",Qe.defaults.waterColor),new Q([this,"waterImage"],"水的图片",Qe.defaults.waterImage)]}}};f(Qe,"createDefaultProps",()=>({...hu.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),f(Qe,"type",Qe.register("ESDynamicWater",Qe,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let Nh=Qe;const $e=class $e extends Vt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new mt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",$e.defaults.waterType),new L([this,"frequency"],"频率",$e.defaults.frequency),new Se([this,"amplitude"],.01,[0,1],"振幅",$e.defaults.amplitude),new Se([this,"flowDirection"],1,[0,360],"流向",$e.defaults.flowDirection),new Se([this,"waveVelocity"],.01,[0,1],"波动频率",$e.defaults.waveVelocity),new Se([this,"specularIntensity"],.01,[0,1],"镜面反射强度",$e.defaults.specularIntensity),new Se([this,"murkiness"],.1,[0,10],"水体浑浊度",$e.defaults.murkiness),new L([this,"flowSpeed"],"水流速度",$e.defaults.flowSpeed),new Et([this,"waterColor"],"水的底色",$e.defaults.waterColor),new Q([this,"waterImage"],"水的图片",$e.defaults.waterImage)]}}};f($e,"createDefaultProps",()=>({...Vt.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),f($e,"type",$e.register("ESGeoWater",$e,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let Th=$e;const eo=class eo extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"downloadProgress"],"下载进度",eo.defaults.downloadProgress,!0,!0),new ut([this,"levelName"],"levelName",""),new L([this,"levelLoadDistance"],"levelLoadDistance",1e3),new Ge([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...t.dataSource,new Q([this,"url"],"url","")]}}};f(eo,"createDefaultProps",()=>({...et.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:p.reactArray([0,0,0]),levelLoadDistance:1e3})),f(eo,"type",eo.register("ESLevelRuntimeModel",eo,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let Oh=eo;const zr=class zr extends Mi{constructor(e){super(e);f(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"radius"],"半径",zr.defaults.radius),new L([this,"sides"],"圆边数",zr.defaults.sides),new L([this,"speed"],"材质速度",zr.defaults.speed),new mt([this,"materialMode"],zr.materialModes,"材质模式",zr.defaults.materialMode),new Q([this,"materialImage"],"材质图片和重复度",zr.defaults.materialImage)]}}};f(zr,"createDefaultProps",()=>({...Mi.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:p.reactJson({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),f(zr,"type",zr.register("ESPipeline",zr,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),f(zr,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let xh=zr;const ci=class ci extends wt{constructor(e){super(e);f(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"visibleColor"],"可视区域颜色",ci.defaults.visibleColor),new Et([this,"invisibleColor"],"遮挡区域颜色",ci.defaults.invisibleColor),new L([this,"heightOffset"],"视点高度偏移",ci.defaults.heightOffset)]}}};f(ci,"createDefaultProps",()=>({...wt.createDefaultProps(),visibleColor:p.reactArray([0,1,0,1]),invisibleColor:p.reactArray([1,0,0,1]),heightOffset:0})),f(ci,"type",ci.register("ESVisibilityAnalysis",ci,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),f(ci,"supportEditingModes",[...wt.supportEditingModes,$.VisibilityAppend,$.VisibilityModify]);let Dh=ci;const pa=class pa extends Vt{constructor(e){super(e);f(this,"_startEvent",this.dv(new V));f(this,"_clearEvent",this.dv(new V));f(this,"_volume",this.disposeVar(p.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new it([],"通用","通用"),new L([this,"planeHeight"],"基准面高程",void 0,!0),new L([this,"gridWidth"],"采样间距 m"),new L([this,"cutVolume"],"挖方",0,!1,!0),new L([this,"fillVolume"],"填方",0,!1,!0),new L([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new L([this,"progress"],"计算进度",0,!1,!0),new st([],()=>this.start(),[],"开始分析"),new st([],()=>this.clear(),[],"清空分析结果"),new q([this,"depthTest"],"是否开启深度检测")]}}};f(pa,"createDefaultProps",()=>({...Vt.createDefaultProps(),planeHeight:p.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),f(pa,"type",pa.register("ESVolumeMeasurement",pa,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let Mh=pa;const ga=class ga extends Gs{constructor(e){super(e);f(this,"_human",this.dv(new Gs));f(this,"_poi",this.dv(new lu));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:r,_poi:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.bind([r,"scale"],[this,"scale"])),this.d(p.bind([i,"scale"],[this,"scale"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([r,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"animation"],[this,"animation"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([r,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.track([i,"name"],[this,"name"])),this.d(p.track([i,"mode"],[this,"poiMode"])),this.d(p.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(p.track([i,"screenRender"],[this,"screenRender"])),this.d(p.track([i,"size"],[this,"size"])),this.d(p.track([i,"anchor"],[this,"anchor"])),this.d(p.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(p.track([i,"renderMode"],[this,"renderMode"])),this.d(p.track([i,"rotationType"],[this,"rotationType"])),this.d(p.track([i,"zOrder"],[this,"zOrder"])),this.d(p.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.bind([r,"position"],[this,"position"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{r.flyIn(s)})),this.d(this.flyToEvent.don(s=>{r.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{r.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{r.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{r.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{r.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,u)=>{r.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,l)=>{r.smoothMoveWithRotationOnGround(s,o,a,u,l)})),this.d(this.automaticLandingEvent.don(()=>{r.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"poiMode"],lu.modes,"poi模式","SquareH01"),new L([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};f(ga,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:p.reactJson({}),autoAnchor:!0,screenRender:!0,size:p.reactArray([100,100]),anchor:p.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...Gs.createDefaultProps()})),f(ga,"type",ga.register("ESHumanPoi",ga,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let Lh=ga;const zn=class zn extends Vt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new L([this,"depth"],"深度",zn.defaults.depth),new L([this,"interpolation"],"插值",zn.defaults.interpolation),new L([this,"opacity"],"透明度",zn.defaults.opacity),new Q([this,"sideImage"],"侧面图片",zn.defaults.sideImage),new Q([this,"bottomImage"],"底面图片",zn.defaults.bottomImage)]}}};f(zn,"createDefaultProps",()=>({...Vt.createDefaultProps(),depth:100,sideImage:p.reactJson({url:tt.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:p.reactJson({url:tt.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0})),f(zn,"type",zn.register("ESPit",zn,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let Yo=zn;const ma=class ma extends Yo{constructor(e){super(e);f(this,"_excavate",this.dv(new uu));f(this,"_pit",this.dv(new Yo));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:r,_pit:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([i,"points"],[this,"points"])),this.d(p.track([r,"points"],[this,"points"])),this.d(p.track([i,"pointed"],[this,"pointed"])),this.d(p.track([r,"pointed"],[this,"pointed"])),this.d(p.track([i,"pointStyle"],[this,"pointStyle"])),this.d(p.track([r,"pointStyle"],[this,"pointStyle"])),this.d(p.track([i,"stroked"],[this,"stroked"])),this.d(p.track([r,"stroked"],[this,"stroked"])),this.d(p.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([r,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([i,"filled"],[this,"filled"])),this.d(p.track([i,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"targetID"],[this,"targetID"])),this.d(p.track([i,"depth"],[this,"depth"])),this.d(p.track([i,"sideImage"],[this,"sideImage"])),this.d(p.track([i,"bottomImage"],[this,"bottomImage"])),this.d(p.track([i,"opacity"],[this,"opacity"])),this.d(p.track([i,"interpolation"],[this,"interpolation"])),this.d(p.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt([this,"mode"],uu.modes,"模式","in"),new ut([this,"targetID"],"瓦片图层","")]}}};f(ma,"createDefaultProps",()=>({...Yo.createDefaultProps(),mode:"in",targetID:""})),f(ma,"type",ma.register("ESHole",ma,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let Ah=ma;const Rh={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},e0=async(n,t,e,r)=>{try{const i=window.localStorage.getItem("Authorization");let s=n+`${Rh.layerconfigfind}?tileServiceName=${t}`;e&&(s+=`&earthdstoken=${encodeURIComponent(r)}`);const o={headers:{...!e&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},r0=async(n,t,e,r,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=n+Rh.layerconfigsave;const a=i??{};e&&(o+=`?earthdstoken=${encodeURIComponent(r)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(a)})},c=await(await fetch(o,u)).text();return JSON.parse(c)}catch(s){console.error(s)}},n0=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},i0=async(n,t,e,r,i)=>{try{const s={tileServiceName:t,featureId:e},o=window.localStorage.getItem("Authorization");let a=n+Rh.featureproperty;r&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const l=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!r&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),c=JSON.parse(l);if(c.status=="ok")return c.data;console.error(c.data.status);return}catch(s){console.error(s)}},va=class va extends on{constructor(e){super(e);f(this,"_es3DTileset",this.dv(new on));f(this,"_ids",this.dv(p.reactJson([])));f(this,"_useEarthDSToken",this.dv(p.react(!1)));f(this,"_earthdstoken",this.dv(p.react("")));f(this,"_visJson",this.disposeVar(p.react({})));f(this,"_highlightInner3DtilesetEvent",this.dv(new V));f(this,"_removeHighlightInner3DtilesetEvent",this.dv(new V));f(this,"_tilesetServePort",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{r.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,r){var i;if((i=this.layerConfig)!=null&&i.length){const s={};s[r[0].value]=r[0].visable,this.visJson={...this.visJson,...s}}else this.setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}async getFeatureProperty(e){return await i0(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const e=await e0(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await r0(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,r){var a,u,l;const i=await e.pick(r),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(l=i==null?void 0:i.sceneObject)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await n0(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Q([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};f(va,"createDefaultProps",()=>({...on.createDefaultProps(),layerConfig:p.reactJsonWithUndefined([])})),f(va,"type",va.register("ESRtsTileset",va,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Fh=va;function s0(n){return typeof n=="number"&&!isNaN(n)}const ya=class ya extends on{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation}}set json(t){this._innerSetJson(t)}async init(t,e){this.featureId=e;const r=await t.getFeatureProperty(e);this.uiShowprops=r.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:s0(a.value)?Number(a.value.toFixed(3)):""}))})),this.datasetName=r.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:t}),t.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}constructor(t){super(t)}};f(ya,"createDefaultProps",()=>({...on.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:p.reactJson({}),changeMaterial:p.reactJsonWithUndefined(void 0),uiShowprops:p.reactJson({}),props:p.reactJson({})})),f(ya,"type",ya.register("ESRtsFeatureEditing",ya,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let kh=ya;const o0=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},yu=class yu extends on{constructor(e){super(e);f(this,"_es3DTileset",this.dv(new on));f(this,"_tilesetServePort",this.dv(p.react("")));f(this,"_useEarthDSToken",this.dv(p.react(!1)));f(this,"_earthdstoken",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getport(){const e=await o0(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};f(yu,"type",yu.register("ESMsTileset",yu,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let Vh=yu;const pg={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:`
|
|
355
355
|
## 参数类型为 ESPoiType[]
|
|
356
356
|
\`\`\`js
|
|
357
357
|
type Vector2D = [number, number]
|
|
@@ -364,7 +364,7 @@ ${ig}
|
|
|
364
364
|
hiddenDistance: number
|
|
365
365
|
}
|
|
366
366
|
\`\`\`
|
|
367
|
-
`},Qs=class Qs extends kt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([],"通用"),new Q([this,"url"],"路径"),new Q([this,"poiTypes"],Qs.defaults.poiTypes,og.sampleValue),new L([this,"heightOffset"])]}}};f(Qs,"createDefaultProps",()=>({...kt.createDefaultProps(),url:"",poiTypes:d.reactJsonWithUndefined(og.defaultValue),heightOffset:40})),f(Qs,"type",Qs.register("ESPoiTileset",Qs,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let Rh=Qs;const ha=class ha extends tt{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([],"通用","通用"),new q([this,"show"],"是否显示"),new mt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new ve([this,"cssPosition"],"位置")]}}};f(ha,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),f(ha,"type",ha.register("ESScale",ha,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Fh=ha;const ci=class ci extends zt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new L([this,"height"],"高度",ci.defaults.height,!0),new L([this,"extrudedHeight"],"拉伸高度",ci.defaults.extrudedHeight,!0),new q([this,"perPositionHeight"],"应用每个位置高度",ci.defaults.perPositionHeight,!0)]}}};f(ci,"createDefaultProps",()=>({...zt.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),f(ci,"type",ci.register("ESGeoExtrudedPolygon",ci,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),f(ci,"supportEditingModes",[...zt.supportEditingModes,$.HeightModify]);let nu=ci;const $s=class $s extends zt{constructor(e){super(e);f(this,"_classification",this.dv(new al));f(this,"_geoExtrudedPolygon",this.dv(new nu));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:r,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(d.track([r,"collision"],[this,"collision"])),this.d(d.track([i,"collision"],[this,"collision"])),this.d(d.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(d.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(d.bind([i,"points"],[this,"points"])),this.d(d.bind([i,"extrudedHeight"],[this,"height"])),this.d(d.bind([r,"fillColor"],[this,"overheightColor"])),this.d(d.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const l=a.map(c=>[c[0],c[1],o]);r.points=l,r.height=u-o,u-o<=0?r.show=!1:r.show=this.show&&this.filled};s(),this.d(_a([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;r.show=o&&a,i.show=o&&a};s(),this.d(_a([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"maxHeight"],"最高高度",200),new Et([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Et([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};f($s,"createDefaultProps",()=>({...zt.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),f($s,"type",$s.register("ESHeightLimitAnalysis",$s,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),f($s,"supportEditingModes",[...zt.supportEditingModes,$.HeightModify]);let kh=$s;const zn=class zn extends kt{constructor(e){super(e);f(this,"_widgetEvent",this.dv(new V));f(this,"_data",this.dv(d.react(void 0)));{const r=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:sg(this.url)?this.data=JSON.parse(this.url):fetch(tt.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};r(),this.d(this.urlChanged.don(r))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Q([this,"url"],"地址",zn.defaults.url),new L([this,"pixelRange"],"集合范围",zn.defaults.pixelRange),new L([this,"minimumClusterSize"],"最小数量",zn.defaults.minimumClusterSize),new mt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...e.more,new Q([this,"style"],"style",zn.defaults.style),new q([this,"perspective"],"透视效果",zn.defaults.perspective)]}}};f(zn,"createDefaultProps",()=>({...kt.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:d.reactJsonWithUndefined({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"None",perspective:!1})),f(zn,"type",zn.register("ESEntityCluster",zn,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let Vh=zn;class iu extends J{constructor(){super();f(this,"_player",this.disposeVar(new pn));const e=this._player;{const r=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};r(),this.d(this.startTimeChanged.don(r)),this.d(this.stopTimeChanged.don(r))}this.d(d.bind([e,"playing"],[this,"playing"])),this.d(d.bind([e,"loop"],[this,"loop"])),this.d(d.bind([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const r=this.currentTime-this.startTime;e.currentTime=d.clamp(r,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(n=>{n.createDefaultProps=()=>({...tt.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(iu||(iu={})),d.extendClassProps(iu.prototype,iu.createDefaultProps);const fa=class fa extends tt{constructor(e){super(e);f(this,"_absolutePlayer",this.dv(new iu));const r=this.absolutePlayer;this.d(d.bind([r,"currentTime"],[this,"currentTime"])),this.d(d.bind([r,"startTime"],[this,"startTime"])),this.d(d.bind([r,"stopTime"],[this,"stopTime"])),this.d(d.bind([r,"playing"],[this,"playing"])),this.d(d.bind([r,"loop"],[this,"loop"])),this.d(d.bind([r,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new pu([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new ys([this,"currentTime"],"currentTime"),new ys([this,"startTime"]),new ys([this,"stopTime"]),new q([this,"playing"]),new q([this,"loop"]),new L([this,"speed"])]}}};f(fa,"createDefaultProps",()=>({...tt.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),f(fa,"type",fa.register("ESPlayer",fa,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let su=fa;function ag(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<r;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],o=e[i][1],a=qn(s),u=qn(o),l=d.Vector.distance(a,u);if(l===0){e[i][2]=e[i-1][2];continue}const c=Pa(s,o),h=o[2]-s[2],p=Math.asin(h/l)*180/Math.PI,v=Number.isFinite(c)?c:0,w=Number.isFinite(p)?p:0;e[i][2]=[v,w,0]}return(e[0][2]===void 0||t)&&(e[0][2]=r>1?e[1][2]:void 0),e}function ug(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=r-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],o=e[i+1][1],a=qn(s),u=qn(o),l=d.Vector.distance(a,u);if(l===0){e[i][2]=e[i+1][2];continue}const c=Pa(s,o),h=o[2]-s[2],p=Math.asin(h/l)*180/Math.PI,v=Number.isFinite(c)?c:0,w=Number.isFinite(p)?p:0;e[i][2]=[v,w,0]}return(e[r-1][2]===void 0||t)&&(e[r-1][2]=r>1?e[r-2][2]:[0,0,0]),e}function Y_(n,t=!1){const e=ag(n,t),r=ug(n,t);if(e.length!==r.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const o=e[s][2],a=r[s][2];o===void 0&&a===void 0?e[s][2]=void 0:o===void 0?e[s][2]=a:a===void 0?e[s][2]=o:e[s][2]=Nl(o,a,.5)}return e}function H_(n,t,e){let i;if(!n.timePosRots)return;const s=[],o=n.timePosRots.length;if(!(o<=2)){s.push(n.timePosRots[0]);for(let a=1;a<o-1;++a){const u=n.timePosRots[a-1][0],l=n.timePosRots[a][0],c=n.timePosRots[a+1][0],h=n.accumDistances[a-1],p=n.accumDistances[a],v=n.accumDistances[a+1],w=p-h;if(w!==0){const P=w-(i??(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5);let O=(P<0?0:P)/w;Number.isNaN(O)&&(O=0);const m=(1-O)*u+O*l,_=n.getCurrent(m);_&&s.push([m,_.position,_.rotation])}e&&s.push(n.timePosRots[a]);const I=v-p;if(I!==0){let P=(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5;const O=(t.length==1?t[0]:t[a]||t[t.length-1])*.5||0;P+O>I?(P=I*(P/(P+O)),i=I-P):i=void 0;let m=(P<0?0:P)/I;const _=(1-m)*l+m*c,g=n.getCurrent(_);g&&s.push([_,g.position,g.rotation])}}s.push(n.timePosRots[o-1]),n.timePosRots=s}}function lg(n,t){if(t<0)return[void 0,0];if(t>n.length-1)return[void 0,n.length-1];const e=[...n].slice(0,t+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const r=t-e;return[n[r][2],r]}function cg(n,t){if(t<0)return[void 0,0];if(t>=n.length)return[void 0,n.length-1];const e=n.slice(t).findIndex(([,,i])=>i!==void 0),r=e===-1?n.length-1:t+e;return[n[r][2],r]}function J_(n,t,e="Lerp"){let r,i,s,o;if(n.length!==0){if(t<=n[0][0])r=n[0][1],i=n[0][2],s=0,o=0;else if(t>=n[n.length-1][0]){const[u,l,c]=n[n.length-1];r=l,i=c,s=n.length-2,o=1}else{const u=n.findIndex(([l])=>t<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,c]=n[s],[h,p]=n[u],v=(t-l)/(h-l),w=Sc(c),I=Sc(p),P=d.Vector.lerp(w,I,v);r=Tf(P),o=v}{let[l,c]=lg(n,s),[h,p]=cg(n,u);if(e==="Lerp")if(l&&h){if(c<0||p>=n.length)throw new Error("Invalid rotation index");const v=(t-n[c][0])/(n[p][0]-n[c][0]);i=Nl(l,h,v)}else l?i=l:h?i=h:i=void 0;else e==="Prev"?l&&(i=l):e==="Next"&&h&&(i=h)}}return{position:r,rotation:i,index:s,ratio:o}}}function B_(n){try{const t=JSON.parse(n);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",r=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&r?t:void 0}throw new Error("解析有问题")}catch{const e=n.split(/\n|\r\n/),r=[],i=e.length;for(let s=0;s<i;++s){const o=e[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?r.push([a[0],[a[1],a[2],a[3]],void 0]):r.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return r}}function j_(n,t,e){const{timePosRots:r}=n;if(!r)throw new Error("!timePosRots");if(r.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,r[0][0]),e=Math.min(e,r[r.length-1][0]);const i=n.getCurrent(t),s=n.getCurrent(e);if(!i||!s)return;const o=[];i.ratio<1&&o.push([t,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(r[a]);return s.ratio>0&&o.push([e,s.position,s.rotation]),o}const Z_=`
|
|
367
|
+
`},ro=class ro extends Ft{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([],"通用"),new Q([this,"url"],"路径"),new Q([this,"poiTypes"],ro.defaults.poiTypes,pg.sampleValue),new L([this,"heightOffset"])]}}};f(ro,"createDefaultProps",()=>({...Ft.createDefaultProps(),url:"",poiTypes:p.reactJsonWithUndefined(pg.defaultValue),heightOffset:40})),f(ro,"type",ro.register("ESPoiTileset",ro,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let zh=ro;const _a=class _a extends tt{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([],"通用","通用"),new q([this,"show"],"是否显示"),new mt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new ve([this,"cssPosition"],"位置")]}}};f(_a,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),f(_a,"type",_a.register("ESScale",_a,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Uh=_a;const hi=class hi extends Vt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new L([this,"height"],"高度",hi.defaults.height,!0),new L([this,"extrudedHeight"],"拉伸高度",hi.defaults.extrudedHeight,!0),new q([this,"perPositionHeight"],"应用每个位置高度",hi.defaults.perPositionHeight,!0)]}}};f(hi,"createDefaultProps",()=>({...Vt.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),f(hi,"type",hi.register("ESGeoExtrudedPolygon",hi,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),f(hi,"supportEditingModes",[...Vt.supportEditingModes,$.HeightModify]);let Ws=hi;const no=class no extends Vt{constructor(e){super(e);f(this,"_classification",this.dv(new gl));f(this,"_geoExtrudedPolygon",this.dv(new Ws));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:r,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([i,"points"],[this,"points"])),this.d(p.bind([i,"extrudedHeight"],[this,"height"])),this.d(p.bind([r,"fillColor"],[this,"overheightColor"])),this.d(p.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const l=a.map(c=>[c[0],c[1],o]);r.points=l,r.height=u-o,u-o<=0?r.show=!1:r.show=this.show&&this.filled};s(),this.d(uo([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;r.show=o&&a,i.show=o&&a};s(),this.d(uo([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"maxHeight"],"最高高度",200),new Et([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Et([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};f(no,"createDefaultProps",()=>({...Vt.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),f(no,"type",no.register("ESHeightLimitAnalysis",no,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),f(no,"supportEditingModes",[...Vt.supportEditingModes,$.HeightModify]);let Gh=no;const Un=class Un extends Ft{constructor(e){super(e);f(this,"_widgetEvent",this.dv(new V));f(this,"_data",this.dv(p.react(void 0)));{const r=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:dg(this.url)?this.data=JSON.parse(this.url):fetch(tt.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};r(),this.d(this.urlChanged.don(r))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Q([this,"url"],"地址",Un.defaults.url),new L([this,"pixelRange"],"集合范围",Un.defaults.pixelRange),new L([this,"minimumClusterSize"],"最小数量",Un.defaults.minimumClusterSize),new mt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...e.more,new Q([this,"style"],"style",Un.defaults.style),new q([this,"perspective"],"透视效果",Un.defaults.perspective)]}}};f(Un,"createDefaultProps",()=>({...Ft.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:p.reactJsonWithUndefined({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"None",perspective:!1})),f(Un,"type",Un.register("ESEntityCluster",Un,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let Wh=Un;class fu extends H{constructor(){super();f(this,"_player",this.disposeVar(new gn));const e=this._player;{const r=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};r(),this.d(this.startTimeChanged.don(r)),this.d(this.stopTimeChanged.don(r))}this.d(p.bind([e,"playing"],[this,"playing"])),this.d(p.bind([e,"loop"],[this,"loop"])),this.d(p.bind([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const r=this.currentTime-this.startTime;e.currentTime=p.clamp(r,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(n=>{n.createDefaultProps=()=>({...tt.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(fu||(fu={})),p.extendClassProps(fu.prototype,fu.createDefaultProps);const wa=class wa extends tt{constructor(e){super(e);f(this,"_absolutePlayer",this.dv(new fu));const r=this.absolutePlayer;this.d(p.bind([r,"currentTime"],[this,"currentTime"])),this.d(p.bind([r,"startTime"],[this,"startTime"])),this.d(p.bind([r,"stopTime"],[this,"stopTime"])),this.d(p.bind([r,"playing"],[this,"playing"])),this.d(p.bind([r,"loop"],[this,"loop"])),this.d(p.bind([r,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Eu([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new ws([this,"currentTime"],"currentTime"),new ws([this,"startTime"]),new ws([this,"stopTime"]),new q([this,"playing"]),new q([this,"loop"]),new L([this,"speed"])]}}};f(wa,"createDefaultProps",()=>({...tt.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),f(wa,"type",wa.register("ESPlayer",wa,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let Jo=wa;function gg(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<r;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],o=e[i][1],a=Xn(s),u=Xn(o),l=p.Vector.distance(a,u);if(l===0){e[i][2]=e[i-1][2];continue}const c=La(s,o),h=o[2]-s[2],d=Math.asin(h/l)*180/Math.PI,g=Number.isFinite(c)?c:0,y=Number.isFinite(d)?d:0;e[i][2]=[g,y,0]}return(e[0][2]===void 0||t)&&(e[0][2]=r>1?e[1][2]:void 0),e}function mg(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=r-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],o=e[i+1][1],a=Xn(s),u=Xn(o),l=p.Vector.distance(a,u);if(l===0){e[i][2]=e[i+1][2];continue}const c=La(s,o),h=o[2]-s[2],d=Math.asin(h/l)*180/Math.PI,g=Number.isFinite(c)?c:0,y=Number.isFinite(d)?d:0;e[i][2]=[g,y,0]}return(e[r-1][2]===void 0||t)&&(e[r-1][2]=r>1?e[r-2][2]:[0,0,0]),e}function a0(n,t=!1){const e=gg(n,t),r=mg(n,t);if(e.length!==r.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const o=e[s][2],a=r[s][2];o===void 0&&a===void 0?e[s][2]=void 0:o===void 0?e[s][2]=a:a===void 0?e[s][2]=o:e[s][2]=zl(o,a,.5)}return e}function u0(n,t,e){let i;if(!n.timePosRots)return;const s=[],o=n.timePosRots.length;if(!(o<=2)){s.push(n.timePosRots[0]);for(let a=1;a<o-1;++a){const u=n.timePosRots[a-1][0],l=n.timePosRots[a][0],c=n.timePosRots[a+1][0],h=n.accumDistances[a-1],d=n.accumDistances[a],g=n.accumDistances[a+1],y=d-h;if(y!==0){const P=y-(i??(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5);let T=(P<0?0:P)/y;Number.isNaN(T)&&(T=0);const v=(1-T)*u+T*l,w=n.getCurrent(v);w&&s.push([v,w.position,w.rotation])}e&&s.push(n.timePosRots[a]);const C=g-d;if(C!==0){let P=(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5;const T=(t.length==1?t[0]:t[a]||t[t.length-1])*.5||0;P+T>C?(P=C*(P/(P+T)),i=C-P):i=void 0;let v=(P<0?0:P)/C;const w=(1-v)*l+v*c,m=n.getCurrent(w);m&&s.push([w,m.position,m.rotation])}}s.push(n.timePosRots[o-1]),n.timePosRots=s}}function vg(n,t){if(t<0)return[void 0,0];if(t>n.length-1)return[void 0,n.length-1];const e=[...n].slice(0,t+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const r=t-e;return[n[r][2],r]}function yg(n,t){if(t<0)return[void 0,0];if(t>=n.length)return[void 0,n.length-1];const e=n.slice(t).findIndex(([,,i])=>i!==void 0),r=e===-1?n.length-1:t+e;return[n[r][2],r]}function l0(n,t,e="Lerp"){let r,i,s,o;if(n.length!==0){if(t<=n[0][0])r=n[0][1],i=n[0][2],s=0,o=0;else if(t>=n[n.length-1][0]){const[u,l,c]=n[n.length-1];r=l,i=c,s=n.length-2,o=1}else{const u=n.findIndex(([l])=>t<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,c]=n[s],[h,d]=n[u],g=(t-l)/(h-l),y=Ac(c),C=Ac(d),P=p.Vector.lerp(y,C,g);r=Rf(P),o=g}{let[l,c]=vg(n,s),[h,d]=yg(n,u);if(e==="Lerp")if(l&&h){if(c<0||d>=n.length)throw new Error("Invalid rotation index");const g=(t-n[c][0])/(n[d][0]-n[c][0]);i=zl(l,h,g)}else l?i=l:h?i=h:i=void 0;else e==="Prev"?l&&(i=l):e==="Next"&&h&&(i=h)}}return{position:r,rotation:i,index:s,ratio:o}}}function c0(n){try{const t=JSON.parse(n);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",r=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&r?t:void 0}throw new Error("解析有问题")}catch{const e=n.split(/\n|\r\n/),r=[],i=e.length;for(let s=0;s<i;++s){const o=e[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?r.push([a[0],[a[1],a[2],a[3]],void 0]):r.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return r}}function h0(n,t,e){const{timePosRots:r}=n;if(!r)throw new Error("!timePosRots");if(r.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,r[0][0]),e=Math.min(e,r[r.length-1][0]);const i=n.getCurrent(t),s=n.getCurrent(e);if(!i||!s)return;const o=[];i.ratio<1&&o.push([t,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(r[a]);return s.ratio>0&&o.push([e,s.position,s.rotation]),o}const f0=`
|
|
368
368
|
timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
|
|
369
369
|
\`\`\`
|
|
370
370
|
[
|
|
@@ -409,7 +409,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
409
409
|
]
|
|
410
410
|
]
|
|
411
411
|
\`\`\`
|
|
412
|
-
`,lr=class lr extends J{constructor(e,r){super();f(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});f(this,"_currentInfo",this.disposeVar(d.react(void 0,(e,r)=>!1)));f(this,"_player");f(this,"_flyToEvent",this.disposeVar(new V));f(this,"_accumDistancesChanged",this.disposeVar(new V));f(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));f(this,"_accumDistancesDirty",!1);f(this,"_accumDistances",[]);f(this,"_getCurrentFunc",this.disposeVar(d.react(void 0)));this._player=this.disposeVar(new pn);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:o,position:a,rotation:u,ratio:l}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=u,this._scratchCurrentInfo.ratio=l,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(d.bind([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(d.bind([this._player,"duration"],[this,"duration"])),this.dispose(d.bind([this._player,"playing"],[this,"playing"])),this.dispose(d.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(d.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const u=o.length;for(let l=0;l<u;++l){const c=o[l][0];if(c<0)console.warn("地理路径的时间戳不能小于0!");else if(c<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${l} time: ${c}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(d.createProcessingFromAsyncFunc(async o=>{if(!this.dataUri)return;await o.promise(d.sleep(1e3));const a=await o.promise(fetch(this.dataUri)),u=await o.promise(a.text());this.timePosRots=lr.parseData(u)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=lr.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)return this._accumDistances=[],this._accumDistances;{const e=this.timePosRots.length;let r=0;const i=[];let s=qn(this.timePosRots[0][1]);i.push(r);for(let o=1;o<e;++o){const a=qn(this.timePosRots[o][1]),u=d.Vector.distance(a,s);s=a,r+=u,i.push(r)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&J_(this.timePosRots,e,this.rotLerpMode)}subPath(e,r){return this.timePosRots&&j_(this,e,r)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=lr.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=lr.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=lr.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,r){H_(this,e,r)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};f(lr,"computeRotIfUndefinedUsingPrevLine",ag),f(lr,"computeRotIfUndefinedUsingNextLine",ug),f(lr,"computeRotIfUndefinedUsingLerp",Y_),f(lr,"getLeftRotation",lg),f(lr,"getRightRotation",cg),f(lr,"parseData",B_),f(lr,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),f(lr,"timePosRotsMd",Z_);let ss=lr;(n=>{n.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:d.reactDeepArrayWithUndefined(void 0,(t,e)=>t[0]===e[0]&&t[1].every((r,i)=>r===e[1][i])&&t[2]===e[2]===void 0||t[2]!==void 0&&e[2]!==void 0&&t[2].every((r,i)=>e[2][i]),t=>[t[0],[...t[1]],t[2]&&[...t[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:d.reactArray([1,1,1,1]),hasDash:!1,gapColor:d.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})})(ss||(ss={})),d.extendClassProps(ss.prototype,ss.createDefaultProps);const da=class da extends is{constructor(e){super(e);f(this,"_path");f(this,"_currentPositionChanged",this.disposeVar(new V));f(this,"_currentRotationChanged",this.disposeVar(new V));f(this,"_currentChanged",this.disposeVar(new V));f(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new ss),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const r=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,o=this.points.length,a=Math.min(s,o),u=[];for(let l=0;l<a;++l)u.push([this.timeStamps[l],this.points[l]]);this._path.timePosRots=u,this.rotationRadius.some(l=>l>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.disposeVar(d.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));r(),this.dispose(i.disposableOn(r))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[so(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new vf([this,"timeStamps"],"时间序列",[],!0),new L([this,"speed"],"线条流速",1),new mt([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new Q([this,"rotationRadius"],"拐弯半径")],more:[...e.more,new Ue([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};f(da,"createDefaultProps",()=>({...wt.createDefaultProps(),timeStamps:d.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:d.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})),f(da,"type",da.register("ESPath",da,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let ou=da;const ds=class ds extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([]),new q([this,"textEditingInteraction"],"文本编辑交互"),new q([this,"textEditing"],"文本编辑"),new L([this,"width"],"宽度",ds.defaults.width,!0),new Pl([this,"text"],"内容",ds.defaults.text,void 0,!0),new dn([this,"originRatioAndOffset"],"原点比例和偏移"),new L([this,"opacity"],"透明度"),new L([this,"fontSize"],"字体大小"),new Et([this,"color"],"字体颜色"),new Et([this,"backgroundColor"],"背景颜色"),new dn([this,"padding"],"内边距"),new dn([this,"borderRadius"],"边框圆角"),new Et([this,"borderColor"],"边框颜色"),new L([this,"borderWidth"],"边框宽度"),new mt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new mt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};f(ds,"createDefaultProps",()=>({...et.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:d.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:d.reactArray([1,1,1,1]),backgroundColor:d.reactArray([0,0,0,.8]),padding:d.reactArray([5,5,5,5]),borderRadius:d.reactArray([6,6,6,6]),borderWidth:0,borderColor:d.reactArray([1,1,1,1]),borderStyle:"solid"})),f(ds,"type",ds.register("ESGeoDivTextPoi",ds,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let zh=ds;const pa=class pa extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"color"],"颜色",[1,1,0,1])]}}};f(pa,"createDefaultProps",()=>({...et.createDefaultProps(),color:d.reactArray([1,1,0,1])})),f(pa,"type",pa.register("ESCityBasePoint",pa,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let Uh=pa;const K_=[{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]}}],Q_=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
|
|
412
|
+
`,cr=class cr extends H{constructor(e,r){super();f(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});f(this,"_currentInfo",this.disposeVar(p.react(void 0,(e,r)=>!1)));f(this,"_player");f(this,"_flyToEvent",this.disposeVar(new V));f(this,"_accumDistancesChanged",this.disposeVar(new V));f(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));f(this,"_accumDistancesDirty",!1);f(this,"_accumDistances",[]);f(this,"_getCurrentFunc",this.disposeVar(p.react(void 0)));this._player=this.disposeVar(new gn);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:o,position:a,rotation:u,ratio:l}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=u,this._scratchCurrentInfo.ratio=l,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(p.bind([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(p.bind([this._player,"duration"],[this,"duration"])),this.dispose(p.bind([this._player,"playing"],[this,"playing"])),this.dispose(p.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(p.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const u=o.length;for(let l=0;l<u;++l){const c=o[l][0];if(c<0)console.warn("地理路径的时间戳不能小于0!");else if(c<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${l} time: ${c}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(p.createProcessingFromAsyncFunc(async o=>{if(!this.dataUri)return;await o.promise(p.sleep(1e3));const a=await o.promise(fetch(this.dataUri)),u=await o.promise(a.text());this.timePosRots=cr.parseData(u)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=cr.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)return this._accumDistances=[],this._accumDistances;{const e=this.timePosRots.length;let r=0;const i=[];let s=Xn(this.timePosRots[0][1]);i.push(r);for(let o=1;o<e;++o){const a=Xn(this.timePosRots[o][1]),u=p.Vector.distance(a,s);s=a,r+=u,i.push(r)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&l0(this.timePosRots,e,this.rotLerpMode)}subPath(e,r){return this.timePosRots&&h0(this,e,r)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=cr.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=cr.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=cr.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,r){u0(this,e,r)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};f(cr,"computeRotIfUndefinedUsingPrevLine",gg),f(cr,"computeRotIfUndefinedUsingNextLine",mg),f(cr,"computeRotIfUndefinedUsingLerp",a0),f(cr,"getLeftRotation",vg),f(cr,"getRightRotation",yg),f(cr,"parseData",c0),f(cr,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),f(cr,"timePosRotsMd",f0);let as=cr;(n=>{n.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:p.reactDeepArrayWithUndefined(void 0,(t,e)=>t[0]===e[0]&&t[1].every((r,i)=>r===e[1][i])&&t[2]===e[2]===void 0||t[2]!==void 0&&e[2]!==void 0&&t[2].every((r,i)=>e[2][i]),t=>[t[0],[...t[1]],t[2]&&[...t[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:p.reactArray([1,1,1,1]),hasDash:!1,gapColor:p.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(as||(as={})),p.extendClassProps(as.prototype,as.createDefaultProps);const Ea=class Ea extends Mi{constructor(e){super(e);f(this,"_path");f(this,"_currentPositionChanged",this.disposeVar(new V));f(this,"_currentRotationChanged",this.disposeVar(new V));f(this,"_currentChanged",this.disposeVar(new V));f(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);f(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new as),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const r=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,o=this.points.length,a=Math.min(s,o),u=[];for(let l=0;l<a;++l)u.push([this.timeStamps[l],this.points[l]]);this._path.timePosRots=u,this.rotationRadius.some(l=>l>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.disposeVar(p.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));r(),this.dispose(i.disposableOn(r))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[co(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new If([this,"timeStamps"],"时间序列",[],!0),new L([this,"speed"],"线条流速",1),new mt([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new Q([this,"rotationRadius"],"拐弯半径")],more:[...e.more,new Ge([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};f(Ea,"createDefaultProps",()=>({...wt.createDefaultProps(),timeStamps:p.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:p.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})),f(Ea,"type",Ea.register("ESPath",Ea,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let Bo=Ea;const gs=class gs extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([]),new q([this,"textEditingInteraction"],"文本编辑交互"),new q([this,"textEditing"],"文本编辑"),new L([this,"width"],"宽度",gs.defaults.width,!0),new kl([this,"text"],"内容",gs.defaults.text,void 0,!0),new pn([this,"originRatioAndOffset"],"原点比例和偏移"),new L([this,"opacity"],"透明度"),new L([this,"fontSize"],"字体大小"),new Et([this,"color"],"字体颜色"),new Et([this,"backgroundColor"],"背景颜色"),new pn([this,"padding"],"内边距"),new pn([this,"borderRadius"],"边框圆角"),new Et([this,"borderColor"],"边框颜色"),new L([this,"borderWidth"],"边框宽度"),new mt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new mt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};f(gs,"createDefaultProps",()=>({...et.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:p.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:p.reactArray([1,1,1,1]),backgroundColor:p.reactArray([0,0,0,.8]),padding:p.reactArray([5,5,5,5]),borderRadius:p.reactArray([6,6,6,6]),borderWidth:0,borderColor:p.reactArray([1,1,1,1]),borderStyle:"solid"})),f(gs,"type",gs.register("ESGeoDivTextPoi",gs,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let qh=gs;const Sa=class Sa extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Et([this,"color"],"颜色",[1,1,0,1])]}}};f(Sa,"createDefaultProps",()=>({...et.createDefaultProps(),color:p.reactArray([1,1,0,1])})),f(Sa,"type",Sa.register("ESCityBasePoint",Sa,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let Xh=Sa;const d0=[{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]}}],p0=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
|
|
413
413
|
\`\`\`
|
|
414
414
|
[{
|
|
415
415
|
"id": "document",
|
|
@@ -464,7 +464,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
464
464
|
}
|
|
465
465
|
}]
|
|
466
466
|
\`\`\`
|
|
467
|
-
`,
|
|
467
|
+
`,_g=`(dataSource) => {
|
|
468
468
|
var entities = dataSource.entities.values;
|
|
469
469
|
|
|
470
470
|
for (var i = 0; i < entities.length; i++) {
|
|
@@ -479,12 +479,12 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
|
|
482
|
+
`,g0=`data 路径都可以使用下面回调函数
|
|
483
483
|
\`\`\`
|
|
484
|
-
${
|
|
484
|
+
${_g}
|
|
485
485
|
\`\`\`
|
|
486
486
|
|
|
487
|
-
`,au=Date.now();new Date(au).toISOString(),new Date(au+24*60*60*1e3).toISOString();const Un=class Un extends tt{constructor(e){super(e);f(this,"_flyToEvent",this.disposeVar(new V));f(this,"_resetClockEvent",this.disposeVar(new V))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new Q([this,"data"],Un.defaults.data,Q_,"数据",!0),new Q([this,"uri"],"路径",""),new q([this,"clockEnabled"],"启用",!1),new L([this,"multiplier"],"倍速",Un.defaults.multiplier),new q([this,"autoResetClock"],"自动设置时钟",!0),new ys([this,"startTime"],"开始时间",Un.defaults.startTime,!0),new ys([this,"stopTime"],"结束时间",Un.defaults.stopTime,!0),new ys([this,"currentTime"],"当前时间",Un.defaults.currentTime,!0),new mt([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new mt([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new q([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new q([this,"show"],"是否显示",!0),new q([this,"collision"],"开启碰撞",!1),new q([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new st(["number"],r=>this.flyTo(r),[1e3],"飞入"),new st([],()=>this.resetClock(),[],"重设时钟"),new Vi([this,"loadFuncStr"],"loadFnStr",hg,$_,!0)]}}};f(Un,"createDefaultProps",()=>({show:!0,uri:"${earthsdk3-assets-script-dir}/assets/misc/simple.czml",allowPicking:!1,data:d.reactJsonWithUndefined(K_),autoResetClock:!0,clockEnabled:!1,startTime:au,stopTime:au+24*60*60*1e3,currentTime:au,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...tt.createDefaultProps()})),f(Un,"type",Un.register("ESCzml",Un,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let Gh=Un;const ga=class ga extends tt{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([]),new q([this,"show"],"是否显示"),new L([this,"cssSize"],"尺寸"),new ve([this,"cssPosition"],"位置"),new wa([this,"imgUrl"],"图片地址")]}}};f(ga,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:tt.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),f(ga,"type",ga.register("ESNavigator",ga,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let Wh=ga;const hi=class hi extends tt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([],"通用","通用"),new q([this,"show"],"是否显示",hi.defaults.show),new L([this,"height"],"高度",hi.defaults.height,!0),new L([this,"fontSize"],"文字大小",hi.defaults.fontSize,!0),new Et([this,"bgColor"],"背景颜色",hi.defaults.bgColor,!0)]}}};f(hi,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:d.reactArray([71/255,71/255,71/255,.8])})),f(hi,"type",hi.register("ESViewerStatusBar",hi,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let qh=hi;const fi=class fi extends tt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([],"通用","通用"),new q([this,"show"],"是否显示",fi.defaults.show),new L([this,"height"],"高度",fi.defaults.height,!0),new L([this,"fontSize"],"文字大小",fi.defaults.fontSize,!0),new Et([this,"bgColor"],"背景颜色",fi.defaults.bgColor,!0)]}}};f(fi,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:d.reactArray([71/255,71/255,71/255,.8])})),f(fi,"type",fi.register("ESViewerStatusBarScale",fi,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let Xh=fi;const ma=class ma extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ut([this,"url"],"路径","",!0),new L([this,"progress"],"进度",0,!1,!0)]}}};f(ma,"createDefaultProps",()=>({...et.createDefaultProps(),url:"",progress:0})),f(ma,"type",ma.register("ESGaussianSplatting",ma,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let Yh=ma;const to=class to extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ut([this,"mesh"],"mesh地址",to.defaults.mesh)]}}};f(to,"createDefaultProps",()=>({...et.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),f(to,"type",to.register("ESStaticMesh",to,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let Hh=to;const va=class va extends wt{constructor(e){super(e);f(this,"_startEvent",this.dv(new V));f(this,"_clearEvent",this.dv(new V));f(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new nu),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(d.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new st([],()=>this.start(),[],"开始分析"),new st([],()=>this.clear(),[],"清除分析"),new Q([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new Q([this,"depths"],"深度值",[],void 0,!1,!0),new L([this,"radius"],"半径",1e4,!0)]}}};f(va,"createDefaultProps",()=>({...wt.createDefaultProps(),windowPositions:bc([]),depths:d.reactArrayWithUndefined([]),radius:d.react(1e4)})),f(va,"type",va.register("ESSkylineAnalysis",va,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let Jh=va;const Ri=class Ri extends kt{constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new Q([this,"data"],"数据",[],void 0,!0),new Q([this,"gradient"],"渐变",Ri.defaults.gradient,void 0,!0),new L([this,"radius"],"半径",Ri.defaults.radius,void 0,!0),new L([this,"blur"],"模糊",Ri.defaults.blur,!0),new q([this,"is3D"],"is3D",!1,!0)]}}};f(Ri,"createDefaultProps",()=>({...kt.createDefaultProps(),is3D:d.react(!1),data:d.reactPositions([]),gradient:d.reactJsonWithUndefined({".5":"green",".7":"yellow",".95":"red"}),radius:d.react(10),blur:d.react(.85)})),f(Ri,"type",Ri.register("ESHeatMap",Ri,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let Bh=Ri;const eo=class eo extends wt{constructor(e){super(e);f(this,"editingBindMode","scatter")}};f(eo,"createDefaultProps",()=>({...wt.createDefaultProps(),pointed:!0})),f(eo,"type",eo.register("ESGeoPoints",eo,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),f(eo,"supportEditingModes",[...wt.supportEditingModes,$.ScatterAppend,$.ScatterModify]);let jh=eo;function fg(n){return typeof n=="string"?document.getElementById(n):n}function Zh(n){if(!n)throw new Error("container is not defined");n.innerHTML="";const t=document.createElement("div");return t.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",n.appendChild(t),t}class dg extends J{constructor(e,r){super();f(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=r;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let u of o){const l=i.get(u);l&&(l.destroy(),i.delete(u))}if(a)for(let u of a){if(i.get(u)){console.warn(`listeningSceneObjects已存在某对象:${u.name}`,u);debugger}const c=this.createSceneObjectListeningFunc(u);c&&i.set(u,c)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class t0 extends J{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class r extends J{constructor(s){super(),this._esPath=s,this.dv(new d.ObjResettingWithEvent(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class a extends J{constructor(l){if(super(),this._esPath=l,!o)throw new Error("!viewer");const c=()=>{const h=e.activeViewer;h&&(this._esPath.path.currentTime=h.simulationTime)};c(),this.d(o.simulationTimeChanged.don(c))}}return new a(this._esPath)}))}}this.dv(new dg(e.sceneObjectsManager,i=>{if(i instanceof ou)return new r(i)}))}{const e=this._esObjectsManager;class r extends J{constructor(s){super();const o=()=>{const a=e.activeViewer;a&&(a.simulationTime=s.currentTime??0)};o(),this.d(s.currentTimeChanged.don(o))}}this.dv(new dg(e.sceneObjectsManager,i=>{if(i instanceof su)return new r(i)}))}}}class e0 extends J{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...r])})})),this.d(e.path.currentRotationChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...r])})}))})}}class r0 extends J{constructor(e){super();f(this,"_player");f(this,"_channels",this.dv(d.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new d.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const r=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],o=tt.getSceneObjById(s.pathId);if(!o||!(o instanceof ou))continue;const u=s.sceneObjectIds.map(l=>tt.getSceneObjById(l)).filter(l=>l!==void 0);u.length!==0&&r.push({path:o,sceneObjects:u})}if(r.length!==0)return new e0(r)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function hl(n){if(n.data){const{type:t,value:e}=n.data;if(t==="UITreeA"&&e instanceof Be){const{sceneObject:r}=e;if(r)return r.id}}}function n0(n,t){const{property:e,customEventName:r,otherParams:i}=t,{dragstartDataMananger:s}=n;if(!(e instanceof io)){if(!(e instanceof gf)){if(e instanceof ut){const[o,a]=d.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;hl(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const l=hl(s);l!==void 0&&a(l)}}else if(e instanceof cf){const[o,a]=d.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;hl(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");const u=i[0].$event,l=i[0].strinsPropDom,c=i[0].index;u.preventDefault();const h=hl(s);if(h!==void 0){l[c].firstChild.value=h;const p=new Event("input",{bubbles:!0,cancelable:!0});l[c].firstChild.dispatchEvent(p)}}}else if(e instanceof hf){const[o,a]=d.getReactFuncs(e.reactVar)}}}}function pg(n,t,e,r){if(e)r.currentActiveEditing=[n,t];else if(r.currentActiveEditing){const[i,s]=r.currentActiveEditing;i===n&&s===t&&(e||(r.currentActiveEditing=void 0))}}const i0=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class s0 extends J{constructor(t,e){super(),this._sceneObject=t;const r=this._sceneObject;for(let i of i0){const s=i+"Changed",o=r[s];if(o){{const a=r[i];pg(r,i,a,e)}this.dispose(o.disposableOn(a=>pg(r,i,a,e)))}}}get sceneObject(){return this._sceneObject}}class o0 extends J{constructor(){super();f(this,"_currentActiveEditing",this.disposeVar(d.reactArrayWithUndefined(void 0)));f(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,r)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),r){const[i,s]=r;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),tt.context.sceneObjCreatedEvent.don(e=>{e.dv(new s0(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class a0 extends J{constructor(){super();f(this,"_sceneObjects",new Set);f(this,"_sceneObjectsToChange",this.dv(new V));this.d(()=>{const e=d.length(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){return this._sceneObjects.has(e)?(console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e),!0)}deleteSceneObject(e){return this._sceneObjects.has(e)?(this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e),!0):(console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(e,r){const i=tt.context.createSceneObject(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,r){const i=tt.context.createSceneObjectFromClass(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const r=tt.context.createSceneObjectFromJson(e);return r&&this.addSceneObject(r),r}}function gg(n,t){return n.length===t.length&&n.every((e,r)=>e===t[r])}class u0 extends J{constructor(t){super(),this._viewer=t,this.d(d.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class l0 extends J{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const r=Ln.createCommonProps(),i=[];Object.keys(r).forEach(u=>{const l=this._activeViewer[u+"Changed"];i.push(l)});const s=this.dv(d.createNextAnimateFrameEvent(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(r).forEach(u=>{this._viewer[u]=this._activeViewer[u]})};this.d(s.don(o));const a=this.dv(d.createAnimateFrame());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const u=this._activeViewer.getCurrentCameraInfo(),l=this._viewer.getCurrentCameraInfo();if(!u)return;const{position:c,rotation:h}=u;l&&gg(c,l.position)&&gg(h,l.rotation)||this._viewer.flyIn(c,h,0)}),this.d(()=>a.cancel())}}const c0=`<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">
|
|
487
|
+
`,du=Date.now();new Date(du).toISOString(),new Date(du+24*60*60*1e3).toISOString();const Gn=class Gn extends tt{constructor(e){super(e);f(this,"_flyToEvent",this.disposeVar(new V));f(this,"_resetClockEvent",this.disposeVar(new V))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new Q([this,"data"],Gn.defaults.data,p0,"数据",!0),new Q([this,"uri"],"路径",""),new q([this,"clockEnabled"],"启用",!1),new L([this,"multiplier"],"倍速",Gn.defaults.multiplier),new q([this,"autoResetClock"],"自动设置时钟",!0),new ws([this,"startTime"],"开始时间",Gn.defaults.startTime,!0),new ws([this,"stopTime"],"结束时间",Gn.defaults.stopTime,!0),new ws([this,"currentTime"],"当前时间",Gn.defaults.currentTime,!0),new mt([this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"clockStep","SYSTEM_CLOCK_MULTIPLIER"),new mt([this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"clockRange","UNBOUNDED"),new q([this,"shouldAnimate"],"是否启用动画",!1)],general:[...e.general,new q([this,"show"],"是否显示",!0),new q([this,"collision"],"开启碰撞",!1),new q([this,"allowPicking"],"允许拾取",!1)],more:[...e.more,new st(["number"],r=>this.flyTo(r),[1e3],"飞入"),new st([],()=>this.resetClock(),[],"重设时钟"),new Ui([this,"loadFuncStr"],"loadFnStr",_g,g0,!0)]}}};f(Gn,"createDefaultProps",()=>({show:!0,uri:"${earthsdk3-assets-script-dir}/assets/misc/simple.czml",allowPicking:!1,data:p.reactJsonWithUndefined(d0),autoResetClock:!0,clockEnabled:!1,startTime:du,stopTime:du+24*60*60*1e3,currentTime:du,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...tt.createDefaultProps()})),f(Gn,"type",Gn.register("ESCzml",Gn,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"}));let Hh=Gn;const Ca=class Ca extends tt{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([]),new q([this,"show"],"是否显示"),new L([this,"cssSize"],"尺寸"),new ve([this,"cssPosition"],"位置"),new Ta([this,"imgUrl"],"图片地址")]}}};f(Ca,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:tt.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")})),f(Ca,"type",Ca.register("ESNavigator",Ca,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"}));let Yh=Ca;const fi=class fi extends tt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([],"通用","通用"),new q([this,"show"],"是否显示",fi.defaults.show),new L([this,"height"],"高度",fi.defaults.height,!0),new L([this,"fontSize"],"文字大小",fi.defaults.fontSize,!0),new Et([this,"bgColor"],"背景颜色",fi.defaults.bgColor,!0)]}}};f(fi,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:p.reactArray([71/255,71/255,71/255,.8])})),f(fi,"type",fi.register("ESViewerStatusBar",fi,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let Jh=fi;const di=class di extends tt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new it([],"通用","通用"),new q([this,"show"],"是否显示",di.defaults.show),new L([this,"height"],"高度",di.defaults.height,!0),new L([this,"fontSize"],"文字大小",di.defaults.fontSize,!0),new Et([this,"bgColor"],"背景颜色",di.defaults.bgColor,!0)]}}};f(di,"createDefaultProps",()=>({...tt.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:p.reactArray([71/255,71/255,71/255,.8])})),f(di,"type",di.register("ESViewerStatusBarScale",di,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"}));let Bh=di;const Ia=class Ia extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ut([this,"url"],"路径","",!0),new L([this,"progress"],"进度",0,!1,!0)]}}};f(Ia,"createDefaultProps",()=>({...et.createDefaultProps(),url:"",progress:0})),f(Ia,"type",Ia.register("ESGaussianSplatting",Ia,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"}));let jh=Ia;const io=class io extends et{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ut([this,"mesh"],"mesh地址",io.defaults.mesh)]}}};f(io,"createDefaultProps",()=>({...et.createDefaultProps(),mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"})),f(io,"type",io.register("ESStaticMesh",io,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"}));let Zh=io;const Pa=class Pa extends wt{constructor(e){super(e);f(this,"_startEvent",this.dv(new V));f(this,"_clearEvent",this.dv(new V));f(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Ws),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(p.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(p.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new st([],()=>this.start(),[],"开始分析"),new st([],()=>this.clear(),[],"清除分析"),new Q([this,"windowPositions"],"屏幕坐标",[],void 0,!1,!0),new Q([this,"depths"],"深度值",[],void 0,!1,!0),new L([this,"radius"],"半径",1e4,!0)]}}};f(Pa,"createDefaultProps",()=>({...wt.createDefaultProps(),windowPositions:Vc([]),depths:p.reactArrayWithUndefined([]),radius:p.react(1e4)})),f(Pa,"type",Pa.register("ESSkylineAnalysis",Pa,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"}));let Kh=Pa;const ki=class ki extends Ft{constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new Q([this,"data"],"数据",[],void 0,!0),new Q([this,"gradient"],"渐变",ki.defaults.gradient,void 0,!0),new L([this,"radius"],"半径",ki.defaults.radius,void 0,!0),new L([this,"blur"],"模糊",ki.defaults.blur,!0),new q([this,"is3D"],"is3D",!1,!0)]}}};f(ki,"createDefaultProps",()=>({...Ft.createDefaultProps(),is3D:p.react(!1),data:p.reactPositions([]),gradient:p.reactJsonWithUndefined({".5":"green",".7":"yellow",".95":"red"}),radius:p.react(10),blur:p.react(.85)})),f(ki,"type",ki.register("ESHeatMap",ki,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"}));let Cl=ki;const so=class so extends wt{constructor(e){super(e);f(this,"editingBindMode","scatter")}};f(so,"createDefaultProps",()=>({...wt.createDefaultProps(),pointed:!0})),f(so,"type",so.register("ESGeoPoints",so,{chsName:"地理点集合",tags:["ESObjects","_ES_Impl_Cesium"],description:"地图中的可视化地理点集合"})),f(so,"supportEditingModes",[...wt.supportEditingModes,$.ScatterAppend,$.ScatterModify]);let pu=so;const wg=async(n,t=[],e)=>{const r=[];for(const i of t){const{coordinates:s}=i.geometry;for(const o of s){const a=await Promise.all(o.map(async u=>{let l=u[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const c=await n.getTerrainHeight([u[0],u[1]])??0;l=(e.height??l)+c}else e.type==="terrain"&&(l=await n.getTerrainHeight([u[0],u[1]])??0);return[u[0],u[1],l]}));r.push({...i,points:a})}}return r},Eg=async(n,t=[],e)=>await Promise.all(t.map(async r=>{var u,l,c,h,d,g,y,C,P;const i=((u=r.geometry)==null?void 0:u.x)??((c=(l=r.geometry)==null?void 0:l.coordinates)==null?void 0:c[0]),s=((h=r.geometry)==null?void 0:h.y)??((g=(d=r.geometry)==null?void 0:d.coordinates)==null?void 0:g[1]);let a=((y=r.geometry)==null?void 0:y.z)??((P=(C=r.geometry)==null?void 0:C.coordinates)==null?void 0:P[2])??0;if(e)if(e.type==="absolute")a=e.height??a;else if(e.type==="relative"){const T=await n.getTerrainHeight([i,s])??0;a=(e.height??a)+T}else e.type==="terrain"&&(a=await n.getTerrainHeight([i,s])??0);return{...r,points:[i,s,a]}})),Sg=async(n,t=[],e)=>{const r=[];return await Promise.all(t.map(async i=>{const{coordinates:s}=i.geometry;await Promise.all(s.map(async o=>{const a=await Promise.all(o.map(async u=>{let l=u[2]??0;if(e)if(e.type==="absolute")l=e.height??l;else if(e.type==="relative"){const c=await n.getTerrainHeight([u[0],u[1]])??0;l=(e.height??l)+c}else e.type==="terrain"&&(l=await n.getTerrainHeight([u[0],u[1]])??0);return[u[0],u[1],l]}));r.push({...i,points:a})}))})),r};function m0(n){const t=Me.lineString(n),e=Me.length(t),r=Me.along(t,e/2);return[r.geometry.coordinates[0],r.geometry.coordinates[1],r.geometry.coordinates[2]||0]}function v0(n,t){const e=Me.lineString(n),r=Me.length(e),i=Math.floor(r/t),s=[];if(s.push(n[0]),i<1)return[n[0]];for(let o=1;o<i;o+=1){const a=Me.along(e,r*(o/i));s.push([a.geometry.coordinates[0],a.geometry.coordinates[1],a.geometry.coordinates[2]||0])}return s}function y0(n){const t=[...n];JSON.stringify(n[0])!==JSON.stringify(n[n.length-1])&&t.push(n[0]);const e=Me.polygon([t]),r=Me.center(e);return[r.geometry.coordinates[0],r.geometry.coordinates[1],r.geometry.coordinates[2]||0]}function Cg(n,t,e){const r=n.dv(new Ho);for(const i in e)i!=="type"&&(r[i]=e[i]);r.position=t,n.d(n.components.disposableAdd(r))}function Qh(n,t,e,r){let i=r.textTemplate||r.symbol.text||"";const s=/{{(.*?)}}/;for(;s.test(i);){const c=i.match(s);if(c){const h=c[1].trim(),d=e[`${h}`]||"-";i=i.replace(c[0],d)}}let o=r.symbol;const{minVisibleDistance:a,maxVisibleDistance:u}=r;a&&u&&(o={...o,minVisibleDistance:a,maxVisibleDistance:u});const l={...o,text:i};Cg(n,t,l)}function jo(n,t){const e={width:null,height:null,color:null,opacity:null,rotation:null};return t.forEach(r=>{r.type==="size"?r.axis==="width"?e.width=n[r.field]||null:r.axis==="height"&&(e.height=n[r.field]||null):r.type==="color"?e.color=n[r.field]||null:r.type==="opacity"?e.opacity=n[r.field]||null:r.type==="rotation"&&(e.rotation=n[r.field]||null)}),e}function $h(n,t,e){const i={...t.symbol};if(e&&e.length>0){const s=jo(n,e);for(let o in s)i[o]!==void 0&&s[o]!==null&&(i[o]=s[o])}return i}function tf(n,t,e){var l,c;const r=t,{uniqueValueInfos:i,field:s,fieldDelimiter:o,defaultSymbol:a}=r;let u={...a};if(Array.isArray(s)){const d=s.map(g=>n[g]??"").join(o);u=((l=i.find(g=>g.value==d))==null?void 0:l.symbol)||a}else u=((c=i.find(h=>h.value==n[s]))==null?void 0:c.symbol)||a;if(e&&e.length>0){const h=jo(n,e);for(let d in h)u[d]!==void 0&&h[d]!==null&&(u[d]=h[d])}return u}function ef(n,t,e){const r=t,{classBreakInfos:i,field:s,defaultSymbol:o}=r;let a=o;const u=n[s];if(u===void 0||typeof u!="number")a=o;else{const l=i.find(c=>u<=c.maxValue&&u>=c.minValue);l?a=l.symbol:a=o}if(e&&e.length>0){const l=jo(n,e);for(let c in l)a[c]!==void 0&&l[c]!==null&&(a[c]=l[c])}return a}function _0(n,t){function e(l,c,h,d){const g=_=>_*Math.PI/180,y=_=>_*180/Math.PI,C=g(l),P=g(h),T=g(d-c),v=Math.sin(T)*Math.cos(P),w=Math.cos(C)*Math.sin(P)-Math.sin(C)*Math.cos(P)*Math.cos(T),m=Math.atan2(v,w);return(y(m)+360)%360}function r(l,c,h,d,g){const C=I=>I*Math.PI/180,P=I=>I*180/Math.PI,T=d/6371e3,v=C(g),w=C(l),m=C(c),_=Math.asin(Math.sin(w)*Math.cos(T)+Math.cos(w)*Math.sin(T)*Math.cos(v)),E=m+Math.atan2(Math.sin(v)*Math.sin(T)*Math.cos(w),Math.cos(T)-Math.sin(w)*Math.sin(_));return{lat:P(_),lng:P(E),alt:h}}function i(l){const c=[];l.length>1&&c.push(e(l[0].lat,l[0].lng,l[1].lat,l[1].lng));for(let h=1;h<l.length-1;h++){const d=e(l[h-1].lat,l[h-1].lng,l[h].lat,l[h].lng),g=e(l[h].lat,l[h].lng,l[h+1].lat,l[h+1].lng);let y=(d+g)/2;Math.abs(d-g)>180&&(y=(y+180)%360),c.push(y)}return l.length>1&&c.push(e(l[l.length-2].lat,l[l.length-2].lng,l[l.length-1].lat,l[l.length-1].lng)),l.length===1&&c.push(0),c}if(!n||n.length<2)throw new Error("至少需要两个点才能生成路径");if(t<=0)throw new Error("宽度必须大于0");const s=t/2,o=i(n),a=[],u=[];for(let l=0;l<n.length;l++){const c=(o[l]+90)%360,h=(o[l]+270)%360,d=n[l].alt!==void 0?n[l].alt:0;a.push(r(n[l].lat,n[l].lng,d,s,c)),u.push(r(n[l].lat,n[l].lng,d,s,h))}return a.concat(u.reverse())}function w0(n,t,e,r){function i(C){return C*(Math.PI/180)}const s=6378137,o=i(n),a=i(t),u=i(e),l=i(r),c=u-o,h=l-a,d=Math.sin(c/2)**2+Math.cos(o)*Math.cos(u)*Math.sin(h/2)**2,g=2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d));return s*g}const Ig=(n,t,e)=>Array.isArray(t)?t.map(s=>n[s]??"").join(e):n[t]??"";function Pg(n,t){const r={...t.symbol};return{points:n.map(i=>i.points),symbol:r}}function bg(n,t){const e=t,{uniqueValueInfos:r,field:i,fieldDelimiter:s,defaultSymbol:o}=e,a=[],u=r.reduce((c,h)=>{const d=h.value.toString();return c[d]={points:[],value:h.value,symbol:h.symbol},c},{});for(let c=0;c<n.length;c++){const h=n[c],d=Ig(h,i,s);if(d!==void 0&&d!==""){const g=u[d.toString()];g?g.points.push(h.points):a.push(h.points)}else a.push(h.points)}const l=[];for(let c in u){const{points:h,symbol:d}=u[c];h.length>0&&l.push({points:h,symbol:d})}return a.length>0&&l.push({points:a,symbol:o}),l}function Ng(n,t){const e=t,{classBreakInfos:r,field:i,defaultSymbol:s}=e,o=[],a=r.map(l=>({...l,points:[]}));for(let l=0;l<n.length;l++){const c=n[l],h=c[i];if(h===void 0||typeof h!="number")o.push(c.points);else{const d=a.findIndex(g=>h<=g.maxValue&&h>=g.minValue);d!==-1?a[d].points.push(c.points):o.push(c.points)}}const u=[];return a.forEach(l=>{l.points.length>0&&u.push({points:l.points,symbol:l.symbol})}),o.length>0&&u.push({points:o,symbol:s}),u}function E0(n,t,e=[]){const i={...t.symbol},s=n.map(o=>{const a=jo(o,e);return{position:o.points,rotation:a.rotation||i.rotation||[0,0,0],scale:i.scale||[1,1,1]}});return{url:i.url,locations:s}}function S0(n,t,e=[]){const r=t,{uniqueValueInfos:i,field:s,fieldDelimiter:o}=r,a=r.defaultSymbol,u=[],l=i.reduce((h,d)=>{const g=d.value.toString();return h[g]={locations:[],value:d.value,symbol:d.symbol},h},{});for(let h=0;h<n.length;h++){const d=n[h],g=Ig(d,s,o);if(g){const y=l[g.toString()];if(y){const C=jo(d,e);y.locations.push({position:d.points,rotation:C.rotation||a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else u.push({position:d.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}else u.push({position:d.points,rotation:a.rotation||[0,0,0],scale:a.scale||[1,1,1]})}const c=[];for(let h in l){const{locations:d,symbol:g}=l[h];d.length>0&&c.push({url:g.url,locations:d})}return u.length>0&&c.push({url:a.url,locations:u}),c}function C0(n,t,e=[]){const r=t,{classBreakInfos:i,field:s}=r,o=r.defaultSymbol,a=[],u=i.map(c=>({...c,locations:[]}));for(let c=0;c<n.length;c++){const h=n[c],d=h[s];if(d===void 0||typeof d!="number")a.push({position:h.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]});else{const g=u.findIndex(y=>d<=y.maxValue&&d>=y.minValue);if(g!==-1){const y=jo(h,e);u[g].locations.push({position:h.points,rotation:y.rotation||o.rotation||[0,0,0],scale:u[g].symbol.scale||[1,1,1]})}else a.push({position:h.points,rotation:o.rotation||[0,0,0],scale:o.scale||[1,1,1]})}}const l=[];return u.forEach(c=>{c.locations.length>0&&l.push({url:c.symbol.url,locations:c.locations})}),a.length>0&&l.push({url:o.url,locations:a}),l}class I0 extends H{constructor(e,r,i,s){super();f(this,"labelingInfo");this.sceneObject=e;const o=r;if(s&&p.forEach(o,a=>{this.renderLabel(a,s)}),i)if(i.type==="simple"){const{visualVariables:a}=i;if(i.symbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!");const u=Pg(o,i);this._simplePointAllRender(u.points,u.symbol);return}if(i.symbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!");const u=Pg(o,i);this._imageAllRender(u.points,u.symbol);return}if(i.symbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!");const{url:u,locations:l}=E0(o,i,a);this._modelAllRender(u,l);return}for(let u=0;u<o.length;u++){const l=$h(o[u],i,a);this.render(o[u],l)}}else if(i.type==="unique-value"){const{visualVariables:a}=i;if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),bg(o,i).forEach(({points:d,symbol:g})=>{this._simplePointAllRender(d,g)});return}if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),bg(o,i).forEach(({points:d,symbol:g})=>{this._imageAllRender(d,g)});return}if(i.uniqueValueInfos.findIndex(h=>h.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),S0(o,i,a).forEach(({url:d,locations:g})=>{this._modelAllRender(d,g)});return}for(let h=0;h<o.length;h++){const d=tf(o[h],i,a);this.render(o[h],d)}}else if(i.type==="class-breaks"){const{visualVariables:a}=i;if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="simple-point")===-1&&i.defaultSymbol.type==="simple-point"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染!"),Ng(o,i).forEach(({points:d,symbol:g})=>{this._simplePointAllRender(d,g)});return}if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="ESImageLabel")===-1&&i.defaultSymbol.type==="ESImageLabel"&&(!a||a.length==0)){console.log("PointLayer:大批量点渲染成图标!"),Ng(o,i).forEach(({points:d,symbol:g})=>{this._imageAllRender(d,g)});return}if(i.classBreakInfos.findIndex(h=>h.symbol.type!=="ESGltfModel")===-1&&i.defaultSymbol.type==="ESGltfModel"){console.log("PointLayer:大批量点渲染成gltf!"),C0(o,i,a).forEach(({url:d,locations:g})=>{this._modelAllRender(d,g)});return}for(let h=0;h<o.length;h++){const d=ef(o[h],i,a);this.render(o[h],d)}}else if(i.type==="heatmap"){const{field:a,fieldValueMax:u,fieldValueMin:l}=i;console.time();const c=o.map(h=>{const{points:d}=h;if(a&&typeof a=="string"){let g=h[a];typeof g=="number"&&(typeof u=="number"&&g>u&&(g=u),typeof l=="number"&&g<l&&(g=l),d[2]=g)}return d});this.renderHeatmap(c,i)}else console.error("PointLayer: renderer type is not supported")}renderLabel(e,r){const{points:i}=e;Qh(this.sceneObject,i,e,r)}renderHeatmap(e,r){const{is3D:i,radius:s,blur:o,gradient:a}=r,u=this.dv(new Cl);this.d(this.sceneObject.components.disposableAdd(u)),u.is3D=i,u.radius=s,u.blur=o,a&&(u.gradient={...a}),u.data=e}render(e,r){r.type==="simple-point"?this._simplePointRender(e,r):r.type==="ESImageLabel"?this._simpleImageRender(e,r):r.type==="ESGltfModel"?this._simpleModelRender(e,r):r.type==="ESTextLabel"?Cg(this.sceneObject,e.points,r):r.type==="ESParticleSystemPrimitive"?this._simpleParticleRender(e,r):console.error(" PointLayer: symbol type is not supported")}_simplePointRender(e,r){const{points:i}=e,{size:s,color:o,outlineColor:a,outlineWidth:u}=r,l=this.dv(new pu);this.d(this.sceneObject.components.disposableAdd(l)),l.pointed=!0,l.pointOutlineColor=a,l.pointOutlineWidth=u,l.pointSize=s,l.pointColor=o,l.allowPicking=(r==null?void 0:r.allowPicking)??!0,l.extras={selected:!1},l.points=[i]}_simplePointAllRender(e,r){const{size:i,color:s,outlineColor:o,outlineWidth:a}=r,u=this.dv(new pu);this.d(this.sceneObject.components.disposableAdd(u)),u.pointed=!0,u.pointOutlineColor=o,u.pointOutlineWidth=a,u.pointSize=i,u.pointColor=s,u.allowPicking=(r==null?void 0:r.allowPicking)??!0,u.points=[...e]}_simpleImageRender(e,r){const{points:i}=e,{rotation:s,offset:o,size:a,url:u,screenRender:l,anchor:c,renderMode:h,rotationType:d}=r,g=this.dv(new vl),y=this.dv(new Ho);this.d(this.sceneObject.components.disposableAdd(g)),this.d(this.sceneObject.components.disposableAdd(y)),g.url=u,g.renderMode=h??0,s&&(g.rotation=s),o&&(g.offset=o),g.size=a||[32,32],c&&(g.anchor=c),d&&(g.rotationType=d),g.screenRender=l??!0,g.allowPicking=(r==null?void 0:r.allowPicking)??!0,g.extras={selected:!1},g.position=[...i],g.sizeByContent=!1,y.allowPicking=(r==null?void 0:r.allowPicking)??!0;const C=a?Math.max(...a)+10:Math.max(...g.size)+10;y.sizeByContent=!1,y.screenRender=!0,y.size=[C,C],y.borderRadius=[C,C,C,C],y.padding=[C/2,C/2,C/2,C/2],y.borderWidth=C/10,y.offset=[0,C/10+5],y.text="",y.backgroundColor=[0,0,0,0],y.borderColor=[0,0,0,0]}_imageAllRender(e,r){const i={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:e}}]},s=this.dv(new cu);this.d(this.sceneObject.components.disposableAdd(s));const o=this.dv(new Ho);this.d(this.sceneObject.components.disposableAdd(o)),s.textDefaultText="";const{offset:a,size:u,url:l,anchor:c}=r;s.imageUrl=l,c&&(s.imageAnchor=c),a&&(s.imageOffset=a),s.imageSize=u||[32,32],s.url=i,s.allowPicking=(r==null?void 0:r.allowPicking)??!0,s.extras={selected:!1},o.allowPicking=!0;const h=u?Math.max(...u)+10:Math.max(...s.imageSize)+10;o.sizeByContent=!1,o.size=[h,h],o.borderRadius=[h,h,h,h],o.padding=[h/2,h/2,h/2,h/2],o.borderWidth=h/10,o.offset=[0,h/10+5],o.text="",o.backgroundColor=[0,0,0,0],o.borderColor=[0,0,0,0]}_simpleModelRender(e,r){const{points:i}=e,{rotation:s,scale:o,url:a}=r,u=this.dv(new os);this.d(this.sceneObject.components.disposableAdd(u)),u.url=a,s&&(u.rotation=s),o&&(u.scale=o),u.position=[...i]}_modelAllRender(e,r){const i=this.dv(new os);this.d(this.sceneObject.components.disposableAdd(i)),i.url=e,i.instances=r}_simpleParticleRender(e,r){const{points:i}=e,s=this.dv(new yl);this.d(this.sceneObject.components.disposableAdd(s)),s.position=[...i],Object.keys(r).forEach(o=>{s[o]=r[o]})}}class P0 extends H{constructor(t,e,r,i){super(),this.sceneObject=t;const s=e;if(i&&p.forEach(s,o=>{this.renderLabel(o,i)}),r)if(r.type==="simple"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=$h(a,r,o);this.render(a,u)})}else if(r.type==="unique-value"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=tf(a,r,o);this.render(a,u)})}else if(r.type==="class-breaks"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=ef(a,r,o);this.render(a,u)})}else console.error("PolyLineLayer: renderer type is not supported")}render(t,e){console.log("PolyLineLayer: render",t,e),e.type==="simple-line"?this._simpleLineRender(t,e):e.type==="ESPolygonFence"?this._esPolygonFenceRender(t,e):e.type==="ESPipeFence"?this._esPipeFenceRender(t,e):e.type==="ESPath"?this._esPathRender(t,e):e.type==="ESlineInterpolationModel"?this._eslineInterpolationModelRender(t,e):e.type==="ESlineWall"?this._eslineWallRender(t,e):console.error("PolyLineLayer: symbol type is not supported")}_simpleLineRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new Mi);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.stroked=!0,i.strokeColor=e.color,i.strokeWidth=e.width||1,i.allowPicking=(e==null?void 0:e.allowPicking)??!0,i.extras={selected:!1}}_esPolygonFenceRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new Sl);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.height=e.height,i.materialMode=e.materialMode}_esPipeFenceRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new El);this.d(this.sceneObject.components.disposableAdd(i)),i.points=[...r],i.height=e.height,i.width=e.width,i.materialMode=e.materialMode}_esPathRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=this.dv(new Bo),s=this.dv(new Jo);if(this.d(this.sceneObject.components.disposableAdd(i)),this.d(this.sceneObject.components.disposableAdd(s)),i.points=[...r],i.speed=e.speed,i.strokeColor=e.color,i.materialMode=e.materialMode,i.strokeWidth=e.width||1,e!=null&&e.runModel){const a=e==null?void 0:e.runSpeed,u=e==null?void 0:e.modelSymbol;let l;switch(e==null?void 0:e.runModel){case"ESHuman":l=this.dv(new Gs);break;case"ESCar":l=this.dv(new pl);break;case"ESGltfModel":l=this.dv(new os)}if(this.d(this.sceneObject.components.disposableAdd(l)),u)for(let h in u)l[h]=u[h];const c=[0];for(var o=0;o<r.length-1;o+=1){const h=r[o],d=r[o+1],g=w0(h[1],h[0],d[1],d[0]);c.push(c[o]+Math.ceil(g/a)*1e3)}i.timeStamps=c,e!=null&&e.runSpeed&&(i.currentPositionChanged.don(h=>{i.currentPosition&&(l.position=i.currentPosition,i.currentRotation&&(l.rotation=i.currentRotation))}),s.startTime=0,s.stopTime=c[c.length-1],s.playing=!0,s.loop=(e==null?void 0:e.runLoop)??!0,s.currentTimeChanged.don(h=>{i.path.currentTime=h}))}}_eslineInterpolationModelRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=(e==null?void 0:e.interpolationDistance)??0;if(!i)return;const s=v0(r,i/1e3),o=this.dv(new os);this.d(this.sceneObject.components.disposableAdd(o)),o.url=e.url,o.instances=s.map(a=>({position:a,rotation:e.rotation,scale:e.scale}))}_eslineWallRender(t,e){const{points:r}=t;if(r.length<2){console.warn("PolyLineLayer: points length is less than 3");return}const i=e.height??0,s=e.width??0,o=e.extrudedHeight??0,a=r.map(c=>({lng:(c==null?void 0:c[0])??0,lat:(c==null?void 0:c[1])??0,alt:(c==null?void 0:c[2])??0})),u=_0(a,s).map(c=>[(c==null?void 0:c.lng)??0,(c==null?void 0:c.lat)??0,(c==null?void 0:c.alt)??0]),l=this.dv(new Ws);this.d(this.sceneObject.components.disposableAdd(l)),l.height=i,l.extrudedHeight=o,l.filled=e.filled??!0,l.fillColor=e.fillColor,l.allowPicking=(e==null?void 0:e.allowPicking)??!0,l.extras={selected:!1},l.points=u}renderLabel(t,e){const{points:r}=t,i=m0(r);Qh(this.sceneObject,i,t,e)}}function Tg(n,t){try{JSON.stringify(n[n.length-1])!==JSON.stringify(n[0])&&n.push(n[0]);const e=Me.featureCollection(n.map(u=>Me.point(u))),r=Me.polygon([n]),i={gridType:"point",units:"meters"};return Me.interpolate(e,t,i).features.map(u=>u.geometry.coordinates)[0][0].filter(u=>Me.booleanPointInPolygon(Me.point(u),r))}catch(e){return console.error(e),[]}}class b0 extends H{constructor(t,e,r,i){super(),this.sceneObject=t;const s=e;if(i&&p.forEach(s,o=>{this.renderLabel(o,i)}),r)if(r.type==="simple"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=$h(a,r,o);this.render(a,u)})}else if(r.type==="unique-value"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=tf(a,r,o);this.render(a,u)})}else if(r.type==="class-breaks"){const{visualVariables:o}=r;p.forEach(s,a=>{const u=ef(a,r,o);this.render(a,u)})}else console.error("PolyLineLayer: renderer type is not supported")}renderLabel(t,e){const{points:r}=t;console.log("PolygonLayer: renderLabel",r);const i=y0(r);Qh(this.sceneObject,i,t,e)}render(t,e){e.type==="simple-fill"?this._simplePolygonRender(t,e):e.type==="ESGeoExtrudedPolygon"?this._esGeoExtrudedPolygonRender(t,e):e.type==="PolygonInterpolateESGltfModel"?this._polygonInterpolateESGltfModelRender(t,e):e.type==="PolygonInterpolateESImageLabel"?this._polygonInterpolateESImageLabelRender(t,e):console.error("PolyLineLayer: symbol type is not supported")}_simplePolygonRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{color:i,outline:s,filled:o,ground:a}=e,{width:u,color:l,stroked:c}=s,h=this.dv(new Vt);this.d(this.sceneObject.components.disposableAdd(h)),h.stroked=c??!1,h.strokeColor=l??[1,1,1,1],h.strokeWidth=u??1,h.filled=o??!0,h.fillGround=a??!1,h.fillColor=i??[1,1,1,1],h.allowPicking=(e==null?void 0:e.allowPicking)??!0,h.extras={selected:!1},h.points=[...r]}_esGeoExtrudedPolygonRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,extrudedHeight:s,color:o}=e,a=this.dv(new Ws);this.d(this.sceneObject.components.disposableAdd(a)),a.height=i,a.extrudedHeight=s,a.filled=!0,a.fillColor=o,a.allowPicking=(e==null?void 0:e.allowPicking)??!0,a.extras={selected:!1},a.points=[...r]}_polygonInterpolateESGltfModelRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:s,url:o,rotation:a,scale:u}=e,l=Tg(r,s??10),c=this.dv(new os);this.d(this.sceneObject.components.disposableAdd(c)),c.url=o,c.instances=l.map(h=>({position:[...h,i??0],rotation:a??[0,0,0],scale:u??[1,1,1]}))}_polygonInterpolateESImageLabelRender(t,e){const{points:r}=t;if(r.length<3){console.warn("PolygonLayer: points length is less than 3");return}const{height:i,interpolateDistance:s,offset:o,size:a,url:u,anchor:l}=e,h={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:[...Tg(r,s??10).map(g=>[...g,i??0])]}}]},d=this.dv(new cu);this.d(this.sceneObject.components.disposableAdd(d)),d.textDefaultText="",d.imageUrl=u,l&&(d.imageAnchor=l),o&&(d.imageOffset=o),a&&(d.imageSize=a),d.url=h}}class N0 extends H{constructor(e,r){super();f(this,"_initEvent",this.dv(new V));const i=this,s=async()=>{try{const a=e.featureProps;if(!a)return;const{heightMode:u,features:l,layerType:c,url:h}=a;let d=[];if(!l&&h){let g=await fetch(h).then(y=>y.json());return g=(g==null?void 0:g.features)??g,c==="polylineVector"?d=await wg(r,g,u):c==="polygonVector"?d=await Sg(r,g,u):c==="pointVector"&&(d=await Eg(r,g,u)),d}else c==="polylineVector"?d=await wg(r,l,u):c==="polygonVector"?d=await Sg(r,l,u):c==="pointVector"&&(d=await Eg(r,l,u));return d}catch(a){console.error(a);return}},o=this.dv(p.createNextAnimateFrameEvent(this._initEvent,e.featurePropsChanged));i.dv(new p.ObjResettingWithEvent(o,()=>{if(!e.featureProps)return;const a=e.featureProps;let u;return(async()=>{const{layerType:c,renderer:h,labelingInfo:d}=a,g=await s();!g||g.length===0||(c==="pointVector"?u=new I0(e,g,h,d):c==="polylineVector"?u=new P0(e,g,h,d):c==="polygonVector"&&(u=new b0(e,g,h,d)),console.log("polygonVectorLayer","createLayer",u))})().catch(console.error),{destroy:()=>{var c;(c=u==null?void 0:u.destroy)==null||c.call(u),u=void 0}}}));{const a=(u,l=1)=>{const c=Hp(u);if(!c)return;const{center:h,radius:d}=c;r.flyTo({distance:d*4,heading:0,pitch:-90,flyDuration:l??1,hDelta:0,pDelta:0},h)};i.d(e.flyToEvent.don(async u=>{const{featureProps:l}=e;if(!l)return;const c=await s();if(!c)return;let h=[];l.layerType==="polylineVector"?h=c.map(d=>d.points).flat():l.layerType==="polygonVector"?h=c.map(d=>d.points).flat():l.layerType==="pointVector"&&(h=c.map(d=>d.points)),h.length!==0&&a(h,u)}))}}init(){this._initEvent.emit()}}const ba=class ba extends Ft{constructor(e){super(e);f(this,"featureLayerMap",new Map);const r=this;r.d(r.viewerAttached.don(i=>{if(console.log("ESFeatureLayer","viewerAttached",i.id),r.featureLayerMap.has(i.id))return;const s=new N0(r,i);s.init(),r.featureLayerMap.set(i.id,s)})),r.d(r.viewerDetached.don(i=>{var s;console.log("ESFeatureLayer","viewerDetached",i.id),r.featureLayerMap.has(i.id)&&((s=r.featureLayerMap.get(i.id))==null||s.destroy(),r.featureLayerMap.delete(i.id))})),r.d(()=>{for(const i of r.featureLayerMap.values())i.destroy();r.featureLayerMap.clear()}),r.d(uo(r.showChanged,()=>{for(const i of r.components.values())Reflect.has(i,"show")&&(i.show=r.show)},{immediate:!0}))}};f(ba,"createDefaultProps",()=>({...Ft.createDefaultProps(),featureProps:p.reactJsonWithUndefined(void 0)})),f(ba,"type",ba.register("ESFeatureLayer",ba,{chsName:"矢量图层",tags:["ESObjects"],description:"ESFeatureLayer"}));let rf=ba;function Og(n){return typeof n=="string"?document.getElementById(n):n}function nf(n){if(!n)throw new Error("container is not defined");n.innerHTML="";const t=document.createElement("div");return t.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",n.appendChild(t),t}class xg extends H{constructor(e,r){super();f(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=r;const i=this._listeningSceneObjects,s=(o,a)=>{if(o)for(let u of o){const l=i.get(u);l&&(l.destroy(),i.delete(u))}if(a)for(let u of a){if(i.get(u)){console.warn(`listeningSceneObjects已存在某对象:${u.name}`,u);debugger}const c=this.createSceneObjectListeningFunc(u);c&&i.set(u,c)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let o of this._listeningSceneObjects.values())o.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class T0 extends H{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class r extends H{constructor(s){super(),this._esPath=s,this.dv(new p.ObjResettingWithEvent(e.activeViewerChanged,()=>{const o=e.activeViewer;if(!o)return;class a extends H{constructor(l){if(super(),this._esPath=l,!o)throw new Error("!viewer");const c=()=>{const h=e.activeViewer;h&&(this._esPath.path.currentTime=h.simulationTime)};c(),this.d(o.simulationTimeChanged.don(c))}}return new a(this._esPath)}))}}this.dv(new xg(e.sceneObjectsManager,i=>{if(i instanceof Bo)return new r(i)}))}{const e=this._esObjectsManager;class r extends H{constructor(s){super();const o=()=>{const a=e.activeViewer;a&&(a.simulationTime=s.currentTime??0)};o(),this.d(s.currentTimeChanged.don(o))}}this.dv(new xg(e.sceneObjectsManager,i=>{if(i instanceof Jo)return new r(i)}))}}}class O0 extends H{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...r])})})),this.d(e.path.currentRotationChanged.don(r=>{r&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...r])})}))})}}class x0 extends H{constructor(e){super();f(this,"_player");f(this,"_channels",this.dv(p.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new p.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const r=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],o=tt.getSceneObjById(s.pathId);if(!o||!(o instanceof Bo))continue;const u=s.sceneObjectIds.map(l=>tt.getSceneObjById(l)).filter(l=>l!==void 0);u.length!==0&&r.push({path:o,sceneObjects:u})}if(r.length!==0)return new O0(r)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function Il(n){if(n.data){const{type:t,value:e}=n.data;if(t==="UITreeA"&&e instanceof je){const{sceneObject:r}=e;if(r)return r.id}}}function D0(n,t){const{property:e,customEventName:r,otherParams:i}=t,{dragstartDataMananger:s}=n;if(!(e instanceof lo)){if(!(e instanceof Sf)){if(e instanceof ut){const[o,a]=p.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;Il(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const l=Il(s);l!==void 0&&a(l)}}else if(e instanceof vf){const[o,a]=p.getReactFuncs(e.reactVar);if(r==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const u=i[0];if(u.preventDefault(),!u.dataTransfer)return;Il(s)?u.dataTransfer.dropEffect="move":u.dataTransfer.dropEffect="none"}else if(r==="ondrop"){if(!i)throw new Error("!otherParams");const u=i[0].$event,l=i[0].strinsPropDom,c=i[0].index;u.preventDefault();const h=Il(s);if(h!==void 0){l[c].firstChild.value=h;const d=new Event("input",{bubbles:!0,cancelable:!0});l[c].firstChild.dispatchEvent(d)}}}else if(e instanceof yf){const[o,a]=p.getReactFuncs(e.reactVar)}}}}function Dg(n,t,e,r){if(e)r.currentActiveEditing=[n,t];else if(r.currentActiveEditing){const[i,s]=r.currentActiveEditing;i===n&&s===t&&(e||(r.currentActiveEditing=void 0))}}const M0=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class L0 extends H{constructor(t,e){super(),this._sceneObject=t;const r=this._sceneObject;for(let i of M0){const s=i+"Changed",o=r[s];if(o){{const a=r[i];Dg(r,i,a,e)}this.dispose(o.disposableOn(a=>Dg(r,i,a,e)))}}}get sceneObject(){return this._sceneObject}}class A0 extends H{constructor(){super();f(this,"_currentActiveEditing",this.disposeVar(p.reactArrayWithUndefined(void 0)));f(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,r)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),r){const[i,s]=r;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),tt.context.sceneObjCreatedEvent.don(e=>{e.dv(new L0(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class R0 extends H{constructor(){super();f(this,"_sceneObjects",new Set);f(this,"_sceneObjectsToChange",this.dv(new V));this.d(()=>{const e=p.length(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){return this._sceneObjects.has(e)?(console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1):(this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e),!0)}deleteSceneObject(e){return this._sceneObjects.has(e)?(this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e),!0):(console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1)}createSceneObject(e,r){const i=tt.context.createSceneObject(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,r){const i=tt.context.createSceneObjectFromClass(e,r);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const r=tt.context.createSceneObjectFromJson(e);return r&&this.addSceneObject(r),r}}function Mg(n,t){return n.length===t.length&&n.every((e,r)=>e===t[r])}class F0 extends H{constructor(t){super(),this._viewer=t,this.d(p.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class k0 extends H{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const r=An.createCommonProps(),i=[];Object.keys(r).forEach(u=>{const l=this._activeViewer[u+"Changed"];i.push(l)});const s=this.dv(p.createNextAnimateFrameEvent(...i)),o=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(r).forEach(u=>{this._viewer[u]=this._activeViewer[u]})};this.d(s.don(o));const a=this.dv(p.createAnimateFrame());a.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const u=this._activeViewer.getCurrentCameraInfo(),l=this._viewer.getCurrentCameraInfo();if(!u)return;const{position:c,rotation:h}=u;l&&Mg(c,l.position)&&Mg(h,l.rotation)||this._viewer.flyIn(c,h,0)}),this.d(()=>a.cancel())}}const V0=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
|
|
488
488
|
<animateTransform values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" repeatCount="indefinite" type="rotate" attributeName="transform"></animateTransform>
|
|
489
489
|
</circle><g></g></g></svg>
|
|
490
|
-
`,h0='<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>',f0='<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>',ro=class ro extends J{constructor(t){super();const e=()=>{const r=this.dv(new ul);this.d(d.track([r,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{r.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),r.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(r),this.d(()=>t.delete(r)),r.instanceClass=class extends J{constructor(o,a,u){super();f(this,"_div",document.createElement("div"));if(this._subContainer=o,!u)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const w=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};w(),this.d(a.showChanged.don(w))}let l,c,h,p,v;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",l=document.createElement("div"),this._div.appendChild(l),l.style.width="auto",l.style.position="absolute",l.style.left="50%",l.style.top="50%",l.style.transform="translate(-50%,-50%)",l.style.background="rgba(120, 120, 0, 0.7)",l.style.color="white",l.style.fontSize="10px",l.style.background="none",l.style.display="flex",l.style.justifyContent="center",l.style.alignItems="center",c=document.createElement("div"),l.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=ro.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",h=document.createElement("div"),l.appendChild(h),h.style.pointerEvents="none",h.style.marginLeft="10px",h.style.display="flex",h.style.flexFlow="column",h.style.maxWidth="300px",p=document.createElement("div"),h.appendChild(p),p.style.fontSize="14px",p.style.fontWeight="800",p.style.marginBottom="5px",p.style.textShadow="0 0 2px black",v=document.createElement("div"),h.appendChild(v),v.style.fontWeight="400",v.style.textShadow="0 0 2px black";{const w=()=>{let P="Raw";u.status==="Raw"?P="初始状态":u.status==="Creating"?P="正在创建":u.status==="Created"?P="创建完成":u.status==="Error"?P="创建失败":u.status==="Reconnecting"&&(P="重新连接"),p.innerText=`${P}(${u.status})`,v.innerText=`${u.statusLog}`,(u.status==="Creating"||u.status==="Reconnecting")&&(c.innerHTML=ro.defaultsSvg.loadingSvg),u.status==="Created"&&(c.innerHTML=ro.defaultsSvg.successSvg),u.status==="Error"&&(c.innerHTML=ro.defaultsSvg.warnSvg)};w();const I=this.dv(d.createNextAnimateFrameEvent(u.statusLogChanged,u.statusChanged));this.d(I.don(w))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,u=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${u}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};f(ro,"defaultsSvg",{loadingSvg:c0,successSvg:h0,warnSvg:f0});let Kh=ro;class d0 extends J{constructor(t,e,r){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=r;const i=this._subContainer,s=this._overlayContainer,o=this._viewer,a=()=>{const c=o.zIndex??"";i.style.zIndex=c,s.style.zIndex=c};a(),this.d(o.zIndexChanged.don(a));const u=()=>{i.style.display=o.show??!0?"block":"none"};u(),this.d(o.showChanged.don(u));const l=()=>{i.style.opacity=`${o.opacity??1}`};l(),this.d(o.opacityChanged.don(l))}}function fl(n){let t=d.getExtProp(n,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",n.appendChild(t),d.setExtProp(n,"_relativeContainer",t)),t}class p0 extends J{constructor(e,r){super();f(this,"_subContainer",document.createElement("div"));f(this,"_overlayContainer",document.createElement("div"));f(this,"_containerStyleController");this._container=e,this._viewer=r,this._containerStyleController=this.dv(new d0(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),fl(this._container).appendChild(i),this.d(()=>fl(this._container).removeChild(i)),fl(this._container).appendChild(s),this.d(()=>fl(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class g0 extends J{constructor(){super(...arguments);f(this,"registerObjsMap",new Map)}register(e,r){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,r),e}getViewerConstructor(e){const r=this.registerObjsMap.get(e);if(!r){console.warn(`未找到${e}类!`);return}return r}createViewer(e){const r=e.type;console.log(e);const i=this.getViewerConstructor(r);if(!i)throw new Error(`没有找到类型为${r}的Viewer构造器!`);return new i(e)}}class mg extends J{constructor(t,e,r=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(d.DomElementEvent.create(e,"pointerdown")),o=this.dv(d.DomElementEvent.create(e,"pointermove")),a=this.dv(d.DomElementEvent.create(e,"pointerup")),u=this.dv(d.DomElementEvent.create(e,"pointerout")),l=this.dv(d.DomElementEvent.create(e,"pointerover")),c=this.dv(new d.PointerClick),h=this.dv(new d.PointerHover),p=()=>{const g=this._viewer.hoverTime*1e3;h.delayTime=g};this.d(this._viewer.hoverTimeChanged.don(()=>{p()})),this.d(s.don(g=>c.pointerDown(g))),this.d(o.don(g=>c.pointerMove(g))),this.d(a.don(g=>c.pointerUp(g))),this.d(u.don(g=>c.pointerOut(g))),this.d(s.don(g=>h.pointerDown(g))),this.d(o.don(g=>h.pointerMove(g))),this.d(a.don(g=>h.pointerUp(g))),this.d(u.don(g=>h.pointerOut(g)));const{x:v,y:w}=e.getBoundingClientRect(),I=i?v:0,P=i?w:0;this.d(h.hoverEvent.don(g=>{const[y,E]=d.getDomEventCurrentTargetPos(g,r);this._viewer.hoverEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(c.clickEvent.don(g=>{const[y,E]=d.getDomEventCurrentTargetPos(g,r);this._viewer.clickEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(c.dbclickEvent.don(g=>{const[y,E]=d.getDomEventCurrentTargetPos(g,r);g.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(s.don(g=>{const[y,E]=d.getDomEventCurrentTargetPos(g,r);g.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(a.don(g=>{const[y,E]=d.getDomEventCurrentTargetPos(g,r);g.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(o.don(g=>{const[y,E]=d.getDomEventCurrentTargetPos(g,r);this._viewer.pointerMoveEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(l.don(g=>{const[y,E]=d.getDomEventCurrentTargetPos(g,r);this._viewer.pointerOverEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})})),this.d(u.don(g=>{const[y,E]=d.getDomEventCurrentTargetPos(g,r);this._viewer.pointerOutEvent.emit({screenPosition:[y+I,E+P],pointerEvent:g})}));const O=this.dv(d.DomElementEvent.create(e,"keydown"));this.d(O.don(g=>this._viewer.keyDownEvent.emit(g)));const m=this.dv(d.DomElementEvent.create(e,"keyup"));this.d(m.don(g=>this._viewer.keyUpEvent.emit(g)));const _=this.dv(d.DomElementEvent.create(e,"wheel"));this.d(_.don(g=>this._viewer.wheelEvent.emit(g)))}}class m0 extends J{constructor(e){super();f(this,"viewer");const r=this.viewer=e;this.ad(new d.ObjResettingWithEvent(r.rollerShutterChanged,()=>{const i=r.container;if(!i||!r.rollerShutter)return;const s=new J;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const r=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/e.parentElement.offsetWidth;e.style.left=`${100*o}%`,this.viewer.splitPosition=o};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",r)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",r)}),e}}class v0 extends J{constructor(e){super();f(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new m0(e))}}const Fi=class Fi extends J{constructor(e){super();f(this,"_forceRecreateEvent",this.dv(new V));f(this,"_container",this.dv(d.react(void 0)));f(this,"_containerSize",this.dv(d.react(void 0)));f(this,"_editingEvent",this.disposeVar(new V));f(this,"_status",this.dv(d.react("Raw")));f(this,"_statusLog",this.dv(d.react("")));f(this,"_statusContainer",this.dv(new Kh(this)));f(this,"_useCustomInteraction",this.dv(d.react(!0)));f(this,"_resetInteractionEvent",this.dv(d.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));f(this,"_interactionResetting",this.dv(new d.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new mg(this,this.container)})));f(this,"_viewerChanged",this.dv(new V));f(this,"_cameraChanged",this.dv(new V));f(this,"_containerResetEvent",this.dv(d.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));f(this,"_containerResetting",this.dv(new d.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new p0(this.container,this)})));f(this,"_sceneObjectsMap",new Map);f(this,"_id");f(this,"_typeName");f(this,"_updateFuncReact",this.dv(d.react(void 0)));f(this,"_toDestroyFuncReact",this.dv(d.react(void 0)));f(this,"_statusInfo",Fi.defaults.statusInfo);f(this,"_navigationMode",this.dv(d.react("Map")));f(this,"_syncViewer",this.dv(d.react(void 0)));f(this,"_syncEventDon",this.dv(new d.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new l0(this,e)})));f(this,"_timeSyncdon",this.dv(new d.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new u0(this)})));f(this,"_hoverEvent",this.dv(new V));f(this,"_pointerOverEvent",this.dv(new V));f(this,"_pointerMoveEvent",this.dv(new V));f(this,"_pointerDownEvent",this.dv(new V));f(this,"_pointerUpEvent",this.dv(new V));f(this,"_pointerOutEvent",this.dv(new V));f(this,"_clickEvent",this.dv(new V));f(this,"_dblclickEvent",this.dv(new V));f(this,"_keyDownEvent",this.dv(new V));f(this,"_keyUpEvent",this.dv(new V));f(this,"_wheelEvent",this.dv(new V));f(this,"_actived",this.dv(d.react(!1)));this._id=e.id??d.createGuid();const r=fg(e.container);if(r)this._container.value=Zh(r),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{r&&(this.show??!0?r.style.display="block":r.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[a,u]of i.entries())if(!u&&a){const l=vs.context.createEngineObject(a,this);l&&i.set(a,l)}},o=()=>{for(let[a,u]of i.entries())u&&!u.isDestroyed()&&u.destroy(),i.set(a,void 0)};this.d(o),this.d(this.viewerChanged.don(a=>{o(),a&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||d.createAnimateFrame(),s.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new v0(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const r=document.getElementById(e);r&&r instanceof HTMLDivElement?this._container.value=Zh(r):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=Zh(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get cameraChanged(){return this._cameraChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let r of e)if(!this.has(r)){tt.context.addSceneObject(r);const i=vs.context.createEngineObject(r,this);i&&this._sceneObjectsMap.set(r,i),r.viewerAttached.emit(this)}}delete(...e){for(let r of e)if(this.has(r)){const i=this._sceneObjectsMap.get(r);i&&i.destroy(),tt.context.deleteSceneObject(r),this._sceneObjectsMap.delete(r),r.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return Fi.createDefaultProps()}_getJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof d.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_setJson(e,r,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof d.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(r){console.warn(`时间格式不正确! value: ${e} error: ${r}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new it(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new it(r[s],s))}),i}};f(Fi,"context",new g0),f(Fi,"register",Fi.context.register.bind(Fi.context)),f(Fi,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0,cameraMovableRegion:[0,0,0,0,0,0]});let Ln=Fi;(n=>{n.createBaseProps=()=>({name:"未命名场景对象",extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),n.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:d.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:d.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:d.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:n.defaults.terrainShader,splitPosition:d.react(void 0),rollerShutter:!1,cameraMovableRegion:d.reactArrayWithUndefined(void 0)}),n.createDefaultProps=()=>({...(0,n.createBaseProps)(),...(0,n.createCommonProps)()})})(Ln||(Ln={})),d.extendClassProps(Ln.prototype,Ln.createDefaultProps);function vg(n,t){const e=n._lastCameraInfo;if(e){const r=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:o}=e;t.flyIn(s,o,0),n._lastCameraInfo=void 0,r()})}}const y0=n=>{const t=Ln.createCommonProps(),e={};try{Object.keys(t).forEach(r=>{e[r]=n[r]})}catch(r){console.warn(r)}return e},yg=(n,t)=>{const e=Ln.createCommonProps();try{Object.keys(e).forEach(r=>{n[r]=t[r]})}catch(r){console.warn(r)}};class _0 extends J{constructor(e){super();f(this,"_viewersChanged",this.disposeVar(new V));f(this,"_viewers",new Set);f(this,"_viewersToChange",this.dv(new V));this._sceneObjectsManager=e,this.d(()=>{for(const r of this._viewers)this.destroyViewer(r);this._viewers.clear()}),this.viewers.forEach(r=>{const i=this._sceneObjectsManager.sceneObjects;r.add(...i)}),this.d(()=>{const r=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...r)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((r,i)=>{this.viewers.forEach(s=>{i.forEach(o=>{pi(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))}),r.forEach(o=>{pi(s.devTags,o.devTags)&&(s.has(o)?s.delete(o):console.warn(`${s.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(o=>{o.has(s)&&o.delete(s),console.log("sceneObjectsToChange",o.devTags,s.devTags,pi(o.devTags,s.devTags)),pi(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))})}))})})),this.d(this.viewersChanged.don((r,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(o=>{for(let a of s)pi(o.devTags,a.devTags)&&(o.has(a)?console.warn(`${o.typeName}中已存${a.typeName},检查逻辑是否有问题!`):o.add(a))}),r.forEach(o=>{for(let a of s)pi(o.devTags,a.devTags)&&(o.has(a)?o.delete(a):console.warn(`${o.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let u of a)console.log("viewersChanged",o.devTags,u.devTags,pi(o.devTags,u.devTags)),pi(o.devTags,u.devTags)&&(o.has(u)?console.warn(`${o.typeName}中已存${u.typeName},检查逻辑是否有问题!`):o.add(u))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const r=Ln.context.createViewer(e);return this._viewers.add(r),this._viewersChanged.emit([],[r]),r}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class os extends J{constructor(...e){super();f(this,"_drgm",this.dv(new Ef));f(this,"_sobjm",this.dv(new a0));f(this,"_vrm",this.dv(new _0(this._sobjm)));f(this,"_sceneObjectEditingManager",this.disposeVar(new o0));f(this,"_activeViewer",this.dv(d.react(void 0)));f(this,"_syncOtherViewersToActived",this.dv(d.react(!1)));f(this,"_cmrvm",this.createSceneObjectFromClass(ol));f(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));f(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});f(this,"_sceneTree",this.dv(new $a("default",this.dragstartDataMananger,24,this)));f(this,"_propUiTreeManager",this.dv(new Vo(24)));f(this,"_sceneTreeMap",new Map);f(this,"_viewerCreatedEvent",this.dv(new V));f(this,"_lastCameraInfo");f(this,"_lastActiveViewerJson");f(this,"_syncEventDonFunc",this.d(_a([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(r=>{e?r.syncOtherViewer(this.activeViewer):r.syncOtherViewer(void 0)})})));f(this,"_player",this.createSceneObjectFromClass(su));f(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));f(this,"_esPlyarAndPathTime",this.dv(new t0(this)));f(this,"_pathAnimationManager",this.dv(new r0(this)))}static get envs(){return tt.context.environmentVariables}getSceneObjectById(e){return tt.getSceneObjectById(e)}getSceneObject(e){return tt.getSceneObject(e)}get $refs(){return tt.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e,this.viewers.values().forEach(r=>r.actived=r===e)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var h;const e=this._asset.createdTime||new Date().toISOString(),r=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:r,name:i},a=this.sceneTree.json,u=this._cmrvm.views,l=[...this._vrm.viewers].map(p=>p.json),c=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:a,viewCollection:u,lastView:c}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(r=>{const i=e.viewers.find(s=>s.id===r.id);i&&(r.json=i)})}catch(r){console.error(`ESObjectsManager解析json数据时发生错误! error: ${r}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return n0(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,r=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new $a(e,this.dragstartDataMananger,r,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const r=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=r);const i=this.d(r.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(r),i())}));return r}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,r=!0,i=!0,s=!0){var l;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&r&&(this._lastCameraInfo=(l=this.activeViewer)==null?void 0:l.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?y0(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,a=o?[...this.getViewers()].find(c=>c.id===o):[...this.getViewers()].find(c=>c.typeName===e.type);if(a)if(o&&a.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),r&&vg(this,a),i&&this._lastActiveViewerJson&&(yg(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===fg(e.container)?(a.containerOrId=e.container,a.forceRecreate()):a.containerOrId=e.container,this.activeViewer=a,a;console.log("No ESViewer exists, will be created");const u=this.createViewer(e);return console.log(e),console.log(this),r&&vg(this,u),i&&this._lastActiveViewerJson&&(yg(u,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=u,u}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:r,viewSync:i,attributeSync:s,destroy:o,id:a}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:r,id:a},i??!0,s??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const r={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:o,destroy:a,id:u}=r;return this.switchViewer({type:"ESCesiumViewer",container:i,id:u},s,o,a)}}switchToUEViewer(...e){let r,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:u,uri:l,app:c,token:h,viewSync:p,attributeSync:v,destroy:w,id:I}=e[0];r={type:"ESUeViewer",container:u,id:I,options:{uri:l,app:c,token:h}},i={viewSync:p??!0,attributeSync:v??!0,destroy:w??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:u,ws:l,esmsg:c,viewSync:h,attributeSync:p,id:v,destroy:w}=e[0];r={type:"ESUeViewer",container:u,id:v,options:{ws:l,esmsg:c}},i={viewSync:h??!0,attributeSync:p??!0,destroy:w??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:u,project:l,baseUrl:c,viewSync:h,attributeSync:p,id:v,destroy:w}=e[0];r={type:"ESUeViewer",container:u,id:v,options:{project:l,baseUrl:c}},i={viewSync:h??!0,attributeSync:p??!0,destroy:w??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(r={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(r={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(r={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!r)throw new Error("参数错误");const{viewSync:s,attributeSync:o,destroy:a}=i;return this.switchViewer(r,s,o,a)}createCesiumViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createOpenLayersViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createUeViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?r={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!r)throw new Error("参数错误");return this.createViewer(r)}createSceneObject(e,r){return this._sobjm.createSceneObject(e,r)}createSceneObjectFromClass(e,r){return this._sobjm.createSceneObjectFromClass(e,r)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const r=this._sobjm.deleteSceneObject(e);return e.destroy(),r}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let r of e)r!=this._player&&r!=this._cmrvm&&this.destroySceneObject(r)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}f(os,"getSceneObjById",tt.context.getSceneObjectById.bind(tt.context)),f(os,"getEnv",tt.context.getEnv.bind(tt.context)),f(os,"setEnv",tt.context.setEnv.bind(tt.context)),(n=>{n.createDefaultProps=()=>({})})(os||(os={})),d.extendClassProps(os.prototype,os.createDefaultProps),S.BasePropTreeItem=Cc,S.Boolean2Property=Kg,S.Boolean2sProperty=tm,S.Boolean3Property=Qg,S.Boolean3sProperty=em,S.Boolean4Property=$g,S.Boolean4sProperty=rm,S.BooleanProperty=q,S.BooleansProperty=qg,S.ColorProperty=Et,S.ColorRgbProperty=sm,S.DashPatternProperty=om,S.DateProperty=ys,S.DatesProperty=vf,S.Destroyable=J,S.DoublyLinkedList=sf,S.DragStartDataManager=Ef,S.ES3DTileset=sn,S.ESAlarm=xc,S.ESApertureEffect=Mc,S.ESAreaMeasurement=Lc,S.ESBlastParticleSystem=Ac,S.ESBoxClipping=Rc,S.ESCameraView=il,S.ESCameraViewCollection=ol,S.ESCameraVisibleRange=Fc,S.ESCar=kc,S.ESCityBasePoint=Uh,S.ESClassification=al,S.ESClippingPlane=Vc,S.ESCustomDiv=ul,S.ESCzml=Gh,S.ESDataMesh=zc,S.ESDatasmithRuntimeModel=Sh,S.ESDirectionMeasurement=ch,S.ESDistanceMeasurement=Uc,S.ESDynamicWater=Ch,S.ESEntityCluster=Vh,S.ESExcavate=tu,S.ESFireParticleSystem=Gc,S.ESForestTileset=Wc,S.ESGaussianSplatting=Yh,S.ESGeoDiv=qc,S.ESGeoDivTextPoi=zh,S.ESGeoExtrudedPolygon=nu,S.ESGeoJson=hh,S.ESGeoLineString=is,S.ESGeoPoints=jh,S.ESGeoPolygon=zt,S.ESGeoRectangle=Xc,S.ESGeoVector=wt,S.ESGeoWater=Ih,S.ESGltfModel=Hc,S.ESHeatMap=Bh,S.ESHeightLimitAnalysis=kh,S.ESHeightMeasurement=fh,S.ESHole=Dh,S.ESHuman=Uo,S.ESHumanPoi=Oh,S.ESImageLabel=Jc,S.ESImageryLayer=Bc,S.ESJEditingMode=$,S.ESJLonLatFormat=yf,S.ESJPickedResult=pm,S.ESLabel=kr,S.ESLevelRuntimeModel=Ph,S.ESLocalCircle=dh,S.ESLocalPolygon=ru,S.ESLocalPolygonZ=ph,S.ESLocalRectangle=gh,S.ESLocalSkyBox=jc,S.ESLocalVector=zo,S.ESLocalVector2D=Di,S.ESLocationMeasurement=Zc,S.ESMsTileset=Ah,S.ESNavigator=Wh,S.ESObjectWithLocation=et,S.ESObjectsManager=os,S.ESParticleSystemPrimitive=Kc,S.ESPath=ou,S.ESPathImpl=ss,S.ESPipeFence=mh,S.ESPipeline=bh,S.ESPipeserTileset=vh,S.ESPit=Go,S.ESPlayer=su,S.ESPoi2D=eu,S.ESPoi3D=Qc,S.ESPoiTileset=Rh,S.ESPolygonFence=yh,S.ESPolygonFlattenedPlane=$c,S.ESPolygonWithHole=wh,S.ESRectangle=_h,S.ESRtsFeatureEditing=Lh,S.ESRtsTileset=Mh,S.ESScale=Fh,S.ESSceneObject=tt,S.ESSceneObjectWithId=Om,S.ESSeparateFoliage=th,S.ESSkylineAnalysis=Jh,S.ESStaticMesh=Hh,S.ESSubmergingAnalysis=eh,S.ESSunshineAnalysis=rh,S.ESSurfaceAreaMeasurement=Eh,S.ESTerrainLayer=nh,S.ESTestObject=Dc,S.ESTextLabel=ih,S.ESUEWidget=sh,S.ESUnrealActor=oh,S.ESVideoFusion=ah,S.ESViewShed=uh,S.ESViewer=Ln,S.ESViewerStatusBar=qh,S.ESViewerStatusBarScale=Xh,S.ESVisibilityAnalysis=Nh,S.ESVisualObject=kt,S.ESVolumeMeasurement=Th,S.ESWidget=lh,S.EngineObject=vs,S.EnumProperty=mt,S.EnumStringsProperty=am,S.EvalStringProperty=Vi,S.Event=V,S.EventListenerHandler=Sl,S.FunctionProperty=st,S.GroupPropTreeItem=Pc,S.GroupProperty=it,S.JsonProperty=Q,S.LeafPropTreeItem=Ic,S.ListenerPipe=El,S.LongStringProperty=Pl,S.MaximumScreenSpaceErrorProperty=Gg,S.MinmaxProperty=um,S.NearFarScalerProperty=lm,S.NextAnimateFrameEvent=lf,S.NonreactiveJsonStringProperty=pf,S.Number2Property=ve,S.Number2sProperty=ff,S.Number3Property=Ue,S.Number3sProperty=Il,S.Number4Property=dn,S.Number4WithUndefinedProperty=jg,S.Number4sProperty=Zg,S.NumberProperty=L,S.NumberRangeProperty=cm,S.NumberSliderProperty=Se,S.NumbersProperty=Wg,S.ObjPool=yl,S.ObservableSet=du,S.ParamsProperty=df,S.PickedInfo=dm,S.Player=pn,S.PlayerProperty=pu,S.PositionProperty=io,S.PositionsProperty=gf,S.PositionsSetPropety=fm,S.PropTree=zp,S.PropUiTreeManager=Vo,S.Property=ki,S.ReactVarProperty=yt,S.RotationProperty=bl,S.SceneObjectFromId=Tl,S.SceneTree=$a,S.SceneTreeContextMenu=Yp,S.SceneTreeItem=Be,S.SceneTreeItemDragDrop=Xp,S.SmartListenerHandler=ya,S.SmartListenerPipe=xg,S.SmoothMoveController=C_,S.String2Property=Xg,S.String2sProperty=hf,S.String3Property=Yg,S.String3sProperty=Jg,S.String4Property=Hg,S.String4sProperty=Bg,S.StringNumberProperty=nm,S.StringNumbersProperty=im,S.StringProperty=ut,S.StringsProperty=cf,S.TreeItemDragDrop=Sf,S.UriProperty=wa,S.ViewPlayerProperty=mf,S.ViewerCustomInteraction=mg,S.Watcher=Ea,S.WatcherTools=bf,S.WithUndefinedProperty=Cl,S.addTreesCallFunc=Zp,S.animateFrame=Ag,S.bindCustomEditing=Pf,S.booleanPointInPolygon=Am,S.cartesianDistance=Vp,S.clamp0_360=so,S.clampN180_180=If,S.createEventsCallFunc=_a,S.createPropTreeFromSceneObject=Up,S.cutDownTreesCallFunc=$p,S.defaultFlyInParam=ym,S.defaultFlyToParam=_s,S.defaultInitSceneObjectOnCreatingFunc=wm,S.defaultLight122FromEnvironmentMapManager=Oc,S.defaultUpdateSceneObjectOnPickingFunc=_m,S.destroyObject=tf,S.downloadLink=Vg,S.equalsN3=Nc,S.geoAlong=Vm,S.geoArea=Rl,S.geoBuffer=Ap,S.geoCenterOfMass=nv,S.geoDestination=Hf,S.geoDifference=Rp,S.geoDistance=Su,S.geoHeading=Pa,S.geoIntersect=Mp,S.geoLineIntersect=hv,S.geoNearestPointOnLine=gv,S.geoPointToLineDistance=_v,S.geoPolygonFromCircle=Fp,S.geoPolygonOverlap=Ec,S.geoRhumbDestination=Sv,S.geoRhumbDistance=id,S.geoRhumbHeading=Iv,S.geoUnion=Lp,S.getDefaultValue=Im,S.getDistancesFromPositions=Qa,S.getGeoBoundingSphereFromPositions=c_,S.getMidpoint=dv,S.getMinMaxCorner=kp,S.getSceneObjectTreeItem=Em,S.getXyzFromPostion=Sc,S.growthSimulationCallFunc=tg,S.hasSameTags=Cf,S.hasSameViewerTags=pi,S.inOrderRunning=Pm,S.interval=Mg,S.isJSONString=Cm,S.lbhToWebMerc=Mm,S.lbhToXyz=qn,S.lerpAngle=mu,S.lerpRotation=Nl,S.map=Gp,S.nextAnimateFrame=uf,S.nextMicroTask=Rg,S.oneTimeWarning=af,S.optionsStr=x_,S.reactPosition2Ds=bc,S.registerCreatedEventUpdate=h_,S.registerEventCtor=ef,S.registerEventUpdate=f_,S.removeAllTreesCallFunc=Kp,S.rpToap=Sm,S.saveOnBrowser=kg,S.setSceneObjectTreeItem=gu,S.timeout=Lg,S.updateTreeParamsCallFunc=Qp,S.webMercToLbh=Lm,S.xyzToLbh=Tf,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|
|
490
|
+
`,z0='<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>',U0='<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>',oo=class oo extends H{constructor(t){super();const e=()=>{const r=this.dv(new ml);this.d(p.track([r,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{r.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),r.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(r),this.d(()=>t.delete(r)),r.instanceClass=class extends H{constructor(o,a,u){super();f(this,"_div",document.createElement("div"));if(this._subContainer=o,!u)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const y=()=>{a.show?this._div.style.opacity="1":this._div.style.opacity="0"};y(),this.d(a.showChanged.don(y))}let l,c,h,d,g;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",l=document.createElement("div"),this._div.appendChild(l),l.style.width="auto",l.style.position="absolute",l.style.left="50%",l.style.top="50%",l.style.transform="translate(-50%,-50%)",l.style.background="rgba(120, 120, 0, 0.7)",l.style.color="white",l.style.fontSize="10px",l.style.background="none",l.style.display="flex",l.style.justifyContent="center",l.style.alignItems="center",c=document.createElement("div"),l.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=oo.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",h=document.createElement("div"),l.appendChild(h),h.style.pointerEvents="none",h.style.marginLeft="10px",h.style.display="flex",h.style.flexFlow="column",h.style.maxWidth="300px",d=document.createElement("div"),h.appendChild(d),d.style.fontSize="14px",d.style.fontWeight="800",d.style.marginBottom="5px",d.style.textShadow="0 0 2px black",g=document.createElement("div"),h.appendChild(g),g.style.fontWeight="400",g.style.textShadow="0 0 2px black";{const y=()=>{let P="Raw";u.status==="Raw"?P="初始状态":u.status==="Creating"?P="正在创建":u.status==="Created"?P="创建完成":u.status==="Error"?P="创建失败":u.status==="Reconnecting"&&(P="重新连接"),d.innerText=`${P}(${u.status})`,g.innerText=`${u.statusLog}`,(u.status==="Creating"||u.status==="Reconnecting")&&(c.innerHTML=oo.defaultsSvg.loadingSvg),u.status==="Created"&&(c.innerHTML=oo.defaultsSvg.successSvg),u.status==="Error"&&(c.innerHTML=oo.defaultsSvg.warnSvg)};y();const C=this.dv(p.createNextAnimateFrameEvent(u.statusLogChanged,u.statusChanged));this.d(C.don(y))}}update(){const o=255*Math.random()|0,a=255*Math.random()|0,u=255*Math.random()|0;this._div.style.background=`rgba(${o}, ${a}, ${u}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};f(oo,"defaultsSvg",{loadingSvg:V0,successSvg:z0,warnSvg:U0});let sf=oo;class G0 extends H{constructor(t,e,r){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=r;const i=this._subContainer,s=this._overlayContainer,o=this._viewer,a=()=>{const c=o.zIndex??"";i.style.zIndex=c,s.style.zIndex=c};a(),this.d(o.zIndexChanged.don(a));const u=()=>{i.style.display=o.show??!0?"block":"none"};u(),this.d(o.showChanged.don(u));const l=()=>{i.style.opacity=`${o.opacity??1}`};l(),this.d(o.opacityChanged.don(l))}}function Pl(n){let t=p.getExtProp(n,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",n.appendChild(t),p.setExtProp(n,"_relativeContainer",t)),t}class W0 extends H{constructor(e,r){super();f(this,"_subContainer",document.createElement("div"));f(this,"_overlayContainer",document.createElement("div"));f(this,"_containerStyleController");this._container=e,this._viewer=r,this._containerStyleController=this.dv(new G0(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),Pl(this._container).appendChild(i),this.d(()=>Pl(this._container).removeChild(i)),Pl(this._container).appendChild(s),this.d(()=>Pl(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class q0 extends H{constructor(){super(...arguments);f(this,"registerObjsMap",new Map)}register(e,r){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,r),e}getViewerConstructor(e){const r=this.registerObjsMap.get(e);if(!r){console.warn(`未找到${e}类!`);return}return r}createViewer(e){const r=e.type;console.log(e);const i=this.getViewerConstructor(r);if(!i)throw new Error(`没有找到类型为${r}的Viewer构造器!`);return new i(e)}}class Lg extends H{constructor(t,e,r=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(p.DomElementEvent.create(e,"pointerdown")),o=this.dv(p.DomElementEvent.create(e,"pointermove")),a=this.dv(p.DomElementEvent.create(e,"pointerup")),u=this.dv(p.DomElementEvent.create(e,"pointerout")),l=this.dv(p.DomElementEvent.create(e,"pointerover")),c=this.dv(new p.PointerClick),h=this.dv(new p.PointerHover),d=()=>{const m=this._viewer.hoverTime*1e3;h.delayTime=m};this.d(this._viewer.hoverTimeChanged.don(()=>{d()})),this.d(s.don(m=>c.pointerDown(m))),this.d(o.don(m=>c.pointerMove(m))),this.d(a.don(m=>c.pointerUp(m))),this.d(u.don(m=>c.pointerOut(m))),this.d(s.don(m=>h.pointerDown(m))),this.d(o.don(m=>h.pointerMove(m))),this.d(a.don(m=>h.pointerUp(m))),this.d(u.don(m=>h.pointerOut(m)));const{x:g,y}=e.getBoundingClientRect(),C=i?g:0,P=i?y:0;this.d(h.hoverEvent.don(m=>{const[_,E]=p.getDomEventCurrentTargetPos(m,r);this._viewer.hoverEvent.emit({screenPosition:[_+C,E+P],pointerEvent:m})})),this.d(c.clickEvent.don(m=>{const[_,E]=p.getDomEventCurrentTargetPos(m,r);this._viewer.clickEvent.emit({screenPosition:[_+C,E+P],pointerEvent:m})})),this.d(c.dbclickEvent.don(m=>{const[_,E]=p.getDomEventCurrentTargetPos(m,r);m.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[_+C,E+P],pointerEvent:m})})),this.d(s.don(m=>{const[_,E]=p.getDomEventCurrentTargetPos(m,r);m.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[_+C,E+P],pointerEvent:m})})),this.d(a.don(m=>{const[_,E]=p.getDomEventCurrentTargetPos(m,r);m.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[_+C,E+P],pointerEvent:m})})),this.d(o.don(m=>{const[_,E]=p.getDomEventCurrentTargetPos(m,r);this._viewer.pointerMoveEvent.emit({screenPosition:[_+C,E+P],pointerEvent:m})})),this.d(l.don(m=>{const[_,E]=p.getDomEventCurrentTargetPos(m,r);this._viewer.pointerOverEvent.emit({screenPosition:[_+C,E+P],pointerEvent:m})})),this.d(u.don(m=>{const[_,E]=p.getDomEventCurrentTargetPos(m,r);this._viewer.pointerOutEvent.emit({screenPosition:[_+C,E+P],pointerEvent:m})}));const T=this.dv(p.DomElementEvent.create(e,"keydown"));this.d(T.don(m=>this._viewer.keyDownEvent.emit(m)));const v=this.dv(p.DomElementEvent.create(e,"keyup"));this.d(v.don(m=>this._viewer.keyUpEvent.emit(m)));const w=this.dv(p.DomElementEvent.create(e,"wheel"));this.d(w.don(m=>this._viewer.wheelEvent.emit(m)))}}class X0 extends H{constructor(e){super();f(this,"viewer");const r=this.viewer=e;this.ad(new p.ObjResettingWithEvent(r.rollerShutterChanged,()=>{const i=r.container;if(!i||!r.rollerShutter)return;const s=new H;this.viewer.splitPosition=.5;let o=this.getRollerShutterDIV();return i.appendChild(o),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(o)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const r=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const o=i.x/e.parentElement.offsetWidth;e.style.left=`${100*o}%`,this.viewer.splitPosition=o};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",r)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",r)}),e}}class H0 extends H{constructor(e){super();f(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new X0(e))}}const Vi=class Vi extends H{constructor(e){super();f(this,"_forceRecreateEvent",this.dv(new V));f(this,"_container",this.dv(p.react(void 0)));f(this,"_containerSize",this.dv(p.react(void 0)));f(this,"_editingEvent",this.disposeVar(new V));f(this,"_status",this.dv(p.react("Raw")));f(this,"_statusLog",this.dv(p.react("")));f(this,"_statusContainer",this.dv(new sf(this)));f(this,"_useCustomInteraction",this.dv(p.react(!0)));f(this,"_resetInteractionEvent",this.dv(p.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));f(this,"_interactionResetting",this.dv(new p.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new Lg(this,this.container)})));f(this,"_viewerChanged",this.dv(new V));f(this,"_cameraChanged",this.dv(new V));f(this,"_containerResetEvent",this.dv(p.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));f(this,"_containerResetting",this.dv(new p.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new W0(this.container,this)})));f(this,"_sceneObjectsMap",new Map);f(this,"_id");f(this,"_typeName");f(this,"_updateFuncReact",this.dv(p.react(void 0)));f(this,"_toDestroyFuncReact",this.dv(p.react(void 0)));f(this,"_statusInfo",Vi.defaults.statusInfo);f(this,"_navigationMode",this.dv(p.react("Map")));f(this,"_syncViewer",this.dv(p.react(void 0)));f(this,"_syncEventDon",this.dv(new p.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new k0(this,e)})));f(this,"_timeSyncdon",this.dv(new p.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new F0(this)})));f(this,"_hoverEvent",this.dv(new V));f(this,"_pointerOverEvent",this.dv(new V));f(this,"_pointerMoveEvent",this.dv(new V));f(this,"_pointerDownEvent",this.dv(new V));f(this,"_pointerUpEvent",this.dv(new V));f(this,"_pointerOutEvent",this.dv(new V));f(this,"_clickEvent",this.dv(new V));f(this,"_dblclickEvent",this.dv(new V));f(this,"_keyDownEvent",this.dv(new V));f(this,"_keyUpEvent",this.dv(new V));f(this,"_wheelEvent",this.dv(new V));f(this,"_actived",this.dv(p.react(!1)));this._id=e.id??p.createGuid();const r=Og(e.container);if(r)this._container.value=nf(r),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{r&&(this.show??!0?r.style.display="block":r.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[a,u]of i.entries())if(!u&&a){const l=_s.context.createEngineObject(a,this);l&&i.set(a,l)}},o=()=>{for(let[a,u]of i.entries())u&&!u.isDestroyed()&&u.destroy(),i.set(a,void 0)};this.d(o),this.d(this.viewerChanged.don(a=>{o(),a&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(o){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${o}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||p.createAnimateFrame(),s.restart(void 0,o=>{this.updateFunc&&this.updateFunc(this,o)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new H0(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const r=document.getElementById(e);r&&r instanceof HTMLDivElement?this._container.value=nf(r):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=nf(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get cameraChanged(){return this._cameraChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let r of e)if(!this.has(r)){tt.context.addSceneObject(r);const i=_s.context.createEngineObject(r,this);i&&this._sceneObjectsMap.set(r,i),r.viewerAttached.emit(this)}}delete(...e){for(let r of e)if(this.has(r)){const i=this._sceneObjectsMap.get(r);i&&i.destroy(),tt.context.deleteSceneObject(r),this._sceneObjectsMap.delete(r),r.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return Vi.createDefaultProps()}_getJson(e=!0){const r={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,o=this.defaultProps[i];o instanceof p.ReactiveVariable?s=o.equals(this[i]):s=o===this[i],s||(r[i]=this[i])}else r[i]=this[i];return r}_setJson(e,r,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=r||[];s.push("id","type");const o=Object.keys(this.defaultProps).filter(a=>!s.includes(a));for(let a of o)if(a in e)this[a]=e[a]===null?void 0:e[a];else if(!(i??!1)){let u=this.defaultProps[a];u instanceof p.ReactiveVariable&&(u=u.value),this[a]=u}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(r){console.warn(`时间格式不正确! value: ${e} error: ${r}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}getESProperties(){return{defaultMenu:"general",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[],more:[]}}getProperties(e){const r={...this.getESProperties()},i=[];return r.general.length>0&&i.push(new it(r.general,"general")),Object.keys(r).forEach(s=>{s!=="defaultMenu"&&s!=="general"&&r[s].length>0&&i.push(new it(r[s],s))}),i}};f(Vi,"context",new q0),f(Vi,"register",Vi.context.register.bind(Vi.context)),f(Vi,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0,cameraMovableRegion:[0,0,0,0,0,0]});let An=Vi;(n=>{n.createBaseProps=()=>({name:"未命名场景对象",extras:p.reactJson(void 0),devTags:p.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),n.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:p.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:p.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:p.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:n.defaults.terrainShader,splitPosition:p.react(void 0),rollerShutter:!1,cameraMovableRegion:p.reactArrayWithUndefined(void 0)}),n.createDefaultProps=()=>({...(0,n.createBaseProps)(),...(0,n.createCommonProps)()})})(An||(An={})),p.extendClassProps(An.prototype,An.createDefaultProps);function Ag(n,t){const e=n._lastCameraInfo;if(e){const r=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:o}=e;t.flyIn(s,o,0),n._lastCameraInfo=void 0,r()})}}const Y0=n=>{const t=An.createCommonProps(),e={};try{Object.keys(t).forEach(r=>{e[r]=n[r]})}catch(r){console.warn(r)}return e},Rg=(n,t)=>{const e=An.createCommonProps();try{Object.keys(e).forEach(r=>{n[r]=t[r]})}catch(r){console.warn(r)}};class J0 extends H{constructor(e){super();f(this,"_viewersChanged",this.disposeVar(new V));f(this,"_viewers",new Set);f(this,"_viewersToChange",this.dv(new V));this._sceneObjectsManager=e,this.d(()=>{for(const r of this._viewers)this.destroyViewer(r);this._viewers.clear()}),this.viewers.forEach(r=>{const i=this._sceneObjectsManager.sceneObjects;r.add(...i)}),this.d(()=>{const r=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...r)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((r,i)=>{this.viewers.forEach(s=>{i.forEach(o=>{gi(s.devTags,o.devTags)&&(s.has(o)?console.warn(`${s.typeName}中已存${o.typeName},检查逻辑是否有问题!`):s.add(o))}),r.forEach(o=>{gi(s.devTags,o.devTags)&&(s.has(o)?s.delete(o):console.warn(`${s.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(o=>{o.has(s)&&o.delete(s),console.log("sceneObjectsToChange",o.devTags,s.devTags,gi(o.devTags,s.devTags)),gi(o.devTags,s.devTags)&&(o.has(s)?console.warn(`${o.typeName}中已存${s.typeName},检查逻辑是否有问题!`):o.add(s))})}))})})),this.d(this.viewersChanged.don((r,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(o=>{for(let a of s)gi(o.devTags,a.devTags)&&(o.has(a)?console.warn(`${o.typeName}中已存${a.typeName},检查逻辑是否有问题!`):o.add(a))}),r.forEach(o=>{for(let a of s)gi(o.devTags,a.devTags)&&(o.has(a)?o.delete(a):console.warn(`${o.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(o=>{o.d(o.devTagsChanged.don(()=>{o.clearAllSceneObjects();const a=this._sceneObjectsManager.sceneObjects;for(let u of a)console.log("viewersChanged",o.devTags,u.devTags,gi(o.devTags,u.devTags)),gi(o.devTags,u.devTags)&&(o.has(u)?console.warn(`${o.typeName}中已存${u.typeName},检查逻辑是否有问题!`):o.add(u))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const r=An.context.createViewer(e);return this._viewers.add(r),this._viewersChanged.emit([],[r]),r}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class us extends H{constructor(...e){super();f(this,"_drgm",this.dv(new Tf));f(this,"_sobjm",this.dv(new R0));f(this,"_vrm",this.dv(new J0(this._sobjm)));f(this,"_sceneObjectEditingManager",this.disposeVar(new A0));f(this,"_activeViewer",this.dv(p.react(void 0)));f(this,"_syncOtherViewersToActived",this.dv(p.react(!1)));f(this,"_cmrvm",this.createSceneObjectFromClass(dl));f(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));f(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});f(this,"_sceneTree",this.dv(new au("default",this.dragstartDataMananger,24,this)));f(this,"_propUiTreeManager",this.dv(new qo(24)));f(this,"_sceneTreeMap",new Map);f(this,"_viewerCreatedEvent",this.dv(new V));f(this,"_lastCameraInfo");f(this,"_lastActiveViewerJson");f(this,"_syncEventDonFunc",this.d(uo([this.activeViewerChanged,this.syncOtherViewersToActivedChanged],()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(r=>{e?r.syncOtherViewer(this.activeViewer):r.syncOtherViewer(void 0)})})));f(this,"_player",this.createSceneObjectFromClass(Jo));f(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));f(this,"_esPlyarAndPathTime",this.dv(new T0(this)));f(this,"_pathAnimationManager",this.dv(new x0(this)))}static get envs(){return tt.context.environmentVariables}getSceneObjectById(e){return tt.getSceneObjectById(e)}getSceneObject(e){return tt.getSceneObject(e)}get $refs(){return tt.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e,this.viewers.values().forEach(r=>r.actived=r===e)}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var h;const e=this._asset.createdTime||new Date().toISOString(),r=new Date().toISOString(),i=this._asset.name||"未命名项目",o={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:r,name:i},a=this.sceneTree.json,u=this._cmrvm.views,l=[...this._vrm.viewers].map(d=>d.json),c=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo();return{asset:o,viewers:l,sceneTree:a,viewCollection:u,lastView:c}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(r=>{const i=e.viewers.find(s=>s.id===r.id);i&&(r.json=i)})}catch(r){console.error(`ESObjectsManager解析json数据时发生错误! error: ${r}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return D0(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,r=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new au(e,this.dragstartDataMananger,r,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const r=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=r);const i=this.d(r.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(r),i())}));return r}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,r=!0,i=!0,s=!0){var l;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&r&&(this._lastCameraInfo=(l=this.activeViewer)==null?void 0:l.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?Y0(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const o=e.id,a=o?[...this.getViewers()].find(c=>c.id===o):[...this.getViewers()].find(c=>c.typeName===e.type);if(a)if(o&&a.typeName!==e.type)console.warn(`id为${o}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(a);else return console.log("ESViewer exists, will be used"),r&&Ag(this,a),i&&this._lastActiveViewerJson&&(Rg(a,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),a.container===Og(e.container)?(a.containerOrId=e.container,a.forceRecreate()):a.containerOrId=e.container,this.activeViewer=a,a;console.log("No ESViewer exists, will be created");const u=this.createViewer(e);return console.log(e),console.log(this),r&&Ag(this,u),i&&this._lastActiveViewerJson&&(Rg(u,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=u,u}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:r,viewSync:i,attributeSync:s,destroy:o,id:a}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:r,id:a},i??!0,s??!0,o??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const r={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:o,destroy:a,id:u}=r;return this.switchViewer({type:"ESCesiumViewer",container:i,id:u},s,o,a)}}switchToUEViewer(...e){let r,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:u,uri:l,app:c,token:h,viewSync:d,attributeSync:g,destroy:y,id:C}=e[0];r={type:"ESUeViewer",container:u,id:C,options:{uri:l,app:c,token:h}},i={viewSync:d??!0,attributeSync:g??!0,destroy:y??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:u,ws:l,esmsg:c,viewSync:h,attributeSync:d,id:g,destroy:y}=e[0];r={type:"ESUeViewer",container:u,id:g,options:{ws:l,esmsg:c}},i={viewSync:h??!0,attributeSync:d??!0,destroy:y??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:u,project:l,baseUrl:c,viewSync:h,attributeSync:d,id:g,destroy:y}=e[0];r={type:"ESUeViewer",container:u,id:g,options:{project:l,baseUrl:c}},i={viewSync:h??!0,attributeSync:d??!0,destroy:y??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(r={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(r={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(r={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!r)throw new Error("参数错误");const{viewSync:s,attributeSync:o,destroy:a}=i;return this.switchViewer(r,s,o,a)}createCesiumViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createOpenLayersViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(r={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!r)throw new Error("参数错误");return this.createViewer(r)}createUeViewer(...e){let r;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?r={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?r={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:r={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!r)throw new Error("参数错误");return this.createViewer(r)}createSceneObject(e,r){return this._sobjm.createSceneObject(e,r)}createSceneObjectFromClass(e,r){return this._sobjm.createSceneObjectFromClass(e,r)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const r=this._sobjm.deleteSceneObject(e);return e.destroy(),r}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let r of e)r!=this._player&&r!=this._cmrvm&&this.destroySceneObject(r)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}f(us,"getSceneObjById",tt.context.getSceneObjectById.bind(tt.context)),f(us,"getEnv",tt.context.getEnv.bind(tt.context)),f(us,"setEnv",tt.context.setEnv.bind(tt.context)),(n=>{n.createDefaultProps=()=>({})})(us||(us={})),p.extendClassProps(us.prototype,us.createDefaultProps),S.BasePropTreeItem=Rc,S.Boolean2Property=pm,S.Boolean2sProperty=vm,S.Boolean3Property=gm,S.Boolean3sProperty=ym,S.Boolean4Property=mm,S.Boolean4sProperty=_m,S.BooleanProperty=q,S.BooleansProperty=om,S.ColorProperty=Et,S.ColorRgbProperty=Sm,S.DashPatternProperty=Cm,S.DateProperty=ws,S.DatesProperty=If,S.Destroyable=H,S.DoublyLinkedList=ff,S.DragStartDataManager=Tf,S.ES3DTileset=on,S.ESAlarm=qc,S.ESApertureEffect=Xc,S.ESAreaMeasurement=Hc,S.ESBlastParticleSystem=Yc,S.ESBoxClipping=Jc,S.ESCameraView=hl,S.ESCameraViewCollection=dl,S.ESCameraVisibleRange=Bc,S.ESCar=pl,S.ESCityBasePoint=Xh,S.ESClassification=gl,S.ESClippingPlane=jc,S.ESCustomDiv=ml,S.ESCzml=Hh,S.ESDataMesh=Zc,S.ESDatasmithRuntimeModel=bh,S.ESDirectionMeasurement=vh,S.ESDistanceMeasurement=Kc,S.ESDynamicWater=Nh,S.ESEntityCluster=Wh,S.ESExcavate=uu,S.ESFeatureLayer=rf,S.ESFireParticleSystem=Qc,S.ESForestTileset=$c,S.ESGaussianSplatting=jh,S.ESGeoDiv=th,S.ESGeoDivTextPoi=qh,S.ESGeoExtrudedPolygon=Ws,S.ESGeoJson=cu,S.ESGeoLineString=Mi,S.ESGeoPoints=pu,S.ESGeoPolygon=Vt,S.ESGeoRectangle=eh,S.ESGeoVector=wt,S.ESGeoWater=Th,S.ESGltfModel=os,S.ESHeatMap=Cl,S.ESHeightLimitAnalysis=Gh,S.ESHeightMeasurement=yh,S.ESHole=Ah,S.ESHuman=Gs,S.ESHumanPoi=Lh,S.ESImageLabel=vl,S.ESImageryLayer=nh,S.ESJEditingMode=$,S.ESJLonLatFormat=Pf,S.ESJPickedResult=Dm,S.ESLabel=Vr,S.ESLevelRuntimeModel=Oh,S.ESLocalCircle=_h,S.ESLocalPolygon=hu,S.ESLocalPolygonZ=wh,S.ESLocalRectangle=Eh,S.ESLocalSkyBox=ih,S.ESLocalVector=Xo,S.ESLocalVector2D=Di,S.ESLocationMeasurement=sh,S.ESMsTileset=Vh,S.ESNavigator=Yh,S.ESObjectWithLocation=et,S.ESObjectsManager=us,S.ESParticleSystemPrimitive=yl,S.ESPath=Bo,S.ESPathImpl=as,S.ESPipeFence=El,S.ESPipeline=xh,S.ESPipeserTileset=Sh,S.ESPit=Yo,S.ESPlayer=Jo,S.ESPoi2D=lu,S.ESPoi3D=oh,S.ESPoiTileset=zh,S.ESPolygonFence=Sl,S.ESPolygonFlattenedPlane=ah,S.ESPolygonWithHole=Ih,S.ESRectangle=Ch,S.ESRtsFeatureEditing=kh,S.ESRtsTileset=Fh,S.ESScale=Uh,S.ESSceneObject=tt,S.ESSceneObjectWithId=Ym,S.ESSeparateFoliage=uh,S.ESSkylineAnalysis=Kh,S.ESStaticMesh=Zh,S.ESSubmergingAnalysis=lh,S.ESSunshineAnalysis=ch,S.ESSurfaceAreaMeasurement=Ph,S.ESTerrainLayer=hh,S.ESTestObject=Wc,S.ESTextLabel=Ho,S.ESUEWidget=fh,S.ESUnrealActor=dh,S.ESVideoFusion=ph,S.ESViewShed=gh,S.ESViewer=An,S.ESViewerStatusBar=Jh,S.ESViewerStatusBarScale=Bh,S.ESVisibilityAnalysis=Dh,S.ESVisualObject=Ft,S.ESVolumeMeasurement=Mh,S.ESWidget=mh,S.EngineObject=_s,S.EnumProperty=mt,S.EnumStringsProperty=Im,S.EvalStringProperty=Ui,S.Event=V,S.EventListenerHandler=Al,S.FunctionProperty=st,S.GroupPropTreeItem=kc,S.GroupProperty=it,S.JsonProperty=Q,S.LeafPropTreeItem=Fc,S.ListenerPipe=Ll,S.LongStringProperty=kl,S.MaximumScreenSpaceErrorProperty=im,S.MinmaxProperty=Pm,S.NearFarScalerProperty=bm,S.NextAnimateFrameEvent=mf,S.NonreactiveJsonStringProperty=Ef,S.Number2Property=ve,S.Number2sProperty=_f,S.Number3Property=Ge,S.Number3sProperty=Fl,S.Number4Property=pn,S.Number4WithUndefinedProperty=fm,S.Number4sProperty=dm,S.NumberProperty=L,S.NumberRangeProperty=Nm,S.NumberSliderProperty=Se,S.NumbersProperty=sm,S.ObjPool=xl,S.ObservableSet=wu,S.ParamsProperty=wf,S.PickedInfo=xm,S.Player=gn,S.PlayerProperty=Eu,S.PositionProperty=lo,S.PositionsProperty=Sf,S.PositionsSetPropety=Om,S.PropTree=Jp,S.PropUiTreeManager=qo,S.Property=zi,S.ReactVarProperty=yt,S.RotationProperty=Vl,S.SceneObjectFromId=Ul,S.SceneTree=au,S.SceneTreeContextMenu=$p,S.SceneTreeItem=je,S.SceneTreeItemDragDrop=Qp,S.SmartListenerHandler=Na,S.SmartListenerPipe=Bg,S.SmoothMoveController=z_,S.String2Property=am,S.String2sProperty=yf,S.String3Property=um,S.String3sProperty=cm,S.String4Property=lm,S.String4sProperty=hm,S.StringNumberProperty=wm,S.StringNumbersProperty=Em,S.StringProperty=ut,S.StringsProperty=vf,S.TreeItemDragDrop=Of,S.UriProperty=Ta,S.ViewPlayerProperty=Cf,S.ViewerCustomInteraction=Lg,S.Watcher=Oa,S.WatcherTools=Lf,S.WithUndefinedProperty=Rl,S.addTreesCallFunc=ig,S.animateFrame=Kg,S.bindCustomEditing=Mf,S.booleanPointInPolygon=Km,S.cartesianDistance=Yp,S.clamp0_360=co,S.clampN180_180=Df,S.createEventsCallFunc=uo,S.createPropTreeFromSceneObject=Bp,S.cutDownTreesCallFunc=ag,S.defaultFlyInParam=Rm,S.defaultFlyToParam=Es,S.defaultInitSceneObjectOnCreatingFunc=km,S.defaultLight122FromEnvironmentMapManager=Gc,S.defaultUpdateSceneObjectOnPickingFunc=Fm,S.destroyObject=uf,S.downloadLink=em,S.equalsN3=zc,S.geoAlong=ev,S.geoArea=Jl,S.geoBuffer=Gp,S.geoCenterOfMass=wv,S.geoDestination=$f,S.geoDifference=Wp,S.geoDistance=Ou,S.geoHeading=La,S.geoIntersect=zp,S.geoLineIntersect=Tv,S.geoNearestPointOnLine=Mv,S.geoPointToLineDistance=Fv,S.geoPolygonFromCircle=qp,S.geoPolygonOverlap=Lc,S.geoRhumbDestination=zv,S.geoRhumbDistance=hd,S.geoRhumbHeading=Gv,S.geoUnion=Up,S.getDefaultValue=Gm,S.getDistancesFromPositions=ou,S.getGeoBoundingSphereFromPositions=Hp,S.getMidpoint=xv,S.getMinMaxCorner=Xp,S.getSceneObjectTreeItem=Vm,S.getXyzFromPostion=Ac,S.growthSimulationCallFunc=ug,S.hasSameTags=xf,S.hasSameViewerTags=gi,S.inOrderRunning=Wm,S.interval=jg,S.isJSONString=Um,S.lbhToWebMerc=jm,S.lbhToXyz=Xn,S.lerpAngle=Cu,S.lerpRotation=zl,S.map=jp,S.nextAnimateFrame=gf,S.nextMicroTask=Qg,S.oneTimeWarning=pf,S.optionsStr=J_,S.reactPosition2Ds=Vc,S.registerCreatedEventUpdate=N_,S.registerEventCtor=lf,S.registerEventUpdate=T_,S.removeAllTreesCallFunc=sg,S.rpToap=zm,S.saveOnBrowser=tm,S.setSceneObjectTreeItem=Su,S.timeout=Zg,S.updateTreeParamsCallFunc=og,S.webMercToLbh=Zm,S.xyzToLbh=Rf,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|