@arcgis/core 5.1.0-next.80 → 5.1.0-next.82
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/analysis/ShadowCast/DiscreteOptions.d.ts +12 -0
- package/analysis/ShadowCast/TotalDurationOptions.d.ts +12 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +1 -0
- package/assets/esri/core/workers/chunks/05c5f68e117fc58ae801.js +1 -0
- package/assets/esri/core/workers/chunks/074f5e6aaeafca13bf72.js +1 -0
- package/assets/esri/core/workers/chunks/{7bd1d624f4f4a11a31e8.js → 086d7cdfa92a649c9f7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{0eed2b1b06355ab89013.js → 0c074c46d106ca4d3bad.js} +1 -1
- package/assets/esri/core/workers/chunks/{d7324a00ed576e7a37b1.js → 1768f1a7e3caa6074d91.js} +1 -1
- package/assets/esri/core/workers/chunks/{85d3475667c503ec4fc6.js → 186bfde8c552e3b42302.js} +1 -1
- package/assets/esri/core/workers/chunks/1a35121a0c2595a41fdb.js +1 -0
- package/assets/esri/core/workers/chunks/1ab66600579fa4232d7b.js +1 -0
- package/assets/esri/core/workers/chunks/{d5fd99ee40bba9b48a54.js → 1e2c0c6d724f7639d4c1.js} +27 -27
- package/assets/esri/core/workers/chunks/1e3fe89970c57a883fe5.js +1 -0
- package/assets/esri/core/workers/chunks/{824051af00e7a1f05ed0.js → 230e0e43f8e771950397.js} +1 -1
- package/assets/esri/core/workers/chunks/26f804c92077c11c626d.js +1 -0
- package/assets/esri/core/workers/chunks/28a45bd26eb5c9b3ec7c.js +1 -0
- package/assets/esri/core/workers/chunks/38f1a86b8dd9ee684ee5.js +596 -0
- package/assets/esri/core/workers/chunks/{c1d4110aa494a1dba3c4.js → 455d08294e0f5c5509ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{71fe127734f33d020a44.js → 475394218caaa4cd3e86.js} +1 -1
- package/assets/esri/core/workers/chunks/475409026288f0981ce2.js +1 -0
- package/assets/esri/core/workers/chunks/4e206957b28253ddc1a3.js +1 -0
- package/assets/esri/core/workers/chunks/{87d2021e91d025a2a142.js → 5c7ba4b8a9ec2e2e02b5.js} +1 -1
- package/assets/esri/core/workers/chunks/5cc38ac051d3d0557920.js +1 -0
- package/assets/esri/core/workers/chunks/{992cd87ba0ab6346f692.js → 64e268ebac0b62076f81.js} +1 -1
- package/assets/esri/core/workers/chunks/{003fd7745966fe03510c.js → 65ac73de5bb133c6bf89.js} +1 -1
- package/assets/esri/core/workers/chunks/6675d56f49d07a97dc40.js +1 -0
- package/assets/esri/core/workers/chunks/{1f82a0f134ea912fc686.js → 66fe1634c6e8f72fc653.js} +1 -1
- package/assets/esri/core/workers/chunks/{96b13b6042cdf5833d39.js → 67abbe81c16de26f61d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{484d6c1b0fe1633515b7.js → 72f8f4cfa0842d325fb0.js} +1 -1
- package/assets/esri/core/workers/chunks/{283d39dfb1625b5a74db.js → 747e258f57f0543c836e.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd4f431511edd975a53b.js → 7acf82763aeba44049d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d8e944b192aad4cf986.js → 7b505112c7e6d9b7a239.js} +1 -1
- package/assets/esri/core/workers/chunks/7b8466f892a38a53c600.js +1 -0
- package/assets/esri/core/workers/chunks/{6a0352d20596ca3f4b64.js → 88eb1e4320c4ada01711.js} +1 -1
- package/assets/esri/core/workers/chunks/{77dd719516138afb1a2a.js → 8af9a78cf316581ea482.js} +1 -1
- package/assets/esri/core/workers/chunks/97719271a3e4c9f2b2c9.js +1 -0
- package/assets/esri/core/workers/chunks/988e91cc6cf88c34c2de.js +1 -0
- package/assets/esri/core/workers/chunks/9c402657f63a4d5668d0.js +1 -0
- package/assets/esri/core/workers/chunks/9cac70164d8528c283af.js +1 -0
- package/assets/esri/core/workers/chunks/9ea23cd4b2664c08b670.js +1 -0
- package/assets/esri/core/workers/chunks/9f51a69b8f1937a8794a.js +1 -0
- package/assets/esri/core/workers/chunks/a28124bba6b43efd74cc.js +1 -0
- package/assets/esri/core/workers/chunks/ac5999c88c27b49cd760.js +1 -0
- package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +1 -0
- package/assets/esri/core/workers/chunks/{056fd7847caaff2c9514.js → af8bc56cf1404afc3028.js} +1 -1
- package/assets/esri/core/workers/chunks/b811d62284be95f4beb6.js +1 -0
- package/assets/esri/core/workers/chunks/b9e163f4a898e50cc854.js +1 -0
- package/assets/esri/core/workers/chunks/{444f0f51b3ee0b9845a5.js → bb2f6b0fcdfb8b158e26.js} +1 -1
- package/assets/esri/core/workers/chunks/{3b9100c59a8050f4834e.js → bbc27d9285162696d089.js} +1 -1
- package/assets/esri/core/workers/chunks/{5da2051f548c2942e01a.js → bc8a74da48b08309875f.js} +1 -1
- package/assets/esri/core/workers/chunks/bd8cb64b6e08839398f3.js +1 -0
- package/assets/esri/core/workers/chunks/{026d3fa331caec1ea3d2.js → bf4dd8e50704e4040966.js} +1 -1
- package/assets/esri/core/workers/chunks/c19e3f6027b6526de359.js +1 -0
- package/assets/esri/core/workers/chunks/c8ef80a7c46d7d2c5172.js +1 -0
- package/assets/esri/core/workers/chunks/cbf1a03f54bd8d2a2b47.js +1 -0
- package/assets/esri/core/workers/chunks/ce4dfc3a470230ddc9e4.js +1 -0
- package/assets/esri/core/workers/chunks/{8ea4584e07ccc85caabd.js → d11de13537b623739e14.js} +1 -1
- package/assets/esri/core/workers/chunks/d897412b99b9fba44bb4.js +1 -0
- package/assets/esri/core/workers/chunks/d9c3f14eee4db7a7137b.js +1 -0
- package/assets/esri/core/workers/chunks/{035dbb0217f83108fa89.js → db86a1119e4e58ecfbda.js} +1 -1
- package/assets/esri/core/workers/chunks/dcb7a3ff59677b1cf0f1.js +1 -0
- package/assets/esri/core/workers/chunks/{5fe97253f80c797fad7f.js → df8a3d3cac454d42e14d.js} +1 -1
- package/assets/esri/core/workers/chunks/dfe1139124fda0d6c059.js +1 -0
- package/assets/esri/core/workers/chunks/{8b8f391f27774aec6db9.js → e0b27bceb397482bd0e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{fb9e3e7cd532ac4353f1.js → e89dc473f46a5584d2ef.js} +32 -32
- package/assets/esri/core/workers/chunks/{01ee18782a50279f907e.js → f4220b6eab0865318033.js} +1 -1
- package/assets/esri/core/workers/chunks/{42336e0d1ef88737b078.js → f468c6ea2818a1f97e19.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f242f8d092f601c3abf.js → f77d23ee60c876b01e4b.js} +1 -1
- package/assets/esri/core/workers/chunks/fce2306a1b31c6680f90.js +1 -0
- package/assets/esri/core/workers/chunks/fcf51697c361e0075cc2.js +1 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +15 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
- package/chunks/ShadowCastVisualize.glsl.js +33 -15
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/config.js +1 -1
- package/core/workers/registry.js +1 -1
- package/form/elements/inputs/MultipleChoiceInput.d.ts +6 -6
- package/form/elements/inputs/MultipleChoiceInput.js +1 -1
- package/form/elements/inputs.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/geometry/support/coordsUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/BaseDynamicLayer.js +1 -1
- package/layers/BaseTileLayer.js +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/FeatureLayer.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/TileLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/WebTileLayer.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/MemorySource.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/mixins/TiledImagery.js +1 -1
- package/layers/support/imageBitmapUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +1 -1
- package/request/process.js +1 -1
- package/rest/knowledgeGraph/CreateReplicaResponse.d.ts +37 -0
- package/rest/knowledgeGraph/CreateReplicaResponse.js +2 -0
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +91 -0
- package/rest/knowledgeGraph/ReplicaDefinition.js +2 -0
- package/rest/knowledgeGraph/ReplicasInformationResponse.d.ts +24 -0
- package/rest/knowledgeGraph/ReplicasInformationResponse.js +2 -0
- package/rest/knowledgeGraph/UnregisterReplicaResponse.d.ts +44 -0
- package/rest/knowledgeGraph/UnregisterReplicaResponse.js +2 -0
- package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +2 -0
- package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +2 -0
- package/rest/knowledgeGraphService.d.ts +50 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/input/MapViewInputManager.js +1 -1
- package/views/2d/layers/BaseDynamicLayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/WMSLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerWorker.js +2 -0
- package/views/3d/layers/IntegratedMesh3DTilesLayerWorkerHandle.js +2 -0
- package/views/3d/layers/TileLayerView3D.js +1 -1
- package/views/3d/layers/WMTSLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +2 -0
- package/views/3d/layers/support/makeScheduleFunction.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/terrain/TerrainData.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialInitParameters.js +2 -0
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/StencilUtils.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/materials/VisualVariablePassParameters.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/colorRampParameters.js +2 -0
- package/views/VideoView.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/input/BrowserEventSource.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/input/handlers/LatestPen.js +2 -0
- package/views/input/handlers/LatestPointer.js +1 -1
- package/views/input/types.d.ts +1 -1
- package/views/interactive/Tooltip.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/TextureCompressionWorkerHandle.js +1 -1
- package/views/support/unnormalizationUtils.js +2 -0
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/renderState.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/ElevationProfile/support/profileUtils.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/05c3146d87d917606193.js +0 -1
- package/assets/esri/core/workers/chunks/0b77c124b743067e4155.js +0 -1
- package/assets/esri/core/workers/chunks/11241781baaed346af52.js +0 -1
- package/assets/esri/core/workers/chunks/1d9560eb8b21b9e76616.js +0 -1
- package/assets/esri/core/workers/chunks/2c87c3112a43db8624f6.js +0 -1
- package/assets/esri/core/workers/chunks/2da62687ff678b690839.js +0 -1
- package/assets/esri/core/workers/chunks/3a58708217a9c11836ab.js +0 -1
- package/assets/esri/core/workers/chunks/3bbf684ee2484eb44c9f.js +0 -1
- package/assets/esri/core/workers/chunks/49fb9c47070641bce9a9.js +0 -1
- package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +0 -1
- package/assets/esri/core/workers/chunks/4f9d027055f3a616173c.js +0 -1
- package/assets/esri/core/workers/chunks/5417308eba30e668b1ee.js +0 -1
- package/assets/esri/core/workers/chunks/62b3e933f548ce354b99.js +0 -1
- package/assets/esri/core/workers/chunks/63381d81adce0a0d2089.js +0 -1
- package/assets/esri/core/workers/chunks/6dbddf5ab1867ac2ac80.js +0 -1
- package/assets/esri/core/workers/chunks/6e70e922331704b92a08.js +0 -1
- package/assets/esri/core/workers/chunks/7c7c11c0fde8b63e330b.js +0 -1
- package/assets/esri/core/workers/chunks/7f55eef696e9ed717bfc.js +0 -1
- package/assets/esri/core/workers/chunks/89dbea6f436d45a3b185.js +0 -1
- package/assets/esri/core/workers/chunks/8f6f5dad52747d252aac.js +0 -596
- package/assets/esri/core/workers/chunks/99c189e1de2b1f14799b.js +0 -1
- package/assets/esri/core/workers/chunks/9aa6b32cb65fbaa93218.js +0 -1
- package/assets/esri/core/workers/chunks/9d216e30d04ea21fc8a2.js +0 -1
- package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +0 -1
- package/assets/esri/core/workers/chunks/a5d8d6f3c0c8de474efd.js +0 -1
- package/assets/esri/core/workers/chunks/a809b811121099a87a98.js +0 -1
- package/assets/esri/core/workers/chunks/c02ba921c0a32d2021e3.js +0 -1
- package/assets/esri/core/workers/chunks/c3c19b62d948d53118a8.js +0 -1
- package/assets/esri/core/workers/chunks/c46a4adea39636a96d03.js +0 -1
- package/assets/esri/core/workers/chunks/c5507480344176fad241.js +0 -1
- package/assets/esri/core/workers/chunks/c6030271bd6d39b6e1db.js +0 -1
- package/assets/esri/core/workers/chunks/d1a7d13e1d48abcd7bf1.js +0 -1
- package/assets/esri/core/workers/chunks/dcbc4072c18278c2b67d.js +0 -1
- package/assets/esri/core/workers/chunks/e610d24539a675fb054b.js +0 -1
- package/assets/esri/core/workers/chunks/ecb7ede6a8e6c05e4c6c.js +0 -1
- package/assets/esri/core/workers/chunks/f227b34cce6843df0fb6.js +0 -1
- package/assets/esri/core/workers/chunks/fb5a2205f05afc396119.js +0 -1
- package/request/ImageWithType.js +0 -2
- package/views/3d/layers/support/fetchTile.js +0 -2
- package/views/interactive/editGeometry/unnormalizationHelper.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5752],{69052(e,t,i){i.d(t,{hr:()=>s,ie:()=>l,uC:()=>o});var n=i(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return r(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+a(this.range,e-t,i)}minimalMonotonic(e,t,i){return r(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);const i=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(n)?i:n}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function r(e,t,i,n,s=0,r=!1){return(n-=s)<t?n+=a(e,t-n):n>i&&(n-=a(e,n-i)),r&&n===i&&(n=t),n+s}function a(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const o=new s(0,2*Math.PI),l=(new s(-Math.PI,Math.PI),new s(0,360))},56512(e,t,i){function n(e){let t,i,n=[],s=!1;return function(...r){return s&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}(r,n)||(i=e.apply(this,r),t=this,n=r,s=!0),i}}i.d(t,{B:()=>n})},44794(e,t,i){i.d(t,{v:()=>o});var n=i(4718),s=i(62788),r=i(95488);class a{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,s.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=n.gh){return new a(e,t)}},44123(e,t,i){i.d(t,{WhereClauseCache:()=>r});var n=i(66344),s=i(89696);class r{constructor(e,t){this._cache=new n.q(e),this._invalidCache=new n.q(t)}get(e,t){const i=`${t?.uid}:${e}`,n=this._cache.get(i);if(n)return n;if(null!=this._invalidCache.get(i))return null;try{const n=s.A.create(e,{fieldsIndex:t});return this._cache.put(i,n),n}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},46329(e,t,i){i.d(t,{y:()=>d});var n=i(49186),s=i(4305),r=i(513),a=i(50954),o=i(52006),l=i(49663),u=i(46068),c=i(59803);function d(e,t,i){if((0,o.Xq)(t))return(0,c.T)(e,t,i);if((0,o.n1)(t)){const r=(0,s.m_)(e,t,i)[0];if(null==r)throw new n.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return r}if((0,o.aO)(t)){const n=(0,a.pM)(e,t);return(0,r.fM)(n,i)}if((0,o.DA)(t)){const n=(0,l.io)(e,t);return(0,r.fM)(n,i)}const d=(0,u.SW)(e,t);return(0,u.pb)(d,i)}},31411(e,t,i){i.d(t,{GS:()=>F,gh:()=>I});var n=i(49186),s=i(56512),r=i(65864),a=i(4305),o=i(50954),l=i(52006),u=i(49663),c=i(46068),d=i(15507);const p=1e-6,h=[0,0];function f(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class m{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:i,maxSegmentsPerCurve:n,minSegmentsPerCurve:s}){const r=i*i,a=t*t,o=1/n,l=this.interpolate(0),u=this.interpolate(1);(0,d.kb)(this.curveStart,l)>p&&e.push(l),this.initialize(l,u);const c=1/s;for(let e=s-1;e>0;e--){const t=e*c;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===r||!isFinite(r)||(0,d.kb)(this.arcStart,this.arcEnd)<r)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,u)>p&&e.push([...this.curveEnd]),e}}class y extends m{constructor(e,t){const[i,n,s]=t.b;super(e,i),this._controlPointsStack=[],this._curveControlPoints=[n,s],this._arcControlPoints=[n,s],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:i,tStart:n,tEnd:s}=this,[r,a]=this._arcControlPoints,o=(e-n)/(s-n),l=(0,d.RS)([],t,r,o),u=(0,d.RS)(h,r,a,o),c=(0,d.RS)([],a,i,o),p=(0,d.RS)([],l,u,o),f=(0,d.RS)([],u,c,o),m=(0,d.RS)([],p,f,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,c]),this.tEndStack.push(e),this.arcEndStack.push(m),this._arcControlPoints[0]=l,this._arcControlPoints[1]=p,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:i}=this,[n,s]=this._curveControlPoints;return(0,a.B4)(t,n,s,i,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[i,n]=this._arcControlPoints;return Math.max((0,d.yE)(i,e,t),(0,d.yE)(n,e,t))}}class g extends m{constructor(e,t){const[i]=t.a;super(e,i),this._derivedEllipse=(0,c.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,c.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function x(e,t,i,{cx:n,cy:s,radius:r,thetaStart:a,thetaEnd:o,isInvalid:l},{maxDeviation:u,maxSegmentLength:c,maxSegmentsPerCurve:h,minSegmentsPerCurve:f}){if(l)return e.push([...i]),e;const m=2*r,y=[n+r*Math.cos(a),s+r*Math.sin(a)],g=[n+r*Math.cos(o),s+r*Math.sin(o)];(0,d.kb)(t,y)>p&&e.push(y);const x=Math.abs(o-a),_=c>0&&c<m?2*Math.asin(c/m):x,S=u>0&&u<=r?2*Math.acos(1-u/r):x,v=Math.min(_,S),T=Math.min(h,Math.max(f,Math.ceil(Math.abs(x/v)))),E=1/T;for(let t=1;t<T;t++){const i=t*E,l=a*(1-i)+o*i;e.push([n+r*Math.cos(l),s+r*Math.sin(l)])}return e.push(g),(0,d.kb)(i,g)>p&&e.push([...i]),e}function _(e,t,i,n){return new y(t,i).densify(e,n)}function S(e,t,i,n){const s=(0,o.pM)(t,i),[r]=i.c;return x(e,t,r,s,n)}function v(e,t,i,n){const s=(0,u.io)(t,i),[r]=i.a;return x(e,t,r,s,n)}function T(e,t,i,n){const[s,r,a,o,l,u,c]=i.a;return 0===u||0===c?(e.push([...s]),e):new g(t,i).densify(e,n)}function E(e,t,i,n){return(0,l.Xq)(i)?(e.push([...i]),e):(0,l.n1)(i)?_(e,t,i,n):(0,l.aO)(i)?S(e,t,i,n):(0,l.DA)(i)?v(e,t,i,n):T(e,t,i,n)}function F(e,t={}){if(!(0,l.Ed)(e))return e;const i=f(t),n=(0,l.FD)(e),s=[];for(const e of n){const t=[];for(let n=0;n<e.length-1;n++){const s=n+1,r=[...(0,l.yP)(e[n])];0===n&&t.push(r),E(t,r,e[s],i)}s.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:s,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:s,spatialReference:e.spatialReference}}const R=(0,s.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function I(e,t,s){const a=new Set(t);return await async function(e,t,s){let r=null;for(const a of e)if(a&&(0,l.Ed)(a)&&null==a.spatialReference.xyTolerance&&(0,l.V8)(a,t)){const e=a.spatialReference;if(!e)throw new n.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=w(e);if(s.has(t))a.spatialReference=s.get(t);else{r||(r=await Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(6312)]).then(i.bind(i,78125)));const o=r.fromSpatialReference(e),l=o?.getTolerance();if(null==l)throw new n.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const u=a.spatialReference.clone();u.read({xyTolerance:l}),a.spatialReference=u,s.set(t,u)}}}(e,a,s),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const i=e.spatialReference.xyTolerance;if(null==i)return e;const n=R(i);return(0,r.rS)(function(e,t,i){if(!(0,l.Ed)(e))return e;const n=new Set(t),s=f(i),r=(0,l.FD)(e),a=[];let o=!1;for(const e of r){const t=[];for(let i=0;i<e.length-1;i++){const r=i+1,a=[...(0,l.yP)(e[i])];0===i&&t.push(a);const u=e[r];(0,l.Xq)(u)?t.push([...u]):(0,l.n1)(u)&&!n.has("cubic-bezier")?_(t,a,u,s):(0,l.aO)(u)&&!n.has("circular-arc")?S(t,a,u,s):(0,l.DA)(u)&&!n.has("elliptic-arc")?v(t,a,u,s):(0,l.wY)(u)&&!n.has("elliptic-arc")?T(t,a,u,s):(t.push((0,l.tk)(u)),o=!0)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...o?{curvePaths:a}:{paths:a}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...o?{curveRings:a}:{rings:a}}}(e,t,n))})}function w(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},17136(e,t,i){i.d(t,{Y_:()=>b,O7:()=>A,el:()=>w});var n=i(92602),s=i(69052),r=i(49186),a=i(53966),o=i(39829),l=i(82799),u=i(16930),c=i(80754),d=i(21325),p=i(28735),h=i(52006),f=i(31411),m=i(11254),y=i(60408),g=i(65864),x=i(2272),_=i(84952),S=i(92300);const v=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function T(e){return"polygon"===e[0].type}function E(e){return"polyline"===e[0].type}function F(e,t,i){const n=1e6;if(t){const t=(0,h.Ed)(e)?(0,f.GS)(e,{maxSegmentLength:n}):function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw v().error(e),new r.A("internal:geometry",e)}const i=(0,c.r8)(e),n=[];for(const e of i){const i=[];n.push(i),i.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const s=e[n][0],r=e[n][1],a=e[n+1][0],o=e[n+1][1],l=Math.sqrt((a-s)*(a-s)+(o-r)*(o-r)),u=(o-r)/l,c=(a-s)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const n=e*t,a=c*n+s,o=u*n+r;i.push([a,o])}const e=(l+Math.floor(d-1)*t)/2,n=c*e+s,a=u*e+r;i.push([n,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:n,spatialReference:e.spatialReference}):new l.A({paths:n,spatialReference:e.spatialReference})}(e,n);e=(0,p.ci)(t,!0)}return i&&(e=(0,c.kS)(e,i)),e}function R(e,t,i){if(Array.isArray(e)){const n=e[0];if(n>t){const i=(0,c.kd)(n,t);e[0]=n+i*(-2*t)}else if(n<i){const t=(0,c.kd)(n,i);e[0]=n+t*(-2*i)}}else{const n=e.x;if(n>t){const i=(0,c.kd)(n,t);e=e.clone().offset(i*(-2*t),0)}else if(n<i){const t=(0,c.kd)(n,i);e=e.clone().offset(t*(-2*i),0)}}return e}function I(e,t){let i=-1;for(let n=0;n<t.cutIndexes.length;n++){const s=t.cutIndexes[n],r=t.geometries[n],a=(0,c.r8)(r);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const n=t[e][0];i=n>i?n:i}i=Number(i.toFixed(9));const n=-360*(0,c.kd)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(n,0))}return!0}})}if(s===i){if(T(e))for(const t of(0,c.r8)(r))e[s]=e[s].addRing(t);else if(E(e))for(const t of(0,c.r8)(r))e[s]=e[s].addPath(t)}else i=s,e[s]=r}return e}async function w(e,t,i){if(!Array.isArray(e))return w([e],t);t&&"string"!=typeof t&&v().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let r,a,u,h,f,T,E,A,M=0;const b=[],C=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,a=(0,d.Vp)(r),u=r.isWebMercator,T=u?102100:4326,h=c.j7[T].maxX,f=c.j7[T].minX,E=c.j7[T].plus180Line,A=c.j7[T].minus180Line),a)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(R(t.clone(),h,f));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>R(e,h,f)),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,a);C.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,i=(0,c.kd)(e.xmin,f)*(2*h);let n=0===i?t.clone():(0,c.kS)(t.clone(),i);e.offset(i,0);let{xmin:s,xmax:r}=e;s=Number(s.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(E)&&r!==h?(M=r>M?r:M,n=F(n,u),b.push(n),C.push("cut")):e.intersects(A)&&s!==f?(M=r*(2*h)>M?r*(2*h):M,n=F(n,u,360),b.push(n),C.push("cut")):C.push(n)}else C.push(t.clone());else C.push(t);else C.push(t);let O=(0,c.kd)(M,h),N=-90;const P=O,z=new l.A;for(;O>0;){const e=360*O-180;z.addPath([[e,N],[e,-1*N]]),N*=-1,O--}if(b.length>0&&P>0){const t=I(b,await async function(e,t,i,n){const s=(0,x.Dl)(e),r=t[0].spatialReference,a={...n,responseType:"json",query:{...s.query,f:"json",sr:(0,d.YX)(r),target:JSON.stringify({geometryType:(0,y.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,m.A)(s.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=r,t})}}(s,b,z,i)),n=[],r=[];for(let i=0;i<C.length;i++){const s=C[i];if("cut"!==s)r.push(s);else{const s=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&s.rings.length>=a.rings.length?(n.push(s),r.push("simplify")):r.push(u?(0,p.Gh)(s):s)}}if(!n.length)return r;const a=await async function(e,t,i){const n="string"==typeof e?(0,_.An)(e):e,s=t[0].spatialReference,r=(0,y.$B)(t[0]),a={...i,query:{...n.query,f:"json",sr:(0,d.YX)(s),geometries:JSON.stringify((0,S.X)(t))}},{data:o}=await(0,m.A)(n.path+"/simplify",a);return(0,S.V)(o.geometries,r,s)}(s,n,i),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(a.shift()):a.shift())}return o}const V=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)V.push(t);else{const e=b.shift();V.push(!0===u?(0,p.Gh)(e):e)}}return V}function A(e,t,i){const n=(0,d.Vp)(i);if(null==n)return e;const[s,r]=n.valid,a=2*r;let o=0,l=0;t>r?o=Math.ceil(Math.abs(t-r)/a):t<s&&(o=-Math.ceil(Math.abs(t-s)/a)),e>r?l=Math.ceil(Math.abs(e-r)/a):e<s&&(l=-Math.ceil(Math.abs(e-s)/a));let u=e+(o-l)*a;const c=u-t;return c>r?u-=a:c<s&&(u+=a),u}function M(e){const t=(0,d.Vp)(e);if(null==t)return null;const[i,n]=t.valid;return new s.hr(i,n)}const b=M(u.A.WGS84);M(u.A.WebMercator)},80754(e,t,i){i.d(t,{j7:()=>o,kS:()=>u,kd:()=>l,r8:()=>c});var n=i(82799),s=i(16930),r=i(60408),a=i(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,a.Ed)(e))for(const i of function(e){return(0,r.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of i){if((0,a.aO)(e)){const[i,n]=e.c;i[0]+=t,n[0]+=t;continue}if((0,a.FG)(e)){const[i,n]=e.a;i[0]+=t,n[0]+=t;continue}if((0,a.n1)(e)){const[i,n,s]=e.b;i[0]+=t,n[0]+=t,s[0]+=t;continue}e[0]+=t}for(const i of c(e))for(const e of i)e[0]+=t;return e}function c(e){return(0,r.Bi)(e)?e.rings:e.paths}},62577(e,t,i){function n(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance,1,1]:[1,1,1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax,e.extent.zmin??0,e.extent.mmin??0]:[0,0,0,0]}:null}function s(e){if(function(e){return"lowerLeft"===e.originPosition&&4===e.scale.length&&4===e.translate.length}(e))return e;const{originPosition:t,scale:i,translate:n}=e,s=i[0]??1,r=i[1]??1;return{originPosition:"lowerLeft",scale:[s,"lowerLeft"===t?r:-r,i[2]??1,i[3]??1],translate:[n[0]??0,n[1]??0,n[2]??0,n[3]??0]}}function r({scale:e,translate:t},i){return Math.round((i-t[0])/e[0])}function a({scale:e,translate:t},i){return Math.round((i-t[1])/e[1])}function o({scale:e,translate:t},i){return i*e[0]+t[0]}function l({scale:e,translate:t},i){return i*e[1]+t[1]}function u({scale:e,translate:t},i){return(i??0)*e[2]+t[2]}function c({scale:e,translate:t},i){return i?i*e[3]+t[3]:0}function d(e,t){return e&&t?m:e&&!t?h:!e&&t?f:p}i.d(t,{$X:()=>S,B2:()=>a,Gy:()=>g,IE:()=>r,P5:()=>v,Q1:()=>s,SW:()=>x,Tr:()=>_,VV:()=>n});const p=(e,t)=>{const i=new Array(t.length);if(!t.length)return i;const n=t[0];let s=o(e,n[0]),r=l(e,n[1]);i[0]=[s,r];const{scale:a,originPosition:u}=e,c=a[0],d="lowerLeft"===u?a[1]:-a[1];for(let e=1;e<t.length;e++){const[n,a]=t[e];s+=c*n,r+=d*a,i[e]=[s,r]}return i},h=(e,t)=>{const i=new Array(t.length);if(!t.length)return i;const n=t[0];let s=o(e,n[0]),r=l(e,n[1]);i[0]=[s,r,u(e,n[2])];const{scale:a,originPosition:c}=e,d=a[0],p="lowerLeft"===c?a[1]:-a[1];for(let n=1;n<t.length;n++){const[a,o,l]=t[n];s+=d*a,r+=p*o,i[n]=[s,r,u(e,l)]}return i},f=(e,t)=>{const i=new Array(t.length);if(!t.length)return i;const n=t[0];let s=o(e,n[0]),r=l(e,n[1]);i[0]=[s,r,c(e,n[2])];const{scale:a,originPosition:u}=e,d=a[0],p="lowerLeft"===u?a[1]:-a[1];for(let n=1;n<t.length;n++){const[a,o,l]=t[n];s+=d*a,r+=p*o,i[n]=[s,r,c(e,l)]}return i},m=(e,t)=>{const i=new Array(t.length);if(!t.length)return i;const n=t[0];let s=o(e,n[0]),r=l(e,n[1]);i[0]=[s,r,u(e,n[2]),c(e,n[3])];const{scale:a,originPosition:d}=e,p=a[0],h="lowerLeft"===d?a[1]:-a[1];for(let n=1;n<t.length;n++){const[a,o,l,d]=t[n];s+=p*a,r+=h*o,i[n]=[s,r,u(e,l),c(e,d)]}return i};function y(e,t,i){const n=new Array(i.length);for(let s=0;s<i.length;s++)n[s]=t(e,i[s]);return n}function g(e,t,i){const n=s(e);return t.x=r(n,i.x),t.y=a(n,i.y),null!=i.z&&(t.z=function({scale:e,translate:t},i){return Math.round(((i??0)-t[2])/e[2])}(n,i.z)),null!=i.m&&(t.m=function({scale:e,translate:t},i){return i?Math.round((i-t[3])/e[3]):0}(n,i.m)),t}function x(e,t,i,n=i?.hasZ??!1,r=i?.hasM??!1){if(null!=i){const a=s(e);t.points=d(n,r)(a,i.points),t.hasZ=n,t.hasM=r}return t}function _(e,t,i,n=null!=i?.z,r=null!=i?.m){if(null==i)return t;const a=s(e);return t.x=o(a,i.x),t.y=l(a,i.y),n&&(t.z=u(a,i.z)),r&&(t.m=c(a,i.m)),t}function S(e,t,i,n=i?.hasZ??!1,r=i?.hasM??!1){if(null!=i){const a=s(e);t.rings=y(a,d(n,r),i.rings),t.hasZ=n,t.hasM=r}return t}function v(e,t,i,n=i?.hasZ??!1,r=i?.hasM??!1){if(null!=i){const a=s(e);t.paths=y(a,d(n,r),i.paths),t.hasZ=n,t.hasM=r}return t}},75752(e,t,i){i.d(t,{do:()=>B,Wc:()=>q});var n=i(4576),s=i(21818),r=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(17676),u=i(86211),c=i(12195),d=i(91218),p=i(70328),h=i(19419),f=i(537),m=i(60408),y=i(65864),g=i(17136),x=i(21325),_=i(90708),S=i(29441),v=i(51441),T=i(31464);class E{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,n]of this._storage){if(!(n.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new R(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let F=0;class R{constructor(e){this.items=e,this.time=performance.now(),this.id=F++}}var I=i(99352),w=i(8384),A=i(58727),M=i(62660),b=i(43668);const C="unsupported-query";async function O(e,{fieldsIndex:t,geometryType:i,spatialReference:n,availableFields:s}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.A(C,"Unsupported query options",{query:e});return N(t,s,e),function(e,t,i){const{outStatistics:n,groupByFieldsForStatistics:s,having:a}=i,o=s?.length,l=n?.length;if(a){if(!o||!l)throw new r.A(C,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,S.eD)(e,t,a,n,i)}if(l){if(null==(u=n)||!u.every(e=>"exceedslimit"!==e.statisticType))return;const a=n.map(e=>e.onStatisticField).filter(Boolean);(0,S.MG)(e,t,a,{expressionName:"onStatisticFields",query:i}),o&&(0,S.MG)(e,t,s,{expressionName:"groupByFieldsForStatistics",query:i});for(const s of n){const{onStatisticField:n,statisticType:a}=s;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in s))e.get(n)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,S.MG)(e,t,[n],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:P,query:i});else{const{statisticParameters:e}=s;if(!e)throw new r.A(C,"statisticParameters should be set for percentile type",{definition:s,query:i})}}}var u}(t,s,e),Promise.all([(0,M.c0)(e,i,n),(0,T.Nk)(n,e.outSR)]).then(()=>e)}function N(e,t,i){const{returnDistinctValues:n,outStatistics:s}=i,a=s?s.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const n=" asc",s=" desc",r=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(n)?t.split(n)[0]:t.includes(s)?t.split(s)[0]:e}).filter(e=>!a.includes(e));(0,S.MG)(e,t,r,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,S.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(n)throw new r.A(C,"outFields should be specified for returnDistinctValues",{query:i});(0,S.SN)(e,t,i.where,i)}const P=new Set([...S.vl,...S.VW]);async function z(e,t,i,n){let s=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,b.l)();s=e.extractFieldNames(i.valueExpression)}if(i.field&&s.push(i.field),i.field2&&s.push(i.field2),i.field3&&s.push(i.field3),i.normalizationField&&s.push(i.normalizationField),!s.length&&!i.valueExpression)throw new r.A(C,"field or valueExpression is required",{params:i});(0,S.MG)(e,t,s,{expressionName:"statistics",query:n})}var V=i(86420),D=i(95466),G=i(92359);class B{constructor(e){this._changeHandle=null,this.capabilities={query:I.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new E,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:D.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=G.nu}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new r.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),n)}async executeQueryForUniqueValues(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),n)}async executeQueryForClassBreaks(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),n)}async executeQueryForHistogram(e={},t,i){const n=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),n)}async executeQueryForSnapping(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,V.W)(this.timeInfo,this.featureStore);const[i,n]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:n}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new w.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==A.v8)throw e;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const n=i.size;if(!n)return{count:0,extent:null};const s=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:n,extent:s}}catch(e){if(e===A.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,n=new Set;for(const e of i)n.add(t.featureAdapter.getObjectId(e));return n}catch(e){if(e===A.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new w.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,A.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new r.A(C,"Unsupported query options",{query:e});return O(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==A.v8)throw i;t=new w.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:n,field3:s,valueExpression:r}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:n,field3:s,valueExpression:r});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:n,valueExpression:s}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:n,valueExpression:s});return yield,await r.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:n,returnEdge:s,vertexMode:r}=e;if(!s&&"none"===r)return{candidates:[]};let o=(0,a.o8)(e.query);o=await(0,A.T2)(o,this.definitionExpression,this.spatialReference),yield,o=await O(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const l=!(0,x.aI)(i.spatialReference,this.spatialReference);l&&(await(0,T.Nk)(i.spatialReference,this.spatialReference),yield);const u="number"==typeof n?n:n.x,c="number"==typeof n?n:n.y,d={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},p=l?(0,T.Cv)(d,this.spatialReference):d;if(!p)return{candidates:[]};const h=(await(0,g.el)((0,y.rS)(i),null,{signal:t}))[0];yield;const f=(await(0,g.el)((0,y.rS)(p),null,{signal:t}))[0];if(yield,null==h||null==f)return{candidates:[]};const m=await this._searchFeatures(L(f.toJSON()));yield;const _=new w.G(m,o,this);this._executeObjectIdsQuery(_),yield,this._executeTimeQuery(_),yield,this._executeAttributesQuery(_),yield,yield*this._executeGeometryQueryForSnapping(_),yield;const S=h.toJSON(),v=l?(0,T.Cv)(S,this.spatialReference):S,E=l?Math.max(p.xmax-p.xmin,p.ymax-p.ymin)/2:n;return _.createSnappingResponse({...e,point:v,distance:E},o.returnZ,i.spatialReference)}async _getBounds(e,t,i){const n=(0,p.hZ)((0,p.vt)(),p.qv);return await this.featureStore.forEachBounds(e,e=>(0,p.RF)(n,e)),q(n,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new w.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,s.z)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await O(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const n=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(n),yield,this._executeObjectIdsQuery(n),yield,this._executeTimeQuery(n),yield,this._executeAttributesQuery(n),n}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:n}=e,s=this.featureStore.featureSpatialReference,r=e.sceneFilter.geometry,a=null==s||(0,x.aI)(s,r.spatialReference)?r:(0,T.Cv)(r,s);if(!a)return null;const o=i||n,l=(0,x.fn)(t)&&!(0,x.aI)(this.spatialReference,t)&&o?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(L(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const n=await(0,M.xt)("esriSpatialRelDisjoint",a,this.geometryType);yield;const s=e=>!t.has(u.getObjectId(e))||n(u.getGeometry(e)),r=yield*this._runSpatialFilter(i,s);yield;const o=new w.G(r,e,this);return await l(o)}if(!c.length)return new w.G([],e,this);if(this._canExecuteSinglePass(a,e))return await l(new w.G(c,e,this));const d=await(0,M.xt)("esriSpatialRelContains",a,this.geometryType);yield;const p=yield*this._runSpatialFilter(c,e=>d(u.getGeometry(e)));return yield,await l(new w.G(p,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;const{geometry:i,outSR:s,returnGeometry:r,returnCentroid:a}=e,o=t?null:this._getCacheKey(e),l=o?this._cache.get(o):null;if(l)return new w.G(l,e,this);const u=(0,x.fn)(s)&&!(0,x.aI)(this.spatialReference,s),c=r||a,d=async e=>(u&&c&&await this._project(e,s),o&&this._cache.put(o,e.items),e),p=this.featureStore.featureSpatialReference,h=!i||null==p||(0,x.aI)(p,i.spatialReference)?i:(0,T.Cv)(i,p);if(!h)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));yield;const f=this.featureAdapter;let m=await this._searchFeatures(L(i));yield;const y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of m)i.add(f.getObjectId(e));let n;null!=t?n=t.items:(yield,n=await this._getAllFeatures(),yield);const s=await(0,M.xt)(y,h,this.geometryType);yield;const r=e=>!i.has(f.getObjectId(e))||s(f.getGeometry(e)),a=yield*this._runSpatialFilter(n,r);yield;const o=new w.G(a,e,this);return await d(o)}if(null!=t){const e=new n.vW;m=m.filter(i=>(0,n.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){const t=new w.G([],e,this);return o&&this._cache.put(o,t.items),t}if(this._canExecuteSinglePass(h,e))return await d(new w.G(m,e,this));const g=await(0,M.xt)(y,h,this.geometryType);yield;const _=yield*this._runSpatialFilter(m,e=>g(f.getGeometry(e)));return yield,await d(new w.G(_,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,V.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,S.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const n=await(0,M.xt)(i,t.geometry,this.geometryType);yield;const s=this.featureAdapter,r=yield*this._runSpatialFilter(e.items,e=>n(s.getGeometry(e)));e.items=r}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const n=new Array;for(const s of e)t(s)&&n.push(s),i.madeProgress(),i.done&&(i=yield);return n}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:n}=this.timeInfo,s=n||i,r=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),n=a(i,s),o=r.get(e);(!o||n>a(o,s))&&r.set(e,i)}e.items=Array.from(r.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:n,returnCentroid:s,outSR:r,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=n||s;return(0,x.fn)(r)&&!(0,x.aI)(this.spatialReference,r)&&l?JSON.stringify([t,i,r]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,M.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,x.aI)(this.spatialReference,t))return e;const i=this.featureAdapter,n=(0,d.isLoaded)()?await this._getFullExtent():void 0,r=await(0,T.lK)(e.items.map(e=>(0,v.pL)(this.geometryType,i.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:n});return e.items=(0,s.z)(r.map((t,n)=>i.cloneWithGeometry(e.items[n],(0,_.Ux)(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:n,spatialReference:s,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.A(C,"Unsupported query options",{query:e});return N(i,a,e),Promise.all([z(i,a,t,e),(0,M.c0)(e,n,s),(0,T.Nk)(s,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const n=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(n),yield,this._executeObjectIdsQuery(n),yield,this._executeTimeQuery(n),yield,this._executeAttributesQuery(n),yield,n}catch(t){if(t!==A.v8)throw t;return new w.G([],e,this)}}get test(){}}function L(e){if((0,M.tC)(e)){if((0,m.ZC)(e))return[(0,h.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,h.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,f.Rg)((0,h.vt)(),e)]}function q(e,t,i,n,s){const r={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,v.ag)(n)};s&&isFinite(e[2])&&isFinite(e[5])&&(r.zmin=e[2],r.zmax=e[5],r.hasZ=!0);const a=(0,T.Cv)(r,t,i);if(a.spatialReference=(0,v.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(s&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},99352(e,t,i){i.d(t,{F:()=>n,P:()=>s});const n={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},s={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},8384(e,t,i){i.d(t,{G:()=>O});var n=i(4576),s=i(4718),r=i(16930),a=i(12359),o=i(90634),l=i(62577),u=i(21325),c=i(46329),d=i(52006),p=i(88930),h=i(29441),f=i(51441),m=i(30524),y=i(1873),g=i(43668);class x{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const n=e.outFields;if(n&&!n.includes("*")){this.outFields=n;let e=0;for(const t of n){const n=(0,h.Wq)(t),s=this.fieldsIndex.get(n),r=s?null:(0,h.j4)(n,i),a=s?s.name:(0,h.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:r})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){if(i)return this.featureAdapter.getAttribute(e,i.name);const n=t;let s=null;return this._fieldDataCache.has(n)?s=this._fieldDataCache.get(n)?.clause:i||(s=(0,h.j4)(t,this.fieldsIndex),this._fieldDataCache.set(n,{alias:n,clause:s})),s?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const n=t.normalizationType,s=t.normalizationTotal,r=this.fieldsIndex.get(t.field),a=(0,m.zD)(r)||(0,m.Ah)(r),o=(0,m.OH)(r);return e.map(e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(r=`${(0,y.gJ)(r)}${t.fieldDelimiter}${(0,y.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,y.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof r&&i&&(a?r=r?new Date(r).getTime():null:o&&(r=r?(0,p.rb)(r):null)),n&&Number.isFinite(r)){const i="field"===n&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,y.zS)(r,n,i,s)}return r})}async getExpressionValues(e,t,i,n,s){const{arcadeUtils:r}=await(0,g.l)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const o=r.createFunction(t),l=r.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,f.pL)(n.geometryType,this.featureAdapter.getGeometry(e)),spatialReference:i.spatialReference}:null},c=r.createExecContext(t,l,s);return r.executeFunction(o,c)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,h.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,h.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const n of t){const{alias:t,clause:s}=this._fieldDataCache.get(n);i[t]=s?s.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const n of t){const{alias:t}=this._fieldDataCache.get(n);i.push(e[t])}else for(const t in e)i.push(e[t]);const n=`${(t||["*"]).join(",")}=${i.join(",")}`;let s=this._returnDistinctMap.get(n)||0;return this._returnDistinctMap.set(n,++s),s>1?null:e}}var _=i(31464),S=i(58727);class v{constructor(e,t,i){this.objectId=e,this.target=t,this.distance=i}}class T extends v{constructor(e,t,i){super(e,t,i),this.type="vertex"}}class E extends v{constructor(e,t,i,n,s,r=!1,a=null){super(e,t,i),this.start=n,this.end=s,this.draped=r,this.curve=a,this.type="edge"}}var F=i(5834),R=i(59977),I=i(57231),w=i(11440),A=i(60909),M=i(98623),b=i(92647);const C="bin";class O{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasZ=!!t.returnZ&&i.hasZ,this.hasM=!!t.returnM&&i.hasM,this.fieldsIndex=i.fieldsIndex,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter,this.featureIdInfo=i.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){const e=new x(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:n}=this.query,s=t?.length;if(!s)return 1;const r=new Map,a=new Map,o=new Set;for(const s of n){const{statisticType:n}=s,l="exceedslimit"!==n?s.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const n of t){const t=this._getAttributeValues(e,n,this.items,r);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:n,items:s}=u[t],r=n.join(",");i&&!e.validateItems(s,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,u.fn)(this.query.outSR)&&!(0,u.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,f.ag)({spatialReference:this.query.outSR,...(0,_.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,f.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const n=this.featureAdapter,{point:s}=e,r="number"==typeof e.distance?e.distance:e.distance.x,a="number"==typeof e.distance?e.distance:e.distance.y;function o(e,t){const i=(e-s.x)/r,n=(t-s.y)/a;return i*i+n*n}const l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,p="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,h=this._getPointCreator(t,this.spatialReference,i),f=new P(null,0),m=new P(null,0),y={x:0,y:0,z:0};for(const e of this.items){const t=n.getObjectId(e),i=n.getGeometryWithCurves?.(e);if(null!=i){x(i,t);continue}const s=n.getGeometry(e);null==s||g(s,t)}return l.candidates.sort((e,t)=>e.distance-t.distance),l;function g(t,i){const{coords:n,stride:r}=t,a=t.isPoint?z:t.lengths;if(f.coords=n,m.coords=n,e.returnEdge){let e=0;for(let t=0;t<a.length;t++){const n=a[t],c=e;for(let t=0;t<n;t++,e+=r){if(!u&&t===n-1)continue;if(f.coordsIndex=e,m.coordsIndex=t===n-1?c:e+r,!N(y,s,f,m))continue;const a=o(y.x,y.y);a<=1&&l.candidates.push(new E(i,h(y),Math.sqrt(a),h(f),h(m)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<a.length;t++){const n=a[t],s=e,c=m;c.coordsIndex=s;for(let t=0;t<n;t++,e+=r){if(f.coordsIndex=e,u&&t===n-1&&f.x===c.x&&f.y===c.y)continue;const s=o(f.x,f.y);s<=1&&l.candidates.push(new T(i,h(f),Math.sqrt(s)))}}}else if(p&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<a.length;i++){t.push(e);const n=a[i];e+=n*r,n>1&&t.push(e-r)}for(const e of t){f.coordsIndex=e;const t=o(f.x,f.y);t<=1&&l.candidates.push(new T(i,h(f),Math.sqrt(t)))}}}function x(t,i){const{candidates:n}=l,r={x:0,y:0,z:0};if(e.returnEdge){const e=[s.x,s.y],a=new P(e,0),l=new P(e,0);for(const{segments:s}of t.parts)for(const{start:t,curve:u}of s){const{curvePoint:s}=(0,c.y)(t,u,e),p=o(...s);if(p>1)continue;[r.x,r.y]=s,a.coords=t,l.coords=(0,d.yP)(u);const f=(0,d.Xq)(u)?null:(0,d.tk)(u);n.push(new E(i,h(r),Math.sqrt(p),h(a),h(l),!1,f))}}function a(e){r.x=t.vertexXY[2*e],r.y=t.vertexXY[2*e+1];const s=o(r.x,r.y);s>1||(r.z=t.vertexZ?.[e]??0,n.push(new T(i,h(r),Math.sqrt(s))))}if("all"===e.vertexMode){const{vertexCount:e}=t;for(let t=0;t<e;++t)a(t);return}if("ends"===e.vertexMode)switch(t.type){case"point":a(0);break;case"polyline":for(let e=0;e<t.partCount;++e){const i=t.partOffsets[e],n=t.partOffsets[e+1]-1;a(i),n!==i&&a(n)}}}}_getPointCreator(e,t,i){const n=null==i||(0,u.aI)(t,i)?e=>e:e=>(0,_.Cv)(e,t,i),{hasZ:s}=this;return s&&e?({x:e,y:t,z:i})=>n({x:e,y:t,z:i}):({x:e,y:t})=>n({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),p=(0,m.vE)(d)||(0,m.zD)(d)||(0,m.Ah)(d),h=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:l,timeZone:u},this.items),f=(0,y.Vb)({normalizationType:s,normalizationField:n,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},x=(0,m.yM)(d)?(0,y.z9)({values:h,supportsNullCount:f,percentileParams:g,outStatisticTypes:c}):(0,y.G_)({values:h,minValue:a,maxValue:o,useSampleStdDev:!s,supportsNullCount:f,percentileParams:g,outStatisticTypes:c});return(0,y.oZ)(x,c,p)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:n,returnAllCodedValues:s,scale:r,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:a},this.items,!1),l=(0,y.b3)(o);return(0,y.lv)(l,n,s,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:p}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:d,timeZone:p},this.items),f=(0,y.Rw)(h,{field:t,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,y.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:p}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:n,normalizationType:s,normalizationTotal:r,scale:d,timeZone:p},this.items);return(0,y.$y)(h,{field:t,normalizationField:n,normalizationType:s,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const n of t.slice().reverse()){const{compare:t,fieldOrExpression:s,fieldInfo:r}=V(n,this.fieldsIndex);e.sort((e,n)=>t(i(e,s,r),i(n,s,r)))}}_topNFeatures(e,t,i,s){if(e.length>1&&t?.length){const r=t.map(e=>{const{compare:t,fieldOrExpression:i,fieldInfo:n}=V(e,this.fieldsIndex);return(e,r)=>t(s(e,i,n),s(r,i,n))}).reduceRight((e,t)=>(i,n)=>{const s=t(i,n);return 0===s||Number.isNaN(s)?e(i,n):s}),a=[];for(const t of e)(0,n.HX)(a,t,i,r);return a}return e.slice(0,i)}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:n,hasZ:s,featureIdInfo:r,spatialReference:a}=this,{outFields:o,outSR:u,quantizationParameters:c,resultRecordCount:d,resultOffset:p,returnZ:h,returnM:m}=e,y=null!=d&&t.length>(p||0)+d,g=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:n&&m,hasZ:s&&h,objectIdFieldName:"object-id"===r.type?r.fieldName:null,spatialReference:(0,f.ag)(u||a),transform:c&&(0,l.VV)(c)||null}}_createFeatures(e,t){const i=new x(e,this.featureAdapter,this.fieldsIndex),{hasM:n,hasZ:s}=this,{orderByFields:r,quantizationParameters:a,returnGeometry:o,returnCentroid:u,maxAllowableOffset:c,resultOffset:d,resultRecordCount:p,returnZ:h=!1,returnM:m=!1}=e,y=s&&h,g=n&&m;let _;const S=d||0,v=null!=p?S+p:null;null!=v&&v<=5e3&&v<t.length?_=this._topNFeatures(t,r,v,(e,t,n)=>i.getFieldValue(e,t,n)):(_=[...t],this._sortFeatures(_,r,(e,t,n)=>i.getFieldValue(e,t,n))),(S>0||null!=v)&&(_=_.slice(S,v??void 0));const T=[];let E=0;if(this.geometryType&&(o||u)){const e=(0,l.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(o&&!u)for(const n of _){const s=this.featureAdapter.getGeometry(n),r=this._addFeatureJSONMetadata(n,{attributes:i.getAttributes(n),geometry:(0,f.pL)(this.geometryType,s,c,e,y,g)});t&&s&&!r.geometry&&(r.centroid=(0,f.LQ)(this,this.featureAdapter.getCentroid(n,this),e)),T[E++]=r}else if(!o&&u)for(const t of _)T[E++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,f.LQ)(this,this.featureAdapter.getCentroid(t,this),e)});else for(const t of _)T[E++]=this._addFeatureJSONMetadata(t,{attributes:i.getAttributes(t),centroid:(0,f.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,f.pL)(this.geometryType,this.featureAdapter.getGeometry(t),c,e,y,g)})}else for(const e of _){const t=i.getAttributes(e);t&&(T[E++]=this._addFeatureJSONMetadata(e,{attributes:t}))}return T}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,n=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}return e="esriGeometryPoint"===this.geometryType?this.items.length>t:this.items.length>i||this.items.reduce((e,t)=>{const i=this.featureAdapter.getGeometry(t);return e+(i?.size??0)},0)>n,{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const n=[],s=new Map,r=new Map,a=new Map,o=new Map,l=new x(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:p,resultRecordCount:h}=e,f=c?.length,y=!!f,g=y?c[0]:null,_=y&&!this.fieldsIndex.get(g);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,h=e,x="exceedslimit"!==p?e.onStatisticField:void 0,S="percentile_disc"===p||"percentile_cont"===p,v="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,T=y&&1===f&&(x===g||_)&&"count"===p;if(y){if(!a.has(x)){const e=[];for(const i of c){const n=this._getAttributeValues(l,i,t,s);e.push(n)}a.set(x,this._calculateUniqueValues(e,t,!v&&l.returnDistinctValues))}const e=a.get(x);if(!e)continue;const i=Object.keys(e);for(const n of i){const{count:i,data:r,items:a,itemPositions:p}=e[n],f=r.join(",");if(!d||l.validateItems(a,d)){const e=o.get(f)||{attributes:{}};if(v){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(h,a);e.aggregateGeometries[i]=t}else{let n=null;if(T)n=i;else{const e=this._getAttributeValues(l,x,t,s),i=p.map(t=>e[t]);n=S&&"statisticParameters"in h?this._getPercentileValue(h,i):this._getStatisticValue(h,i,null,l.returnDistinctValues)}e.attributes[u]=n}let n=0;c.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++n]=r[i]),o.set(f,e)}}}else if(v){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:n}=await this._getAggregateGeometry(h,t);i.aggregateGeometries[n]=e}else{const e=this._getAttributeValues(l,x,t,s);i.attributes[u]=S&&"statisticParameters"in h?this._getPercentileValue(h,e):this._getStatisticValue(h,e,r,l.returnDistinctValues)}const E="min"!==p&&"max"!==p||!(0,m.yM)(this.fieldsIndex.get(x))&&!this._isAnyDateField(x)?null:this.fieldsIndex.get(x)?.type;n.push({name:u,alias:u,type:E||"esriFieldTypeDouble"})}const S=y?Array.from(o.values()):[i];return this._sortFeatures(S,p,(e,t)=>e.attributes[t]),h&&(S.length=Math.min(h,S.length)),{fields:n,features:S}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,m.vE)(t)||(0,m.zD)(t)||(0,m.Ah)(t)||(0,m.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:n,union:s}=await i.e(1023).then(i.bind(i,81023)),{statisticType:r,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:c,geometryType:d}=this,p=t.map(e=>(0,f.pL)(d,u.getGeometry(e))),h=n(c,p,!0)[0],m={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===r){const e=h?(0,o.v)(h):(0,o.HA)(s(c,p));m.aggregateGeometries={...e,spatialReference:c},m.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===r){const e=h?(0,a.l8)(h):(0,a.Z4)((0,o.HA)(s(c,p)));m.aggregateGeometries={x:e[0],y:e[1],spatialReference:c},m.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===r&&(m.aggregateGeometries=h,m.outStatisticFieldName=l||"convexHull");return m}_getStatisticValue(e,t,i,n){const{onStatisticField:s,statisticType:r}=e;let a=null;return a=i?.has(s)?i.get(s):(0,m.yM)(this.fieldsIndex.get(s))||this._isAnyDateField(s)?(0,y.z9)({values:t,returnDistinct:n}):(0,y.G_)({values:n?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(s,a),a["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:n,statisticType:s}=e,{value:r,orderBy:a}=n,o=this.fieldsIndex.get(i);return(0,y.qg)(t,{value:r,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===s})}_getAttributeValues(e,t,i,n){if(n.has(t))return n.get(t);const s=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,s));return n.set(t,r),r}_calculateUniqueValues(e,t,i){const n={},s=t.length;for(let r=0;r<s;r++){const s=t[r],a=[];for(const t of e)a.push(t[r]);const o=a.join(",");null==n[o]?n[o]={count:1,data:a,items:[s],itemPositions:[r]}:(i||n[o].count++,n[o].items.push(s),n[o].itemPositions.push(r))}return n}async _getDataValues(e,t,i=!0){const n=new x(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:a,scale:o,timeZone:l}=e,u=r.A.fromJSON(this.query.outSR||this.spatialReference);return a?n.getExpressionValues(t,a,{viewingMode:"map",scale:o,spatialReference:u},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},l):n.getDataValues(t,(0,s.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const n=t.intervals,s=t.min??0,r=t.max??0,a=n.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=s&&o<=r){const e=(0,y.Ak)(n,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:n,valueType:s}=t,r=[],a=[{name:n??i,alias:n??i,type:s??"esriFieldTypeString"},{name:C,alias:C,type:"esriFieldTypeInteger"}],o=new x(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in d){const{items:s}=d[t],o=await this._createBinsResponse(e,s);if(r.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[n??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(F.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(R.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(w.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(A.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:n,normalizationField:s,numBins:r,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,y.sU)(c,{field:n,normalizationField:s,normalizationType:a,normalizationTotal:o,numBins:r,minValue:(0,S.dO)(a?e.normalizationMinValue:l,!1),maxValue:(0,S.dO)(a?e.normalizationMaxValue:u,!1)}),p=this._calculateHistogramBins(c,d,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:n,interval:s,start:r,end:a,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,d=s.unit,p=await this._getDataValues({field:n||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),h=(0,m.OH)(this.fieldsIndex.get(n)),f=I.g.toJSON(d),y=p.filter(Boolean).sort((e,t)=>e-t),g=null!=r?(0,S.dO)(r,h):y[0],x=null!=a?(0,S.dO)(a,h):y[y.length-1],_=[];if(null!=g&&null!=x){const e={zone:t.outTimeReference?.ianaTimeZone??M.n$},i=u?.unit?I.g.toJSON(u.unit):"milliseconds",n={[i]:u?.value||0},r=b.c9.fromMillis(g,e).minus(n),a=b.c9.fromMillis(x,e).minus(n),d="number"==typeof c&&c>=1&&c<=7?c:7,p=(e,t)=>{const i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")};if("last"===o){let e="week"===f?((e,t)=>p(e,t).plus({days:7}))(a,d):a;for(;e>r;){const t=e.minus({[f]:s.value});if(t<r){_.unshift([l?t.plus(n).toMillis():r.plus(n).toMillis(),e.plus(n).toMillis()]);break}_.unshift([t.plus(n).toMillis(),e.plus(n).toMillis()]),e=t}}else{let e="first"===o?r:"week"===f?p(r,d):r.startOf(f);for(;e<=a;){const t=e.plus({[f]:s.value});if(t>a){_.push([e.plus(n).toMillis(),l?t.plus(n).toMillis():a.plus(n).toMillis()]);break}_.push([e.plus(n).toMillis(),t.plus(n).toMillis()]),e=t}}}const v=this._calculateHistogramBins(p,{intervals:_,min:g,max:x},i);return this._createFeaturesFromHistogramBins(v,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:n}=e,s=await this._getDataValues({field:n||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),r=(0,m.OH)(this.fieldsIndex.get(n)),a=e.boundaries.map(e=>(0,S.dO)(e,r)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(s,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:n,interval:s,normalizationType:r,start:a,end:o}=e,l=await this._getDataValues({field:n||e.expression,normalizationField:e.normalizationField,normalizationType:r,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=(0,m.OH)(this.fieldsIndex.get(n)),c=(0,y.sU)(l,{field:n,classificationMethod:"defined-interval",definedInterval:s,minValue:(0,S.dO)(r?e.normalizationMinValue:a,u),maxValue:(0,S.dO)(r?e.normalizationMaxValue:o,u)},!0),d=this._calculateHistogramBins(l,c,i);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:n}=t,s=n||"lowerBoundary",r=i||"upperBoundary",a=[],o=[{name:s,alias:s,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:C,alias:C,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const d="dateBin"===t.bin.type,p=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:n,items:h}=i,f={attributes:{}};let m;if(f.attributes[s]=d&&p&&null!=e?b.c9.fromMillis(e,{zone:p}).toISO():e,t.bin.hideUpperBound||(f.attributes[r]=d&&p&&null!=n?b.c9.fromMillis(n,{zone:p}).toISO():n),l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),f.attributes[C]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(f))):(t.bin?.splitBy&&(f.attributes[C]=++c),m=await this._createStatisticsQueryResponse(t,h,f),a.push(f)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function N(e,t,i,n){const s=n.x-i.x,r=n.y-i.y,a=t.x-i.x,o=t.y-i.y,l=s*s+r*r;if(0===l)return!1;const u=a*s+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+s*c,e.y=i.y+r*c,!0}class P{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const z=[1];function V(e,t){const i=e.split(" "),n=i[0],s=t.get(n),r=!!i[1]&&"desc"===i[1].toLowerCase();return{compare:(0,y.FM)(s?.type,r,"case-insensitive"),fieldOrExpression:n,fieldInfo:s}}},29441(e,t,i){i.d(t,{MG:()=>x,SN:()=>h,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>f,j4:()=>m,vl:()=>u});var n=i(49186),s=i(44123),r=i(98453);const a=new s.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function p(e,t,i={}){const s=m(t,e);if(!s){const i=a.getError(t,e);throw new n.A(o,"invalid SQL expression",{expression:t,error:i})}const r=i.expressionName||"expression";if(i.validateStandardized&&!s.isStandardized)throw new n.A(o,`${r} is not standard`,{expression:t});if(i.validateAggregate&&!s.isAggregate)throw new n.A(o,`${r} does not contain a valid aggregate function`,{expression:t});return s.fieldNames}function h(e,t,i,n){if(!i)return!0;const s="where clause";return x(e,t,p(e,i,{validateStandardized:!0,expressionName:s}),{expressionName:s,query:n}),!0}function f(e,t,i,s,r){if(!i)return!0;const a="having clause",l=p(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:r});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:n}=t,r=e.get(n)?.name;return s.some(t=>{const{onStatisticField:n,statisticType:s}=t,a=e.get(n)?.name;return a===r&&s.toLowerCase().trim()===i})});if(!c)throw new n.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,s={}){const r=new Map;if(function(e,t,i,n,s){const r=s.includes("*")?[...i,...s.filter(e=>"*"!==e)]:s;for(const s of r)if(t.get(s))_(e,t,i,n,s);else try{const r=p(t,y(s),{validateStandardized:!0});for(const s of r)_(e,t,i,n,s)}catch(t){e.set(s,{type:"expression-error",expression:s,error:t})}}(r,e,t,s.allowedFieldTypes??d,i),r.size){const e=s.expressionName??"expression";throw new n.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(r.values()),query:s.query})}}function _(e,t,i,n,s){const a=t.get(s);a?i.has(a.name)?"all"!==n&&!1===n?.has(a.type)&&e.set(s,{type:"invalid-type",fieldName:a.name,fieldType:r.m.fromJSON(a.type),allowedFieldTypes:Array.from(n,e=>r.m.fromJSON(e))}):e.set(s,{type:"missing-field",fieldName:a.name}):e.set(s,{type:"invalid-field",fieldName:s})}},51441(e,t,i){i.d(t,{LQ:()=>s,ag:()=>a,pL:()=>r});var n=i(90708);function s(e,t,i,s=e.hasZ,r=e.hasM){if(null==t)return null;const a=e.hasZ&&s,o=e.hasM&&r;if(i){const e=(0,n.Nl)(t,"esriGeometryPoint",i,s,r);return(0,n.DF)(e,a,o)}return(0,n.DF)(t,a,o)}function r(e,t,i,s,r,a){if(null==t)return null;const o="coords"in t?t:t.geometry;if(null==o)return null;const{hasZ:l,hasM:u}=o,c=l&&(r??=l),d=u&&(a??=u);if(i){let t=(0,n.kz)(o,e,i,r,a);return s&&(t=(0,n.Nl)(t,e,s)),(0,n.zv)(t,e,c,d)}if(s){const t=(0,n.Nl)(o,e,s,r,a);return(0,n.zv)(t,e,c,d)}return(0,n.zv)(o,e,c,d)}function a(e){return e&&o in e?JSON.parse(JSON.stringify(e,l)):e}const o="_geVersion",l=(e,t)=>e===o?void 0:t},31464(e,t,i){i.d(t,{Cv:()=>f,Nk:()=>d,lK:()=>y});var n=i(4576),s=i(91218),r=i(21325),a=i(28735);const o=[0,0];function l(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,o),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,o),[i.xmax,i.ymax]=e(t.xmax,t.ymax,o),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:u(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:u(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:c(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function u(e,t){const i=[];for(const n of e)i.push(c(n,t));return i}function c(e,t){const i=[];for(const n of e){const e=t(n[0],n[1],[0,0]);i.push(e),n.length>2&&e.push(n[2]),n.length>3&&e.push(n[3])}return i}async function d(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(n.Ru):[e];await(0,s.initializeProjection)(i.map(e=>({source:e,dest:t})))}const p=l.bind(null,a.je),h=l.bind(null,a.tD);function f(e,t,i,n){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,r.fn)(t)||!(0,r.fn)(i)||(0,r.aI)(t,i))return e;if((0,a.y7)(t,i)){const t=(0,r.K8)(i)?p(e):h(e);return t.spatialReference=i,t}return(0,s.projectMany)([e],t,i,n)[0]}const m=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,n){if(!e?.length||!t||!i||(0,r.aI)(t,i))return e;const s={geometries:e,inSpatialReference:t,outSpatialReference:i,options:n,resolve:Promise.withResolvers()};return this._jobs.push(s),this._timer??=setTimeout(this._process,10),s.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:n,resolve:o,options:l}=e,u=t.filter(e=>null!=e);let c;c=(0,a.y7)(i,n)&&null==l?.extendedParams?(0,r.K8)(n)?u.map(p):u.map(h):(0,s.projectMany)(u,i,n,l);let d=0;const f=t.map(e=>null==e?null:c[d++]);o.resolve(f),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function y(e,t,i,n){return m.push(e,t,i,n)}},58727(e,t,i){i.d(t,{GC:()=>y,T2:()=>g,VY:()=>h,dO:()=>_,iJ:()=>m,v8:()=>f});var n=i(49186),s=i(66552),r=i(86211),a=i(91218),o=i(90634),l=i(60408),u=i(65864),c=i(17136),d=i(21325),p=i(31464);const h=new s.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),f=Object.freeze({});async function m(e,t,i){const n=e.bin;return n.onField&&(n.onField=n.onField.trim()),n.onExpression?.value&&(n.onExpression.value=n.onExpression.value.trim()),n.splitBy&&(n.splitBy.value&&(n.splitBy.value=n.splitBy.value.trim()),n.splitBy.outAlias&&(n.splitBy.outAlias=n.splitBy.outAlias.trim())),n.stackBy&&(n.stackBy.value&&(n.stackBy.value=n.stackBy.value.trim()),n.stackBy.outAlias&&(n.stackBy.outAlias=n.stackBy.outAlias.trim())),"normalizationField"in n.parameters&&n.parameters.normalizationField&&(n.parameters.normalizationField=n.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:"frequency"}]),y(e,t,i)}async function y(e,t,i){const{outFields:n,orderByFields:s,groupByFieldsForStatistics:r,outStatistics:a}=e;if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,i)}async function g(e,t,s){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:s}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=s?h.fromJSON(s):(0,r.Ij)(o),c=o&&((0,d.EA)(o)||(0,d.K8)(o))?a:await(0,p.Nk)(o,d.KK).then(()=>(0,p.Cv)(a,d.KK)),f=await i.e(9159).then(i.bind(i,49159));await f.load();const m=f.execute(c,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new n.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,p.Nk)(m.spatialReference,s),m=function(e,t){const i=e.spatialReference;return x(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,s);const t=(await(0,c.el)((0,u.rS)(m)))[0];if(null==t)throw f;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,n=i&&x(m,s)?{extendedParams:{densificationStep:8*i}}:void 0,r=t.toJSON(),a=(0,p.Cv)(r,r.spatialReference,s,n);if(!a)throw f;a.spatialReference=s,e.geometry=a}return e}function x(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,d.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function _(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},62660(e,t,i){i.d(t,{tC:()=>T,c0:()=>v,xt:()=>S});var n=i(49186),s=i(94078),r=i(12176),a=i(60408),o=i(21325);function l(e,t){return c(e,t.coords[0],t.coords[1])}function u(e,t){const{coords:i,lengths:n,stride:s}=t;if(!n)return!1;for(let t=0,r=0;t<n.length;t++,r+=s)if(!c(e,i[r],i[r+1]))return!1;return!0}function c(e,t,i){if(!e)return!1;const{coords:n,lengths:s,stride:r}=e;let a=!1,o=0;for(const e of s)a=d(a,n,r,o,e,t,i),o+=e*r;return a}function d(e,t,i,n,s,r,a){let o=e,l=n;for(let e=n,u=n+s*i;e<u;e+=i){l=e+i,l===u&&(l=n);const s=t[e],c=t[e+1],d=t[l],p=t[l+1];(c<a&&p>=a||p<a&&c>=a)&&s+(a-c)/(p-c)*(d-s)<r&&(o=!o)}return o}var p=i(90708),h=i(51441),f=i(31464);const m="unsupported-query",y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},g={esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},x={esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1},_={esriSpatialRelIntersects:()=>Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(8414)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(609)]).then(i.bind(i,51508)),esriSpatialRelCrosses:()=>Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(7316)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(6960)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(3304)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(7987)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1787)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function S(e,t,i){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,p.Ye)(t,!1,!1);return t=>l(e,t)}if("esriGeometryMultipoint"===i){const i=(0,p.Ye)(t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,e)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,s.qz)(t,(0,h.pL)(i,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,s.rL)(t,(0,h.pL)(i,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(n=i)?r.xB:(0,r.xK)(n);return n=>e(t,(0,h.pL)(i,n))}}var n;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const o=await function(e){const t=_[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>o.execute(t,(0,h.pL)(i,e))}async function v(e,t,i){const{spatialRel:s,geometry:r}=e;if(r){if(null==(l=s)||!0!==y[l])throw new n.A(m,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(r.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g[(0,a.$B)(e)]}(r))throw new n.A(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===x[e]}(t))throw new n.A(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}var l}function T(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},86420(e,t,i){i.d(t,{I:()=>r,W:()=>s});var n=i(21818);async function s(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:s,endTimeField:r}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(s&&r)await t.forEach(e=>{const t=i.getAttribute((0,n.z)(e),s),l=i.getAttribute((0,n.z)(e),r);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=s||r;await t.forEach(t=>{const s=i.getAttribute((0,n.z)(t),e);null==s||isNaN(s)||(a=Math.min(a,s),o=Math.max(o,s))})}return{start:a,end:o}}function r(e,t,i){if(!t||!e)return null;const{startTimeField:n,endTimeField:s}=e;if(!n&&!s)return null;const{start:r,end:a}=t;if(null===r&&null===a)return null;if(void 0===r&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return n&&s?function(e,t,i,n,s){return null!=n&&null!=s?r=>{const a=e(r,t),o=e(r,i);return(null==a||a<=s)&&(null==o||o>=n)}:null!=n?t=>{const s=e(t,i);return null==s||s>=n}:null!=s?i=>{const n=e(i,t);return null==n||n<=s}:void 0}(o,n,s,r,a):function(e,t,i,n){return null!=i&&null!=n&&i===n?n=>e(n,t)===i:null!=i&&null!=n?s=>{const r=e(s,t);return null!=r&&r>=i&&r<=n}:null!=i?n=>{const s=e(n,t);return null!=s&&s>=i}:null!=n?i=>{const s=e(i,t);return null!=s&&s<=n}:void 0}(o,n||s,r,a)}},92300(e,t,i){i.d(t,{V:()=>a,X:()=>r});var n=i(60408),s=i(65864);function r(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function a(e,t,i){const n=(0,s.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=i,t})}},5834(e,t,i){i.d(t,{A:()=>d});var n=i(5482),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,s.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,n.Cg)([(0,r.$K)("esri.rest.support.AutoIntervalBinParameters")],d),d.from=(0,a.dp)(d)},41266(e,t,i){i.d(t,{A:()=>m});var n=i(5482),s=i(69540),r=i(66552),a=i(25482),o=i(91429),l=i(56507),u=i(93223);const c=new r.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends((0,s.OU)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,n.Cg)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,n.Cg)([(0,u.e)(c)],d.prototype,"valueType",void 0),d=(0,n.Cg)([(0,o.$K)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,l.dp)(d);const h=new r.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new r.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends((0,s.OU)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],m.prototype,"expression",void 0),(0,n.Cg)([(0,u.e)(h,{name:"onExpression.valueType"})],m.prototype,"expressionValueType",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,n.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],m.prototype,"splitBy",void 0),(0,n.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],m.prototype,"stackBy",void 0),(0,n.Cg)([(0,u.e)(f)],m.prototype,"transformation",void 0),m=(0,n.Cg)([(0,o.$K)("esri.rest.support.BinParametersBase")],m)},59977(e,t,i){i.d(t,{A:()=>y});var n=i(5482),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(69540),u=i(25482),c=i(57231),d=i(93223);let p=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,n.Cg)([(0,d.e)(c.g)],p.prototype,"unit",void 0),p=(0,n.Cg)([(0,r.$K)("esri.rest.support.DateBinTimeInterval")],p);const h=p;function f(e,t,i){(0,s.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function m(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let y=class extends o.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,n.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>m(t,"end")},write:{writer:f}}})],y.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({type:h,json:{name:"parameters",write:!0}})],y.prototype,"interval",void 0),(0,n.Cg)([(0,r.MZ)({type:h,json:{name:"parameters.offset",write:!0}})],y.prototype,"offset",void 0),(0,n.Cg)([(0,r.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],y.prototype,"returnFullIntervalBin",void 0),(0,n.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>m(t,"start")},write:{writer:f}}})],y.prototype,"start",void 0),(0,n.Cg)([(0,r.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],y.prototype,"snapToData",void 0),(0,n.Cg)([(0,d.e)({dateBin:"date"},{readOnly:!0})],y.prototype,"type",void 0),y=(0,n.Cg)([(0,r.$K)("esri.rest.support.DateBinParameters")],y),y.from=(0,a.dp)(y)},57231(e,t,i){i.d(t,{g:()=>n});const n=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},11440(e,t,i){i.d(t,{A:()=>u});var n=i(5482),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(93223);let u=class extends o.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,s.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,n.Cg)([(0,l.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,n.Cg)([(0,r.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,a.dp)(u)},60909(e,t,i){i.d(t,{A:()=>d});var n=i(5482),s=i(93637),r=i(91429),a=i(56507),o=i(41266),l=i(41366),u=i(93223);function c(e,t,i){(0,s.sM)(i,e instanceof Date?e.getTime():e,t)}let d=class extends((0,l.K)(o.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:c}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,n.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:c}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,n.Cg)([(0,r.$K)("esri.rest.support.FixedIntervalBinParameters")],d),d.from=(0,a.dp)(d)},41366(e,t,i){i.d(t,{K:()=>d,Q:()=>l});var n=i(5482),s=i(66552),r=i(53966),a=i(91429),o=i(93223);const l=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",d=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&c||i&&u||null,t&&i&&r.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,n.Cg)([(0,o.e)(l,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,n.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},1873(e,t,i){i.d(t,{$y:()=>P,Ak:()=>V,FM:()=>f,G_:()=>p,Rw:()=>O,Vb:()=>c,b3:()=>A,gJ:()=>u,jM:()=>N,lv:()=>b,oZ:()=>w,qg:()=>h,sU:()=>z,z9:()=>d,zS:()=>C});var n=i(9760),s=i(84892);const r=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,a=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),o=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),l=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function u(e){return null==e||"string"==typeof e&&!e?"<Null>":e}function c(e){const t=null!=e.normalizationField||null!=e.normalizationType,i=null!=e.minValue||null!=e.maxValue,n=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!i&&!n}function d(e){const{outStatisticTypes:t}=e,i=e.returnDistinct?[...new Set(e.values)]:e.values,n=i.filter(e=>null!=e).sort(),s=n.length,r={count:s,min:n[0],max:n[s-1]};return e.supportsNullCount&&(r.nullcount=i.length-s),!e.percentileParams||t?.include?.length&&!t.include.includes("median")||t?.exclude?.length&&t.exclude.includes("median")||(r.median=h(i,e.percentileParams)),r}function p(e){const{values:t,useSampleStdDev:i,supportsNullCount:n,outStatisticTypes:s}=e;let r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=null,l=null,u=null,c=null,d=0;const p=null==e.minValue?-1/0:e.minValue,f=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=p&&e<=f&&(o=null===o?e:o+e,r=Math.min(r,e),a=Math.max(a,e),d++):"string"==typeof e&&d++;if(d&&null!=o){l=o/d;let e=0;for(const i of t)Number.isFinite(i)&&i>=p&&i<=f&&(e+=(i-l)**2);c=i?d>1?e/(d-1):0:d>0?e/d:0,u=Math.sqrt(c)}else r=null,a=null;const m={avg:l,count:d,max:a,min:r,stddev:u,sum:o,variance:c};return n&&(m.nullcount=t.length-d),!e.percentileParams||s?.include?.length&&!s.include.includes("median")||s?.exclude?.length&&s.exclude.includes("median")||(m.median=h(t,e.percentileParams)),m}function h(e,t){const{fieldType:i,value:n,orderBy:s,isDiscrete:r}=t,a=f(i,"desc"===s,"case-insensitive");if(0===(e=[...e].filter(e=>null!=e).sort((e,t)=>a(e,t))).length)return null;if(n<=0)return e[0];if(n>=1)return e[e.length-1];const o=(e.length-1)*n,l=Math.floor(o),u=l+1,c=o%1,d=e[l],p=e[u];return u>=e.length||r||"string"==typeof d||"string"==typeof p?d:d*(1-c)+p*c}function f(e,t,i="case-sensitive"){if(e){if(a.has(e))return R(t);if(o.has(e))return T(t,!0);if("esriFieldTypeTimestampOffset"===e)return function(e){return e?_:x}(t);const n=T(t,"case-sensitive"===i);if("esriFieldTypeString"===e)return n;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,t)=>n(I(e),I(t))}const n=t?1:-1,s=R(t),r=T(t,"case-sensitive"===i),l=g(t);return(e,t)=>"number"==typeof e&&"number"==typeof t?s(e,t):"string"==typeof e&&"string"==typeof t?r(e,t):l(e,t)??n}const m=(e,t)=>null==e?null==t?0:1:null==t?-1:null,y=(e,t)=>null==e?null==t?0:-1:null==t?1:null;function g(e){return e?m:y}const x=(e,t)=>y(e,t)??(e===t?0:new Date(e).getTime()-new Date(t).getTime()),_=(e,t)=>m(e,t)??(e===t?0:new Date(t).getTime()-new Date(e).getTime()),S=(e,t)=>y(e,t)??(e===t?0:e<t?-1:1),v=(e,t)=>m(e,t)??(e===t?0:e<t?1:-1);function T(e,t){if(t)return e?v:S;const i=g(e);return e?(e,t)=>{const n=i(e,t);return null!=n?n:(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0}:(e,t)=>{const n=i(e,t);return null!=n?n:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}}const E=(e,t)=>m(e,t)??t-e,F=(e,t)=>y(e,t)??e-t;function R(e){return e?E:F}function I(e){return e.slice(24,36)+e.slice(19,23)+e.slice(16,18)+e.slice(14,16)+e.slice(11,13)+e.slice(9,11)+e.slice(6,8)+e.slice(4,6)+e.slice(2,4)+e.slice(0,2)}function w(e,t,i){let n;for(n in e)t?.include?.length&&!t.include.includes(n)||t?.exclude?.length&&t.exclude.includes(n)?delete e[n]:l.includes(n)&&(Number.isFinite(e[n])||(e[n]=null));return i?(["avg","stddev","variance"].forEach(t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))}),e):e}function A(e){const t={};for(let i of e)(null==i||"string"==typeof i&&""===i.trim())&&(i=null),null==t[i]?t[i]={count:1,data:i}:t[i].count++;return{count:t}}function M(e){return"coded-value"!==e?.type?[]:e.codedValues.map(e=>e.code)}function b(e,t,i,n){const s=e.count,r=[];if(i&&t){const e=[],i=M(t[0]);for(const s of i)if(t[1]){const i=M(t[1]);for(const r of i)if(t[2]){const i=M(t[2]);for(const t of i)e.push(`${u(s)}${n}${u(r)}${n}${u(t)}`)}else e.push(`${u(s)}${n}${u(r)}`)}else e.push(s);for(const t of e)s.hasOwnProperty(t)||(s[t]={data:t,count:0})}for(const e in s){const t=s[e];r.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:r}}function C(e,t,i,n){let s=null;switch(t){case"log":0!==e&&(s=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(n)&&0!==n&&(s=e/n*100);break;case"field":Number.isFinite(i)&&0!==i&&(s=e/i);break;case"natural-log":e>0&&(s=Math.log(e));break;case"square-root":e>0&&(s=e**.5)}return s}function O(e,t,i){const r=function(e){const{breakCount:t,field:i,normalizationField:s,normalizationType:r}=e,a=e.classificationMethod||"equal-interval",o="standard-deviation"===a?e.standardDeviationInterval||1:void 0,l="defined-interval"===a?e.definedInterval:void 0;return new n.A({breakCount:t,classificationField:i,classificationMethod:a,normalizationField:"field"===r?s:void 0,normalizationType:r,standardDeviationInterval:o,definedInterval:l})}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,definedInterval:t.definedInterval,breakCount:t.numClasses||5});return e=function(e,t,i){const n=t??-1/0,s=i??1/0;return e.filter(e=>Number.isFinite(e)&&e>=n&&e<=s)}(e,t.minValue,t.maxValue),(0,s.t)({definition:r,values:e,normalizationTotal:t.normalizationTotal},i)}function N(e,t){let i=e.classBreaks;const n=i.length,s=i[0]?.minValue,a=i[n-1]?.maxValue,o="standard-deviation"===t,l=r;return i=i.map(e=>{const t=e.label,i={minValue:e.minValue,maxValue:e.maxValue,label:t};if(o&&t){const e=t.match(l),n=e?.map(e=>+e.trim())??[];2===n.length?(i.minStdDev=n[0],i.maxStdDev=n[1],n[0]<0&&n[1]>0&&(i.hasAvg=!0)):1===n.length&&(t.includes("<")?(i.minStdDev=null,i.maxStdDev=n[0]):t.includes(">")&&(i.minStdDev=n[0],i.maxStdDev=null))}return i}),{minValue:s,maxValue:a,classBreakInfos:i,normalizationTotal:e.normalizationTotal}}function P(e,t){const i=z(e,t);if(null==i.min&&null==i.max)return{bins:[],minValue:i.min,maxValue:i.max,normalizationTotal:t.normalizationTotal};const n=i.intervals,s=i.min??0,r=i.max??0,a=n.map((e,t)=>({minValue:n[t][0],maxValue:n[t][1],count:0}));for(const t of e)if(null!=t&&t>=s&&t<=r){const e=V(n,t);e>-1&&a[e].count++}return{bins:a,minValue:s,maxValue:r,normalizationTotal:t.normalizationTotal}}function z(e,t,i=!1){const{field:n,classificationMethod:s,standardDeviationInterval:r,definedInterval:a,normalizationType:o,normalizationField:l,normalizationTotal:u,minValue:d,maxValue:h}=t,f=t.numBins||10;let m=null,y=null,g=null;if(s&&"equal-interval"!==s||o){const{classBreaks:t}=O(e,{field:n,normalizationType:o,normalizationField:l,normalizationTotal:u,classificationMethod:s,standardDeviationInterval:r,definedInterval:a,minValue:d,maxValue:h,numClasses:f},null!=d&&null!=h?[d,h]:void 0);m=t[0]?.minValue,y=t[t.length-1]?.maxValue,g=t.map(e=>[e.minValue,e.maxValue])}else{if(null!=d&&null!=h)m=d,y=h;else{const t=p({values:e,minValue:d,maxValue:h,useSampleStdDev:!o,supportsNullCount:c({normalizationType:o,normalizationField:l,minValue:d,maxValue:h})});m=t.min??null,y=t.max??null}g=function(e,t,i){const n=(t-e)/i,s=[];let r,a=e;for(let e=1;e<=i;e++)r=a+n,r=Number(r.toFixed(16)),s.push([a,e===i?t:r]),a=r;return s}(m??0,y??0,f)}if(i&&g.length){const e=g.at(-1)[1];g.push([e,e])}return{min:m,max:y,intervals:g}}function V(e,t){let i=-1;for(let n=e.length-1;n>=0;n--)if(t>=e[n][0]){i=n;break}return i}},92359(e,t,i){i.d(t,{nu:()=>d,W6:()=>u}),i(4576),i(71511),i(44208),i(53966);var n=i(17676),s=(i(36708),i(44794),i(78659)),r=i(5482),a=i(69622),o=i(91429);let l=class extends a.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,r.Cg)([(0,o.MZ)()],l.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,r.Cg)([(0,o.MZ)()],l.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),l=(0,r.Cg)([(0,o.$K)("esri.views.support.debugFlags")],l),new l,i(49186),Symbol("Yield");const u={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S:"I3S",LYR3D:"Lyr3D",TILES3D:"3DTiles",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",OCCLUSION_QUERY:"occlusion query",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",VOLUME_MEASUREMENT:"volume measurement",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",GAUSSIAN_SPLAT_SORTING:"gaussian splat sorting",GAUSSIAN_SPLAT_TEXTURE_ATLAS:"gaussian splat texture atlas",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1};new Map([[u.RESOURCE_CONTROLLER_IMMEDIATE,0],[u.RESOURCE_CONTROLLER,4],[u.SLIDE,0],[u.STREAM_DATA_LOADER,0],[u.ELEVATION_QUERY,0],[u.TERRAIN_SURFACE,1],[u.SURFACE_GEOMETRY_UPDATES,1],[u.LOD_RENDERER,2],[u.GRAPHICS_CORE,2],[u.I3S,2],[u.LYR3D,2],[u.TILES3D,3],[u.POINT_CLOUD_LAYER,2],[u.FEATURE_TILE_FETCHER,2],[u.STREAM_CONTROLLER,2],[u.CLOUDS_GENERATOR,2],[u.OCCLUSION_QUERY,2],[u.OVERLAY,4],[u.OVERLAY_RENDERER,4],[u.STAGE,4],[u.GRAPHICS_DECONFLICTOR,4],[u.FILTER_VISIBILITY,4],[u.SCALE_VISIBILITY,4],[u.FRUSTUM_VISIBILITY,4],[u.POINT_OF_INTEREST_FREQUENT,6],[u.POINT_OF_INTEREST_INFREQUENT,30],[u.LABELER,8],[u.FEATURE_QUERY_ENGINE,8],[u.FEATURE_TILE_TREE,16],[u.FEATURE_TILE_TREE_ACTIVE,0],[u.ELEVATION_ALIGNMENT,12],[u.ELEVATION_ALIGNMENT_SCENE,14],[u.TEXT_TEXTURE_ATLAS,12],[u.TEXTURE_UNLOAD,12],[u.LINE_OF_SIGHT_TOOL,16],[u.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[u.VOLUME_MEASUREMENT,4],[u.SNAPPING,0],[u.SHADOW_ACCUMULATOR,30],[u.FLOW_GENERATOR,12],[u.GAUSSIAN_SPLAT_SORTING,2],[u.GAUSSIAN_SPLAT_TEXTURE_ATLAS,12],[u.MAPVIEW_FETCH_QUEUE,0],[u.MAPVIEW_LAYERVIEW_UPDATE,2],[u.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]),(0,s.l5)(6.5),(0,s.l5)(1),(0,s.l5)(30),(0,s.l5)(1e3/30),(0,s.l5)(100);const c=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};c.enabled=!1;const d=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,n.G4)(t)){const e=(0,n.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,n.z7)(e(c))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,n.G4)(t)){const e=(0,n.NK)();if(i)return i(e);throw e}const s=e(c);for(;;){const e=s.next(c),r=(0,n.$X)(e)?await e:e;if((0,n.G4)(t)){const e=(0,n.NK)();if(i){const t=i(e),r=s.return(null);return(0,n.$X)(r)&&await(0,n.QZ)(r),t}const t=s.throw(e);throw(0,n.$X)(t)&&await(0,n.QZ)(t),e}if(r.done)return r.value}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1448],{5482(t,e,n){function r(t,e,n,r){var s,i=arguments.length,o=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,n,o):s(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o}function s(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(s=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");s&&(r=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>o,mS:()=>s}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function o(t){function e(e){t.error=t.hasError?new i(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function s(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(s);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(s,function(t){return e(t),s()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},91869(t,e,n){function r(t,e){for(const n of t.values())if(e(n))return!0;return!1}function s(t,e){for(const n of t.values())if(!e(n))return!1;return!0}function i(t,e,n){const r=t.get(e);if(void 0!==r)return r;const s=n();return t.set(e,s),s}function o(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>o,Bs:()=>r,mt:()=>s,tE:()=>i})},4341(t,e,n){n.d(e,{I:()=>s});var r=n(26390);class s{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},29242(t,e,n){function r(){return[1,0,0,0,1,0,0,0,1]}function s(t,e,n,r,s,i,o,a,c){return[t,e,n,r,s,i,o,a,c]}n.d(e,{fA:()=>s,vt:()=>r,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:s},Symbol.toStringTag,{value:"Module"}))},9093(t,e,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>s,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:r,fromValues:function(t,e,n,r,s,i,o,a,c,u,h,f,l,d,m,M){return[t,e,n,r,s,i,o,a,c,u,h,f,l,d,m,M]}},Symbol.toStringTag,{value:"Module"}))},82534(t,e,n){function r(){return[0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3]]}n.d(e,{o8:()=>s,vt:()=>r,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:r,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},77690(t,e,n){n.d(e,{B8:()=>a,Ge:()=>d,I0:()=>l,KC:()=>c,a4:()=>u,hZ:()=>i,hs:()=>f,lw:()=>h,mg:()=>o,z0:()=>s});var r=n(34304);function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function i(t,e,n,r,s,i,o,a,c,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=s,t[4]=i,t[5]=o,t[6]=a,t[7]=c,t[8]=u,t}function o(t,e){if(t===e){const n=e[1],r=e[2],s=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=s}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8],f=h*o-a*u,l=-h*i+a*c,d=u*i-o*c;let m=n*f+r*l+s*d;return m?(m=1/m,t[0]=f*m,t[1]=(-h*r+s*u)*m,t[2]=(a*r-s*o)*m,t[3]=l*m,t[4]=(h*n-s*c)*m,t[5]=(-a*n+s*i)*m,t[6]=d*m,t[7]=(-u*n+r*c)*m,t[8]=(o*n-r*i)*m,t):null}function c(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8];return t[0]=o*h-a*u,t[1]=s*u-r*h,t[2]=r*a-s*o,t[3]=a*c-i*h,t[4]=n*h-s*c,t[5]=s*i-n*a,t[6]=i*u-o*c,t[7]=r*c-n*u,t[8]=n*o-r*i,t}function u(t){const e=t[0],n=t[1],r=t[2],s=t[3],i=t[4],o=t[5],a=t[6],c=t[7],u=t[8];return e*(u*i-o*c)+n*(-u*s+o*a)+r*(c*s-i*a)}function h(t,e,n){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=n[0],d=n[1],m=n[2],M=n[3],b=n[4],g=n[5],_=n[6],p=n[7],v=n[8];return t[0]=l*r+d*o+m*u,t[1]=l*s+d*a+m*h,t[2]=l*i+d*c+m*f,t[3]=M*r+b*o+g*u,t[4]=M*s+b*a+g*h,t[5]=M*i+b*c+g*f,t[6]=_*r+p*o+v*u,t[7]=_*s+p*a+v*h,t[8]=_*i+p*c+v*f,t}function f(t,e,n){const r=n[0],s=n[1],i=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*e[5],t[6]=i*e[6],t[7]=i*e[7],t[8]=i*e[8],t}function l(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=n+n,a=r+r,c=s+s,u=n*o,h=r*o,f=r*a,l=s*o,d=s*a,m=s*c,M=i*o,b=i*a,g=i*c;return t[0]=1-f-m,t[3]=h-g,t[6]=l+b,t[1]=h+g,t[4]=1-u-m,t[7]=d-M,t[2]=l-b,t[5]=d+M,t[8]=1-u-f,t}function d(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8],f=e[9],l=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*a-r*o,p=n*c-s*o,v=n*u-i*o,y=r*c-s*a,S=r*u-i*a,x=s*u-i*c,w=h*M-f*m,A=h*b-l*m,O=h*g-d*m,j=f*b-l*M,q=f*g-d*M,T=l*g-d*b;let C=_*T-p*q+v*j+y*O-S*A+x*w;return C?(C=1/C,t[0]=(a*T-c*q+u*j)*C,t[1]=(c*O-o*T-u*A)*C,t[2]=(o*q-a*O+u*w)*C,t[3]=(s*q-r*T-i*j)*C,t[4]=(n*T-s*O+i*A)*C,t[5]=(r*O-n*q-i*w)*C,t[6]=(M*x-b*S+g*y)*C,t[7]=(b*v-m*x-g*p)*C,t[8]=(m*S-M*v+g*_)*C,t):null}function m(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}const M=h,b=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:c,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:u,equals:function(t,e){const n=t[0],s=t[1],i=t[2],o=t[3],a=t[4],c=t[5],u=t[6],h=t[7],f=t[8],l=e[0],d=e[1],m=e[2],M=e[3],b=e[4],g=e[5],_=e[6],p=e[7],v=e[8],y=(0,r.FD)();return Math.abs(n-l)<=y*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(s-d)<=y*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(i-m)<=y*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(o-M)<=y*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(a-b)<=y*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(c-g)<=y*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(u-_)<=y*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(h-p)<=y*Math.max(1,Math.abs(h),Math.abs(p))&&Math.abs(f-v)<=y*Math.max(1,Math.abs(f),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:s,fromQuat:l,fromRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:function(t){const e=(0,r.FD)(),n=t[0],s=t[1],i=t[2],o=t[3],a=t[4],c=t[5],u=t[6],h=t[7],f=t[8];return Math.abs(1-(n*n+o*o+u*u))<=e&&Math.abs(1-(s*s+a*a+h*h))<=e&&Math.abs(1-(i*i+c*c+f*f))<=e},mul:M,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:d,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],s=e[2],i=e[4],o=e[5],a=e[6],c=e[8],u=e[9],h=e[10],f=h*o-a*u,l=-h*i+a*c,d=u*i-o*c,m=n*f+r*l+s*d;if(!m)return null;const M=1/m;return t[0]=f*M,t[1]=(-h*r+s*u)*M,t[2]=(a*r-s*o)*M,t[3]=l*M,t[4]=(h*n-s*c)*M,t[5]=(-a*n+s*i)*M,t[6]=d*M,t[7]=(-u*n+r*c)*M,t[8]=(o*n-r*i)*M,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=Math.sin(n),d=Math.cos(n);return t[0]=d*r+l*o,t[1]=d*s+l*a,t[2]=d*i+l*c,t[3]=d*o-l*r,t[4]=d*a-l*s,t[5]=d*c-l*i,t[6]=u,t[7]=h,t[8]=f,t},scale:f,scaleByVec2:function(t,e,n){const r=n[0],s=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=s*e[3],t[4]=s*e[4],t[5]=s*e[5],t},set:i,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:b,subtract:m,translate:function(t,e,n){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=n[0],d=n[1];return t[0]=r,t[1]=s,t[2]=i,t[3]=o,t[4]=a,t[5]=c,t[6]=l*r+d*o+u,t[7]=l*s+d*a+h,t[8]=l*i+d*c+f,t},transpose:o},Symbol.toStringTag,{value:"Module"}))},58083(t,e,n){n.d(e,{$0:()=>b,$h:()=>O,B8:()=>u,C:()=>i,D_:()=>a,N9:()=>_,O7:()=>A,Tl:()=>f,X_:()=>S,aI:()=>E,e$:()=>d,eL:()=>m,hM:()=>g,hZ:()=>o,hs:()=>l,kN:()=>M,l:()=>x,lw:()=>h,mg:()=>c,o1:()=>w,sC:()=>y,t2:()=>C,t5:()=>q,tZ:()=>R,ut:()=>P,v3:()=>j});var r=n(51850),s=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function o(t,e,n,r,s,i,o,a,c,u,h,f,l,d,m,M,b){return t[0]=e,t[1]=n,t[2]=r,t[3]=s,t[4]=i,t[5]=o,t[6]=a,t[7]=c,t[8]=u,t[9]=h,t[10]=f,t[11]=l,t[12]=d,t[13]=m,t[14]=M,t[15]=b,t}function a(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function c(t,e){if(t===e){const n=e[1],r=e[2],s=e[3],i=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=i,t[11]=e[14],t[12]=s,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function u(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8],f=e[9],l=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],_=n*a-r*o,p=n*c-s*o,v=n*u-i*o,y=r*c-s*a,S=r*u-i*a,x=s*u-i*c,w=h*M-f*m,A=h*b-l*m,O=h*g-d*m,j=f*b-l*M,q=f*g-d*M,T=l*g-d*b;let C=_*T-p*q+v*j+y*O-S*A+x*w;return C?(C=1/C,t[0]=(a*T-c*q+u*j)*C,t[1]=(s*q-r*T-i*j)*C,t[2]=(M*x-b*S+g*y)*C,t[3]=(l*S-f*x-d*y)*C,t[4]=(c*O-o*T-u*A)*C,t[5]=(n*T-s*O+i*A)*C,t[6]=(b*v-m*x-g*p)*C,t[7]=(h*x-l*v+d*p)*C,t[8]=(o*q-a*O+u*w)*C,t[9]=(r*O-n*q-i*w)*C,t[10]=(m*S-M*v+g*_)*C,t[11]=(f*v-h*S-d*_)*C,t[12]=(a*A-o*j-c*w)*C,t[13]=(n*j-r*A+s*w)*C,t[14]=(M*p-m*y-b*_)*C,t[15]=(h*y-f*p+l*_)*C,t):null}function h(t,e,n){const r=e[0],s=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=e[8],l=e[9],d=e[10],m=e[11],M=e[12],b=e[13],g=e[14],_=e[15];let p=n[0],v=n[1],y=n[2],S=n[3];return t[0]=p*r+v*a+y*f+S*M,t[1]=p*s+v*c+y*l+S*b,t[2]=p*i+v*u+y*d+S*g,t[3]=p*o+v*h+y*m+S*_,p=n[4],v=n[5],y=n[6],S=n[7],t[4]=p*r+v*a+y*f+S*M,t[5]=p*s+v*c+y*l+S*b,t[6]=p*i+v*u+y*d+S*g,t[7]=p*o+v*h+y*m+S*_,p=n[8],v=n[9],y=n[10],S=n[11],t[8]=p*r+v*a+y*f+S*M,t[9]=p*s+v*c+y*l+S*b,t[10]=p*i+v*u+y*d+S*g,t[11]=p*o+v*h+y*m+S*_,p=n[12],v=n[13],y=n[14],S=n[15],t[12]=p*r+v*a+y*f+S*M,t[13]=p*s+v*c+y*l+S*b,t[14]=p*i+v*u+y*d+S*g,t[15]=p*o+v*h+y*m+S*_,t}function f(t,e,n){const r=n[0],s=n[1],i=n[2];if(e===t)t[12]=e[0]*r+e[4]*s+e[8]*i+e[12],t[13]=e[1]*r+e[5]*s+e[9]*i+e[13],t[14]=e[2]*r+e[6]*s+e[10]*i+e[14],t[15]=e[3]*r+e[7]*s+e[11]*i+e[15];else{const n=e[0],o=e[1],a=e[2],c=e[3],u=e[4],h=e[5],f=e[6],l=e[7],d=e[8],m=e[9],M=e[10],b=e[11];t[0]=n,t[1]=o,t[2]=a,t[3]=c,t[4]=u,t[5]=h,t[6]=f,t[7]=l,t[8]=d,t[9]=m,t[10]=M,t[11]=b,t[12]=n*r+u*s+d*i+e[12],t[13]=o*r+h*s+m*i+e[13],t[14]=a*r+f*s+M*i+e[14],t[15]=c*r+l*s+b*i+e[15]}return t}function l(t,e,n){const r=n[0],s=n[1],i=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,n,r){let o=r[0],a=r[1],c=r[2],u=Math.sqrt(o*o+a*a+c*c);if(u<=(0,s.FD)())return void i(t,e);u=1/u,o*=u,a*=u,c*=u;const h=Math.sin(n),f=Math.cos(n),l=1-f,d=e[0],m=e[1],M=e[2],b=e[3],g=e[4],_=e[5],p=e[6],v=e[7],y=e[8],S=e[9],x=e[10],w=e[11],A=o*o*l+f,O=a*o*l+c*h,j=c*o*l-a*h,q=o*a*l-c*h,T=a*a*l+f,C=c*a*l+o*h,E=o*c*l+a*h,P=a*c*l-o*h,R=c*c*l+f;t[0]=d*A+g*O+y*j,t[1]=m*A+_*O+S*j,t[2]=M*A+p*O+x*j,t[3]=b*A+v*O+w*j,t[4]=d*q+g*T+y*C,t[5]=m*q+_*T+S*C,t[6]=M*q+p*T+x*C,t[7]=b*q+v*T+w*C,t[8]=d*E+g*P+y*R,t[9]=m*E+_*P+S*R,t[10]=M*E+p*P+x*R,t[11]=b*E+v*P+w*R,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15])}function m(t,e,n){const r=Math.sin(n),s=Math.cos(n),i=e[4],o=e[5],a=e[6],c=e[7],u=e[8],h=e[9],f=e[10],l=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*s+u*r,t[5]=o*s+h*r,t[6]=a*s+f*r,t[7]=c*s+l*r,t[8]=u*s-i*r,t[9]=h*s-o*r,t[10]=f*s-a*r,t[11]=l*s-c*r,t}function M(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function b(t,e,n){if(0===e)return a(t);let r=n[0],i=n[1],o=n[2],c=Math.sqrt(r*r+i*i+o*o);if(c<=(0,s.FD)())return null;c=1/c,r*=c,i*=c,o*=c;const u=Math.sin(e),h=Math.cos(e),f=1-h;return t[0]=r*r*f+h,t[1]=i*r*f+o*u,t[2]=o*r*f-i*u,t[3]=0,t[4]=r*i*f-o*u,t[5]=i*i*f+h,t[6]=o*i*f+r*u,t[7]=0,t[8]=r*o*f+i*u,t[9]=i*o*f-r*u,t[10]=o*o*f+h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t,e,n){const r=e[0],s=e[1],i=e[2],o=e[3],a=r+r,c=s+s,u=i+i,h=r*a,f=r*c,l=r*u,d=s*c,m=s*u,M=i*u,b=o*a,g=o*c,_=o*u;return t[0]=1-(d+M),t[1]=f+_,t[2]=l-g,t[3]=0,t[4]=f-_,t[5]=1-(h+M),t[6]=m+b,t[7]=0,t[8]=l+g,t[9]=m-b,t[10]=1-(h+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const v=(0,r.vt)();function y(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function S(t,e){const n=e[0],r=e[1],s=e[2],i=e[4],o=e[5],a=e[6],c=e[8],u=e[9],h=e[10];return t[0]=Math.sqrt(n*n+r*r+s*s),t[1]=Math.sqrt(i*i+o*o+a*a),t[2]=Math.sqrt(c*c+u*u+h*h),t}function x(t,e){const n=e[0]+e[5]+e[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t}function w(t,e,n,r){const s=e[0],i=e[1],o=e[2],a=e[3],c=s+s,u=i+i,h=o+o,f=s*c,l=s*u,d=s*h,m=i*u,M=i*h,b=o*h,g=a*c,_=a*u,p=a*h,v=r[0],y=r[1],S=r[2];return t[0]=(1-(m+b))*v,t[1]=(l+p)*v,t[2]=(d-_)*v,t[3]=0,t[4]=(l-p)*y,t[5]=(1-(f+b))*y,t[6]=(M+g)*y,t[7]=0,t[8]=(d+_)*S,t[9]=(M-g)*S,t[10]=(1-(f+m))*S,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function A(t,e,n,r,s){const i=e[0],o=e[1],a=e[2],c=e[3],u=i+i,h=o+o,f=a+a,l=i*u,d=i*h,m=i*f,M=o*h,b=o*f,g=a*f,_=c*u,p=c*h,v=c*f,y=r[0],S=r[1],x=r[2],w=s[0],A=s[1],O=s[2],j=(1-(M+g))*y,q=(d+v)*y,T=(m-p)*y,C=(d-v)*S,E=(1-(l+g))*S,P=(b+_)*S,R=(m+p)*x,z=(b-_)*x,I=(1-(l+M))*x;return t[0]=j,t[1]=q,t[2]=T,t[3]=0,t[4]=C,t[5]=E,t[6]=P,t[7]=0,t[8]=R,t[9]=z,t[10]=I,t[11]=0,t[12]=n[0]+w-(j*w+C*A+R*O),t[13]=n[1]+A-(q*w+E*A+z*O),t[14]=n[2]+O-(T*w+P*A+I*O),t[15]=1,t}function O(t,e,n,r,s,i,o){const a=1/(n-e),c=1/(s-r),u=1/(i-o);return t[0]=2*i*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*c,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(s+r)*c,t[10]=(o+i)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*i*2*u,t[15]=0,t}function j(t,e,n,r,s,i,o){const a=1/(e-n),c=1/(r-s),u=1/(i-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*a,t[13]=(s+r)*c,t[14]=(o+i)*u,t[15]=1,t}function q(t,e,n,r){const i=e[0],o=e[1],c=e[2];let u=i-n[0],h=o-n[1],f=c-n[2];const l=(0,s.FD)();if(Math.abs(u)<l&&Math.abs(h)<l&&Math.abs(f)<l)return void a(t);let d=1/Math.sqrt(u*u+h*h+f*f);u*=d,h*=d,f*=d;const m=r[0],M=r[1],b=r[2];let g=M*f-b*h,_=b*u-m*f,p=m*h-M*u;d=Math.sqrt(g*g+_*_+p*p),d?(d=1/d,g*=d,_*=d,p*=d):(g=0,_=0,p=0);let v=h*p-f*_,y=f*g-u*p,S=u*_-h*g;d=Math.sqrt(v*v+y*y+S*S),d?(d=1/d,v*=d,y*=d,S*=d):(v=0,y=0,S=0),t[0]=g,t[1]=v,t[2]=u,t[3]=0,t[4]=_,t[5]=y,t[6]=h,t[7]=0,t[8]=p,t[9]=S,t[10]=f,t[11]=0,t[12]=-(g*i+_*o+p*c),t[13]=-(v*i+y*o+S*c),t[14]=-(u*i+h*o+f*c),t[15]=1}function T(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function C(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function E(t,e){if(t===e)return!0;const n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],c=t[5],u=t[6],h=t[7],f=t[8],l=t[9],d=t[10],m=t[11],M=t[12],b=t[13],g=t[14],_=t[15],p=e[0],v=e[1],y=e[2],S=e[3],x=e[4],w=e[5],A=e[6],O=e[7],j=e[8],q=e[9],T=e[10],C=e[11],E=e[12],P=e[13],R=e[14],z=e[15],I=(0,s.FD)();return Math.abs(n-p)<=I*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(r-v)<=I*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-y)<=I*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(o-S)<=I*Math.max(1,Math.abs(o),Math.abs(S))&&Math.abs(a-x)<=I*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(c-w)<=I*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(u-A)<=I*Math.max(1,Math.abs(u),Math.abs(A))&&Math.abs(h-O)<=I*Math.max(1,Math.abs(h),Math.abs(O))&&Math.abs(f-j)<=I*Math.max(1,Math.abs(f),Math.abs(j))&&Math.abs(l-q)<=I*Math.max(1,Math.abs(l),Math.abs(q))&&Math.abs(d-T)<=I*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(m-C)<=I*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(M-E)<=I*Math.max(1,Math.abs(M),Math.abs(E))&&Math.abs(b-P)<=I*Math.max(1,Math.abs(b),Math.abs(P))&&Math.abs(g-R)<=I*Math.max(1,Math.abs(g),Math.abs(R))&&Math.abs(_-z)<=I*Math.max(1,Math.abs(_),Math.abs(z))}function P(t){const e=(0,s.FD)(),n=t[0],r=t[1],i=t[2],o=t[4],a=t[5],c=t[6],u=t[8],h=t[9],f=t[10];return Math.abs(1-(n*n+o*o+u*u))<=e&&Math.abs(1-(r*r+a*a+h*h))<=e&&Math.abs(1-(i*i+c*c+f*f))<=e}function R(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const z=h,I=T;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],c=e[6],u=e[7],h=e[8],f=e[9],l=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15];return t[0]=a*(l*g-d*b)-f*(c*g-u*b)+M*(c*d-u*l),t[1]=-(r*(l*g-d*b)-f*(s*g-i*b)+M*(s*d-i*l)),t[2]=r*(c*g-u*b)-a*(s*g-i*b)+M*(s*u-i*c),t[3]=-(r*(c*d-u*l)-a*(s*d-i*l)+f*(s*u-i*c)),t[4]=-(o*(l*g-d*b)-h*(c*g-u*b)+m*(c*d-u*l)),t[5]=n*(l*g-d*b)-h*(s*g-i*b)+m*(s*d-i*l),t[6]=-(n*(c*g-u*b)-o*(s*g-i*b)+m*(s*u-i*c)),t[7]=n*(c*d-u*l)-o*(s*d-i*l)+h*(s*u-i*c),t[8]=o*(f*g-d*M)-h*(a*g-u*M)+m*(a*d-u*f),t[9]=-(n*(f*g-d*M)-h*(r*g-i*M)+m*(r*d-i*f)),t[10]=n*(a*g-u*M)-o*(r*g-i*M)+m*(r*u-i*a),t[11]=-(n*(a*d-u*f)-o*(r*d-i*f)+h*(r*u-i*a)),t[12]=-(o*(f*b-l*M)-h*(a*b-c*M)+m*(a*l-c*f)),t[13]=n*(f*b-l*M)-h*(r*b-s*M)+m*(r*l-s*f),t[14]=-(n*(a*b-c*M)-o*(r*b-s*M)+m*(r*c-s*a)),t[15]=n*(a*l-c*f)-o*(r*l-s*f)+h*(r*c-s*a),t},copy:i,determinant:function(t){const e=t[0],n=t[1],r=t[2],s=t[3],i=t[4],o=t[5],a=t[6],c=t[7],u=t[8],h=t[9],f=t[10],l=t[11],d=t[12],m=t[13],M=t[14],b=t[15];return(e*o-n*i)*(f*b-l*M)-(e*a-r*i)*(h*b-l*m)+(e*c-s*i)*(h*M-f*m)+(n*a-r*o)*(u*b-l*d)-(n*c-s*o)*(u*M-f*d)+(r*c-s*a)*(u*m-h*d)},equals:E,exactEquals:C,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const n=e[0],r=e[1],s=e[2],i=e[3],o=n+n,a=r+r,c=s+s,u=n*o,h=r*o,f=r*a,l=s*o,d=s*a,m=s*c,M=i*o,b=i*a,g=i*c;return t[0]=1-f-m,t[1]=h+g,t[2]=l-b,t[3]=0,t[4]=h-g,t[5]=1-u-m,t[6]=d+M,t[7]=0,t[8]=l+b,t[9]=d-M,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=v,r=-e[0],s=-e[1],i=-e[2],o=e[3],a=e[4],c=e[5],u=e[6],h=e[7],f=r*r+s*s+i*i+o*o;return f>0?(n[0]=2*(a*o+h*r+c*i-u*s)/f,n[1]=2*(c*o+h*s+u*r-a*i)/f,n[2]=2*(u*o+h*i+a*s-c*r)/f):(n[0]=2*(a*o+h*r+c*i-u*s),n[1]=2*(c*o+h*s+u*r-a*i),n[2]=2*(u*o+h*i+a*s-c*r)),p(t,e,n),t},fromRotation:b,fromRotationTranslation:p,fromRotationTranslationScale:w,fromRotationTranslationScaleOrigin:A,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:M,fromXRotation:g,fromYRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:_,frustum:O,getRotation:x,getScale:S,getTranslation:y,hasIdentityRotation:R,identity:a,invert:u,invertOrIdentity:function(t,e){return u(t,e)||a(t),t},isOrthoNormal:P,lookAt:q,mul:z,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:j,perspective:function(t,e,n,r,s){const i=1/Math.tan(e/2);let o;return t[0]=i/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=s&&s!==1/0?(o=1/(r-s),t[10]=(s+r)*o,t[14]=2*s*r*o):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){const s=Math.tan(e.upDegrees*Math.PI/180),i=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),c=2/(o+a),u=2/(s+i);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(o-a)*c*.5,t[9]=(s-i)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:d,rotateX:m,rotateY:function(t,e,n){const r=Math.sin(n),s=Math.cos(n),i=e[0],o=e[1],a=e[2],c=e[3],u=e[8],h=e[9],f=e[10],l=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*s-u*r,t[1]=o*s-h*r,t[2]=a*s-f*r,t[3]=c*s-l*r,t[8]=i*r+u*s,t[9]=o*r+h*s,t[10]=a*r+f*s,t[11]=c*r+l*s,t},rotateZ:function(t,e,n){const r=Math.sin(n),s=Math.cos(n),i=e[0],o=e[1],a=e[2],c=e[3],u=e[4],h=e[5],f=e[6],l=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*s+u*r,t[1]=o*s+h*r,t[2]=a*s+f*r,t[3]=c*s+l*r,t[4]=u*s-i*r,t[5]=h*s-o*r,t[6]=f*s-a*r,t[7]=l*s-c*r,t},scale:l,set:o,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:T,targetTo:function(t,e,n,r){const s=e[0],i=e[1],o=e[2],a=r[0],c=r[1],u=r[2];let h=s-n[0],f=i-n[1],l=o-n[2],d=h*h+f*f+l*l;d>0&&(d=1/Math.sqrt(d),h*=d,f*=d,l*=d);let m=c*l-u*f,M=u*h-a*l,b=a*f-c*h;return d=m*m+M*M+b*b,d>0&&(d=1/Math.sqrt(d),m*=d,M*=d,b*=d),t[0]=m,t[1]=M,t[2]=b,t[3]=0,t[4]=f*b-l*M,t[5]=l*m-h*b,t[6]=h*M-f*m,t[7]=0,t[8]=h,t[9]=f,t[10]=l,t[11]=0,t[12]=s,t[13]=i,t[14]=o,t[15]=1,t},translate:f,transpose:c},Symbol.toStringTag,{value:"Module"}))},82919(t,e,n){n.d(e,{DV:()=>g,C:()=>M,vt:()=>d,Qy:()=>m,ui:()=>b,ST:()=>v,bU:()=>y,pw:()=>p,m7:()=>_,c8:()=>x});var r=n(4341),s=n(58083),i=n(35522),o=n(51850),a=n(78955),c=n(91829),u=n(71351);function h(t){return t?{ray:(0,u.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new r.I(()=>h());var f=n(27921),l=n(32114);function d(t){return t?[(0,f.vt)(t[0]),(0,f.vt)(t[1]),(0,f.vt)(t[2]),(0,f.vt)(t[3]),(0,f.vt)(t[4]),(0,f.vt)(t[5])]:[(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)(),(0,f.vt)()]}function m(){return[(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)()]}function M(t,e){for(let n=0;n<w;n++)(0,f.C)(t[n],e[n]);return t}function b(t,e,n,r=q){const o=(0,s.lw)(l.Rc.get(),e,t);(0,s.B8)(o,o);for(let t=0;t<A;++t){const e=(0,a.Z0)(l.Km.get(),O[t],o);(0,i.hZ)(r[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}g(n,r)}function g(t,e){(0,f.Cr)(e[4],e[0],e[3],t[0]),(0,f.Cr)(e[1],e[5],e[6],t[1]),(0,f.Cr)(e[4],e[5],e[1],t[2]),(0,f.Cr)(e[3],e[2],e[6],t[3]),(0,f.Cr)(e[0],e[1],e[2],t[4]),(0,f.Cr)(e[5],e[4],e[7],t[5])}function _(t,e){for(let n=0;n<w;n++){const r=t[n];if(r[0]*e.center[0]+r[1]*e.center[1]+r[2]*e.center[2]+r[3]>=e.radius)return!1}return!0}function p(t,e){return S(t,function(t,e=h()){return(0,u.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,j.get()))}function v(t,e,n){return S(t,function(t,e,n=h()){const r=(0,i.Bw)(t.vector);return(0,u.fA)(t.origin,e,n.ray),n.c0=0,n.c1=r,n}(e,n,j.get()))}function y(t,e){for(let n=0;n<w;n++)if((0,f.mN)(t[n],e)>0)return!1;return!0}function S(t,e){for(let n=0;n<w;n++)if(!(0,f.$Q)(t[n],e))return!1;return!0}const x={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},w=6,A=8,O=[(0,c.fA)(-1,-1,-1,1),(0,c.fA)(1,-1,-1,1),(0,c.fA)(1,1,-1,1),(0,c.fA)(-1,1,-1,1),(0,c.fA)(-1,-1,1,1),(0,c.fA)(1,-1,1,1),(0,c.fA)(1,1,1,1),(0,c.fA)(-1,1,1,1)],j=new r.I(h),q=m()},11964(t,e,n){n.d(e,{Cr:()=>h,G1:()=>d,LV:()=>u,_I:()=>l,kb:()=>f,ld:()=>m,vt:()=>c});var r=n(34727),s=n(4341),i=n(35522),o=n(51850),a=n(32114);function c(t){return t?{origin:(0,o.o8)(t.origin),vector:(0,o.o8)(t.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function u(t,e){const n=b.get();return n.origin=t,n.vector=e,n}function h(t,e,n=c()){return(0,i.C)(n.origin,t),(0,i.Re)(n.vector,e,t),n}function f(t,e){const n=(0,i.Re)(a.rq.get(),e,t.origin),s=(0,i.Om)(t.vector,n),o=(0,i.Om)(t.vector,t.vector),c=(0,r.qE)(s/o,0,1),u=(0,i.Re)(a.rq.get(),(0,i.hs)(a.rq.get(),t.vector,c),n);return(0,i.Om)(u,u)}function l(t,e,n){return function(t,e,n,s,o){const{vector:c,origin:u}=t,h=(0,i.Re)(a.rq.get(),e,u),f=(0,i.Om)(c,h)/(0,i.m3)(c);return(0,i.hs)(o,c,(0,r.qE)(f,0,1)),(0,i.WQ)(o,o,t.origin)}(t,e,0,0,n)}function d(t,e){const{vector:n,origin:s}=t,o=(0,i.Re)(a.rq.get(),e,s),c=(0,i.Om)(n,o)/(0,i.m3)(n);return(0,r.qE)(c,0,1)}function m(t,e,n){return!!function(t,e,n,s){const o=1e-6,c=t.origin,u=(0,i.WQ)(a.rq.get(),c,t.vector),h=e.origin,f=(0,i.WQ)(a.rq.get(),h,e.vector),l=a.rq.get(),d=a.rq.get();if(l[0]=c[0]-h[0],l[1]=c[1]-h[1],l[2]=c[2]-h[2],d[0]=f[0]-h[0],d[1]=f[1]-h[1],d[2]=f[2]-h[2],Math.abs(d[0])<o&&Math.abs(d[1])<o&&Math.abs(d[2])<o)return!1;const m=a.rq.get();if(m[0]=u[0]-c[0],m[1]=u[1]-c[1],m[2]=u[2]-c[2],Math.abs(m[0])<o&&Math.abs(m[1])<o&&Math.abs(m[2])<o)return!1;const M=l[0]*d[0]+l[1]*d[1]+l[2]*d[2],b=d[0]*m[0]+d[1]*m[1]+d[2]*m[2],g=l[0]*m[0]+l[1]*m[1]+l[2]*m[2],_=d[0]*d[0]+d[1]*d[1]+d[2]*d[2],p=(m[0]*m[0]+m[1]*m[1]+m[2]*m[2])*_-b*b;if(Math.abs(p)<o)return!1;let v=(M*b-g*_)/p,y=(M+b*v)/_;n&&(v=(0,r.qE)(v,0,1),y=(0,r.qE)(y,0,1));const S=a.rq.get(),x=a.rq.get();return S[0]=c[0]+v*m[0],S[1]=c[1]+v*m[1],S[2]=c[2]+v*m[2],x[0]=h[0]+y*d[0],x[1]=h[1]+y*d[1],x[2]=h[2]+y*d[2],s.tA=v,s.tB=y,s.pA=S,s.pB=x,s.distance2=(0,i.hG)(S,x),!0}(t,e,!0,M)&&((0,i.C)(n,M.pA),!0)}const M={tA:0,tB:0,pA:(0,o.vt)(),pB:(0,o.vt)(),distance2:0},b=new s.I(()=>c())},27921(t,e,n){n.d(e,{$Q:()=>v,C:()=>a,Cr:()=>h,O_:()=>u,Qj:()=>c,T7:()=>_,Tj:()=>p,lU:()=>f,mN:()=>y,vE:()=>S,vt:()=>o});var r=n(34727),s=n(35522),i=n(51850);function o(t=x){return[t[0],t[1],t[2],t[3]]}function a(t,e){return function(t,e,n,r,s=o()){return s[0]=t,s[1]=e,s[2]=n,s[3]=r,s}(e[0],e[1],e[2],e[3],t)}function c(t){return t}function u(t,e,n){const r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],s=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=e[0]*s,n[1]=e[1]*s,n[2]=e[2]*s,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function h(t,e,n,r=o()){const s=n[0]-e[0],i=n[1]-e[1],a=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],h=t[2]-e[2],f=i*h-a*u,l=a*c-s*h,d=s*u-i*c,m=f*f+l*l+d*d,M=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=f*M,r[1]=l*M,r[2]=d*M,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function f(t,e,n,r=0,i=Math.floor(n*(1/3)),o=Math.floor(n*(2/3))){if(n<3)return!1;e(d,r);let a=i,c=!1;for(;a<n-1&&!c;)e(m,a),a++,c=!(0,s.t2)(d,m);if(!c)return!1;for(a=Math.max(a,o),c=!1;a<n&&!c;)e(M,a),a++,(0,s.Re)(b,d,m),(0,s.S8)(b,b),(0,s.Re)(g,m,M),(0,s.S8)(g,g),c=!(0,s.t2)(d,M)&&!(0,s.t2)(m,M)&&Math.abs((0,s.Om)(b,g))<l;return c?(h(d,m,M,t),!0):(0!==r||1!==i||2!==o)&&f(t,e,n,0,1,2)}n(78955),n(44280),n(32114),n(32728);const l=.99619469809,d=(0,i.vt)(),m=(0,i.vt)(),M=(0,i.vt)(),b=(0,i.vt)(),g=(0,i.vt)();function _(t,e,n){return function(t){return 0===t||1===t}(S(t,e.origin,e.vector,0,n))}function p(t,e){return y(t,e)>=0}function v(t,e){const n=(0,s.Om)(t,e.ray.direction),r=-y(t,e.ray.origin);if(r<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return r>0;if((r<0||n<0)&&!(r<0&&n<0))return!0;const i=r/n;return n>0?i<e.c1&&(e.c1=i):i>e.c0&&(e.c0=i),e.c0<=e.c1}function y(t,e){return(0,s.Om)(t,e)+t[3]}function S(t,e,n,i,o){const a=(0,s.Om)(t,n),c=y(t,e);if(0===a)return c>=0?2:3;let u=-c/a;return 1&i&&(u=(0,r.qE)(u,0,1)),!(4&i)&&u<0||!(8&i)&&u>1?c>=0?2:3:((0,s.WQ)(o,e,(0,s.hs)(o,n,u)),c>=0?0:1)}const x=[0,0,1,0]},71351(t,e,n){n.d(e,{C:()=>h,Cr:()=>f,LV:()=>u,fA:()=>l,oC:()=>d,vt:()=>a}),n(4576);var r=n(4341),s=(n(77690),n(29242)),i=n(35522),o=n(51850);function a(t){return t?c((0,o.o8)(t.origin),(0,o.o8)(t.direction)):c((0,o.vt)(),(0,o.vt)())}function c(t,e){return{origin:t,direction:e}}function u(t,e){const n=m.get();return n.origin=t,n.direction=e,n}function h(t,e=a()){return l(t.origin,t.direction,e)}function f(t,e,n=a()){return(0,i.C)(n.origin,t),(0,i.Re)(n.direction,e,t),n}function l(t,e,n=a()){return(0,i.C)(n.origin,t),(0,i.C)(n.direction,e),n}function d(t,e,n){const r=(0,i.Om)(t.direction,(0,i.Re)(n,e,t.origin));return(0,i.WQ)(n,t.origin,(0,i.hs)(n,t.direction,r)),n}n(32114);const m=new r.I(()=>a());(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,s.vt)()},94008(t,e,n){n.d(e,{iy:()=>d}),n(44208),n(53966);var r=n(34727),s=n(34304),i=n(58083),o=n(35522),a=n(51850),c=n(91829),u=n(34275);var h=n(71351),f=n(44280),l=n(32114);class d{constructor(t=0,e=0,n=0,r=0){this.radius=r,"number"==typeof t?this._center=(0,a.fA)(t,e,n):function(t){return e=t,(0,u.vZ)(e)&&e.length>=3||function(t){return((0,u.aI)(t)||Array.isArray(t))&&t.length>=3}(t);var e}(t)||function(t){return(e=t)instanceof Float32Array&&e.length>=4||function(t){return Array.isArray(t)&&t.length>=4}(t);var e}(t)?(this._center=(0,a.ci)(t),this.radius=4===t.length?t[3]:e):(this._center=(0,a.o8)(t.center),this.radius=t.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(t){(0,o.C)(this.center,t)}exactEquals(t){return(0,o.aI)(this._center,t.center)&&this.radius===t.radius}copyFrom(t){return t!==this&&((0,o.C)(this._center,t.center),this.radius=t.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,c.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(t){return(0,o.hG)(this.center,t)<=this.radius**2}intersectRay(t,e){if(null==t)return!1;if(!this._intersect(t,m))return!1;let{t0:n,t1:r}=m;if((n<0||r<n&&r>0)&&(n=r),n<0)return!1;if(e){const{origin:r,direction:s}=t;e[0]=r[0]+s[0]*n,e[1]=r[1]+s[1]*n,e[2]=r[2]+s[2]*n}return!0}intersectLine(t,e){const n=(0,h.Cr)(t,e);if(!this._intersect(n,m))return[];const{origin:r,direction:i}=n,{t0:c,t1:u}=m,f=t=>{const e=(0,a.vt)();return(0,o.Ln)(e,r,i,t),this.projectPoint(e,e)};return Math.abs(c-u)<(0,s.FD)()?[f(c)]:[f(c),f(u)]}_intersect(t,e){const{origin:n,direction:r}=t,s=M;s[0]=n[0]-this.center[0],s[1]=n[1]-this.center[1],s[2]=n[2]-this.center[2];const i=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===i)return!1;const o=2*(r[0]*s[0]+r[1]*s[1]+r[2]*s[2]),a=o*o-4*i*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-this.radius**2);if(a<0)return!1;const c=Math.sqrt(a);return e.t0=(-o-c)/(2*i),e.t1=(-o+c)/(2*i),!0}projectPoint(t,e){const n=(0,o.Re)(l.rq.get(),t,this.center),r=(0,o.hs)(l.rq.get(),n,this.radius/(0,o.Bw)(n));return(0,o.WQ)(e,r,this.center)}closestPointOnSilhouette(t,e){const n=l.rq.get(),r=l.Rc.get();(0,o.$A)(n,t.origin,t.direction),(0,o.$A)(e,n,t.origin),(0,o.hs)(e,e,1/(0,o.Bw)(e)*this.radius);const s=this._angleToSilhouette(t.origin),a=(0,f.g7)(t.origin,e);return(0,i.$0)(r,a+s,n),(0,o.Z0)(e,e,r),e}frustumCoverage(t,e,n){const r=this.radius,s=r*r,i=t+.5*Math.PI,o=e*e+s-2*Math.cos(i)*e*r,a=Math.sqrt(o),c=o-s;if(c<=0)return.5;const u=Math.sqrt(c),h=Math.acos(u/a)-Math.asin(r/(a/Math.sin(i)));return Math.min(1,(h+.5*n)/n)}_angleToSilhouette(t){const e=(0,o.Re)(l.rq.get(),t,this.center),n=(0,o.Bw)(e),s=this.radius,i=s+Math.abs(s-n);return(0,r.XM)(s/i)}union(t){const e=(0,o.Io)(this._center,t.center),n=this.radius,r=t.radius;return e+r<n?this:e+n<r?(this.copyFrom(t),this):((0,o.Cc)(this._center,this._center,t.center,(e+r-n)/(2*e)),this.radius=(e+n+r)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(t){const{center:e,radius:n}=this,r=t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3];return r<0?Math.min(r+n,0):Math.max(r-n,0)}}new d;const m={t0:0,t1:0},M=(0,a.vt)();(0,a.vt)(),(0,a.vt)()},44280(t,e,n){n.d(e,{g7:()=>a,gr:()=>o});var r=n(34727),s=n(35522),i=n(51850);function o(t,e){return(0,s.Om)(t,e)/(0,s.Bw)(t)}function a(t,e){const n=(0,s.Om)(t,e)/((0,s.Bw)(t)*(0,s.Bw)(e));return-(0,r.XM)(n)}(0,i.vt)(),(0,i.vt)()},32114(t,e,n){n.d(e,{Rc:()=>d,J8:()=>m,rq:()=>f,Km:()=>l}),n(44208);var r=n(26390),s=n(29242),i=n(9093),o=n(82534),a=n(48163),c=n(51850),u=n(91829);class h{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new h(a.vt)}static createVec3f64(){return new h(c.vt)}static createVec4f64(){return new h(u.vt)}static createMat3f64(){return new h(s.vt)}static createMat4f64(){return new h(i.vt)}static createQuatf64(){return new h(o.vt)}get test(){}}h.createVec2f64();const f=h.createVec3f64(),l=h.createVec4f64(),d=(h.createMat3f64(),h.createMat4f64()),m=h.createQuatf64()},32728(t,e,n){n.d(e,{YH:()=>a,hG:()=>i,nu:()=>c,wp:()=>o}),n(34727);var r=n(35522),s=n(51850);function i(t){const e=t[0]*t[0]+t[4]*t[4]+t[8]*t[8],n=t[1]*t[1]+t[5]*t[5]+t[9]*t[9],r=t[2]*t[2]+t[6]*t[6]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))}function o(t,e){const n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),s=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,s,i),t}function a(t,e,n){n=n||t;const s=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-s*e[0],t[1]-s*e[1],t[2]-s*e[2]),(0,r.S8)(n,n)}function c(t,e,n,i=(0,s.vt)()){const o=(0,r.Bw)(t),a=(0,r.Bw)(e),c=(0,r.Om)(t,e)/(o*a);if(c<.9999999999999999){const s=Math.acos(c),f=((1-n)*o+n*a)/Math.sin(s),l=f/o*Math.sin((1-n)*s),d=f/a*Math.sin(n*s);return(0,r.hs)(u,t,l),(0,r.hs)(h,e,d),(0,r.WQ)(i,u,h)}return(0,r.Cc)(i,t,e,n)}(0,s.vt)(),(0,s.vt)(),(0,s.vt)();const u=(0,s.vt)(),h=(0,s.vt)()},78230(t,e,n){n.d(e,{x:()=>f});var r=n(93687),s=n(15142),i=n(35522),o=n(51850),a=n(82919),c=n(71351),u=n(94008),h=n(620);class f{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new l,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),l.clearPool(),q[0]=null,R.prune(),N.prune()}add(t){const e=Array.from(t);this._grow(e);const n=l.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));l.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=l.acquire();for(const r of t){const t=e??this.objectToBoundingSphere(r);w(t.radius)?(n.init(this._root),M(r,t,n)):this._degenerateObjects.delete(r)}l.release(n),this._shrink()}update(t,e){if(!w(e.radius)&&this._isDegenerate(t))return;const n=function(t){return q[0]=t,q}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const r=(0,c.LV)(t,e);d(this._root,t=>{if(!function(t,e){return v(e.bounds.center,2*-e.halfSize,E),v(e.bounds.center,2*e.halfSize,P),(0,h.O_)(t.origin,t.direction,E,P)}(r,t))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(r,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,r){const s=(0,c.LV)(t,e);d(this._root,t=>{if(!function(t,e,n){return v(e.bounds.center,2*-e.halfSize,E),v(e.bounds.center,2*e.halfSize,P),n.applyToMinMax(E,P),(0,h.O_)(t.origin,t.direction,E,P)}(s,t,r))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(s,t,r)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(s,t,r)&&n(t)}),!0})}forEach(t){d(this._root,e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0}),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,r=()=>!0,s=1/0){let o=1/0,c=1/0,u=null;const h=S(t,e),f=i=>{if(--s,!r(i))return;const h=this.objectToBoundingSphere(i);if(!(0,a.m7)(n,h))return;const f=x(t,e,h.center),l=f-h.radius,d=f+h.radius;l<o&&(o=l,c=d,u=i)};return m(this._root,r=>{if(s<=0||!(0,a.m7)(n,r.bounds))return!1;if((0,i.hs)(C,h,r.halfSize),(0,i.WQ)(C,C,r.bounds.center),x(t,e,C)>c)return!1;const o=r.node;return o.terminals.forAll(t=>f(t)),null!==o.residents&&o.residents.forAll(t=>f(t)),!0},t,e),u}forEachInDepthRange(t,e,n,r,s,o,c){let u=-1/0,h=1/0;const f={setRange:t=>{1===n?(u=Math.max(u,t.near),h=Math.min(h,t.far)):(u=Math.max(u,-t.far),h=Math.min(h,-t.near))}};f.setRange(r);const l=x(e,n,t),d=S(e,n),M=S(e,-n),b=t=>{if(!c(t))return;const r=this.objectToBoundingSphere(t),i=x(e,n,r.center)-l,d=i-r.radius,m=i+r.radius;d>h||m<u||!(0,a.m7)(o,r)||s(t,f)};m(this._root,t=>{if(!(0,a.m7)(o,t.bounds))return!1;if((0,i.hs)(C,d,t.halfSize),(0,i.WQ)(C,C,t.bounds.center),x(e,n,C)-l>h)return!1;if((0,i.hs)(C,M,t.halfSize),(0,i.WQ)(C,C,t.bounds.center),x(e,n,C)-l<u)return!1;const r=t.node;return r.terminals.forAll(t=>b(t)),null!==r.residents&&r.residents.forAll(t=>b(t)),!0},e,n)}forEachNode(t){d(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachNeighbor(t,e){const n=e.radius,r=e.center,s=e=>{const s=this.objectToBoundingSphere(e),o=s.radius,a=n+o;return!((0,i.hG)(s.center,r)-a*a<=0)||t(e)};let o=!0;const a=t=>{o&&(o=s(t))};d(this._root,t=>{const e=t.bounds.radius,s=n+e;if((0,i.hG)(t.bounds.center,r)-s*s>0)return!1;const c=t.node;return c.terminals.forAll(a),o&&null!==c.residents&&c.residents.forAll(a),o}),o&&this.forEachDegenerateObject(a)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n.radius>0)||n.intersectRay(t)}_intersectsObjectWithOffset(t,e,n){const r=this.objectToBoundingSphere(e);return!(r.radius>0)||n.applyToBoundingSphere(r).intersectRay(t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const r=l.acquire().init(t);this._add(e.at(n),r),l.release(r)}}_grow(t){if(y(t,t=>this.objectToBoundingSphere(t),z),w(z.radius)&&!this._fitsInsideTree(z))if(g(this._root.node))this._root.bounds.copyFrom(z),this._root.halfSize=1.25*this._root.bounds.radius,this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(z);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(z,t):this._growRootAsSubNode(t),l.release(t)}}_rebuildTree(t,e){I.center=e.bounds.center,I.radius=e.halfSize,y([t,I],t=>t,D);const n=l.acquire().init(this._root);this._root.initFrom(null,D,D.radius),this._root.increaseHalfSize(1.25),d(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),l.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return d(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t.radius,n=t.center;let r=-1/0;const s=this._root.bounds.center,i=this._root.halfSize;for(let t=0;t<3;t++){const o=s[t]-i-(n[t]-e),a=n[t]+e-(s[t]+i),c=Math.max(0,Math.ceil(o/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,h=2**Math.ceil(Math.log(c+u)*Math.LOG2E);r=Math.max(r,h),B[t].min=c,B[t].max=u}for(let t=0;t<3;t++){let e=B[t].min,n=B[t].max;const o=(r-(e+n))/2;e+=Math.ceil(o),n+=Math.floor(o);const a=s[t]-i-e*i*2;T.center[t]=a+(n+e)*i}const o=r*i;return T.radius=o*j,l.acquire().initFrom(null,T,o,0)}_growRootAsSubNode(t){const e=this._root.node;z.center=this._root.bounds.center,z.radius=this._root.halfSize,this._root.init(t),t.advanceTo(z,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,r=0;for(;r<e.length&&null==t;)n=r++,t=e[n];for(;r<e.length;)if(e[r++])return-1;return n}_isDegenerate(t){return!w(this.objectToBoundingSphere(t).radius)}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t.radius<=n&&t.center[0]>=e.center[0]-n&&t.center[0]<=e.center[0]+n&&t.center[1]>=e.center[1]-n&&t.center[1]<=e.center[1]+n&&t.center[2]>=e.center[2]-n&&t.center[2]<=e.center[2]+n}_nodeToJSON(t){const e=t.children.map(t=>t?this._nodeToJSON(t):null),n=t.residents?.map(t=>this.objectToBoundingSphere(t)),r=t.terminals?.map(t=>this.objectToBoundingSphere(t));return{children:e,residents:n,terminals:r}}}class l{constructor(){this.bounds=new u.iy,this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,r=this.depth){return this.node=null!=t?t:l.createEmptyNode(),e&&this.bounds.copyFrom(e),this.halfSize=n,this.depth=r,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds.radius=this.halfSize*j}advance(t){let e=this.node.children[t];e||(e=l.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=A[t];return this.bounds.center[0]+=n[0]*this.halfSize,this.bounds.center[1]+=n[1]*this.halfSize,this.bounds.center[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}const r=this._childIndex(t);e?.(this,r),this.advance(r)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t.radius>this.halfSize/2}_childIndex(t){const e=this.bounds.center;return(e[0]<t.center[0]?1:0)+(e[1]<t.center[1]?2:0)+(e[2]<t.center[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new s.A({shrink:!0}),residents:new s.A({shrink:!0})}}static{this._pool=new r.A(()=>new l)}static acquire(){return l._pool.acquire()}static release(t){l._pool.release(t)}static clearPool(){l._pool.prune()}}function d(t,e){let n=l.acquire().init(t);const r=[n];for(;0!==r.length;){if(n=r.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&r.push(l.acquire().init(n).advance(t));l.release(n)}}function m(t,e,n,r=1){let s=l.acquire().init(t);const i=[s];for(function(t,e,n){if(!N.length)for(let t=0;t<8;++t)N.push({index:0,distance:0});for(let n=0;n<8;++n){const r=A[n];N.data[n].index=n,N.data[n].distance=x(t,e,r)}N.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=N.data[t].index}(n,r,F);0!==i.length;){if(s=i.pop(),e(s)&&!s.isLeaf())for(let t=7;t>=0;--t){const e=F[t];s.node.children[e]&&i.push(l.acquire().init(s).advance(e))}l.release(s)}}function M(t,e,n){R.clear();const r=n.advanceTo(e,(t,e)=>{R.push(t.node),R.push(e)})?n.node.terminals:n.node.residents;if(r.removeUnordered(t),0===r.length)for(let t=R.length-2;t>=0&&b(R.data[t],R.data[t+1]);t-=2);}function b(t,e){return e>=0&&(t.children[e]=null),!!g(t)&&(null===t.residents&&(t.residents=new s.A({shrink:!0})),!0)}function g(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function _(t,e){t[0]=Math.min(t[0],e.center[0]-e.radius),t[1]=Math.min(t[1],e.center[1]-e.radius),t[2]=Math.min(t[2],e.center[2]-e.radius)}function p(t,e){t[0]=Math.max(t[0],e.center[0]+e.radius),t[1]=Math.max(t[1],e.center[1]+e.radius),t[2]=Math.max(t[2],e.center[2]+e.radius)}function v(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function y(t,e,n){E[0]=1/0,E[1]=1/0,E[2]=1/0,P[0]=-1/0,P[1]=-1/0,P[2]=-1/0;for(const n of t){const t=e(n);w(t.radius)&&(_(E,t),p(P,t))}(0,i.Cc)(n.center,E,P,.5),n.radius=Math.max(P[0]-E[0],P[1]-E[1],P[2]-E[2])/2}function S(t,e){let n,r=1/0;for(let s=0;s<8;++s){const i=x(t,e,O[s]);i<r&&(r=i,n=O[s])}return n}function x(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function w(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const A=[(0,o.fA)(-1,-1,-1),(0,o.fA)(1,-1,-1),(0,o.fA)(-1,1,-1),(0,o.fA)(1,1,-1),(0,o.fA)(-1,-1,1),(0,o.fA)(1,-1,1),(0,o.fA)(-1,1,1),(0,o.fA)(1,1,1)],O=[(0,o.fA)(-1,-1,-1),(0,o.fA)(-1,-1,1),(0,o.fA)(-1,1,-1),(0,o.fA)(-1,1,1),(0,o.fA)(1,-1,-1),(0,o.fA)(1,-1,1),(0,o.fA)(1,1,-1),(0,o.fA)(1,1,1)],j=Math.sqrt(3),q=[null],T=new u.iy,C=(0,o.vt)(),E=(0,o.vt)(),P=(0,o.vt)(),R=new s.A,z=new u.iy,I=new u.iy,D=new u.iy,B=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],N=new s.A,F=[0,0,0,0,0,0,0,0]},56780(t,e,n){n.r(e),n.d(e,{default:()=>_});var r=n(5482),s=n(17676),i=n(24326),o=n(91429),a=n(35522),c=n(51850),u=n(11964),h=n(94008),f=n(78230),l=n(44801);function d(t,e,n){const r=new h.iy;return(0,a.hs)(r.center,t,.5),(0,a.Ln)(r.center,r.center,e,.5),r.radius=(0,a.Io)(r.center,t),(0,a.WQ)(r.center,r.center,n),r}class m{constructor(t,e,n){this.objectId=t,this.target=e,this.distance=n}}class M extends m{constructor(t,e,n){super(t,e,n),this.type="vertex"}}class b extends m{constructor(t,e,n,r,s){super(t,e,n),this.start=r,this.end=s,this.type="edge"}}let g=class{constructor(){this._idToComponent=new Map,this._components=new f.x(t=>t.bounds),this._edges=new f.x(t=>t.bounds),this._tmpLineSegment=(0,u.vt)(),this._tmpP1=(0,c.vt)(),this._tmpP2=(0,c.vt)(),this._tmpP3=(0,c.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,s.Te)(e);const n=t;n.mbs=new h.iy(t.mbsJSON),await this._ensureEdgeLocations(n,e);const r=[];return this._edges.forEachNeighbor(t=>(this._addCandidates(n,t,r),r.length<1e3),n.mbs),{result:{candidates:r}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){const{id:e,uid:r}=t;n.push({id:e,uid:r})}return!0},t.mbs),!n.length)return;const r={components:n},s=await this.remoteClient.invoke("fetchAllEdgeLocations",r,e??{});for(const t of s.components)this._setFetchEdgeLocations(t)}async add(t){const e=new v(t.id,new h.iy(t.bounds));return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=l.HY.createView(t.locations),r=new Array(n.count),s=(0,c.vt)(),i=(0,c.vt)();for(let o=0;o<n.count;o++){n.position0.getVec(o,s),n.position1.getVec(o,i);const a=d(s,i,t.origin),c=new y(e,o,a);r[o]=c}this._edges.add(r);const{objectIds:o,origin:a}=t;e.info={locations:n,objectIds:o,origin:a}}_addCandidates(t,e,n){const{info:r}=e.component,{origin:s,objectIds:i}=r,o=r.locations,c=o.position0.getVec(e.index,this._tmpP1),u=o.position1.getVec(e.index,this._tmpP2);(0,a.WQ)(c,c,s),(0,a.WQ)(u,u,s);const h=i[o.componentIndex.get(e.index)];this._addEdgeCandidate(t,h,c,u,n),p(t,h,c,n),p(t,h,u,n)}_addEdgeCandidate(t,e,n,r,s){if(!t.returnEdge)return;const i=t.mbs.center,o=(0,u.Cr)(n,r,this._tmpLineSegment),h=(0,u._I)(o,i,this._tmpP3);t.mbs.contains(h)&&s.push(new b(e,(0,c.o8)(h),(0,a.Io)(i,h),(0,c.o8)(n),(0,c.o8)(r)))}};g=(0,r.Cg)([(0,o.$K)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],g);const _=g;function p(t,e,n,r){t.returnVertex&&t.mbs.contains(n)&&r.push(new M(e,(0,c.o8)(n),(0,a.Io)(t.mbs.center,n)))}class v{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=(0,i.c)()}}class y{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9981],{5482(e,t,r){function i(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o}function n(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i,n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],r&&(n=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");n&&(i=function(){try{n.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t}r.d(t,{Cg:()=>i,hk:()=>o,mS:()=>n}),Object.create,Object.create;var s="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};function o(e){function t(t){e.error=e.hasError?new s(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,i=0;return function n(){for(;r=e.stack.pop();)try{if(!r.async&&1===i)return i=0,e.stack.push(r),Promise.resolve().then(n);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return i|=2,Promise.resolve(s).then(n,function(e){return t(e),n()})}else i|=1}catch(e){t(e)}if(1===i)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},83349(e,t,r){function i(e,t,r){r=r||2;var i,s,a,l,h,c,f,x=t&&t.length,y=x?t[0]*r:e.length,d=n(e,0,y,r,!0),p=[];if(!d||d.next===d.prev)return p;if(x&&(d=u(e,t,d,r)),e.length>80*r){i=a=e[0],s=l=e[1];for(var g=r;g<y;g+=r)(h=e[g])<i&&(i=h),(c=e[g+1])<s&&(s=c),h>a&&(a=h),c>l&&(l=c);f=0!==(f=Math.max(a-i,l-s))?1/f:0}return o(d,p,r,i,s,f),p}function n(e,t,r,i,n){var s,o;if(n===T(e,t,r,i)>0)for(s=t;s<r;s+=i)o=V(s,e[s],e[s+1],o);else for(s=r-i;s>=t;s-=i)o=V(s,e[s],e[s+1],o);if(o&&v(o,o.next)){var a=o.next;S(o),o=a}return o}function s(e,t){if(!e)return e;t||(t=e);var r,i=e;do{if(r=!1,i.steiner||!v(i,i.next)&&0!==b(i.prev,i,i.next))i=i.next;else{var n=i.prev;if(S(i),(i=t=n)===i.next)break;r=!0}}while(r||i!==t);return t}function o(e,t,r,i,n,u,f){if(e){!f&&u&&p(e,i,n,u);for(var x,y,d=e;e.prev!==e.next;)if(x=e.prev,y=e.next,u?l(e,i,n,u):a(e))t.push(x.i/r),t.push(e.i/r),t.push(y.i/r),S(e),e=y.next,d=y.next;else if((e=y)===d){f?1===f?o(e=h(s(e),t,r),t,r,i,n,u,2):2===f&&c(e,t,r,i,n,u):o(s(e),t,r,i,n,u,1);break}}}function a(e){var t=e.prev,r=e,i=e.next;if(b(t,r,i)>=0)return!1;for(var n=e.next.next;n!==e.prev;){if(m(t.x,t.y,r.x,r.y,i.x,i.y,n.x,n.y)&&b(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function l(e,t,r,i){var n=e.prev,s=e,o=e.next;if(b(n,s,o)>=0)return!1;for(var a=n.x<s.x?n.x<o.x?n.x:o.x:s.x<o.x?s.x:o.x,l=n.y<s.y?n.y<o.y?n.y:o.y:s.y<o.y?s.y:o.y,h=n.x>s.x?n.x>o.x?n.x:o.x:s.x>o.x?s.x:o.x,c=n.y>s.y?n.y>o.y?n.y:o.y:s.y>o.y?s.y:o.y,u=g(a,l,t,r,i),f=g(h,c,t,r,i),x=e.prevZ,y=e.nextZ;x&&x.z>=u&&y&&y.z<=f;){if(x!==e.prev&&x!==e.next&&m(n.x,n.y,s.x,s.y,o.x,o.y,x.x,x.y)&&b(x.prev,x,x.next)>=0)return!1;if(x=x.prevZ,y!==e.prev&&y!==e.next&&m(n.x,n.y,s.x,s.y,o.x,o.y,y.x,y.y)&&b(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;x&&x.z>=u;){if(x!==e.prev&&x!==e.next&&m(n.x,n.y,s.x,s.y,o.x,o.y,x.x,x.y)&&b(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;y&&y.z<=f;){if(y!==e.prev&&y!==e.next&&m(n.x,n.y,s.x,s.y,o.x,o.y,y.x,y.y)&&b(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function h(e,t,r){var i=e;do{var n=i.prev,o=i.next.next;!v(n,o)&&I(n,i,i.next,o)&&k(n,o)&&k(o,n)&&(t.push(n.i/r),t.push(i.i/r),t.push(o.i/r),S(i),S(i.next),i=e=o),i=i.next}while(i!==e);return s(i)}function c(e,t,r,i,n,a){var l=e;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&w(l,h)){var c=A(l,h);return l=s(l,l.next),c=s(c,c.next),o(l,t,r,i,n,a),void o(c,t,r,i,n,a)}h=h.next}l=l.next}while(l!==e)}function u(e,t,r,i){var o,a,l,h=[];for(o=0,a=t.length;o<a;o++)(l=n(e,t[o]*i,o<a-1?t[o+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),h.push(_(l));for(h.sort(f),o=0;o<h.length;o++)r=s(r=y(h[o],r),r.next);return r}function f(e,t){return e.x-t.x}function x(e){if(e.next.prev===e)return e;let t=e;for(;;){const r=t.next;if(r.prev===t||r===t||r===e)break;t=r}return t}function y(e,t){var r=function(e,t){var r,i=t,n=e.x,s=e.y,o=-1/0;do{if(s<=i.y&&s>=i.next.y&&i.next.y!==i.y){var a=i.x+(s-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&a>o){if(o=a,a===n){if(s===i.y)return i;if(s===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==t);if(!r)return null;if(n===o)return r;var l,h=r,c=r.x,u=r.y,f=1/0;i=r;do{n>=i.x&&i.x>=c&&n!==i.x&&m(s<u?n:o,s,c,u,s<u?o:n,s,i.x,i.y)&&(l=Math.abs(s-i.y)/(n-i.x),k(i,e)&&(l<f||l===f&&(i.x>r.x||i.x===r.x&&d(r,i)))&&(r=i,f=l)),i=i.next}while(i!==h);return r}(e,t);if(!r)return t;var i=A(r,e),n=s(r,r.next);let o=x(i);return s(o,o.next),n=x(n),x(t===r?n:t)}function d(e,t){return b(e.prev,e,t.prev)<0&&b(t.next,e,e.next)<0}function p(e,t,r,i){var n=e;do{null===n.z&&(n.z=g(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,function(e){var t,r,i,n,s,o,a,l,h=1;do{for(r=e,e=null,s=null,o=0;r;){for(o++,i=r,a=0,t=0;t<h&&(a++,i=i.nextZ);t++);for(l=h;a>0||l>0&&i;)0!==a&&(0===l||!i||r.z<=i.z)?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,l--),s?s.nextZ=n:e=n,n.prevZ=s,s=n;r=i}s.nextZ=null,h*=2}while(o>1)}(n)}function g(e,t,r,i,n){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*n)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*n)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function _(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function m(e,t,r,i,n,s,o,a){return(n-o)*(t-a)-(e-o)*(s-a)>=0&&(e-o)*(i-a)-(r-o)*(t-a)>=0&&(r-o)*(s-a)-(n-o)*(i-a)>=0}function w(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&I(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(k(e,t)&&k(t,e)&&function(e,t){var r=e,i=!1,n=(e.x+t.x)/2,s=(e.y+t.y)/2;do{r.y>s!=r.next.y>s&&r.next.y!==r.y&&n<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==e);return i}(e,t)&&(b(e.prev,e,t.prev)||b(e,t.prev,t))||v(e,t)&&b(e.prev,e,e.next)>0&&b(t.prev,t,t.next)>0)}function b(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function I(e,t,r,i){var n=P(b(e,t,r)),s=P(b(e,t,i)),o=P(b(r,i,e)),a=P(b(r,i,t));return n!==s&&o!==a||!(0!==n||!M(e,r,t))||!(0!==s||!M(e,i,t))||!(0!==o||!M(r,e,i))||!(0!==a||!M(r,t,i))}function M(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function P(e){return e>0?1:e<0?-1:0}function k(e,t){return b(e.prev,e,e.next)<0?b(e,t,e.next)>=0&&b(e,e.prev,t)>=0:b(e,t,e.prev)<0||b(e,e.next,t)<0}function A(e,t){var r=new B(e.i,e.x,e.y),i=new B(t.i,t.x,t.y),n=e.next,s=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,s.next=i,i.prev=s,i}function V(e,t,r,i){var n=new B(e,t,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function S(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function B(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(e,t,r,i){for(var n=0,s=t,o=r-i;s<r;s+=i)n+=(e[o]-e[s])*(e[s+1]+e[o+1]),o=s;return n}r.d(t,{e:()=>i}),i.deviation=function(e,t,r,i){var n=t&&t.length,s=n?t[0]*r:e.length,o=Math.abs(T(e,0,s,r));if(n)for(var a=0,l=t.length;a<l;a++){var h=t[a]*r,c=a<l-1?t[a+1]*r:e.length;o-=Math.abs(T(e,h,c,r))}var u=0;for(a=0;a<i.length;a+=3){var f=i[a]*r,x=i[a+1]*r,y=i[a+2]*r;u+=Math.abs((e[f]-e[y])*(e[x+1]-e[f+1])-(e[f]-e[x])*(e[y+1]-e[f+1]))}return 0===o&&0===u?0:Math.abs((u-o)/o)},i.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},i=0,n=0;n<e.length;n++){for(var s=0;s<e[n].length;s++)for(var o=0;o<t;o++)r.vertices.push(e[n][s][o]);n>0&&(i+=e[n-1].length,r.holes.push(i))}return r}},34304(e,t,r){r.d(t,{DF:()=>l,FD:()=>n,Ov:()=>s,ct:()=>h});let i=1e-6;function n(){return i}const s=Math.random,o=Math.PI/180,a=180/Math.PI;function l(e){return e*o}function h(e){return e*a}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:s,equals:function(e,t){return Math.abs(e-t)<=i*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:n,setEpsilon:function(e){i=e},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>o,RS:()=>n,Ul:()=>x,i5:()=>f,lM:()=>s,qK:()=>c});var i=r(34275);const n=16;function s(e){if(!e)return 0;let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return h(e,8);let r=u;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return n;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+f:Array.isArray(t)?h(t,n):0:0),0)}function h(e,t){return u+e.length*t}const c=32,u=16,f=145,x=64},51624(e,t,r){r.d(t,{A:()=>h});var i=r(44208),n=r(69397),s=r(93687);const o=4294967296,a=new TextDecoder("utf-8"),l=(0,i.A)("safari")||(0,i.A)("ios")?6:(0,i.A)("ff")?12:32;class h{constructor(e,t,r=0,i=e?.byteLength??0){this._tag=0,this._dataType=99,this._init(e,t,r,i)}[Symbol.dispose](){this.release()}_init(e,t,r,i){this._data=e,this._dataView=t,this._pos=r,this._end=i}get usedMemory(){return 64+(0,n.Qf)(this._data)}asUnsafe(){return this}clone(){return new h(this._data,this._dataView,this._pos,this._end)}clonePooled(){return h.constructPooled(this._data,this._dataView,this._pos,this._end)}static constructPooled(e,t,r=0,i=e?.byteLength??0){const n=h.pool.acquire();return n._init(e,t,r,i),n}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getPackedEnd(){const e=this.getUInt32();return this._pos+e}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,i){const n=this.getMessage(),s=e(n,t,r,i);return n.release(),s}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=h.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){h.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipToEnd(){for(;this.next();)this.skip()}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,i=0;if(this._end-t>=10)do{if(i=e[t++],r|=127&i,!(128&i))break;if(i=e[t++],r|=(127&i)<<7,!(128&i))break;if(i=e[t++],r|=(127&i)<<14,!(128&i))break;if(i=e[t++],r|=(127&i)<<21,!(128&i))break;if(i=e[t++],r+=268435456*(127&i),!(128&i))break;if(i=e[t++],r+=34359738368*(127&i),!(128&i))break;if(i=e[t++],r+=4398046511104*(127&i),!(128&i))break;if(i=e[t++],r+=562949953421312*(127&i),!(128&i))break;if(i=e[t++],r+=72057594037927940*(127&i),!(128&i))break;if(i=e[t++],r+=0x8000000000000000*(127&i),!(128&i))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(i=e[t],128&i);)++t,r+=(127&i)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=i*n}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t,r=0,i=0;const n=1&e[this._pos];if(i=e[this._pos++],r|=127&i,!(128&i))return n?-(r+1)/2:r/2;if(i=e[this._pos++],r|=(127&i)<<7,!(128&i))return n?-(r+1)/2:r/2;if(i=e[this._pos++],r|=(127&i)<<14,!(128&i))return n?-(r+1)/2:r/2;if(i=e[this._pos++],r|=(127&i)<<21,!(128&i))return n?-(r+1)/2:r/2;if(i=e[this._pos++],r+=268435456*(127&i),!(128&i))return n?-(r+1)/2:r/2;if(i=e[this._pos++],r+=34359738368*(127&i),!(128&i))return n?-(r+1)/2:r/2;if(i=e[this._pos++],r+=4398046511104*(127&i),!(128&i))return n?-(r+1)/2:r/2;if(t=BigInt(r),i=e[this._pos++],t+=0x2000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x100000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x8000000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>l){const i=e.subarray(t,r);return a.decode(i)}let i="",n="";for(let s=t;s<r;++s){const t=e[s];128&t?n+="%"+t.toString(16):(i+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(i+=decodeURIComponent(n)),i}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}static{this.pool=new s.A(()=>new h(null,null),void 0,e=>{e._data=null,e._dataView=null})}}},91075(e,t,r){r.d(t,{A:()=>l});var i=r(5482),n=r(25482),s=r(91429),o=r(16930),a=r(36005);let l=class extends n.o{constructor(...e){super(...e),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=o.A.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(e,t){if(e instanceof o.A)return e;if(null!=e){const r=new o.A;return r.read(e,t),r}return e}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(e){return this.cache[e]}setCacheValue(e,t){this.cache[e]=t}};(0,i.Cg)([(0,s.MZ)()],l.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],l.prototype,"cache",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],l.prototype,"extent",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],l.prototype,"hasM",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],l.prototype,"hasZ",void 0),(0,i.Cg)([(0,s.MZ)({type:o.A,json:{write:!0},value:o.A.WGS84})],l.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.w)("spatialReference")],l.prototype,"readSpatialReference",null),l=(0,i.Cg)([(0,s.$K)("esri.geometry.Geometry")],l)},86738(e,t,r){r.d(t,{A:()=>m});var i=r(5482),n=r(69622),s=r(53966),o=r(91429),a=r(56507),l=r(91075),h=r(16930),c=r(21325),u=r(28735);function f({x:e,y:t,spatialReference:r},i=[0,0]){if(r){if((0,c.K8)(r))return(0,u.tD)(e,t,i);if((0,c.EA)(r))return i[0]=e,i[1]=t,i}return null}const x=[0,0];var y,d=r(43937),p=r(36005);const g=[0,0];function _(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}let m=y=class extends l.A{static copy(e,t){t._set("x",e._get("x")),t._set("y",e._get("y")),t._set("z",e._get("z")),t._set("m",e._get("m"));const r=e._get("spatialReference");t._set("spatialReference",n.A.isFrozen(r)?r:r.clone())}constructor(...e){super(...e),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(e,t,r,i,n){let o;if(Array.isArray(e))o=e,n=t,e=o[0],t=o[1],r=o[2],i=o[3];else if(e&&"object"==typeof e){if(o=e,e=null!=o.x?o.x:o.longitude,t=null!=o.y?o.y:o.latitude,r=o.z,i=o.m,(n=o.spatialReference)&&"esri.geometry.SpatialReference"!==n.declaredClass&&(n=new h.A(n)),null!=o.longitude||null!=o.latitude)if(null==o.longitude)s.A.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==o.latitude)s.A.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!o.declaredClass&&n?.isWebMercator){const r=(0,u.je)(o.longitude,o.latitude,g);e=r[0],t=r[1]}}else _(r)?(n=r,r=null):_(i)&&(n=i,i=null);const a={x:e,y:t};return null==a.x&&null!=a.y?s.A.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&s.A.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=n&&(a.spatialReference=n),null!=r&&(a.z=r),null!=i&&(a.m=i),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(e){e!==(void 0!==this._get("m"))&&(this._set("m",e?0:void 0),this._set("hasM",e))}get hasZ(){return void 0!==this.z}set hasZ(e){e!==(void 0!==this._get("z"))&&(this._set("z",e?0:void 0),this._set("hasZ",e))}get latitude(){return f(this,x)?.[1]??null}set latitude(e){const{spatialReference:t,x:r}=this;null!=e&&t&&(t.isWebMercator?this._set("y",(0,u.je)(r,e,g)[1]):t.isGeographic&&this._set("y",e),this._set("latitude",e))}get longitude(){return f(this,x)?.[0]??null}set longitude(e){const{y:t,spatialReference:r}=this;null!=e&&r&&(r.isWebMercator?this._set("x",(0,u.je)(e,t,g)[0]):r.isGeographic&&this._set("x",e),this._set("longitude",e))}writeX(e,t,r){t[r]=isNaN(e)?"NaN":e}readX(e){return"string"==typeof e?NaN:e}clone(){const e=new y;return e.x=this.x,e.y=this.y,e.z=this.z,e.m=this.m,e.spatialReference=this.spatialReference,e}copy(e){return y.copy(e,this),this}equals(e){if(null==e)return!1;const{x:t,y:r,z:i,m:n,spatialReference:s}=this,{z:o,m:a}=e;let{x:l,y:h,spatialReference:c}=e;if(!s.equals(c))if(s.isWebMercator&&c.isWGS84)[l,h]=(0,u.je)(l,h),c=s;else{if(!s.isWGS84||!c.isWebMercator)return!1;[l,h]=(0,u.tD)(l,h),c=s}return t===l&&r===h&&i===o&&n===a&&s.wkid===c.wkid}offset(e,t,r){return this.x+=e,this.y+=t,null!=r&&(this.z=(this.z??0)+r),this}normalize(){if(!this.spatialReference)return this;const e=(0,c.Vp)(this.spatialReference);if(!e)return this;let t=this.x;const[r,i]=e.valid,n=2*i;let s;return t>i?(s=Math.ceil(Math.abs(t-i)/n),t-=s*n):t<r&&(s=Math.ceil(Math.abs(t-r)/n),t+=s*n),this._set("x",t),this}distance(e){return function(e,t){const r=e.x-t.x,i=e.y-t.y,n=null!=e.z&&null!=t.z?e.z-t.z:0;return Math.sqrt(r*r+i*i+n*n)}(this,e)}toArray(){const e=this.hasZ,t=this.hasM;return e&&t?[this.x,this.y,this.z,this.m]:e?[this.x,this.y,this.z]:t?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(e){return this.write({},e)}};(0,i.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],m.prototype,"hasM",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],m.prototype,"hasZ",null),(0,i.Cg)([(0,o.MZ)({type:Number})],m.prototype,"latitude",null),(0,i.Cg)([(0,o.MZ)({type:Number})],m.prototype,"longitude",null),(0,i.Cg)([(0,o.MZ)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,o.wg)(e=>isNaN(e)?e:(0,a.GB)(e))],m.prototype,"x",void 0),(0,i.Cg)([(0,d.K)("x")],m.prototype,"writeX",null),(0,i.Cg)([(0,p.w)("x")],m.prototype,"readX",null),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],m.prototype,"y",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],m.prototype,"z",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],m.prototype,"m",void 0),m=y=(0,i.Cg)([(0,o.$K)("esri.geometry.Point")],m),m.prototype.toJSON.isDefaultToJSON=!0},21276(e,t,r){r.d(t,{H:()=>s,f:()=>n});var i=r(49186);function n(e){if(e&&"object"==typeof e&&"type"in e&&"mesh"===e.type)throw new i.A("internal:mesh","Mesh geometries are not supported for this operation")}function s(e){e.forEach(n)}},15585(e,t,r){r.d(t,{If:()=>x,O5:()=>g,O9:()=>d,QT:()=>p,l3:()=>y});var i=r(5482),n=r(2741),s=r(49186),o=r(44208),a=r(34727);let l=null,h=null,c=null,u=null;const f=(new Float32Array(0),new Uint32Array(0),new Uint32Array(0),new Uint32Array(0),{vertices:new Float64Array(0),indices:new Uint32Array(0),outlineIndices:new Uint32Array(0),outlineRingLengths:new Uint32Array(0),vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function x(){return l??=async function(){const e=await r.e(2997).then(r.bind(r,42997)),t=await e.default({locateFile:e=>(0,n.s)(`esri/core/libs/libtess/${e}`)});c=t}(),l}async function y(){return h??=async function(){const e=await r.e(9134).then(r.bind(r,99134)),t=await e.default({locateFile:e=>(0,n.s)(`esri/core/libs/libtess/${e}`)});u=t}(),h}function d(){return null!==u}function p(e,t,r=2){const n={stack:[],error:void 0,hasError:!1};try{const a=c;if(!a)throw new s.A("libtess:not-loaded","libtessF32 not loaded");const l=(0,i.mS)(n,b.from(a,e),!1),h=(0,i.mS)(n,I.from(a,t),!1),u=e.length/r*4,f=(0,i.mS)(n,new b(a,u*r),!1),x=a.triangulate(l.ptr,h.ptr,h.size,r,f.ptr,u);if((0,o.A)("esri-tessellation-debug")){const e=a.getError();0!==e&&console.warn("libtess:triangulation",M(e))}return{buffer:f.slice(0,x*r),vertexCount:x}}catch(e){n.error=e,n.hasError=!0}finally{(0,i.hk)(n)}}function g(e,t,r=2,n=!0){const l={stack:[],error:void 0,hasError:!1};try{const h=u;if(!h)throw new s.A("libtess:not-loaded","libtessF64 not loaded");const c=(0,i.mS)(l,v.from(h,e),!1),x=(0,i.mS)(l,I.from(h,t),!1),y=(0,i.mS)(l,new I(h,1),!1),d=(0,i.mS)(l,new I(h,1),!1),p=(0,i.mS)(l,new I(h,1),!1),g=(0,i.mS)(l,new I(h,1),!1),{maxVertexCount:_,maxIndexCount:m,maxOutlineIndexCount:b,maxOutlineRingCount:P}=function(e,t){const r=e.reduce((e,t)=>e+t,0),i=e.length,n=Math.max(0,e.length-1),s=Math.max(0,r+2*n-2),o=Math.max(0,Math.ceil(2*r)),l=Math.max(0,Math.ceil(3*s*2)),h=(0,a.mP)(l,3),c=r>0?Math.max(2,Math.ceil(.25*r)):0,u=r>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:o,maxIndexCount:h,maxOutlineIndexCount:t?Math.max(0,r+i+c):0,maxOutlineRingCount:t?Math.max(0,i+u):0}}(t,n);let k=0,A=0,V=0,S=0,B=0;{const e={stack:[],error:void 0,hasError:!1};try{const t=(0,i.mS)(e,new v(h,_*r),!1),s=(0,i.mS)(e,new I(h,m),!1),o=(0,i.mS)(e,n?new I(h,b):null,!1),a=(0,i.mS)(e,n?new I(h,P):null,!1);if(h.triangulateIndexed(c.ptr,x.ptr,x.size,r,t.ptr,_,r,s.ptr,m,y.ptr,d.ptr,o?.ptr??0,b,a?.ptr??0,P,p.ptr,g.ptr),B=h.getError(),k=w(h)[y.ptr/Int32Array.BYTES_PER_ELEMENT],A=w(h)[d.ptr/Int32Array.BYTES_PER_ELEMENT],V=w(h)[p.ptr/Int32Array.BYTES_PER_ELEMENT],S=w(h)[g.ptr/Int32Array.BYTES_PER_ELEMENT],0===B){const e=t.slice(0,k*r);return{vertices:e,indices:s.slice(0,A),outlineIndices:n&&o?o.slice(0,V):f.outlineIndices,outlineRingLengths:n&&a?a.slice(0,S):f.outlineRingLengths,vertexCount:k,indexCount:A,outlineIndexCount:n?V:0,outlineRingCount:n?S:0}}}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}if(100903!==B)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",M(B)),f;const T=(0,i.mS)(l,new v(h,k*r),!1),C=(0,i.mS)(l,new I(h,A),!1),L=(0,i.mS)(l,n?new I(h,V):null,!1),R=(0,i.mS)(l,n?new I(h,S):null,!1);if(h.triangulateIndexed(c.ptr,x.ptr,x.size,r,T.ptr,k,r,C.ptr,A,y.ptr,d.ptr,L?.ptr??0,n?V:0,R?.ptr??0,n?S:0,p.ptr,g.ptr),B=h.getError(),0!==B)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",M(B)),f;const D=w(h)[y.ptr/Int32Array.BYTES_PER_ELEMENT],E=w(h)[d.ptr/Int32Array.BYTES_PER_ELEMENT],z=w(h)[p.ptr/Int32Array.BYTES_PER_ELEMENT],N=w(h)[g.ptr/Int32Array.BYTES_PER_ELEMENT],U=T.slice(0,D*r);return{vertices:U,indices:C.slice(0,E),outlineIndices:n&&L?L.slice(0,z):f.outlineIndices,outlineRingLengths:n&&R?R.slice(0,N):f.outlineRingLengths,vertexCount:D,indexCount:E,outlineIndexCount:n?z:0,outlineRingCount:n?N:0}}catch(e){l.error=e,l.hasError=!0}finally{(0,i.hk)(l)}}function _(e){return e.HEAPF64}function m(e){return e.HEAPF32}function w(e){return e.HEAP32}class b{static from(e,t){const r=new b(e,t.length);return r.set(t),r}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(e){m(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){const r=this.ptr/this.bytesPerCoordinate;return m(this._libtess).slice(r+e,r+t)}}class v{static from(e,t){const r=new v(e,t.length);return r.set(t),r}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(e){_(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){const r=this.ptr/this.bytesPerCoordinate;return _(this._libtess).slice(r+e,r+t)}}class I{static from(e,t){const r=new I(e,t.length);return r.set(t),r}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateLengthsArray(t)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(e){w(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){const r=this.ptr/this.bytesPerCoordinate;return function(e){const t=w(e);return new Uint32Array(t.buffer,t.byteOffset,t.length)}(this._libtess).slice(r+e,r+t)}}function M(e){switch(e){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${e}`}}},28735(e,t,r){r.d(t,{Cv:()=>d,Gh:()=>_,ci:()=>m,je:()=>p,jg:()=>c,tD:()=>g,y7:()=>y});var i=r(4718),n=r(21276),s=r(16930),o=r(79258),a=r(21325);function l(e){return 57.29577951308232*e}function h(e){return.017453292519943*e}function c(e){return Math.PI/2-2*Math.atan(Math.exp(-e/o.$O.radius))}function u(e){return null!=e.wkid||null!=e.wkt}const f=[0,0];function x(e,t,r,i,n){const s=e,o=n;if(o.spatialReference=r,"x"in s&&"x"in o)[o.x,o.y]=t(s.x,s.y,f,i);else if("xmin"in s&&"xmin"in o)[o.xmin,o.ymin]=t(s.xmin,s.ymin,f,i),[o.xmax,o.ymax]=t(s.xmax,s.ymax,f,i);else if("paths"in s&&"paths"in o||"rings"in s&&"rings"in o){const e="paths"in s?s.paths:s.rings,r=[];let n;for(let s=0;s<e.length;s++){const o=e[s];n=[],r.push(n);for(let e=0;e<o.length;e++)n.push(t(o[e][0],o[e][1],[0,0],i)),o[e].length>2&&n[e].push(o[e][2]),o[e].length>3&&n[e].push(o[e][3])}"paths"in o?o.paths=r:o.rings=r}else if("points"in s&&"points"in o){const e=s.points,r=[];for(let n=0;n<e.length;n++)r[n]=t(e[n][0],e[n][1],[0,0],i),e[n].length>2&&r[n].push(e[n][2]),e[n].length>3&&r[n].push(e[n][3]);o.points=r}return n}function y(e,t){const r=e&&(u(e)?e:e.spatialReference),i=t&&(u(t)?t:t.spatialReference);return!(e&&"type"in e&&"mesh"===e.type||t&&"type"in t&&"mesh"===t.type||!r||!i)&&(!!(0,a.aI)(i,r)||(0,a.K8)(i)&&(0,a.oT)(r)||(0,a.K8)(r)&&(0,a.oT)(i))}function d(e,t){if(null==e)return null;const r=e.spatialReference,n=t&&(u(t)?t:t.spatialReference);return y(r,n)?(0,a.aI)(r,n)?(0,i.o8)(e):(0,a.K8)(n)?x(e,p,s.A.WebMercator,!1,(0,i.o8)(e)):(0,a.oT)(n)?x(e,g,s.A.WGS84,!1,(0,i.o8)(e)):null:null}function p(e,t,r=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const i=h(t);return r[0]=h(e)*o.$O.radius,r[1]=o.$O.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),r}function g(e,t,r=[0,0],i=!1){if(e===a.Mc[0])r[0]=-180;else if(e===a.Mc[1])r[0]=180;else{const t=l(e/o.$O.radius);r[0]=i?t:t-360*Math.floor((t+180)/360)}return r[1]=l(Math.PI/2-2*Math.atan(Math.exp(-t/o.$O.radius))),r}function _(e,t=!1,r=(0,i.o8)(e)){return(0,n.f)(e),(0,n.f)(r),x(e,p,s.A.WebMercator,t,r)}function m(e,t=!1,r=(0,i.o8)(e)){return(0,n.f)(e),(0,n.f)(r),x(e,g,s.A.WGS84,t,r)}},36849(e,t,r){r.r(t),r.d(t,{default:()=>$});var i=r(17676),n=r(6774),s=r(5408),o=r(13195);function a(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)}function l(e){return!(e<11904)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=65280&&e<=65519||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543||e>=65040&&e<=65055||e>=42128&&e<=42191||e>=40960&&e<=42127)}function h(e){switch(e){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function c(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=r(18989);const f=24;class x{constructor(e,t,r,i,n,s,o){this._glyphItems=e,this._maxWidth=t,this._lineHeight=r,this._letterSpacing=i,this._hAnchor=n,this._vAnchor=s,this._justify=o}getShaping(e,t,r){const i=this._letterSpacing,n=this._lineHeight,s=this._justify,o=this._maxWidth,u=[];let f=0,x=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const n=r&&a(e);let s;for(const t of this._glyphItems)if(s=t[e],s)break;u.push({codePoint:e,x:f,y:x,vertical:n,glyphItem:s}),s&&(f+=s.shaping.xAdvance+i)}let y=f;o>0&&(y=f/Math.max(1,Math.ceil(f/o)));const d=e.includes(""),p=[],g=u.length;for(let e=0;e<g-1;e++){const t=u[e].codePoint,r=l(t);if(h(t)||r){let i=0;if(10===t)i-=1e4;else if(r&&d)i+=150;else{40!==t&&65288!==t||(i+=50);const r=u[e+1].codePoint;41!==r&&65289!==r||(i+=50)}p.push(this._buildBreak(e+1,u[e].x,y,p,i,!1))}}const _=this._optimalBreaks(this._buildBreak(g,f,y,p,0,!0));let m=0;const w=t?-n:n;let b=0;for(let e=0;e<_.length;e++){const t=_[e];let r=b;for(;r<t&&c(u[r].codePoint);)u[r].glyphItem=null,++r;let i=t-1;for(;i>r&&c(u[i].codePoint);)u[i].glyphItem=null,--i;if(r<=i){const e=u[r].x;for(let t=r;t<=i;t++)u[t].x-=e,u[t].y=x;let t=u[i].x;u[i].glyphItem&&(t+=u[i].glyphItem.shaping.xAdvance),m=Math.max(t,m),s&&this._applyJustification(u,r,i)}b=t,x+=w}if(u.length>0){const e=_.length-1,r=(s-this._hAnchor)*m;let i=(-this._vAnchor*(e+1)+.5)*n;t&&e&&(i+=e*n);for(const e of u)e.x+=r,e.y+=i}return u.filter(e=>e.glyphItem)}static getTextBox(e,t){if(!e.length)return null;let r=1/0,i=1/0,n=0,s=0;for(const o of e){const e=o.glyphItem.shaping.xAdvance,a=o.x,l=o.y-17,h=a+e,c=l+t;r=Math.min(r,a),n=Math.max(n,h),i=Math.min(i,l),s=Math.max(s,c)}return{x:r,y:i,width:n-r,height:s-i}}static getBox(e){if(!e.length)return null;let t=1/0,r=1/0,i=0,n=0;for(const s of e){const{height:e,left:o,top:a,width:l}=s.glyphItem.rect,h=s.x,c=s.y-(e-Math.abs(a)),u=h+l+o,f=c+e;t=Math.min(t,h),i=Math.max(i,u),r=Math.min(r,c),n=Math.max(n,f)}return{x:t,y:r,width:i-t,height:n-r}}static addDecoration(e,t){const r=e.length;if(0===r)return;const i={rect:new u.A(4,0,4,8),sdf:!0,page:0};let n=e[0].x+e[0].glyphItem.rect.left,s=e[0].y;for(let o=1;o<r;o++){const r=e[o];if(r.y!==s){const a=e[o-1].x+e[o-1].glyphItem.rect.left+e[o-1].glyphItem.rect.width;e.push({codePoint:0,x:n,y:s+t-3,vertical:!1,glyphItem:{mosaicItem:i,rect:{width:a-n,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}}),s=r.y,n=r.x+r.glyphItem.rect.left}}const o=e[r-1].x+e[r-1].glyphItem.rect.left+e[r-1].glyphItem.rect.width;e.push({codePoint:0,x:n,y:s+t-3,vertical:!1,glyphItem:{mosaicItem:i,rect:{width:o-n,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}})}_breakScore(e,t,r,i){const n=(e-t)*(e-t);return i?e<t?n/2:2*n:n+Math.abs(r)*r}_buildBreak(e,t,r,i,n,s){let o=null,a=this._breakScore(t,r,n,s);for(const e of i){const i=t-e.x,l=this._breakScore(i,r,n,s)+e.score;l<=a&&(o=e,a=l)}return{index:e,x:t,score:a,previousBreak:o}}_optimalBreaks(e){return e?this._optimalBreaks(e.previousBreak).concat(e.index):[]}_applyJustification(e,t,r){const i=e[r],n=i.vertical?f:i.glyphItem?i.glyphItem.shaping.xAdvance:0,s=(i.x+n)*this._justify;for(let i=t;i<=r;i++)e[i].x-=s}}var y=r(76213);const d=.5;class p{constructor(e,t,r=0,i=-1,n=d){this.x=e,this.y=t,this.angle=r,this.segment=i,this.minzoom=n}}class g{constructor(e,t,r,i,n,s=d,a=o.MG){this.anchor=e,this.labelAngle=t,this.glyphAngle=r,this.page=i,this.alternateVerticalGlyph=n,this.minzoom=s,this.maxzoom=a}}class _{constructor(e,t,r,i,n,s,o,a,l,h,c,u){this.tl=e,this.tr=t,this.bl=r,this.br=i,this.mosaicRect=n,this.labelAngle=s,this.minAngle=o,this.maxAngle=a,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class m{constructor(e){this.shapes=e}}class w{getIconPlacement(e,t,r){const i=new n.bR(e.x,e.y),s=0===r.rotationAlignment,a=r.keepUpright;let l=r.rotate*o.os;s&&(l+=e.angle);const h=new m([]);return h.iconColliders=[],this._addIconPlacement(h,i,t,r,l),s&&a&&this._addIconPlacement(h,i,t,r,l+o.Jo),h}_addIconPlacement(e,t,r,i,s){const a=r.rasterizationScale,l=r.width/a,h=r.height/a,c=i.offset;let u=c[0],f=c[1];switch(i.anchor){case 0:u-=l/2,f-=h/2;break;case 1:f-=h/2;break;case 2:u-=l,f-=h/2;break;case 3:u-=l/2;break;case 4:u-=l/2,f-=h;break;case 5:break;case 7:f-=h;break;case 6:u-=l;break;case 8:u-=l,f-=h}const x=r.rect,y=2/a,p=u-y,g=f-y,m=p+x.width/a,w=g+x.height/a,b=new n.bR(p,g),v=new n.bR(m,w),I=new n.bR(p,w),M=new n.bR(m,g);if(0!==s){const e=Math.cos(s),t=Math.sin(s);b.rotate(e,t),v.rotate(e,t),I.rotate(e,t),M.rotate(e,t)}const P=new _(b,M,I,v,x,s,0,256,t,d,o.MG,0);e.shapes.push(P);{const r=i.size,n=i.padding,a={xTile:t.x,yTile:t.y,dxPixels:u*r-n,dyPixels:f*r-n,hard:!i.optional,partIndex:0,width:l*r+2*n,height:h*r+2*n,angle:s,minLod:d,maxLod:o.MG};e.iconColliders.push(a)}}getTextPlacement(e,t,r,i){const a=new n.bR(e.x,e.y),{keepUpright:l,rotate:h,rotationAlignment:c,size:u}=i,p=h*o.os,w=0===c,b=l,v=i.padding;let I=d;const M=w?e.angle:0,P=e.segment>=0&&w,k=[],A=[],V=y.Rm,S=!P;let B=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,C=B,L=T;const R=(P||w)&&b,D=u/f;let E=!1;for(const e of t)if(e.vertical){E=!0;break}let z,N=0,U=0;if(!P&&E){const e=x.getTextBox(t,i.lineHeight*f);switch(i.anchor){case 1:N=e.height/2,U=-e.width/2;break;case 2:N=-e.height/2,U=e.width/2;break;case 3:N=e.height/2,U=e.width/2;break;case 4:N=-e.height/2,U=-e.width/2;break;case 5:N=e.height;break;case 7:U=-e.width;break;case 6:U=e.width;break;case 8:N=-e.height}}N+=i.offset[0]*f,U+=i.offset[1]*f;for(const l of t){const t=l.glyphItem?.mosaicItem,h=l.glyphItem?.rect;if(!t||t.rect.isEmpty)continue;const c=t.rect,u=t.page;if(k&&S){if(void 0!==z&&z!==l.y){let t,r,n,s;E?(t=-L+N,r=B+U,n=L-C,s=T-B):(t=B+N,r=C+U,n=T-B,s=L-C);const a={xTile:e.x,yTile:e.y,dxPixels:t*D-v,dyPixels:r*D-v,hard:!i.optional,partIndex:1,width:n*D+2*v,height:s*D+2*v,angle:p,minLod:d,maxLod:o.MG};k.push(a),B=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,C=B,L=T}z=l.y}const f=[];if(P){const t=.5*h.width,i=(l.x+h.left-V+t)*D*s.ih;if(I=this._placeGlyph(e,I,i,r,e.segment,1,l.vertical,u,f),b&&(I=this._placeGlyph(e,I,i,r,e.segment,-1,l.vertical,u,f)),I>=2)break}else f.push(new g(a,M,M,u,!1)),w&&b&&f.push(new g(a,M+o.Jo,M+o.Jo,u,!1));const x=l.x+h.left,y=l.y-17-h.top,m=x+h.width,F=y+h.height;let O,G,j,Z,W,K,q,H;if(!P&&E)if(l.vertical){const e=(x+m)/2-h.height/2,t=(y+F)/2+h.width/2;O=new n.bR(-t-V+N,e-V+U),G=new n.bR(O.x+c.width,O.y+c.height),j=new n.bR(O.x,G.y),Z=new n.bR(G.x,O.y)}else O=new n.bR(-y+V+N,x-V+U),G=new n.bR(O.x-c.height,O.y+c.width),j=new n.bR(G.x,O.y),Z=new n.bR(O.x,G.y);else O=new n.bR(x-V+N,y-V+U),G=new n.bR(O.x+c.width,O.y+c.height),j=new n.bR(O.x,G.y),Z=new n.bR(G.x,O.y);for(const t of f){let r,s,o,a;if(t.alternateVerticalGlyph){if(!W){const e=(y+F)/2+U;W=new n.bR((x+m)/2+N-h.height/2-V,e+h.width/2+V),K=new n.bR(W.x+c.height,W.y-c.width),q=new n.bR(K.x,W.y),H=new n.bR(W.x,K.y)}r=W,s=q,o=H,a=K}else r=O,s=j,o=Z,a=G;const u=y,f=F,d=t.glyphAngle+p;if(0!==d){const e=Math.cos(d),t=Math.sin(d);r=r.clone(),s=s?.clone(),o=o?.clone(),a=a?.clone(),r.rotate(e,t),a?.rotate(e,t),s?.rotate(e,t),o?.rotate(e,t)}let g=0,w=256;if(P&&E?l.vertical?t.alternateVerticalGlyph?(g=32,w=96):(g=224,w=32):(g=224,w=96):(g=192,w=64),A.push(new _(r,o,s,a,c,t.labelAngle,g,w,t.anchor,t.minzoom,t.maxzoom,t.page)),k&&(!R||this._legible(t.labelAngle)))if(S)x<B&&(B=x),u<C&&(C=u),m>T&&(T=m),f>L&&(L=f);else if(t.minzoom<2){const r={xTile:e.x,yTile:e.y,dxPixels:(x+N)*D-v,dyPixels:(u+N)*D-v,hard:!i.optional,partIndex:1,width:(m-x)*D+2*v,height:(f-u)*D+2*v,angle:d,minLod:t.minzoom,maxLod:t.maxzoom};k.push(r)}}}if(I>=2)return null;if(k&&S){let t,r,n,s;E?(t=-L+N,r=B+U,n=L-C,s=T-B):(t=B+N,r=C+U,n=T-B,s=L-C);const a={xTile:e.x,yTile:e.y,dxPixels:t*D-v,dyPixels:r*D-v,hard:!i.optional,partIndex:1,width:n*D+2*v,height:s*D+2*v,angle:p,minLod:d,maxLod:o.MG};k.push(a)}const F=new m(A);return k&&k.length>0&&(F.textColliders=k),F}_legible(e){const t=(0,o.z0)(e);return t<65||t>=193}_placeGlyph(e,t,r,i,s,a,l,h,c){let u=a;const f=u<0?(0,o.Wh)(e.angle+o.Jo,o.pJ):e.angle;let x=0;r<0&&(u*=-1,r*=-1,x=o.Jo),u>0&&++s;let y=new n.bR(e.x,e.y),d=i[s],p=o.MG;if(i.length<=s)return p;for(;;){const e=d.x-y.x,n=d.y-y.y,a=Math.sqrt(e*e+n*n),_=Math.max(r/a,t),m=e/a,w=n/a,b=(0,o.Wh)(Math.atan2(w,m)+x,o.pJ);if(c.push(new g(y,f,b,h,!1,_,p)),l&&c.push(new g(y,f,b,h,!0,_,p)),_<=t)return _;y=d.clone();do{if(s+=u,i.length<=s||s<0)return _;d=i[s]}while(y.isEqual(d));let v=d.x-y.x,I=d.y-y.y;const M=Math.sqrt(v*v+I*I);v*=a/M,I*=a/M,y.x-=v,y.y-=I,p=_}}}var b=r(51624),v=r(15585);class I{constructor(e,t,r=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=r;const i=t.keys,n=t.values,s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:this.id=s.getUInt64();break;case 2:{const e=s.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const r=e.getUInt32(),s=e.getUInt32();t[i[r]]=n[s]}e.release();break}case 3:this.type=s.getUInt32();break;case 4:this._pbfGeometry=s.getMessage();break;default:s.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let r,i;this._pbfGeometry=null,e?e.reset(this.type):r=[];let s,o=1,a=0,l=0,h=0;for(;!t.empty();){if(0===a){const e=t.getUInt32();o=7&e,a=e>>3}switch(a--,o){case 1:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):r&&(i&&r.push(i),i=[],i.push(new n.bR(l,h)));break;case 2:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):i&&i.push(new n.bR(l,h));break;case 7:e?e.close():i&&!i[0].equals(l,h)&&i.push(i[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?s=e.result():r&&(i&&r.push(i),s=r),t.release(),this._geometry=s,s}}r(44208);class M{constructor(e){this._array=[],this._stride=e}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}}class P extends M{constructor(){super(12)}add(e,t,r){const i=this.array;i.push(e),i.push(t),i.push(r)}}class k{constructor(e){this.extent=s._H,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(k._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}var A=r(89518);class V extends M{constructor(e){super(e)}add(e,t,r,i,n,s,o,a,l,h,c,u){const f=this.array;let x=(0,A.M9)(e,t);f.push(x);const y=31;x=(0,A.Ss)(Math.round(y*r),Math.round(y*i),Math.round(y*n),Math.round(y*s)),f.push(x),x=(0,A.Ss)(Math.round(y*o),Math.round(y*a),Math.round(y*l),Math.round(y*h)),f.push(x),x=(0,A.M9)(c,0),f.push(x),u&&f.push(...u)}}class S extends M{constructor(e){super(e)}add(e,t,r){const i=this.array;i.push((0,A.M9)(e,t)),r&&i.push(...r)}}class B extends M{constructor(e){super(e)}add(e,t,r,i,n,s,o){const a=this.array,l=this.index;let h=(0,A.M9)(e,t);return a.push(h),h=(0,A.Ss)(Math.round(15*r),Math.round(15*i),n,s),a.push(h),o&&a.push(...o),l}}class T extends M{constructor(e){super(e)}add(e,t,r,i,n,s,a,l,h,c,u,f){const x=this.array;let y=(0,A.M9)(e,t);x.push(y),y=(0,A.M9)(Math.round(8*r),Math.round(8*i)),x.push(y),y=(0,A.M9)((0,A.ws)(n/4,s/4),(0,A.ws)(l,h)),x.push(y),y=(0,A.M9)((0,A.ws)(0,(0,o.z0)(a)),(0,A.ws)(10*c,Math.min(10*u,255))),x.push(y),f&&x.push(...f)}}class C extends M{constructor(e){super(e)}add(e,t,r,i,n){const s=this.array,o=(0,A.M9)(2*e+r,2*t+i);s.push(o),n&&s.push(...n)}}class L{constructor(e,t,r){this.layerExtent=s._H,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=r,this._filter=e.getFeatureFilter()}pushFeature(e){this._filter&&!this._filter.filter(e,this.zoom)||this._features.push(e)}hasFeatures(){return this._features.length>0}getResources(e,t,r){}}class R extends L{constructor(e,t,r,i,n){super(e,t,r),this.type=4,this._circleVertexBuffer=i,this._circleIndexBuffer=n}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,r=this._circleIndexBuffer;this._circleIndexStart=3*r.index,this._circleIndexCount=0;const i=this.layer,n=this.zoom;e&&e.setExtent(this.layerExtent);for(const s of this._features){const o=s.getGeometry(e);if(!o)continue;const a=i.circleMaterial.encodeAttributes(s,n,i);for(const e of o)if(e)for(const i of e){const e=t.index;t.add(i.x,i.y,0,0,a),t.add(i.x,i.y,0,1,a),t.add(i.x,i.y,1,0,a),t.add(i.x,i.y,1,1,a),r.add(e,e+1,e+2),r.add(e+1,e+2,e+3),this._circleIndexCount+=6}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this._circleVertexBuffer.array.length,e+=this._circleIndexBuffer.array.length;const t=new Uint32Array(e),r=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._circleIndexStart,t[i++]=this._circleIndexCount,t[i++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)r[i++]=this._circleVertexBuffer.array[e];t[i++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[i++]=this._circleIndexBuffer.array[e];return t.buffer}}var D=r(98291),E=r(83349);class z extends L{constructor(e,t,r,i,n,s,o){super(e,t,r),this.type=1,this._patternMap=new Map,this._fillVertexBuffer=i,this._fillIndexBuffer=n,this._outlineVertexBuffer=s,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,r){const i=this.layer,n=this.zoom,s=i.getPaintProperty("fill-pattern");if(s)if(s.isDataDriven)for(const e of this._features)t(s.getValue(n,e),!0);else t(s.getValue(n),!0)}processFeatures(e){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const t=this.layer,r=this.zoom,{fillMaterial:i,outlineMaterial:n,hasDataDrivenFill:s,hasDataDrivenOutline:o}=t;e&&e.setExtent(this.layerExtent);const a=t.getPaintProperty("fill-pattern"),l=a?.isDataDriven;let h=!a&&t.getPaintValue("fill-antialias",r);if(t.outlineUsesFillColor){if(h&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",r),i=t.getPaintValue("fill-opacity",r+1);e<1&&i<1&&(h=!1)}if(h&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",r),i=t.getPaintValue("fill-color",r+1);e[3]<1&&i[3]<1&&(h=!1)}}const c=this._features,u=e?.validateTessellation;if(l){const s=[];for(const l of c){const c=a.getValue(r,l),u=this._spriteInfo[c];if(!u?.rect)continue;const f=i.encodeAttributes(l,r,t,u),x=h&&o?n.encodeAttributes(l,r,t):[],y=l.getGeometry(e);s.push({ddFillAttributes:f,ddOutlineAttributes:x,page:u.page,geometry:y}),s.sort((e,t)=>e.page-t.page)}for(const{ddFillAttributes:e,ddOutlineAttributes:r,page:i,geometry:n}of s)this._processFeature(n,h,t.outlineUsesFillColor,e,r,u,i)}else for(const a of c){const l=s?i.encodeAttributes(a,r,t):null,c=h&&o?n.encodeAttributes(a,r,t):null,f=a.getGeometry(e);this._processFeature(f,h,t.outlineUsesFillColor,l,c,u)}}serialize(){let e=10;e+=this.layerUIDs.length,e+=this._fillVertexBuffer.array.length,e+=this._fillIndexBuffer.array.length,e+=this._outlineVertexBuffer.array.length,e+=this._outlineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),r=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._fillIndexStart,t[i++]=this._fillIndexCount,t[i++]=this._outlineIndexStart,t[i++]=this._outlineIndexCount;const n=this._patternMap,s=n.size;if(t[i++]=s,s>0)for(const[e,[r,s]]of n)t[i++]=e,t[i++]=r,t[i++]=s;t[i++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)r[i++]=this._fillVertexBuffer.array[e];t[i++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[i++]=this._fillIndexBuffer.array[e];t[i++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)r[i++]=this._outlineVertexBuffer.array[e];t[i++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[i++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,r,i,n,s,o){if(!e)return;const a=e.length,l=!n||0===n.length;if(t&&(!r||l))for(let t=0;t<a;t++)this._processOutline(e[t],n);let h;for(let t=0;t<a;t++){const r=z._area(e[t]);r>32?(void 0!==h&&this._processFill(e,h,i,s,o),h=[t]):r<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,i,s,o)}_processOutline(e,t){const r=this._outlineVertexBuffer,i=this._outlineIndexBuffer,s=i.index;let o,a,l;const h=new n.bR(0,0),c=new n.bR(0,0),u=new n.bR(0,0);let f=-1,x=-1,y=-1,d=-1,p=-1,g=!1,_=e.length;if(_<2)return;const m=e[0];let w=e[_-1];for(;_&&w.isEqual(m);)--_,w=e[_-1];if(!(_-0<2)){for(let n=0;n<_;++n){0===n?(o=e[_-1],a=e[0],l=e[1],h.assignSub(a,o),h.normalize(),h.rightPerpendicular()):(o=a,a=l,l=n!==_-1?e[n+1]:e[0],h.assign(c));const s=this._isClipEdge(o,a);-1===d&&(g=s),c.assignSub(l,a),c.normalize(),c.rightPerpendicular();const m=h.x*c.y-h.y*c.x;u.assignAdd(h,c),u.normalize();const w=-u.x*-h.x+-u.y*-h.y;let b=Math.abs(0!==w?1/w:1);b>8&&(b=8),m>=0?(y=r.add(a.x,a.y,h.x,h.y,0,1,t),-1===d&&(d=y),f>=0&&x>=0&&y>=0&&!s&&i.add(f,x,y),x=r.add(a.x,a.y,b*-u.x,b*-u.y,0,-1,t),-1===p&&(p=x),f>=0&&x>=0&&y>=0&&!s&&i.add(f,x,y),f=x,x=y,y=r.add(a.x,a.y,u.x,u.y,0,1,t),f>=0&&x>=0&&y>=0&&!s&&i.add(f,x,y),x=r.add(a.x,a.y,c.x,c.y,0,1,t),f>=0&&x>=0&&y>=0&&!s&&i.add(f,x,y)):(y=r.add(a.x,a.y,b*u.x,b*u.y,0,1,t),-1===d&&(d=y),f>=0&&x>=0&&y>=0&&!s&&i.add(f,x,y),x=r.add(a.x,a.y,-h.x,-h.y,0,-1,t),-1===p&&(p=x),f>=0&&x>=0&&y>=0&&!s&&i.add(f,x,y),f=x,x=y,y=r.add(a.x,a.y,-u.x,-u.y,0,-1,t),f>=0&&x>=0&&y>=0&&!s&&i.add(f,x,y),f=r.add(a.x,a.y,-c.x,-c.y,0,-1,t),f>=0&&x>=0&&y>=0&&!s&&i.add(f,x,y))}f>=0&&x>=0&&d>=0&&!g&&i.add(f,x,d),f>=0&&d>=0&&p>=0&&!g&&i.add(f,p,d),this._outlineIndexCount+=3*(i.index-s)}}_processFill(e,t,r,i,n){let s;t.length>1&&(s=[]);let o=0;for(const r of t)0!==o&&s.push(o),o+=e[r].length;const a=2*o,l=D.A.acquire();for(const r of t){const t=e[r],i=t.length;for(let e=0;e<i;++e)l.push(t[e].x,t[e].y)}const h=(0,E.e)(l,s,2);if(E.e.deviation(l,s,2,h)>0){const i=t.map(t=>e[t].length),{buffer:s,vertexCount:o}=(0,v.QT)(l,i);if(o>0){const e=this._fillVertexBuffer.index;for(let e=0;e<o;e++)this._fillVertexBuffer.add(s[2*e],s[2*e+1],r);for(let t=0;t<o;t+=3){const r=e+t;this._fillIndexBuffer.add(r,r+1,r+2)}if(void 0!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=o:e.set(n,[this._fillIndexStart+this._fillIndexCount,o])}this._fillIndexCount+=o}}else{const e=h.length;if(e>0){const t=this._fillVertexBuffer.index;let i=0;for(;i<a;)this._fillVertexBuffer.add(l[i++],l[i++],r);let s=0;for(;s<e;)this._fillIndexBuffer.add(t+h[s++],t+h[s++],t+h[s++]);if(void 0!==n){const t=this._patternMap,r=t.get(n);r?r[1]+=e:t.set(n,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}D.A.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const r=e.length-1;for(let i=0;i<r;i++)t+=(e[i].x-e[i+1].x)*(e[i].y+e[i+1].y);return t+=(e[r].x-e[0].x)*(e[r].y+e[0].y),.5*t}}var N=r(83773);class U extends L{constructor(e,t,r,i,n){super(e,t,r),this.type=2,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=i,this.tessellationProperties._lineIndexBuffer=n,this._lineTessellator=new N.i(F(this.tessellationProperties),O(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,r){const i=this.layer,n=this.zoom,s=i.getPaintProperty("line-pattern"),o=i.getPaintProperty("line-dasharray"),a=i.getLayoutProperty("line-cap");if(!s&&!o)return;const l=a?.getValue(n)||0,h=a?.isDataDriven,c=s?.isDataDriven,u=o?.isDataDriven;if(c||u)for(const e of this._features)t(c?s.getValue(n,e):this._getDashArrayKey(e,n,i,o,h,a,l));else if(s)t(s.getValue(n));else if(o){const e=o.getValue(n);t(i.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,r=this.zoom,i=this._features,n=this._tessellationOptions,{hasDataDrivenLine:s,lineMaterial:o}=t;e&&e.setExtent(this.layerExtent);const a=t.getPaintProperty("line-pattern"),l=t.getPaintProperty("line-dasharray"),h=a?.isDataDriven,c=l?.isDataDriven;let u;u=t.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,x=f?null:t.getLayoutValue("line-cap",r),y=x||0,d=!!f;u=t.getLayoutProperty("line-join");const p=u?.isDataDriven?u:null,g=p?null:t.getLayoutValue("line-join",r);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",r);u=t.getLayoutProperty("line-round-limit");const w=u?.isDataDriven?u:null,b=w?null:t.getLayoutValue("line-round-limit",r);u=t.getPaintProperty("line-width");const v=u?.isDataDriven?u:null,I=v?null:t.getPaintValue("line-width",r);u=t.getPaintProperty("line-offset");const M=u?.isDataDriven?u:null,P=M?null:t.getPaintValue("line-offset",r);if(h||c){const s=[];for(const n of i){const i=h?a.getValue(r,n):this._getDashArrayKey(n,r,t,l,d,f,y),c=this._spriteInfo[i];if(!c?.rect)continue;const u=o.encodeAttributes(n,r,t,c),k=n.getGeometry(e);s.push({ddAttributes:u,page:c.page,cap:f?f.getValue(r,n):x,join:p?p.getValue(r,n):g,miterLimit:_?_.getValue(r,n):m,roundLimit:w?w.getValue(r,n):b,halfWidth:.5*(v?v.getValue(r,n):I),offset:M?M.getValue(r,n):P,geometry:k})}s.sort((e,t)=>e.page-t.page),n.textured=!0;for(const{ddAttributes:e,page:t,cap:r,join:i,miterLimit:o,roundLimit:a,halfWidth:l,offset:h,geometry:c}of s)n.capType=r,n.joinType=i,n.miterLimit=o,n.roundLimit=a,n.halfWidth=l,n.offset=h,this._processFeature(c,e,t)}else{if(a){const e=a.getValue(r),t=this._spriteInfo[e];if(!t?.rect)return}n.textured=!(!a&&!l),n.capType=x,n.joinType=g,n.miterLimit=m,n.roundLimit=b,n.halfWidth=.5*I,n.offset=P;for(const a of i){const i=s?o.encodeAttributes(a,r,t):null;f&&(n.capType=f.getValue(r,a)),p&&(n.joinType=p.getValue(r,a)),_&&(n.miterLimit=_.getValue(r,a)),w&&(n.roundLimit=w.getValue(r,a)),v&&(n.halfWidth=.5*v.getValue(r,a)),M&&(n.offset=M.getValue(r,a));const l=a.getGeometry(e);this._processFeature(l,i)}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this.tessellationProperties._lineVertexBuffer.array.length,e+=this.tessellationProperties._lineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),r=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._lineIndexStart,t[i++]=this._lineIndexCount;const n=this._patternMap,s=n.size;if(t[i++]=s,s>0)for(const[e,[r,s]]of n)t[i++]=e,t[i++]=r,t[i++]=s;t[i++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)r[i++]=this.tessellationProperties._lineVertexBuffer.array[e];t[i++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[i++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,r){if(!e)return;const i=e.length;for(let n=0;n<i;n++)this._processGeometry(e[n],t,r)}_processGeometry(e,t,r){if(e.length<2)return;let i,n,s=e[0],o=1;for(;o<e.length;)i=e[o].x-s.x,n=e[o].y-s.y,i*i+n*n<1e-6?e.splice(o,1):(s=e[o],++o);if(e.length<2)return;const a=this.tessellationProperties._lineIndexBuffer,l=3*a.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=t,this._lineTessellator.tessellate(e,this._tessellationOptions);const h=3*a.index-l;if(void 0!==r){const e=this._patternMap,t=e.get(r);t?t[1]+=h:e.set(r,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(e,t,r,i,n,s,o){const a=n?s.getValue(t,e):o,l=i.getValue(t,e);return r.getDashKey(l,a)}}const F=e=>(t,r,i,n,s,o,a,l,h,c,u)=>(e._lineVertexBuffer.add(t,r,a,l,i,n,s,o,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),O=e=>(t,r,i)=>{e._lineIndexBuffer.add(t,r,i)};var G=r(32488),j=r(97768),Z=r(799),W=r(4264);function K(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class q extends L{constructor(e,t,r,i,n,s,o,a,l){super(t,r,l.getSpriteItems()),this.type=3,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=i,this._iconIndexBuffer=n,this._textVertexBuffer=s,this._textIndexBuffer=o,this._placementEngine=a,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}static{this._bidiEngine=new G.A}getResources(e,t,r){const i=this.layer,n=this.zoom;e&&e.setExtent(this.layerExtent);const s=i.getLayoutProperty("icon-image"),o=i.getLayoutProperty("text-field");let a=i.getLayoutProperty("text-transform"),l=i.getLayoutProperty("text-font");const h=[];let c,u,f,x;s&&!s.isDataDriven&&(c=s.getValue(n)),o&&!o.isDataDriven&&(u=o.getValue(n)),a&&a.isDataDriven||(f=i.getLayoutValue("text-transform",n),a=null),l&&l.isDataDriven||(x=i.getLayoutValue("text-font",n),l=null);for(const y of this._features){const d=y.getGeometry(e);if(!d||0===d.length)continue;let p,g;s&&(p=s.isDataDriven?s.getValue(n,y):this._replaceKeys(c,y.values),p&&t(p));let _=!1;if(o&&(g=o.isDataDriven?o.getValue(n,y):this._replaceKeys(u,y.values),g)){switch(g=g.replaceAll("\\n","\n"),a&&(f=a.getValue(n,y)),f){case 2:g=g.toLowerCase();break;case 1:g=g.toUpperCase()}if(q._bidiEngine.hasBidiChar(g)){let e;e="rtl"===q._bidiEngine.checkContextual(g)?"IDNNN":"ICNNN",g=q._bidiEngine.bidiTransform(g,e,"VLYSN"),_=!0}if(g.length>0){l&&(x=l.getValue(n,y));for(const e of x){let t=r[e];t||(t=r[e]=new Set);for(const e of g){const r=e.codePointAt(0);null!=r&&t.add(r)}}}}if(!p&&!g)continue;const m=i.getLayoutValue("symbol-sort-key",n,y),w={feature:y,sprite:p,label:g,rtl:_,geometry:d,hash:(g?(0,Z.Wm)(g):0)^(p?(0,Z.Wm)(p):0),priority:m,textFont:x};h.push(w)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,r=this.zoom,i=t.getLayoutValue("symbol-placement",r),n=0!==i,a=t.getLayoutValue("symbol-spacing",r)*s.ih,l=t.getLayoutProperty("icon-image"),h=t.getLayoutProperty("text-field"),c=l?new W.aR(t,r,n):null,u=h?new W.uU(t,r,n):null,y=this._workerTileHandler;let d;l&&(d=y.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const g=[];let _=1;u?.size&&(_=u.size/f);const m=u?u.maxAngle*o.os:0,w=u?u.size*s.ih:0;for(const e of this._symbolFeatures){let t,o;c&&d&&e.sprite&&(t=d[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&c.update(r,e.feature);let l=0;const h=e.label;if(h){(0,j.Lw)(u),u.update(r,e.feature);const t=n&&0===u.rotationAlignment?u.keepUpright:u.writingMode&&u.writingMode.includes(1);let i=.5;switch(u.anchor){case 5:case 1:case 7:i=0;break;case 6:case 2:case 8:i=1}let a=.5;switch(u.anchor){case 5:case 3:case 6:a=0;break;case 7:case 4:case 8:a=1}let c=.5;switch(u.justify){case 0:c=i;break;case 1:c=0;break;case 3:c=1}const d=u.letterSpacing*f,p=n?0:u.maxWidth*f,g=u.lineHeight*f,m=e.textFont.map(e=>y.getGlyphItems(e));if(o=new x(m,p,g,d,i,a,c).getShaping(h,e.rtl,t),o&&o.length>0){let e=1e30,t=-1e30;for(const r of o)e=Math.min(e,r.x),t=Math.max(t,r.x);l=(t-e+48)*_*s.ih}}for(let r of e.geometry){const h=[];if(1===i){if(o?.length&&u?.size){const e=u.size*s.ih*(2+Math.min(2,4*Math.abs(u.offset[1])));r=q._smoothVertices(r,e)}q._pushAnchors(h,r,a,l)}else 2===i?q._pushCenterAnchor(h,r):3===e.feature.type?q._pushCentroid(h,r):h.push(new p(r[0].x,r[0].y));for(const i of h){if(i.x<0||i.x>s._H||i.y<0||i.y>s._H)continue;if(n&&l>0&&0===u?.rotationAlignment&&!q._honorsTextMaxAngle(r,i,l,m,w))continue;const a={shaping:o,line:r,iconMosaicItem:t,anchor:i,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};g.push(a),this._processFeature(a,c,u)}}}g.sort(K),this._addPlacedGlyphs(),this._symbolInstances=g}serialize(){let e=14;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=q._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),r=new Int32Array(t.buffer),i=new Float32Array(t.buffer),[n,s,o]=this._sourceTileKey.split("/");let a=0;t[a++]=this.type,t[a++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[a++]=this.layerUIDs[e];t[a++]=this._isIconSDF?1:0,t[a++]=parseFloat(n),t[a++]=parseFloat(s),t[a++]=parseFloat(o),t[a++]=this.markerPageMap.size;for(const[e,[r,i]]of this.markerPageMap)t[a++]=e,t[a++]=r,t[a++]=i;t[a++]=this.glyphsPageMap.size;for(const[e,[r,i]]of this.glyphsPageMap)t[a++]=e,t[a++]=r,t[a++]=i;t[a++]=this._iconVertexBuffer.index/4,t[a++]=this._textVertexBuffer.index/4,a=q.serializeSymbols(t,r,i,a,this._symbolInstances),t[a++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)r[a++]=this._iconVertexBuffer.array[e];t[a++]=this._iconIndexBuffer.array.length;for(let e=0;e<this._iconIndexBuffer.array.length;e++)t[a++]=this._iconIndexBuffer.array[e];t[a++]=this._textVertexBuffer.array.length;for(let e=0;e<this._textVertexBuffer.array.length;e++)r[a++]=this._textVertexBuffer.array[e];t[a++]=this._textIndexBuffer.array.length;for(let e=0;e<this._textIndexBuffer.array.length;e++)t[a++]=this._textIndexBuffer.array[e];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const r of e||[]){t+=5,t+=1;for(const e of r.textColliders)t+=10;for(const e of r.iconColliders)t+=10;t+=1,t+=2*r.textVertexRanges.length,t+=1,t+=2*r.iconVertexRanges.length}return t}static serializeSymbols(e,t,r,i,n){n=n||[],t[i++]=n.length;for(const e of n){t[i++]=e.anchor.x,t[i++]=e.anchor.y,t[i++]=e.symbolFeature.hash,t[i++]=e.symbolFeature.priority,t[i++]=e.symbolFeature.feature.featureIndex,t[i++]=e.textColliders.length+e.iconColliders.length;for(const n of e.textColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,r[i++]=n.minLod,r[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;for(const n of e.iconColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,r[i++]=n.minLod,r[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;t[i++]=e.textVertexRanges.length;for(const[r,n]of e.textVertexRanges)t[i++]=r,t[i++]=n;t[i++]=e.iconVertexRanges.length;for(const[r,n]of e.iconVertexRanges)t[i++]=r,t[i++]=n}return i}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,(e,r)=>r in t?t[r]:"")}_processFeature(e,t,r){const{line:i,iconMosaicItem:n,shaping:s,anchor:a}=e,l=this.zoom,h=this.layer,c=!!n;let u=!0;c&&(u=t?.optional||!n);const f=s&&s.length>0,x=!f||r?.optional;let y,d;if(c&&(y=this._placementEngine.getIconPlacement(a,n,t)),(y||u)&&(f&&(d=this._placementEngine.getTextPlacement(a,s,i,r)),d||x)){if(y&&d||(x||u?x||d?u||y||(d=null):y=null:(y=null,d=null)),d){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,d.shapes,l,r.rotationAlignment,t),d.textColliders){e.textColliders=d.textColliders;for(const e of d.textColliders){e.minLod=Math.max(l+(0,o.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,o.p6)(e.maxLod),25);const t=e.angle;if(t){const r=Math.cos(t),i=Math.sin(t),n=e.dxPixels*r-e.dyPixels*i,s=e.dxPixels*i+e.dyPixels*r,o=(e.dxPixels+e.width)*r-e.dyPixels*i,a=(e.dxPixels+e.width)*i+e.dyPixels*r,l=e.dxPixels*r-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*r,c=(e.dxPixels+e.width)*r-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*r,f=Math.min(n,o,l,c),x=Math.max(n,o,l,c),y=Math.min(s,a,h,u),d=Math.max(s,a,h,u);e.dxPixels=f,e.dyPixels=y,e.width=x-f,e.height=d-y}}}}if(y){const r=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,y.shapes,l,n.page,1===t.rotationAlignment,r),y.iconColliders){e.iconColliders=y.iconColliders;for(const e of y.iconColliders){e.minLod=Math.max(l+(0,o.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,o.p6)(e.maxLod),25);const t=e.angle;if(t){const r=Math.cos(t),i=Math.sin(t),n=e.dxPixels*r-e.dyPixels*i,s=e.dxPixels*i+e.dyPixels*r,o=(e.dxPixels+e.width)*r-e.dyPixels*i,a=(e.dxPixels+e.width)*i+e.dyPixels*r,l=e.dxPixels*r-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*r,c=(e.dxPixels+e.width)*r-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*r,f=Math.min(n,o,l,c),x=Math.max(n,o,l,c),y=Math.min(s,a,h,u),d=Math.max(s,a,h,u);e.dxPixels=f,e.dyPixels=y,e.width=x-f,e.height=d-y}}}}}}_addPlacedIcons(e,t,r,i,n,s){const a=Math.max(r-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=n?0:Math.max(r+(0,o.p6)(u.minzoom),a),f=n?25:Math.min(r+(0,o.p6)(u.maxzoom),25);if(f<=t)continue;const x=u.tl,y=u.tr,d=u.bl,p=u.br,g=u.mosaicRect,_=u.labelAngle,m=u.minAngle,w=u.maxAngle,b=u.anchor,v=l.index,I=g.x,M=g.y,P=I+g.width,k=M+g.height,A=l.index;l.add(b.x,b.y,x.x,x.y,I,M,_,m,w,t,f,s),l.add(b.x,b.y,y.x,y.y,P,M,_,m,w,t,f,s),l.add(b.x,b.y,d.x,d.y,I,k,_,m,w,t,f,s),l.add(b.x,b.y,p.x,p.y,P,k,_,m,w,t,f,s),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===A?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([A,4]),h.add(v,v+1,v+2),h.add(v+1,v+2,v+3),c.has(i)?c.get(i)[1]+=6:c.set(i,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,r=this._glyphMap;for(const[i,n]of this._glyphBufferDataStorage)for(const s of n){const n=e.index,o=s.symbolInstance,a=s.ddAttributes,l=e.index;e.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tl[0],s.tl[1],s.xmin,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),e.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tr[0],s.tr[1],s.xmax,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),e.add(s.glyphAnchor[0],s.glyphAnchor[1],s.bl[0],s.bl[1],s.xmin,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),e.add(s.glyphAnchor[0],s.glyphAnchor[1],s.br[0],s.br[1],s.xmax,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),o.textVertexRanges.length>0&&o.textVertexRanges[0][0]+o.textVertexRanges[0][1]===l?o.textVertexRanges[0][1]+=4:o.textVertexRanges.push([l,4]),t.add(n,n+1,n+2),t.add(n+1,n+2,n+3),r.has(i)?r.get(i)[1]+=6:r.set(i,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,r,i,n){const s=Math.max(r-1,0),a=1===i;let l,h,c,u,f,x,y,d,p,g,_;for(const i of t)l=a?0:Math.max(r+(0,o.p6)(i.minzoom),s),h=a?25:Math.min(r+(0,o.p6)(i.maxzoom),25),h<=l||(c=i.tl,u=i.tr,f=i.bl,x=i.br,y=i.labelAngle,d=i.minAngle,p=i.maxAngle,g=i.anchor,_=i.mosaicRect,this._glyphBufferDataStorage.has(i.page)||this._glyphBufferDataStorage.set(i.page,[]),this._glyphBufferDataStorage.get(i.page).push({glyphAnchor:[g.x,g.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[x.x,x.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:y,minAngle:d,maxAngle:p,minLod:l,maxLod:h,placementLod:s,symbolInstance:e,ddAttributes:n}))}static _pushAnchors(e,t,r,i){r+=i;let s=0;const a=t.length-1;for(let e=0;e<a;e++)s+=n.bR.distance(t[e],t[e+1]);let l=i||r;if(l*=.5,s<=l)return;const h=l/s;let c=0,u=-(r=s/Math.max(Math.round(s/r),1))/2;const f=t.length-1;for(let i=0;i<f;i++){const n=t[i],s=t[i+1],a=s.x-n.x,l=s.y-n.y,f=Math.sqrt(a*a+l*l);let x;for(;u+r<c+f;){u+=r;const t=(u-c)/f,y=(0,o.GW)(n.x,s.x,t),d=(0,o.GW)(n.y,s.y,t);void 0===x&&(x=Math.atan2(l,a)),e.push(new p(y,d,x,i,h))}c+=f}}static _pushCenterAnchor(e,t){let r=0;const i=t.length-1;for(let e=0;e<i;e++)r+=n.bR.distance(t[e],t[e+1]);const s=r/2;let a=0;const l=t.length-1;for(let r=0;r<l;r++){const i=t[r],n=t[r+1],l=n.x-i.x,h=n.y-i.y,c=Math.sqrt(l*l+h*h);if(s<a+c){const t=(s-a)/c,u=(0,o.GW)(i.x,n.x,t),f=(0,o.GW)(i.y,n.y,t),x=Math.atan2(h,l);return void e.push(new p(u,f,x,r,0))}a+=c}}static _deviation(e,t,r){const i=(t.x-e.x)*(r.x-t.x)+(t.y-e.y)*(r.y-t.y),n=(t.x-e.x)*(r.y-t.y)-(t.y-e.y)*(r.x-t.x);return Math.atan2(n,i)}static _honorsTextMaxAngle(e,t,r,i,s){let o=0;const a=r/2;let l=new n.bR(t.x,t.y),h=t.segment+1;for(;o>-a;){if(--h,h<0)return!1;o-=n.bR.distance(e[h],l),l=e[h]}o+=n.bR.distance(e[h],e[h+1]);const c=[];let u=0;const f=e.length;for(;o<a;){const t=e[h];let r,a=h;do{if(++a,a===f)return!1;r=e[a]}while(r.isEqual(t));let l,x=a;do{if(++x,x===f)return!1;l=e[x]}while(l.isEqual(r));const y=this._deviation(t,r,l);for(c.push({deviation:y,distToAnchor:o}),u+=y;o-c[0].distToAnchor>s;)u-=c.shift().deviation;if(Math.abs(u)>i)return!1;o+=n.bR.distance(r,l),h=a}return!0}static _smoothVertices(e,t){if(t<=0)return e;let r=e.length;if(r<3)return e;const i=[];let s=0,o=0;i.push(0);for(let t=1;t<r;t++){const r=n.bR.distance(e[t],e[t-1]);r>0&&(s+=r,i.push(s),o++,o!==t&&(e[o]=e[t]))}if(r=o+1,r<3)return e;t=Math.min(t,.2*s);const a=e[0].x,l=e[0].y,h=e[r-1].x,c=e[r-1].y,u=n.bR.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[r-1],e[r-2]),u.normalize(),e[r-1].x+=t*u.x,e[r-1].y+=t*u.y,i[0]-=t,i[r-1]+=t;const f=[];f.push(new n.bR(a,l));const x=1e-6,y=.5*t;for(let s=1;s<r-1;s++){let o=0,a=0,l=0;for(let r=s-1;r>=0;r--){const n=y+i[r+1]-i[s];if(n<0)break;const h=i[r+1]-i[r],c=i[s]-i[r]<y?1:n/h;if(c<x)break;const u=c*c,f=c*n-.5*u*h,d=c*h/t,p=e[r+1],g=e[r].x-p.x,_=e[r].y-p.y;o+=d/f*(p.x*c*n+.5*u*(n*g-h*p.x)-u*c*h*g/3),a+=d/f*(p.y*c*n+.5*u*(n*_-h*p.y)-u*c*h*_/3),l+=d}for(let n=s+1;n<r;n++){const r=y-i[n-1]+i[s];if(r<0)break;const h=i[n]-i[n-1],c=i[n]-i[s]<y?1:r/h;if(c<x)break;const u=c*c,f=c*r-.5*u*h,d=c*h/t,p=e[n-1],g=e[n].x-p.x,_=e[n].y-p.y;o+=d/f*(p.x*c*r+.5*u*(r*g-h*p.x)-u*c*h*g/3),a+=d/f*(p.y*c*r+.5*u*(r*_-h*p.y)-u*c*h*_/3),l+=d}f.push(new n.bR(o/l,a/l))}return f.push(new n.bR(h,c)),e[0].x=a,e[0].y=l,e[r-1].x=h,e[r-1].y=c,f}static _pushCentroid(e,t){const r=s._H,i=s._H,n=t.length-1;let o=0,a=0,l=0,h=t[0].x,c=t[0].y;h>r&&(h=r),h<0&&(h=0),c>i&&(c=i),c<0&&(c=0);for(let e=1;e<n;e++){let n=t[e].x,s=t[e].y,u=t[e+1].x,f=t[e+1].y;n>r&&(n=r),n<0&&(n=0),s>i&&(s=i),s<0&&(s=0),u>r&&(u=r),u<0&&(u=0),f>i&&(f=i),f<0&&(f=0);const x=(n-h)*(f-c)-(u-h)*(s-c);o+=x*(h+n+u),a+=x*(c+s+f),l+=x}o/=3*l,a/=3*l,isNaN(o)||isNaN(a)||e.push(new p(o,a))}}class H{constructor(e,t,r,i,s,a){if(this._pbfTiles={},this._tileClippers={},this._client=r,this._tile=t,this._sourceDataMaxLOD=i,a){this._styleLayerUIDs=new Set;for(const e of a)this._styleLayerUIDs.add(e)}this._styleRepository=s,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,o.IU)(this._level);for(const t of Object.keys(e)){const r=e[t];if(this._pbfTiles[t]=new b.A(new Uint8Array(r.protobuff),new DataView(r.protobuff)),r.refKey){const[e]=r.refKey.split("/").map(parseFloat),i=l-e;if(i>0){const e=(1<<i)-1,r=h&e,s=c&e;this._tileClippers[t]=new n.O3(i,r,s,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new n.Ox)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,v.If)(),r=this._initialize(e),{returnedBuckets:i}=r;this._processLayers(r),this._linkReferences(r),this._filterFeatures(r);const n=[],s=new Set,o=(e,t)=>{s.has(e)||(n.push({name:e,repeat:t}),s.add(e))},a={};for(const e of i)e.getResources(e.tileClipper,o,a);if(4===this._tile.status)return[];const l=this._fetchResources(n,a,e);return Promise.all([...l,t]).then(()=>this._processFeatures(r.returnedBuckets))}_initialize(e){const t=e?.signal;return{signal:t,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,zoom:r,layers:i,sourceNameToTileClipper:n,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:o,returnedBuckets:a,layerIdToBucket:l,referencerUIDToReferencedId:h}=e,c=this._sourceDataMaxLOD;for(let e=i.length-1;e>=0;e--){const u=i[e];if(r<c){if(u.minzoom&&r<Math.floor(u.minzoom)||u.maxzoom&&r>=u.maxzoom)continue}else if(u.maxzoom&&r>=u.maxzoom)continue;if(0===u.type||!this._canParseStyleLayer(u.uid)||!t[u.source]||!n[u.source])continue;const f=t[u.source],x=n[u.source],y=u.sourceLayer,d=f[y];if(d){let e=o[u.source];if(e||(e=o[u.source]=new Set),e.add(u.sourceLayer),u.refLayerId)h.set(u.uid,u.refLayerId);else{const e=this._createBucket(u);if(e){e.layerUIDs=[u.uid],e.layerExtent=d.extent,e.tileClipper=x;let t=s[u.source];t||(t=s[u.source]={});let r=t[y];r||(r=t[y]=[]),r.push(e),a.push(e),l[u.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:r}=e;r.forEach((e,r)=>{t[e]&&t[e].layerUIDs.push(r)})}_filterFeatures(e){const{signal:t,sourceNameToTileData:r,sourceNameToUniqueSourceLayerBuckets:n,sourceNameToUniqueSourceLayers:s}=e,o=10*this._level,a=10*(this._level+1),l=[],h=[];for(const e of Object.keys(s))s[e].forEach(t=>{l.push(t),h.push(e)});for(let e=0;e<l.length;e++){const s=h[e],c=l[e];if(!r[s]||!n[s])continue;const u=r[s][c],f=n[s][c];if(!f||0===f.length)continue;if((0,i.G4)(t))return;let x=0;const y=u.getData();for(;y.nextTag(2);){const e=y.getMessage(),t=new I(e,u,x++);e.release();const r=t.values;if(r){const e=r._minzoom;if(e&&e>=a)continue;const t=r._maxzoom;if(t&&t<=o)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,r){const i=[],n=this._tile.getWorkerTileHandler();let s,o;e.length>0&&(s=n.fetchSprites(e,this._client,r),i.push(s));for(const e in t){const s=t[e];s.size>0&&(o=n.fetchGlyphs(this._tile.tileKey,e,s,this._client,r),i.push(o))}return i}_processFeatures(e){const t=e.filter(e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid));for(const e of t)e.processFeatures(e.tileClipper);return t}_parseTileData(e){const t={};for(const r of Object.keys(e)){const i=e[r],n={};for(;i.next();)switch(i.tag()){case 3:{const e=i.getMessage(),t=new k(e);e.release(),n[t.name]=t;break}default:i.skip()}t[r]=n}return t}_createBucket(e){switch(e.type){case 0:return null;case 1:return this._createFillBucket(e);case 2:return this._createLineBucket(e);case 4:return this._createCircleBucket(e);case 3:return this._createSymbolBucket(e)}}_createFillBucket(e){return new z(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new S(e.fillMaterial.getStride()),new P,new B(e.outlineMaterial.getStride()),new P)}_createLineBucket(e){return new U(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.lineMaterial.getStride()),new P)}_createCircleBucket(e){return new R(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new C(e.circleMaterial.getStride()),new P)}_createSymbolBucket(e){const t=this._tile;return new q(t.tileKey,e,this._level,new T(e.iconMaterial.getStride()),new P,new T(e.textMaterial.getStride()),new P,t.placementEngine,t.getWorkerTileHandler())}}class Y{constructor(e,t,r,i){this.status=0,this.placementEngine=new w,this.tileKey=e,this.refKeys=t,this._workerTileHandler=r,this._styleRepository=i}release(){this.tileKey="",this.refKeys=null,this.status=0,this._workerTileHandler=null}async parse(e,t){const r=t?.signal;if(null!=r){const e=()=>{r.removeEventListener("abort",e),this.status=4};r.addEventListener("abort",e)}let n;const s={bucketsWithData:[],emptyBuckets:null};try{n=await this._parse(e,t)}catch(e){if((0,i.zf)(e))throw e;return{result:s,transferList:[]}}this.status=2;const o=s.bucketsWithData,a=[];for(const e of n)if(e.hasFeatures()){const t=e.serialize();o.push(t)}else a.push(e.layer.uid);const l=[...o];let h=null;return a.length>0&&(h=Uint32Array.from(a),l.push(h.buffer)),s.emptyBuckets=h,{result:s,transferList:l}}setObsolete(){this.status=4}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const r=e.sourceName2DataAndRefKey;return 0===Object.keys(r).length?[]:(this.status=3,new H(r,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var J=r(45013);class ${constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=25}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(e,t){const{key:r}=e,n={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const r=e.sourceName2DataAndRefKey[t];n[t]=r.refKey}const s=new Y(r,n,this,this._styleRepository);try{return await s.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(s.setObsolete(),s.release(),!(0,i.zf)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const r of e){const e=r.type,i=r.data;switch(e){case 0:t.setPaintProperties(i.layer,i.paint);break;case 1:t.setLayoutProperties(i.layer,i.layout);break;case 3:t.deleteStyleLayer(i.layer);break;case 2:t.setStyleLayer(i.layer,i.index);break;case 4:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:r}=e;this._styleRepository=new J.A(t),this._sourceDataMaxLOD=r,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,r){const i=[],n=this._spriteInfo;for(const t of e)void 0===n[t.name]&&i.push(t);return 0===i.length?Promise.resolve():t.invoke("getSprites",i,{signal:r?.signal}).then(e=>{for(const t in e){const r=e[t];n[t]=r}})}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,r,i,n){const s=[];let o=this._glyphInfo[t];return o?r.forEach(e=>{o[e]||s.push(e)}):(o=this._glyphInfo[t]=[],r.forEach(e=>s.push(e))),0===s.length?Promise.resolve():i.invoke("getGlyphs",{tileID:e,font:t,codePoints:s},n).then(e=>{for(let t=0;t<e.length;t++)e[t]&&(o[t]=e[t])})}getGlyphItems(e){return this._glyphInfo[e]}}},83773(e,t,r){r.d(t,{i:()=>y});var i=r(76213);function n(e,t){return e.x===t.x&&e.y===t.y}function s(e){if(!e)return;const t=e.length;if(t<=1)return;let r=0;for(let i=1;i<t;i++)n(e[i],e[r])||++r===i||(e[r]=e[i]);e.length=r+1}function o(e,t){return e.x=t.y,e.y=-t.x,e}function a(e,t){return e.x=-t.y,e.y=t.x,e}function l(e,t){return e.x=t.x,e.y=t.y,e}function h(e,t){return e.x=-t.x,e.y=-t.y,e}function c(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function u(e,t){return e.x*t.y-e.y*t.x}function f(e,t){return e.x*t.x+e.y*t.y}function x(e,t,r,i){return e.x=t.x*r+t.y*i,e.y=t.x*i-t.y*r,e}class y{constructor(e,t,r){this._writeVertex=e,this._writeTriangle=t,this._canUseThinTessellation=r,this._prevNormal={x:void 0,y:void 0},this._nextNormal={x:void 0,y:void 0},this._textureNormalLeft={x:0,y:1},this._textureNormalRight={x:0,y:-1},this._textureNormal={x:void 0,y:void 0},this._joinNormal={x:void 0,y:void 0},this._inner={x:void 0,y:void 0},this._outer={x:void 0,y:void 0},this._roundStart={x:void 0,y:void 0},this._roundEnd={x:void 0,y:void 0},this._startBreak={x:void 0,y:void 0},this._endBreak={x:void 0,y:void 0},this._innerPrev={x:void 0,y:void 0},this._innerNext={x:void 0,y:void 0},this._bevelStart={x:void 0,y:void 0},this._bevelEnd={x:void 0,y:void 0},this._bevelMiddle={x:void 0,y:void 0}}tessellate(e,t,r=this._canUseThinTessellation){s(e),r&&t.halfWidth<i.Gh&&!t.offset?this._tessellateThin(e,t):this._tessellate(e,t)}_tessellateThin(e,t){if(e.length<2)return;const r=t.wrapDistance||65535;let i=t.initialDistance||0,n=!1,s=e[0].x,o=e[0].y;const a=e.length;for(let t=1;t<a;++t){n&&(n=!1,i=0);let a=e[t].x,l=e[t].y,h=a-s,c=l-o,u=Math.sqrt(h*h+c*c);if(h/=u,c/=u,i+u>r){n=!0;const e=(r-i)/u;u=r-i,a=(1-e)*s+e*a,l=(1-e)*o+e*l,--t}const f=this._writeVertex(s,o,0,0,h,c,c,-h,0,-1,i),x=this._writeVertex(s,o,0,0,h,c,-c,h,0,1,i);i+=u;const y=this._writeVertex(a,l,0,0,h,c,c,-h,0,-1,i),d=this._writeVertex(a,l,0,0,h,c,-c,h,0,1,i);this._writeTriangle(f,x,y),this._writeTriangle(x,y,d),s=a,o=l}}_tessellate(e,t){const r=e[0],i=e[e.length-1],s=n(r,i),y=s?3:2;if(e.length<y)return;const d=t.pixelCoordRatio,p=null!=t.capType?t.capType:0,g=null!=t.joinType?t.joinType:2,_=null!=t.miterLimit?Math.min(t.miterLimit,4):2,m=null!=t.roundLimit?Math.min(t.roundLimit,1.05):1.05,w=null!=t.halfWidth?t.halfWidth:2,b=!!t.textured;let v,I,M,P=null;const k=this._prevNormal,A=this._nextNormal;let V=-1,S=-1;const B=this._joinNormal;let T,C;const L=this._textureNormalLeft,R=this._textureNormalRight,D=this._textureNormal;let E=-1,z=-1;const N=t.wrapDistance||65535;let U=t.initialDistance||0;const F=this._writeVertex,O=this._writeTriangle,G=(e,t,r,i,n,s)=>{const o=F(I,M,T,C,r,i,e,t,n,s,U);return E>=0&&z>=0&&o>=0&&O(E,z,o),E=z,z=o,o};s&&(v=e[e.length-2],A.x=i.x-v.x,A.y=i.y-v.y,S=c(A),A.x/=S,A.y/=S);let j=!1;for(let t=0;t<e.length;++t){if(j&&(j=!1,U=0),v&&(k.x=-A.x,k.y=-A.y,V=S,U+V>N&&(j=!0)),j){const r=(N-U)/V;V=N-U,v={x:(1-r)*v.x+r*e[t].x,y:(1-r)*v.y+r*e[t].y},--t}else v=e[t];I=v.x,M=v.y;const r=t<=0&&!j,i=t===e.length-1;if(r||(U+=V),P=i?s?e[1]:null:e[t+1],P?(A.x=P.x-I,A.y=P.y-M,S=c(A),A.x/=S,A.y/=S):(A.x=void 0,A.y=void 0),!s){if(r){a(B,A),T=B.x,C=B.y,2===p&&(G(-A.y-A.x,A.x-A.y,A.x,A.y,0,-1),G(A.y-A.x,-A.x-A.y,A.x,A.y,0,1)),1===p&&(G(-A.y-A.x,A.x-A.y,A.x,A.y,-1,-1),G(A.y-A.x,-A.x-A.y,A.x,A.y,-1,1)),1!==p&&0!==p||(G(-A.y,A.x,A.x,A.y,0,-1),G(A.y,-A.x,A.x,A.y,0,1));continue}if(i){o(B,k),T=B.x,C=B.y,1!==p&&0!==p||(G(k.y,-k.x,-k.x,-k.y,0,-1),G(-k.y,k.x,-k.x,-k.y,0,1)),2===p&&(G(k.y-k.x,-k.x-k.y,-k.x,-k.y,0,-1),G(-k.y-k.x,k.x-k.y,-k.x,-k.y,0,1)),1===p&&(G(k.y-k.x,-k.x-k.y,-k.x,-k.y,1,-1),G(-k.y-k.x,k.x-k.y,-k.x,-k.y,1,1));continue}}let n,y,F=-u(k,A);if(Math.abs(F)<.01)f(k,A)>0?(B.x=k.x,B.y=k.y,F=1,n=Number.MAX_VALUE,y=!0):(a(B,A),F=1,n=1,y=!1);else{B.x=(k.x+A.x)/F,B.y=(k.y+A.y)/F,n=c(B);const e=(n-1)*w*d;y=n>4||e>V&&e>S}T=B.x,C=B.y;let O=g;switch(g){case 0:n<1.05&&(O=2);break;case 1:n<m&&(O=2);break;case 2:n>_&&(O=0)}switch(O){case 2:if(G(B.x,B.y,-k.x,-k.y,0,-1),G(-B.x,-B.y,-k.x,-k.y,0,1),i)break;if(b){const e=j?0:U;E=this._writeVertex(I,M,T,C,A.x,A.y,B.x,B.y,0,-1,e),z=this._writeVertex(I,M,T,C,A.x,A.y,-B.x,-B.y,0,1,e)}break;case 0:{const e=F<0;let t,r,n,s;if(e){const e=E;E=z,z=e,t=L,r=R}else t=R,r=L;if(y)n=e?a(this._innerPrev,k):o(this._innerPrev,k),s=e?o(this._innerNext,A):a(this._innerNext,A);else{const t=e?h(this._inner,B):l(this._inner,B);n=t,s=t}const c=e?o(this._bevelStart,k):a(this._bevelStart,k);G(n.x,n.y,-k.x,-k.y,t.x,t.y);const u=G(c.x,c.y,-k.x,-k.y,r.x,r.y);if(i)break;const f=e?a(this._bevelEnd,A):o(this._bevelEnd,A);if(y){const e=this._writeVertex(I,M,T,C,-k.x,-k.y,0,0,0,0,U);E=this._writeVertex(I,M,T,C,A.x,A.y,s.x,s.y,t.x,t.y,U),z=this._writeVertex(I,M,T,C,A.x,A.y,f.x,f.y,r.x,r.y,U),this._writeTriangle(u,e,z)}else{if(b){const e=this._bevelMiddle;e.x=(c.x+f.x)/2,e.y=(c.y+f.y)/2,x(D,e,-k.x,-k.y),G(e.x,e.y,-k.x,-k.y,D.x,D.y),x(D,e,A.x,A.y),E=this._writeVertex(I,M,T,C,A.x,A.y,e.x,e.y,D.x,D.y,U),z=this._writeVertex(I,M,T,C,A.x,A.y,s.x,s.y,t.x,t.y,U)}else{const e=E;E=z,z=e}G(f.x,f.y,A.x,A.y,r.x,r.y)}if(e){const e=E;E=z,z=e}break}case 1:{const e=F<0;let t,r;if(e){const e=E;E=z,z=e,t=L,r=R}else t=R,r=L;const s=e?h(this._inner,B):l(this._inner,B);let c,u;y?(c=e?a(this._innerPrev,k):o(this._innerPrev,k),u=e?o(this._innerNext,A):a(this._innerNext,A)):(c=s,u=s);const d=e?o(this._roundStart,k):a(this._roundStart,k),p=e?a(this._roundEnd,A):o(this._roundEnd,A),g=G(c.x,c.y,-k.x,-k.y,t.x,t.y),_=G(d.x,d.y,-k.x,-k.y,r.x,r.y);if(i)break;const m=this._writeVertex(I,M,T,C,-k.x,-k.y,0,0,0,0,U);y||this._writeTriangle(E,z,m);const w=h(this._outer,s),v=this._writeVertex(I,M,T,C,A.x,A.y,p.x,p.y,r.x,r.y,U);let P,V;const S=n>2;if(S){let t;n!==Number.MAX_VALUE?(w.x/=n,w.y/=n,t=f(k,w),t=(n*(t*t-1)+1)/t):t=-1,P=e?o(this._startBreak,k):a(this._startBreak,k),P.x+=k.x*t,P.y+=k.y*t,V=e?a(this._endBreak,A):o(this._endBreak,A),V.x+=A.x*t,V.y+=A.y*t}x(D,w,-k.x,-k.y);const N=this._writeVertex(I,M,T,C,-k.x,-k.y,w.x,w.y,D.x,D.y,U);x(D,w,A.x,A.y);const O=b?this._writeVertex(I,M,T,C,A.x,A.y,w.x,w.y,D.x,D.y,U):N,j=m,Z=b?this._writeVertex(I,M,T,C,A.x,A.y,0,0,0,0,U):m;let W=-1,K=-1;if(S&&(x(D,P,-k.x,-k.y),W=this._writeVertex(I,M,T,C,-k.x,-k.y,P.x,P.y,D.x,D.y,U),x(D,V,A.x,A.y),K=this._writeVertex(I,M,T,C,A.x,A.y,V.x,V.y,D.x,D.y,U)),b?S?(this._writeTriangle(j,_,W),this._writeTriangle(j,W,N),this._writeTriangle(Z,O,K),this._writeTriangle(Z,K,v)):(this._writeTriangle(j,_,N),this._writeTriangle(Z,O,v)):S?(this._writeTriangle(m,_,W),this._writeTriangle(m,W,K),this._writeTriangle(m,K,v)):(this._writeTriangle(m,_,N),this._writeTriangle(m,O,v)),y?(E=this._writeVertex(I,M,T,C,A.x,A.y,u.x,u.y,t.x,t.y,U),z=v):(E=b?this._writeVertex(I,M,T,C,A.x,A.y,u.x,u.y,t.x,t.y,U):g,this._writeTriangle(E,Z,v),z=v),e){const e=E;E=z,z=e}break}}}}}}}]);
|