@arcgis/core 6.0.0-next.28 → 6.0.0-next.29
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/arcgisGlobal.d.ts +0 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/131185d26343a997495e.js +1 -0
- package/assets/esri/core/workers/chunks/{dbda982485d3fe26c729.js → 13c64087be3b2985a21b.js} +1 -1
- package/assets/esri/core/workers/chunks/144bad0c2415c345736a.js +1 -0
- package/assets/esri/core/workers/chunks/176d0a06ebff5a29dedf.js +1 -0
- package/assets/esri/core/workers/chunks/{b0ca81a07cff25df19d2.js → 176d75e76318bfc25a53.js} +1 -1
- package/assets/esri/core/workers/chunks/18776a130d96879a68b1.js +1 -0
- package/assets/esri/core/workers/chunks/{e35641a3a4da8cfbcf54.js → 189321d88026bd7e6d3e.js} +1 -1
- package/assets/esri/core/workers/chunks/18e7fa4d3e0b1a084cc6.js +1 -0
- package/assets/esri/core/workers/chunks/{1168bc5c9f0a7e1f63a2.js → 1989410a618865f02dec.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c0cb214fedb29487eef.js → 199a7f97916679e0257c.js} +1 -1
- package/assets/esri/core/workers/chunks/1c406ab2bf99ac563316.js +1 -0
- package/assets/esri/core/workers/chunks/1d96fbad881a7d14a950.js +1 -0
- package/assets/esri/core/workers/chunks/{42d44c7d532df5ee70e9.js → 1deca3de77b1a9a07da4.js} +1 -1
- package/assets/esri/core/workers/chunks/{45f826554499c38968c6.js → 1ee4df0fd61440cb5f02.js} +1 -1
- package/assets/esri/core/workers/chunks/22e73501e1435a896826.js +1 -0
- package/assets/esri/core/workers/chunks/25657f70c5f04a4ed978.js +1 -0
- package/assets/esri/core/workers/chunks/276a0b549acf048e8673.js +1 -0
- package/assets/esri/core/workers/chunks/{56e903ccef66cbe18f92.js → 2cd60fd062d954322c1f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad96132bc89671e595f3.js → 2d3e0e4442dbc6ec6def.js} +1 -1
- package/assets/esri/core/workers/chunks/2de4296590bf9f9e9add.js +1 -0
- package/assets/esri/core/workers/chunks/2f5d014d6a72108b0b3a.js +1 -0
- package/assets/esri/core/workers/chunks/{0363d29fc665d169ebc4.js → 3105336a05f38a95ebea.js} +1 -1
- package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +1 -0
- package/assets/esri/core/workers/chunks/3aafdb905c697bc9b1ad.js +1 -0
- package/assets/esri/core/workers/chunks/40c2674dae73f0942751.js +1 -0
- package/assets/esri/core/workers/chunks/418addce122dbb8897b4.js +1 -0
- package/assets/esri/core/workers/chunks/4419732baf3459a80e6d.js +1 -0
- package/assets/esri/core/workers/chunks/4976f5567fc7f1b63d10.js +1 -0
- package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +1 -0
- package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +1 -0
- package/assets/esri/core/workers/chunks/53c7510df09b71ab5646.js +1 -0
- package/assets/esri/core/workers/chunks/561c48cb4d49b150765b.js +1 -0
- package/assets/esri/core/workers/chunks/{d90a3bfd45b5ed4092e0.js → 590fe0f56bc4c33a50e7.js} +1 -1
- package/assets/esri/core/workers/chunks/5bb6c255bdc8aa9ba23e.js +1 -0
- package/assets/esri/core/workers/chunks/5f1cb79aec9c4a9b7ddc.js +29 -0
- package/assets/esri/core/workers/chunks/{23a4806b4cdf7cc32e4d.js → 5f787809b74eed7b9a91.js} +1 -1
- package/assets/esri/core/workers/chunks/636e9c4ac1f9ae98f9d1.js +1 -0
- package/assets/esri/core/workers/chunks/654f5441227579d2b6b4.js +1 -0
- package/assets/esri/core/workers/chunks/692f0093c444fcc752b5.js +1 -0
- package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +1 -0
- package/assets/esri/core/workers/chunks/6a7de221cea4426cb490.js +1 -0
- package/assets/esri/core/workers/chunks/7030a4d0714a35995a58.js +1 -0
- package/assets/esri/core/workers/chunks/72d20d3957d612f86431.js +1 -0
- package/assets/esri/core/workers/chunks/7862abd24fb5c3b12e6b.js +1 -0
- package/assets/esri/core/workers/chunks/7a0b4dc0cda190367a39.js +1 -0
- package/assets/esri/core/workers/chunks/{5eec1c1162779574f46e.js → 7c75a8ee266c36baa902.js} +1 -1
- package/assets/esri/core/workers/chunks/{ab1660f5f8a5268c2fac.js → 84038dd85005fea413eb.js} +1 -1
- package/assets/esri/core/workers/chunks/849f446c718e892f39ce.js +1 -0
- package/assets/esri/core/workers/chunks/{8ac2098ecdc40ad41055.js → 8502274806ea52308822.js} +1 -1
- package/assets/esri/core/workers/chunks/865cebc5c982c040ab6f.js +1 -0
- package/assets/esri/core/workers/chunks/{76196c414e48834f7b92.js → 8f008eedb11685ee2048.js} +1 -1
- package/assets/esri/core/workers/chunks/90d797ab82d4a68ba32f.js +1 -0
- package/assets/esri/core/workers/chunks/9184c947cdefe06bf551.js +1 -0
- package/assets/esri/core/workers/chunks/9976eaa81085c0d17e14.js +1 -0
- package/assets/esri/core/workers/chunks/{177f353ce72133e2eeed.js → 9c2436464b7dfd666678.js} +1 -1
- package/assets/esri/core/workers/chunks/a125650edbed802e419a.js +1 -0
- package/assets/esri/core/workers/chunks/{23fd4de56de352f63e2d.js → a2196a49f89d57a0a1c7.js} +1 -1
- package/assets/esri/core/workers/chunks/ad21757d78e372fa2ed6.js +1 -0
- package/assets/esri/core/workers/chunks/b01688ccc29d33bfc82d.js +1 -0
- package/assets/esri/core/workers/chunks/b5eff28cf482d920b9ea.js +1 -0
- package/assets/esri/core/workers/chunks/{04ecf15524ff3838c01c.js → ba4520ddcb6a49988da6.js} +1 -1
- package/assets/esri/core/workers/chunks/be55771758e4bcef0976.js +1 -0
- package/assets/esri/core/workers/chunks/bead830a677690eeb6fb.js +1 -0
- package/assets/esri/core/workers/chunks/c131e0dd180a4c10e12e.js +1 -0
- package/assets/esri/core/workers/chunks/c1cf3edce15f09648eb4.js +1 -0
- package/assets/esri/core/workers/chunks/c4f78a481f43cfae7b63.js +1 -0
- package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +1 -0
- package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +1 -0
- package/assets/esri/core/workers/chunks/c9feffb9884cfed52c4b.js +1 -0
- package/assets/esri/core/workers/chunks/cc97e4fd0dacad970a23.js +1 -0
- package/assets/esri/core/workers/chunks/ce324dde6d7daea33638.js +1 -0
- package/assets/esri/core/workers/chunks/d1d6154b4af1c9cc497b.js +1 -0
- package/assets/esri/core/workers/chunks/d3c3fb079ad97970f834.js +1 -0
- package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +1 -0
- package/assets/esri/core/workers/chunks/dc2f93453dfa40f623ab.js +1 -0
- package/assets/esri/core/workers/chunks/dcf6024dc19428ff2b9d.js +1 -0
- package/assets/esri/core/workers/chunks/dd30b02c5978c1c5f511.js +1 -0
- package/assets/esri/core/workers/chunks/de3f140058aa0b907b65.js +1 -0
- package/assets/esri/core/workers/chunks/df375d1b0dab5ecbd1be.js +1 -0
- package/assets/esri/core/workers/chunks/{ef2c3febcceedc44b3ac.js → dfd4782b11d6fdca0492.js} +1 -1
- package/assets/esri/core/workers/chunks/{48cc58890fddbcf69cef.js → e121d15b883184ee83e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{67e06d606c7fd2064adf.js → e2c6cd8dac01e129ccfe.js} +1 -1
- package/assets/esri/core/workers/chunks/e3b212f8af448ec29eef.js +1 -0
- package/assets/esri/core/workers/chunks/e4042e43f0081fe49f7b.js +1 -0
- package/assets/esri/core/workers/chunks/e480e7d5f40049a2053b.js +1 -0
- package/assets/esri/core/workers/chunks/eaab787a5f2445be5e5a.js +1 -0
- package/assets/esri/core/workers/chunks/edd36a1fc80b1d29907e.js +1 -0
- package/assets/esri/core/workers/chunks/ee0dc906cc7979080329.js +1 -0
- package/assets/esri/core/workers/chunks/f07fb9b3fa30d7ee1681.js +1 -0
- package/assets/esri/core/workers/chunks/f09bc86cd52224febfcb.js +1 -0
- package/assets/esri/core/workers/chunks/{037c67ef5c4398d5954d.js → f2dab9fcd90ce38ae3d1.js} +1 -1
- package/assets/esri/core/workers/chunks/f39c700f3db7db52b522.js +1 -0
- package/assets/esri/core/workers/chunks/f3b4159c0722df8ffe13.js +1 -0
- package/assets/esri/core/workers/chunks/f3dc0bc0e00635855a7a.js +1 -0
- package/assets/esri/core/workers/chunks/f45064066e1ab041a0b2.js +1 -0
- package/assets/esri/core/workers/chunks/{dc7aa0a1eb6c6e361f9f.js → f7398cfd8bbd041bd635.js} +1 -1
- package/assets/esri/core/workers/chunks/f9dc38761b314d33890f.js +1 -0
- package/assets/esri/core/workers/chunks/fe6dcb21570395e46ce8.js +1 -0
- package/assets/esri/core/workers/chunks/{9c4961213ac6ec283dd9.js → fefdd10bdd5a4c8d8ed0.js} +44 -47
- package/assets/esri/core/workers/chunks/ffe49d9e7df081bef4a5.js +1 -0
- package/assets/esri/themes/base/_core.scss +0 -2
- 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/chunks/Component.glsl.js +48 -48
- package/chunks/EmissionComposite.glsl.js +1 -1
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/GaussianSplatDepth.glsl.js +15 -7
- package/chunks/GaussianSplatShadow.glsl.js +14 -4
- package/config.d.ts +12 -9
- package/config.js +1 -1
- package/form/FormTemplate.d.ts +1 -1
- package/form/elements/AttachmentElement.d.ts +2 -0
- package/form/elements/FieldElement.d.ts +2 -2
- package/form/elements/FieldElement.js +1 -1
- package/form/elements/RelationshipElement.d.ts +1 -1
- package/form/elements/TextElement.d.ts +2 -2
- package/form/elements/UtilityNetworkAssociationsElement.d.ts +1 -1
- package/form/elements/inputs/inputUtils.js +1 -1
- package/form/elements/inputs/types.d.ts +19 -0
- package/form/elements/inputs.d.ts +3 -2
- package/form/elements/inputs.js +1 -1
- package/interfaces.d.ts +0 -14
- package/kernel.js +1 -1
- package/layers/VideoLayer.d.ts +5 -5
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/rotationUtils.js +2 -0
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/save/parquetLayerUtils.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/package.json +2 -2
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSource.js +1 -1
- package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
- package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +2 -0
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelStore.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileAgent.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +23 -26
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +18 -21
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +10 -12
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +22 -25
- package/views/3d/webgl-engine/effects/RenderPluginContext.js +2 -0
- 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/applyEmissiveGlow.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +30 -35
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/EmissiveTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +62 -53
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/VideoView.d.ts +10 -0
- package/views/VideoView.js +1 -1
- package/views/layers/LayerView.d.ts +10 -2
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +2 -2
- package/widgets/Editor/EditorViewModel.d.ts +10 -12
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
- package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +2 -0
- package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/010f57ec7fdbedf78d02.js +0 -1
- package/assets/esri/core/workers/chunks/03f33cb78b5405ab7e23.js +0 -1
- package/assets/esri/core/workers/chunks/0487e1d7a7cecf7c1c25.js +0 -1
- package/assets/esri/core/workers/chunks/09300e74e5b014ce6269.js +0 -1
- package/assets/esri/core/workers/chunks/0d9c4c6c571ce26d356b.js +0 -1
- package/assets/esri/core/workers/chunks/112ed86f812e4400a7e0.js +0 -1
- package/assets/esri/core/workers/chunks/151e5799ede763a03ee2.js +0 -1
- package/assets/esri/core/workers/chunks/173f89c55a5c79ff065b.js +0 -1
- package/assets/esri/core/workers/chunks/2447d2e2a4a3ab8fcf94.js +0 -1
- package/assets/esri/core/workers/chunks/2a36fe3f3f257a779a1b.js +0 -1
- package/assets/esri/core/workers/chunks/2a97268000c6d03ef720.js +0 -1
- package/assets/esri/core/workers/chunks/2cf8172be83b10b11bdc.js +0 -1
- package/assets/esri/core/workers/chunks/2df37a9a95ceebb87a5f.js +0 -1
- package/assets/esri/core/workers/chunks/2e00c155e447e4930442.js +0 -1
- package/assets/esri/core/workers/chunks/2f91fd61019d2a37476d.js +0 -1
- package/assets/esri/core/workers/chunks/30af63b3b750142faadb.js +0 -1
- package/assets/esri/core/workers/chunks/3a47fc97c400fca2c736.js +0 -1
- package/assets/esri/core/workers/chunks/3cd04d23b73beaf79650.js +0 -1
- package/assets/esri/core/workers/chunks/426b4eb500fdfe9df325.js +0 -1
- package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +0 -1
- package/assets/esri/core/workers/chunks/47c97640ec525676918b.js +0 -1
- package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +0 -1
- package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +0 -1
- package/assets/esri/core/workers/chunks/4cb751dc8d00bdaeb04c.js +0 -1
- package/assets/esri/core/workers/chunks/518ab22f80c3300bcfff.js +0 -1
- package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +0 -1
- package/assets/esri/core/workers/chunks/58609bf94f72bc4f1952.js +0 -1
- package/assets/esri/core/workers/chunks/586a929bc037e23857af.js +0 -1
- package/assets/esri/core/workers/chunks/5c7780f804d789cb37f5.js +0 -1
- package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +0 -1
- package/assets/esri/core/workers/chunks/603fdbbe9534c614928f.js +0 -1
- package/assets/esri/core/workers/chunks/611e3cdf67283c11576f.js +0 -1
- package/assets/esri/core/workers/chunks/6431480ba0fa8c8d487f.js +0 -1
- package/assets/esri/core/workers/chunks/652faf4359ac072c5dde.js +0 -1
- package/assets/esri/core/workers/chunks/65c98f3449044fa4fd79.js +0 -1
- package/assets/esri/core/workers/chunks/6b9961261241fdce0e94.js +0 -1
- package/assets/esri/core/workers/chunks/6dfe96b056bec30068df.js +0 -1
- package/assets/esri/core/workers/chunks/6f897b4e7ddd1dd1672b.js +0 -1
- package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +0 -1
- package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +0 -29
- package/assets/esri/core/workers/chunks/7393f63043a1da3d05a6.js +0 -1
- package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +0 -1
- package/assets/esri/core/workers/chunks/75d551a449bba61ce238.js +0 -1
- package/assets/esri/core/workers/chunks/76e27e36050a3dd9d249.js +0 -1
- package/assets/esri/core/workers/chunks/76f877e2d2493d56afab.js +0 -1
- package/assets/esri/core/workers/chunks/7748c2886d0122b40eeb.js +0 -1
- package/assets/esri/core/workers/chunks/78643f116677950ea29a.js +0 -1
- package/assets/esri/core/workers/chunks/78fbe330f16bdbdb886e.js +0 -1
- package/assets/esri/core/workers/chunks/7e0f04a5038e2a4f6e4b.js +0 -1
- package/assets/esri/core/workers/chunks/7f16ae01ccd9b6114d1c.js +0 -1
- package/assets/esri/core/workers/chunks/90153b5230b3a4985c14.js +0 -1
- package/assets/esri/core/workers/chunks/9189dfe19a2a2ccd5173.js +0 -1
- package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +0 -1
- package/assets/esri/core/workers/chunks/98be2f621801e230aa01.js +0 -1
- package/assets/esri/core/workers/chunks/99f51d5d9da6e9bfc430.js +0 -1
- package/assets/esri/core/workers/chunks/9aebe876b1a2fb075f9c.js +0 -1
- package/assets/esri/core/workers/chunks/9b6929faf649e81265fb.js +0 -1
- package/assets/esri/core/workers/chunks/9dd48e75b4e8d9811d81.js +0 -1
- package/assets/esri/core/workers/chunks/a163c6005aba3378edaa.js +0 -1
- package/assets/esri/core/workers/chunks/a8286febe371dc186aaa.js +0 -1
- package/assets/esri/core/workers/chunks/acb265a22be5e12f38e5.js +0 -1
- package/assets/esri/core/workers/chunks/b12acf1f694f82e00df9.js +0 -1
- package/assets/esri/core/workers/chunks/b83cef2d3f528726d492.js +0 -1
- package/assets/esri/core/workers/chunks/b9596d862da1ec342cd3.js +0 -1
- package/assets/esri/core/workers/chunks/bc1fcc9c897461e68e29.js +0 -1
- package/assets/esri/core/workers/chunks/bdc221d94300c225665a.js +0 -1
- package/assets/esri/core/workers/chunks/be97a629e2ae4d13ceb3.js +0 -1
- package/assets/esri/core/workers/chunks/bfb39590c548188f5052.js +0 -1
- package/assets/esri/core/workers/chunks/c2318c014e97ba519be8.js +0 -1
- package/assets/esri/core/workers/chunks/c62237c344e341619341.js +0 -1
- package/assets/esri/core/workers/chunks/cdb5c26fed7d9a97db49.js +0 -1
- package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +0 -1
- package/assets/esri/core/workers/chunks/cea0db3ee326f60610eb.js +0 -1
- package/assets/esri/core/workers/chunks/d7f2f1708d2a2668676c.js +0 -1
- package/assets/esri/core/workers/chunks/daf9b691817e83a11f3c.js +0 -1
- package/assets/esri/core/workers/chunks/db41490bd39d863305bf.js +0 -1
- package/assets/esri/core/workers/chunks/ddc95cdac6c06fc4794c.js +0 -1
- package/assets/esri/core/workers/chunks/df26ec0b508cf4716e0a.js +0 -1
- package/assets/esri/core/workers/chunks/e11159e3dc3353b27c57.js +0 -1
- package/assets/esri/core/workers/chunks/e4a57a0a9629faafd6c6.js +0 -1
- package/assets/esri/core/workers/chunks/ebc1a2ef3aed8aa29424.js +0 -1
- package/assets/esri/core/workers/chunks/ec1c4d66142b6efb0e8b.js +0 -1
- package/assets/esri/core/workers/chunks/ef12fa3574d4cbf8b084.js +0 -1
- package/assets/esri/core/workers/chunks/f2d56f5c15d5977e1d19.js +0 -1
- package/assets/esri/core/workers/chunks/f7bfa3d33b05b250ce33.js +0 -1
- package/assets/esri/core/workers/chunks/f905f1a1aa4c123cbe83.js +0 -1
- package/assets/esri/core/workers/chunks/fc139f251dc0523074e7.js +0 -1
- package/assets/esri/themes/base/widgets/_VideoPlayer.scss +0 -129
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ar.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.bg.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.bs.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ca.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.cs.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.da.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.de.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.el.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.en.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.es.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.et.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.fi.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.fr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.he.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.hr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.hu.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.id.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.it.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ja.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ko.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.lt.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.lv.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.nl.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.no.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.pl.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.pt-BR.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.pt-PT.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ro.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ru.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sk.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sl.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sv.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.th.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.tr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.uk.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.vi.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-CN.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-HK.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-TW.json +0 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +0 -232
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +0 -2
- package/widgets/VideoPlayer/components/MetadataSection.js +0 -2
- package/widgets/VideoPlayer/components/PlayerActionsGroup.js +0 -2
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +0 -2
- package/widgets/VideoPlayer/components/SettingsButton.js +0 -2
- package/widgets/VideoPlayer/css.js +0 -2
- package/widgets/VideoPlayer.d.ts +0 -119
- package/widgets/VideoPlayer.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8245],{11006(e,t,i){function r(e,t,i,r,s){n(e,t,i||0,r||e.length-1,s||a)}function n(e,t,i,r,a){for(;r>i;){if(r-i>600){var l=r-i+1,o=t-i+1,u=Math.log(l),d=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*d*(l-d)/l)*(o-l/2<0?-1:1);n(e,t,Math.max(i,Math.floor(t-o*d/l+c)),Math.min(r,Math.floor(t+(l-o)*d/l+c)),a)}var h=e[t],f=i,p=r;for(s(e,i,t),a(e[r],h)>0&&s(e,i,r);f<p;){for(s(e,f,p),f++,p--;a(e[f],h)<0;)f++;for(;a(e[p],h)>0;)p--}0===a(e[i],h)?s(e,i,p):s(e,++p,r),p<=t&&(i=p+1),t<=p&&(r=p-1)}}function s(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function a(e,t){return e<t?-1:+(e>t)}i.d(t,{q:()=>r})},69052(e,t,i){i.d(t,{hr:()=>n});var r=i(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return s(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,r.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 s(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);let i=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(r)?i:r}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function s(e,t,i,r,n=0,s=!1){return(r-=n)<t?r+=a(e,t-r):r>i&&(r-=a(e,r-i)),s&&r===i&&(r=t),r+n}function a(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const l=new n(0,2*Math.PI),o=(new n(-Math.PI,Math.PI),new n(0,360));i.d(t,["ie",0,o,"uC",0,l])},18370(e,t,i){i.d(t,{z:()=>n});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function n(e){return new r(e)}},44123(e,t,i){i.d(t,{WhereClauseCache:()=>s});var r=i(66344),n=i(89696);class s{constructor(e,t){this._cache=new r.q(e),this._invalidCache=new r.q(t)}get(e,t){let i=`${t?.uid}:${e}`,r=this._cache.get(i);if(r)return r;if(null!=this._invalidCache.get(i))return null;try{let r=n.A.create(e,{fieldsIndex:t});return this._cache.put(i,r),r}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){let i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},52039(e,t,i){i.d(t,{O7:()=>h,el:()=>u});var r=i(69052),n=(i(49186),i(18370)),s=i(17676),a=(i(5443),i(39829)),l=(i(82799),i(16930)),o=(i(80754),i(21325));async function u(e,t,i){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(i=t);let r=null;for(let t of e)r??=t?.spatialReference;if(!r)return e;let n=(0,o.Vp)(r);if(!n)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(n);return["xmin"in t?t:new a.A(t)]}let[l,u]=n.valid,h=!1;for(let t of e){if(!t)continue;if("point"===t.type){h||=t.x>=u,h||=t.x<=l;continue}let{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=u,h||=e.xmin<=l,h||=e.xmax>=u,h||=e.xmax<=l}if(!h)return e;let[{foldInto360Range:f},p]=await(0,s.qr)(Promise.all([d.getImportPromise(),c.getImportPromise()]),i),m=p.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=p.fromGeometry(e),i=p.toGeometry(f(t,m),r);return"extent"===e.type&&1===i?.rings.length?i.extent:i})}const d=(0,n.z)(()=>i.e(4144).then(()=>i(4144)).then(e=>e.load().then(()=>e))),c=(0,n.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(1550)]).then(()=>i(78125)));function h(e,t,i){let r=(0,o.Vp)(i);if(null==r)return e;let[n,s]=r.valid,a=2*s,l=0,u=0;t>s?l=Math.ceil(Math.abs(t-s)/a):t<n&&(l=-Math.ceil(Math.abs(t-n)/a)),e>s?u=Math.ceil(Math.abs(e-s)/a):e<n&&(u=-Math.ceil(Math.abs(e-n)/a));let d=e+(l-u)*a,c=d-t;return c>s?d-=a:c<n&&(d+=a),d}function f(e){let t=(0,o.Vp)(e);if(null==t)return null;let[i,n]=t.valid;return new r.hr(i,n)}const p=f(l.A.WGS84);f(l.A.WebMercator),i.d(t,["Y_",0,p])},80754(e,t,i){i.d(t,{kS:()=>u,kd:()=>o});var r=i(82799),n=i(16930),s=i(60408),a=i(52006);const l={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,a.Ed)(e))for(let i of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of i)if((0,a.aO)(e)){let[i,r]=e.c;i[0]+=t,r[0]+=t}else if((0,a.FG)(e)){let[i,r]=e.a;i[0]+=t,r[0]+=t}else if((0,a.n1)(e)){let[i,r,n]=e.b;i[0]+=t,r[0]+=t,n[0]+=t}else e[0]+=t;for(let i of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(let e of i)e[0]+=t;return e}i.d(t,["j7",0,l])},62577(e,t,i){function r(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?[0,0,0,0]:[e.extent.xmin,e.extent.ymax,e.extent.zmin??0,e.extent.mmin??0]}:null}function n(e){if(function(e){return"lowerLeft"===e.originPosition&&4===e.scale.length&&4===e.translate.length}(e))return e;let{originPosition:t,scale:i,translate:r}=e,n=i[0]??1,s=i[1]??1;return{originPosition:"lowerLeft",scale:[n,"lowerLeft"===t?s:-s,i[2]??1,i[3]??1],translate:[r[0]??0,r[1]??0,r[2]??0,r[3]??0]}}function s({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 l({scale:e,translate:t},i){return i*e[0]+t[0]}function o({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 d({scale:e,translate:t},i){return i?i*e[3]+t[3]:0}function c(e,t){return e&&t?m:e&&!t?f:!e&&t?p:h}i.d(t,{$X:()=>_,B2:()=>a,Gy:()=>g,IE:()=>s,P5:()=>T,Q1:()=>n,SW:()=>x,Tr:()=>v,VV:()=>r});const h=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],n=l(e,r[0]),s=o(e,r[1]);i[0]=[n,s];let{scale:a,originPosition:u}=e,d=a[0],c="lowerLeft"===u?a[1]:-a[1];for(let e=1;e<t.length;e++){let[r,a]=t[e];n+=d*r,s+=c*a,i[e]=[n,s]}return i},f=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],n=l(e,r[0]),s=o(e,r[1]);i[0]=[n,s,u(e,r[2])];let{scale:a,originPosition:d}=e,c=a[0],h="lowerLeft"===d?a[1]:-a[1];for(let r=1;r<t.length;r++){let[a,l,o]=t[r];n+=c*a,s+=h*l,i[r]=[n,s,u(e,o)]}return i},p=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],n=l(e,r[0]),s=o(e,r[1]);i[0]=[n,s,d(e,r[2])];let{scale:a,originPosition:u}=e,c=a[0],h="lowerLeft"===u?a[1]:-a[1];for(let r=1;r<t.length;r++){let[a,l,o]=t[r];n+=c*a,s+=h*l,i[r]=[n,s,d(e,o)]}return i},m=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],n=l(e,r[0]),s=o(e,r[1]);i[0]=[n,s,u(e,r[2]),d(e,r[3])];let{scale:a,originPosition:c}=e,h=a[0],f="lowerLeft"===c?a[1]:-a[1];for(let r=1;r<t.length;r++){let[a,l,o,c]=t[r];n+=h*a,s+=f*l,i[r]=[n,s,u(e,o),d(e,c)]}return i};function y(e,t,i){let r=Array(i.length);for(let n=0;n<i.length;n++)r[n]=t(e,i[n]);return r}function g(e,t,i){let r=n(e);return t.x=s(r,i.x),t.y=a(r,i.y),null!=i.z&&(t.z=function({scale:e,translate:t},i){return Math.round(((i??0)-t[2])/e[2])}(r,i.z)),null!=i.m&&(t.m=function({scale:e,translate:t},i){return i?Math.round((i-t[3])/e[3]):0}(r,i.m)),t}function x(e,t,i,r=i?.hasZ??!1,s=i?.hasM??!1){if(null!=i){let a=n(e);t.points=c(r,s)(a,i.points),t.hasZ=r,t.hasM=s}return t}function v(e,t,i,r=null!=i?.z,s=null!=i?.m){if(null==i)return t;let a=n(e);return t.x=l(a,i.x),t.y=o(a,i.y),r&&(t.z=u(a,i.z)),s&&(t.m=d(a,i.m)),t}function _(e,t,i,r=i?.hasZ??!1,s=i?.hasM??!1){return null!=i&&(t.rings=y(n(e),c(r,s),i.rings),t.hasZ=r,t.hasM=s),t}function T(e,t,i,r=i?.hasZ??!1,s=i?.hasM??!1){return null!=i&&(t.paths=y(n(e),c(r,s),i.paths),t.hasZ=r,t.hasM=s),t}},43334(e,t,i){i.d(t,{N3:()=>l,Om:()=>a});var r=i(69397),n=i(27647),s=i(92722);class a{constructor(e,t,i,r,n=0,s=null,a=null){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=r,this.displayId=n,this.distance=s,this.vertexCount=a}static fromJSON(e){let t=e.geometry?s.A.fromJSON(e.geometry):null,i=e.centroid?s.A.fromJSON(e.centroid):null,r=e.objectId;return new a(t,e.attributes,i,r,void 0,e.distance,e.vertexCount)}weakClone(){return new a(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new a(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(e){return this.centroid??=(0,n.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,r.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(e){return!!e.geometry?.coords?.length}},58512(e,t,i){i.d(t,{A:()=>r});class r{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let e=new r;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722(e,t,i){i.d(t,{A:()=>n});var r=i(69397);class n{constructor(e=[],t=[],i=!1,r=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=i,this.hasM=r}static fromJSON({lengths:e,coords:t,hasZ:i,hasM:r}){return new n(e,t,i||!1,r||!1)}static fromRect([e,t,i,r]){let s=i-e,a=r-t;return new n([5],[e,t,s,0,0,a,-s,0,0,-a])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let i of this.lengths){if(i<3)continue;let{stride:r}=this,n=this.coords[r*t],s=this.coords[r*t+1];for(let a=1;a<i;a+=1){let i=r*(t+a),l=this.coords[i],o=this.coords[i+1];e+=-.5*(l-n)*(o+s),n=l,s=o}t+=i}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:i}=this;for(let r of this.lengths){for(let n=0;n<r;n++){let r=i*(t+n);e(this.coords[r],this.coords[r+1])}t+=r}}deltaDecode(){let e=this.clone(),{coords:t,lengths:i}=e,r=0,{stride:n}=this;for(let e of i){for(let i=1;i<e;i++){let e=n*(r+i);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}r+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:i,size:r}=this,s=this.coords.slice(0,r*i);return e?(e.set(s),new n(t,e,this.hasZ,this.hasM)):new n(t,Array.from(s),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let i=Array(t*e);for(let t=0,r=0;t<i.length;t+=e)i[r++]=this.coords[t],i[r++]=this.coords[t+1];return new n(this.lengths,i,!1,!1)}}},27647(e,t,i){i.d(t,{Q:()=>s});var r=i(92722);function n(e,t){return e?t?4:3:t?3:2}function s(e){if(null==e||!e?.lengths.length)return null;let{lengths:t,coords:i,stride:n,hasZ:s,hasM:o}=e,u=new r.A([],[],s,!1),d=u.coords,c=[],h=s?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],f=0;for(let e of t){let t=a(h,i,f,e,s,o);t&&c.push(t),f+=e*n}if(c.sort((e,t)=>{let i=e[2]-t[2];return 0===i&&s&&(i=e[4]-t[4]),i}),c.length){let e=6*c[0][2];d[0]=c[0][0]/e,d[1]=c[0][1]/e,s&&(e=6*c[0][4],d[2]=0===e?0:c[0][3]/e),(d[0]<h[0]||d[0]>h[1]||d[1]<h[2]||d[1]>h[3]||s&&(d[2]<h[4]||d[2]>h[5]))&&(d.length=0)}if(!d.length){let r=e.lengths[0]?l(i,0,t[0],s,o):null;if(!r)return null;d[0]=r[0],d[1]=r[1],s&&(d[2]=r[2]??0)}return u}function a(e,t,i,r,s,a){let l=n(s,a),o=i,u=i+l,d=0,c=0,h=0,f=0,p=0;for(let i=0,n=r-1;i<n;i++,o+=l,u+=l){let i=t[o],r=t[o+1],n=t[o+2],a=t[u],l=t[u+1],m=t[u+2],y=i*l-a*r;f+=y,d+=(i+a)*y,c+=(r+l)*y,s&&(y=i*m-a*n,h+=(n+m)*y,p+=y),i<e[0]&&(e[0]=i),i>e[1]&&(e[1]=i),r<e[2]&&(e[2]=r),r>e[3]&&(e[3]=r),s&&(n<e[4]&&(e[4]=n),n>e[5]&&(e[5]=n))}if(f>0&&(f*=-1),p>0&&(p*=-1),!f)return null;let m=[d,c,.5*f];return s&&(m[3]=h,m[4]=.5*p),m}function l(e,t,i,r,s){let a=n(r,s),l=t,h=t+a,f=0,p=0,m=0,y=0;for(let t=0,n=i-1;t<n;t++,l+=a,h+=a){let t=e[l],i=e[l+1],n=e[l+2],s=e[h],a=e[h+1],g=e[h+2],x=r?u(t,i,n,s,a,g):o(t,i,s,a);if(x)if(f+=x,r){let e=c(t,i,n,s,a,g);p+=x*e[0],m+=x*e[1],y+=x*e[2]}else{let e=d(t,i,s,a);p+=x*e[0],m+=x*e[1]}}return f>0?r?[p/f,m/f,y/f]:[p/f,m/f]:i>0?r?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,i,r){let n=i-e,s=r-t;return Math.sqrt(n*n+s*s)}function u(e,t,i,r,n,s){let a=r-e,l=n-t,o=s-i;return Math.sqrt(a*a+l*l+o*o)}function d(e,t,i,r){return[e+.5*(i-e),t+.5*(r-t)]}function c(e,t,i,r,n,s){return[e+.5*(r-e),t+.5*(n-t),i+.5*(s-i)]}},75752(e,t,i){i.d(t,{do:()=>B,qo:()=>L,Wc:()=>q});var r=i(4576),n=i(21818),s=i(49186),a=(i(44208),i(4718)),l=i(97768),o=i(17676),u=i(86211),d=i(12195),c=i(99917),h=i(70328),f=i(19419),p=i(537),m=i(60408),y=i(65864),g=i(52039),x=i(21325),v=i(90708),_=i(29441),T=i(51441),S=i(31464);class F{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;let e=1e3*this._purgeInterval,t=performance.now()-e;for(let[i,r]of this._storage){if(!(r.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 w(t)),this._scheduleSweep()}get(e){let 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 I=0;class w{constructor(e){this.items=e,this.time=performance.now(),this.id=I++}}var R=i(99352),E=i(8384),A=i(58727),M=i(62660),b=i(43668);const C="unsupported-query";async function O(e,{fieldsIndex:t,geometryType:i,spatialReference:r,availableFields:n}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new s.A(C,"Unsupported query options",{query:e});return N(t,n,e),function(e,t,i){let{outStatistics:r,groupByFieldsForStatistics:n,having:a}=i,l=n?.length,o=r?.length;if(a){if(!l||!o)throw new s.A(C,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,_.eD)(e,t,a,r,i)}if(o){if(!(0,_._d)(r))return;let a=(0,_.g9)(e,r,n);(0,_.MG)(e,t,a,{expressionName:"statistics",query:i});for(let n of r){let{onStatisticField:r,statisticType:a}=n;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in n))e.get(r)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,_.MG)(e,t,[r],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:V,query:i});else{let{statisticParameters:e}=n;if(!e)throw new s.A(C,"statisticParameters should be set for percentile type",{definition:n,query:i})}}}}(t,n,e),Promise.all([(0,M.c0)(e,i,r),(0,S.Nk)(r,e.outSR)]).then(()=>e)}function N(e,t,i){let{returnDistinctValues:r,outStatistics:n}=i,a=n?n.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){let r=" asc",n=" desc",s=i.orderByFields.map(e=>{let t=e.toLowerCase();return t.includes(r)?t.split(r)[0]:t.includes(n)?t.split(n)[0]:e}).filter(e=>!a.includes(e));(0,_.MG)(e,t,s,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,_.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(r)throw new s.A(C,"outFields should be specified for returnDistinctValues",{query:i});(0,_.SN)(e,t,i.where,i)}const V=new Set([..._.vl,..._.VW]);async function z(e,t,i,r){let n=[];if(i.valueExpression){let{arcadeUtils:e}=await(0,b.l)();n=e.extractFieldNames(i.valueExpression)}if(i.field&&n.push(i.field),i.field2&&n.push(i.field2),i.field3&&n.push(i.field3),i.normalizationField&&n.push(i.normalizationField),!n.length&&!i.valueExpression)throw new s.A(C,"field or valueExpression is required",{params:i});(0,_.MG)(e,t,n,{expressionName:"statistics",query:r})}var P=i(86420),G=i(95466),D=i(92359);class B{constructor(e){this._changeHandle=null,this.capabilities={query:R.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 F,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,d.W)(e.fieldsIndex)?e.fieldsIndex:G.A.fromJSON(e.fieldsIndex),this.availableFields=!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?new Set(this.fieldsIndex.fields.map(e=>e.name)):new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),this._frameTask=e.scheduler&&e.priority?e.scheduler.registerTask(e.priority):D.nu}destroy(){this._changeHandle=(0,l.xt)(this._changeHandle),this._frameTask=(0,l.xt)(this._frameTask),this._clearCache(),(0,l.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){let i=(0,o.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){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){let i=(0,o.Mq)(t);if(!this.timeInfo?.trackIdField)throw new s.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){let i=(0,o.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){let i=(0,o.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),r)}async executeQueryForUniqueValues(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),r)}async executeQueryForClassBreaks(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),r)}async executeQueryForHistogram(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),r)}async executeQueryForSnapping(e,t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){let t=(0,o.Mq)(e);this._timeExtentPromise||=(0,P.W)(this.timeInfo,this.featureStore);let[i,r]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,o.Te)(t),{fullExtent:i,timeExtent:r}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{let t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new E.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{let 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){let t=e.outSR;try{let i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;let r=i.size;if(!r)return{count:0,extent:null};let n=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:r,extent:n}}catch(e){if(e===A.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{let t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;let i=t.items,r=new Set;for(let e of i)r.add(t.featureAdapter.getObjectId(e));return r}catch(e){if(e===A.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{let 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 E.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){let 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 s.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;let 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 E.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){let{field:i,normalizationField:r,valueExpression:n}=t,s=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:n});return yield,await s.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){let{field:i,field2:r,field3:n,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:r,field3:n,valueExpression:s});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){let{field:i,normalizationField:r,valueExpression:n}=t,s=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:n});return yield,await s.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){let{field:i,normalizationField:r,valueExpression:n}=t,s=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:n});return yield,await s.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){let{point:i,distance:r,returnEdge:n,vertexMode:s}=e;if(!n&&"none"===s)return{candidates:[]};let l=(0,a.o8)(e.query);l=await(0,A.T2)(l,this.definitionExpression,this.spatialReference),yield,l=await O(l,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;let o=!(0,x.aI)(i.spatialReference,this.spatialReference);o&&(await(0,S.Nk)(i.spatialReference,this.spatialReference),yield);let u="number"==typeof r?r:r.x,d="number"==typeof r?r:r.y,c={xmin:i.x-u,xmax:i.x+u,ymin:i.y-d,ymax:i.y+d,spatialReference:i.spatialReference},h=o?(0,S.Cv)(c,this.spatialReference):c;if(!h)return{candidates:[]};let[f]=await(0,g.el)((0,y.rS)(i),{signal:t});yield;let[p]=await(0,g.el)((0,y.rS)(h),{signal:t});if(yield,null==f||null==p)return{candidates:[]};let m=await this._searchFeatures(L(p.toJSON()));yield;let v=new E.G(m,l,this);this._executeObjectIdsQuery(v),yield,this._executeTimeQuery(v),yield,this._executeAttributesQuery(v),yield,yield*this._executeGeometryQueryForSnapping(v),yield;let _=f.toJSON(),T=o?(0,S.Cv)(_,this.spatialReference):_,F=o?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:r;return v.createSnappingResponse({...e,point:T,distance:F},l.returnZ,i.spatialReference)}async _getBounds(e,t,i){let r=(0,h.hZ)((0,h.vt)(),h.qv);return await this.featureStore.forEachBounds(e,e=>(0,h.RF)(r,e)),q(r,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 E.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){let e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,n.z)(e))}let 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};let i=yield*this._executeSceneFilterQuery(e);yield;let r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),r}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;let{outSR:t,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,s=e.sceneFilter.geometry,a=null==n||(0,x.aI)(n,s.spatialReference)?s:(0,S.Cv)(s,n);if(!a)return null;let l=i||r,o=(0,x.fn)(t)&&!(0,x.aI)(this.spatialReference,t)&&l?async e=>this._project(e,t):e=>e;yield;let u=this.featureAdapter,d=await this._searchFeatures(L(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!d.length)return null;let t=new Set;for(let e of d)t.add(u.getObjectId(e));let i=await this._getAllFeatures();yield;let r=await(0,M.xt)("esriSpatialRelDisjoint",a,this.geometryType);yield;let n=yield*this._runSpatialFilter(i,e=>!t.has(u.getObjectId(e))||r(u.getGeometry(e)));return yield,await o(new E.G(n,e,this))}if(!d.length)return new E.G([],e,this);if(this._canExecuteSinglePass(a,e))return await o(new E.G(d,e,this));let c=await(0,M.xt)("esriSpatialRelContains",a,this.geometryType);yield;let h=yield*this._runSpatialFilter(d,e=>c(u.getGeometry(e)));return yield,await o(new E.G(h,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;let{geometry:i,outSR:n,returnGeometry:s,returnCentroid:a}=e,l=t?null:this._getCacheKey(e),o=l?this._cache.get(l):null;if(o)return new E.G(o,e,this);let u=(0,x.fn)(n)&&!(0,x.aI)(this.spatialReference,n),d=s||a,c=async e=>(u&&d&&await this._project(e,n),l&&this._cache.put(l,e.items),e),h=this.featureStore.featureSpatialReference,f=!i||null==h||(0,x.aI)(h,i.spatialReference)?i:(0,S.Cv)(i,h);if(!f)return await c(t??await this._getAllFeaturesQueryEngineResult(e));yield;let p=this.featureAdapter,m=await this._searchFeatures(L(i));yield;let y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await c(t??await this._getAllFeaturesQueryEngineResult(e));let i,r=new Set;for(let e of m)r.add(p.getObjectId(e));null==t?(yield,i=await this._getAllFeatures(),yield):i=t.items;let n=await(0,M.xt)(y,f,this.geometryType);yield;let s=yield*this._runSpatialFilter(i,e=>!r.has(p.getObjectId(e))||n(p.getGeometry(e)));return yield,await c(new E.G(s,e,this))}if(null!=t){let e=new r.vW;m=m.filter(i=>(0,r.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){let t=new E.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(f,e))return await c(new E.G(m,e,this));let g=await(0,M.xt)(y,f,this.geometryType);yield;let v=yield*this._runSpatialFilter(m,e=>g(p.getGeometry(e)));return yield,await c(new E.G(v,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;let t=new Set;for(let i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));let 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;let 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;let t=(0,P.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;let t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){let{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;let r=await(0,M.xt)(i,t.geometry,this.geometryType);yield;let n=this.featureAdapter;e.items=yield*this._runSpatialFilter(e.items,e=>r(n.getGeometry(e)))}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield,r=[];for(let n of e)t(n)&&r.push(n),i.madeProgress(),i.done&&(i=yield);return r}_filterLatest(e){let{trackIdField:t,startTimeField:i,endTimeField:r}=this.timeInfo,n=r||i,s=new Map,a=this.featureAdapter.getAttribute;for(let i of e.items){let e=a(i,t),r=a(i,n),l=s.get(e);(!l||r>a(l,n))&&s.set(e,i)}e.items=Array.from(s.values())}_getCacheKey(e){let{geometry:t,spatialRel:i,returnGeometry:r,returnCentroid:n,outSR:s,resultType:a,cacheHint:l}=e;if("tile"!==a&&!l)return null;let o=r||n,u=(0,x.fn)(s)&&!(0,x.aI)(this.spatialReference,s);return JSON.stringify(u&&o?[t,i,s]:[t,i])}_canExecuteSinglePass(e,t){let{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;let i=this.featureAdapter,r=(0,c.isLoaded)()?await this._getFullExtent():void 0,s=await(0,S.lK)(e.items.map(e=>(0,T.p)(this.geometryType,i.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:r});return e.items=(0,n.z)(s.map((t,r)=>i.cloneWithGeometry(e.items[r],(0,v.Ux)(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){let t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));let 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:r,spatialReference:n,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new s.A(C,"Unsupported query options",{query:e});return N(i,a,e),Promise.all([z(i,a,t,e),(0,M.c0)(e,r,n),(0,S.Nk)(n,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;let i=yield*this._executeSceneFilterQuery(e);yield;let r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),yield,r}catch(t){if(t!==A.v8)throw t;return new E.G([],e,this)}}get test(){}}function L(e){if((0,M.tC)(e)){if((0,m.ZC)(e))return[(0,f.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,f.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,p.Rg)((0,f.vt)(),e)]}function q(e,t,i,r,n){let s={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:r};n&&isFinite(e[2])&&isFinite(e[5])&&(s.zmin=e[2],s.zmax=e[5],s.hasZ=!0);let a=(0,S.Cv)(s,t,i);if(a.spatialReference=i,a.xmax-a.xmin===0){let e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){let e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(n&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){let e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},99352(e,t,i){i.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!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},"P",0,{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 r=i(4576),n=i(18370),s=i(4718),a=i(16930),l=i(12359),o=i(90634),u=i(62577),d=i(21325),c=i(46329),h=i(52006),f=i(88930),p=i(29441),m=i(51441),y=i(30524),g=i(1873),x=i(43668);class v{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;let r=e.outFields;if(r&&!r.includes("*")){this.outFields=r;let e=0;for(let t of r){let r=(0,p.Wq)(t),n=this.fieldsIndex.get(r),s=n?null:(0,p.j4)(r,i),a=n?n.name:(0,p.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:s})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){let t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){if(i)return this.featureAdapter.getAttribute(e,i.name);let r=t,n=null;return this._fieldDataCache.has(r)?n=this._fieldDataCache.get(r)?.clause:i||(n=(0,p.j4)(t,this.fieldsIndex),this._fieldDataCache.set(r,{alias:r,clause:n})),n?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){let r=t.normalizationType,n=t.normalizationTotal,s=this.fieldsIndex.get(t.field),a=(0,y.zD)(s)||(0,y.Ah)(s),l=(0,y.OH)(s);return e.map(e=>{let s=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(s=`${(0,g.gJ)(s)}${t.fieldDelimiter}${(0,g.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(s=`${s}${t.fieldDelimiter}${(0,g.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof s&&i&&(a?s=s?new Date(s).getTime():null:l&&(s=s?(0,f.rb)(s):null)),r&&Number.isFinite(s)){let i="field"===r&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;s=(0,g.zS)(s,r,i,n)}return s})}async getExpressionValues(e,t,i,r,n){let{arcadeUtils:s}=await(0,x.l)(),a=s.hasGeometryOperations(t);a&&await s.enableGeometryOperations();let l=s.createFunction(t),o=s.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map(e=>{let t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,m.p)(r.geometryType,this.featureAdapter.getGeometry(e)),spatialReference:i.spatialReference}:null},d=s.createExecContext(t,o,n);return s.executeFunction(l,d)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,p.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,p.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){let t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);let i={};for(let r of t){let{alias:t,clause:n}=this._fieldDataCache.get(r);i[t]=n?n.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;let t=this.outFields,i=[];if(t)for(let r of t){let{alias:t}=this._fieldDataCache.get(r);i.push(e[t])}else for(let t in e)i.push(e[t]);let r=`${(t||["*"]).join(",")}=${i.join(",")}`,n=this._returnDistinctMap.get(r)||0;return this._returnDistinctMap.set(r,++n),n>1?null:e}}var _=i(31464),T=i(58727);class S{constructor(e,t,i){this.objectId=e,this.target=t,this.distance=i}}class F extends S{constructor(e,t,i){super(e,t,i),this.type="vertex"}}class I extends S{constructor(e,t,i,r,n,s=!1,a=null){super(e,t,i),this.start=r,this.end=n,this.draped=s,this.curve=a,this.type="edge"}}var w=i(5834),R=i(59977),E=i(57231),A=i(11440),M=i(60909),b=(i(98623),i(34747));const C=(0,n.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(6491)]).then(()=>i(55666)));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(){let e=new v(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);let{groupByFieldsForStatistics:t,having:i,outStatistics:r}=this.query;if(!t?.length)return 1;let n=new Map,s=new Map,a=new Set;for(let l of r){let{statisticType:r}=l,o="exceedslimit"===r?void 0:l.onStatisticField;if(!s.has(o)){let i=[];for(let r of t){let t=this._getAttributeValues(e,r,this.items,n);i.push(t)}s.set(o,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}let u=s.get(o);for(let t in u){let{data:r,items:n}=u[t],s=r.join(",");(!i||e.validateItems(n,i))&&a.add(s)}}return a.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){let t=this.query.geometry;e.queryGeometry={spatialReference:this.query.outSR,...(0,d.fn)(this.query.outSR)&&!(0,d.aI)(t.spatialReference,this.query.outSR)?(0,_.Cv)(t,t.spatialReference,this.query.outSR):t}}return e}createSnappingResponse(e,t,i){let r=this.featureAdapter,{point:n}=e,s="number"==typeof e.distance?e.distance:e.distance.x,a="number"==typeof e.distance?e.distance:e.distance.y;function l(e,t){let i=(e-n.x)/s,r=(t-n.y)/a;return i*i+r*r}let o={candidates:[]},u="esriGeometryPolygon"===this.geometryType,d="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,f=this._getPointCreator(t,this.spatialReference,i),p=new z(null,0),m=new z(null,0),y={x:0,y:0,z:0};for(let e of this.items){let t=r.getObjectId(e),i=r.getGeometryWithCurves?.(e);if(null!=i){x(i,t);continue}let n=r.getGeometry(e);null!=n&&g(n,t)}return o.candidates.sort((e,t)=>e.distance-t.distance),o;function g(t,i){let{coords:r,stride:s}=t,a=t.isPoint?P:t.lengths;if(p.coords=r,m.coords=r,e.returnEdge){let e=0;for(let t=0;t<a.length;t++){let r=a[t],d=e;for(let t=0;t<r;t++,e+=s){if(!u&&t===r-1||(p.coordsIndex=e,m.coordsIndex=t===r-1?d:e+s,!V(y,n,p,m)))continue;let a=l(y.x,y.y);a<=1&&o.candidates.push(new I(i,f(y),Math.sqrt(a),f(p),f(m)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<a.length;t++){let r=a[t],n=e,d=m;d.coordsIndex=n;for(let t=0;t<r;t++,e+=s){if(p.coordsIndex=e,u&&t===r-1&&p.x===d.x&&p.y===d.y)continue;let n=l(p.x,p.y);n<=1&&o.candidates.push(new F(i,f(p),Math.sqrt(n)))}}}else if(d&&"ends"===e.vertexMode){let e=0,t=[];for(let i=0;i<a.length;i++){t.push(e);let r=a[i];e+=r*s,r>1&&t.push(e-s)}for(let e of t){p.coordsIndex=e;let t=l(p.x,p.y);t<=1&&o.candidates.push(new F(i,f(p),Math.sqrt(t)))}}}function x(t,i){let{candidates:r}=o,s={x:0,y:0,z:0};if(e.returnEdge){let e=[n.x,n.y],a=new z(e,0),o=new z(e,0);for(let{segments:n}of t.parts)for(let{start:t,curve:u}of n){let{curvePoint:n}=(0,c.y)(t,u,e),d=l(...n);if(d>1)continue;[s.x,s.y]=n,a.coords=t,o.coords=(0,h.yP)(u);let p=(0,h.Xq)(u)?null:(0,h.tk)(u);r.push(new I(i,f(s),Math.sqrt(d),f(a),f(o),!1,p))}}function a(e){s.x=t.vertexXY[2*e],s.y=t.vertexXY[2*e+1];let n=l(s.x,s.y);n>1||(s.z=t.vertexZ?.[e]??0,r.push(new F(i,f(s),Math.sqrt(n))))}if("all"===e.vertexMode){let{vertexCount:e}=t;for(let t=0;t<e;++t)a(t)}else if("ends"===e.vertexMode)switch(t.type){case"point":a(0);break;case"polyline":for(let e=0;e<t.partCount;++e){let i=t.partOffsets[e],r=t.partOffsets[e+1]-1;a(i),r!==i&&a(r)}}}}_getPointCreator(e,t,i){let r=null==i||(0,d.aI)(t,i)?e=>e:e=>(0,_.Cv)(e,t,i),{hasZ:n}=this;return n&&e?({x:e,y:t,z:i})=>r({x:e,y:t,z:i}):({x:e,y:t})=>r({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){let{field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,minValue:a,maxValue:l,scale:o,timeZone:u,outStatisticTypes:d}=e,c=this.fieldsIndex.get(t),h=(0,y.vE)(c)||(0,y.zD)(c)||(0,y.Ah)(c),f=await this._getDataValues({field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,scale:o,timeZone:u},this.items),p=(0,g.Vb)({normalizationType:n,normalizationField:r,minValue:a,maxValue:l}),m={value:.5,fieldType:c?.type},x=(0,y.yM)(c)?(0,g.z9)({values:f,supportsNullCount:p,percentileParams:m,outStatisticTypes:d}):(0,g.G_)({values:f,minValue:a,maxValue:l,useSampleStdDev:!n,supportsNullCount:p,percentileParams:m,outStatisticTypes:d});return(0,g.oZ)(x,d,h)}async createUniqueValuesResponse(e){let{field:t,valueExpression:i,domains:r,returnAllCodedValues:n,scale:s,timeZone:a}=e,l=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:s,timeZone:a},this.items,!1),o=(0,g.b3)(l);return(0,g.lv)(o,r,n,e.fieldDelimiter)}async createClassBreaksResponse(e){let{field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numClasses:d,scale:c,timeZone:h}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,scale:c,timeZone:h},this.items),p=(0,g.Rw)(f,{field:t,normalizationField:r,normalizationType:n,normalizationTotal:s,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numClasses:d});return(0,g.jM)(p,a)}async createHistogramResponse(e){let{field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numBins:d,scale:c,timeZone:h}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,scale:c,timeZone:h},this.items);return(0,g.$y)(f,{field:t,normalizationField:r,normalizationType:n,normalizationTotal:s,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numBins:d})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(let r of t.slice().reverse()){let{compare:t,fieldOrExpression:n,fieldInfo:s}=G(r,this.fieldsIndex);e.sort((e,r)=>t(i(e,n,s),i(r,n,s)))}}_topNFeatures(e,t,i,n){if(e.length>1&&t?.length){let s=t.map(e=>{let{compare:t,fieldOrExpression:i,fieldInfo:r}=G(e,this.fieldsIndex);return(e,s)=>t(n(e,i,r),n(s,i,r))}).reduceRight((e,t)=>(i,r)=>{let n=t(i,r);return 0===n||Number.isNaN(n)?e(i,r):n}),a=[];for(let t of e)(0,r.HX)(a,t,i,s);return a}return e.slice(0,i)}_createFeatureQueryResponse(e){let{items:t,geometryType:i,hasM:r,hasZ:n,featureIdInfo:s,spatialReference:a}=this,{outFields:l,outSR:o,quantizationParameters:d,resultRecordCount:c,resultOffset:h,returnZ:f,returnM:p}=e,m=null!=c&&t.length>(h||0)+c,y=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:y,geometryType:i,hasM:r&&p,hasZ:n&&f,objectIdFieldName:"object-id"===s.type?s.fieldName:null,spatialReference:o||a,transform:d&&(0,u.VV)(d)||null}}_createFeatures(e,t){let i,r=new v(e,this.featureAdapter,this.fieldsIndex),{hasM:n,hasZ:s}=this,{orderByFields:a,quantizationParameters:l,returnGeometry:o,returnCentroid:d,maxAllowableOffset:c,resultOffset:h,resultRecordCount:f,returnZ:p=!1,returnM:y=!1}=e,g=s&&p,x=n&&y,_=h||0,T=null==f?null:_+f;null!=T&&T<=5e3&&T<t.length?i=this._topNFeatures(t,a,T,(e,t,i)=>r.getFieldValue(e,t,i)):(i=[...t],this._sortFeatures(i,a,(e,t,i)=>r.getFieldValue(e,t,i))),(_>0||null!=T)&&(i=i.slice(_,T??void 0));let S=[],F=0;if(this.geometryType&&(o||d)){let e=(0,u.VV)(l)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(o&&!d)for(let n of i){let i=this.featureAdapter.getGeometry(n),s=this._addFeatureJSONMetadata(n,{attributes:r.getAttributes(n),geometry:(0,m.p)(this.geometryType,i,c,e,g,x)});t&&i&&!s.geometry&&(s.centroid=(0,m.L)(this,this.featureAdapter.getCentroid(n,this),e)),S[F++]=s}else if(!o&&d)for(let t of i)S[F++]=this._addFeatureJSONMetadata(t,{attributes:r.getAttributes(t),centroid:(0,m.L)(this,this.featureAdapter.getCentroid(t,this),e)});else for(let t of i)S[F++]=this._addFeatureJSONMetadata(t,{attributes:r.getAttributes(t),centroid:(0,m.L)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,m.p)(this.geometryType,this.featureAdapter.getGeometry(t),c,e,g,x)})}else for(let e of i){let t=r.getAttributes(e);t&&(S[F++]=this._addFeatureJSONMetadata(e,{attributes:t}))}return S}_addFeatureJSONMetadata(e,t){let i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=1/0,i=1/0,r=1/0;for(let e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null==e.maxPointCount?1/0:e.maxPointCount,i=null==e.maxRecordCount?1/0:e.maxRecordCount,r=null==e.maxVertexCount?1/0:e.maxVertexCount;break}return e="esriGeometryPoint"===this.geometryType?this.items.length>t:this.items.length>i||this.items.reduce((e,t)=>e+(this.featureAdapter.getGeometry(t)?.size??0),0)>r,{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){let r=[],n=new Map,s=new Map,a=new Map,l=new Map,o=new v(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:d,having:c,orderByFields:h,resultRecordCount:f}=e,p=d?.length,m=!!p,g=m?d[0]:null,x=m&&!this.fieldsIndex.get(g);for(let h of u??[]){let{outStatisticFieldName:u,statisticType:f}=h,v=h,_="exceedslimit"===f?void 0:h.onStatisticField,T="percentile_disc"===f||"percentile_cont"===f,S="EnvelopeAggregate"===f||"CentroidAggregate"===f||"ConvexHullAggregate"===f,F=m&&1===p&&(_===g||x)&&"count"===f;if(m){if(!a.has(_)){let e=[];for(let i of d){let r=this._getAttributeValues(o,i,t,n);e.push(r)}a.set(_,this._calculateUniqueValues(e,t,!S&&o.returnDistinctValues))}let i=a.get(_);if(!i)continue;let r=Object.keys(i);for(let s of r){let{count:r,data:a,items:h,itemPositions:f}=i[s],p=a.join(",");if(!c||o.validateItems(h,c)){let i=l.get(p)||{attributes:{}};if(e.returnAggIds&&(i.aggregateIds=h.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>null!=e)),S){i.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(v,h);i.aggregateGeometries[t]=e}else{let e=null;if(F)e=r;else{let i=this._getAttributeValues(o,_,t,n),r=f.map(e=>i[e]);e=T&&"statisticParameters"in v?this._getPercentileValue(v,r):this._getStatisticValue(v,r,null,o.returnDistinctValues)}i.attributes[u]=e}let s=0;d.forEach((e,t)=>i.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++s]=a[t]),l.set(p,i)}}}else if(S){i.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:r}=await this._getAggregateGeometry(v,t);i.aggregateGeometries[r]=e}else{let e=this._getAttributeValues(o,_,t,n);i.attributes[u]=T&&"statisticParameters"in v?this._getPercentileValue(v,e):this._getStatisticValue(v,e,s,o.returnDistinctValues)}let I="min"!==f&&"max"!==f||!(0,y.yM)(this.fieldsIndex.get(_))&&!this._isAnyDateField(_)?null:this.fieldsIndex.get(_)?.type;r.push({name:u,alias:u,type:I||"esriFieldTypeDouble"})}let _=m?Array.from(l.values()):[i];return this._sortFeatures(_,h,(e,t)=>e.attributes[t]),f&&(_.length=Math.min(f,_.length)),{fields:r,features:_}}_isAnyDateField(e){let t=this.fieldsIndex.get(e);return(0,y.vE)(t)||(0,y.zD)(t)||(0,y.Ah)(t)||(0,y.OH)(t)}async _getAggregateGeometry(e,t){let{statisticType:i,outStatisticFieldName:r}=e,{featureAdapter:n,spatialReference:s,geometryType:a}=this,u=t.map(e=>(0,m.p)(a,n.getGeometry(e))),d={aggregateGeometries:null,outStatisticFieldName:null},{convexHullExecuteMany:c}=await C.getImportPromise(),[h]=c(u,{merge:!0});if(h&&h.rings[0].length<=3&&(h=null),"EnvelopeAggregate"===i)d.aggregateGeometries={...h?(0,o.v)(h):N(u),spatialReference:s},d.outStatisticFieldName=r||"extent";else if("CentroidAggregate"===i){let[e,t]=h?(0,l.l8)(h):(0,l.Z4)(N(u));d.aggregateGeometries={x:e,y:t,spatialReference:s},d.outStatisticFieldName=r||"centroid"}else"ConvexHullAggregate"===i&&(d.aggregateGeometries=h&&{...h,spatialReference:s},d.outStatisticFieldName=r||"convexHull");return d}_getStatisticValue(e,t,i,r){let{onStatisticField:n,statisticType:s}=e,a=null;return a=i?.has(n)?i.get(n):(0,y.yM)(this.fieldsIndex.get(n))||this._isAnyDateField(n)?(0,g.z9)({values:t,returnDistinct:r}):(0,g.G_)({values:r?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(n,a),a["var"===s?"variance":s]}_getPercentileValue(e,t){let{onStatisticField:i,statisticParameters:r,statisticType:n}=e,{value:s,orderBy:a}=r,l={value:s,orderBy:a,fieldType:this.fieldsIndex.get(i)?.type,isDiscrete:"percentile_disc"===n};return(0,g.qg)(t,l)}_getAttributeValues(e,t,i,r){if(r.has(t))return r.get(t);let n=this.fieldsIndex.get(t),s=i.map(i=>e.getFieldValue(i,t,n));return r.set(t,s),s}_calculateUniqueValues(e,t,i){let r={},n=t.length;for(let s=0;s<n;s++){let n=t[s],a=[];for(let t of e)a.push(t[s]);let l=a.join(",");null==r[l]?r[l]={count:1,data:a,items:[n],itemPositions:[s]}:(i||r[l].count++,r[l].items.push(n),r[l].itemPositions.push(s))}return r}async _getDataValues(e,t,i=!0){let r=new v(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:l,timeZone:o}=e,u=a.A.fromJSON(this.query.outSR||this.spatialReference);return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:l,spatialReference:u},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,s.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];let r=t.intervals,n=t.min??0,s=t.max??0,a=r.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){let l=e[t],o=i[t];if(null!=l&&l>=n&&l<=s){let e=(0,g.Ak)(r,l);e>-1&&(a[e].count++,a[e].items.push(o))}}return a}async createQueryBinsResponse(e){let t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);let{value:i,outAlias:r,valueType:n}=t,s=[],a=[{name:r??i,alias:r??i,type:n??"esriFieldTypeString"},{name:"bin",alias:"bin",type:"esriFieldTypeInteger"}],l=new v(e,this.featureAdapter,this.fieldsIndex),o=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>l.getFieldValue(e,t,i));let d=this._getAttributeValues(l,i,u,o),c=this._calculateUniqueValues([d],u,l.returnDistinctValues);for(let t in c){let{items:n}=c[t],l=await this._createBinsResponse(e,n);if(s.push(...l.features.map(e=>({...e,attributes:{...e.attributes,[r??i]:t}}))),l.fields)for(let e of l.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:s}}async _createBinsResponse(e,t){let i=e.bin;switch(t??=this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(w.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(R.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(A.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(M.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){let{field:r,normalizationField:n,numBins:s,normalizationType:a,normalizationTotal:l,start:o,end:u}=e,d=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),c=(0,g.sU)(d,{field:r,normalizationField:n,normalizationType:a,normalizationTotal:l,numBins:s,minValue:(0,T.dO)(a?e.normalizationMinValue:o,!1),maxValue:(0,T.dO)(a?e.normalizationMaxValue:u,!1)}),h=this._calculateHistogramBins(d,c,i);return this._createFeaturesFromHistogramBins(h,t)}async _createDateBinsResponse(e,t,i){let{field:r,interval:n,start:s,end:a,snapToData:l,returnFullIntervalBin:o,offset:u,firstDayOfWeek:d}=e,c=n.unit,h=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),f=(0,y.OH)(this.fieldsIndex.get(r)),p=E.g.toJSON(c),m=h.filter(Boolean).sort((e,t)=>e-t),g=null==s?m[0]:(0,T.dO)(s,f),x=null==a?m[m.length-1]:(0,T.dO)(a,f),v=[];if(null!=g&&null!=x){let e={zone:t.outTimeReference?.ianaTimeZone??"UTC"},i={[u?.unit?E.g.toJSON(u.unit):"milliseconds"]:u?.value||0},r=b.c9.fromMillis(g,e).minus(i),s=b.c9.fromMillis(x,e).minus(i),a="number"==typeof d&&d>=1&&d<=7?d:7,c=(e,t)=>{let i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")},h=(e,t)=>c(e,t).plus({days:7});if("last"===l){let e="week"===p?h(s,a):s;for(;e>r;){let t=e.minus({[p]:n.value});if(t<r){v.unshift([o?t.plus(i).toMillis():r.plus(i).toMillis(),e.plus(i).toMillis()]);break}v.unshift([t.plus(i).toMillis(),e.plus(i).toMillis()]),e=t}}else{let e="first"===l?r:"week"===p?c(r,a):r.startOf(p);for(;e<=s;){let t=e.plus({[p]:n.value});if(t>s){v.push([e.plus(i).toMillis(),o?t.plus(i).toMillis():s.plus(i).toMillis()]);break}v.push([e.plus(i).toMillis(),t.plus(i).toMillis()]),e=t}}}let _=this._calculateHistogramBins(h,{intervals:v,min:g,max:x},i);return this._createFeaturesFromHistogramBins(_,t)}async _createFixedBoundariesBinsResponse(e,t,i){let{field:r}=e,n=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),s=(0,y.OH)(this.fieldsIndex.get(r)),a=e.boundaries.map(e=>(0,T.dO)(e,s)).sort((e,t)=>e-t),l=[];for(let e=0;e<a.length-1;e++)l.push([a[e],a[e+1]]);let o={intervals:l,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(n,o,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){let{field:r,interval:n,normalizationType:s,start:a,end:l}=e,o=await this._getDataValues({field:r||e.expression,normalizationField:e.normalizationField,normalizationType:s,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=(0,y.OH)(this.fieldsIndex.get(r)),d=(0,g.sU)(o,{field:r,classificationMethod:"defined-interval",definedInterval:n,minValue:(0,T.dO)(s?e.normalizationMinValue:a,u),maxValue:(0,T.dO)(s?e.normalizationMaxValue:l,u)},!0),c=this._calculateHistogramBins(o,d,i);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){let{upperBoundaryAlias:i,lowerBoundaryAlias:r}=t,n=r||"lowerBoundary",s=i||"upperBoundary",a=[],l=[{name:n,alias:n,type:"esriFieldTypeDouble"},{name:s,alias:s,type:"esriFieldTypeDouble"}],o=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;o&&l.push({name:"bin",alias:"bin",type:"esriFieldTypeInteger"},{name:u??o,alias:u??o,type:"esriFieldTypeString"});let d=0,c="dateBin"===t.bin.type,h=t.outTimeReference?.ianaTimeZone;for(let i of e){let e,{minValue:r,maxValue:f,items:p}=i,m={attributes:{}};if(m.attributes[n]=c&&h&&null!=r?b.c9.fromMillis(r,{zone:h}).toISO():r,t.bin.hideUpperBound||(m.attributes[s]=c&&h&&null!=f?b.c9.fromMillis(f,{zone:h}).toISO():f),t.returnAggIds&&(m.aggregateIds=p.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>null!=e)),o?(e=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[o],orderByFields:[o]},p),m.attributes.bin=++d,"flat"===t.bin.jsonStyle?a.push(...e.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...m.attributes}:{...t,...m.attributes}}))):(m.stackedAttributes=e.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(m))):(t.bin?.splitBy&&(m.attributes.bin=++d),e=await this._createStatisticsQueryResponse(t,p,m),a.push(m)),e.fields)for(let t of e.fields)l.some(e=>e.name===t.name)||l.push(t)}return"desc"===t.binOrder&&a.reverse(),{fields:l,features:a}}}function N(e){let t=(0,o.HA)(e[0]);for(let i of e.slice(1))(0,o.JM)(t,(0,o.HA)(i));return t}function V(e,t,i,r){let n=r.x-i.x,s=r.y-i.y,a=t.x-i.x,l=t.y-i.y,o=n*n+s*s;if(0===o)return!1;let u=a*n+l*s,d=Math.min(1,Math.max(0,u/o));return e.x=i.x+n*d,e.y=i.y+s*d,!0}class z{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 P=[1];function G(e,t){let i=e.split(" "),r=i[0],n=t.get(r),s=!!i[1]&&"desc"===i[1].toLowerCase();return{compare:(0,g.FM)(n?.type,s,"case-insensitive"),fieldOrExpression:r,fieldInfo:n}}},29441(e,t,i){i.d(t,{MG:()=>v,SN:()=>f,SY:()=>g,Wq:()=>y,_d:()=>S,eD:()=>p,g9:()=>x,j4:()=>m});var r=i(49186),n=i(44123),s=i(98453);const a=new n.WhereClauseCache(50,500),l="unsupported-query",o=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),d=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),c=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...d]);function h(e,t,i={}){let n=m(t,e);if(!n){let i=a.getError(t,e);throw new r.A(l,"invalid SQL expression",{expression:t,error:i})}let s=i.expressionName||"expression";if(i.validateStandardized&&!n.isStandardized)throw new r.A(l,`${s} is not standard`,{expression:t});if(i.validateAggregate&&!n.isAggregate)throw new r.A(l,`${s} does not contain a valid aggregate function`,{expression:t});return n.fieldNames}function f(e,t,i,r){if(!i)return!0;let n="where clause";return v(e,t,h(e,i,{validateStandardized:!0,expressionName:n}),{expressionName:n,query:r}),!0}function p(e,t,i,n,s){if(!i)return!0;let a="having clause";if(v(e,t,h(e,i,{validateAggregate:!0,expressionName:a}),{expressionName:a,query:s}),!m(i,e)?.getExpressions().every(t=>{let{aggregateType:i,field:r}=t,s=e.get(r)?.name;return n.some(t=>{let{onStatisticField:r,statisticType:n}=t;return e.get(r)?.name===s&&n.toLowerCase().trim()===i})}))throw new r.A(l,"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(o)[0]}function g(e){return e.split(o)[1]}function x(e,t,i){if(!S(t))return[];let r=new Set,n=t=>{if(t&&"*"!==t)for(let i of _(e,t))r.add(i)};for(let e of t)n(e.onStatisticField);for(let e of i??[])n(e);return Array.from(r)}function v(e,t,i,n={}){let s=new Map;if(function(e,t,i,r,n){let s=n.includes("*")?[...i,...n.filter(e=>"*"!==e)]:n;for(let n of s)if(t.get(n))T(e,t,i,r,n);else try{for(let s of _(t,n))T(e,t,i,r,s)}catch(t){e.set(n,{type:"expression-error",expression:n,error:t})}}(s,e,t,n.allowedFieldTypes??c,i),s.size){let e=`${n.expressionName??"expression"} contains invalid or missing fields`;throw new r.A(l,e,{errors:Array.from(s.values()),query:n.query})}}function _(e,t){let i=e.get(t);return i?[i.name]:h(e,y(t),{validateStandardized:!0})}function T(e,t,i,r,n){let a=t.get(n);a?i.has(a.name)?"all"!==r&&!1===r?.has(a.type)&&e.set(n,{type:"invalid-type",fieldName:a.name,fieldType:s.m.fromJSON(a.type),allowedFieldTypes:Array.from(r,e=>s.m.fromJSON(e))}):e.set(n,{type:"missing-field",fieldName:a.name}):e.set(n,{type:"invalid-field",fieldName:n})}function S(e){return null!=e&&e.every(e=>"exceedslimit"!==e.statisticType)}i.d(t,["VW",0,d,"vl",0,u])},54339(e,t,i){function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let i=[];for(let r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>n})},51441(e,t,i){i.d(t,{L:()=>n,p:()=>s});var r=i(90708);function n(e,t,i,n=e.hasZ,s=e.hasM){if(null==t)return null;let a=e.hasZ&&n,l=e.hasM&&s;if(i){let e=(0,r.Nl)(t,"esriGeometryPoint",i,n,s);return(0,r.DF)(e,a,l)}return(0,r.DF)(t,a,l)}function s(e,t,i,n,s,a){if(null==t)return null;let l="coords"in t?t:t.geometry;if(null==l)return null;let{hasZ:o,hasM:u}=l,d=o&&(s??=o),c=u&&(a??=u);if(i){let t=(0,r.kz)(l,e,i,s,a);return n&&(t=(0,r.Nl)(t,e,n)),(0,r.zv)(t,e,d,c)}if(n){let t=(0,r.Nl)(l,e,n,s,a);return(0,r.zv)(t,e,d,c)}return(0,r.zv)(l,e,d,c)}},31464(e,t,i){i.d(t,{Cv:()=>f,Nk:()=>h,lK:()=>m});var r=i(4576),n=i(99917),s=i(60408),a=i(21325),l=i(28735);const o=[0,0];function u(e,t){let i=(0,a.K8)(e)?l.je:l.tD;if((0,s.fT)(t)){let e={x:0,y:0};return[e.x,e.y]=i(t.x,t.y,o),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,s.ZC)(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=i(t.xmin,t.ymin,o),[e.xmax,e.ymax]=i(t.xmax,t.ymax,o),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if((0,s.Bi)(t))return{rings:d(t.rings,i),hasM:t.hasM,hasZ:t.hasZ};if((0,s.Rg)(t))return{paths:d(t.paths,i),hasM:t.hasM,hasZ:t.hasZ};if((0,s.U9)(t))return{points:c(t.points,i),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function d(e,t){let i=[];for(let r of e)i.push(c(r,t));return i}function c(e,t){let i=[];for(let r of e){let e=t(r[0],r[1],[0,0]);i.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return i}async function h(e,t){if(!e||!t)return;let i=Array.isArray(e)?e.map(e=>null==e.geometry?null:e.geometry.spatialReference).filter(r.Ru):[e];await(0,n.initializeProjection)(i.map(e=>({source:e,dest:t})))}function f(e,t,i,r){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,a.fn)(t)||!(0,a.fn)(i)||(0,a.aI)(t,i))return e;if((0,l.y7)(t,i)){let t=u(i,e);return t.spatialReference=i,t}let[s]=(0,n.projectMany)([e],t,i,r);return s}const p=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,r){if(!e?.length||!t||!i||(0,a.aI)(t,i))return e;let n={geometries:e,inSpatialReference:t,outSpatialReference:i,options:r,resolve:Promise.withResolvers()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let t,{geometries:i,inSpatialReference:r,outSpatialReference:s,resolve:a,options:o}=e,d=i.filter(e=>null!=e);t=(0,l.y7)(r,s)&&null==o?.extendedParams?d.map(e=>u(s,e)):(0,n.projectMany)(d,r,s,o);let c=0,h=i.map(e=>null==e?null:t[c++]);a.resolve(h),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(e,t,i,r){return p.push(e,t,i,r)}},58727(e,t,i){i.d(t,{GC:()=>g,T2:()=>x,dO:()=>_,iJ:()=>y});var r=i(49186),n=i(66552),s=i(86211),a=i(39829),l=i(99917),o=i(90634),u=i(60408),d=i(65864),c=i(52039),h=i(21325),f=i(31464);const p=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({});async function y(e,t,i){let r=e.bin;return r.onField&&=r.onField.trim(),r.onExpression?.value&&(r.onExpression.value=r.onExpression.value.trim()),r.splitBy&&(r.splitBy.value&&(r.splitBy.value=r.splitBy.value.trim()),r.splitBy.outAlias&&(r.splitBy.outAlias=r.splitBy.outAlias.trim())),r.stackBy&&(r.stackBy.value&&(r.stackBy.value=r.stackBy.value.trim()),r.stackBy.outAlias&&(r.stackBy.outAlias=r.stackBy.outAlias.trim())),"normalizationField"in r.parameters&&r.parameters.normalizationField&&(r.parameters.normalizationField=r.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:"frequency"}]),g(e,t,i)}async function g(e,t,i){let{outFields:r,orderByFields:n,groupByFieldsForStatistics:s,outStatistics:a}=e;if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();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(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),x(e,t,i)}async function x(e,t,i){if(!e)return null;let{where:r}=e;if(e.where=r=r?.trim(),(!r||/^1 *= *1$/.test(r)||t&&t===r)&&(e.where=null),!e.geometry)return e;let n=await v(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){let{spatialReference:t}=e.geometry;n=(0,o.HA)(n),n.spatialReference=t}if(!n)return e;await(0,f.Nk)(n.spatialReference,i);let[s]=await(0,c.el)((0,d.rS)(n));if(null==s)throw m;let p=!1;((0,u.ZC)(s)||(0,u.Bi)(s)||(0,u.Rg)(s))&&(p=!(0,h.aI)(s.spatialReference,i)&&!(0,l.canProjectWithoutEngine)(s.spatialReference,i)),p&&(0,u.ZC)(s)&&(s=a.A.fromExtent(s));let y="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,g=p&&y?{extendedParams:{densificationStep:8*y}}:void 0,x=s.toJSON(),_=(0,f.Cv)(x,x.spatialReference,i,g);if(!_)throw m;return _.spatialReference=i,e.geometry=_,e}async function v(e){let{distance:t,units:n}=e,a=e.geometry;if(!t||"vertexAttributes"in a)return a;let l=a.spatialReference,o=n?p.fromJSON(n):(0,s.Ij)(l),d=l&&((0,h.EA)(l)||(0,h.K8)(l))?a:await(0,f.Nk)(l,h.KK).then(()=>(0,f.Cv)(a,h.KK)),{geodesicBufferExecute:c,geodesicBufferLoad:m}=await i.e(9159).then(()=>i(49159));await m();let y=c(d,t||1,{unit:o})??void 0;if(!y||!(0,u.Bi)(y)||0===y.rings.length)throw new r.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return y}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}i.d(t,["VY",0,p,"v8",0,m])},62660(e,t,i){i.d(t,{tC:()=>_,c0:()=>v,xt:()=>x});var r=i(49186),n=i(94078),s=i(12176),a=i(60408),l=i(21325);function o(e,t,i){if(!e)return!1;let{coords:r,lengths:n,stride:s}=e,a=!1,l=0;for(let e of n)a=u(a,r,s,l,e,t,i),l+=e*s;return a}function u(e,t,i,r,n,s,a){let l=e,o=r;for(let e=r,u=r+n*i;e<u;e+=i){o=e+i,o===u&&(o=r);let n=t[e],d=t[e+1],c=t[o],h=t[o+1];(d<a&&h>=a||h<a&&d>=a)&&n+(a-d)/(h-d)*(c-n)<s&&(l=!l)}return l}var d=i(90708),c=i(51441),h=i(31464);const f="unsupported-query",p={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},m={esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},y={esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1},g={esriSpatialRelIntersects:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(6033)]).then(()=>i(55284)).then(e=>e.intersectsExecute),esriSpatialRelContains:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(2990)]).then(()=>i(29127)).then(e=>e.containsExecute),esriSpatialRelCrosses:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(919)]).then(()=>i(87778)).then(e=>e.crossesExecute),esriSpatialRelDisjoint:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(9722)]).then(()=>i(3157)).then(e=>e.disjointExecute),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(8740)]).then(()=>i(83371)).then(e=>e.overlapsExecute),esriSpatialRelTouches:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(8307)]).then(()=>i(67658)).then(e=>e.touchesExecute),esriSpatialRelWithin:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(100)]).then(()=>i(65487)).then(e=>e.withinExecute),esriSpatialRelRelation:null};async function x(e,t,i){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){let e=(0,d.Ye)(t,!1,!1);return t=>function(e,t){return o(e,t.coords[0],t.coords[1])}(e,t)}if("esriGeometryMultipoint"===i){let i=(0,d.Ye)(t,!1,!1);if("esriSpatialRelContains"===e)return e=>function(e,t){let{coords:i,lengths:r,stride:n}=t;if(!r)return!1;for(let t=0,s=0;t<r.length;t++,s+=n)if(!o(e,i[s],i[s+1]))return!1;return!0}(i,e)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,n.qz)(t,(0,c.p)(i,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,n.rL)(t,(0,c.p)(i,e));if("esriSpatialRelIntersects"===e){let e="mesh"===(r=i)?s.xB:(0,s.xK)(r);return r=>e(t,(0,c.p)(i,r))}}var r;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");let l=await function(e){let t=g[e];if(null==t)throw Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>l(t,(0,c.p)(i,e))}async function v(e,t,i){let{spatialRel:n,geometry:s}=e;if(s){if(null==(o=n)||!0!==p[o])throw new r.A(f,"Unsupported query spatial relationship",{query:e});if((0,l.fn)(s.spatialReference)&&(0,l.fn)(i)){if(!function(e){return null!=e&&!0===m[(0,a.$B)(e)]}(s))throw new r.A(f,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===y[e]}(t))throw new r.A(f,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,h.Nk)(e.geometry?.spatialReference,e.outSR)}}var o}function _(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(let t of e.rings)if(5!==t.length||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:()=>s,W:()=>n});var r=i(21818);async function n(e,t){if(!e)return null;let i=t.featureAdapter,{startTimeField:n,endTimeField:s}=e,a=1/0,l=-1/0;if(n&&s)await t.forEach(e=>{let t=i.getAttribute((0,r.z)(e),n),o=i.getAttribute((0,r.z)(e),s);null!=t&&!isNaN(t)&&(a=Math.min(a,t)),null!=o&&!isNaN(o)&&(l=Math.max(l,o))});else{let e=n||s;await t.forEach(t=>{let n=i.getAttribute((0,r.z)(t),e);null!=n&&!isNaN(n)&&(a=Math.min(a,n),l=Math.max(l,n))})}return{start:a,end:l}}function s(e,t,i){if(!t||!e)return null;let{startTimeField:r,endTimeField:n}=e;if(!r&&!n)return null;let{start:s,end:a}=t;if(null===s&&null===a)return null;if(void 0===s&&void 0===a)return()=>!1;let l=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return r&&n?function(e,t,i,r,n){return null!=r&&null!=n?s=>{let a=e(s,t),l=e(s,i);return(null==a||a<=n)&&(null==l||l>=r)}:null!=r?t=>{let n=e(t,i);return null==n||n>=r}:null!=n?i=>{let r=e(i,t);return null==r||r<=n}:void 0}(l,r,n,s,a):function(e,t,i,r){return null!=i&&null!=r&&i===r?r=>e(r,t)===i:null!=i&&null!=r?n=>{let s=e(n,t);return null!=s&&s>=i&&s<=r}:null!=i?r=>{let n=e(r,t);return null!=n&&n>=i}:null!=r?i=>{let n=e(i,t);return null!=n&&n<=r}:void 0}(l,r||n,s,a)}},90708(e,t,i){i.d(t,{Ap:()=>E,B2:()=>y,DF:()=>S,Di:()=>N,E2:()=>O,IE:()=>m,Nl:()=>q,PR:()=>w,Rk:()=>H,Ux:()=>z,Ye:()=>M,ZF:()=>D,aQ:()=>j,jH:()=>L,jQ:()=>k,kz:()=>Q,oN:()=>V,q3:()=>B,qN:()=>F,zv:()=>P});var r=i(49186),n=i(53966),s=i(97768),a=i(70328),l=i(19419),o=i(60408),u=i(43334),d=i(58512),c=i(92722),h=i(54339);const f=()=>n.A.getLogger("esri.layers.graphics.featureConversionUtils"),p={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function m({scale:e,translate:t},i){return Math.round((i-t[0])/e[0])}function y({scale:e,translate:t},i){return Math.round((t[1]-i)/e[1])}function g({scale:e,translate:t},i){return Math.round((i-t[0])/e[0])}function x({scale:e,translate:t},i){return Math.round((i-t[1])/e[1])}function v({scale:e,translate:t},i,r){return i*e[r]+t[r]}function _(e,t,i){return t&&(e.hasZ=!0),i&&(e.hasM=!0),e}function T(e,t,i,r){if(t&&r&&e!==i)return(t,i,r,n)=>{r[n++]=t[i++],r[n++]=t[i++],e?i++:r[n++]=0,r[n++]=t[i++]??0};let n=+!!i+2+ +!!r,s=n-((!e&&i?1:0)+(!t&&r?1:0));return(e,t,i,r)=>{for(let a=0;a<n;++a)i[r++]=a<s?e[t++]??0:0}}function S(e,t,i){if(!e)return null;let{coords:r,hasZ:n,hasM:s}=e,[a,l]=r,o=n?r[2]:0,u=s?r[+!!n+2]:0;return{x:a,y:l,z:t?o:void 0,m:i?u:void 0}}function F(e,t=(0,o.Pv)(e),i=(0,o.W0)(e)){let{x:r,y:n,z:s,m:a}=e,l=[r,n];return t&&l.push(s??0),i&&l.push(a??0),new c.A([],l,t,i)}function I(e,t,i){if(null==e)return null;let{coords:r,stride:n,hasZ:s,hasM:a}=e,l=T(s,a,t,i),o=[];for(let e=0;e<r.length;e+=n){let t=[];l(r,e,t,0),o.push(t)}return _({points:o},t,i)}function w(e,t=(0,o.Pv)(e),i=(0,o.W0)(e)){let{points:r,hasZ:n,hasM:s}=e,a=new c.A([r.length],[],t,i),{coords:l,stride:u}=a,d=0,h=T(n??!1,s??!1,t,i);for(let e of r)h(e,0,l,d),d+=u;return a}function R(e,t,i){if(!e)return null;let{coords:r,lengths:n,stride:s,hasZ:a,hasM:l}=e,o=0,u=T(a,l,t,i),d=[];for(let e of n){let t=[];for(let i=0;i<e;i++){let e=[];u(r,o,e,0),o+=s,t.push(e)}d.push(t)}return _({paths:d},t,i)}function E(e,t=(0,o.Pv)(e),i=(0,o.W0)(e)){let{paths:r,hasZ:n,hasM:s}=e,a=T(n??!1,s??!1,t,i),l=new c.A([],[],t,i),{lengths:u,coords:d,stride:h}=l,f=0;for(let e of r){for(let t of e)a(t,0,d,f),f+=h;u.push(e.length)}return l}function A(e,t,i){if(!e)return null;let{coords:r,lengths:n,stride:s,hasZ:a,hasM:l}=e,o=0,u=T(a,l,t,i),d=[];for(let e of n){let t=[];for(let i=0;i<e;i++){let e=[];u(r,o,e,0),o+=s,t.push(e)}d.push(t)}return _({rings:d},t,i)}function M(e,t=(0,o.Pv)(e),i=(0,o.W0)(e)){let{rings:r,hasZ:n,hasM:s}=e,a=new c.A([],[],t,i),{lengths:l,coords:u,stride:d}=a,h=0,f=T(n??!1,s??!1,t,i);for(let e of r){for(let t of e)f(t,0,u,h),h+=d;l.push(e.length)}return a}const b=[],C=[];function O(e,t,i,r,n){b[0]=e;let[s]=N(C,b,t,i,r,n);return $(b),$(C),s}function N(e,t,i,n,s,a){if($(e),!i){for(let i of t){let t=(0,h.W)(i,a);e.push(new u.Om(null,i.attributes,null,t,void 0,i.distance,i.vertexCount))}return e}switch(i){case"esriGeometryPoint":return function(e,t,i,r,n){for(let s of t){let{geometry:t,attributes:a,centroid:l}=s,d=(0,o.Pv)(t),c=(0,o.W0)(t);e.push(new u.Om(t?F(t,i&&d,r&&c):null,a,l?F(l,!1,!1):null,(0,h.W)(s,n),s.displayId,s.distance,s.vertexCount))}return e}(e,t,n,s,a);case"esriGeometryMultipoint":return function(e,t,i,r,n){for(let s of t){let{geometry:t,attributes:a}=s,l=(0,o.Pv)(t),d=(0,o.W0)(t);e.push(new u.Om(t?w(t,i&&l,r&&d):null,a,null,(0,h.W)(s,n),s.displayId,s.distance,s.vertexCount))}return e}(e,t,n,s,a);case"esriGeometryPolyline":return function(e,t,i,r,n){for(let s of t){let{geometry:t,attributes:a,centroid:l}=s,d=(0,o.Pv)(t),c=(0,o.W0)(t);e.push(new u.Om(t?E(t,i&&d,r&&c):null,a,l?F(l,!1,!1):null,(0,h.W)(s,n),s.displayId,s.distance,s.vertexCount))}return e}(e,t,n,s,a);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,i,r,n){for(let s of t){let{geometry:t,attributes:a,centroid:l}=s,d=(0,o.Pv)(t),c=(0,o.W0)(t);e.push(new u.Om(t?M(t,i&&d,r&&c):null,a,l?F(l,!1,!1):null,(0,h.W)(s,n),s.displayId,s.distance,s.vertexCount))}return e}(e,t,n,s,a);default:f().error("convertToFeatureSet:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`)),$(e)}return e}function V(e,t,i,r){C[0]=e,G(b,C,t,i,r);let n=b[0];return $(b),$(C),n}function z(e,t=(0,o.Pv)(e),i=(0,o.W0)(e)){return null==e?null:(0,o.fT)(e)?F(e,t,i):(0,o.Bi)(e)?M(e,t,i):(0,o.Rg)(e)?E(e,t,i):(0,o.U9)(e)?w(e,t,i):void f().error("convertFromGeometry:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function P(e,t,i,n){if(null==e)return null;let s="coords"in e?e:e.geometry;if(null==s)return null;switch(t){case"esriGeometryPoint":return S(s,i,n);case"esriGeometryMultipoint":return I(s,i,n);case"esriGeometryPolyline":return R(s,i,n);case"esriGeometryPolygon":return A(s,i,n);default:return f().error("convertToGeometry:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`)),null}}function G(e,t,i,n,s){if($(e),null==i)return function(e,t){for(let i of t)e.push({attributes:i.attributes});return e}(e,t);switch(i){case"esriGeometryPoint":return function(e,t,i,r){for(let{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:S(n,i,r)});return e}(e,t,n,s);case"esriGeometryMultipoint":return function(e,t,i,r){for(let{geometry:n,attributes:s}of t)e.push({geometry:n&&I(n,i,r),attributes:s});return e}(e,t,n,s);case"esriGeometryPolyline":return function(e,t,i,r){for(let{geometry:n,attributes:s}of t)e.push({geometry:n&&R(n,i,r),attributes:s});return e}(e,t,n,s);case"esriGeometryPolygon":return function(e,t,i,r){for(let{geometry:n,attributes:s,centroid:a}of t){let t=A(n,i,r),l=S(a,!1,!1);e.push(a?{geometry:t,attributes:s,centroid:l}:{geometry:t,attributes:s})}return e}(e,t,n,s);default:f().error("convertToFeatureSet:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`))}return e}function D(e){let{spatialReference:t,transform:i,fields:r,hasM:n,hasZ:s,features:a,geometryType:l,exceededTransferLimit:o,queryGeometry:u,queryGeometryType:d}=e,c={features:G([],a,l,s,n),fields:r,geometryType:l,spatialReference:t,queryGeometry:P(u,d,s,n)};return i&&(c.transform=i),o&&(c.exceededTransferLimit=o),n&&(c.hasM=n),s&&(c.hasZ=s),c}function B(e,t){let i=new d.A,{hasM:r,hasZ:n,features:s,spatialReference:a,geometryType:l,exceededTransferLimit:o,transform:u,fields:c,globalIdFieldName:h}=e;return c&&(i.fields=c),i.geometryType=l??null,i.spatialReference=a??null,s&&N(i.features,s,l,n,r,t),o&&(i.exceededTransferLimit=o),r&&(i.hasM=r),n&&(i.hasZ=n),u&&(i.transform=u),h&&(i.globalIdFieldName=h),i}function L(e,t){let{geometryType:i,features:r}=t;if(!e)return t;for(let t=0;t<r.length;t++){let n=r[t],s=n.weakClone();s.geometry=q(n.geometry,i,e),s.centroid=q(n.centroid,"esriGeometryPoint",e),r[t]=s}return t.transform=e,t}function q(e,t,i,r,n,s=!1){if(null==e||!e?.coords.length)return null;let a=p[t],{coords:l,lengths:o,stride:u,hasZ:d,hasM:h}=e;r??=d,n??=h;let f=new c.A([],[],r,n),v=f.stride,_=T(d,h,r,n),S=0,F=[0,0,0,0].slice(v),I=s?g:m,w=s?x:y;function R(){_(l,S,F,0),S+=u,F[0]=I(i,F[0]),F[1]=w(i,F[1])}if(e.isPoint)return R(),f.coords.push(...F),f;let E=0;for(let e of o){if(e<a)continue;let t=1;R(),f.coords.push(...F);let[i,r]=F;for(let n=1;n<e;n++){R();let[e,n]=F;(i!==e||r!==n)&&(s||(F[0]-=i,F[1]-=r),f.coords.push(...F),i=e,r=n,t++)}t>=a?(f.lengths.push(t),E=f.coords.length):$(f.coords,E)}return $(f.coords,E),f.coords.length?f:null}function Q(e,t,i,r=e.hasZ,n=e.hasM){if(!e.coords.length)return null;let s=p[t],{coords:a,lengths:l,stride:o,hasZ:u,hasM:d}=e,h=new c.A([],[],r,n),f=h.stride,m=T(u,d,r,n);if(e.isPoint)return m(a,0,h.coords,0),h;let y=0,g=i*i;for(let e of l){if(e<s){y+=e*o;continue}let t=h.coords.length/f,i=y,r=y+(e-1)*o;m(a,i,h.coords,h.coords.length),U(h.coords,a,o,g,m,i,r),m(a,r,h.coords,h.coords.length);let n=h.coords.length/f-t;n>=s?h.lengths.push(n):$(h.coords,t*f),y+=e*o}return h.coords.length?h:null}function Z(e,t,i,r){let n=e[t],s=e[t+1],a=e[i],l=e[i+1],o=e[r],u=e[r+1],d=a,c=l,h=o-d,f=u-c;if(0!==h||0!==f){let e=((n-d)*h+(s-c)*f)/(h*h+f*f);e>1?(d=o,c=u):e>0&&(d+=h*e,c+=f*e)}return h=n-d,f=s-c,h*h+f*f}function U(e,t,i,r,n,s,a){let l,o=r,u=0;for(let e=s+i;e<a;e+=i)l=Z(t,e,s,a),l>o&&(u=e,o=l);o>r&&(u-s>i&&U(e,t,i,r,n,s,u),n(t,u,e,e.length),a-u>i&&U(e,t,i,r,n,u,a))}function k(e,t){if(!t?.coords?.length)return null;let i=1/0,r=1/0,n=-1/0,s=-1/0,{coords:o,stride:u}=t;for(let e=0;e<o.length;e+=u){let t=o[e],a=o[e+1];i=Math.min(i,t),n=Math.max(n,t),r=Math.min(r,a),s=Math.max(s,a)}return(0,a.is)(e)?(0,a.BI)(e,i,r,n,s):(0,l.fA)(i,r,n,s,e),e}function j(e,t){let{coords:i,lengths:r,stride:n,hasZ:a,hasM:l}=e;if(!i.length)return void(r.length=0);(0,s.Lw)(t);let{originPosition:o,scale:u,translate:d}=t,c=J;c.originPosition=o;let h=c.scale;h[0]=u[0]??1,h[1]=-(u[1]??1),h[2]=u[2]??1,h[3]=u[3]??1;let f=c.translate;if(f[0]=d[0]??0,f[1]=d[1]??0,f[2]=d[2]??0,f[3]=d[3]??0,l&&!a&&(h[2]=h[3],f[2]=f[3]),!r.length){for(let e=0;e<n;++e)i[e]=v(c,i[e],e);return void(r.length=0)}let p=0;for(let e=0;e<r.length;e++){let t=r[e];r[e]=t;for(let e=0;e<n;++e)i[p+e]=v(c,i[p+e],e);let s=i[p],a=i[p+1];p+=n;for(let e=1;e<t;e++,p+=n){s+=i[p]*h[0],a+=i[p+1]*h[1],i[p]=s,i[p+1]=a;for(let e=2;e<n;++e)i[p+e]=v(c,i[p+e],e)}}}function W(e,t,i,r){let n=0,s=e[r*t],a=e[r*(t+1)];for(let l=1;l<i;l++){let i=s+e[r*(t+l)],o=a+e[r*(t+l)+1],u=(i-s)*(o+a);s=i,a=o,n+=u}return.5*n}function H(e,t){let{coords:i,lengths:r}=e,n=0,s=0;for(let e=0;e<r.length;e++){let a=r[e];s+=W(i,n,a,t),n+=a}return Math.abs(s)}function $(e,t=0){e.length!==t&&(e.length=t)}const J={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},5834(e,t,i){i.d(t,{A:()=>c});var r=i(32198),n=i(93637),s=i(91429),a=i(78888),l=i(41266),o=i(41366),u=i(93223);function d(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let c=class extends((0,o.K)(l.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],c.prototype,"numBins",void 0),(0,r.Cg)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:d}}})],c.prototype,"end",void 0),(0,r.Cg)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:d}}})],c.prototype,"start",void 0),(0,r.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,s.$K)("esri.rest.support.AutoIntervalBinParameters")],c),c.from=(0,a.dp)(c)},41266(e,t,i){i.d(t,{A:()=>m});var r=i(32198),n=i(69540),s=i(66552),a=i(25482),l=i(91429),o=i(78888),u=i(93223);const d=new s.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let c=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,r.Cg)([(0,l.MZ)({type:String,json:{name:"outAlias",write:!0}})],c.prototype,"alias",void 0),(0,r.Cg)([(0,l.MZ)({type:String})],c.prototype,"responseType",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"type",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"value",void 0),(0,r.Cg)([(0,u.e)(d)],c.prototype,"valueType",void 0),c=(0,r.Cg)([(0,l.$K)("esri.rest.support.AttributeBinsGrouping")],c);const h=c;c.from=(0,o.dp)(c);const f=new s.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),p=new s.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends((0,n.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,r.Cg)([(0,l.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],m.prototype,"expression",void 0),(0,r.Cg)([(0,u.e)(f,{name:"onExpression.valueType"})],m.prototype,"expressionValueType",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,r.Cg)([(0,l.MZ)({type:h,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],m.prototype,"splitBy",void 0),(0,r.Cg)([(0,l.MZ)({type:h,json:{write:{target:{stackBy:{type:h},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)=>h.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],m.prototype,"stackBy",void 0),(0,r.Cg)([(0,u.e)(p)],m.prototype,"transformation",void 0),m=(0,r.Cg)([(0,l.$K)("esri.rest.support.BinParametersBase")],m)},9760(e,t,i){i.d(t,{A:()=>d});var r=i(32198),n=i(66552),s=i(25482),a=i(91429),l=i(93223);const o=new n.J({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),u=new n.J({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let d=class extends s.o{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,r.Cg)([(0,l.e)({classBreaksDef:"class-breaks-definition"})],d.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"breakCount",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"classificationField",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{read:o.read,write:o.write}})],d.prototype,"classificationMethod",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"normalizationField",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"normalizationType",void 0),(0,r.Cg)([(0,a.MZ)({value:null,json:{write:!0}})],d.prototype,"standardDeviationInterval",null),(0,r.Cg)([(0,a.MZ)({value:null,json:{write:!0}})],d.prototype,"definedInterval",null),d=(0,r.Cg)([(0,a.$K)("esri.rest.support.ClassBreaksDefinition")],d)},59977(e,t,i){i.d(t,{A:()=>y});var r=i(32198),n=i(93637),s=i(91429),a=i(78888),l=i(41266),o=i(69540),u=i(25482),d=i(57231),c=i(93223);let h=class extends((0,o.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"number",write:!0}})],h.prototype,"value",void 0),(0,r.Cg)([(0,c.e)(d.g)],h.prototype,"unit",void 0),h=(0,r.Cg)([(0,s.$K)("esri.rest.support.DateBinTimeInterval")],h);const f=h;function p(e,t,i){(0,n.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function m(e,t){let i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}h.from=(0,a.dp)(h);let y=class extends l.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,r.Cg)([(0,s.MZ)({cast:e=>null==e?null:"string"==typeof e?e:new Date(e),json:{name:"parameters.end",read:{reader:(e,t)=>m(t,"end")},write:{writer:p}}})],y.prototype,"end",void 0),(0,r.Cg)([(0,s.MZ)({type:f,json:{name:"parameters",write:!0}})],y.prototype,"interval",void 0),(0,r.Cg)([(0,s.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],y.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],y.prototype,"returnFullIntervalBin",void 0),(0,r.Cg)([(0,s.MZ)({cast:e=>null==e?null:"string"==typeof e?e:new Date(e),json:{name:"parameters.start",read:{reader:(e,t)=>m(t,"start")},write:{writer:p}}})],y.prototype,"start",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],y.prototype,"snapToData",void 0),(0,r.Cg)([(0,c.e)({dateBin:"date"},{readOnly:!0})],y.prototype,"type",void 0),y=(0,r.Cg)([(0,s.$K)("esri.rest.support.DateBinParameters")],y),y.from=(0,a.dp)(y)},57231(e,t,i){const r=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});i.d(t,["g",0,r])},11440(e,t,i){i.d(t,{A:()=>u});var r=i(32198),n=i(93637),s=i(91429),a=i(78888),l=i(41266),o=i(93223);let u=class extends l.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,r.Cg)([(0,s.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,n.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,r.Cg)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,r.Cg)([(0,s.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,a.dp)(u)},60909(e,t,i){i.d(t,{A:()=>c});var r=i(32198),n=i(93637),s=i(91429),a=i(78888),l=i(41266),o=i(41366),u=i(93223);function d(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let c=class extends((0,o.K)(l.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,r.Cg)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:d}}})],c.prototype,"end",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],c.prototype,"interval",void 0),(0,r.Cg)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:d}}})],c.prototype,"start",void 0),(0,r.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,s.$K)("esri.rest.support.FixedIntervalBinParameters")],c),c.from=(0,a.dp)(c)},41366(e,t,i){var r=i(32198),n=i(66552),s=i(53966),a=i(91429),l=i(93223);const o=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",d="field";i.d(t,["K",0,e=>{let t=e,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"),t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&d||i&&u||null,t&&i&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===d||e===u)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,l.e)(o,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,r.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i},"Q",0,o])},84892(e,t,i){i.d(t,{t:()=>s});var r=i(53966);function n(e,t){return Number(e.toFixed(t))}function s(e,t){let{normalizationTotal:i}=e;return{classBreaks:a(e,t),normalizationTotal:i}}function a(e,t){let i=e.definition,{classificationMethod:r,normalizationType:s,definedInterval:a}=i,u=i.breakCount??1,d=[],c=e.values;if(0===c.length)return[];c=c.sort((e,t)=>e-t);let[h,f]=t??[c.at(0),c.at(-1)];if("equal-interval"===r)if(c.length>=u){let e=(f-h)/u,t=h;for(let i=1;i<u;i++){let r=n(h+i*e,6);d.push({minValue:t,maxValue:r,label:l(t,r,s)}),t=r}d.push({minValue:t,maxValue:f,label:l(t,f,s)})}else c.forEach(e=>{d.push({minValue:e,maxValue:e,label:l(e,e,s)})});else if("natural-breaks"===r){let t=function(e){let t=[],i=[],r=Number.MIN_VALUE,n=1,s=-1;for(let a=0;a<e.length;a++){let l=e[a];l===r?(n++,i[s]=n):null!==l&&(t.push(l),r=l,n=1,i.push(n),s++)}return{uniqueValues:t,valueFrequency:i}}(c),i=e.valueFrequency||t.valueFrequency,r=o(t.uniqueValues,i,u),a=h;for(let e=1;e<u;e++)if(t.uniqueValues.length>e){let i=n(t.uniqueValues[r[e]],6);d.push({minValue:a,maxValue:i,label:l(a,i,s)}),a=i}d.push({minValue:a,maxValue:f,label:l(a,f,s)})}else if("quantile"===r)if(c.length>=u&&h!==f){let e=h,t=Math.ceil(c.length/u),i=0;for(let r=1;r<u;r++){let n=t+i-1;n>c.length&&(n=c.length-1),n<0&&(n=0),d.push({minValue:e,maxValue:c[n],label:l(e,c[n],s)}),e=c[n],i+=t,t=Math.ceil((c.length-i)/(u-r))}d.push({minValue:e,maxValue:f,label:l(e,f,s)})}else{let e=-1;for(let t=0;t<c.length;t++){let i=c[t];i!==e&&(e=i,d.push({minValue:e,maxValue:i,label:l(e,i,s)}),e=i)}}else if("standard-deviation"===r){let e=function(e){let t=0;for(let i=0;i<e.length;i++)t+=e[i];return t/=e.length,t}(c),t=function(e,t){let i=0;for(let r=0;r<e.length;r++){let n=e[r];i+=(n-t)*(n-t)}return i/=e.length,Math.sqrt(i)}(c,e);if(0===t)d.push({minValue:c[0],maxValue:c[0],label:l(c[0],c[0],s)});else{let i=function(e,t,i,r,n){let s=Math.max(r-e,t-r)/n/i;return s=s>=1?1:s>=.5?.5:.25,s}(h,f,u,e,t)*t,r=0,a=h;for(let t=u;t>=1;t--){let o=n(e-(t-.5)*i,6);d.push({minValue:a,maxValue:o,label:l(a,o,s)}),a=o,r++}let o=n(e+.5*i,6);d.push({minValue:a,maxValue:o,label:l(a,o,s)}),a=o,r++;for(let t=1;t<=u;t++)o=r===2*u?f:n(e+(t+.5)*i,6),d.push({minValue:a,maxValue:o,label:l(a,o,s)}),a=o,r++}}else if("defined-interval"===r){if(!a)return d;let[e,i]=t??[c.at(0),c.at(-1)],r=Math.ceil((i-e)/a),o=e;for(let t=1;t<r;t++){let i=n(e+t*a,6);d.push({minValue:o,maxValue:i,label:l(o,i,s)}),o=i}d.push({minValue:o,maxValue:i,label:l(o,i,s)})}return d}function l(e,t,i){let r=null;return r=e===t?i&&"percent-of-total"===i?e+"%":e.toString():i&&"percent-of-total"===i?e+"% - "+t+"%":e+" - "+t,r}function o(e,t,i){let r=e.length,n=[];i>r&&(i=r);for(let e=0;e<i;e++)n.push(Math.round(e*r/i-1));n.push(r-1);let s=u(n,e,t,i);return function(e,t,i,r,n,s){let a=0,l=0,o=0,u=0,c=!0;for(let h=0;h<2&&c;h++){0===h&&(c=!1);for(let h=0;h<s-1;h++)for(;i[h+1]+1!==i[h+2];){i[h+1]=i[h+1]+1;let s=d(h,i,r,n);o=s.sbMean,a=s.sbSdcm;let f=d(h+1,i,r,n);if(u=f.sbMean,l=f.sbSdcm,!(a+l<t[h]+t[h+1])){i[h+1]=i[h+1]-1;break}t[h]=a,t[h+1]=l,e[h]=o,e[h+1]=u,c=!0}for(let h=s-1;h>0;h--)for(;i[h]!==i[h-1]+1;){i[h]=i[h]-1;let s=d(h-1,i,r,n);o=s.sbMean,a=s.sbSdcm;let f=d(h,i,r,n);if(u=f.sbMean,l=f.sbSdcm,!(a+l<t[h-1]+t[h])){i[h]=i[h]+1;break}t[h-1]=a,t[h]=l,e[h-1]=o,e[h]=u,c=!0}}return c}(s.mean,s.sdcm,n,e,t,i)&&(s=u(n,e,t,i)),n}function u(e,t,i,r){let n=[],s=[],a=[],l=0,o=[],u=[];for(let n=0;n<r;n++){let r=d(n,e,t,i);o.push(r.sbMean),u.push(r.sbSdcm),l+=u[n]}let c,h=l,f=!0;for(;f||l<h;){f=!1,n=[];for(let t=0;t<r;t++)n.push(e[t]);for(let i=0;i<r;i++)for(let n=e[i]+1;n<=e[i+1];n++)if(c=t[n],i>0&&n!==e[i+1]&&Math.abs(c-o[i])>Math.abs(c-o[i-1]))e[i]=n;else if(i<r-1&&e[i]!==n-1&&Math.abs(c-o[i])>Math.abs(c-o[i+1])){e[i+1]=n-1;break}h=l,l=0,s=[],a=[];for(let n=0;n<r;n++){s.push(o[n]),a.push(u[n]);let r=d(n,e,t,i);o[n]=r.sbMean,u[n]=r.sbSdcm,l+=u[n]}}if(l>h){for(let t=0;t<r;t++)e[t]=n[t],o[t]=s[t],u[t]=a[t];l=h}return{mean:o,sdcm:u}}function d(e,t,i,n){let s=0,a=0;for(let r=t[e]+1;r<=t[e+1];r++){let e=n[r];s+=i[r]*e,a+=e}a<=0&&r.A.getLogger("esri.rest.support.generateRendererUtils").warn("Exception in Natural Breaks calculation");let l=s/a,o=0;for(let r=t[e]+1;r<=t[e+1];r++)o+=n[r]*(i[r]-l)**2;return{sbMean:l,sbSdcm:o}}},1873(e,t,i){i.d(t,{$y:()=>V,Ak:()=>P,FM:()=>p,G_:()=>h,Rw:()=>O,Vb:()=>d,b3:()=>A,gJ:()=>u,jM:()=>N,lv:()=>b,oZ:()=>E,qg:()=>f,sU:()=>z,z9:()=>c,zS:()=>C});var r=i(9760),n=i(84892);const s=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,a=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),l=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),o=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function u(e){return null==e||"string"==typeof e&&!e?"<Null>":e}function d(e){let t=null!=e.normalizationField||null!=e.normalizationType,i=null!=e.minValue||null!=e.maxValue,r=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!i&&!r}function c(e){let{outStatisticTypes:t}=e,i=e.returnDistinct?[...new Set(e.values)]:e.values,r=i.filter(e=>null!=e).sort(),n=r.length,s={count:n,min:r[0],max:r[n-1]};return e.supportsNullCount&&(s.nullcount=i.length-n),!e.percentileParams||t?.include?.length&&!t.include.includes("median")||t?.exclude?.length&&t.exclude.includes("median")||(s.median=f(i,e.percentileParams)),s}function h(e){let{values:t,useSampleStdDev:i,supportsNullCount:r,outStatisticTypes:n}=e,s=1/0,a=-1/0,l=null,o=null,u=null,d=null,c=0,h=null==e.minValue?-1/0:e.minValue,p=null==e.maxValue?1/0:e.maxValue;for(let e of t)Number.isFinite(e)?e>=h&&e<=p&&(l=null===l?e:l+e,s=Math.min(s,e),a=Math.max(a,e),c++):"string"==typeof e&&c++;if(c&&null!=l){o=l/c;let e=0;for(let i of t)Number.isFinite(i)&&i>=h&&i<=p&&(e+=(i-o)**2);d=i?c>1?e/(c-1):0:c>0?e/c:0,u=Math.sqrt(d)}else s=null,a=null;let m={avg:o,count:c,max:a,min:s,stddev:u,sum:l,variance:d};return r&&(m.nullcount=t.length-c),!e.percentileParams||n?.include?.length&&!n.include.includes("median")||n?.exclude?.length&&n.exclude.includes("median")||(m.median=f(t,e.percentileParams)),m}function f(e,t){let{fieldType:i,value:r,orderBy:n,isDiscrete:s}=t,a=p(i,"desc"===n,"case-insensitive");if(e=[...e].filter(e=>null!=e).sort((e,t)=>a(e,t)),0===e.length)return null;if(r<=0)return e[0];if(r>=1)return e[e.length-1];let l=(e.length-1)*r,o=Math.floor(l),u=o+1,d=l%1,c=e[o],h=e[u];return u>=e.length||s||"string"==typeof c||"string"==typeof h?c:c*(1-d)+h*d}function p(e,t,i="case-sensitive"){if(e){if(a.has(e))return w(t);if(l.has(e))return S(t,!0);if("esriFieldTypeTimestampOffset"===e)return function(e){return e?v:x}(t);let r=S(t,"case-sensitive"===i);if("esriFieldTypeString"===e)return r;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,t)=>r(R(e),R(t))}let r=t?1:-1,n=w(t),s=S(t,"case-sensitive"===i),o=g(t);return(e,t)=>"number"==typeof e&&"number"==typeof t?n(e,t):"string"==typeof e&&"string"==typeof t?s(e,t):o(e,t)??r}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()),v=(e,t)=>m(e,t)??(e===t?0:new Date(t).getTime()-new Date(e).getTime()),_=(e,t)=>y(e,t)??(e===t?0:e<t?-1:1),T=(e,t)=>m(e,t)??(e===t?0:e<t?1:-1);function S(e,t){if(t)return e?T:_;let i=g(e);return e?(e,t)=>i(e,t)??((e=e.toUpperCase())>(t=t.toUpperCase())?-1:+(e<t)):(e,t)=>i(e,t)??((e=e.toUpperCase())<(t=t.toUpperCase())?-1:+(e>t))}const F=(e,t)=>m(e,t)??t-e,I=(e,t)=>y(e,t)??e-t;function w(e){return e?F:I}function R(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 E(e,t,i){let r;for(r in e)t?.include?.length&&!t.include.includes(r)||t?.exclude?.length&&t.exclude.includes(r)?delete e[r]:o.includes(r)&&(Number.isFinite(e[r])||(e[r]=null));return i&&["avg","stddev","variance"].forEach(t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))}),e}function A(e){let 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,r){let n=e.count,s=[];if(i&&t){let e=[],i=M(t[0]);for(let n of i)if(t[1]){let i=M(t[1]);for(let s of i)if(t[2]){let i=M(t[2]);for(let t of i)e.push(`${u(n)}${r}${u(s)}${r}${u(t)}`)}else e.push(`${u(n)}${r}${u(s)}`)}else e.push(n);for(let t of e)n.hasOwnProperty(t)||(n[t]={data:t,count:0})}for(let e in n){let t=n[e];s.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:s}}function C(e,t,i,r){let n=null;switch(t){case"log":0!==e&&(n=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(r)&&0!==r&&(n=e/r*100);break;case"field":Number.isFinite(i)&&0!==i&&(n=e/i);break;case"natural-log":e>0&&(n=Math.log(e));break;case"square-root":e>0&&(n=e**.5)}return n}function O(e,t,i){let s=function(e){let{breakCount:t,field:i,normalizationField:n,normalizationType:s}=e,a=e.classificationMethod||"equal-interval",l="standard-deviation"===a?e.standardDeviationInterval||1:void 0,o="defined-interval"===a?e.definedInterval:void 0;return new r.A({breakCount:t,classificationField:i,classificationMethod:a,normalizationField:"field"===s?n:void 0,normalizationType:s,standardDeviationInterval:l,definedInterval:o})}({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){let r=t??-1/0,n=i??1/0;return e.filter(e=>Number.isFinite(e)&&e>=r&&e<=n)}(e,t.minValue,t.maxValue),(0,n.t)({definition:s,values:e,normalizationTotal:t.normalizationTotal},i)}function N(e,t){let i=e.classBreaks,r=i.length,n=i[0]?.minValue,a=i[r-1]?.maxValue,l="standard-deviation"===t,o=s;return i=i.map(e=>{let t=e.label,i={minValue:e.minValue,maxValue:e.maxValue,label:t};if(l&&t){let e=t.match(o)?.map(e=>+e.trim())??[];2===e.length?(i.minStdDev=e[0],i.maxStdDev=e[1],e[0]<0&&e[1]>0&&(i.hasAvg=!0)):1===e.length&&(t.includes("<")?(i.minStdDev=null,i.maxStdDev=e[0]):t.includes(">")&&(i.minStdDev=e[0],i.maxStdDev=null))}return i}),{minValue:n,maxValue:a,classBreakInfos:i,normalizationTotal:e.normalizationTotal}}function V(e,t){let i=z(e,t);if(null==i.min&&null==i.max)return{bins:[],minValue:i.min,maxValue:i.max,normalizationTotal:t.normalizationTotal};let r=i.intervals,n=i.min??0,s=i.max??0,a=r.map((e,t)=>({minValue:r[t][0],maxValue:r[t][1],count:0}));for(let t of e)if(null!=t&&t>=n&&t<=s){let e=P(r,t);e>-1&&a[e].count++}return{bins:a,minValue:n,maxValue:s,normalizationTotal:t.normalizationTotal}}function z(e,t,i=!1){let{field:r,classificationMethod:n,standardDeviationInterval:s,definedInterval:a,normalizationType:l,normalizationField:o,normalizationTotal:u,minValue:c,maxValue:f}=t,p=t.numBins||10,m=null,y=null,g=null;if(n&&"equal-interval"!==n||l){let{classBreaks:t}=O(e,{field:r,normalizationType:l,normalizationField:o,normalizationTotal:u,classificationMethod:n,standardDeviationInterval:s,definedInterval:a,minValue:c,maxValue:f,numClasses:p},null!=c&&null!=f?[c,f]:void 0);m=t[0]?.minValue,y=t[t.length-1]?.maxValue,g=t.map(e=>[e.minValue,e.maxValue])}else{if(null!=c&&null!=f)m=c,y=f;else{let t=h({values:e,minValue:c,maxValue:f,useSampleStdDev:!l,supportsNullCount:d({normalizationType:l,normalizationField:o,minValue:c,maxValue:f})});m=t.min??null,y=t.max??null}g=function(e,t,i){let r,n=(t-e)/i,s=[],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,p)}if(i&&g.length){let e=g.at(-1)[1];g.push([e,e])}return{min:m,max:y,intervals:g}}function P(e,t){let i=-1;for(let r=e.length-1;r>=0;r--)if(t>=e[r][0]){i=r;break}return i}},92359(e,t,i){i.d(t,{nu:()=>h,W6:()=>u}),i(4576),i(71511),i(44208),i(53966);var r=i(17676),n=(i(36708),i(44794),i(78659)),s=i(32198),a=i(69622),l=i(91429);let o=class extends a.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,s.Cg)([(0,l.MZ)()],o.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,s.Cg)([(0,l.MZ)()],o.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),o=(0,s.Cg)([(0,l.$K)("esri.views.support.debugFlags")],o),new o,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",SCREEN_POLYGON_INTERSECTION:"screen polygon intersection",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.SCREEN_POLYGON_INTERSECTION,0],[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,n.l5)(6.5),(0,n.l5)(1),(0,n.l5)(30),(0,n.l5)(1e3/30),(0,n.l5)(100),Symbol.dispose;const d=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}};d.enabled=!1;class c{remove(){}[Symbol.dispose](){this.remove()}processQueue(){}schedule(e,t,i){try{if((0,r.G4)(t)){let e=(0,r.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,r.z7)(e(d))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,r.G4)(t)){let e=(0,r.NK)();if(i)return i(e);throw e}let n=e(d);for(;;){let e=n.next(d),s=(0,r.$X)(e)?await e:e;if((0,r.G4)(t)){let e=(0,r.NK)();if(i){let t=i(e),s=n.return(null);return(0,r.$X)(s)&&await(0,r.QZ)(s),t}let t=n.throw(e);throw(0,r.$X)(t)&&await(0,r.QZ)(t),e}if(s.done)return s.value}}}const h=new c}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4943],{54943(e,t,i){i.d(t,{createSampler:()=>z,query:()=>C});var l=i(60999),a=i(49186),n=i(44208),s=i(97768),r=i(17676),o=i(86211),u=i(99917),c=i(19419),h=i(4576),p=i(72802);class f{constructor(e,t){this.layer=e,this.parameters=t}}class m extends f{constructor(e,t,i){super(e,i),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{let{tileInfo:t,tilemapCache:i}=this.layer,l=x(t,i)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(l,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(let e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(let t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(let t of this.geometry.coordinates){let i=t.tile?.id;t.tile=i?e[i]:null}}getTilesToFetch(){return(0,h.Am)(this.geometry.coordinates.filter(({tile:e,elevationTile:t})=>e?.id&&!t),(e,t)=>e.tile?.id===t.tile?.id).map(({tile:e})=>e)}forEachTileToFetch(e){for(let t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>t.tile=null)}}class d extends f{constructor(e,t,i,l){super(e,i),this.maskExtents=l,this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent)}selectTilesAtLOD(e,t){let i=this._maximumLodForRequests(t),l=Math.min(i,e);l<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(l)}_maximumLodForRequests(e){let{tileInfo:t,tilemapCache:i}=this.layer,l=x(t,i);if(!e)return l.length-1;let a=this.extent;if(null==a)return-1;for(let i=l.length-1;i>=0;i--){let n=l[i],s=n.resolution*t.size[0],r=n.resolution*t.size[1];if(Math.ceil(a.width/s)*Math.ceil(a.height/r)<=e)return i}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(let t of this._candidateTiles){let i=t.id&&e[t.id];i&&(this._fetchedCandidates.add(t),this.elevationTiles.push(i))}}remapTiles(e){this._candidateTiles=v(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){let i=this._candidateTiles;this._candidateTiles=[],i.forEach(i=>{if(this._fetchedCandidates.has(i))return void t?.(i);let l=!1;e(i,()=>l=!0),l?t?.(i):this._candidateTiles.push(i)}),this._candidateTiles=v(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;let t=this.extent;if(null==t)return;let{tileInfo:i,tilemapCache:l}=this.layer,a=x(i,l)[e],n=i.tileAt(a.level,t.xmin,t.ymin),s=n.extent,r=a.resolution*i.size[0],o=a.resolution*i.size[1],u=Math.ceil((t.xmax-s[0])/r),c=Math.ceil((t.ymax-s[1])/o);for(let e=0;e<c;e++)for(let t=0;t<u;t++){let l=new p.U(n.level,n.row-e,n.col+t);i.updateTileInfo(l),this._tileIsMasked(l)||this._candidateTiles.push(l)}}_tileIsMasked(e){return this.maskExtents?.some(t=>(0,c.gR)(t,e.extent))??!1}}function y(e){return null!=e?.tileInfo}function x(e,t){let i=e.lods;if(y(t)){let{effectiveMinLOD:e,effectiveMaxLOD:l}=t;return i.filter(t=>t.level>=e&&t.level<=l)}return i}function v(e,t){let i={},l=[];for(let a of e){let e=a.id;e&&!i[e]?(i[e]=a,l.push(a)):t?.(a)}let a=l.sort((e,t)=>e.level-t.level);return a.filter((e,i)=>{for(let l=0;l<i;l++){let i=a[l].extent;if(i&&(0,c.gR)(i,e.extent))return t?.(e),!1}return!0})}class w{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class g{constructor(e,t=null){if(this.key=e,null!=t){let i=e.extent;this._samplerData=new w(t,i)}}get zmin(){return null==this._samplerData?0:this._samplerData.data.minValue}get zmax(){return null==this._samplerData?0:this._samplerData.data.maxValue}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;let{safeWidth:i,data:l,dx:a,dy:n,y1:s,x0:r}=this._samplerData,{width:o,values:u,noDataValue:c}=l,h=T(n*(s-t),0,i),p=T(a*(e-r),0,i),f=Math.floor(h),m=Math.floor(p),d=f*o+m,y=d+o,x=u[d],v=u[y],w=u[d+1],g=u[y+1];if(x!==c&&v!==c&&w!==c&&g!==c){let e=p-m,t=x+(w-x)*e;return t+(v+(g-v)*e-t)*(h-f)}}}function T(e,t,i){return e<t?t:e>i?i:e}var R=i(87378),A=i(10292),D=i(32198),E=i(53966),_=i(91429),I=i(16930),V=i(7236);let q=class extends V.A{get spatialReference(){return this.extent.spatialReference}constructor(e){let t=e.noDataValue,i="tiles"in e?e.tiles.map(i=>new M({tile:i,tileInfo:e.tileInfo,noDataValue:t})):e.samplers;super({noDataValue:t,samplers:i});let l=i[0];if(l){this.extent=l.extent.clone();let{min:e,max:t}=l.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<i.length;e++){let t=i[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else{let t="tileInfo"in e?e.tileInfo:null;this.extent=(0,c.w1)((0,c.vt)(),t?.spatialReference??I.A.WGS84),this.demResolution={min:0,max:0}}}elevationAt(e,t){let i;for(let l of this.samplers)if(l.containsAt(e,t)&&(i=l.elevationAt(e,t),i!==l.noDataValue))return i;return i??(E.A.getLogger(this).warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}};(0,D.Cg)([(0,_.MZ)({constructOnly:!0})],q.prototype,"noDataValue",void 0),(0,D.Cg)([(0,_.MZ)({constructOnly:!0})],q.prototype,"samplers",void 0),q=(0,D.Cg)([(0,_.$K)("esri.layers.support.TileElevationSampler")],q);let M=class extends V.A{get spatialReference(){return this.extent.spatialReference}constructor(e){super(e);let t=e.tile.key.extent;this.extent=(0,c.w1)(t,e.tileInfo.spatialReference),this.extent.zmin=e.tile.zmin,this.extent.zmax=e.tile.zmax;let i=(0,o.GA)(e.tileInfo.spatialReference),l=e.tileInfo.lodAt(e.tile.key.level).resolution*i;this.demResolution={min:l,max:l}}contains(e){let t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,c.Rj)(this.tile.key.extent,e,t)}elevationAt(e,t){return this.containsAt(e,t)?this.tile.sample(e,t)??this.noDataValue:this.noDataValue}};async function C(e,t,i){if(!e)throw new a.A($,"Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof A.q)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new a.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");let l={...Z,...i},r=l.signal;if("integrated-mesh-3dtiles"===e.type){let a=A.q.fromGeometry(t);if(e.queryElevationCallback&&((0,n.A)("enable-feature:im-as-ground")?e.isUsedAsGroundLayer:e.replacesTerrain)){let n=12.9*(i?.minDemResolution||0)+.71,s=await(await e.queryElevationCallback(a,{signal:r,maxGeometricError:n})).project(t.spatialReference,r);if(s){if(void 0!==l.noDataValue&&l.noDataValue!==Number.MAX_VALUE)for(let e of s.coordinates)e.z===Number.MAX_VALUE&&(e.z=l.noDataValue);let t=l.noDataValue??Number.MAX_VALUE,i=s.coordinates.map(i=>({demResolution:i.z===t?-1:1,source:e}));return{geometry:s.export(),noDataValue:t,sampleInfo:i}}}let s=a.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:a.export(),noDataValue:Number.MAX_VALUE,sampleInfo:s}}if("integrated-mesh"===e.type){let i=A.q.fromGeometry(t),l=i.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:i.export(),noDataValue:Number.MAX_VALUE,sampleInfo:l}}let c=new m(e,t.spatialReference,l);return await e.load({signal:r}),await async function(e,t,i){let l,n=e.layer.tileInfo.spatialReference;if(t instanceof A.q?l=await t.project(n,i):(await(0,u.initializeProjection)([{source:t.spatialReference,dest:n}],{signal:i}),l=(0,u.project)(t,n)),!l)throw new a.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${n.wkid}'`);e.geometry=A.q.fromGeometry(l)}(c,t,r),await L(c,r),await O(c,r),function(e){e.geometry.coordinates.forEach(t=>{let i=t.elevationTile,l=e.parameters.noDataValue;if(i){let e=i.sample(t.x,t.y);null==e?t.elevationTile=null:l=e}t.z=l})}(c),async function(e,t){let i=await e.geometry.project(e.outSpatialReference,t);(0,s.Lw)(i);let l={geometry:i.export(),noDataValue:e.parameters.noDataValue};return e.parameters.returnSampleInfo&&(l.sampleInfo=function(e){let t=e.layer.tileInfo,i=(0,o.GA)(t.spatialReference);return e.geometry.coordinates.map(l=>{let a=-1;return l.elevationTile&&l.elevationTile!==e.outsideExtentTile&&(a=t.lodAt(l.elevationTile.key.level).resolution*i),{demResolution:a,source:-1===a?void 0:e.layer}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),l}(c,r)}async function z(e,t,i){if(e=Array.isArray(e)?e:[e],0===(e=i?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new a.A($,"Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new a.A("elevation-query:invalid-extent","Invalid or undefined extent");let l={...Z,...i,returnSampleInfo:!0},n=k(e[e.length-1],t,l);return 1===e.length?n:b(e,t,await n,l)}async function k(e,t,i,l){let a=i.signal;await e.load({signal:a});let n=t.spatialReference,s=e.tileInfo.spatialReference;n.equals(s)||(await(0,u.initializeProjection)([{source:n,dest:s}],{signal:a}),t=(0,u.project)(t,s));let r=new d(e,t,i,l);await L(r,a),await O(r,a);let o=r.elevationTiles,c=r.layer.tileInfo,h=r.parameters.noDataValue;return new q({noDataValue:h,tiles:o,tileInfo:c})}async function b(e,t,i,l){if(e.pop(),!e.length)return i;let a=i.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,c.VY)(e.extent)),n=await k(e[e.length-1],t,l,a);if(0===n.samplers.length)return i;let s=i.samplers.concat(n.samplers),r=l.noDataValue;return b(e,t,new q({samplers:s,noDataValue:r}),l)}async function L(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;let t=new g(new p.U(-1,-1,-1));t.sample=()=>e.parameters.noDataValue,e.outsideExtentTile=t;let i=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{let l=e.x,a=e.y;(l<i.xmin||l>i.xmax||a<i.ymin||a>i.ymax)&&(e.elevationTile=t)})}(e);let i=e.parameters.demResolution;if("number"==typeof i)!function(e,t){let i=function(e,t){let{tileInfo:i,tilemapCache:l}=e.layer,a=t/(0,o.GA)(i.spatialReference),n=x(i,l),s=n[0],r=0;for(let e=1;e<n.length;e++){let t=n[e];Math.abs(t.resolution-a)<Math.abs(s.resolution-a)&&(s=t,r=e)}return r}(e,t);e.selectTilesAtLOD(i)}(e,i);else if("finest-contiguous"===i)await async function(e,t){let{tileInfo:i,tilemapCache:l}=e.layer;await j(e,F(i,l,e.parameters.minDemResolution),t)}(e,t);else{if("auto"!==i)throw new a.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${i}', expected a number, "finest-contiguous" or "auto"`);await async function(e,t){(function(e){let{tileInfo:t,tilemapCache:i}=e.layer,l=F(t,i,e.parameters.minDemResolution);e.selectTilesAtLOD(l,e.parameters.maximumAutoTileRequests)})(e),function(e){let t=e.layer.tileInfo,i=0,l={},a=e=>{null!=e.id&&(e.id in l?l[e.id]++:(l[e.id]=1,i++))},n=e=>{if(null==e.id)return;let t=l[e.id];1===t?(delete l[e.id],i--):l[e.id]=t-1};e.forEachTileToFetch(a,n);let s=!0;for(;s&&(s=!1,e.forEachTileToFetch(l=>{i<=e.parameters.maximumAutoTileRequests||(n(l),t.upsampleTile(l)&&(s=!0),a(l))},n),s););}(e);let i=e.layer.tilemapCache;if(!i||y(i))return S(e,t);let a=e.getTilesToFetch(),n={},s=a.map(async e=>{let a=new p.U(0,0,0),s=await(0,l.Ke)(i.fetchAvailabilityUpsample(e.level,e.row,e.col,a,{signal:t}));!1===s.ok?(0,r.QP)(s.error):null!=e.id&&(n[e.id]=a)});await(0,r.qr)(Promise.all(s),t),e.remapTiles(n)}(e,t)}}async function j(e,t,i){let l=e.layer;if(e.selectTilesAtLOD(t),t<0)return;let n=l.tilemapCache,s=e.getTilesToFetch();try{if(n&&!y(n))await(0,r.qr)(Promise.all(s.map(e=>n.fetchAvailability(e.level,e.row,e.col,{signal:i}))),i);else if(await O(e,i),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new a.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(l){(0,r.QP)(l),await j(e,t-1,i)}}async function S(e,t){let i=e.layer.tileInfo;await O(e,t);let l=!1;e.forEachTileToFetch((e,t)=>{i.upsampleTile(e)?l=!0:t()}),l&&await S(e,t)}function F(e,t,i=0){let l=x(e,t),a=l.length-1;if(i>0){let t=i/(0,o.GA)(e.spatialReference),n=l.findIndex(e=>e.resolution<t);0===n?a=0:n>0&&(a=n-1)}return a}(0,D.Cg)([(0,_.MZ)({constructOnly:!0})],M.prototype,"tile",void 0),(0,D.Cg)([(0,_.MZ)({constructOnly:!0})],M.prototype,"noDataValue",void 0),(0,D.Cg)([(0,_.MZ)({constructOnly:!0})],M.prototype,"tileInfo",void 0),M=(0,D.Cg)([(0,_.$K)("esri.layers.support.TileElevationSampler.SingleTileElevationSampler")],M);const Z={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0,signal:null};async function O(e,t){let i=e.getTilesToFetch(),l={},a=e.parameters.cache,n=e.parameters.noDataValue,s={noDataValue:n,signal:t},o=i.map(async t=>{if(null==t.id)return;let i=`${e.layer.uid}:${t.id}:${n}`,r=a?.get(i)??R.A.from(await e.layer.fetchTile(t.level,t.row,t.col,s));a?.put(i,r),l[t.id]=new g(t,r)});await(0,r.qr)(Promise.allSettled(o),t),e.populateElevationTiles(l)}const $="elevation-query:invalid-layer"},7236(e,t,i){i.d(t,{A:()=>u});var l=i(32198),a=i(65529),n=i(53966),s=i(91429),r=i(86738),o=i(28735);let u=class extends a.nJ{queryElevation(e){let t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;switch(e.type){case"point":return function(e,t,i){return e.hasZ=!0,e.z=i.elevationAt(t.x,t.y),e}(e,t,this);case"polyline":return function(e,t,i){c.spatialReference=t.spatialReference;let l=e.hasM&&!e.hasZ;for(let a=0;a<e.paths.length;a++){let n=e.paths[a],s=t.paths[a];for(let e=0;e<n.length;e++){let t=n[e],a=s[e];c.x=a[0],c.y=a[1],l&&(t[3]=t[2]),t[2]=i.elevationAt(c.x,c.y)}}return e.hasZ=!0,e}(e,t,this);case"multipoint":return function(e,t,i){c.spatialReference=t.spatialReference;let l=e.hasM&&!e.hasZ;for(let a=0;a<e.points.length;a++){let n=e.points[a],s=t.points[a];c.x=s[0],c.y=s[1],l&&(n[3]=n[2]),n[2]=i.elevationAt(c.x,c.y)}return e.hasZ=!0,e}(e,t,this);default:return null}}projectIfRequired(e,t){if(null==e)return null;let i=e.spatialReference;if(i.equals(t))return e;let l=(0,o.Cv)(e,t);return l||n.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${i.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),l}};u=(0,l.Cg)([(0,s.$K)("esri.layers.support.ElevationSampler")],u);const c=new r.A},10292(e,t,i){i.d(t,{q:()=>r});var l=i(48526),a=i(86738),n=i(82799),s=i(99917);class r{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){let t=new r(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,s.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});let i=new l.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),a=(0,s.project)(i,e);if(!a)return null;let n=this.coordinates.map((e,t)=>{let i=e.clone(),l=a.points[t];return i.x=l[0],i.y=l[1],i}),r=this.clone(n);return r.spatialReference=e,r}projectSync(e){if(this.spatialReference.equals(e))return this.clone();let t=new l.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,s.project)(t,e);if(!i)return null;let a=this.coordinates.map((e,t)=>{let l=e.clone(),a=i.points[t];return l.x=a[0],l.y=a[1],l}),n=this.clone(a);return n.spatialReference=e,n}static fromGeometry(e){let t=new r(e);if(e instanceof r)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,i)=>{let l=e.clone(t);return l.spatialReference=i,l},t;switch(e.type){case"point":{let i=e,{hasZ:l,hasM:n}=i;return t.coordinates=l&&n?[new o(i.x,i.y,i.z,i.m)]:l?[new o(i.x,i.y,i.z)]:n?[new o(i.x,i.y,null,i.m)]:[new o(i.x,i.y)],t._exporter=(t,i)=>e.hasM?new a.A(t[0].x,t[0].y,t[0].z,t[0].m,i):new a.A(t[0].x,t[0].y,t[0].z,i),t}case"multipoint":{let i=e,{hasZ:a,hasM:n}=i;return t.coordinates=a&&n?i.points.map(e=>new o(e[0],e[1],e[2],e[3])):a?i.points.map(e=>new o(e[0],e[1],e[2])):n?i.points.map(e=>new o(e[0],e[1],null,e[2])):i.points.map(e=>new o(e[0],e[1])),t._exporter=(t,i)=>e.hasM?new l.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:i}):new l.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:i}),t}case"polyline":{let i=e,l=[],a=[],{hasZ:s,hasM:r}=e,u=0;for(let e of i.paths)if(a.push([u,u+e.length]),u+=e.length,s&&r)for(let t of e)l.push(new o(t[0],t[1],t[2],t[3]));else if(s)for(let t of e)l.push(new o(t[0],t[1],t[2]));else if(r)for(let t of e)l.push(new o(t[0],t[1],null,t[2]));else for(let t of e)l.push(new o(t[0],t[1]));return t.coordinates=l,t._exporter=(t,i)=>{let l=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),s=a.map(e=>l.slice(e[0],e[1]));return new n.A({paths:s,hasM:e.hasM,hasZ:!0,spatialReference:i})},t}}}}class o{constructor(e,t,i=null,l=null,a=null,n=null){this.x=e,this.y=t,this.z=i,this.m=l,this.tile=a,this.elevationTile=n}clone(){return new o(this.x,this.y,this.z,this.m)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5804,6553,7885],{46130(e,t,r){r.d(t,{v:()=>s});var i=r(76553);function s(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},60999(e,t,r){r.d(t,{DZ:()=>y,Ke:()=>h,QA:()=>f,Tj:()=>d,UT:()=>g,aD:()=>v,jJ:()=>u});var i=r(32198),s=r(69622),o=r(97768),n=r(17676),a=r(10107),l=r(64108);function u(e,t,r){return(0,n.Lx)(e.map((e,i)=>t.apply(r,[e,i])))}async function d(e,t,r){return(await(0,n.Lx)(e.map((e,i)=>t.apply(r,[e,i])))).map(e=>e.value)}function p(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return p(await e)}catch(e){return c(e)}}async function y(e){try{return p(await e)}catch(e){return(0,n.QP)(e),c(e)}}function f(e){if(!0===e.ok)return e.value;throw e.error}function g(e,t){return new m(e,t)}let m=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,o.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=p(e),this._cleanup()},e=>{this._result=c(e),this._cleanup()}),this._abortHandle=(0,n.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,o.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,a.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m);class v{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},56512(e,t,r){function i(e){let t,r,i=[],s=!1;return function(...o){return s&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(o,i)||(r=e.apply(this,o),t=this,i=o,s=!0),r}}r.d(t,{B:()=>i})},76553(e,t,r){function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},54239(e,t,r){r.d(t,{A:()=>m});var i,s=r(32198),o=r(4576),n=r(66552),a=r(25482),l=r(86211),u=r(67076),d=r(91429),p=r(97348),c=r(43937),h=r(36005);const y=(0,n.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,o.Xy)(f,"orthometric");const g=(0,n.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=i=class extends a.o{constructor(e){super(e),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(e,t){super.read(e,t),("service"===t?.origin||"web-scene"===t?.origin)&&(this.origin="service"===t.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static fromSpatialReference(e){let{latestVcsWkid:t,vcsWkid:r}=e;if(!r)return null;let s=(null==t?null:p.B.get(t))??p.B.get(r);return s?new i({heightModel:0===s.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,l.LA)(s.unit.name),vertCRS:s.datum,origin:3,associatedSpatialReference:e}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;let t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,d.MZ)()],m.prototype,"origin",void 0),(0,s.Cg)([(0,d.MZ)()],m.prototype,"associatedSpatialReference",void 0),(0,s.Cg)([(0,d.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0,alwaysWriteDefaults:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,c.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,h.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,d.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,h.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,h.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,d.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,h.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,s.Cg)([(0,d.$K)("esri.geometry.HeightModelInfo")],m)},99959(e,t,r){r.d(t,{A:()=>o});var i=r(32198),s=r(91429);let o=class{};o=(0,i.Cg)([(0,s.$K)("esri.graphic.GraphicOrigin")],o)},89808(e,t,r){const i=Symbol("getSliceableSymbol");r.d(t,["Q",0,i])},77885(e,t,r){r.r(t),r.d(t,{default:()=>le});var i=r(32198),s=r(40124),o=r(56507),n=r(69540),a=r(49186),l=r(4718),u=r(53966),d=r(25728),p=r(93637),c=r(17676),h=r(84952),y=r(91429),f=r(41910),g=r(60950),m=r(89808),v=r(99959);const w=Symbol("isPointCloudGraphicOrigin");var S;class I extends v.A{get[(S=w,g.ym)](){return this.layer}get[m.Q](){return this.layer}get[f.e7](){return this.layer}constructor(e){super(),this[S]=!0,this.type="point-cloud",this.layer=e}get id(){return this.layer.id}}var C=r(4146),b=r(52136),A=r(18768),P=r(69208),R=r(34287),x=r(8303),M=r(25036),_=r(58947),T=r(78888),E=r(25482);let L=class extends E.o{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,i.Cg)([(0,y.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],L.prototype,"field",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,nonNullable:!0,json:{read:!1,write:{isRequired:!0}}})],L.prototype,"type",void 0),L=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudFilter")],L);const O=L;var U,j=r(93223);let F=U=class extends O{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new U({field:this.field,requiredClearBits:(0,l.o8)(this.requiredClearBits),requiredSetBits:(0,l.o8)(this.requiredSetBits)})}};(0,i.Cg)([(0,y.MZ)({type:[T.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],F.prototype,"requiredClearBits",void 0),(0,i.Cg)([(0,y.MZ)({type:[T.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],F.prototype,"requiredSetBits",void 0),(0,i.Cg)([(0,j.e)({pointCloudBitfieldFilter:"bitfield"})],F.prototype,"type",void 0),F=U=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],F);const Z=F;var $;let N=$=class extends O{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new $({field:this.field,includedReturns:(0,l.o8)(this.includedReturns)})}};(0,i.Cg)([(0,y.MZ)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],N.prototype,"includedReturns",void 0),(0,i.Cg)([(0,j.e)({pointCloudReturnFilter:"return"})],N.prototype,"type",void 0),N=$=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],N);const K=N;var q;let k=q=class extends O{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new q({field:this.field,mode:this.mode,values:(0,l.o8)(this.values)})}};(0,i.Cg)([(0,y.MZ)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],k.prototype,"mode",void 0),(0,i.Cg)([(0,j.e)({pointCloudValueFilter:"value"})],k.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],k.prototype,"values",void 0),k=q=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudValueFilter")],k);const B={key:"type",base:O,typeMap:{value:k,bitfield:Z,return:K}};var H,D=r(10873),G=r(20437),V=r(17036),z=r(93705),Y=r(63531),J=r(51857);let Q=H=class extends J.A{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new H({...this.cloneProperties(),field:(0,l.o8)(this.field)})}};(0,i.Cg)([(0,j.e)({pointCloudRGBRenderer:"point-cloud-rgb"})],Q.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({type:String,json:{write:{isRequired:!0}}})],Q.prototype,"field",void 0),Q=H=(0,i.Cg)([(0,y.$K)("esri.renderers.PointCloudRGBRenderer")],Q);const W=Q;var X=r(69846),ee=r(48425);const te={key:"type",base:J.A,typeMap:{"point-cloud-class-breaks":Y.A,"point-cloud-rgb":W,"point-cloud-stretch":X.A,"point-cloud-unique-value":ee.A},errorContext:"renderer"};var re=r(24212),ie=r(30291),se=r(36005),oe=r(43937);const ne=(0,V.p)();let ae=class extends((0,_.w6)((0,A.b)((0,R.q)((0,x.A)((0,M.j)((0,d.M)((0,P.d)((0,b.p)((0,n.OU)(C.A)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud",this.graphicOrigin=new I(this),this.rootPagePromise=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){let t=this.fieldsIndex.get(e);return t?.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map(e=>{let t=new G.A;return"FieldTypeInteger"===e.type&&((e=(0,l.o8)(e)).type="esriFieldTypeInteger"),t.read(e,r),t}):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map(e=>new G.A({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){(null==e||"absolute-height"===e.mode)&&this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,t,r,i){(0,p.sM)("layerDefinition.drawingInfo.renderer",e.write({},i),t)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP),await this._fetchService(e?.signal),await this._fetchRootPageAndUpdateExtent(e?.signal)}async _fetchRootPageAndUpdateExtent(e){this.rootPagePromise=this._fetchRootPage(e),this.rootPagePromise.catch(()=>{});let{fullExtent:t}=this;if(null!=t&&!t.hasZ){let e=await this.rootPagePromise;(0,_.qM)(t,e?.nodes?.[0]?.obb)}}async _fetchRootPage(e){let t=`${this.parsedUrl?.path??""}/nodepages/0`;try{return(await(0,o.A)(t,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data}catch(e){throw new a.A("pointcloudlayer:root-page-missing","Root page missing.",{error:e,url:t})}}createPopupTemplate(e){let t=(0,ie.tn)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){let t=this.fieldsIndex.get("RETURNS");if(!t)return;let r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;let i=new z.A({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){let t=this.fieldsIndex.get("RGB");if(!t)return;let r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;let i=new z.A({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new a.A("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");let r=this.fieldsIndex.get(e);if(!r)throw new a.A("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(let e of this.attributeStorageInfo)if(e.name===r.name){let r=(0,h.fj)(this.parsedUrl?.path??"",`./statistics/${e.key}`);return(0,o.A)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then(e=>e.data)}throw new a.A("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"})}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new a.A("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new a.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(t=>t.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){(0,re.XF)(u.A.getLogger(this),(0,re.B)("Point cloud layers","absolute-height",e)),(0,re.XF)(u.A.getLogger(this),(0,re.tW)("Point cloud layers",e))}};(0,i.Cg)([(0,y.MZ)({type:["PointCloudLayer"]})],ae.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,y.MZ)(D.M6)],ae.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,y.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],ae.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],ae.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],ae.prototype,"opacity",void 0),(0,i.Cg)([(0,y.MZ)({type:["show","hide"]})],ae.prototype,"listMode",void 0),(0,i.Cg)([(0,y.MZ)({types:[B],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],ae.prototype,"filters",void 0),(0,i.Cg)([(0,y.MZ)({type:[G.A]})],ae.prototype,"fields",void 0),(0,i.Cg)([(0,y.MZ)(ne.fieldsIndex)],ae.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,se.w)("service","fields",["fields","attributeStorageInfo"])],ae.prototype,"readServiceFields",null),(0,i.Cg)([(0,y.MZ)(ne.outFields)],ae.prototype,"outFields",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],ae.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,y.MZ)(D.Yj)],ae.prototype,"elevationInfo",null),(0,i.Cg)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],ae.prototype,"path",void 0),(0,i.Cg)([(0,y.MZ)(D.fV)],ae.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,y.MZ)({types:te,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:te},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],ae.prototype,"renderer",void 0),(0,i.Cg)([(0,oe.K)("renderer")],ae.prototype,"writeRenderer",null),(0,i.Cg)([(0,y.MZ)({json:{read:!1},readOnly:!0})],ae.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],ae.prototype,"graphicOrigin",void 0),ae=(0,i.Cg)([(0,y.$K)("esri.layers.PointCloudLayer")],ae);const le=ae},52136(e,t,r){var i=r(32198),s=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},18768(e,t,r){var i=r(32198),s=r(53966),o=r(91429),n=r(60694);r.d(t,["b",0,e=>{let t=e,r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let e=(0,n.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,o.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,o.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.ArcGISService")],r),r}])},69208(e,t,r){var i=r(32198),s=r(91429);r.d(t,["d",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},85707(e,t,r){var i=r(32198),s=r(91429),o=r(54239);r.d(t,["a",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,i.Cg)([(0,s.MZ)({readOnly:!0,type:o.A})],r.prototype,"heightModelInfo",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.HeightModelInfoMixin")],r),r}])},8303(e,t,r){var i=r(32198),s=r(92602),o=r(70333),n=r(56507),a=r(60999),l=r(49186),u=r(36563),d=r(53966),p=r(97768),c=r(17676),h=r(84952),y=r(91429),f=r(77548),g=r(20655),m=r(80812),v=r(41318),w=r(10407),S=r(26121),I=r(36005),C=r(43937);const b={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,A=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:s}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,c.zf)(e)||d.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,s,n=!o.id?.findCredential(this.url),a=e===r.id;if(a&&r.portal.user)return this._getUserPrivileges(r,n);if(a)i=r.portal.url;else try{i=await(0,f.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,h.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;s=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(a?await r.reload():(r=new m.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;let r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,s=g.A.getDefault();if(s&&s.loaded&&(0,h.S8)(s.restUrl)===(0,h.S8)(i))return s.user;let l=`${i}/community/self`,u=null==e?null:e.signal,d=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?v.A.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,S.wN)(this.portalItem,t)?(t?.messages?.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,y.MZ)({type:m.default})],A.prototype,"portalItem",null),(0,i.Cg)([(0,I.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,i.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,i.Cg)([(0,y.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,i.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],A),A}])},25036(e,t,r){var i=r(32198),s=r(91429),o=r(83960);r.d(t,["j",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){let e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&(0,o.RH)(e,t.effectiveScaleRange);let r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}])},58947(e,t,r){r.d(t,{w6:()=>b,qM:()=>R});var i=r(32198),s=r(56507),o=r(49186),n=r(53966),a=r(17676),l=r(91429),u=r(46130),d=r(5443),p=r(16930),c=r(85707),h=r(60694),y=r(10873),f=r(83898),g=r(73179);var m=r(20655),v=r(80812),w=r(88788),S=r(91682),I=r(26121),C=r(36005);const b=e=>{let t=(0,c.a)(e),r=class extends t{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.minScale=0,this.maxScale=0,this.version={major:NaN,minor:NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.url=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.sg)(async(e,t,r)=>{switch(e){case 0:return this._save(t);case 1:return this._saveAs(r,t)}})}readSpatialReference(e,t){return P(t)}readFullExtent(e,t,r){if("object"==typeof e&&e){let i=null==e.spatialReference?{...e,spatialReference:P(t)}:e;return d.A.fromJSON(i,r)}let i=t.store,s=P(t);return null==s||null==i?.extent||!Array.isArray(i.extent)||i.extent.some(e=>e<A)?null:new d.A({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:s})}parseVersionString(e){let t={major:NaN,minor:NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){let r=t.store,i=null==r.version?"":r.version.toString();return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}readTitleService(e,t){if("item-title"===this.sublayerTitleMode)return this.url?(0,h.yG)(this.url,t.name):t.name;let r=t.name;if(!r&&this.url){let e=(0,h.qg)(this.url);null!=e&&(r=e.title)}let i=this.portalItem?.title;return"item-title-and-service-name"===this.sublayerTitleMode&&i&&(r=i+" - "+r),(0,h.cr)(r)}get parsedUrl(){return(0,g.h)(this,{separator:"layers"})}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,f.F)(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,n.A.getLogger(this),t),this.indexInfo.catch(()=>{});let{fullExtent:r}=this;null!=r&&!r.hasZ&&this._updateExtent(r,await this.indexInfo)}_updateExtent(e,t){if("page"===t?.type){let r=t.rootIndex%t.pageSize,i=t.rootPage?.nodes?.[r];R(e,i?.obb)}else if("node"===t?.type){let r=t.rootNode?.mbs;if(!Array.isArray(r)||4!==r.length||r[0]<A)return;let i=r[2],s=r[3];e.zmin=i-s,e.zmax=i+s}}async _fetchService(e){if(null==this.url)throw new o.A("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){let t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){let t=await(0,s.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){let t=await(0,s.A)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();let i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){let t=(await(0,s.A)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){let r={..._,...t},i=v.default.from(e);if(!i)throw new o.A("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");i.id&&(i=i.clone(),i.id=null);let s=i.portal||m.A.getDefault();await this._ensureLoadBeforeSave(),i.type=M,i.portal=s;let n=(0,w.m)(i,"portal-item",{withResources:!0}),a={layers:[this.write({},n)]};return await Promise.all(n.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,n,r),this.url&&(i.url=this.url),i.title||(i.title=this.title),x(i,r,1),await s.signIn(),await s.user.addItem({item:i,folder:r?.folder,data:a}),await(0,S.r)(this.resourceReferences,n),this.portalItem=i,(0,u.v)(n),n.portalItem=i,i}async _save(e){let t={..._,...e};if(!this.portalItem)throw new o.A("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==M)throw new o.A("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${M}"`);await this._ensureLoadBeforeSave();let r=(0,w.m)(this.portalItem,"portal-item",{withResources:!0}),i=this.write({},r),n=await async function(e,t){let r=await e.fetchData("json")??{};return Array.isArray(r.layers)||(r.layers=await async function(e,t){let r=await async function(e){let t=E(e.url);if(!t)return null;let r=(await(0,s.A)(t,{query:{f:"json"},responseType:"json"})).data.layers;if(!Array.isArray(r))return null;let i=r.filter(({id:e})=>null!=e).map(({id:e})=>({id:e}));return i.length?i:null}(e).catch(()=>null);return r?.some(({id:e})=>e===t.id)?r:[t]}(e,t)),function(e,t){let r=e.findIndex(({id:e})=>e===t.id);-1===r?e.push(t):e[r]=t}(r.layers,t),r}(this.portalItem,i);await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(n,r,t);let a=function(e,t){return t&&function(e,t){let r=E(e);return!!r&&r===L(t).url}(e.url,t)?e.url:t}(this.portalItem,this.url);return a&&(this.portalItem.url=a),this.portalItem.title||(this.portalItem.title=this.title),x(this.portalItem,t,0),await(0,S.S)(this.portalItem,n,this.resourceReferences,r),(0,u.v)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let i=r?.validationOptions;(0,I.ci)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:i?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});let s=i?.enabled,a=null;if(s&&a){let t=(await a()).validate(e,r.portalItemLayerType);if(!t.length)return;let s=`Layer item did not validate:\n${t.join("\n")}`;if(n.A.getLogger(this).error(`_validateAgainstJSONSchema(): ${s}`),"throw"===i.failPolicy){let e=t.map(e=>new o.A("sceneservice:schema-validation",e));throw new o.A("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,i.Cg)([(0,l.MZ)(y.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({type:p.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,C.w)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readSpatialReference",null),(0,i.Cg)([(0,l.MZ)({type:d.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,C.w)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readFullExtent",null),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,C.w)("version",["store.version"])],r.prototype,"readVersion",null),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:!1}})],r.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],r.prototype,"title",void 0),(0,i.Cg)([(0,C.w)("portal-item","title")],r.prototype,"readTitlePortalItem",null),(0,i.Cg)([(0,C.w)("service","title",["name"])],r.prototype,"readTitleService",null),(0,i.Cg)([(0,l.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],r.prototype,"layerId",void 0),(0,i.Cg)([(0,l.MZ)((0,g.b)({separator:"layers"}))],r.prototype,"url",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"store",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],r.prototype,"rootNode",void 0),r=(0,i.Cg)([(0,l.$K)("esri.layers.mixins.SceneService")],r),r},A=-1e38;function P(e){if(null!=e.spatialReference)return p.A.fromJSON(e.spatialReference);let t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null==i?null:new p.A(i)}function R(e,t){if(null==t?.center||null==t.halfSize)throw new o.A("sceneservice:invalid-node-page","Invalid node page.");if(t.center[0]<A)return;let r=t.halfSize,i=t.center[2],s=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);e.zmin=i-s,e.zmax=i+s}function x(e,t,r){e.typeKeywords||=[];let i=t.getTypeKeywords();for(let t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),1===r&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}const M="Scene Service",_={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}},T={layerId:null};function E(e){if(!e)return null;let t=L(e);if(null!=t.layerId)return null;let r=(0,h.qg)(t.url);return null==r||"SceneServer"===r.serverType?t.url:null}function L(e){return(0,h.HZ)({layer:T,url:e,nonStandardUrlAllowed:!0})}},83898(e,t,r){r.d(t,{F:()=>o});var i=r(56507),s=r(49186);async function o(e,t,r,o,n,a,l){let u=null;if(null!=r){let t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.A)(s,{query:{f:"json",...o,token:n},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){a?.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),u=e}}if(!t)return null;let d=t?.split("/").pop(),p=`${e}/nodes/`,c=p+d;try{return{type:"node",rootNode:(await(0,i.A)(c,{query:{f:"json",...o,token:n},responseType:"json",signal:l})).data,urlPrefix:p}}catch(e){throw new s.A("sceneservice:root-node-missing","Root node missing.",{pageError:u,nodeError:e,url:c})}}},17036(e,t,r){r.d(t,{p:()=>l});var i=r(44208),s=r(53966),o=r(20437),n=r(95466),a=r(30524);function l(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return n.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,a.DB)(this.fieldsIndex,e)}}}}},73179(e,t,r){r.d(t,{b:()=>l,h:()=>u});var i=r(4718),s=r(53966),o=r(84952),n=r(60694),a=r(10873);function l(e){let{nonStandardUrlAllowed:t=!1,separator:r}=e??{},o=(0,i.o8)(a.OZ),l=o.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,n.LS)(this,e,r,t,s)}),{...o,set:function(e){if(null==e)return void this._set("url",e);let r=(0,n.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function u(e,t){let{separator:r}=t??{},i=(0,o.An)(e.url);return null!=i&&(null==e.dynamicDataSource?null!=e.layerId&&(i.path=(0,o.fj)(i.path,r??"",e.layerId.toString())):i.path=(0,o.fj)(i.path,"dynamicLayer")),i}},88788(e,t,r){r.d(t,{m:()=>n,v:()=>o});var i=r(84952),s=r(20655);function o(e,t){return{...a(e,t),readResourcePaths:[]}}function n(e,t,r){let s=(0,i.An)(r?.forceNewItemContext?null:e.itemUrl);return{...a(e,t,r),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:r?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function a(e,t,r){return{origin:t,url:(0,i.An)(r?.forceNewItemContext?null:e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}},10407(e,t,r){r.d(t,{It:()=>h,LG:()=>n,OM:()=>u,Sm:()=>d,Y:()=>a,bK:()=>l,sQ:()=>p});var i=r(99917),s=r(16930),o=r(28735);function n(e,t){if(!a(e,t)){let r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,c.HOSTED_SERVICE)}function u(e,t){let r=e.typeKeywords;if(r){let e=r.indexOf(t);e>-1&&r.splice(e,1)}}function d(e,t,r){r?n(e,t):u(e,t)}async function p(e){let t,r=e.clone().normalize();if(r.length>1)for(let e of r)t?e.width>t.width&&(t=e):t=e;else t=r[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,o.ci)(e);let r=s.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(t)}const c={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function h(e){let{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges,o=!s||s.includes("features:user:edit"),n=!!r&&!!s?.includes("features:user:fullEdit"),a="update"===i||"admin"===i;return a?n=o=!0:n&&(o=!0),{features:{edit:o,fullEdit:n},content:{updateItem:a}}}r.d(t,["mm",0,c])},15804(e,t,r){r.d(t,{addOrUpdateResources:()=>a,bg:()=>c,cL:()=>p,fetchResources:()=>n,removeAllResources:()=>u,removeResource:()=>l});var i=r(56507),s=r(49186),o=r(84952);async function n(e,t={},r){await e.load(r);let i=(0,o.fj)(e.itemUrl,"resources"),{start:s=1,num:n=10,sortOrder:a="asc",sortField:l="resource"}=t,u={query:{start:s,num:n,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},d=await e.portal.request(i,u);return{total:d.total,nextStart:d.nextStart,resources:d.resources.map(({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)}))}}async function a(e,t,r,i){let n=new Map;for(let{resource:e,content:i,compress:o,access:a}of t){if(!e.hasPath())throw new s.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");let[t,l]=d(e.path),u=`${t}/${o??""}/${a??""}`;n.has(u)||n.set(u,{prefix:t,compress:o,access:a,files:[]}),n.get(u).files.push({fileName:l,content:i})}await e.load(i);let a=(0,o.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(let{prefix:t,compress:r,access:o,files:l}of n.values())for(let n=0;n<l.length;n+=25){let u=l.slice(n,n+25),d=new FormData;t&&"."!==t&&d.append("resourcesPrefix",t),r&&d.append("compress","true"),o&&d.append("access",o);let p=0;for(let{fileName:e,content:t}of u)d.append("file"+ ++p,t,e);d.append("f","json");try{await e.portal.request(a,{method:"post",body:d,signal:i?.signal})}catch(e){if(i?.ignoreResourceCopyErrors&&e instanceof s.A&&"CONT_00942"===e.details?.messageCode)continue;throw e}}}async function l(e,t,r){if(!t.hasPath())throw new s.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);let i=(0,o.fj)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);let r=(0,o.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function d(e){let t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,i.A)(e.url,{responseType:"blob"})).data}function c(e,t){if(!e.hasPath())return null;let[r,,i]=function(e){let[t,r]=function(e){let t=(0,o.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=d(t);return[i,s,r]}(e.path);return e.portalItem.resourceFromPath((0,o.fj)(r,t+i))}},24212(e,t,r){r.d(t,{$7:()=>l,B:()=>a,M7:()=>p,XF:()=>d,tW:()=>u,w7:()=>n});var i=r(56512),s=r(86211),o=r(16271);function n(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?c:h}(e).mode}(null==e||(e.hasZ??!1),t)}function a(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function l(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function u(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function d(e,t){t&&e.warn(".elevationInfo=",t)}function p(e){return(e?.offset??0)*(0,o.Ao)(e?.unit)}(0,i.B)((e,t,r)=>{if(!e||"decimal-degrees"===t)return 0;let i="unknown"!==t&&t?t:"meters",o=(0,s.mq)(r);return o?(0,s.oU)(e,i,o):0});const c={mode:"absolute-height",offset:0},h={mode:"on-the-ground",offset:null}},30291(e,t,r){r.d(t,{tn:()=>u});var i=r(40124),s=r(30524),o=r(41227),n=r(89893),a=r(66159),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},h){if(!r)return null;let f=function(e,t){let r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){let i=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===i&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||y,sortDisabled:t?.sortDisabled}).map(t=>new o.A({fieldName:t.name,isEditable:(0,s.R$)(t,e),label:t.alias,format:c(t),visible:d(t,{...e,visibleFieldNames:r})}))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!f.length)return null;let g=function(e){let t=(0,s.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),m=[new a.A,new n.A];return new i.A({title:g,content:m,fieldInfos:f})}const d=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,s.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function c(e){switch(e.type){case"small-integer":case"integer":return new l.A({digitSeparator:!0,places:0});case"single":case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,s.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===e.alias?.toLowerCase()}const y=["geometry","blob","raster","guid","xml"]},91682(e,t,r){r.d(t,{S:()=>l,r:()=>a});var i=r(49186),s=r(17676),o=r(13069),n=r(15804);async function a(e,t,r){await d(await u(e,t,r),t,r)}async function l(e,t,r,i,s){let o=await u(r,i,s);await e.update({data:t}),await d(o,i,s)}async function u(e,t,a){if(!t?.resources)return;let l=function(e,t){let{portalItem:r,portalItemResourcePath:i}=e,{portalItem:s,portalItemResourcePath:o}=t;return r===s&&(!(i||o)||i===o)}(e,t)?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem,e.portalItemResourcePath=t.portalItemResourcePath;let u=new Set(t.resources.toKeep.map(e=>e.resource.path)),d=new Set,p=[];u.forEach(t=>{l.delete(t),e.paths.push(t)});let c=[],h=[],y=[];for(let r of t.resources.toUpdate)if(l.delete(r.resource.path),u.has(r.resource.path)||d.has(r.resource.path)){let{resource:t,content:i,finish:s}=r,a=(0,n.bg)(t,(0,o.lk)());e.paths.push(a.path),c.push({resource:a,content:await(0,n.cL)(i),compress:r.compress}),s&&y.push(()=>s(a))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,n.cL)(r.content),compress:r.compress});let t=r.finish;t&&y.push(()=>t(r.resource)),d.add(r.resource.path)}for(let r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{c.push({resource:r.resource,content:await(0,n.cL)(r.content),compress:r.compress});let e=r.finish;e&&y.push(()=>e(r.resource))}if(c.length||h.length){let{addOrUpdateResources:e}=await Promise.resolve().then(()=>r(15804));await e(t.portalItem,c,"add",a),await e(t.portalItem,h,"update",a)}if(y.forEach(e=>e()),0===p.length)return l;let f=await(0,s.Ol)(p);if((0,s.Te)(a),f.length>0)throw new i.A("save:resources","Failed to save one or more resources",{errors:f});return l}async function d(e,t,r){if(!e||!t.portalItem)return;let i=[];for(let s of e){let e=t.portalItem.resourceFromPath(s);i.push(e.portalItem.removeResource(e,r))}await(0,s.Lx)(i)}},26121(e,t,r){r.d(t,{I6:()=>d,ci:()=>u,dL:()=>l,wN:()=>p});var i=r(49186),s=r(84952),o=r(77548),n=r(20655),a=r(59923);async function l(e){let t=[];for(let r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,r){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>(0,a.GL)("url",`Relative url '${e}' is not supported`)))),r){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(s=s.filter(({name:e})=>!(a.MG.has(e)||t.includes(e)))),i&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}function d(e){return(0,o.qd)(e).some(e=>!!e.charts?.length)}function p(e,t){let r=t?.portal,i=e?.id&&(e.portal||n.A.getDefault());return!!r&&!!i&&!(0,s.ut)(i.restUrl,r.restUrl)}}}]);
|