@arcgis/core 5.0.0-next.7 → 5.0.0-next.9
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/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{8f56f298e7c1a283f407.js → 0030d68d9edf42b4af57.js} +1 -1
- package/assets/esri/core/workers/chunks/01d460398f3ba6767a37.js +1 -0
- package/assets/esri/core/workers/chunks/02e7359162cf974b41b6.js +1 -0
- package/assets/esri/core/workers/chunks/{17d5f8dba6ebb1184506.js → 042cd64e1f4eb326c30f.js} +1 -1
- package/assets/esri/core/workers/chunks/{66db5f77e09d25e33951.js → 063905fbf9a0c6586949.js} +1 -1
- package/assets/esri/core/workers/chunks/{9486032af3e934d85582.js → 0a5d74414dd02a2fb8e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{3815ffa13e7b439bca6e.js → 0d5212f59e9b62c16164.js} +1 -1
- package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
- package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{73487b9d85e726e9c012.js → 1257c37bf04d39c27b62.js} +1 -1
- package/assets/esri/core/workers/chunks/{398f356b11fd33bd3831.js → 136a7d781dad05a7463b.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e4e7aedf4b779241a02.js → 15c7c10ff9ac63f0e792.js} +1 -1
- package/assets/esri/core/workers/chunks/17784cf16fa91504b9ea.js +1 -0
- package/assets/esri/core/workers/chunks/{a395373e3173e6458a56.js → 1ab37e13947d0e2e4181.js} +1 -1
- package/assets/esri/core/workers/chunks/{f03635ddf56e2ef90e4c.js → 1d06fcae4c2f02fb1c95.js} +1 -1
- package/assets/esri/core/workers/chunks/1dfca37f95f2b968aa54.js +1 -0
- package/assets/esri/core/workers/chunks/{5bd36dbf46c25bd961c8.js → 21293b0c6405a10ec7b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{285762ff92d5388b6024.js → 2166238a7ad63a2d43c7.js} +1 -1
- package/assets/esri/core/workers/chunks/{620a94b54be3ed78350d.js → 22ca80f491e070b2a5e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{88074189fa10c335370b.js → 24cd7b84cd0f3de4bff2.js} +1 -1
- package/assets/esri/core/workers/chunks/{ccc0da0e01f023c8aa1f.js → 28d1f2cf6aae547615c3.js} +1 -1
- package/assets/esri/core/workers/chunks/292daac70bb828e4923f.js +1 -0
- package/assets/esri/core/workers/chunks/{7e43c105f1cfc44b7bd0.js → 2fa01bd3f3608616fd7f.js} +1 -1
- package/assets/esri/core/workers/chunks/30e220f4f843681a4cdd.js +1 -0
- package/assets/esri/core/workers/chunks/{5d3661d1fe46dd29aae9.js → 311b564e44ae637c960d.js} +1 -1
- package/assets/esri/core/workers/chunks/{f4d0ae6be1b3984228d0.js → 31b6406960261da21dd4.js} +1 -1
- package/assets/esri/core/workers/chunks/31c7ce65e16f7858400f.js +1 -0
- package/assets/esri/core/workers/chunks/31dbe07047dc61303d7d.js +1 -0
- package/assets/esri/core/workers/chunks/{8a314b3790313e6dc5db.js → 333b62dad3811cff0f14.js} +1 -1
- package/assets/esri/core/workers/chunks/{c8733cd621105afab2ac.js → 35c9b24e4430bd6c2b6b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e31192ae920e3e19b6aa.js → 37c1f155da14de91565a.js} +1 -1
- package/assets/esri/core/workers/chunks/{c55c096669677321a227.js → 38cd3648932bf2534b0f.js} +1 -1
- package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{f5e47eea8720ba84665b.js → 3c07aa2015ab1dff5f7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e9311386f58f3cb95c22.js → 42a1e71d09e8583a7327.js} +1 -1
- package/assets/esri/core/workers/chunks/443dfe7029ec208f670c.js +1 -0
- package/assets/esri/core/workers/chunks/{b75930d60449eceb0f1c.js → 4baf6f6e7ddedb25f806.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb5484b5eeacc9ad2ceb.js → 4d0cbf9584446f411a37.js} +1 -1
- package/assets/esri/core/workers/chunks/{17103e6542aae53c7301.js → 4e3e27673d0671fc2b58.js} +1 -1
- package/assets/esri/core/workers/chunks/4fb5f1c671892001a4fd.js +1 -0
- package/assets/esri/core/workers/chunks/{5fc7b61f467f1d60a284.js → 51ab2acac4ecc1ca9c34.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc4417d1260b717a9385.js → 52282f767bd0e99ddca0.js} +1 -1
- package/assets/esri/core/workers/chunks/{dedc4583b5f32a278124.js → 5350d50b47b6a4e0e169.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc06014fb484fc8c697e.js → 53654edd766d9b4ef750.js} +1 -1
- package/assets/esri/core/workers/chunks/{90f8b4bda28af43ea019.js → 538f509d7fc8337d37ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed8a85efbd90241512bb.js → 588533c3abe876f20f62.js} +1 -1
- package/assets/esri/core/workers/chunks/58e59ead33368ce38c8f.js +1 -0
- package/assets/esri/core/workers/chunks/5db37547963857295273.js +1 -0
- package/assets/esri/core/workers/chunks/{72846fb9c87c6642daf0.js → 5e2ce34def5e053913b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c056eac35d05d9524b7.js → 5f29422a051311ef9b3c.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac26e3e77df4302f47a2.js → 604777417722d4effe06.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff35a077ac6776469805.js → 61d970ed75c2c358b1e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a6a96edc892d7060b7d.js → 629127877042ad784ad2.js} +1 -1
- package/assets/esri/core/workers/chunks/{90b2b43b8b54c9a1ec35.js → 664ae441617afe4b17ec.js} +1 -1
- package/assets/esri/core/workers/chunks/67f03d042455cd0f7009.js +1 -0
- package/assets/esri/core/workers/chunks/{4c5a7249a311070d8f43.js → 6af18d7a0d314d7c1756.js} +1 -1
- package/assets/esri/core/workers/chunks/{f35aaa04cca676c2d3f8.js → 6b59f94040c7d2f6728a.js} +1 -1
- package/assets/esri/core/workers/chunks/6d9f2b113d6bde936a04.js +1 -0
- package/assets/esri/core/workers/chunks/{5132ca68e8c7af111a47.js → 6e22b02a9715c10578d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{f0e0a63962784acb4ba1.js → 6f0aec7428021e440ac9.js} +1 -1
- package/assets/esri/core/workers/chunks/{deb2854bb7d082a26f52.js → 7005d956c990a04ee8b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3991ae8caa713d4ddcd.js → 731f7b552dde0fb325cd.js} +1 -1
- package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
- package/assets/esri/core/workers/chunks/{b96eb0ea506379182d62.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{464d42bebb365287808d.js → 773f2c6c9d38db76dfed.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f3d492f1093b7832aab.js → 7803495f8862d9025bcd.js} +1 -1
- package/assets/esri/core/workers/chunks/7d641f2f5edd95b9bc18.js +1 -0
- package/assets/esri/core/workers/chunks/7e4c14d4502e3f06d94b.js +1 -0
- package/assets/esri/core/workers/chunks/812f2ccc01f44e3cfd41.js +1 -0
- package/assets/esri/core/workers/chunks/826fa0dfb63df77bfd95.js +1 -0
- package/assets/esri/core/workers/chunks/{7544316a75dbd981aea6.js → 86cb097deec50b0da3f3.js} +1 -1
- package/assets/esri/core/workers/chunks/87921f3fa9001f5801ed.js +1 -0
- package/assets/esri/core/workers/chunks/{95c594a87b732f5c4979.js → 89b748e064ca90b4f76a.js} +1 -1
- package/assets/esri/core/workers/chunks/8a40ed2ee4b032822c30.js +1 -0
- package/assets/esri/core/workers/chunks/{09de8be660174a229efb.js → 8cbb28476151a37ae958.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe77ae6cf232a7a3298e.js → 8d9d3797c6d62fdfff9d.js} +1 -1
- package/assets/esri/core/workers/chunks/{62a49cfd9a2508950e9f.js → 8fedfd33c37172dba6bf.js} +1 -1
- package/assets/esri/core/workers/chunks/91aa1157da32f650983b.js +1 -0
- package/assets/esri/core/workers/chunks/{e7638b9ab6674bc8a18f.js → 91dfd29e2dba200eab09.js} +1 -1
- package/assets/esri/core/workers/chunks/{794748fd1edc29a621cd.js → 9698f36c143953a975d4.js} +1 -1
- package/assets/esri/core/workers/chunks/98584902c9db6faa3e4d.js +1 -0
- package/assets/esri/core/workers/chunks/9e5e05d6430712b0b1bc.js +1 -0
- package/assets/esri/core/workers/chunks/{e5a06ce0ef6a9a90e100.js → 9f21436016ff7a899e79.js} +1 -1
- package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
- package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/a6ee40dfc471d6612f3c.js +1 -0
- package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{a4db5c9a90107e097df8.js → af47272aaaef0ea57e71.js} +1 -1
- package/assets/esri/core/workers/chunks/b05208d56a724a8f1661.js +1 -0
- package/assets/esri/core/workers/chunks/{79968c183135281d2a6f.js → b3613a38178cad2ebc82.js} +1 -1
- package/assets/esri/core/workers/chunks/{22d6b8102e75bdef204c.js → b7eb486354994dc70855.js} +1 -1
- package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +1 -0
- package/assets/esri/core/workers/chunks/c29486c4eeb3e72effff.js +1 -0
- package/assets/esri/core/workers/chunks/{2b94623cabc6ae0f86ce.js → c37f7756d48ff9af2656.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c52999a6392370844a6.js → c4090a60d149a5962179.js} +1 -1
- package/assets/esri/core/workers/chunks/c715fd32f814a0f14f40.js +1 -0
- package/assets/esri/core/workers/chunks/{73c1d43070b4fe1e5c1e.js → c8e686efe344a33a0258.js} +1 -1
- package/assets/esri/core/workers/chunks/{6bb5158de43c4b59107f.js → c9b16fd41cd59d452522.js} +1 -1
- package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/cf971e7b1b98d9c502d3.js +1 -0
- package/assets/esri/core/workers/chunks/{279366e6b743f9680603.js → cfff044859e6e6dcc75d.js} +1 -1
- package/assets/esri/core/workers/chunks/d07f911d40bf05fc0306.js +1 -0
- package/assets/esri/core/workers/chunks/{8833c3d168951be4bf20.js → d0d79dd3e88eecf5c314.js} +1 -1
- package/assets/esri/core/workers/chunks/d1ca7c3a32ce00ed8b81.js +1 -0
- package/assets/esri/core/workers/chunks/{76ae1702fecc7ad7017c.js → d1e97cce5047f1791e22.js} +1 -1
- package/assets/esri/core/workers/chunks/{17acde0245ecd956306c.js → d233cc33497a663450f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js → d391bfbaf0e790cd10d6.js} +2 -2
- package/assets/esri/core/workers/chunks/{b017bac40dc8328013e3.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{36fe6b8228e622407ec2.js → d8793eead02491136841.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d599008e1ea42321b37.js → da24ad57747714ac5eda.js} +1 -1
- package/assets/esri/core/workers/chunks/db678a6e352275e507a9.js +1 -0
- package/assets/esri/core/workers/chunks/{facb3886714222772ab2.js → ddfd01bb9ba8577c3ffc.js} +1 -1
- package/assets/esri/core/workers/chunks/de2ebd9cc3d9e68d435b.js +1 -0
- package/assets/esri/core/workers/chunks/{50d9f69d5255af4b29bb.js → df5afa06c6deb6b40109.js} +1 -1
- package/assets/esri/core/workers/chunks/e25c4b4a03270d48f408.js +1 -0
- package/assets/esri/core/workers/chunks/e3294318daf1192b8319.js +1 -0
- package/assets/esri/core/workers/chunks/e599125e746c27de106e.js +1 -0
- package/assets/esri/core/workers/chunks/{da573ecc68e6aa8f6da9.js → e767f83f9e2de6650f80.js} +1 -1
- package/assets/esri/core/workers/chunks/e9d4cae2144974489d6e.js +1 -0
- package/assets/esri/core/workers/chunks/{91df8638b8b904e6d8c5.js → ead8d0cbcebd12dbfad7.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9324e88c359c03f35aa.js → eb9c166db0db6fa60e95.js} +1 -1
- package/assets/esri/core/workers/chunks/ebcc94234d9d4be1941f.js +316 -0
- package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
- package/assets/esri/core/workers/chunks/{bc241c7735e4efba734a.js → f34e3fa0c5b28531e289.js} +1 -1
- package/assets/esri/core/workers/chunks/f64037a88ab03662dc2a.js +1 -0
- package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{d97fadbc69e055d183a0.js → f77f4bd6a577b92cf66f.js} +1 -1
- package/assets/esri/core/workers/chunks/f80f5dbf96c343ac4df6.js +1 -0
- package/assets/esri/core/workers/chunks/{16d66770ef841564ee3f.js → f89c90f98c85667b0ebc.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c4227b0ea21a5e429ab.js → fb192de7e4fa152342bb.js} +1 -1
- package/assets/esri/core/workers/chunks/fbd8d2f61f8a15bcf3db.js +1 -0
- package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
- package/assets/esri/core/workers/chunks/{2f78861afe0e9037dd8d.js → fe49321dca22dc60d105.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
- package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
- 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/MultiPathImpl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/config.js +1 -1
- package/core/QueueProcessor.js +1 -1
- package/core/SetUtils.js +1 -1
- package/core/has.js +1 -1
- package/form/FormTemplate.js +1 -1
- package/form/elements/Element.js +1 -1
- package/form/elements/FieldElement.js +1 -1
- package/form/elements/GroupElement.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/identity/Credential.js +1 -1
- package/identity/IdentityManager.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +92 -50
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/rasterDatasets/pixelReader.js +1 -1
- package/layers/support/rasterFunctions/pixelTransformUtils.js +5 -0
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/source/DataLayerSource.js +1 -1
- package/package.json +4 -4
- package/popup/FieldInfo.js +1 -1
- package/processRequest.js +5 -0
- package/request.js +1 -1
- package/requestConfig.js +5 -0
- package/requestQueue.js +5 -0
- package/rest/query/executeForCount.js +1 -1
- package/rest/query/executeForExtent.js +1 -1
- package/rest/query/executeForIds.js +1 -1
- package/rest/query/executeQueryJSON.js +1 -1
- package/rest/query/executeQueryPBF.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/support/BaseImageMeasureResultValue.js +5 -0
- package/rest/support/ImageAreaResult.js +1 -1
- package/rest/support/ImageDistanceResult.js +1 -1
- package/rest/support/ImageHeightResult.js +1 -1
- package/rest/support/ImageMeasureResultAngleValue.js +5 -0
- package/rest/support/ImageMeasureResultAreaValue.js +5 -0
- package/rest/support/ImageMeasureResultLengthValue.js +5 -0
- package/rest/support/ImageWithType.js +5 -0
- package/rest/support/imageMeasureUtils.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/{3d/support/ImageWithType.js → 2d/layers/features/sources/strategies/constants.js} +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +1 -1
- package/views/3d/glTF/DefaultLoadingContext.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SDataRequester.js +5 -0
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +5 -0
- package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +5 -0
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/fetchTile.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/SharedSymbolResources.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +6 -0
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/MultipointDrawAction.js +1 -1
- package/views/draw/PointDrawAction.js +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/input/CursorUpdateEvents.js +5 -0
- package/views/draw/input/DrawCompleteEvent.js +5 -0
- package/views/draw/input/VertexAddEvent.js +5 -0
- package/views/draw/input/VertexRemoveEvent.js +5 -0
- package/views/draw/input/VertexUpdateEvent.js +5 -0
- package/views/interactive/editGeometry/CheckpointingEditGeometryOperations.js +5 -0
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/operations/ReplayableAppendVertex.js +5 -0
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/support/errors.js +5 -0
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/support/getVisibleTiles.js +5 -0
- package/widgets/Sketch/CreateToolVisibilityMap.js +5 -0
- package/widgets/Sketch/SelectionToolVisibilityMap.js +5 -0
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/020c8913d8e35d63080b.js +0 -1
- package/assets/esri/core/workers/chunks/02e69f0c63d97661da60.js +0 -1
- package/assets/esri/core/workers/chunks/05eee334d58a0b9f6316.js +0 -1
- package/assets/esri/core/workers/chunks/06ba43843e9c4988049b.js +0 -1
- package/assets/esri/core/workers/chunks/087973e7c4fea5fcfa5e.js +0 -1
- package/assets/esri/core/workers/chunks/326a76a4e80269d4029d.js +0 -1
- package/assets/esri/core/workers/chunks/377a66034e7c1bad5599.js +0 -1
- package/assets/esri/core/workers/chunks/4442817beb7a76c95770.js +0 -1
- package/assets/esri/core/workers/chunks/459a67928bde4a62b6a4.js +0 -1
- package/assets/esri/core/workers/chunks/4eebd74ebc20579dade8.js +0 -1
- package/assets/esri/core/workers/chunks/53bd8996e8812f1ad7b2.js +0 -1
- package/assets/esri/core/workers/chunks/557960763695abee4a83.js +0 -1
- package/assets/esri/core/workers/chunks/6201356f7f91e5c06425.js +0 -1
- package/assets/esri/core/workers/chunks/6c3b99209d542efa64d4.js +0 -1
- package/assets/esri/core/workers/chunks/6f4bd0ee85e7e5a74340.js +0 -1
- package/assets/esri/core/workers/chunks/7413e582bc2b16af6a0f.js +0 -1
- package/assets/esri/core/workers/chunks/7461124454bfb4fb6474.js +0 -1
- package/assets/esri/core/workers/chunks/75bf27271a31e26e1b21.js +0 -1
- package/assets/esri/core/workers/chunks/7aaaebbabee27690283c.js +0 -1
- package/assets/esri/core/workers/chunks/7c4a63aeead2505d6f02.js +0 -1
- package/assets/esri/core/workers/chunks/811d4c46c75cf6a63e78.js +0 -1
- package/assets/esri/core/workers/chunks/8ffd4710d168c2fcfd96.js +0 -1
- package/assets/esri/core/workers/chunks/90250e9239c173aace88.js +0 -1
- package/assets/esri/core/workers/chunks/9786f91455350eaae493.js +0 -1
- package/assets/esri/core/workers/chunks/99859dce1925b406ccd0.js +0 -1
- package/assets/esri/core/workers/chunks/9c5cbf8810f37b1a4718.js +0 -1
- package/assets/esri/core/workers/chunks/9e8dceef4c961f56940d.js +0 -1
- package/assets/esri/core/workers/chunks/9fac5a12e878cd745354.js +0 -1
- package/assets/esri/core/workers/chunks/a06bac9b8f9e18874de8.js +0 -316
- package/assets/esri/core/workers/chunks/a712cdff78fc826acd8c.js +0 -1
- package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
- package/assets/esri/core/workers/chunks/aa54b6f2aba6952af149.js +0 -1
- package/assets/esri/core/workers/chunks/b96eb0ea506379182d62.js +0 -2
- package/assets/esri/core/workers/chunks/c476643002387f60ea42.js +0 -1
- package/assets/esri/core/workers/chunks/c4e4da69969499a89a2c.js +0 -1
- package/assets/esri/core/workers/chunks/cd1930f08e1fc8b30b14.js +0 -1
- package/assets/esri/core/workers/chunks/d1fe816b6990918c13c7.js +0 -1
- package/assets/esri/core/workers/chunks/d305a21666b1ed5bf33d.js +0 -1
- package/assets/esri/core/workers/chunks/d40f57f9fc47f9a9f97c.js +0 -1
- package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
- package/assets/esri/core/workers/chunks/e82f5437bd66779c6740.js +0 -1
- package/assets/esri/core/workers/chunks/f6c8beb60f6d29945a2e.js +0 -1
- package/assets/esri/core/workers/chunks/f746e3f7ebff2bbdf333.js +0 -1
- package/assets/esri/core/workers/chunks/fd2efd1d1cf9d95a87e6.js +0 -1
- package/views/3d/layers/i3s/I3SStreamDataController.js +0 -5
- package/views/3d/support/StreamDataLoader.js +0 -5
- package/views/3d/support/StreamDataRequester.js +0 -5
- package/views/3d/support/downloadSlots.js +0 -5
- package/views/draw/input/DrawEvents.js +0 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see
|
|
2
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[168],{4489:(t,e,s)=>{s.d(e,{K:()=>i.K,_:()=>i._});var i=s(48015)},7804:(t,e,s)=>{s.d(e,{OA:()=>i,WL:()=>n,u$:()=>o});const i={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},o=t=>(...e)=>({_$litDirective$:t,values:e});class n{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}},9592:(t,e,s)=>{s.d(e,{UF:()=>i,ao:()=>o});const i=(t,e,...s)=>{try{return t?.call(e,...s)}catch(e){console.error(e,t)}},o=async(t,e,...s)=>{try{const i=t?.call(e,...s);return await i}catch(e){console.error(e,t)}}},14813:(t,e,s)=>{s.d(e,{Qu:()=>n,qu:()=>o});var i=s(34088);let o=!1;const n=t=>{o=!0,(0,i.s)(t)}},18504:(t,e,s)=>{s.d(e,{Rt:()=>n,mY:()=>c});var i=s(36752);const{I:o}=i.ge,n=t=>void 0===t.strings,r={},c=(t,e=r)=>t._$AH=e},20150:(t,e,s)=>{s.d(e,{Yt:()=>i,Zj:()=>a,eg:()=>c});const i=(t,e,s)=>(0,n(e).subscribe)(e=>{const i=e.some(e=>((t,e)=>{let s=t;for(;s;){if(s===e)return!0;if(!s.parentNode)return!1;s=s.parentNode instanceof ShadowRoot?s.parentNode.host:s.parentNode}return!1})(t,e.target));i&&s()}),o={},n=t=>{const e=t.join(","),s=o[e];if(void 0!==s)return s;const i=new Set,n=new MutationObserver(t=>i.forEach(e=>e(t)));globalThis.document&&n.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0});const r={subscribe:t=>(i.add(t),()=>{i.delete(t),0===i.size&&(n.disconnect(),o[e]=void 0)})};return o[e]=r,r},r=(t,e)=>{let s=t;for(;s;){const t=s.closest?.(e);if(t)return t;const i=s.getRootNode?.();if(i===globalThis.document)return;s=i.host}};function c(t){const e=r(t,".calcite-mode-dark, .calcite-mode-light, .calcite-mode-auto");return e?.classList.contains("calcite-mode-dark")||e?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const a=(t,e,s)=>{const i=r(t,`[${e}]`);return i?.getAttribute(e)??s}},34088:(t,e,s)=>{s.d(e,{C:()=>c,D:()=>a,a:()=>h,c:()=>g,f:()=>u,g:()=>y,l:()=>p,s:()=>$}),Object(function(){var t=new Error("Cannot find module '../calcite/calcite.css'");throw t.code="MODULE_NOT_FOUND",t}());var i=s(41557),o=s(46337);const n="calcite-mode-auto",r="calcite-mode-dark",c={autoMode:n,darkMode:r,lightMode:"calcite-mode-light",rtl:"calcite--rtl",calciteAnimate:"calcite-animate",calciteAnimateInUp:"calcite-animate__in-up",calciteAnimateInDown:"calcite-animate__in-down",calciteAnimateInRight:"calcite-animate__in-right",calciteAnimateInLeft:"calcite-animate__in-left"},a={filter:250,nextTick:0,resize:150,reposition:100},h=25;function l(){const{classList:t}=document.body,e=window.matchMedia("(prefers-color-scheme: dark)").matches,s=()=>t.contains(r)||t.contains(n)&&e?"dark":"light",i=t=>document.body.dispatchEvent(new CustomEvent("calciteModeChange",{bubbles:!0,detail:{mode:t}})),o=t=>{c!==t&&i(t),c=t};let c=s();i(c),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>o(t.matches?"dark":"light")),new MutationObserver(()=>o(s())).observe(document.body,{attributes:!0,attributeFilter:["class"]})}const d=globalThis.calciteConfig,u=d?.focusTrapStack||[],p=d?.logLevel||"info",f="3.3.1";o.S$||("interactive"===document.readyState?l():document.addEventListener("DOMContentLoaded",l,{once:!0})),queueMicrotask(function(){if(d&&d.version)return;console.info(`Using Calcite Components ${f} [Date: 2025-09-30, Revision: f8b8c09e0]`);const t=d||globalThis.calciteConfig||{};Object.defineProperty(t,"version",{value:f,writable:!1}),globalThis.calciteConfig=t});const m=(0,i.le)({defaultAssetPath:"https://js.arcgis.com/calcite-components/3.3.1/",hydratedAttribute:"calcite-hydrated"}),{customElement:g,getAssetPath:y,setAssetPath:$}=m},36752:(t,e,s)=>{s.d(e,{JW:()=>w,XX:()=>B,c0:()=>S,ej:()=>U,ge:()=>F,qy:()=>C,s6:()=>T});const i=globalThis,o=i.trustedTypes,n=o?o.createPolicy("lit-html",{createHTML:t=>t}):void 0,r="$lit$",c=`lit$${Math.random().toFixed(9).slice(2)}$`,a="?"+c,h=`<${a}>`,l=document,d=()=>l.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,p=Array.isArray,f=t=>p(t)||"function"==typeof t?.[Symbol.iterator],m="[ \t\n\f\r]",g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,$=/>/g,v=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),A=/'/g,_=/"/g,b=/^(?:script|style|textarea|title)$/i,E=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),C=E(1),w=E(2),U=E(3),S=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),L=new WeakMap,k=l.createTreeWalker(l,129);function O(t,e){if(!p(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==n?n.createHTML(e):e}const P=(t,e)=>{const s=t.length-1,i=[];let o,n=2===e?"<svg>":3===e?"<math>":"",a=g;for(let e=0;e<s;e++){const s=t[e];let l,d,u=-1,p=0;for(;p<s.length&&(a.lastIndex=p,d=a.exec(s),null!==d);)p=a.lastIndex,a===g?"!--"===d[1]?a=y:void 0!==d[1]?a=$:void 0!==d[2]?(b.test(d[2])&&(o=RegExp("</"+d[2],"g")),a=v):void 0!==d[3]&&(a=v):a===v?">"===d[0]?(a=o??g,u=-1):void 0===d[1]?u=-2:(u=a.lastIndex-d[2].length,l=d[1],a=void 0===d[3]?v:'"'===d[3]?_:A):a===_||a===A?a=v:a===y||a===$?a=g:(a=v,o=void 0);const f=a===v&&t[e+1].startsWith("/>")?" ":"";n+=a===g?s+h:u>=0?(i.push(l),s.slice(0,u)+r+s.slice(u)+c+f):s+c+(-2===u?e:f)}return[O(t,n+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class x{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,h=0;const l=t.length-1,u=this.parts,[p,f]=P(t,e);if(this.el=x.createElement(p,s),k.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=k.nextNode())&&u.length<l;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(r)){const e=f[h++],s=i.getAttribute(t).split(c),o=/([.?@])?(.*)/.exec(e);u.push({type:1,index:n,name:o[2],strings:s,ctor:"."===o[1]?H:"?"===o[1]?j:"@"===o[1]?I:N}),i.removeAttribute(t)}else t.startsWith(c)&&(u.push({type:6,index:n}),i.removeAttribute(t));if(b.test(i.tagName)){const t=i.textContent.split(c),e=t.length-1;if(e>0){i.textContent=o?o.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],d()),k.nextNode(),u.push({type:2,index:++n});i.append(t[e],d())}}}else if(8===i.nodeType)if(i.data===a)u.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(c,t+1));)u.push({type:7,index:n}),t+=c.length-1}n++}}static createElement(t,e){const s=l.createElement("template");return s.innerHTML=t,s}}function M(t,e,s=t,i){if(e===S)return e;let o=void 0!==i?s._$Co?.[i]:s._$Cl;const n=u(e)?void 0:e._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),void 0===n?o=void 0:(o=new n(t),o._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=o:s._$Cl=o),void 0!==o&&(e=M(t,o._$AS(t,e.values),o,i)),e}class R{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??l).importNode(e,!0);k.currentNode=i;let o=k.nextNode(),n=0,r=0,c=s[0];for(;void 0!==c;){if(n===c.index){let e;2===c.type?e=new D(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new W(o,this,t)),this._$AV.push(e),c=s[++r]}n!==c?.index&&(o=k.nextNode(),n++)}return k.currentNode=l,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class D{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=M(this,t,e),u(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==S&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):f(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==T&&u(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=x.createElement(O(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new R(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=L.get(t.strings);return void 0===e&&L.set(t.strings,e=new x(t)),e}k(t){p(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new D(this.O(d()),this.O(d()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class N{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(void 0===o)t=M(this,t,e,0),n=!u(t)||t!==this._$AH&&t!==S,n&&(this._$AH=t);else{const i=t;let r,c;for(t=o[0],r=0;r<o.length-1;r++)c=M(this,i[s+r],e,r),c===S&&(c=this._$AH[r]),n||=!u(c)||c!==this._$AH[r],c===T?t=T:t!==T&&(t+=(c??"")+o[r+1]),this._$AH[r]=c}n&&!i&&this.j(t)}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class H extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===T?void 0:t}}class j extends N{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T)}}class I extends N{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=M(this,t,e,0)??T)===S)return;const s=this._$AH,i=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==T&&(s===T||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class W{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const F={M:r,P:c,A:a,C:1,L:P,R,D:f,V:M,I:D,H:N,N:j,U:I,B:H,F:W},z=i.litHtmlPolyfillSupport;z?.(x,D),(i.litHtmlVersions??=[]).push("3.3.1");const B=(t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new D(e.insertBefore(d(),t),t,void 0,s??{})}return o._$AI(t),o}},41557:(t,e,s)=>{s.d(e,{WF:()=>T,lh:()=>i.c,le:()=>L,s6:()=>x,CP:()=>k,zl:()=>O,Bq:()=>M,pf:()=>R});var i=s(55333),o=s(50842);o.W3,o.Ec;var n=s(89827);const r=t=>{let e=t;for(;e=e.parentNode??e.host;)if(e?.constructor?.lumina){const s=e;return s.manager?.loadedCalled||(s.J??s._offspring).push(t),(s.I??s._postLoad).promise}return!1},c={};function a(){}const h=Object.defineProperty,l=globalThis.HTMLElement??a;class d extends l{constructor(){super(),this.#t={},this.#e=[],this.I=new n.c,this.H=new n.c,this.J=[];const t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(e=>{Object.hasOwn(t,e)&&(t.#t[e]=t[e],delete t[e])}),e.A?t.#s({a:e.A}):e.B.then(async s=>{await e.K.p,t.#s(await(s.default?.then(t=>"function"==typeof t?{a:t}:t)??s))}).catch(e=>{t.H.reject(e),setTimeout(()=>{throw e})})}static{this.lumina=!0}static F(){for(const t of this.C??[])h(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#t[t]},set(e){this.#t[t]=e}});for(const t of this.E??[])h(this.prototype,t,{async value(...e){this.#i||await this.H.promise;const s=this.#i;return await s[t](...e)},configurable:!0});for(const t of this.D??[])h(this.prototype,t,{value(...e){return this.#i[t](...e)},configurable:!0})}#i;#t;#e;get manager(){return this.#i?.manager}attributeChangedCallback(t,e,s){this.#i?.attributeChangedCallback(t,e,s),this.#i||this.#e.push(t)}connectedCallback(){this.#i?this.#i.connectedCallback?.():queueMicrotask(()=>this.G=r(this))}disconnectedCallback(){this.#i?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#s(t){const e=this.constructor,s=e.L,i=this.#t,o=Object.values(t).find(t=>t.L===s),n=`${s}--lazy`;let r=o;for(;r&&!Object.hasOwn(r,"lumina");)r=Object.getPrototypeOf(r);p(r),!e.A&&(e.A=o,customElements.define(n,o)),o.N=this;const c=document.createElement(n);o.N=void 0,this.#i=c,this.#t=c,this.#e.forEach(t=>c.attributeChangedCallback(t,null,this.getAttribute(t))),Object.entries(i).forEach(u,c);const a=this.isConnected;(a||this.G)&&(c.connectedCallback?.(),a||c.disconnectedCallback())}addController(){}requestUpdate(){this.#i?.requestUpdate()}}function u([t,e]){this[t]=e}const p=t=>{const e=t.prototype,s=Element.prototype;Object.hasOwn(e,"isConnected")||(e.setAttribute=function(t,e){s.setAttribute.call(this.el,t,e)},e.removeAttribute=function(t){s.removeAttribute.call(this.el,t)},h(e,"isConnected",{get(){return Reflect.get(s,"isConnected",this.el)}}))};var f=s(9592);const m=/[A-Z]+(?![a-z])|[A-Z]/gu;crypto;var g=s(46337),y=s(94667),$=s(36752),v=s(7804);const A=(0,v.u$)(class extends v.WL{constructor(t){if(super(t),t.type!==v.OA.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const s=t.element.classList;for(const t of this.st)t in e||(s.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return $.c0}}),_="important",b=" !"+_,E=(0,v.u$)(class extends v.WL{constructor(t){if(super(t),t.type!==v.OA.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ft.add(t);const e="string"==typeof i&&i.endsWith(b);t.includes("-")||e?s.setProperty(t,e?i.slice(0,-11):i,e?_:""):s[t]=i}}return $.c0}});s(80538);var C=s(4489);class w extends i.G{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=g.s6,this.T=[],this.#o=new WeakMap,this.#n=t,this.exports=void 0,this.hasDestroy=S in t&&"function"==typeof t.destroy,g.WF.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){const e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${S} prop.`)}void 0!==this.#r&&clearTimeout(this.#r),(0,i.p)();for(const e of t.M)"triggerConnected"in e?e.triggerConnected():(0,f.UF)(e.hostConnected,e)},hostDisconnected:()=>{for(const e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():(0,f.UF)(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(const e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):(0,f.UF)(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(const e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):(0,f.UF)(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),(0,y.s)(t)}#r;#n;async destroy(){if(!this.destroyed){this.#n.el.isConnected&&(this.hasDestroy=!1,this.#n.el.remove()),this.#r=void 0,this.destroyed=!0;for(const t of this.#n.M)"triggerDestroy"in t?t.triggerDestroy():(0,f.UF)(t.hostDestroy,t);this.#n.M.splice(0)}}U(){if(void 0!==this.#r&&clearTimeout(this.#r),!this.#n.el.isConnected&&!this.#n.autoDestroyDisabled){const t=()=>{this.#n.destroy()};this.#r=(0,n.o)(t,U)}}S(t,e){const s=this.T;this.V=g.s6,this.T=[],s.forEach(s=>s(t,e))}#o;W(t,e){("object"==typeof e&&null!==e||"function"==typeof e)&&this.#o.set(e,t)}X(t){return"object"==typeof t&&null!==t||"function"==typeof t?this.#o.get(t):void 0}}let U=1e3;const S="autoDestroyDisabled";class T extends g.WF{constructor(){super(),this.M=[],this.manager=new w(this);const t=this,e=t.constructor,s=e.N,i=e.K.o,o=T.prototype.shouldUpdate;t.#c=s?.H??new n.c,t.I=s?.I??new n.c,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#a=t.enableUpdating,t.enableUpdating=a,t.shouldUpdate!==o&&(t.#h=t.shouldUpdate,t.shouldUpdate=o),i&&(t.#l=new Map,e.elementProperties.forEach((e,s)=>t.#l.set(s,i()))),g.S$&&t.el.setAttribute(e.K.hydratedAttribute,"")}static finalizeStyles(t){const e=super.finalizeStyles(t),s=this.shadowRootOptions===c;return void 0===this.K?.commonStyles||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){const s="number"==typeof e?e:Array.isArray(e)?e[0]:0,i=Array.isArray(e)?e[1]:void 0,o=i?.hasChanged??g.Ec,n={attribute:!!(1&s&&"string"==typeof t)&&(r=t,r.replace(m,(t,e)=>`${0===e?"":"-"}${t.toLowerCase()}`)),reflect:!!(2&s),type:4&s?Boolean:8&s?Number:void 0,state:!!(16&s),readOnly:!!(32&s),noAccessor:!!(64&s),c:!1,...i,hasChanged(t,e){const s=o(t,e);return n.c=s,s}};var r;super.createProperty(t,n)}static getPropertyDescriptor(t,e,s){const o=this.K,n=super.getPropertyDescriptor(t,e,s);return s.d=n,{...n,get(){return o.t?.(this.#l.get(t)),n.get?.call(this)},set(e){const o=this.manager;if(s.readOnly&&!y.a&&(o.R||o.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${e}"`);n.set.call(this,e??void 0),s.c&&this.#l?.get(t)?.notify(),o.T.length>0&&((0,i.p)(),o?.S(t,e))}}}static{this.lumina=!0}#l;#h;#a;#c;#d;connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;const t=this.constructor.K.c?.(()=>this.requestUpdate());this.#d=t;const e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#u().catch(t=>{this.#c.reject(t),setTimeout(()=>{throw t})})):t&&this.requestUpdate()}#p(t){try{this.#d.clear(),this.constructor.K.r(this.#d,()=>super.update(t))}catch(t){throw this.#d.clear(),t}}disconnectedCallback(){super.disconnectedCallback(),this.#d?.destroy(),this.#d=void 0}createRenderRoot(){const t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,i=t??(s===c?this.el:this.el.attachShadow(s));if(this.isConnected){const t=i.getRootNode();t.adoptedStyleSheets=[...t.adoptedStyleSheets,...e.elementStyles.map(t=>"styleSheet"in t?t.styleSheet:t)]}return i}async#u(){const t=this.el.G??r(this.el);t&&await t;const e=[];for(const t of this.M)"triggerLoad"in t?e.push(t.triggerLoad()):e.push((0,f.ao)(t.hostLoad,t));await Promise.all(e),await(this.load?.()),this.manager.hasDestroy&&this.manager.onUpdate(t=>t.has(S)&&this.manager.U()),this.#a(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();const s=this.J.filter(t=>!t.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async t=>await t.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(const t of this.M)"triggerLoaded"in t?t.triggerLoaded():(0,f.UF)(t.hostLoaded,t);this.loaded?.(),this.#c.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#h?.(t)??!0}update(t){this.#d?this.#p(t):super.update(t)}listen(t,e,s){const i=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,i,s),()=>this.el.removeEventListener(t,i,s)))}listenOn(t,e,s,i){const o=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,o,i),()=>t.removeEventListener(e,o,i)))}async componentOnReady(){return await this.#c.promise,this}addController(t){this.M.push(t),!(y.c in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}}const L=t=>{let e;const s=t=>{e=new URL(t,globalThis.location?.href||void 0).href},i={...t,getAssetPath(t){const s=new URL(t,e);return s.origin!==globalThis.location?.origin?s.href:s.pathname},setAssetPath:s,customElement(t,e){e.K=i,e.L=t,customElements.get(t)||customElements.define(t,e)}};return s(t.defaultAssetPath),i},k=t=>"object"==typeof t&&null!=t?A(t):t,O=t=>"object"==typeof t&&null!=t?E(t):t;class P extends v.WL{#f;#m;constructor(t){super(t);const e=this;this.#m=function(t){return e.#f.call(this,t)}}render(t){return"function"==typeof t?(this.#f=t,(0,C.K)(this.#m)):(0,C.K)(t)}}(0,v.u$)(P);const x=g.s6;function M(t,e,s){null==s?t.removeAttribute(e):t.setAttribute(e,s)}const R={toAttribute:t=>!0===t?"":!1===t?null:t}},46337:(t,e,s)=>{s.d(e,{WF:()=>r,AH:()=>i.AH,qy:()=>o.qy,S$:()=>a,Ec:()=>i.Ec,s6:()=>o.s6,JW:()=>o.JW});var i=s(50842),o=s(36752);const n=globalThis;class r extends i.mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,o.XX)(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return o.c0}}r._$litElement$=!0,r.finalized=!0,n.litElementHydrateSupport?.({LitElement:r});const c=n.litElementPolyfillSupport;c?.({LitElement:r}),(n.litElementVersions??=[]).push("4.2.1");const a=!1},48015:(t,e,s)=>{s.d(e,{_:()=>p,K:()=>g});var i=s(36752),o=s(18504),n=s(7804);const r=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),r(t,e);return!0},c=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},a=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),d(e)}};function h(t){void 0!==this._$AN?(c(this),this._$AM=t,a(this)):this._$AM=t}function l(t,e=!1,s=0){const i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)r(i[t],!1),c(i[t]);else null!=i&&(r(i,!1),c(i));else r(this,t)}const d=t=>{t.type==n.OA.CHILD&&(t._$AP??=l,t._$AQ??=h)};class u extends n.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),a(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(r(this,t),c(this))}setValue(t){if((0,o.Rt)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const p=()=>new f;class f{}const m=new WeakMap,g=(0,n.u$)(class extends u{render(t){return i.s6}update(t,[e]){const s=e!==this.G;return s&&void 0!==this.G&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),i.s6}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let s=m.get(e);void 0===s&&(s=new WeakMap,m.set(e,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?m.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},50842:(t,e,s)=>{s.d(e,{mN:()=>w,AH:()=>a,W3:()=>b,Ec:()=>E});const i=globalThis,o=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=new WeakMap;class c{constructor(t,e,s){if(this._$cssResult$=!0,s!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&r.set(e,t))}return t}toString(){return this.cssText}}const a=(t,...e)=>{const s=1===t.length?t[0]:e.reduce((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1],t[0]);return new c(s,t,n)},h=(t,e)=>{if(o)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const s of e){const e=document.createElement("style"),o=i.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=s.cssText,t.appendChild(e)}},l=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new c("string"==typeof t?t:t+"",void 0,n))(e)})(t):t,{is:d,defineProperty:u,getOwnPropertyDescriptor:p,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,y=globalThis,$=y.trustedTypes,v=$?$.emptyScript:"",A=y.reactiveElementPolyfillSupport,_=(t,e)=>t,b={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},E=(t,e)=>!d(t,e),C={attribute:!0,type:String,converter:b,reflect:!1,useDefault:!1,hasChanged:E};Symbol.metadata??=Symbol("metadata"),y.litPropertyMetadata??=new WeakMap;class w extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&u(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const n=i?.call(this);o?.call(this,e),this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??C}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const t=this.properties,e=[...f(t),...m(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return h(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:b).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:b;this._$Em=i;const n=o.fromAttribute(e,t.type);this[i]=n??this._$Ej?.get(i)??n,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const i=this.constructor,o=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??E)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==o||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[_("elementProperties")]=new Map,w[_("finalized")]=new Map,A?.({ReactiveElement:w}),(y.reactiveElementVersions??=[]).push("2.1.1")},55333:(t,e,s)=>{s.d(e,{C:()=>p,G:()=>m,c:()=>d,p:()=>a,t:()=>l});var i=s(9592),o=s(94667),n=s(46337),r=s(89827);let c;const a=()=>{c?.forEach(({callbacks:t},e)=>{const s=Object.keys(e);t.forEach(t=>t(s))}),c=void 0},h=(t,e,s)=>{const o=t.manager;return o.V!==n.s6&&o.V!==s&&o.S(void 0,void 0),0===o.T.length&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=s,o.T.push((t,o)=>(0,i.UF)(e,void 0,s===o?t:void 0)),s},l=(t=[(0,o.r)(),...(0,o.d)()],e,s)=>{const n=Array.isArray(t)?t:[t];let r=n.length+1;const l=t=>{r-=1,void 0!==t&&(r=Math.min(r,0)),0===r&&e(t)};n.forEach(t=>((t,e,s)=>{const o=Object.keys(t),n=o.length;void 0===c&&queueMicrotask(a),c??=new Map;let r=c.get(t);return void 0===r&&(r={callbacks:[],keyCount:n},c.set(t,r)),r.keyCount!==n&&(r.callbacks.forEach(t=>t(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(o=>{const r=t=>(0,i.UF)(e,null,t),c=o[n];void 0===c?r(void 0):t[c]===s?r(c):r(void 0)}),s})(t,e=>l(void 0===e?void 0:{key:e,host:t,isReactive:!1}),s));for(const t of n)if("manager"in t&&t.manager.component===t){h(t,e=>l(void 0===e?void 0:{key:e,host:t,isReactive:!0}),s);break}return s},d=((t="",e={},s=(0,o.r)())=>{const i={emit:i=>{""===t&&a();const o=new CustomEvent(t,{detail:i,cancelable:!0,bubbles:!0,composed:!0,...e});return s.el.dispatchEvent(o),o}};return""===t&&l(void 0,e=>t=e.key,i),i}).bind(null,"");var u;u=o.c;class p{constructor(t){this.#g=[],this.#y=[],this.#$=[],this.#v=[],this.#A=[],this.#_=[],this.#b=[],this.#E=[],this.#C=[],this.#w=!1,this.P=new r.c,this.connectedCalled=!1,this.loadedCalled=!1,this[u]=!0,this.#U=[];const e=this,s=t??(0,o.r)(new.target.name);e.#n=s,e.ready=e.P.promise,e.#S=g(e),e.component=s,e.#n.addController(e),void 0===e.#n.manager||((0,o.b)(e),queueMicrotask(()=>e.catchUpLifecycle()))}#g;#y;#$;#v;#A;#_;#b;#E;#C;#w;#n;catchUpLifecycle(){const{manager:t}=this.#n;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t.#w||this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(console.error)}#S;get exports(){return this.#S}set exports(t){const e=this.#S;e!==t&&(this.#S=t,this.#U.forEach(i.UF),this.connectedCalled&&!1!==this.O&&this.#n.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#S=e?g(t):t,this.#U.forEach(i.UF)}#U;watchExports(t){const e=()=>t(this.#S);return this.#U.push(e),()=>{this.#U.splice(this.#U.indexOf(e),1)}}get use(){return(0,o.s)(this.#n),o.u}get useRef(){return(0,o.s)(this.#n),o.k}get useRefSync(){return(0,o.s)(this.#n),o.l}controllerRemoved(){this.#n.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#g.push(t)}onDisconnected(t){this.#y.push(t)}onLoad(t){this.#$.push(t)}onLoaded(t){this.#v.push(t)}onUpdate(t){this.#A.push(t)}onUpdated(t){this.#_.push(t)}onDestroy(t){this.#b.push(t)}onLifecycle(t){this.#E.push(t),this.connectedCalled&&this.#n.el.isConnected&&this.#T(t)}triggerConnected(){const t=this;t.hostConnected&&(0,i.UF)(t.hostConnected,t),t.#g.forEach(i.UF),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&(0,i.UF)(t.hostDisconnected,t),t.#y.forEach(i.UF),t.#C.forEach(i.UF),t.#C=[]}async triggerLoad(){if(this.#w)return;this.#w=!0;const t=this;t.hostLoad&&await(0,i.ao)(t.hostLoad,t),this.#$.length>0&&await Promise.allSettled(this.#$.map(i.ao)),this.P.resolve(this.#S)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&(0,i.UF)(this.hostLoaded,this),this.#v.forEach(i.UF),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&(0,i.UF)(this.hostUpdate,this,t),this.#A.forEach(f,t)}triggerUpdated(t){this.hostUpdated&&(0,i.UF)(this.hostUpdated,this,t),this.#_.forEach(f,t)}triggerDestroy(){this.hostDestroy&&(0,i.UF)(this.hostDestroy,this),this.#b.forEach(i.UF)}triggerLifecycle(){this.hostLifecycle&&this.#T(()=>this.hostLifecycle()),this.#E.forEach(this.#T,this)}#T(t){(0,o.s)(this.#n);const e=(0,i.UF)(t);(Array.isArray(e)?e:[e]).forEach(t=>{"function"==typeof t?this.#C.push(t):"object"==typeof t&&"function"==typeof t.remove&&this.#C.push(t.remove)})}}function f(t){(0,i.UF)(t,void 0,this)}const m=p,g=t=>{if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const e=new Proxy(t,{get(t,s,i){if("exports"!==s&&"_exports"!==s||!(s in t)||t[s]!==e)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,i):void 0}});return e}},80538:(t,e,s)=>{s.d(e,{V:()=>r});var i=s(36752),o=s(7804),n=s(18504);const r=(0,o.u$)(class extends o.WL{constructor(t){if(super(t),t.type!==o.OA.PROPERTY&&t.type!==o.OA.ATTRIBUTE&&t.type!==o.OA.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!(0,n.Rt)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===i.c0||e===i.s6)return e;const s=t.element,r=t.name;if(t.type===o.OA.PROPERTY){if(e===s[r])return i.c0}else if(t.type===o.OA.BOOLEAN_ATTRIBUTE){if(!!e===s.hasAttribute(r))return i.c0}else if(t.type===o.OA.ATTRIBUTE&&s.getAttribute(r)===e+"")return i.c0;return(0,n.mY)(t),e}})},89827:(t,e,s)=>{s.d(e,{c:()=>i,o:()=>o});class i{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}const o=(t,e)=>{const s=e>n?r:e/c;let i=0;const o=setInterval(()=>{i+=s,i>=e&&(clearInterval(o),t())},s);return o},n=4e3,r=2e3,c=4},94667:(t,e,s)=>{s.d(e,{a:()=>g,b:()=>h,c:()=>i,d:()=>l,f:()=>y,i:()=>o,j:()=>u,k:()=>f,l:()=>m,r:()=>c,s:()=>r,u:()=>p});const i=Symbol.for("controller"),o=t=>"function"==typeof t?.then;let n;const r=t=>{n!==t&&(n=t,queueMicrotask(()=>n===t?n=void 0:0))},c=t=>n;let a=[];const h=t=>{if(void 0===t)return void(a=[]);const e=a.indexOf(t);a=-1===e?[...a,t]:a.slice(0,e+1),queueMicrotask(()=>a=[])},l=()=>a;let d;const u=t=>{d!==t&&(d=t,queueMicrotask(()=>d===t?d=void 0:0))},p=async(t,e)=>{const s=m(t);if(void 0===s)return t;if(await s.ready,"function"==typeof e){const t=s.watchExports(s=>e(s,t))}return s.exports},f=async t=>{const e=m(t);return await e.ready,e},m=t=>{const e=c().manager.X(t);if(void 0!==e)return e;if((t=>"object"==typeof t&&null!==t&&(i in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t))return t;const s=(()=>{const t=d;return d=void 0,t})();return void 0!==s?s:void 0};let g=!1;const y=t=>{g=!0;try{return t()}finally{g=!1}}}}]);
|
|
1
|
+
/*! For license information please see d391bfbaf0e790cd10d6.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[168],{4489:(t,e,s)=>{s.d(e,{K:()=>i.K,_:()=>i._});var i=s(48015)},7804:(t,e,s)=>{s.d(e,{OA:()=>i,WL:()=>n,u$:()=>o});const i={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},o=t=>(...e)=>({_$litDirective$:t,values:e});class n{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}},9592:(t,e,s)=>{s.d(e,{UF:()=>i,ao:()=>o});const i=(t,e,...s)=>{try{return t?.call(e,...s)}catch(e){console.error(e,t)}},o=async(t,e,...s)=>{try{const i=t?.call(e,...s);return await i}catch(e){console.error(e,t)}}},14813:(t,e,s)=>{s.d(e,{Qu:()=>n,qu:()=>o});var i=s(34088);let o=!1;const n=t=>{o=!0,(0,i.s)(t)}},18504:(t,e,s)=>{s.d(e,{Rt:()=>n,mY:()=>c});var i=s(36752);const{I:o}=i.ge,n=t=>void 0===t.strings,r={},c=(t,e=r)=>t._$AH=e},20150:(t,e,s)=>{s.d(e,{Yt:()=>i,Zj:()=>a,eg:()=>c});const i=(t,e,s)=>(0,n(e).subscribe)(e=>{const i=e.some(e=>((t,e)=>{let s=t;for(;s;){if(s===e)return!0;if(!s.parentNode)return!1;s=s.parentNode instanceof ShadowRoot?s.parentNode.host:s.parentNode}return!1})(t,e.target));i&&s()}),o={},n=t=>{const e=t.join(","),s=o[e];if(void 0!==s)return s;const i=new Set,n=new MutationObserver(t=>i.forEach(e=>e(t)));globalThis.document&&n.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0});const r={subscribe:t=>(i.add(t),()=>{i.delete(t),0===i.size&&(n.disconnect(),o[e]=void 0)})};return o[e]=r,r},r=(t,e)=>{let s=t;for(;s;){const t=s.closest?.(e);if(t)return t;const i=s.getRootNode?.();if(i===globalThis.document)return;s=i.host}};function c(t){const e=r(t,".calcite-mode-dark, .calcite-mode-light, .calcite-mode-auto");return e?.classList.contains("calcite-mode-dark")||e?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const a=(t,e,s)=>{const i=r(t,`[${e}]`);return i?.getAttribute(e)??s}},34088:(t,e,s)=>{s.d(e,{C:()=>c,D:()=>a,a:()=>h,c:()=>g,f:()=>u,g:()=>y,l:()=>p,s:()=>$}),Object(function(){var t=new Error("Cannot find module '../calcite/calcite.css'");throw t.code="MODULE_NOT_FOUND",t}());var i=s(41557),o=s(46337);const n="calcite-mode-auto",r="calcite-mode-dark",c={autoMode:n,darkMode:r,lightMode:"calcite-mode-light",rtl:"calcite--rtl",calciteAnimate:"calcite-animate",calciteAnimateInUp:"calcite-animate__in-up",calciteAnimateInDown:"calcite-animate__in-down",calciteAnimateInRight:"calcite-animate__in-right",calciteAnimateInLeft:"calcite-animate__in-left"},a={filter:250,nextTick:0,resize:150,reposition:100},h=25;function l(){const{classList:t}=document.body,e=window.matchMedia("(prefers-color-scheme: dark)").matches,s=()=>t.contains(r)||t.contains(n)&&e?"dark":"light",i=t=>document.body.dispatchEvent(new CustomEvent("calciteModeChange",{bubbles:!0,detail:{mode:t}})),o=t=>{c!==t&&i(t),c=t};let c=s();i(c),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>o(t.matches?"dark":"light")),new MutationObserver(()=>o(s())).observe(document.body,{attributes:!0,attributeFilter:["class"]})}const d=globalThis.calciteConfig,u=d?.focusTrapStack||[],p=d?.logLevel||"info",f="3.3.2";o.S$||("interactive"===document.readyState?l():document.addEventListener("DOMContentLoaded",l,{once:!0})),queueMicrotask(function(){if(d&&d.version)return;console.info(`Using Calcite Components ${f} [Date: 2025-10-03, Revision: d92ed7736]`);const t=d||globalThis.calciteConfig||{};Object.defineProperty(t,"version",{value:f,writable:!1}),globalThis.calciteConfig=t});const m=(0,i.le)({defaultAssetPath:"https://js.arcgis.com/calcite-components/3.3.2/",hydratedAttribute:"calcite-hydrated"}),{customElement:g,getAssetPath:y,setAssetPath:$}=m},36752:(t,e,s)=>{s.d(e,{JW:()=>w,XX:()=>B,c0:()=>S,ej:()=>U,ge:()=>F,qy:()=>C,s6:()=>T});const i=globalThis,o=i.trustedTypes,n=o?o.createPolicy("lit-html",{createHTML:t=>t}):void 0,r="$lit$",c=`lit$${Math.random().toFixed(9).slice(2)}$`,a="?"+c,h=`<${a}>`,l=document,d=()=>l.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,p=Array.isArray,f=t=>p(t)||"function"==typeof t?.[Symbol.iterator],m="[ \t\n\f\r]",g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,$=/>/g,v=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),A=/'/g,_=/"/g,b=/^(?:script|style|textarea|title)$/i,E=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),C=E(1),w=E(2),U=E(3),S=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),L=new WeakMap,k=l.createTreeWalker(l,129);function O(t,e){if(!p(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==n?n.createHTML(e):e}const P=(t,e)=>{const s=t.length-1,i=[];let o,n=2===e?"<svg>":3===e?"<math>":"",a=g;for(let e=0;e<s;e++){const s=t[e];let l,d,u=-1,p=0;for(;p<s.length&&(a.lastIndex=p,d=a.exec(s),null!==d);)p=a.lastIndex,a===g?"!--"===d[1]?a=y:void 0!==d[1]?a=$:void 0!==d[2]?(b.test(d[2])&&(o=RegExp("</"+d[2],"g")),a=v):void 0!==d[3]&&(a=v):a===v?">"===d[0]?(a=o??g,u=-1):void 0===d[1]?u=-2:(u=a.lastIndex-d[2].length,l=d[1],a=void 0===d[3]?v:'"'===d[3]?_:A):a===_||a===A?a=v:a===y||a===$?a=g:(a=v,o=void 0);const f=a===v&&t[e+1].startsWith("/>")?" ":"";n+=a===g?s+h:u>=0?(i.push(l),s.slice(0,u)+r+s.slice(u)+c+f):s+c+(-2===u?e:f)}return[O(t,n+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class x{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,h=0;const l=t.length-1,u=this.parts,[p,f]=P(t,e);if(this.el=x.createElement(p,s),k.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=k.nextNode())&&u.length<l;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(r)){const e=f[h++],s=i.getAttribute(t).split(c),o=/([.?@])?(.*)/.exec(e);u.push({type:1,index:n,name:o[2],strings:s,ctor:"."===o[1]?H:"?"===o[1]?j:"@"===o[1]?I:N}),i.removeAttribute(t)}else t.startsWith(c)&&(u.push({type:6,index:n}),i.removeAttribute(t));if(b.test(i.tagName)){const t=i.textContent.split(c),e=t.length-1;if(e>0){i.textContent=o?o.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],d()),k.nextNode(),u.push({type:2,index:++n});i.append(t[e],d())}}}else if(8===i.nodeType)if(i.data===a)u.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(c,t+1));)u.push({type:7,index:n}),t+=c.length-1}n++}}static createElement(t,e){const s=l.createElement("template");return s.innerHTML=t,s}}function M(t,e,s=t,i){if(e===S)return e;let o=void 0!==i?s._$Co?.[i]:s._$Cl;const n=u(e)?void 0:e._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),void 0===n?o=void 0:(o=new n(t),o._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=o:s._$Cl=o),void 0!==o&&(e=M(t,o._$AS(t,e.values),o,i)),e}class R{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??l).importNode(e,!0);k.currentNode=i;let o=k.nextNode(),n=0,r=0,c=s[0];for(;void 0!==c;){if(n===c.index){let e;2===c.type?e=new D(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new W(o,this,t)),this._$AV.push(e),c=s[++r]}n!==c?.index&&(o=k.nextNode(),n++)}return k.currentNode=l,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class D{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=M(this,t,e),u(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==S&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):f(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==T&&u(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=x.createElement(O(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new R(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=L.get(t.strings);return void 0===e&&L.set(t.strings,e=new x(t)),e}k(t){p(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new D(this.O(d()),this.O(d()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class N{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(void 0===o)t=M(this,t,e,0),n=!u(t)||t!==this._$AH&&t!==S,n&&(this._$AH=t);else{const i=t;let r,c;for(t=o[0],r=0;r<o.length-1;r++)c=M(this,i[s+r],e,r),c===S&&(c=this._$AH[r]),n||=!u(c)||c!==this._$AH[r],c===T?t=T:t!==T&&(t+=(c??"")+o[r+1]),this._$AH[r]=c}n&&!i&&this.j(t)}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class H extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===T?void 0:t}}class j extends N{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T)}}class I extends N{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=M(this,t,e,0)??T)===S)return;const s=this._$AH,i=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==T&&(s===T||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class W{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const F={M:r,P:c,A:a,C:1,L:P,R,D:f,V:M,I:D,H:N,N:j,U:I,B:H,F:W},z=i.litHtmlPolyfillSupport;z?.(x,D),(i.litHtmlVersions??=[]).push("3.3.1");const B=(t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new D(e.insertBefore(d(),t),t,void 0,s??{})}return o._$AI(t),o}},41557:(t,e,s)=>{s.d(e,{WF:()=>T,lh:()=>i.c,le:()=>L,s6:()=>x,CP:()=>k,zl:()=>O,Bq:()=>M,pf:()=>R});var i=s(55333),o=s(50842);o.W3,o.Ec;var n=s(89827);const r=t=>{let e=t;for(;e=e.parentNode??e.host;)if(e?.constructor?.lumina){const s=e;return s.manager?.loadedCalled||(s.J??s._offspring).push(t),(s.I??s._postLoad).promise}return!1},c={};function a(){}const h=Object.defineProperty,l=globalThis.HTMLElement??a;class d extends l{constructor(){super(),this.#t={},this.#e=[],this.I=new n.c,this.H=new n.c,this.J=[];const t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(e=>{Object.hasOwn(t,e)&&(t.#t[e]=t[e],delete t[e])}),e.A?t.#s({a:e.A}):e.B.then(async s=>{await e.K.p,t.#s(await(s.default?.then(t=>"function"==typeof t?{a:t}:t)??s))}).catch(e=>{t.H.reject(e),setTimeout(()=>{throw e})})}static{this.lumina=!0}static F(){for(const t of this.C??[])h(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#t[t]},set(e){this.#t[t]=e}});for(const t of this.E??[])h(this.prototype,t,{async value(...e){this.#i||await this.H.promise;const s=this.#i;return await s[t](...e)},configurable:!0});for(const t of this.D??[])h(this.prototype,t,{value(...e){return this.#i[t](...e)},configurable:!0})}#i;#t;#e;get manager(){return this.#i?.manager}attributeChangedCallback(t,e,s){this.#i?.attributeChangedCallback(t,e,s),this.#i||this.#e.push(t)}connectedCallback(){this.#i?this.#i.connectedCallback?.():queueMicrotask(()=>this.G=r(this))}disconnectedCallback(){this.#i?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#s(t){const e=this.constructor,s=e.L,i=this.#t,o=Object.values(t).find(t=>t.L===s),n=`${s}--lazy`;let r=o;for(;r&&!Object.hasOwn(r,"lumina");)r=Object.getPrototypeOf(r);p(r),!e.A&&(e.A=o,customElements.define(n,o)),o.N=this;const c=document.createElement(n);o.N=void 0,this.#i=c,this.#t=c,this.#e.forEach(t=>c.attributeChangedCallback(t,null,this.getAttribute(t))),Object.entries(i).forEach(u,c);const a=this.isConnected;(a||this.G)&&(c.connectedCallback?.(),a||c.disconnectedCallback())}addController(){}requestUpdate(){this.#i?.requestUpdate()}}function u([t,e]){this[t]=e}const p=t=>{const e=t.prototype,s=Element.prototype;Object.hasOwn(e,"isConnected")||(e.setAttribute=function(t,e){s.setAttribute.call(this.el,t,e)},e.removeAttribute=function(t){s.removeAttribute.call(this.el,t)},h(e,"isConnected",{get(){return Reflect.get(s,"isConnected",this.el)}}))};var f=s(9592);const m=/[A-Z]+(?![a-z])|[A-Z]/gu;crypto;var g=s(46337),y=s(94667),$=s(36752),v=s(7804);const A=(0,v.u$)(class extends v.WL{constructor(t){if(super(t),t.type!==v.OA.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const s=t.element.classList;for(const t of this.st)t in e||(s.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return $.c0}}),_="important",b=" !"+_,E=(0,v.u$)(class extends v.WL{constructor(t){if(super(t),t.type!==v.OA.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ft.add(t);const e="string"==typeof i&&i.endsWith(b);t.includes("-")||e?s.setProperty(t,e?i.slice(0,-11):i,e?_:""):s[t]=i}}return $.c0}});s(80538);var C=s(4489);class w extends i.G{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=g.s6,this.T=[],this.#o=new WeakMap,this.#n=t,this.exports=void 0,this.hasDestroy=S in t&&"function"==typeof t.destroy,g.WF.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){const e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${S} prop.`)}void 0!==this.#r&&clearTimeout(this.#r),(0,i.p)();for(const e of t.M)"triggerConnected"in e?e.triggerConnected():(0,f.UF)(e.hostConnected,e)},hostDisconnected:()=>{for(const e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():(0,f.UF)(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(const e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):(0,f.UF)(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(const e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):(0,f.UF)(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),(0,y.s)(t)}#r;#n;async destroy(){if(!this.destroyed){this.#n.el.isConnected&&(this.hasDestroy=!1,this.#n.el.remove()),this.#r=void 0,this.destroyed=!0;for(const t of this.#n.M)"triggerDestroy"in t?t.triggerDestroy():(0,f.UF)(t.hostDestroy,t);this.#n.M.splice(0)}}U(){if(void 0!==this.#r&&clearTimeout(this.#r),!this.#n.el.isConnected&&!this.#n.autoDestroyDisabled){const t=()=>{this.#n.destroy()};this.#r=(0,n.o)(t,U)}}S(t,e){const s=this.T;this.V=g.s6,this.T=[],s.forEach(s=>s(t,e))}#o;W(t,e){("object"==typeof e&&null!==e||"function"==typeof e)&&this.#o.set(e,t)}X(t){return"object"==typeof t&&null!==t||"function"==typeof t?this.#o.get(t):void 0}}let U=1e3;const S="autoDestroyDisabled";class T extends g.WF{constructor(){super(),this.M=[],this.manager=new w(this);const t=this,e=t.constructor,s=e.N,i=e.K.o,o=T.prototype.shouldUpdate;t.#c=s?.H??new n.c,t.I=s?.I??new n.c,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#a=t.enableUpdating,t.enableUpdating=a,t.shouldUpdate!==o&&(t.#h=t.shouldUpdate,t.shouldUpdate=o),i&&(t.#l=new Map,e.elementProperties.forEach((e,s)=>t.#l.set(s,i()))),g.S$&&t.el.setAttribute(e.K.hydratedAttribute,"")}static finalizeStyles(t){const e=super.finalizeStyles(t),s=this.shadowRootOptions===c;return void 0===this.K?.commonStyles||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){const s="number"==typeof e?e:Array.isArray(e)?e[0]:0,i=Array.isArray(e)?e[1]:void 0,o=i?.hasChanged??g.Ec,n={attribute:!!(1&s&&"string"==typeof t)&&(r=t,r.replace(m,(t,e)=>`${0===e?"":"-"}${t.toLowerCase()}`)),reflect:!!(2&s),type:4&s?Boolean:8&s?Number:void 0,state:!!(16&s),readOnly:!!(32&s),noAccessor:!!(64&s),c:!1,...i,hasChanged(t,e){const s=o(t,e);return n.c=s,s}};var r;super.createProperty(t,n)}static getPropertyDescriptor(t,e,s){const o=this.K,n=super.getPropertyDescriptor(t,e,s);return s.d=n,{...n,get(){return o.t?.(this.#l.get(t)),n.get?.call(this)},set(e){const o=this.manager;if(s.readOnly&&!y.a&&(o.R||o.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${e}"`);n.set.call(this,e??void 0),s.c&&this.#l?.get(t)?.notify(),o.T.length>0&&((0,i.p)(),o?.S(t,e))}}}static{this.lumina=!0}#l;#h;#a;#c;#d;connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;const t=this.constructor.K.c?.(()=>this.requestUpdate());this.#d=t;const e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#u().catch(t=>{this.#c.reject(t),setTimeout(()=>{throw t})})):t&&this.requestUpdate()}#p(t){try{this.#d.clear(),this.constructor.K.r(this.#d,()=>super.update(t))}catch(t){throw this.#d.clear(),t}}disconnectedCallback(){super.disconnectedCallback(),this.#d?.destroy(),this.#d=void 0}createRenderRoot(){const t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,i=t??(s===c?this.el:this.el.attachShadow(s));if(this.isConnected){const t=i.getRootNode();t.adoptedStyleSheets=[...t.adoptedStyleSheets,...e.elementStyles.map(t=>"styleSheet"in t?t.styleSheet:t)]}return i}async#u(){const t=this.el.G??r(this.el);t&&await t;const e=[];for(const t of this.M)"triggerLoad"in t?e.push(t.triggerLoad()):e.push((0,f.ao)(t.hostLoad,t));await Promise.all(e),await(this.load?.()),this.manager.hasDestroy&&this.manager.onUpdate(t=>t.has(S)&&this.manager.U()),this.#a(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();const s=this.J.filter(t=>!t.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async t=>await t.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(const t of this.M)"triggerLoaded"in t?t.triggerLoaded():(0,f.UF)(t.hostLoaded,t);this.loaded?.(),this.#c.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#h?.(t)??!0}update(t){this.#d?this.#p(t):super.update(t)}listen(t,e,s){const i=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,i,s),()=>this.el.removeEventListener(t,i,s)))}listenOn(t,e,s,i){const o=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,o,i),()=>t.removeEventListener(e,o,i)))}async componentOnReady(){return await this.#c.promise,this}addController(t){this.M.push(t),!(y.c in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}}const L=t=>{let e;const s=t=>{e=new URL(t,globalThis.location?.href||void 0).href},i={...t,getAssetPath(t){const s=new URL(t,e);return s.origin!==globalThis.location?.origin?s.href:s.pathname},setAssetPath:s,customElement(t,e){e.K=i,e.L=t,customElements.get(t)||customElements.define(t,e)}};return s(t.defaultAssetPath),i},k=t=>"object"==typeof t&&null!=t?A(t):t,O=t=>"object"==typeof t&&null!=t?E(t):t;class P extends v.WL{#f;#m;constructor(t){super(t);const e=this;this.#m=function(t){return e.#f.call(this,t)}}render(t){return"function"==typeof t?(this.#f=t,(0,C.K)(this.#m)):(0,C.K)(t)}}(0,v.u$)(P);const x=g.s6;function M(t,e,s){null==s?t.removeAttribute(e):t.setAttribute(e,s)}const R={toAttribute:t=>!0===t?"":!1===t?null:t}},46337:(t,e,s)=>{s.d(e,{WF:()=>r,AH:()=>i.AH,qy:()=>o.qy,S$:()=>a,Ec:()=>i.Ec,s6:()=>o.s6,JW:()=>o.JW});var i=s(50842),o=s(36752);const n=globalThis;class r extends i.mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,o.XX)(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return o.c0}}r._$litElement$=!0,r.finalized=!0,n.litElementHydrateSupport?.({LitElement:r});const c=n.litElementPolyfillSupport;c?.({LitElement:r}),(n.litElementVersions??=[]).push("4.2.1");const a=!1},48015:(t,e,s)=>{s.d(e,{_:()=>p,K:()=>g});var i=s(36752),o=s(18504),n=s(7804);const r=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),r(t,e);return!0},c=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},a=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),d(e)}};function h(t){void 0!==this._$AN?(c(this),this._$AM=t,a(this)):this._$AM=t}function l(t,e=!1,s=0){const i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)r(i[t],!1),c(i[t]);else null!=i&&(r(i,!1),c(i));else r(this,t)}const d=t=>{t.type==n.OA.CHILD&&(t._$AP??=l,t._$AQ??=h)};class u extends n.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),a(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(r(this,t),c(this))}setValue(t){if((0,o.Rt)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const p=()=>new f;class f{}const m=new WeakMap,g=(0,n.u$)(class extends u{render(t){return i.s6}update(t,[e]){const s=e!==this.G;return s&&void 0!==this.G&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),i.s6}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let s=m.get(e);void 0===s&&(s=new WeakMap,m.set(e,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?m.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},50842:(t,e,s)=>{s.d(e,{mN:()=>w,AH:()=>a,W3:()=>b,Ec:()=>E});const i=globalThis,o=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=new WeakMap;class c{constructor(t,e,s){if(this._$cssResult$=!0,s!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&r.set(e,t))}return t}toString(){return this.cssText}}const a=(t,...e)=>{const s=1===t.length?t[0]:e.reduce((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1],t[0]);return new c(s,t,n)},h=(t,e)=>{if(o)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const s of e){const e=document.createElement("style"),o=i.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=s.cssText,t.appendChild(e)}},l=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new c("string"==typeof t?t:t+"",void 0,n))(e)})(t):t,{is:d,defineProperty:u,getOwnPropertyDescriptor:p,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,y=globalThis,$=y.trustedTypes,v=$?$.emptyScript:"",A=y.reactiveElementPolyfillSupport,_=(t,e)=>t,b={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},E=(t,e)=>!d(t,e),C={attribute:!0,type:String,converter:b,reflect:!1,useDefault:!1,hasChanged:E};Symbol.metadata??=Symbol("metadata"),y.litPropertyMetadata??=new WeakMap;class w extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&u(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const n=i?.call(this);o?.call(this,e),this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??C}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const t=this.properties,e=[...f(t),...m(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return h(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:b).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:b;this._$Em=i;const n=o.fromAttribute(e,t.type);this[i]=n??this._$Ej?.get(i)??n,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const i=this.constructor,o=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??E)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==o||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[_("elementProperties")]=new Map,w[_("finalized")]=new Map,A?.({ReactiveElement:w}),(y.reactiveElementVersions??=[]).push("2.1.1")},55333:(t,e,s)=>{s.d(e,{C:()=>p,G:()=>m,c:()=>d,p:()=>a,t:()=>l});var i=s(9592),o=s(94667),n=s(46337),r=s(89827);let c;const a=()=>{c?.forEach(({callbacks:t},e)=>{const s=Object.keys(e);t.forEach(t=>t(s))}),c=void 0},h=(t,e,s)=>{const o=t.manager;return o.V!==n.s6&&o.V!==s&&o.S(void 0,void 0),0===o.T.length&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=s,o.T.push((t,o)=>(0,i.UF)(e,void 0,s===o?t:void 0)),s},l=(t=[(0,o.r)(),...(0,o.d)()],e,s)=>{const n=Array.isArray(t)?t:[t];let r=n.length+1;const l=t=>{r-=1,void 0!==t&&(r=Math.min(r,0)),0===r&&e(t)};n.forEach(t=>((t,e,s)=>{const o=Object.keys(t),n=o.length;void 0===c&&queueMicrotask(a),c??=new Map;let r=c.get(t);return void 0===r&&(r={callbacks:[],keyCount:n},c.set(t,r)),r.keyCount!==n&&(r.callbacks.forEach(t=>t(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(o=>{const r=t=>(0,i.UF)(e,null,t),c=o[n];void 0===c?r(void 0):t[c]===s?r(c):r(void 0)}),s})(t,e=>l(void 0===e?void 0:{key:e,host:t,isReactive:!1}),s));for(const t of n)if("manager"in t&&t.manager.component===t){h(t,e=>l(void 0===e?void 0:{key:e,host:t,isReactive:!0}),s);break}return s},d=((t="",e={},s=(0,o.r)())=>{const i={emit:i=>{""===t&&a();const o=new CustomEvent(t,{detail:i,cancelable:!0,bubbles:!0,composed:!0,...e});return s.el.dispatchEvent(o),o}};return""===t&&l(void 0,e=>t=e.key,i),i}).bind(null,"");var u;u=o.c;class p{constructor(t){this.#g=[],this.#y=[],this.#$=[],this.#v=[],this.#A=[],this.#_=[],this.#b=[],this.#E=[],this.#C=[],this.#w=!1,this.P=new r.c,this.connectedCalled=!1,this.loadedCalled=!1,this[u]=!0,this.#U=[];const e=this,s=t??(0,o.r)(new.target.name);e.#n=s,e.ready=e.P.promise,e.#S=g(e),e.component=s,e.#n.addController(e),void 0===e.#n.manager||((0,o.b)(e),queueMicrotask(()=>e.catchUpLifecycle()))}#g;#y;#$;#v;#A;#_;#b;#E;#C;#w;#n;catchUpLifecycle(){const{manager:t}=this.#n;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t.#w||this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(console.error)}#S;get exports(){return this.#S}set exports(t){const e=this.#S;e!==t&&(this.#S=t,this.#U.forEach(i.UF),this.connectedCalled&&!1!==this.O&&this.#n.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#S=e?g(t):t,this.#U.forEach(i.UF)}#U;watchExports(t){const e=()=>t(this.#S);return this.#U.push(e),()=>{this.#U.splice(this.#U.indexOf(e),1)}}get use(){return(0,o.s)(this.#n),o.u}get useRef(){return(0,o.s)(this.#n),o.k}get useRefSync(){return(0,o.s)(this.#n),o.l}controllerRemoved(){this.#n.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#g.push(t)}onDisconnected(t){this.#y.push(t)}onLoad(t){this.#$.push(t)}onLoaded(t){this.#v.push(t)}onUpdate(t){this.#A.push(t)}onUpdated(t){this.#_.push(t)}onDestroy(t){this.#b.push(t)}onLifecycle(t){this.#E.push(t),this.connectedCalled&&this.#n.el.isConnected&&this.#T(t)}triggerConnected(){const t=this;t.hostConnected&&(0,i.UF)(t.hostConnected,t),t.#g.forEach(i.UF),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&(0,i.UF)(t.hostDisconnected,t),t.#y.forEach(i.UF),t.#C.forEach(i.UF),t.#C=[]}async triggerLoad(){if(this.#w)return;this.#w=!0;const t=this;t.hostLoad&&await(0,i.ao)(t.hostLoad,t),this.#$.length>0&&await Promise.allSettled(this.#$.map(i.ao)),this.P.resolve(this.#S)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&(0,i.UF)(this.hostLoaded,this),this.#v.forEach(i.UF),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&(0,i.UF)(this.hostUpdate,this,t),this.#A.forEach(f,t)}triggerUpdated(t){this.hostUpdated&&(0,i.UF)(this.hostUpdated,this,t),this.#_.forEach(f,t)}triggerDestroy(){this.hostDestroy&&(0,i.UF)(this.hostDestroy,this),this.#b.forEach(i.UF)}triggerLifecycle(){this.hostLifecycle&&this.#T(()=>this.hostLifecycle()),this.#E.forEach(this.#T,this)}#T(t){(0,o.s)(this.#n);const e=(0,i.UF)(t);(Array.isArray(e)?e:[e]).forEach(t=>{"function"==typeof t?this.#C.push(t):"object"==typeof t&&"function"==typeof t.remove&&this.#C.push(t.remove)})}}function f(t){(0,i.UF)(t,void 0,this)}const m=p,g=t=>{if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const e=new Proxy(t,{get(t,s,i){if("exports"!==s&&"_exports"!==s||!(s in t)||t[s]!==e)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,i):void 0}});return e}},80538:(t,e,s)=>{s.d(e,{V:()=>r});var i=s(36752),o=s(7804),n=s(18504);const r=(0,o.u$)(class extends o.WL{constructor(t){if(super(t),t.type!==o.OA.PROPERTY&&t.type!==o.OA.ATTRIBUTE&&t.type!==o.OA.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!(0,n.Rt)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===i.c0||e===i.s6)return e;const s=t.element,r=t.name;if(t.type===o.OA.PROPERTY){if(e===s[r])return i.c0}else if(t.type===o.OA.BOOLEAN_ATTRIBUTE){if(!!e===s.hasAttribute(r))return i.c0}else if(t.type===o.OA.ATTRIBUTE&&s.getAttribute(r)===e+"")return i.c0;return(0,n.mY)(t),e}})},89827:(t,e,s)=>{s.d(e,{c:()=>i,o:()=>o});class i{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}const o=(t,e)=>{const s=e>n?r:e/c;let i=0;const o=setInterval(()=>{i+=s,i>=e&&(clearInterval(o),t())},s);return o},n=4e3,r=2e3,c=4},94667:(t,e,s)=>{s.d(e,{a:()=>g,b:()=>h,c:()=>i,d:()=>l,f:()=>y,i:()=>o,j:()=>u,k:()=>f,l:()=>m,r:()=>c,s:()=>r,u:()=>p});const i=Symbol.for("controller"),o=t=>"function"==typeof t?.then;let n;const r=t=>{n!==t&&(n=t,queueMicrotask(()=>n===t?n=void 0:0))},c=t=>n;let a=[];const h=t=>{if(void 0===t)return void(a=[]);const e=a.indexOf(t);a=-1===e?[...a,t]:a.slice(0,e+1),queueMicrotask(()=>a=[])},l=()=>a;let d;const u=t=>{d!==t&&(d=t,queueMicrotask(()=>d===t?d=void 0:0))},p=async(t,e)=>{const s=m(t);if(void 0===s)return t;if(await s.ready,"function"==typeof e){const t=s.watchExports(s=>e(s,t))}return s.exports},f=async t=>{const e=m(t);return await e.ready,e},m=t=>{const e=c().manager.X(t);if(void 0!==e)return e;if((t=>"object"==typeof t&&null!==t&&(i in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t))return t;const s=(()=>{const t=d;return d=void 0,t})();return void 0!==s?s:void 0};let g=!1;const y=t=>{g=!0;try{return t()}finally{g=!1}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2186],{32186:(e,t,s)=>{s.r(t),s.d(t,{deleteForwardEdits:()=>r});var i=s(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2186],{32186:(e,t,s)=>{s.r(t),s.d(t,{deleteForwardEdits:()=>r});var i=s(43773),n=s(49186),o=s(2272);async function r(e,t,s,r){if(!t)throw new n.A("post:missing-guid","guid for version is missing");const a=(0,o.Dl)(e),d=s.toJSON(),u=(0,o.jV)(a.query,{query:(0,o.lF)({...d,f:"json"}),...r,method:"post"});t.startsWith("{")&&(t=t.slice(1,-1));const l=`${a.path}/versions/${t}/deleteForwardEdits`,{data:c}=await(0,i.A)(l,u);return c}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9718],{5359:(e,t,i)=>{i.d(t,{H:()=>s,Z:()=>r});const s=Symbol("isImageryTileGraphicOrigin");function r(e){return!!e&&s in e}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(31635),r=i(53966),a=i(10107),n=(i(44208),i(87811),i(64108)),o=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.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,o.Jf)(e,r.A.getLogger(this)))}};return(0,s.Cg)([(0,a.MZ)()],i.prototype,"title",null),(0,s.Cg)([(0,a.MZ)({type:String})],i.prototype,"url",null),i=(0,s.Cg)([(0,n.$)("esri.layers.mixins.ArcGISService")],i),i}},19718:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ye});var s,r=i(31635),a=i(37838),n=i(69540),o=i(49186),l=i(53966),c=i(25728),u=i(74887),f=i(36708),h=i(10107),p=i(56507),d=i(44208),m=(i(87811),i(64108)),g=i(89808),y=i(99959),w=i(5359);class v extends y.A{get[(s=w.H,g.Q)](){return this.layer}constructor(e){super(),this[s]=!0,this.type="imagery-tile",this.layer=e}get id(){return this.layer.id}}var x=i(4146),b=i(18768),I=i(63074),C=i(69208),S=i(89015),A=i(16131),T=i(8303),R=i(63660),O=i(56551),M=i(54310),_=i(25036),F=i(82935),P=i(10873),k=i(20437),D=i(74797),N=i(22796),L=i(76353),E=i(84169),B=i(4916),z=i(68197),J=i(5443),U=i(16930),$=i(73444),j=i(14140),q=i(16019);function Z(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function H(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function V(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let a=-1,n=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];Z(l)?a=e:H(l)&&(n=e);const c=t[l],u=[];if("values"in c){c.values.forEach(e=>u.push("string"==typeof e?new Date(e).getTime():e));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,a=(t-e)/(i-1);s.push([e-.5*a,t+.5*a]),r.push(a);for(let t=0;t<i;t++)u.push(e+a*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}a>-1&&-1===n?n=0===a?1:0:n>-1&&-1===a?a=0===n?1:0:-1===n&&-1===a&&(a=0,n=1),o=o.filter((e,t)=>!(t===a||t===n));const{referencing:l}=e.domain,c=l.find(e=>e.coordinates.includes(i[a])).system.id,u=c?.slice(c.lastIndexOf("/")+1),f=null==u||"CRS84"===u?4326:Number(u),h=new U.A({wkid:f}),[p,d]=s[a],[m,g]=s[n],y=new J.A({xmin:p,xmax:d,ymin:m,ymax:g,spatialReference:h});return{width:Math.round(y.width/r[a]),height:Math.round(y.height/r[n]),extent:y,dimensions:o}}function G(e){const t=(0,$.lR)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function W(){return Math.round(255*Math.random())}function X(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:a,categoryEncoding:n,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=G(r)),a&&(t[e].unit=a.label?G(a.label):null,t[e].symbol=a.symbol?.value),n)){const i=Object.entries(n).map((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1}));let s=!1;o?.categories?.length&&(o.categories.forEach(e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find(e=>e.ClassName===t);if(!r)return;const a=e.label?G(e.label):null;if(r.Label=a,e.preferredColor){const t=z.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}}),s&&i.forEach(e=>{null==e.Red&&(e.Red=W(),e.Green=W(),e.Blue=W())}));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map(e=>({attributes:e}))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function Y(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,q.X1)(t,i)}function K(e,t,i){const s=e.map((e,i)=>({name:e,count:t[i]})).sort((e,t)=>e.name>t.name?-1:1),r=(a=1,e=>a*=e.count);var a;const n=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=n[s.findIndex(({name:t})=>t===e[r])]*(i%t[r]),i=Math.floor(i/t[r]);return o}var Q=i(45617),ee=i(87186),te=i(77301),ie=i(28435),se=i(6952);let re=class extends B.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[a,n]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:a,height:n},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,ie.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:a,name:n,nativeExtent:o,transform:l,colormap:c}=t,u=i[0],{width:f,height:h,pixelType:p}=u,d=t.extent??new J.A({xmin:-.5,ymin:.5,xmax:f-.5,ymax:h-.5,spatialReference:new U.A({wkid:3857})}),m=t.isPseudoSpatialReference??!t.extent,g={x:d.width/f,y:d.height/h},y={...t.keyProperties};t.dataType&&(y.DataType=t.dataType),t.bandInfos&&(y.BandProperties=t.bandInfos.map(e=>e.toJSON())),s&&(y.DataType="Thematic");const w=new ee.A({width:f,height:h,pixelType:p,extent:d,nativeExtent:o,attributeTable:s,colormap:c,transform:l,pixelSize:g,spatialReference:d.spatialReference,bandCount:u.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:m,histograms:a});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(w),this.createRemoteDatasetStorageInfo(w,512,512),this._set("rasterInfo",w),this.updateTileInfo(),w.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,w.multidimensionalInfo):await this._buildInMemoryRaster(u,{width:512,height:512},e),w.multidimensionalInfo||(this.source=null),this.datasetName=n}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,a="thematic"!==s.dataType,n=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:a},i):Promise.resolve((0,ie.lD)(e,t,r,a)),l=null!=s.statistics,c=null!=s.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,se.f4)(e)),h=await(0,u.Lx)([n,f]);if(!h[0].value&&h[1].value)throw new o.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,l||(s.statistics=h[1].value?.statistics),c||(s.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const a=r.dimensions.map(e=>new Q.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0})),n=(0,te.NG)(a,t),o=null==n?null:e[n];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,se.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],re.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)()],re.prototype,"source",void 0),(0,r.Cg)([(0,h.MZ)()],re.prototype,"url",null),re=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],re);const ae=re;var ne=i(22671);let oe=class extends B.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:a}=await this._fetchData(e),{statistics:n,histograms:o}=(0,se.eH)(i[0]),l=a?.map(e=>({BandName:e})),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new ae({source:{extent:t,pixelBlocks:i,attributeTable:r?ne.A.fromJSON(r):null,multidimensionalInfo:s,statistics:n,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const f=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",f.slice(0,f.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new o.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new o.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new o.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:a,values:n}=s[e];if(!("ndarray"===a.toLowerCase()&&n?.length&&t?.length&&r?.length))throw new o.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!Z(t[t.length-1])||!H(t[t.length-2]))throw new o.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=V(e),{ranges:a}=e,n=Object.keys(a).sort((e,t)=>e<t?-1:1),o=[];for(let e=0;e<n.length;e++){const t=n[e];r?.length&&o.push({name:t,dimensions:r})}const l=X(e);o.forEach(e=>l[e.name]&&Object.assign(e,l[e.name]));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<n.length;e++){const s=n[e],{values:o,dataType:l,axisNames:c,shape:f}=a[s],h=f.length>2?e*f.slice(0,-2).reduce((e,t)=>e*t):0,p=c.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":Y(o),g=t*i,y=o.length/g;for(let s=0;s<y;s++){const a=j.A.createEmptyBand(m,g),n=new Uint8Array(g).fill(255);let l=!1;const c=s*g;for(let e=0;e<g;e++){const t=o[c+e];null==t?(n[e]=0,l=!0):a[e]=t}if(0===e||r?.length){const e=new j.A({width:t,height:i,mask:l?n:null,pixels:[a],pixelType:m});e.updateStatistics(),r?.length?u[K(p,d,s)+h]=e:u.push(e)}else{const e=u[s];e.pixels.push(a),l?e.mask&&(e.mask=j.A.combineBandMasks([e.mask,n])):e.mask=l?n:null}}}const f=Object.values(l).find(e=>e.attributeTable)?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:f,bandNames:c?void 0:n}}(t)}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],oe.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)({constructOnly:!0})],oe.prototype,"source",void 0),oe=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],oe);const le=oe;var ce=i(4576),ue=i(21325),fe=i(50103),he=i(21312);function pe(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function de(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new U.A({wkid:t});if(e=String(e).trim(),(0,ue.jp)(e))return new U.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),a=r>-1?r:i.indexOf("GEOGCS");if(-1===a)return null;const n=e.slice(a,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=me(n);const l=new U.A(t?{wkid:t}:{wkt:n}),c=me(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=me(e),new U.A(0!==t?{wkid:t}:{wkt:e})):null}function me(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map(e=>e.trim()).filter(e=>""!==e),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function ge(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach(e=>{if(1===e.nodeType)if((0,fe.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,fe.mX)(e);t.spatialReference=de(i)}}else if((0,fe.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,fe.V6)(e,"GeodataXform"),i=de((0,fe.v7)(t,"SpatialReference/WKID")||(0,fe.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,fe.v7)(t,"PolynomialOrder")??1,r=(0,fe.Ui)(t,"CoeffX/Double"),a=(0,fe.Ui)(t,"CoeffY/Double"),n=(0,fe.Ui)(t,"InverseCoeffX/Double"),o=(0,fe.Ui)(t,"InverseCoeffY/Double"),l=pe(r,a),c=pe(n,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new he.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,fe.IC)(e,"MDI").forEach(e=>t.metadata[e.getAttribute("key")]=(0,fe.mX)(e));else if((0,fe.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,fe.v7)(e,"NoDataValue"),i=(0,fe.V6)(e,"Histograms/HistItem"),s=(0,fe.v7)(i,"HistMin"),r=(0,fe.v7)(i,"HistMax"),a=(0,fe.v7)(i,"BucketCount"),n=(0,fe.mX)(i,"HistCounts")?.split("|").map(e=>Number(e));let o,l,c,u;(0,fe.IC)(e,"Metadata/MDI").forEach(e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}});const f=(0,fe.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:n?.length&&null!=s&&null!=r?{min:s,max:r,size:a||n.length,counts:n}:null,sourceBandIndex:f,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}});const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map(e=>e.statistics).filter(ce.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map(e=>e.histogram).filter(ce.Ru):null}return t}var ye=i(77649);let we=class extends B.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:a}=await this._fetchAuxiliaryData(e);const n=!i;n&&(i=new U.A({wkid:3857})),r?.length&&null==s&&(s=(0,se.Pg)(r));const{width:o,height:l}=t;let c=new J.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=a?a.forwardTransform(c):c;let f=!0;if(a){const e=a.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(a=null,c=u)}const h=new ae({source:{extent:u,nativeExtent:c,transform:a,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:n},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(h.ioConfig.skipMapInfo=!0),await h.open(),h.source=null,this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,ye.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new o.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,d.A)("ios"),a=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==a)throw new o.A("image-aux-raster:open","the data cannot be decoded");return a}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),a=this.datasetFormat,n="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,o=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,u.Lx)([r,o]);if(t?.aborted)throw(0,u.NK)();const c=ge(l[0].value?.data);if(!c.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map(e=>Number(e)):null;c.transform=6===e?.length?new he.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return c}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],we.prototype,"datasetFormat",void 0),we=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],we);const ve=we;var xe=i(97768),be=i(84952),Ie=i(86738),Ce=i(20223),Se=i(87045),Ae=i(25943),Te=i(73037),Re=i(82371);let Oe=class extends B.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:a}=this.rasterInfo,{transposeInfo:n}=r,o=null!=n&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let f,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map(e=>this.request(c,{query:{...u,bandId:e},responseType:"array-buffer",signal:s.signal})),t=await Promise.all(e),i=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),r=new Uint8Array(i);h=[];let a=0;for(const{data:e}of t)h.push(a),r.set(new Uint8Array(e),a),a+=e.byteLength;f=r.buffer}else f=(await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal})).data;if(!f)return null;const p=o?n.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(f,{width:p[0],height:p[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==d)return null;const m=r.blockBoundary[e];if("jpg"!==r.compression||i>m.minCol&&i<m.maxCol&&t>m.minRow&&t<m.maxRow)return d;const{origin:g,blockWidth:y,blockHeight:w}=r,{x:v,y:x}=this.getPyramidPixelSize(e),b=Math.round((a.xmin-g.x)/v)%y,I=Math.round((a.xmax-g.x)/v)%y||y,C=Math.round((g.y-a.ymax)/x)%w,S=Math.round((g.y-a.ymin)/x)%w||w,A=i===m.minCol?b:0,T=t===m.minRow?C:0,R=i===m.maxCol?I:y,O=t===m.maxRow?S:w;return(0,ie.z$)(d,{x:A,y:T},{width:R-A,height:O-T}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some(e=>{const i=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])}))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),r=await Promise.all([i,s]);return r[0]&&r[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let a=r-s+this._levelOffset;const n=i.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,i.row,i.col,t))break}catch{}if(a--,s++,i=this.identifyPixelLocation(n,s,t.datumTransformation),null===i)return null}return-1===a||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new o.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new o.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new o.A("image-server-raster:open","cannot initialize image service");(0,Re.E9)(r,s);const a="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:a}=t;if(null!=r&&null!=a)return Se.A.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=r&&e<=a)});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,a=s?t(s):-1/0;return Se.A.fromJSON({...e,lods:e.lods.filter(e=>{const i=t(e.scale);return i<=r&&i>=a})})}return Se.A.fromJSON(e)}(s.tileInfo,s):Se.A.fromJSON(s.tileInfo);(0,xe.Lw)(a);const[n,l]=this._computeMinMaxLOD(r,a),{extent:c,pixelSize:u}=r,f=.5/r.width*u.x,h=Math.max(u.x,u.y),{lods:p}=a;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>f||!p.some(e=>Math.abs(e.resolution-h)<f))&&(u.x=u.y=n.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=n.level-l.level,[m,g]=a.size,y=[],w=[];p.forEach((e,t)=>{e.level>=l.level&&e.level<=n.level&&y.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)}),y.sort((e,t)=>e.x-t.x);const v=this.computeBlockBoundary(c,m,g,a.origin,y,d),x=y.length>1?y.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every(e=>e===w[0])?w[0]??2:Math.round(10/(l.resolution/n.resolution)**(-1/d))/10;if(r.storageInfo=new Ce.A({blockWidth:a.size[0],blockHeight:a.size[1],pyramidBlockWidth:a.size[0],pyramidBlockHeight:a.size[1],pyramidResolutions:x,pyramidScalingFactor:I,compression:a.format,origin:a.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:a,isBsqTile:!!s.bsq,transposeInfo:b,blockBoundary:v}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Te.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,be.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new Ae.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=U.A.fromJSON(t.spatialReference||e.spatialReference),a=new Ie.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new ee.A({width:i,height:s,bandCount:3,extent:J.A.fromJSON(e),spatialReference:r,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,Re.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then(e=>e.data?.slices).catch(()=>null):null,a=await Promise.all([s,r]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,a=t.lodAt(Math.max.apply(null,r.map(e=>e.level))),n=t.lodAt(Math.min.apply(null,r.map(e=>e.level))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[a,n];if("Raster"===o)return[r.find(e=>e.resolution===i.x)??a,n];const{minScale:l,maxScale:c}=this.sourceJSON;let u=a;c>0&&(u=r.find(e=>Math.abs(e.scale-c)<s),u||(u=r.filter(e=>e.scale>c).sort((e,t)=>e.scale>t.scale?1:-1)[0]??a));let f=n;return l>0&&(f=r.find(e=>Math.abs(e.scale-l)<s)??n,this._levelOffset=f.level-n.level),[u,f]}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Oe.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)()],Oe.prototype,"tileType",void 0),Oe=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],Oe);const Me=Oe;var _e=i(47124);const Fe=new Map;Fe.set("Int8","s8"),Fe.set("UInt8","u8"),Fe.set("Int16","s16"),Fe.set("UInt16","u16"),Fe.set("Int32","s32"),Fe.set("UInt32","u32"),Fe.set("Float32","f32"),Fe.set("Float64","f32"),Fe.set("Double64","f32");const Pe=new Map;Pe.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Pe.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Pe.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Pe.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"}),Pe.set("qb3",{blobExtension:".pq3",isOneSegment:!0,decoderFormat:"qb3"});let ke=class extends B.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:a,blockBoundary:n}=this.rasterInfo.storageInfo,o=n[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:f,actualTileHeight:h}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*a);return new j.A({width:r,height:a,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let g=0;for(g=0;g<d;g++)p&&!p.includes(g)||m.push(this.request(this._files.data,{range:{from:u[g].from,to:u[g].to},responseType:"array-buffer",signal:s.signal}));const y=await Promise.all(m),w=y.map(e=>e.data.byteLength).reduce((e,t)=>e+t),v=new Uint8Array(w),x=[];let b=0;for(g=0;g<d;g++)x.push(b),v.set(new Uint8Array(y[g].data),b),b+=y[g].data.byteLength;const I=Pe.get(this.rasterInfo.storageInfo.compression).decoderFormat,C=await this.decodePixelBlock(v.buffer,{width:r,height:a,format:I,planes:p?.length||l,offsets:x,pixelType:c}).catch(()=>null);if(null==C)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!C.mask&&(S=S[0],null!=S)){const e=C.width*C.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(g=0;g<e;g++)Math.abs((C.pixels[0][g]-S)/S)>1e-6&&(t[g]=1);else for(g=0;g<e;g++)C.pixels[0][g]!==S&&(t[g]=1);C.mask=t}let A=0,T=0;if(f!==r||h!==a){let e=C.mask;if(e)for(g=0;g<a;g++)if(T=g*r,g<h)for(A=f;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*a),C.mask=e,g=0;g<h;g++)for(T=g*r,A=0;A<f;A++)e[T+A]=1}return C}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:a,skipExtensions:n=[]}=this.ioConfig;if(!n.includes("aux.xml")&&!a){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,se.Pg)(t.histograms)))}a&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,a,n;if(_e.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),a=0;a<e.byteLength/4;a++)for(n=0;n<4;n++)s[4*a+n]=i[4*a+3-n];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:f,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,g=-1;for(;m<this._storageIndex.length;){g++;const e=Math.ceil(f/l/u**g)-1,t=Math.ceil(h/c/u**g)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}_getBandSegmentCount(){return Pe.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:a}=this.rasterInfo.storageInfo,{width:n,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,p=0;for(f=0;f<e;f++)p=a**f,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),h+=c*u;p=a**e,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),h+=t*c+i,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,g=0;const y=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],g=m+d[4*e+2]*2**32+d[4*e+3]-1,y.push({from:m,to:g});return{ranges:y,actualTileWidth:i<c-1?s:Math.ceil(n/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,fe.V6)(e,"MRF_META/Raster");if(!t)throw new o.A("mrf:open","not a valid MRF format");const i=(0,fe.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),a=parseInt(i.getAttribute("c"),10),n=((0,fe.mX)(t,"Compression")||"none").toLowerCase();if(!Pe.has(n))throw new o.A("mrf:open","currently does not support compression "+n);const l=(0,fe.mX)(t,"DataType")||"UInt8",c=Fe.get(l);if(null==c)throw new o.A("mrf:open","currently does not support pixel type "+l);const u=(0,fe.V6)(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),p=(0,fe.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map(e=>parseFloat(e)))),(0,fe.V6)(e,"MRF_META/CachedSource"))throw new o.A("mrf:open","currently does not support MRF referencing other data files");const g=(0,fe.V6)(e,"MRF_META/GeoTags"),y=(0,fe.V6)(g,"BoundingBox");let w,v=!1;if(null!=y){const e=parseFloat(y.getAttribute("minx")),t=parseFloat(y.getAttribute("miny")),i=parseFloat(y.getAttribute("maxx")),s=parseFloat(y.getAttribute("maxy")),r=(0,fe.mX)(g,"Projection")||"";let a=U.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(a=new U.A({wkid:e}))}else a=de(r)??U.A.WGS84;else v=!0,a=new U.A({wkid:3857});w=new J.A(e,t,i,s),w.spatialReference=a}else v=!0,w=new J.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new U.A({wkid:3857})});const x=(0,fe.V6)(e,"MRF_META/Rsets"),b=parseInt(x?.getAttribute("scale")||"2",10),I=w.spatialReference,C=new Ce.A({origin:new Ie.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:n,pyramidScalingFactor:b}),S=new Ie.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new ee.A({width:s,height:r,extent:w,isPseudoSpatialReference:v,spatialReference:I,bandCount:a,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:C}),T=(0,fe.mX)(e,"datafile"),R=(0,fe.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Pe.get(n).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ge(t)}catch{return null}}};(0,r.Cg)([(0,h.MZ)()],ke.prototype,"_files",void 0),(0,r.Cg)([(0,h.MZ)()],ke.prototype,"_storageIndex",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],ke.prototype,"datasetFormat",void 0),ke=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.MRFRaster")],ke);const De=ke;var Ne=i(15265);function Le(e){const t=e.fields,i=e.records,s=t.some(e=>"oid"===e.name.toLowerCase())?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map(e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name}))),a=r.map(e=>e.name),n=[];let o=0,l=0;return i.forEach(e=>{const t={};for(t[s]=o++,l=1;l<a.length;l++)t[a[l]]=e[l-1];n.push({attributes:t})}),{displayFieldName:"",fields:r,features:n}}class Ee{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),a=t.getUint16(10,!0),n={version:i,recordCount:s,headerByteCount:r,recordByteCount:a};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Ne.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>a;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach(t=>{if("C"===t.type)i.push((0,Ne.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length}),c.push(i)):o+=a}}return{header:n,fields:l,records:c,recordSet:Le({fields:l,records:c})}}}var Be=i(45664),ze=i(12196);const Je=(e,t)=>e.get(t)?.values,Ue=(e,t)=>e.get(t)?.values?.[0];let $e=class extends B.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const a=await this._fetchRawTiffTile(e,t,i,!0,s);null!=a&&a.pixels[0]instanceof Uint8Array&&(r.mask=a.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new o.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:a}=(0,Be.uT)(i),n=[],c={fileChunk:i,posIFD:r,fileOffset:0};await this._readIFDs(n,c,s,a?8:4,t);const{imageInfo:u,rasterInfo:f}=function(e){const t=(0,Be.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:a,planes:n,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:f,pyramidBlockHeight:h,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:g}=t;let y=de(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==y&&(w=!0,y=new U.A({wkid:3857}));const v=new J.A({...t.extent,spatialReference:y}),x=new Ie.A(v?{x:v.xmin,y:v.ymax,spatialReference:y}:{x:0,y:0}),b=new Ce.A({blockWidth:r,blockHeight:a,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:l,origin:x,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new Ie.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:y}),C=g?{BandProperties:g.bandProperties,DataType:g.dataType}:{};let S=null;const A=Ue(e[0],"PHOTOMETRICINTERPRETATION"),T=Je(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new ee.A({width:i,height:s,bandCount:n,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:y,isPseudoSpatialReference:w,keyProperties:C,extent:v,colormap:S,statistics:g?g.statistics:null});if(m?.length&&(R.nativeExtent=new J.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:y}),R.transform=new he.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new Ie.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:y}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach(i=>{i.x*=e,i.y*=t})}return{imageInfo:t,rasterInfo:R}}(n),h=(0,Be.zS)(n),p=(0,Be.r9)(n);if(this._headerInfo={littleEndian:s,isBigTiff:a,ifds:n,pyramidIFDs:h,maskIFDs:p,...u},this._set("rasterInfo",f),!u.isSupported)throw new o.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new o.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");f.isPseudoSpatialReference&&l.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const d=n[0].get("PREDICTOR")?.values?.[0],m=n[0].get("SAMPLEFORMAT")?.values?.[0];if(3===m&&2===d)throw new o.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:g,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!g){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,se.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new Ie.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,f)}y.includes("vat.dbf")||1!==f.bandCount||"u8"!==f.pixelType||g||(f.attributeTable=await this._fetchAuxiliaryTable(e),null!=f.attributeTable&&(f.keyProperties.DataType="thematic")),g&&this.updateImageSpaceRasterInfo(f),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:s,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(s=r+s,i=(await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:s,posIFD:r}}async _readIFDs(e,t,i,s=4,r){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,r);const a=await this._readIFD(t,i,ze.NB,s,r);if(!a?.ifd)throw new o.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(a.ifd),!a.nextIFD)return null;t.posIFD=a.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,s,r)}async _readIFD(e,t,i=ze.NB,s=4,r){let{fileChunk:a,posIFD:n,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,Be.JM)(a,t,n,o,i,s);if(l.success){const e=[];if(l.ifd?.forEach(t=>{t.values||e.push(t)}),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,r),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),i=e?.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2];n=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:a,posIFD:n,fileOffset:o},r),c=await this._readIFD(l,t,ze.YC,2,r);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return l}return l.requiredBufferSize?(a=(await this.request(this.url,{range:{from:o,to:o+n+l.requiredBufferSize+8},responseType:"array-buffer",signal:r})).data,a.byteLength<n+l.requiredBufferSize?null:(e.fileChunk=a,e.fileOffset=o,this._readIFD(e,t,i,s,r))):null}async _fillOffsets(e,t,i,s){const r=e.filter(e=>null!=e.offlineOffsetSize);if(0===r.length)return;const a=r.map(e=>e.offlineOffsetSize),n=Math.min.apply(null,a.map(e=>e[0])),o=Math.max.apply(null,a.map(e=>e[0]+e[1]));let l=1===a.length||o-n<=this._bufferSize;if(!l&&a.length>1&&(a.sort((e,t)=>e[0]-t[0]),l=a.reduce((e,t)=>e===t[0]?t[0]+t[1]:0,a[0][0])===o),l){const e=await this._fetchOffsets(n,Math.max(o,n+this._bufferSize),s);return void r.forEach(i=>(0,Be.Cr)(e,t,i,n))}const c=r.map(async e=>{const i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],s);(0,Be.Cr)(r,t,e,i[0])});await Promise.all(c)}async _fetchOffsets(e,t,i){const s=[],r=this._chunkSize,a=Math.ceil((t-e)/r);let n=e;for(let e=0;e<a;e++)s.push(this.request(this.url,{range:{from:n,to:e===a-1?t:n+r-1},responseType:"array-buffer",signal:i})),n+=r;const o=await Promise.all(s);if(1===a)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<a;e++)l.set(new Uint8Array(o[e].data),e*r);return l.buffer}async _fetchRawTiffTile(e,t,i,s,r={}){const a=this._getTileLocation(e,t,i,s);if(!a)return null;const{ranges:n,actualTileWidth:o,actualTileHeight:l,ifd:c}=a,u=n.map(e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal})),f=await Promise.all(u),h=f.map(e=>e.data.byteLength).reduce((e,t)=>e+t),p=1===f.length?f[0].data:new ArrayBuffer(h),d=[0],m=[0];if(f.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<f.length;t++){const s=f[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:g,blockHeight:y}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:g,height:y,planes:null,pixelType:null});if(null==w)return null;let v,x,b;if(o!==g||l!==y){let e=w.mask;if(e)for(v=0;v<y;v++)if(b=v*g,v<l)for(x=o;x<g;x++)e[b+x]=0;else for(x=0;x<g;x++)e[b+x]=0;else for(e=new Uint8Array(g*y),w.mask=e,v=0;v<l;v++)for(b=v*g,x=0;x<o;x++)e[b+x]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:a}=this.rasterInfo.storageInfo,n=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[n]:0===n?o?.ifds[0]:o?.pyramidIFDs[n-1];if(!l)return null;const c=(0,Be.XO)(l,o),u=Je(l,"TILEOFFSETS");if(void 0===u)return null;const f=Je(l,"TILEBYTECOUNTS"),{minRow:h,minCol:p,maxRow:d,maxCol:m}=a[n];if(t>d||i>m||t<h||i<p)return null;const g=Ue(l,"IMAGEWIDTH"),y=Ue(l,"IMAGELENGTH"),w=Ue(l,"TILEWIDTH"),v=Ue(l,"TILELENGTH"),x=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;x[s]={from:u[e],to:u[e]+f[e]-1}}}else{const e=t*(m+1)+i;x.push({from:u[e],to:u[e]+f[e]-1})}for(let e=0;e<x.length;e++)if(null==x[e].from||!x[e].to||x[e].to<0)return null;return{ranges:x,ifd:l,actualTileWidth:i===m&&g%w||w,actualTileHeight:t===d&&y%v||v}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ge(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Ee.parse(t);return i?.recordSet?ne.A.fromJSON(i.recordSet):null}catch{return null}}};(0,r.Cg)([(0,h.MZ)()],$e.prototype,"_files",void 0),(0,r.Cg)([(0,h.MZ)()],$e.prototype,"_headerInfo",void 0),(0,r.Cg)([(0,h.MZ)()],$e.prototype,"_bufferSize",void 0),(0,r.Cg)([(0,h.MZ)()],$e.prototype,"_chunkSize",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],$e.prototype,"datasetFormat",void 0),$e=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.TIFFRaster")],$e);const je=$e,qe=new Map;qe.set("MRF",{desc:"Meta Raster Format",constructor:De}),qe.set("TIFF",{desc:"GeoTIFF",constructor:je}),qe.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Me}),qe.set("JPG",{desc:"JPG Raster Format",constructor:ve}),qe.set("PNG",{desc:"PNG Raster Format",constructor:ve}),qe.set("GIF",{desc:"GIF Raster Format",constructor:ve}),qe.set("BMP",{desc:"BMP Raster Format",constructor:ve}),qe.set("CovJSON",{desc:"COVJSON Raster Format",constructor:le}),qe.set("MEMORY",{desc:"In Memory Raster Format",constructor:ae});class Ze{static get supportedFormats(){const e=new Set;return qe.forEach((t,i)=>e.add(i)),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let a=e.datasetFormat??i?.datasetFormat;null==a&&(t.includes(".")?a=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?a="CovJSON":s?.extent&&s.pixelblocks&&(a="MEMORY")),"OVR"===a||"TIF"===a?a="TIFF":"JPG"===a||"JPEG"===a||"JFIF"===a?a="JPG":"COVJSON"===a&&(a="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(a="RasterTileServer");const n={url:t,source:s,sourceJSON:r,datasetFormat:a,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(n).forEach(e=>{null==n[e]&&delete n[e]}),a){if(!this.supportedFormats.has(a))throw new o.A("rasterfactory:open","not a supported format "+a);if("CRF"===a)throw new o.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,qe.get(a).constructor)(n);return await i.open({signal:e.signal}),i}const l=Array.from(qe.keys()).filter(e=>"CovJSON"!==e&&"Memory"!==e);let c=0;const u=()=>{if(a=l[c++],!a)return null;if("CRF"===a)return null;const t=new(0,qe.get(a).constructor)(n);return t.open({signal:e.signal}).then(()=>t).catch(()=>u())};return u()}static register(e,t,i){qe.has(e.toUpperCase())||qe.set(e.toUpperCase(),{desc:t,constructor:i})}}var He=i(6049),Ve=i(56776),Ge=i(30291),We=i(88625);let Xe=class extends((0,I.dM)((0,_.j)((0,A.q)((0,T.A)((0,O.H)((0,C.d)((0,S.o)((0,R.G)((0,F.e)((0,b.b)((0,M.J)((0,c.P)((0,n.OU)(x.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.graphicOrigin=new v(this),this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,u.sg)(async(e,t,s)=>{const{save:r,saveAs:a}=await i.e(9838).then(i.bind(i,59838));switch(e){case 0:return r(this,t);case 1:return a(this,s,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(u.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,D.rZ)("Pixel Value"),(0,D.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,D.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,D.DV)(t),s=(0,D.y6)();e.push(i,s)}if(r){const t=(0,D.AL)(r);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==D.F_.rawServicePixelValue)),s=(0,Ge.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,D.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,p.PZ)(N.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof o.A)throw e;throw new o.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsWrite(){const e=this._primaryRasters[0]??this.raster;return!!(this.loaded?"RasterTileServer"===e.datasetFormat&&("Raster"===e.tileType||"Map"===e.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){if(this.supportsWrite())return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,L.qg)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new o.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new o.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,f.wB)(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,L.pb)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,He.UD)(t.toJSON(),s);const r=await Promise.all(s.map(e=>Ze.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i}))),a=r.findIndex(e=>null==e);if(a>-1)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${s[a]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Ze.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new o.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Ze.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new o.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>i[e.url]=e);const s=(0,He.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new E.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof o.A&&l.A.getLogger(this).error("imagery-tile-layer:open",e.message),l.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){(0,Ve.XF)(l.A.getLogger(this),(0,Ve.$7)("ImageryTile layers","relative-to-scene",e)),(0,Ve.XF)(l.A.getLogger(this),(0,Ve.tW)("ImageryTile layers",e))}};(0,r.Cg)([(0,h.MZ)({clonable:!1})],Xe.prototype,"_primaryRasters",void 0),(0,r.Cg)([(0,h.MZ)({type:We.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],Xe.prototype,"elevationInfo",null),(0,r.Cg)([(0,h.MZ)({readOnly:!0,clonable:!1})],Xe.prototype,"graphicOrigin",void 0),(0,r.Cg)([(0,h.MZ)(P.fV)],Xe.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Xe.prototype,"isReference",void 0),(0,r.Cg)([(0,h.MZ)({type:["show","hide"]})],Xe.prototype,"listMode",void 0),(0,r.Cg)([(0,h.MZ)({json:{read:!0,write:!0}})],Xe.prototype,"blendMode",void 0),(0,r.Cg)([(0,h.MZ)({type:N.A,json:{name:"renderingRule",write:!0}})],Xe.prototype,"rasterFunction",void 0),(0,r.Cg)([(0,h.MZ)()],Xe.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],Xe.prototype,"version",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],Xe.prototype,"type",void 0),(0,r.Cg)([(0,h.MZ)({type:["ArcGISTiledImageServiceLayer"]})],Xe.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],Xe.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:a.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],Xe.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],Xe.prototype,"defaultPopupTemplate",null),(0,r.Cg)([(0,h.MZ)(P.PY)],Xe.prototype,"screenSizePerspectiveEnabled",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,type:[k.A]})],Xe.prototype,"fields",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,type:[k.A]})],Xe.prototype,"rasterFields",null),(0,r.Cg)([(0,h.MZ)({constructOnly:!0})],Xe.prototype,"source",void 0),Xe=(0,r.Cg)([(0,m.$)("esri.layers.ImageryTileLayer")],Xe);const Ye=Xe},21312:(e,t,i)=>{i.d(t,{A:()=>m});var s,r=i(31635),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(64108),c=i(43937),u=i(5443),f=i(86738),h=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,a=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+a*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+a*e[9]+i*e[11]}}const a=s*s,n=r*r,o=s*r,l=a*s,c=a*r,u=s*n,f=r*n;return{x:e[0]+s*e[2]+r*e[4]+a*e[6]+o*e[8]+n*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+s*e[3]+r*e[5]+a*e[7]+o*e[9]+n*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:a,ymax:n,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:n}),l.push({x:a,y:n}),l.push({x:s,y:r}),l.push({x:a,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(n-r)*t/(e-1)}),l.push({x:a,y:r+(n-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(a-s)*t/e,y:r}),l.push({x:s+(a-s)*t/e,y:n})}l=l.map(t=>p(e,t,i));const c=l.map(e=>e.x),f=l.map(e=>e.y);return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:o})}let m=s=class extends h.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,a,n]=e,o=s*n-a*r,l=a*r-s*n;return[(a*i-t*n)/o,(s*i-t*r)/l,n/o,r/l,-a/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r.Cg)([(0,a.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r.Cg)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r.Cg)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r.Cg)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r.Cg)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r.Cg)([(0,a.MZ)()],m.prototype,"affectsPixelSize",null),(0,r.Cg)([(0,n.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r.Cg)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m)},25943:(e,t,i)=>{i.d(t,{d:()=>S});var s,r=i(31635),a=i(78888),n=i(69622),o=i(49186),l=i(36563),c=(i(44208),i(66344)),u=i(15142),f=i(74887),h=i(36708),p=i(76030),d=i(84952),m=i(10107),g=(i(53966),i(87811),i(64108)),y=i(72802),w=i(4718),v=i(69397),x=i(34275);class b{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,w.o8)(t));const s=this.location.width,r=this.location.height;let a=!0,n=!0;const l=function(e,t=!1){return e<=x.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(n=!1,l[c]|=1<<t):a=!1,31===t&&++c}n?(this._availability="unavailable",this.byteSize=40):a?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,v.Qf)(l))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,a=this._availability;return r<0||r>a.length?"unknown":a[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||a.A,{row:s,col:r,width:n,height:l}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:n,height:l},valid:!0,data:new Array(n*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==n||e.location.height!==l))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:n,height:l}});return b.fromJSON(e)})}static fromJSON(e){return Object.freeze(new b(e))}}function I(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function C(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let S=class extends n.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=a.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.q(2097152),this.addHandles((0,h.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),h.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(C(e,t,i)):this._fetchTilemap(e,t,i,s).catch(e=>e).then(s=>{if(s instanceof b){const r=s.getAvailability(t,i);if("unavailable"===r)throw C(e,t,i);return r}if((0,f.zf)(s))throw s;return"unknown"})}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const a=this.layer.tileInfo;a.updateTileInfo(s);const n=this.fetchAvailability(e,t,i,r).catch(e=>{if((0,f.zf)(e))throw e;if(a.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,r,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,a){if(!this._prefetchingEnabled)return;const n=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(n))return;const o=new AbortController;a.then(()=>o.abort(),()=>o.abort());let c=!1;const u=(0,l.hA)(()=>{c||(c=!0,o.abort())});if(this.addHandles(u,n),await(0,p.md)(10,o.signal).catch(()=>{}),c||(c=!0,this.removeHandles(n)),(0,f.G4)(o))return;const h=new y.U(e,t,i),d={...r,signal:o.signal},m=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&m.upsampleTile(h);++e){const e=this.fetchAvailability(h.level,h.row,h.col,d);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:s._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,a=this._tilemapFromCache(e,t,i,r);if(a)return Promise.resolve(a);const n=s?.signal;return s={...s,signal:null},new Promise((e,t)=>{(0,f.u7)(n,()=>t((0,f.NK)()));const i=I(r);let a=this._pendingTilemapRequests[i];if(!a){a=b.fromDefinition(r,s).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=a,a.then(e,e)}a.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,d.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=I(s);return this._tilemapCache.get(r)}get test(){}};(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"minLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"maxLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"request",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"size",void 0),S=s=(0,r.Cg)([(0,g.$)("esri.layers.support.TilemapCache")],S)},56551:(e,t,i)=>{i.d(t,{H:()=>h});var s=i(31635),r=i(10107),a=(i(44208),i(53966),i(87811),i(64108)),n=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let f=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),(0,s.Cg)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],f.prototype,"method",void 0),(0,s.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"value",void 0),(0,s.Cg)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],f.prototype,"bandIds",void 0),(0,s.Cg)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],f.prototype,"renderer",void 0),f=(0,s.Cg)([(0,a.$)("esri.renderers.support.RasterPresetRenderer")],f);const h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s.Cg)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,s.Cg)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,s.Cg)([(0,a.$)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},69397:(e,t,i)=>{i.d(t,{$B:()=>r,Qf:()=>c,Qh:()=>o,RS:()=>a,ez:()=>h,lM:()=>n,qK:()=>f});var s=i(34275);function r(e){return 32+e.length}const a=16;function n(e){if(!e)return 0;let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=h;for(let s=0;s<t;s++)i+=l(e[s]);return i}(e);let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):f;case"string":return r(e);case"number":return a;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,a):0:0),0)}function u(e,t){return h+e.length*t}const f=32,h=16,p=145},73037:(e,t,i)=>{i.d(t,{A:()=>c});var s,r=i(31635),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(64108),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r.Cg)([(0,n.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r.Cg)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c)},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>h,X6:()=>p});var s=i(78888),r=i(5443),a=i(86738),n=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function f(e,t,i){const f=(0,c.Dl)(e),{rasterFunction:h,sourceJSON:p}=t||{},d=h?JSON.stringify(h.rasterFunctionDefinition||h):null,m=(0,c.lF)({...f.query,renderingRule:d,f:"json"}),g=(0,c.jV)(m,i);e=f.path;const y=p||await(0,s.A)(e,g).then(e=>e.data),w=y.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,g):null,v=y.hasColormap?(0,s.A)(`${e}/colormap`,g):null,x=y.hasHistograms?(0,s.A)(`${e}/histograms`,g):null,b=y.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,g):null,I=y.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,g):null,C=await Promise.allSettled([w,v,x,b,I]);let S=null;if(y.minValues&&y.minValues.length===y.bandCount){S=[];for(let e=0;e<y.minValues.length;e++)S.push({min:y.minValues[e],max:y.maxValues[e],avg:y.meanValues[e],stddev:y.stdvValues[e]})}const A=r.A.fromJSON(y.extent),T=Math.ceil(A.width/y.pixelSizeX-.1),R=Math.ceil(A.height/y.pixelSizeY-.1),O=n.A.fromJSON(y.spatialReference||y.extent.spatialReference),M="fulfilled"===C[0].status?C[0].value?.data:null,_=M?.features?.length?u.A.fromJSON(M):null,F="fulfilled"===C[1].status?C[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===C[2].status?C[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===C[3].status?C[3].value?.data??{}:{},L="fulfilled"===C[4].status?C[4].value?.data.multidimensionalInfo:null,E=L?.variables?.length?L:null;E&&E.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});const{defaultVariable:B,serviceDataType:z}=y;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=y.noDataValue;y.noDataValues?.length&&y.noDataValues.some(e=>e!==J)&&(J=y.noDataValues);const U=y.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new a.A({x:y.extent.xmin,y:y.extent.ymax,spatialReference:O}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:y.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:y.bandCount,extent:r.A.fromJSON(y.extent),spatialReference:O,pixelSize:new a.A({x:y.pixelSizeX,y:y.pixelSizeY,spatialReference:O}),pixelType:y.pixelType.toLowerCase(),statistics:S,attributeTable:_,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:E,storageInfo:U})}function h(e,t,i){return f(e,{sourceJSON:t},i)}function p(e,t,i){return f(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},82434:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(31635),r=i(25482),a=i(10107),n=(i(44208),i(53966),i(87811),i(64108));let o=class extends r.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s.Cg)([(0,a.MZ)()],o.prototype,"affectsPixelSize",null),(0,s.Cg)([(0,a.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s.Cg)([(0,n.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9718],{5359:(e,t,i)=>{i.d(t,{H:()=>s,Z:()=>r});const s=Symbol("isImageryTileGraphicOrigin");function r(e){return!!e&&s in e}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(31635),r=i(53966),a=i(10107),n=(i(44208),i(87811),i(64108)),o=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.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,o.Jf)(e,r.A.getLogger(this)))}};return(0,s.Cg)([(0,a.MZ)()],i.prototype,"title",null),(0,s.Cg)([(0,a.MZ)({type:String})],i.prototype,"url",null),i=(0,s.Cg)([(0,n.$)("esri.layers.mixins.ArcGISService")],i),i}},19718:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ye});var s,r=i(31635),a=i(37838),n=i(69540),o=i(49186),l=i(53966),c=i(25728),u=i(74887),f=i(36708),h=i(10107),p=i(56507),d=i(44208),m=(i(87811),i(64108)),g=i(89808),y=i(99959),w=i(5359);class v extends y.A{get[(s=w.H,g.Q)](){return this.layer}constructor(e){super(),this[s]=!0,this.type="imagery-tile",this.layer=e}get id(){return this.layer.id}}var x=i(4146),b=i(18768),I=i(63074),C=i(69208),S=i(89015),A=i(16131),T=i(8303),R=i(63660),O=i(56551),M=i(54310),_=i(25036),F=i(82935),P=i(10873),k=i(20437),D=i(74797),N=i(22796),L=i(76353),E=i(84169),B=i(4916),z=i(68197),J=i(5443),U=i(16930),$=i(73444),j=i(14140),q=i(16019);function Z(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function H(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function V(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let a=-1,n=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];Z(l)?a=e:H(l)&&(n=e);const c=t[l],u=[];if("values"in c){c.values.forEach(e=>u.push("string"==typeof e?new Date(e).getTime():e));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,a=(t-e)/(i-1);s.push([e-.5*a,t+.5*a]),r.push(a);for(let t=0;t<i;t++)u.push(e+a*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}a>-1&&-1===n?n=0===a?1:0:n>-1&&-1===a?a=0===n?1:0:-1===n&&-1===a&&(a=0,n=1),o=o.filter((e,t)=>!(t===a||t===n));const{referencing:l}=e.domain,c=l.find(e=>e.coordinates.includes(i[a])).system.id,u=c?.slice(c.lastIndexOf("/")+1),f=null==u||"CRS84"===u?4326:Number(u),h=new U.A({wkid:f}),[p,d]=s[a],[m,g]=s[n],y=new J.A({xmin:p,xmax:d,ymin:m,ymax:g,spatialReference:h});return{width:Math.round(y.width/r[a]),height:Math.round(y.height/r[n]),extent:y,dimensions:o}}function G(e){const t=(0,$.lR)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function W(){return Math.round(255*Math.random())}function X(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:a,categoryEncoding:n,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=G(r)),a&&(t[e].unit=a.label?G(a.label):null,t[e].symbol=a.symbol?.value),n)){const i=Object.entries(n).map((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1}));let s=!1;o?.categories?.length&&(o.categories.forEach(e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find(e=>e.ClassName===t);if(!r)return;const a=e.label?G(e.label):null;if(r.Label=a,e.preferredColor){const t=z.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}}),s&&i.forEach(e=>{null==e.Red&&(e.Red=W(),e.Green=W(),e.Blue=W())}));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map(e=>({attributes:e}))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function Y(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,q.X1)(t,i)}function K(e,t,i){const s=e.map((e,i)=>({name:e,count:t[i]})).sort((e,t)=>e.name>t.name?-1:1),r=(a=1,e=>a*=e.count);var a;const n=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=n[s.findIndex(({name:t})=>t===e[r])]*(i%t[r]),i=Math.floor(i/t[r]);return o}var Q=i(45617),ee=i(87186),te=i(77301),ie=i(28435),se=i(6952);let re=class extends B.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[a,n]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:a,height:n},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,ie.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:a,name:n,nativeExtent:o,transform:l,colormap:c}=t,u=i[0],{width:f,height:h,pixelType:p}=u,d=t.extent??new J.A({xmin:-.5,ymin:.5,xmax:f-.5,ymax:h-.5,spatialReference:new U.A({wkid:3857})}),m=t.isPseudoSpatialReference??!t.extent,g={x:d.width/f,y:d.height/h},y={...t.keyProperties};t.dataType&&(y.DataType=t.dataType),t.bandInfos&&(y.BandProperties=t.bandInfos.map(e=>e.toJSON())),s&&(y.DataType="Thematic");const w=new ee.A({width:f,height:h,pixelType:p,extent:d,nativeExtent:o,attributeTable:s,colormap:c,transform:l,pixelSize:g,spatialReference:d.spatialReference,bandCount:u.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:m,histograms:a});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(w),this.createRemoteDatasetStorageInfo(w,512,512),this._set("rasterInfo",w),this.updateTileInfo(),w.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,w.multidimensionalInfo):await this._buildInMemoryRaster(u,{width:512,height:512},e),w.multidimensionalInfo||(this.source=null),this.datasetName=n}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,a="thematic"!==s.dataType,n=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:a},i):Promise.resolve((0,ie.lD)(e,t,r,a)),l=null!=s.statistics,c=null!=s.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,se.f4)(e)),h=await(0,u.Lx)([n,f]);if(!h[0].value&&h[1].value)throw new o.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,l||(s.statistics=h[1].value?.statistics),c||(s.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const a=r.dimensions.map(e=>new Q.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0})),n=(0,te.NG)(a,t),o=null==n?null:e[n];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,se.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],re.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)()],re.prototype,"source",void 0),(0,r.Cg)([(0,h.MZ)()],re.prototype,"url",null),re=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],re);const ae=re;var ne=i(22671);let oe=class extends B.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:a}=await this._fetchData(e),{statistics:n,histograms:o}=(0,se.eH)(i[0]),l=a?.map(e=>({BandName:e})),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new ae({source:{extent:t,pixelBlocks:i,attributeTable:r?ne.A.fromJSON(r):null,multidimensionalInfo:s,statistics:n,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const f=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",f.slice(0,f.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new o.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new o.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new o.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:a,values:n}=s[e];if(!("ndarray"===a.toLowerCase()&&n?.length&&t?.length&&r?.length))throw new o.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!Z(t[t.length-1])||!H(t[t.length-2]))throw new o.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=V(e),{ranges:a}=e,n=Object.keys(a).sort((e,t)=>e<t?-1:1),o=[];for(let e=0;e<n.length;e++){const t=n[e];r?.length&&o.push({name:t,dimensions:r})}const l=X(e);o.forEach(e=>l[e.name]&&Object.assign(e,l[e.name]));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<n.length;e++){const s=n[e],{values:o,dataType:l,axisNames:c,shape:f}=a[s],h=f.length>2?e*f.slice(0,-2).reduce((e,t)=>e*t):0,p=c.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":Y(o),g=t*i,y=o.length/g;for(let s=0;s<y;s++){const a=j.A.createEmptyBand(m,g),n=new Uint8Array(g).fill(255);let l=!1;const c=s*g;for(let e=0;e<g;e++){const t=o[c+e];null==t?(n[e]=0,l=!0):a[e]=t}if(0===e||r?.length){const e=new j.A({width:t,height:i,mask:l?n:null,pixels:[a],pixelType:m});e.updateStatistics(),r?.length?u[K(p,d,s)+h]=e:u.push(e)}else{const e=u[s];e.pixels.push(a),l?e.mask&&(e.mask=j.A.combineBandMasks([e.mask,n])):e.mask=l?n:null}}}const f=Object.values(l).find(e=>e.attributeTable)?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:f,bandNames:c?void 0:n}}(t)}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],oe.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)({constructOnly:!0})],oe.prototype,"source",void 0),oe=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],oe);const le=oe;var ce=i(4576),ue=i(21325),fe=i(50103),he=i(21312);function pe(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function de(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new U.A({wkid:t});if(e=String(e).trim(),(0,ue.jp)(e))return new U.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),a=r>-1?r:i.indexOf("GEOGCS");if(-1===a)return null;const n=e.slice(a,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=me(n);const l=new U.A(t?{wkid:t}:{wkt:n}),c=me(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=me(e),new U.A(0!==t?{wkid:t}:{wkt:e})):null}function me(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map(e=>e.trim()).filter(e=>""!==e),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function ge(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach(e=>{if(1===e.nodeType)if((0,fe.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,fe.mX)(e);t.spatialReference=de(i)}}else if((0,fe.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,fe.V6)(e,"GeodataXform"),i=de((0,fe.v7)(t,"SpatialReference/WKID")||(0,fe.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,fe.v7)(t,"PolynomialOrder")??1,r=(0,fe.Ui)(t,"CoeffX/Double"),a=(0,fe.Ui)(t,"CoeffY/Double"),n=(0,fe.Ui)(t,"InverseCoeffX/Double"),o=(0,fe.Ui)(t,"InverseCoeffY/Double"),l=pe(r,a),c=pe(n,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new he.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,fe.IC)(e,"MDI").forEach(e=>t.metadata[e.getAttribute("key")]=(0,fe.mX)(e));else if((0,fe.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,fe.v7)(e,"NoDataValue"),i=(0,fe.V6)(e,"Histograms/HistItem"),s=(0,fe.v7)(i,"HistMin"),r=(0,fe.v7)(i,"HistMax"),a=(0,fe.v7)(i,"BucketCount"),n=(0,fe.mX)(i,"HistCounts")?.split("|").map(e=>Number(e));let o,l,c,u;(0,fe.IC)(e,"Metadata/MDI").forEach(e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}});const f=(0,fe.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:n?.length&&null!=s&&null!=r?{min:s,max:r,size:a||n.length,counts:n}:null,sourceBandIndex:f,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}});const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map(e=>e.statistics).filter(ce.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map(e=>e.histogram).filter(ce.Ru):null}return t}var ye=i(77649);let we=class extends B.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:a}=await this._fetchAuxiliaryData(e);const n=!i;n&&(i=new U.A({wkid:3857})),r?.length&&null==s&&(s=(0,se.Pg)(r));const{width:o,height:l}=t;let c=new J.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=a?a.forwardTransform(c):c;let f=!0;if(a){const e=a.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(a=null,c=u)}const h=new ae({source:{extent:u,nativeExtent:c,transform:a,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:n},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(h.ioConfig.skipMapInfo=!0),await h.open(),h.source=null,this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,ye.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new o.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,d.A)("ios"),a=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==a)throw new o.A("image-aux-raster:open","the data cannot be decoded");return a}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),a=this.datasetFormat,n="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,o=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,u.Lx)([r,o]);if(t?.aborted)throw(0,u.NK)();const c=ge(l[0].value?.data);if(!c.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map(e=>Number(e)):null;c.transform=6===e?.length?new he.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return c}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],we.prototype,"datasetFormat",void 0),we=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],we);const ve=we;var xe=i(97768),be=i(84952),Ie=i(86738),Ce=i(20223),Se=i(87045),Ae=i(25943),Te=i(73037),Re=i(82371);let Oe=class extends B.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:a}=this.rasterInfo,{transposeInfo:n}=r,o=null!=n&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let f,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map(e=>this.request(c,{query:{...u,bandId:e},responseType:"array-buffer",signal:s.signal})),t=await Promise.all(e),i=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),r=new Uint8Array(i);h=[];let a=0;for(const{data:e}of t)h.push(a),r.set(new Uint8Array(e),a),a+=e.byteLength;f=r.buffer}else f=(await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal})).data;if(!f)return null;const p=o?n.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(f,{width:p[0],height:p[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==d)return null;const m=r.blockBoundary[e];if("jpg"!==r.compression||i>m.minCol&&i<m.maxCol&&t>m.minRow&&t<m.maxRow)return d;const{origin:g,blockWidth:y,blockHeight:w}=r,{x:v,y:x}=this.getPyramidPixelSize(e),b=Math.round((a.xmin-g.x)/v)%y,I=Math.round((a.xmax-g.x)/v)%y||y,C=Math.round((g.y-a.ymax)/x)%w,S=Math.round((g.y-a.ymin)/x)%w||w,A=i===m.minCol?b:0,T=t===m.minRow?C:0,R=i===m.maxCol?I:y,O=t===m.maxRow?S:w;return(0,ie.z$)(d,{x:A,y:T},{width:R-A,height:O-T}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some(e=>{const i=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])}))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),r=await Promise.all([i,s]);return r[0]&&r[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let a=r-s+this._levelOffset;const n=i.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,i.row,i.col,t))break}catch{}if(a--,s++,i=this.identifyPixelLocation(n,s,t.datumTransformation),null===i)return null}return-1===a||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new o.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new o.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new o.A("image-server-raster:open","cannot initialize image service");(0,Re.E9)(r,s);const a="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:a}=t;if(null!=r&&null!=a)return Se.A.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=r&&e<=a)});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,a=s?t(s):-1/0;return Se.A.fromJSON({...e,lods:e.lods.filter(e=>{const i=t(e.scale);return i<=r&&i>=a})})}return Se.A.fromJSON(e)}(s.tileInfo,s):Se.A.fromJSON(s.tileInfo);(0,xe.Lw)(a);const[n,l]=this._computeMinMaxLOD(r,a),{extent:c,pixelSize:u}=r,f=.5/r.width*u.x,h=Math.max(u.x,u.y),{lods:p}=a;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>f||!p.some(e=>Math.abs(e.resolution-h)<f))&&(u.x=u.y=n.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=n.level-l.level,[m,g]=a.size,y=[],w=[];p.forEach((e,t)=>{e.level>=l.level&&e.level<=n.level&&y.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)}),y.sort((e,t)=>e.x-t.x);const v=this.computeBlockBoundary(c,m,g,a.origin,y,d),x=y.length>1?y.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every(e=>e===w[0])?w[0]??2:Math.round(10/(l.resolution/n.resolution)**(-1/d))/10;if(r.storageInfo=new Ce.A({blockWidth:a.size[0],blockHeight:a.size[1],pyramidBlockWidth:a.size[0],pyramidBlockHeight:a.size[1],pyramidResolutions:x,pyramidScalingFactor:I,compression:a.format,origin:a.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:a,isBsqTile:!!s.bsq,transposeInfo:b,blockBoundary:v}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Te.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,be.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new Ae.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=U.A.fromJSON(t.spatialReference||e.spatialReference),a=new Ie.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new ee.A({width:i,height:s,bandCount:3,extent:J.A.fromJSON(e),spatialReference:r,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,Re.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then(e=>e.data?.slices).catch(()=>null):null,a=await Promise.all([s,r]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,a=t.lodAt(Math.max.apply(null,r.map(e=>e.level))),n=t.lodAt(Math.min.apply(null,r.map(e=>e.level))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[a,n];if("Raster"===o)return[r.find(e=>e.resolution===i.x)??a,n];const{minScale:l,maxScale:c}=this.sourceJSON;let u=a;c>0&&(u=r.find(e=>Math.abs(e.scale-c)<s),u||(u=r.filter(e=>e.scale>c).sort((e,t)=>e.scale>t.scale?1:-1)[0]??a));let f=n;return l>0&&(f=r.find(e=>Math.abs(e.scale-l)<s)??n,this._levelOffset=f.level-n.level),[u,f]}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Oe.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)()],Oe.prototype,"tileType",void 0),Oe=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],Oe);const Me=Oe;var _e=i(47124);const Fe=new Map;Fe.set("Int8","s8"),Fe.set("UInt8","u8"),Fe.set("Int16","s16"),Fe.set("UInt16","u16"),Fe.set("Int32","s32"),Fe.set("UInt32","u32"),Fe.set("Float32","f32"),Fe.set("Float64","f32"),Fe.set("Double64","f32");const Pe=new Map;Pe.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Pe.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Pe.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Pe.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"}),Pe.set("qb3",{blobExtension:".pq3",isOneSegment:!0,decoderFormat:"qb3"});let ke=class extends B.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:a,blockBoundary:n}=this.rasterInfo.storageInfo,o=n[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:f,actualTileHeight:h}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*a);return new j.A({width:r,height:a,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let g=0;for(g=0;g<d;g++)p&&!p.includes(g)||m.push(this.request(this._files.data,{range:{from:u[g].from,to:u[g].to},responseType:"array-buffer",signal:s.signal}));const y=await Promise.all(m),w=y.map(e=>e.data.byteLength).reduce((e,t)=>e+t),v=new Uint8Array(w),x=[];let b=0;for(g=0;g<d;g++)x.push(b),v.set(new Uint8Array(y[g].data),b),b+=y[g].data.byteLength;const I=Pe.get(this.rasterInfo.storageInfo.compression).decoderFormat,C=await this.decodePixelBlock(v.buffer,{width:r,height:a,format:I,planes:p?.length||l,offsets:x,pixelType:c}).catch(()=>null);if(null==C)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!C.mask&&(S=S[0],null!=S)){const e=C.width*C.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(g=0;g<e;g++)Math.abs((C.pixels[0][g]-S)/S)>1e-6&&(t[g]=1);else for(g=0;g<e;g++)C.pixels[0][g]!==S&&(t[g]=1);C.mask=t}let A=0,T=0;if(f!==r||h!==a){let e=C.mask;if(e)for(g=0;g<a;g++)if(T=g*r,g<h)for(A=f;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*a),C.mask=e,g=0;g<h;g++)for(T=g*r,A=0;A<f;A++)e[T+A]=1}return C}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:a,skipExtensions:n=[]}=this.ioConfig;if(!n.includes("aux.xml")&&!a){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,se.Pg)(t.histograms)))}a&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,a,n;if(_e.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),a=0;a<e.byteLength/4;a++)for(n=0;n<4;n++)s[4*a+n]=i[4*a+3-n];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:f,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,g=-1;for(;m<this._storageIndex.length;){g++;const e=Math.ceil(f/l/u**g)-1,t=Math.ceil(h/c/u**g)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}_getBandSegmentCount(){return Pe.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:a}=this.rasterInfo.storageInfo,{width:n,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,p=0;for(f=0;f<e;f++)p=a**f,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),h+=c*u;p=a**e,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),h+=t*c+i,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,g=0;const y=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],g=m+d[4*e+2]*2**32+d[4*e+3]-1,y.push({from:m,to:g});return{ranges:y,actualTileWidth:i<c-1?s:Math.ceil(n/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,fe.V6)(e,"MRF_META/Raster");if(!t)throw new o.A("mrf:open","not a valid MRF format");const i=(0,fe.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),a=parseInt(i.getAttribute("c"),10),n=((0,fe.mX)(t,"Compression")||"none").toLowerCase();if(!Pe.has(n))throw new o.A("mrf:open","currently does not support compression "+n);const l=(0,fe.mX)(t,"DataType")||"UInt8",c=Fe.get(l);if(null==c)throw new o.A("mrf:open","currently does not support pixel type "+l);const u=(0,fe.V6)(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),p=(0,fe.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map(e=>parseFloat(e)))),(0,fe.V6)(e,"MRF_META/CachedSource"))throw new o.A("mrf:open","currently does not support MRF referencing other data files");const g=(0,fe.V6)(e,"MRF_META/GeoTags"),y=(0,fe.V6)(g,"BoundingBox");let w,v=!1;if(null!=y){const e=parseFloat(y.getAttribute("minx")),t=parseFloat(y.getAttribute("miny")),i=parseFloat(y.getAttribute("maxx")),s=parseFloat(y.getAttribute("maxy")),r=(0,fe.mX)(g,"Projection")||"";let a=U.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(a=new U.A({wkid:e}))}else a=de(r)??U.A.WGS84;else v=!0,a=new U.A({wkid:3857});w=new J.A(e,t,i,s),w.spatialReference=a}else v=!0,w=new J.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new U.A({wkid:3857})});const x=(0,fe.V6)(e,"MRF_META/Rsets"),b=parseInt(x?.getAttribute("scale")||"2",10),I=w.spatialReference,C=new Ce.A({origin:new Ie.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:n,pyramidScalingFactor:b}),S=new Ie.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new ee.A({width:s,height:r,extent:w,isPseudoSpatialReference:v,spatialReference:I,bandCount:a,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:C}),T=(0,fe.mX)(e,"datafile"),R=(0,fe.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Pe.get(n).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ge(t)}catch{return null}}};(0,r.Cg)([(0,h.MZ)()],ke.prototype,"_files",void 0),(0,r.Cg)([(0,h.MZ)()],ke.prototype,"_storageIndex",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],ke.prototype,"datasetFormat",void 0),ke=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.MRFRaster")],ke);const De=ke;var Ne=i(15265);function Le(e){const t=e.fields,i=e.records,s=t.some(e=>"oid"===e.name.toLowerCase())?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map(e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name}))),a=r.map(e=>e.name),n=[];let o=0,l=0;return i.forEach(e=>{const t={};for(t[s]=o++,l=1;l<a.length;l++)t[a[l]]=e[l-1];n.push({attributes:t})}),{displayFieldName:"",fields:r,features:n}}class Ee{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),a=t.getUint16(10,!0),n={version:i,recordCount:s,headerByteCount:r,recordByteCount:a};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Ne.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>a;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach(t=>{if("C"===t.type)i.push((0,Ne.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length}),c.push(i)):o+=a}}return{header:n,fields:l,records:c,recordSet:Le({fields:l,records:c})}}}var Be=i(45664),ze=i(12196);const Je=(e,t)=>e.get(t)?.values,Ue=(e,t)=>e.get(t)?.values?.[0];let $e=class extends B.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const a=await this._fetchRawTiffTile(e,t,i,!0,s);null!=a&&a.pixels[0]instanceof Uint8Array&&(r.mask=a.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new o.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:a}=(0,Be.uT)(i),n=[],c={fileChunk:i,posIFD:r,fileOffset:0};await this._readIFDs(n,c,s,a?8:4,t);const{imageInfo:u,rasterInfo:f}=function(e){const t=(0,Be.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:a,planes:n,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:f,pyramidBlockHeight:h,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:g}=t;let y=de(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==y&&(w=!0,y=new U.A({wkid:3857}));const v=new J.A({...t.extent,spatialReference:y}),x=new Ie.A(v?{x:v.xmin,y:v.ymax,spatialReference:y}:{x:0,y:0}),b=new Ce.A({blockWidth:r,blockHeight:a,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:l,origin:x,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new Ie.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:y}),C=g?{BandProperties:g.bandProperties,DataType:g.dataType}:{};let S=null;const A=Ue(e[0],"PHOTOMETRICINTERPRETATION"),T=Je(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new ee.A({width:i,height:s,bandCount:n,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:y,isPseudoSpatialReference:w,keyProperties:C,extent:v,colormap:S,statistics:g?g.statistics:null});if(m?.length&&(R.nativeExtent=new J.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:y}),R.transform=new he.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new Ie.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:y}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach(i=>{i.x*=e,i.y*=t})}return{imageInfo:t,rasterInfo:R}}(n),h=(0,Be.zS)(n),p=(0,Be.r9)(n);if(this._headerInfo={littleEndian:s,isBigTiff:a,ifds:n,pyramidIFDs:h,maskIFDs:p,...u},this._set("rasterInfo",f),!u.isSupported)throw new o.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new o.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");f.isPseudoSpatialReference&&l.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const d=n[0].get("PREDICTOR")?.values?.[0],m=n[0].get("SAMPLEFORMAT")?.values?.[0];if(3===m&&2===d)throw new o.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:g,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!g){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,se.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new Ie.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,f)}y.includes("vat.dbf")||1!==f.bandCount||"u8"!==f.pixelType||g||(f.attributeTable=await this._fetchAuxiliaryTable(e),null!=f.attributeTable&&(f.keyProperties.DataType="thematic")),g&&this.updateImageSpaceRasterInfo(f),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:s,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(s=r+s,i=(await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:s,posIFD:r}}async _readIFDs(e,t,i,s=4,r){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,r);const a=await this._readIFD(t,i,ze.NB,s,r);if(!a?.ifd)throw new o.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(a.ifd),!a.nextIFD)return null;t.posIFD=a.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,s,r)}async _readIFD(e,t,i=ze.NB,s=4,r){let{fileChunk:a,posIFD:n,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,Be.JM)(a,t,n,o,i,s);if(l.success){const e=[];if(l.ifd?.forEach(t=>{t.values||e.push(t)}),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,r),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),i=e?.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2];n=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:a,posIFD:n,fileOffset:o},r),c=await this._readIFD(l,t,ze.YC,2,r);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return l}return l.requiredBufferSize?(a=(await this.request(this.url,{range:{from:o,to:o+n+l.requiredBufferSize+8},responseType:"array-buffer",signal:r})).data,a.byteLength<n+l.requiredBufferSize?null:(e.fileChunk=a,e.fileOffset=o,this._readIFD(e,t,i,s,r))):null}async _fillOffsets(e,t,i,s){const r=e.filter(e=>null!=e.offlineOffsetSize);if(0===r.length)return;const a=r.map(e=>e.offlineOffsetSize),n=Math.min.apply(null,a.map(e=>e[0])),o=Math.max.apply(null,a.map(e=>e[0]+e[1]));let l=1===a.length||o-n<=this._bufferSize;if(!l&&a.length>1&&(a.sort((e,t)=>e[0]-t[0]),l=a.reduce((e,t)=>e===t[0]?t[0]+t[1]:0,a[0][0])===o),l){const e=await this._fetchOffsets(n,Math.max(o,n+this._bufferSize),s);return void r.forEach(i=>(0,Be.Cr)(e,t,i,n))}const c=r.map(async e=>{const i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],s);(0,Be.Cr)(r,t,e,i[0])});await Promise.all(c)}async _fetchOffsets(e,t,i){const s=[],r=this._chunkSize,a=Math.ceil((t-e)/r);let n=e;for(let e=0;e<a;e++)s.push(this.request(this.url,{range:{from:n,to:e===a-1?t:n+r-1},responseType:"array-buffer",signal:i})),n+=r;const o=await Promise.all(s);if(1===a)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<a;e++)l.set(new Uint8Array(o[e].data),e*r);return l.buffer}async _fetchRawTiffTile(e,t,i,s,r={}){const a=this._getTileLocation(e,t,i,s);if(!a)return null;const{ranges:n,actualTileWidth:o,actualTileHeight:l,ifd:c}=a,u=n.map(e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal})),f=await Promise.all(u),h=f.map(e=>e.data.byteLength).reduce((e,t)=>e+t),p=1===f.length?f[0].data:new ArrayBuffer(h),d=[0],m=[0];if(f.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<f.length;t++){const s=f[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:g,blockHeight:y}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:g,height:y,planes:null,pixelType:null});if(null==w)return null;let v,x,b;if(o!==g||l!==y){let e=w.mask;if(e)for(v=0;v<y;v++)if(b=v*g,v<l)for(x=o;x<g;x++)e[b+x]=0;else for(x=0;x<g;x++)e[b+x]=0;else for(e=new Uint8Array(g*y),w.mask=e,v=0;v<l;v++)for(b=v*g,x=0;x<o;x++)e[b+x]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:a}=this.rasterInfo.storageInfo,n=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[n]:0===n?o?.ifds[0]:o?.pyramidIFDs[n-1];if(!l)return null;const c=(0,Be.XO)(l,o),u=Je(l,"TILEOFFSETS");if(void 0===u)return null;const f=Je(l,"TILEBYTECOUNTS"),{minRow:h,minCol:p,maxRow:d,maxCol:m}=a[n];if(t>d||i>m||t<h||i<p)return null;const g=Ue(l,"IMAGEWIDTH"),y=Ue(l,"IMAGELENGTH"),w=Ue(l,"TILEWIDTH"),v=Ue(l,"TILELENGTH"),x=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;x[s]={from:u[e],to:u[e]+f[e]-1}}}else{const e=t*(m+1)+i;x.push({from:u[e],to:u[e]+f[e]-1})}for(let e=0;e<x.length;e++)if(null==x[e].from||!x[e].to||x[e].to<0)return null;return{ranges:x,ifd:l,actualTileWidth:i===m&&g%w||w,actualTileHeight:t===d&&y%v||v}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ge(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Ee.parse(t);return i?.recordSet?ne.A.fromJSON(i.recordSet):null}catch{return null}}};(0,r.Cg)([(0,h.MZ)()],$e.prototype,"_files",void 0),(0,r.Cg)([(0,h.MZ)()],$e.prototype,"_headerInfo",void 0),(0,r.Cg)([(0,h.MZ)()],$e.prototype,"_bufferSize",void 0),(0,r.Cg)([(0,h.MZ)()],$e.prototype,"_chunkSize",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],$e.prototype,"datasetFormat",void 0),$e=(0,r.Cg)([(0,m.$)("esri.layers.support.rasterDatasets.TIFFRaster")],$e);const je=$e,qe=new Map;qe.set("MRF",{desc:"Meta Raster Format",constructor:De}),qe.set("TIFF",{desc:"GeoTIFF",constructor:je}),qe.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Me}),qe.set("JPG",{desc:"JPG Raster Format",constructor:ve}),qe.set("PNG",{desc:"PNG Raster Format",constructor:ve}),qe.set("GIF",{desc:"GIF Raster Format",constructor:ve}),qe.set("BMP",{desc:"BMP Raster Format",constructor:ve}),qe.set("CovJSON",{desc:"COVJSON Raster Format",constructor:le}),qe.set("MEMORY",{desc:"In Memory Raster Format",constructor:ae});class Ze{static get supportedFormats(){const e=new Set;return qe.forEach((t,i)=>e.add(i)),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let a=e.datasetFormat??i?.datasetFormat;null==a&&(t.includes(".")?a=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?a="CovJSON":s?.extent&&s.pixelblocks&&(a="MEMORY")),"OVR"===a||"TIF"===a?a="TIFF":"JPG"===a||"JPEG"===a||"JFIF"===a?a="JPG":"COVJSON"===a&&(a="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(a="RasterTileServer");const n={url:t,source:s,sourceJSON:r,datasetFormat:a,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(n).forEach(e=>{null==n[e]&&delete n[e]}),a){if(!this.supportedFormats.has(a))throw new o.A("rasterfactory:open","not a supported format "+a);if("CRF"===a)throw new o.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,qe.get(a).constructor)(n);return await i.open({signal:e.signal}),i}const l=Array.from(qe.keys()).filter(e=>"CovJSON"!==e&&"Memory"!==e);let c=0;const u=()=>{if(a=l[c++],!a)return null;if("CRF"===a)return null;const t=new(0,qe.get(a).constructor)(n);return t.open({signal:e.signal}).then(()=>t).catch(()=>u())};return u()}static register(e,t,i){qe.has(e.toUpperCase())||qe.set(e.toUpperCase(),{desc:t,constructor:i})}}var He=i(6049),Ve=i(56776),Ge=i(30291),We=i(88625);let Xe=class extends((0,I.dM)((0,_.j)((0,A.q)((0,T.A)((0,O.H)((0,C.d)((0,S.o)((0,R.G)((0,F.e)((0,b.b)((0,M.J)((0,c.P)((0,n.OU)(x.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.graphicOrigin=new v(this),this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,u.sg)(async(e,t,s)=>{const{save:r,saveAs:a}=await i.e(9838).then(i.bind(i,59838));switch(e){case 0:return r(this,t);case 1:return a(this,s,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(u.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,D.rZ)("Pixel Value"),(0,D.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,D.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,D.DV)(t),s=(0,D.y6)();e.push(i,s)}if(r){const t=(0,D.AL)(r);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==D.F_.rawServicePixelValue)),s=(0,Ge.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,D.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,p.PZ)(N.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof o.A)throw e;throw new o.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsWrite(){const e=this._primaryRasters[0]??this.raster;return!!(this.loaded?"RasterTileServer"===e.datasetFormat&&("Raster"===e.tileType||"Map"===e.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){if(this.supportsWrite())return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,L.qg)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new o.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new o.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,f.wB)(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,L.pb)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,He.UD)(t.toJSON(),s);const r=await Promise.all(s.map(e=>Ze.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i}))),a=r.findIndex(e=>null==e);if(a>-1)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${s[a]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Ze.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new o.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Ze.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new o.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>i[e.url]=e);const s=(0,He.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new E.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof o.A&&l.A.getLogger(this).error("imagery-tile-layer:open",e.message),l.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){(0,Ve.XF)(l.A.getLogger(this),(0,Ve.$7)("ImageryTile layers","relative-to-scene",e)),(0,Ve.XF)(l.A.getLogger(this),(0,Ve.tW)("ImageryTile layers",e))}};(0,r.Cg)([(0,h.MZ)({clonable:!1})],Xe.prototype,"_primaryRasters",void 0),(0,r.Cg)([(0,h.MZ)({type:We.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],Xe.prototype,"elevationInfo",null),(0,r.Cg)([(0,h.MZ)({readOnly:!0,clonable:!1})],Xe.prototype,"graphicOrigin",void 0),(0,r.Cg)([(0,h.MZ)(P.fV)],Xe.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Xe.prototype,"isReference",void 0),(0,r.Cg)([(0,h.MZ)({type:["show","hide"]})],Xe.prototype,"listMode",void 0),(0,r.Cg)([(0,h.MZ)({json:{read:!0,write:!0}})],Xe.prototype,"blendMode",void 0),(0,r.Cg)([(0,h.MZ)({type:N.A,json:{name:"renderingRule",write:!0}})],Xe.prototype,"rasterFunction",void 0),(0,r.Cg)([(0,h.MZ)()],Xe.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],Xe.prototype,"version",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],Xe.prototype,"type",void 0),(0,r.Cg)([(0,h.MZ)({type:["ArcGISTiledImageServiceLayer"]})],Xe.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],Xe.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:a.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],Xe.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],Xe.prototype,"defaultPopupTemplate",null),(0,r.Cg)([(0,h.MZ)(P.PY)],Xe.prototype,"screenSizePerspectiveEnabled",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,type:[k.A]})],Xe.prototype,"fields",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,type:[k.A]})],Xe.prototype,"rasterFields",null),(0,r.Cg)([(0,h.MZ)({constructOnly:!0})],Xe.prototype,"source",void 0),Xe=(0,r.Cg)([(0,m.$)("esri.layers.ImageryTileLayer")],Xe);const Ye=Xe},21312:(e,t,i)=>{i.d(t,{A:()=>m});var s,r=i(31635),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(64108),c=i(43937),u=i(5443),f=i(86738),h=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,a=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+a*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+a*e[9]+i*e[11]}}const a=s*s,n=r*r,o=s*r,l=a*s,c=a*r,u=s*n,f=r*n;return{x:e[0]+s*e[2]+r*e[4]+a*e[6]+o*e[8]+n*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+s*e[3]+r*e[5]+a*e[7]+o*e[9]+n*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:a,ymax:n,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:n}),l.push({x:a,y:n}),l.push({x:s,y:r}),l.push({x:a,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(n-r)*t/(e-1)}),l.push({x:a,y:r+(n-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(a-s)*t/e,y:r}),l.push({x:s+(a-s)*t/e,y:n})}l=l.map(t=>p(e,t,i));const c=l.map(e=>e.x),f=l.map(e=>e.y);return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:o})}let m=s=class extends h.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,a,n]=e,o=s*n-a*r,l=a*r-s*n;return[(a*i-t*n)/o,(s*i-t*r)/l,n/o,r/l,-a/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r.Cg)([(0,a.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r.Cg)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r.Cg)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r.Cg)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r.Cg)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r.Cg)([(0,a.MZ)()],m.prototype,"affectsPixelSize",null),(0,r.Cg)([(0,n.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r.Cg)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m)},25943:(e,t,i)=>{i.d(t,{d:()=>S});var s,r=i(31635),a=i(43773),n=i(69622),o=i(49186),l=i(36563),c=(i(44208),i(66344)),u=i(15142),f=i(74887),h=i(36708),p=i(76030),d=i(84952),m=i(10107),g=(i(53966),i(87811),i(64108)),y=i(72802),w=i(4718),v=i(69397),x=i(34275);class b{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,w.o8)(t));const s=this.location.width,r=this.location.height;let a=!0,n=!0;const l=function(e,t=!1){return e<=x.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(n=!1,l[c]|=1<<t):a=!1,31===t&&++c}n?(this._availability="unavailable",this.byteSize=40):a?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,v.Qf)(l))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,a=this._availability;return r<0||r>a.length?"unknown":a[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||a.A,{row:s,col:r,width:n,height:l}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:n,height:l},valid:!0,data:new Array(n*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==n||e.location.height!==l))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:n,height:l}});return b.fromJSON(e)})}static fromJSON(e){return Object.freeze(new b(e))}}function I(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function C(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let S=class extends n.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=a.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.q(2097152),this.addHandles((0,h.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),h.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(C(e,t,i)):this._fetchTilemap(e,t,i,s).catch(e=>e).then(s=>{if(s instanceof b){const r=s.getAvailability(t,i);if("unavailable"===r)throw C(e,t,i);return r}if((0,f.zf)(s))throw s;return"unknown"})}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const a=this.layer.tileInfo;a.updateTileInfo(s);const n=this.fetchAvailability(e,t,i,r).catch(e=>{if((0,f.zf)(e))throw e;if(a.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,r,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,a){if(!this._prefetchingEnabled)return;const n=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(n))return;const o=new AbortController;a.then(()=>o.abort(),()=>o.abort());let c=!1;const u=(0,l.hA)(()=>{c||(c=!0,o.abort())});if(this.addHandles(u,n),await(0,p.md)(10,o.signal).catch(()=>{}),c||(c=!0,this.removeHandles(n)),(0,f.G4)(o))return;const h=new y.U(e,t,i),d={...r,signal:o.signal},m=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&m.upsampleTile(h);++e){const e=this.fetchAvailability(h.level,h.row,h.col,d);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:s._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,a=this._tilemapFromCache(e,t,i,r);if(a)return Promise.resolve(a);const n=s?.signal;return s={...s,signal:null},new Promise((e,t)=>{(0,f.u7)(n,()=>t((0,f.NK)()));const i=I(r);let a=this._pendingTilemapRequests[i];if(!a){a=b.fromDefinition(r,s).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=a,a.then(e,e)}a.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,d.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=I(s);return this._tilemapCache.get(r)}get test(){}};(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"minLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"maxLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"request",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],S.prototype,"size",void 0),S=s=(0,r.Cg)([(0,g.$)("esri.layers.support.TilemapCache")],S)},56551:(e,t,i)=>{i.d(t,{H:()=>h});var s=i(31635),r=i(10107),a=(i(44208),i(53966),i(87811),i(64108)),n=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let f=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),(0,s.Cg)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],f.prototype,"method",void 0),(0,s.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"value",void 0),(0,s.Cg)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],f.prototype,"bandIds",void 0),(0,s.Cg)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],f.prototype,"renderer",void 0),f=(0,s.Cg)([(0,a.$)("esri.renderers.support.RasterPresetRenderer")],f);const h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s.Cg)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,s.Cg)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,s.Cg)([(0,a.$)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},69397:(e,t,i)=>{i.d(t,{$B:()=>r,Qf:()=>c,Qh:()=>o,RS:()=>a,ez:()=>h,lM:()=>n,qK:()=>f});var s=i(34275);function r(e){return 32+e.length}const a=16;function n(e){if(!e)return 0;let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=h;for(let s=0;s<t;s++)i+=l(e[s]);return i}(e);let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):f;case"string":return r(e);case"number":return a;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,a):0:0),0)}function u(e,t){return h+e.length*t}const f=32,h=16,p=145},73037:(e,t,i)=>{i.d(t,{A:()=>c});var s,r=i(31635),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(64108),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r.Cg)([(0,n.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r.Cg)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c)},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>h,X6:()=>p});var s=i(43773),r=i(5443),a=i(86738),n=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function f(e,t,i){const f=(0,c.Dl)(e),{rasterFunction:h,sourceJSON:p}=t||{},d=h?JSON.stringify(h.rasterFunctionDefinition||h):null,m=(0,c.lF)({...f.query,renderingRule:d,f:"json"}),g=(0,c.jV)(m,i);e=f.path;const y=p||await(0,s.A)(e,g).then(e=>e.data),w=y.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,g):null,v=y.hasColormap?(0,s.A)(`${e}/colormap`,g):null,x=y.hasHistograms?(0,s.A)(`${e}/histograms`,g):null,b=y.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,g):null,I=y.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,g):null,C=await Promise.allSettled([w,v,x,b,I]);let S=null;if(y.minValues&&y.minValues.length===y.bandCount){S=[];for(let e=0;e<y.minValues.length;e++)S.push({min:y.minValues[e],max:y.maxValues[e],avg:y.meanValues[e],stddev:y.stdvValues[e]})}const A=r.A.fromJSON(y.extent),T=Math.ceil(A.width/y.pixelSizeX-.1),R=Math.ceil(A.height/y.pixelSizeY-.1),O=n.A.fromJSON(y.spatialReference||y.extent.spatialReference),M="fulfilled"===C[0].status?C[0].value?.data:null,_=M?.features?.length?u.A.fromJSON(M):null,F="fulfilled"===C[1].status?C[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===C[2].status?C[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===C[3].status?C[3].value?.data??{}:{},L="fulfilled"===C[4].status?C[4].value?.data.multidimensionalInfo:null,E=L?.variables?.length?L:null;E&&E.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});const{defaultVariable:B,serviceDataType:z}=y;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=y.noDataValue;y.noDataValues?.length&&y.noDataValues.some(e=>e!==J)&&(J=y.noDataValues);const U=y.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new a.A({x:y.extent.xmin,y:y.extent.ymax,spatialReference:O}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:y.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:y.bandCount,extent:r.A.fromJSON(y.extent),spatialReference:O,pixelSize:new a.A({x:y.pixelSizeX,y:y.pixelSizeY,spatialReference:O}),pixelType:y.pixelType.toLowerCase(),statistics:S,attributeTable:_,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:E,storageInfo:U})}function h(e,t,i){return f(e,{sourceJSON:t},i)}function p(e,t,i){return f(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},82434:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(31635),r=i(25482),a=i(10107),n=(i(44208),i(53966),i(87811),i(64108));let o=class extends r.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s.Cg)([(0,a.MZ)()],o.prototype,"affectsPixelSize",null),(0,s.Cg)([(0,a.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s.Cg)([(0,n.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o)}}]);
|