@arcgis/core 5.2.0-next.128 → 5.2.0-next.129
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/Components/imageryUtils.js +1 -1
- package/arcade/batchExec.js +1 -1
- package/arcade/geometry/adapters/dehydrated.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/06da350b4ea25732f52b.js +1 -0
- package/assets/esri/core/workers/chunks/{67dcf9b873cb037b2647.js → 081c9ccaa5884c730a91.js} +1 -1
- package/assets/esri/core/workers/chunks/094102031cc77b20db74.js +1 -0
- package/assets/esri/core/workers/chunks/0b85c844af97b2fb0ba8.js +1 -0
- package/assets/esri/core/workers/chunks/{86d7a3ae672a51b75fcc.js → 0d44f793d3b0d33153ac.js} +1 -1
- package/assets/esri/core/workers/chunks/0de140199161fcd15a0c.js +1 -0
- package/assets/esri/core/workers/chunks/0deceece4b465f653f58.js +1 -0
- package/assets/esri/core/workers/chunks/111dc5653daa7f3e1001.js +1 -0
- package/assets/esri/core/workers/chunks/139e3da8ea081e21539e.js +1 -0
- package/assets/esri/core/workers/chunks/142bedebd37d747f84ba.js +1 -0
- package/assets/esri/core/workers/chunks/15dc28b4fa5b5110472b.js +1 -0
- package/assets/esri/core/workers/chunks/{dd02cc18ebebb90778c6.js → 17e2bfc7468c23e43bef.js} +1 -1
- package/assets/esri/core/workers/chunks/196d33f4d8e3a256ad94.js +1 -0
- package/assets/esri/core/workers/chunks/1a02c68de65a67ab6a67.js +1 -0
- package/assets/esri/core/workers/chunks/{4165eb86471ea3bbf364.js → 1aecf7106a21320e054e.js} +1 -1
- package/assets/esri/core/workers/chunks/1bc03b8065cbbbb06c87.js +1 -0
- package/assets/esri/core/workers/chunks/1beb32170d659bc43977.js +1 -0
- package/assets/esri/core/workers/chunks/20ee32fee219afbcfee3.js +1 -0
- package/assets/esri/core/workers/chunks/{9467744cb7d094a5067a.js → 21d2f5324db0b199060c.js} +1 -1
- package/assets/esri/core/workers/chunks/22abb9a74f6594f9db2a.js +1 -0
- package/assets/esri/core/workers/chunks/237795866c075880531b.js +1 -0
- package/assets/esri/core/workers/chunks/25e4da9c6837ab0fa585.js +1 -0
- package/assets/esri/core/workers/chunks/2a5fde737dc99627142e.js +1 -0
- package/assets/esri/core/workers/chunks/3412050ae63ff7dcaf36.js +1 -0
- package/assets/esri/core/workers/chunks/35316724c8d3cc39cf80.js +1 -0
- package/assets/esri/core/workers/chunks/354cc6cd2a56937f1747.js +1 -0
- package/assets/esri/core/workers/chunks/365ae479765ca9e47de4.js +1 -0
- package/assets/esri/core/workers/chunks/{8190fcb1dd10ad20feed.js → 36ef86701883a20dd6f6.js} +1 -1
- package/assets/esri/core/workers/chunks/3759e272a1d43534a190.js +1 -0
- package/assets/esri/core/workers/chunks/397ddcf0b8e858a17b70.js +1 -0
- package/assets/esri/core/workers/chunks/3a7a558e30b5cb81c801.js +1 -0
- package/assets/esri/core/workers/chunks/3c9405d310a1b08c901e.js +1 -0
- package/assets/esri/core/workers/chunks/{e10fe4c77b8dc4492092.js → 3ce53562926b05e71af5.js} +1 -1
- package/assets/esri/core/workers/chunks/3d174a84b785fc633a5a.js +1 -0
- package/assets/esri/core/workers/chunks/3d67fed3e53993c38b58.js +1 -0
- package/assets/esri/core/workers/chunks/42bdeeff55fb1a3f735f.js +1 -0
- package/assets/esri/core/workers/chunks/48f1532520b76fa7f0c2.js +1 -0
- package/assets/esri/core/workers/chunks/{00d9e41deecf5828975c.js → 4adc3822ed9f498f5653.js} +1 -1
- package/assets/esri/core/workers/chunks/{d5f0fed415b5b155d57c.js → 51741ef8225d470716fe.js} +1 -1
- package/assets/esri/core/workers/chunks/5191e481d0e19a7f3888.js +1 -0
- package/assets/esri/core/workers/chunks/{7fcee3a1b900ddc9a5e3.js → 540acf6abdee9dbd453e.js} +1 -1
- package/assets/esri/core/workers/chunks/{d9b63cf111035b05cd2e.js → 5484b89adc53430226d5.js} +1 -1
- package/assets/esri/core/workers/chunks/55361b50ecfc98db2ffb.js +1 -0
- package/assets/esri/core/workers/chunks/58da7c41c1bcef2f4141.js +1 -0
- package/assets/esri/core/workers/chunks/5979bbefb09d132c008f.js +1 -0
- package/assets/esri/core/workers/chunks/{84db05e872dbf35c80a2.js → 5982c6a8459c1237b298.js} +1 -1
- package/assets/esri/core/workers/chunks/{0a20f84b5f004a77a9f9.js → 5abfc4f447b01d6bf287.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c0dba437de0969a5b63.js → 5b9f88194433410bad5b.js} +1 -1
- package/assets/esri/core/workers/chunks/5f794f4e0113d5dd50ba.js +1 -0
- package/assets/esri/core/workers/chunks/62a30692e2a7612bafc1.js +1 -0
- package/assets/esri/core/workers/chunks/62aa7daad4ca7332854e.js +1 -0
- package/assets/esri/core/workers/chunks/66926c3686d5ef2d4692.js +29 -0
- package/assets/esri/core/workers/chunks/6994ba168465b77a36af.js +1 -0
- package/assets/esri/core/workers/chunks/6d0c6fda9100fe89f3cb.js +1 -0
- package/assets/esri/core/workers/chunks/72a898894438f177cd62.js +1 -0
- package/assets/esri/core/workers/chunks/78d4455237120103f639.js +1 -0
- package/assets/esri/core/workers/chunks/7fccf53aa751cd9dae57.js +1 -0
- package/assets/esri/core/workers/chunks/{6267a1fe1603daa399b4.js → 81327e10200065a0ccef.js} +1 -1
- package/assets/esri/core/workers/chunks/84a3fbe5d85a357f4e82.js +1 -0
- package/assets/esri/core/workers/chunks/862479729f2d036f606b.js +1 -0
- package/assets/esri/core/workers/chunks/8a9aa6db11d0f643961c.js +1 -0
- package/assets/esri/core/workers/chunks/8dfea65341991e13ab71.js +1 -0
- package/assets/esri/core/workers/chunks/8e92925043dc49ed1018.js +1 -0
- package/assets/esri/core/workers/chunks/8f0b2b0ca239b01f44d0.js +1 -0
- package/assets/esri/core/workers/chunks/93a89168c18db88f60e7.js +1 -0
- package/assets/esri/core/workers/chunks/991c854a4459c82d4d93.js +1 -0
- package/assets/esri/core/workers/chunks/{f90cad9f007a11154c0d.js → 9b080d07699b56f06c5f.js} +1 -1
- package/assets/esri/core/workers/chunks/9cd69aa3880838a834f8.js +1 -0
- package/assets/esri/core/workers/chunks/{2ca49fb4590cc34a02bd.js → 9d87f38b16dda1ff7978.js} +1 -1
- package/assets/esri/core/workers/chunks/9fd1e5a2c0a261ed2a33.js +1 -0
- package/assets/esri/core/workers/chunks/a189e520da39919cdcca.js +1 -0
- package/assets/esri/core/workers/chunks/a3a5cb664bdb1db190dd.js +1 -0
- package/assets/esri/core/workers/chunks/a63c456ecf018ec06778.js +1 -0
- package/assets/esri/core/workers/chunks/{842f993fa60b410cb613.js → a8322a978e33c7349fdf.js} +1 -1
- package/assets/esri/core/workers/chunks/{f479b4a4cee4bb2e046c.js → aa96eea0899757ab38c7.js} +1 -1
- package/assets/esri/core/workers/chunks/ab0b2a76247dfd56b92d.js +1 -0
- package/assets/esri/core/workers/chunks/ab7337b076d152a8eb9e.js +1 -0
- package/assets/esri/core/workers/chunks/ac0de274853a42d518a1.js +1 -0
- package/assets/esri/core/workers/chunks/ad372e399e20d5a3262d.js +1 -0
- package/assets/esri/core/workers/chunks/ae75b3e5320d03dff64c.js +1 -0
- package/assets/esri/core/workers/chunks/ae98530d5816306216b3.js +1 -0
- package/assets/esri/core/workers/chunks/afc94c4b9bc007fe310f.js +1 -0
- package/assets/esri/core/workers/chunks/afe54923339e957b71b9.js +1 -0
- package/assets/esri/core/workers/chunks/bbcac00362fef5e3956d.js +1 -0
- package/assets/esri/core/workers/chunks/{1302bf9718747cd9fdd9.js → bcee161dd1c4781d1998.js} +1 -1
- package/assets/esri/core/workers/chunks/{d1f54b0079fb71a15612.js → bd231bc0624eb889ac14.js} +1 -1
- package/assets/esri/core/workers/chunks/c0075715fbe7bec10fc3.js +1 -0
- package/assets/esri/core/workers/chunks/c4e1e864fb8c119b2520.js +1 -0
- package/assets/esri/core/workers/chunks/c93cedf9e53da5aaa35b.js +1 -0
- package/assets/esri/core/workers/chunks/{2d592c935571de80a2e2.js → c9690810b198a97bc16d.js} +1 -1
- package/assets/esri/core/workers/chunks/cada517cc25fa37f778c.js +1 -0
- package/assets/esri/core/workers/chunks/cd1821bf601949674e02.js +1 -0
- package/assets/esri/core/workers/chunks/{1b42d163ef22e3565bb7.js → cf7b7e54cd87422ca62a.js} +1 -1
- package/assets/esri/core/workers/chunks/d195c57fc6de3560653d.js +1 -0
- package/assets/esri/core/workers/chunks/d7f830a06ded11f2fc80.js +1 -0
- package/assets/esri/core/workers/chunks/d877783815afd21dbe98.js +1 -0
- package/assets/esri/core/workers/chunks/db5181fcea96cc2ede3e.js +1 -0
- package/assets/esri/core/workers/chunks/{6e8187a77846239ed112.js → de28a86775235bd5d3c4.js} +2 -2
- package/assets/esri/core/workers/chunks/df6992416cba9539f1ed.js +1 -0
- package/assets/esri/core/workers/chunks/e4005d95a396e1af9ac2.js +1 -0
- package/assets/esri/core/workers/chunks/{668ec0bdfb2095e90c9e.js → e495697860f7207da4c7.js} +1 -1
- package/assets/esri/core/workers/chunks/f163502c513205c892e7.js +1 -0
- package/assets/esri/core/workers/chunks/f287ec0fcb611f82ebb0.js +1 -0
- package/assets/esri/core/workers/chunks/{37ae52c71bf9c70fbb92.js → f2d45d15d0ba2537a4eb.js} +1 -1
- package/assets/esri/core/workers/chunks/{d507d7d7a7282fc38e8d.js → f652d1db26fbdea1a79b.js} +1 -1
- package/assets/esri/core/workers/chunks/f6b38ed75baae198c19b.js +1 -0
- package/assets/esri/core/workers/chunks/{168b45c5d8233f23793e.js → f6cfc901267a229de7a1.js} +2 -2
- package/assets/esri/core/workers/chunks/f6d04d14323b926f1025.js +1 -0
- package/assets/esri/core/workers/chunks/f7ab606be37373312ebe.js +1 -0
- package/assets/esri/core/workers/chunks/{3b7dff15a0058ea29886.js → f92178ac6dc9abff304f.js} +1 -1
- package/assets/esri/core/workers/chunks/fc39593febef74a036f1.js +1 -0
- package/assets/esri/libs/librust-parquet/pkg/parquet_bg.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +7 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ar.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.bg.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.bs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ca.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.cs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.da.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.de.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.el.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.es.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.et.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.fi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.fr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.he.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.hr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.hu.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.id.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.it.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ja.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ko.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.lt.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.lv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.nl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.no.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.pl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ro.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ru.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.sk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.sl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.sr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.sv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.th.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.tr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.uk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.vi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.zh-TW.json +1 -1
- package/chunks/batchExec.js +2 -0
- package/config.js +1 -1
- package/geometry/support/intersects.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/kernel.js +1 -1
- package/layers/GeospatialPDFLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/graphics/hydrateGeometryJSON.js +2 -0
- package/layers/graphics/hydratedFeatures.js +1 -1
- package/layers/graphics/hydratedSpatialReference.js +2 -0
- package/layers/raster/datasets/DBFParser.js +1 -1
- package/layers/raster/datasets/ImageAuxRaster.js +1 -1
- package/layers/raster/datasets/TIFFRaster.js +1 -1
- package/layers/raster/formats/JpgPlus.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/formats/Raw.js +1 -1
- package/layers/support/arcadeUtils.js +1 -1
- package/package.json +3 -3
- package/popup/FeatureContent.js +1 -1
- package/popup/FeatureContentCollection.d.ts +2 -0
- package/popup/FeatureContentCollection.js +1 -1
- package/popup/support/featureUtils.js +1 -1
- package/rest/imageService.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/loadArcade.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/engine/vectorTiles/GeometryUtils.js +1 -1
- package/views/2d/engine/vectorTiles/TileManager.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/util.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
- package/views/2d/layers/graphics/GraphicStore.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/layers/GeospatialPDFLayerView3D.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/DOMContainer.d.ts +18 -8
- package/views/VideoView.d.ts +38 -0
- package/views/VideoView.js +1 -1
- package/views/View.d.ts +20 -2
- package/views/View.js +1 -1
- package/views/input/types.d.ts +19 -6
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/assets/esri/core/workers/chunks/025da54eef112d7e8f66.js +0 -1
- package/assets/esri/core/workers/chunks/02f94f9d704f03ddb5c6.js +0 -1
- package/assets/esri/core/workers/chunks/038d2b80d96237c25b6f.js +0 -1
- package/assets/esri/core/workers/chunks/04d4cd66485b622403d0.js +0 -1
- package/assets/esri/core/workers/chunks/05afa8c2b5929ce0545a.js +0 -1
- package/assets/esri/core/workers/chunks/09676cfa99b90fe0cc63.js +0 -1
- package/assets/esri/core/workers/chunks/0aadee0437fa061e4ff5.js +0 -1
- package/assets/esri/core/workers/chunks/0ccd4200c5a2a5de6e16.js +0 -1
- package/assets/esri/core/workers/chunks/1262918b2161d79851c0.js +0 -1
- package/assets/esri/core/workers/chunks/1406a884241809b62bff.js +0 -1
- package/assets/esri/core/workers/chunks/1c33aa349beea9a3792f.js +0 -1
- package/assets/esri/core/workers/chunks/1f135269aea3931e11b2.js +0 -1
- package/assets/esri/core/workers/chunks/24014f3701c31ee74bc2.js +0 -1
- package/assets/esri/core/workers/chunks/25a2e02677a74834c8b5.js +0 -1
- package/assets/esri/core/workers/chunks/2afce71e8b6ae86e0792.js +0 -1
- package/assets/esri/core/workers/chunks/2c7bb5c9751524687002.js +0 -1
- package/assets/esri/core/workers/chunks/2ebad7e588b26e74cefe.js +0 -1
- package/assets/esri/core/workers/chunks/319434415d2c0561bc59.js +0 -1
- package/assets/esri/core/workers/chunks/39d71e83261bff46f6bf.js +0 -1
- package/assets/esri/core/workers/chunks/3aceedec9abfb2fdfa18.js +0 -1
- package/assets/esri/core/workers/chunks/3c6ee445e49da0076ac1.js +0 -1
- package/assets/esri/core/workers/chunks/3f045f09ac95e7f22a97.js +0 -1
- package/assets/esri/core/workers/chunks/4327d2c39a660bd89da7.js +0 -1
- package/assets/esri/core/workers/chunks/462fd57af8ed7921d6ba.js +0 -1
- package/assets/esri/core/workers/chunks/474d9541d387b31ad275.js +0 -1
- package/assets/esri/core/workers/chunks/48a2f68e06a2e90b77d0.js +0 -1
- package/assets/esri/core/workers/chunks/4a73f73f1698fad2df20.js +0 -1
- package/assets/esri/core/workers/chunks/4f464047c6f6c9486efd.js +0 -1
- package/assets/esri/core/workers/chunks/500f6d6f0ffa235cae85.js +0 -1
- package/assets/esri/core/workers/chunks/526cc64ae46dec3fbeda.js +0 -1
- package/assets/esri/core/workers/chunks/550d4df0732352fa48b5.js +0 -1
- package/assets/esri/core/workers/chunks/581285e4d7bbe1b7c27a.js +0 -1
- package/assets/esri/core/workers/chunks/58fb92775d668cfd295c.js +0 -1
- package/assets/esri/core/workers/chunks/5adf2792416b22cd602f.js +0 -1
- package/assets/esri/core/workers/chunks/5aee7739afb5160d4ace.js +0 -1
- package/assets/esri/core/workers/chunks/6006bd8a5ed945fa2776.js +0 -1
- package/assets/esri/core/workers/chunks/606cca69eaea84bfcdc6.js +0 -1
- package/assets/esri/core/workers/chunks/64ee22134fda2f09c094.js +0 -1
- package/assets/esri/core/workers/chunks/66ef6c034455abd61f39.js +0 -1
- package/assets/esri/core/workers/chunks/67678054342178b601cf.js +0 -1
- package/assets/esri/core/workers/chunks/67fd2cdb2e6834bfa710.js +0 -1
- package/assets/esri/core/workers/chunks/6c82cbcd504c711a7450.js +0 -1
- package/assets/esri/core/workers/chunks/75294f515c7f8393181c.js +0 -1
- package/assets/esri/core/workers/chunks/75879ae88fd87b089a87.js +0 -1
- package/assets/esri/core/workers/chunks/761ea719ec1b4d562db2.js +0 -1
- package/assets/esri/core/workers/chunks/78085f804969c9282700.js +0 -1
- package/assets/esri/core/workers/chunks/7d6da4e89aa951e6523f.js +0 -1
- package/assets/esri/core/workers/chunks/80f16f5f15518013f7d0.js +0 -1
- package/assets/esri/core/workers/chunks/8465e2c7221125fd3cc4.js +0 -1
- package/assets/esri/core/workers/chunks/87aaed3dfa903bdf853c.js +0 -1
- package/assets/esri/core/workers/chunks/892dc038d569cffd26dc.js +0 -1
- package/assets/esri/core/workers/chunks/8a842cde240aef12e417.js +0 -1
- package/assets/esri/core/workers/chunks/8f1c5f5e70d4b33d021d.js +0 -1
- package/assets/esri/core/workers/chunks/9020bd7a0e488d55ef14.js +0 -1
- package/assets/esri/core/workers/chunks/92509dd25996c6390a31.js +0 -1
- package/assets/esri/core/workers/chunks/9ccc2c8f7416943cc373.js +0 -29
- package/assets/esri/core/workers/chunks/9d6a96e4c7ccedcb0c13.js +0 -1
- package/assets/esri/core/workers/chunks/9ec04faad97be55309b8.js +0 -1
- package/assets/esri/core/workers/chunks/a08385ebf1715414c1a6.js +0 -1
- package/assets/esri/core/workers/chunks/a3a33ffa34f4d645ddfe.js +0 -1
- package/assets/esri/core/workers/chunks/b396c4b4bb144200acc7.js +0 -1
- package/assets/esri/core/workers/chunks/b9c834e3c0701e9b14a2.js +0 -1
- package/assets/esri/core/workers/chunks/bbfb80a6983574007ce5.js +0 -1
- package/assets/esri/core/workers/chunks/bcf2e5cf6b9c6d0442bb.js +0 -1
- package/assets/esri/core/workers/chunks/c35e9dee87937f483a3d.js +0 -1
- package/assets/esri/core/workers/chunks/c5b733c3a5b2680042a2.js +0 -1
- package/assets/esri/core/workers/chunks/cbeba973ef5593ffbba3.js +0 -1
- package/assets/esri/core/workers/chunks/ccaeabc3be07f3c96f50.js +0 -1
- package/assets/esri/core/workers/chunks/d25fb32a233d2128afbe.js +0 -1
- package/assets/esri/core/workers/chunks/d5ef269ab0ee3744b05d.js +0 -1
- package/assets/esri/core/workers/chunks/d94a2b3b2ef49af9c2e3.js +0 -1
- package/assets/esri/core/workers/chunks/dc92710a8fdfb9135e55.js +0 -1
- package/assets/esri/core/workers/chunks/dd4ecf81250cc001d040.js +0 -1
- package/assets/esri/core/workers/chunks/e0894a308c84d5c158b0.js +0 -1
- package/assets/esri/core/workers/chunks/e4016ae9cb8f16e3efc3.js +0 -1
- package/assets/esri/core/workers/chunks/e6a4cef0af9be30ffe3d.js +0 -1
- package/assets/esri/core/workers/chunks/eaa7cb3ffa8c11706a09.js +0 -1
- package/assets/esri/core/workers/chunks/ed31ec586b754241474d.js +0 -1
- package/assets/esri/core/workers/chunks/ef6e52f9b656751eebaf.js +0 -1
- package/assets/esri/core/workers/chunks/f2fca9a3a40170996ea2.js +0 -1
- package/assets/esri/core/workers/chunks/f5d06cd6d30a5f742f73.js +0 -1
- package/assets/esri/core/workers/chunks/f71ec8a260405ed07958.js +0 -1
- package/assets/esri/core/workers/chunks/f91cab9904020cf25d50.js +0 -1
- package/assets/esri/core/workers/chunks/fb11ff3f2eae5f072560.js +0 -1
- package/assets/esri/core/workers/chunks/ff0e9f8d323eb1729650.js +0 -1
- /package/assets/esri/core/workers/chunks/{6e8187a77846239ed112.js.LICENSE.txt → de28a86775235bd5d3c4.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{168b45c5d8233f23793e.js.LICENSE.txt → f6cfc901267a229de7a1.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,7745,9281],{52106(e,t,r){r.d(t,{A:()=>I});var n,i,o=r(32198),s=r(37838),a=r(69540),l=r(51447),u=r(25482),p=r(53966),c=r(36708),d=r(24326),y=r(91429),f=r(12195),h=r(65864),g=r(50498),m=r(55156),w=r(60950),b=r(54339),v=r(94128),S=r(33910);const C=Symbol("meshGeometryHandles");function x(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let I=class extends((0,a.OU)(u.o)){static{n=v.Z}static{i=this}constructor(e){super(e),this[n]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,w.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,m.I)(this.origin);if(e)return(0,b.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){const e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){const e={aggregateGeometries:x(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.removeHandles(C);const e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,c.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],C)}};(0,o.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,h.rS)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],I.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,y.MZ)({value:null})],I.prototype,"attributes",null),(0,o.Cg)([(0,y.MZ)({value:null,types:g.yR,json:{read:h.rS}})],I.prototype,"geometry",null),(0,o.Cg)([(0,y.MZ)()],I.prototype,"distance",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean})],I.prototype,"isAggregate",void 0),(0,o.Cg)([(0,y.MZ)({clonable:!1})],I.prototype,"layer",void 0),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],I.prototype,"origin",void 0),(0,o.Cg)([(0,y.MZ)({type:s.A,value:null})],I.prototype,"popupTemplate",null),(0,o.Cg)([(0,y.MZ)({clonable:"reference"})],I.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],I.prototype,"statisticsAggregatedIds",void 0),(0,o.Cg)([(0,y.MZ)({value:null,types:S.Es})],I.prototype,"symbol",null),(0,o.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],I.prototype,"_version",void 0),(0,o.Cg)([(0,y.MZ)({type:Boolean,value:!0})],I.prototype,"visible",null),I=i=(0,o.Cg)([(0,y.$K)("esri.Graphic")],I)},19334(e,t,r){r.d(t,{e:()=>s});var n=r(54639),i=r(14112);class o{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function s(e){if(null==e)return null;switch(e.type){case"point":if((0,i.e6)(e))return null;break;case"polygon":if((0,i.Wq)(e))return null;break;case"polyline":if((0,i.IY)(e))return null;break;case"multipoint":if((0,i.DG)(e))return null;break;case"extent":if((0,i.As)(e))return null;break;default:return null}const t=n.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new o(e));return t.asAccessorGeometry(),t}},36983(e,t,r){r.d(t,{R:()=>u,p:()=>p});var n=r(54639),i=r(14112),o=r(16930),s=r(60408),a=r(65864);class l{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){const t=(0,a.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function u(e,t){if(null==e||"object"!=typeof e)return null;let r=t;if("spatialReference"in e&&(e.spatialReference instanceof o.A?r=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(r=new o.A,r.read(e.spatialReference))),null==r)throw new Error("Spatial reference required");return(0,s.fT)(e)?p("point",e,r):(0,s.Rg)(e)?p("polyline",e,r):(0,s.Bi)(e)?p("polygon",e,r):(0,s.U9)(e)?p("multipoint",e,r):(0,s.ZC)(e)?p("extent",e,r):null}function p(e,t,r){if(null==t)return null;let o=!1,s=!1;switch(e){case"point":if((0,i.e6)(t))return null;o=void 0!==t.z,s=void 0!==t.m;break;case"polygon":if((0,i.Wq)(t))return null;o=!0===t.hasZ,s=!0===t.hasM;break;case"polyline":if((0,i.IY)(t))return null;o=!0===t.hasZ,s=!0===t.hasM;break;case"multipoint":if((0,i.DG)(t))return null;o=!0===t.hasZ,s=!0===t.hasM;break;case"extent":if((0,i.As)(t))return null;o=null!=t.zmin&&null!=t.zmax,s=null!=t.mmin&&null!=t.mmax;break;default:throw new Error("Unsupported geometry type: "+t.type)}return n.R.of(e,r,o,s,new l(t))}},14112(e,t,r){function n(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function i(e){if(0===(e.curveRings??e.rings).length)return!0;for(const t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function o(e){if(0===(e.curvePaths??e.paths).length)return!0;for(const t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function s(e){return 0===e.points.length}function a(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}r.d(t,{As:()=>a,DG:()=>s,IY:()=>o,Wq:()=>i,e6:()=>n})},6797(e,t,r){r.d(t,{Ui:()=>d});var n=r(69622),i=r(7762),o=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.A}function l(e){return e instanceof i.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=l(e),i=l(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter(e=>!n.includes(e)),d=n.filter(e=>!i.includes(e)),y=n.filter(r=>i.includes(r)&&u(e,r)!==u(t,r)).concat(o,d).sort(),f=p(e);if(f&&s.has(f)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h;const g=a(e)&&a(t);for(const n of y){const i=u(e,n),o=u(t,n);let s;if((g||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&p(i)===p(o)?c(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=h?h.diff[n]=s:h={type:"partial",diff:{[n]:s}})}}return h}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},67482(e,t,r){function n(e){return null!==i(e)}function i(e){return function(e){const t=o.exec(e);if(!t?.groups)return null;const r=t.groups,n=+r.year,i=+r.month-1,s=+r.day,a=+(r.hours??"0"),l=+(r.minutes??"0"),u=+(r.seconds??"0");if(a>23)return null;if(l>59)return null;if(u>59)return null;const p=r.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(r.isUTC||!r.offsetSign)d=Date.UTC(n,i,s,a,l,u,c);else{const e=+r.offsetHours,t=+r.offsetMinutes;d=6e4*("+"===r.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,i,s,a,l,u,c)}return Number.isNaN(d)?null:d}(e)??function(e){const t=new Date(e),r=t.getTime();return Number.isNaN(r)?null:e.toLowerCase()===t.toUTCString().toLowerCase()?r:null}(e)??function(e){if(!s.test(e))return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset()}(e)}r.d(t,{C:()=>n,_:()=>i});const o=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,s=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},69397(e,t,r){r.d(t,{Qf:()=>a,Qh:()=>o,lM:()=>i});var n=r(34275);function i(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return a(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=p;for(let n=0;n<t;n++)r+=s(e[n]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?o(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...e){return e.reduce((e,t)=>e+(t?(0,n.iu)(t)?t.byteLength+c:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return p+e.length*t}const u=32,p=16,c=145},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const n="randomUUID"in crypto;function i(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},83027(e,t,r){const n=r(29953).ho;r.d(t,["h",0,n])},55156(e,t,r){r.d(t,{I:()=>i});const n=Symbol("idFieldsProviderSymbol");function i(e){return(t=e)&&n in t?e[n]:void 0;var t}r.d(t,["e",0,n])},21901(e,t,r){r.r(t),r.d(t,{default:()=>ie});var n=r(32198),i=r(37838),o=r(25728),s=r(93637),a=r(84952),l=r(91429),u=r(78888),p=r(5443),c=r(16930),d=r(50498),y=r(55156),f=r(60950),h=r(89808),g=r(99959);const m=Symbol("isWFSGraphicOrigin");var w;class b extends g.A{get[(w=m,f.ym)](){return this.layer}get[y.e](){return this.layer}get[h.Q](){return this.layer}constructor(e){super(),this[w]=!0,this.type="wfs",this.layer=e}get id(){return this.layer.id}}var v=r(4146),S=r(49186),C=r(44208),x=r(92474),I=r(53966),A=r(17676),M=r(83027),T=r(64714),P=r(34322),F=r(37745),E=r(22671);r(98623);let N=class extends x.x_{constructor(){super(...arguments),this._connection=null,this._workerHandler=null,this.capabilities=(0,T.f)(!1,!1),this.type="wfs",this.refresh=(0,A.sg)(async()=>{await this.load();const e={customParameters:this.layer.customParameters,maxRecordCount:this.layer.maxRecordCount,maxTotalRecordCount:this.layer.maxTotalRecordCount,maxPageCount:this.layer.maxPageCount},{extent:t}=await this._workerHandler.refresh(e);return t&&(this.sourceJSON.extent=t),{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}})}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker({signal:t})),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null,this._workerHandler=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,t);return E.A.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._workerHandler.queryFeatures(e?e.toJSON():void 0,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._workerHandler.queryFeatureCount(e?e.toJSON():void 0,t)}async queryObjectIds(e,t={}){return await this.load(t),this._workerHandler.queryObjectIds(e?e.toJSON():void 0,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._workerHandler.queryExtent(e?e.toJSON():void 0,t);return{count:r.count,extent:p.A.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._workerHandler.querySnapping(e,t)}async queryAttributeBins(e,t={}){await this.load(t);const r=await this._workerHandler.queryAttributeBins(e?.toJSON(),t);return F.default.fromJSON(r)}async _createLoadOptions(e){const{url:t,customParameters:r,name:n,namespaceUri:i,fields:o,geometryType:s,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,swapXY:p}=this.layer,c="defaults"===this.layer.originOf("spatialReference")?void 0:this.layer.spatialReference;if(!t)throw new S.A("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await(0,P.Fu)(t,{customParameters:r,...e}));const y=["fields","geometryType","name","namespaceUri","swapXY"].some(e=>null==this.layer[e]),f=y?await(0,P.O8)(this.wfsCapabilities,n,i,{spatialReference:c,customParameters:r,signal:e?.signal}):{...(0,P.YW)(o??[]),geometryType:s,name:n,namespaceUri:i,spatialReference:c,swapXY:p},h=(0,P.mG)(this.wfsCapabilities.readFeatureTypes(),f.name,f.namespaceUri),g=d.gy.toJSON(f.geometryType),{operations:m}=this.wfsCapabilities,w=m.GetFeature.url,b=m.GetFeature.outputFormat;return{customParameters:r,featureType:h,fields:f.fields?.map(e=>e.toJSON())??[],geometryField:f.geometryField,geometryType:g,getFeatureUrl:w,getFeatureOutputFormat:b,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,objectIdField:f.objectIdField,spatialReference:f.spatialReference?.toJSON(),swapXY:!!f.swapXY}}async _startWorker(e){const[t,r]=await(0,A.Lx)([this._createLoadOptions(e),(0,M.h)("WFSSourceWorker",{...e,strategy:(0,C.A)("feature-layers-workers")?"dedicated":"local",registryTarget:this})]),n=t.error||r.error||null,i=r.value||null;if(n)throw i&&i.close(),n;const o=t.value;this._connection=r.value,this._workerHandler=this._connection.createInvokeProxy();const s=await this._workerHandler.load(o,e);for(const e of s.warnings)I.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});this.sourceJSON={dateFieldsTimeReference:{timeZoneIANA:"UTC"},extent:s.extent,fields:o.fields,geometryType:o.geometryType,objectIdField:o.objectIdField,geometryField:o.geometryField,drawingInfo:(0,T.F0)(o.geometryType),name:o.featureType.title,wfsInfo:{name:o.featureType.name,featureUrl:o.getFeatureUrl,maxFeatures:o.maxRecordCount,swapXY:o.swapXY,supportedSpatialReferences:o.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:o.featureType.namespaceUri}}}};(0,n.Cg)([(0,l.MZ)()],N.prototype,"capabilities",void 0),(0,n.Cg)([(0,l.MZ)({constructOnly:!0})],N.prototype,"layer",void 0),(0,n.Cg)([(0,l.MZ)()],N.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,l.MZ)()],N.prototype,"type",void 0),(0,n.Cg)([(0,l.MZ)()],N.prototype,"wfsCapabilities",void 0),N=(0,n.Cg)([(0,l.$K)("esri.layers.graphics.sources.WFSSource")],N);var O,R=r(63074),L=r(69208),Z=r(6455),G=r(87718),_=r(56658),j=r(34287),k=r(32756),U=r(8303),D=r(54310),$=r(25036),q=r(82935),z=r(10873),V=r(15426),J=r(20437),B=r(17036),W=r(30524),Y=r(46499),H=r(39383),Q=r(41214),K=r(97552),X=r(30291),ee=r(56400),te=r(43937);const re=(0,B.p)();let ne=O=class extends((0,k.fY)((0,Z.FJ)((0,L.d)((0,_.J)((0,G.F)((0,R.dM)((0,D.J)((0,$.j)((0,j.q)((0,U.A)((0,o.M)(v.A)))))))))))){static fromWFSLayerInfo(e){const{customParameters:t,fields:r,geometryField:n,geometryType:i,name:o,namespaceUri:s,objectIdField:a,spatialReference:l,swapXY:u,url:p,wfsCapabilities:c}=e;return new O({customParameters:t,fields:r,geometryField:n,geometryType:i,name:o,namespaceUri:s,objectIdField:a,spatialReference:l,swapXY:u,url:p,wfsCapabilities:c})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new b(this),this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new N({layer:this}),this.spatialReference=c.A.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.useViewTime=!0,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),["objectIdField","fields","spatialReference","name","namespaceUri"].forEach(e=>this.revertToOrigin(e,"service")),(0,W.yp)(this.renderer,this.fieldsIndex)})),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r){const n=e.filter(e=>e.name!==P.i5);this.geometryField&&n.unshift(new J.A({name:this.geometryField,alias:this.geometryField,type:"geometry"})),(0,s.sM)(r,n.map(e=>e.toJSON()),t)}get parsedUrl(){return(0,a.An)(this.url)}set renderer(e){(0,W.yp)(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return(0,X.tn)(this,e)}createQuery(){return new K.A({returnGeometry:!0,outFields:["*"],where:this.definitionExpression||"1=1"})}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(K.A.from(e)||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(K.A.from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(K.A.from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(K.A.from(e)||this.createQuery(),t))}async queryAttributeBins(e,t){const{source:n,capabilities:i}=await this.load();(0,V.ZJ)(e,i,"WFSLayer");const o=await r.e(4575).then(()=>r(14575)),s=await n.queryAttributeBins(o.default.from(e),t);if(s.features)for(const e of s.features)e.layer=e.sourceLayer=this;return s}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh();return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,n.Cg)([(0,l.MZ)({readOnly:!0})],ne.prototype,"capabilities",null),(0,n.Cg)([(0,l.MZ)({type:String})],ne.prototype,"copyright",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],ne.prototype,"createQueryVersion",null),(0,n.Cg)([(0,l.MZ)({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],ne.prototype,"customParameters",void 0),(0,n.Cg)([(0,l.MZ)((0,ee.P6)("dateFieldsTimeReference"))],ne.prototype,"dateFieldsTimeZone",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],ne.prototype,"defaultPopupTemplate",null),(0,n.Cg)([(0,l.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ne.prototype,"definitionExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:String})],ne.prototype,"displayField",void 0),(0,n.Cg)([(0,l.MZ)(z.Yj)],ne.prototype,"elevationInfo",void 0),(0,n.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],ne.prototype,"featureUrl",void 0),(0,n.Cg)([(0,l.MZ)({type:[J.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],ne.prototype,"fields",void 0),(0,n.Cg)([(0,te.K)("fields")],ne.prototype,"writeFields",null),(0,n.Cg)([(0,l.MZ)(re.fieldsIndex)],ne.prototype,"fieldsIndex",void 0),(0,n.Cg)([(0,l.MZ)({type:p.A,json:{name:"extent"}})],ne.prototype,"fullExtent",void 0),(0,n.Cg)([(0,l.MZ)()],ne.prototype,"geometryField",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{read:{source:"layerDefinition.geometryType",reader:d.gy.read},write:{target:"layerDefinition.geometryType",writer:d.gy.write,ignoreOrigin:!0},origins:{service:{read:d.gy.read}}}})],ne.prototype,"geometryType",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,clonable:!1})],ne.prototype,"graphicOrigin",void 0),(0,n.Cg)([(0,l.MZ)({type:String})],ne.prototype,"id",void 0),(0,n.Cg)([(0,l.MZ)(z.kF)],ne.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,l.MZ)({type:[Y.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:H.w},write:!0}})],ne.prototype,"labelingInfo",void 0),(0,n.Cg)([(0,l.MZ)(z.fV)],ne.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,l.MZ)({type:["show","hide"]})],ne.prototype,"listMode",void 0),(0,n.Cg)([(0,l.MZ)({type:String})],ne.prototype,"objectIdField",void 0),(0,n.Cg)([(0,l.MZ)({type:["WFS"]})],ne.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,l.MZ)({type:u.jz,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],ne.prototype,"maxRecordCount",void 0),(0,n.Cg)([(0,l.MZ)({type:u.jz})],ne.prototype,"maxPageCount",void 0),(0,n.Cg)([(0,l.MZ)({type:u.jz})],ne.prototype,"maxTotalRecordCount",void 0),(0,n.Cg)([(0,l.MZ)({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],ne.prototype,"mode",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],ne.prototype,"name",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],ne.prototype,"namespaceUri",void 0),(0,n.Cg)([(0,l.MZ)(z.Ih)],ne.prototype,"opacity",void 0),(0,n.Cg)([(0,l.MZ)(re.outFields)],ne.prototype,"outFields",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],ne.prototype,"parsedUrl",null),(0,n.Cg)([(0,l.MZ)(z.M6)],ne.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,l.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],ne.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,l.MZ)({types:Q.Hg,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:Q.XJ,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],ne.prototype,"renderer",null),(0,n.Cg)([(0,l.MZ)(z.PY)],ne.prototype,"screenSizePerspectiveEnabled",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],ne.prototype,"source",void 0),(0,n.Cg)([(0,l.MZ)({type:c.A,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],ne.prototype,"spatialReference",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,type:[u.jz],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],ne.prototype,"spatialReferences",void 0),(0,n.Cg)([(0,l.MZ)({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],ne.prototype,"swapXY",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],ne.prototype,"title",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1},readOnly:!0})],ne.prototype,"type",void 0),(0,n.Cg)([(0,l.MZ)(z.OZ)],ne.prototype,"url",void 0),(0,n.Cg)([(0,l.MZ)(q.B)],ne.prototype,"useViewTime",void 0),(0,n.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],ne.prototype,"version",void 0),(0,n.Cg)([(0,l.MZ)()],ne.prototype,"wfsCapabilities",null),ne=O=(0,n.Cg)([(0,l.$K)("esri.layers.WFSLayer")],ne);const ie=ne},43334(e,t,r){r.d(t,{N3:()=>a,Om:()=>s});var n=r(69397),i=r(27647),o=r(92722);class s{constructor(e,t,r,n,i=0,o=null,s=null){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=i,this.distance=o,this.vertexCount=s}static fromJSON(e){const t=e.geometry?o.A.fromJSON(e.geometry):null,r=e.centroid?o.A.fromJSON(e.centroid):null,n=e.objectId;return new s(t,e.attributes,r,n,void 0,e.distance,e.vertexCount)}weakClone(){return new s(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new s(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(e){return this.centroid??=(0,i.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function a(e){return!!e.geometry?.coords?.length}},58512(e,t,r){r.d(t,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new n;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722(e,t,r){r.d(t,{A:()=>i});var n=r(69397);class i{constructor(e=[],t=[],r=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:n}){return new i(e,t,r||!1,n||!1)}static fromRect([e,t,r,n]){const o=r-e,s=n-t;return new i([5],[e,t,o,0,0,s,-o,0,0,-s])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const r of this.lengths){if(r<3)continue;const{stride:n}=this;let i=this.coords[n*t],o=this.coords[n*t+1];for(let s=1;s<r;s+=1){const r=n*(t+s),a=this.coords[r],l=this.coords[r+1];e+=-.5*(a-i)*(l+o),i=a,o=l}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:r}=this;for(const n of this.lengths){for(let i=0;i<n;i++){const n=r*(t+i);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let n=0;const{stride:i}=this;for(const e of r){for(let r=1;r<e;r++){const e=i*(n+r);t[e]+=t[e-i],t[e+1]+=t[e+1-i]}n+=e}return e}clone(e){if(this.isPoint)return new i([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:r,size:n}=this,o=this.coords.slice(0,n*r);return e?(e.set(o),new i(t,e,this.hasZ,this.hasM)):new i(t,Array.from(o),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const r=new Array(t*e);for(let t=0,n=0;t<r.length;t+=e)r[n++]=this.coords[t],r[n++]=this.coords[t+1];return new i(this.lengths,r,!1,!1)}}},27647(e,t,r){r.d(t,{Q:()=>o});var n=r(92722);function i(e,t){return e?t?4:3:t?3:2}function o(e){if(null==e)return null;if(!e?.lengths.length)return null;const{lengths:t,coords:r,stride:i,hasZ:o,hasM:l}=e,u=new n.A([],[],o,!1),p=u.coords,c=[],d=o?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];let y=0;for(const e of t){const t=s(d,r,y,e,o,l);t&&c.push(t),y+=e*i}if(c.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&o&&(r=e[4]-t[4]),r}),c.length){let e=6*c[0][2];p[0]=c[0][0]/e,p[1]=c[0][1]/e,o&&(e=6*c[0][4],p[2]=0!==e?c[0][3]/e:0),(p[0]<d[0]||p[0]>d[1]||p[1]<d[2]||p[1]>d[3]||o&&(p[2]<d[4]||p[2]>d[5]))&&(p.length=0)}if(!p.length){const n=e.lengths[0]?a(r,0,t[0],o,l):null;if(!n)return null;p[0]=n[0],p[1]=n[1],o&&(p[2]=n[2]??0)}return u}function s(e,t,r,n,o,s){const a=i(o,s);let l=r,u=r+a,p=0,c=0,d=0,y=0,f=0;for(let r=0,i=n-1;r<i;r++,l+=a,u+=a){const r=t[l],n=t[l+1],i=t[l+2],s=t[u],a=t[u+1],h=t[u+2];let g=r*a-s*n;y+=g,p+=(r+s)*g,c+=(n+a)*g,o&&(g=r*h-s*i,d+=(i+h)*g,f+=g),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),n<e[2]&&(e[2]=n),n>e[3]&&(e[3]=n),o&&(i<e[4]&&(e[4]=i),i>e[5]&&(e[5]=i))}if(y>0&&(y*=-1),f>0&&(f*=-1),!y)return null;const h=[p,c,.5*y];return o&&(h[3]=d,h[4]=.5*f),h}function a(e,t,r,n,o){const s=i(n,o);let a=t,d=t+s,y=0,f=0,h=0,g=0;for(let t=0,i=r-1;t<i;t++,a+=s,d+=s){const t=e[a],r=e[a+1],i=e[a+2],o=e[d],s=e[d+1],m=e[d+2],w=n?u(t,r,i,o,s,m):l(t,r,o,s);if(w)if(y+=w,n){const e=c(t,r,i,o,s,m);f+=w*e[0],h+=w*e[1],g+=w*e[2]}else{const e=p(t,r,o,s);f+=w*e[0],h+=w*e[1]}}return y>0?n?[f/y,h/y,g/y]:[f/y,h/y]:r>0?n?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,r,n){const i=r-e,o=n-t;return Math.sqrt(i*i+o*o)}function u(e,t,r,n,i,o){const s=n-e,a=i-t,l=o-r;return Math.sqrt(s*s+a*a+l*l)}function p(e,t,r,n){return[e+.5*(r-e),t+.5*(n-t)]}function c(e,t,r,n,i,o){return[e+.5*(n-e),t+.5*(i-t),r+.5*(o-r)]}},99352(e,t,r){r.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},54339(e,t,r){function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const n of t.fieldNames)r.push(e.attributes[n]??null);return JSON.stringify(r)}}}function i(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>n,r:()=>i})},90708(e,t,r){r.d(t,{Ap:()=>T,B2:()=>g,DF:()=>C,Di:()=>R,E2:()=>O,IE:()=>h,Nl:()=>D,PR:()=>A,Rk:()=>W,Ux:()=>Z,Ye:()=>F,ZF:()=>j,aQ:()=>J,jH:()=>U,jQ:()=>V,kz:()=>$,oN:()=>L,q3:()=>k,qN:()=>x,zv:()=>G});var n=r(49186),i=r(53966),o=r(97768),s=r(70328),a=r(19419),l=r(60408),u=r(43334),p=r(58512),c=r(92722),d=r(54339);const y=()=>i.A.getLogger("esri.layers.graphics.featureConversionUtils"),f={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function h({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function g({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function m({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function w({scale:e,translate:t},r){return Math.round((r-t[1])/e[1])}function b({scale:e,translate:t},r,n){return r*e[n]+t[n]}function v(e,t,r){return t&&(e.hasZ=!0),r&&(e.hasM=!0),e}function S(e,t,r,n){if(t&&n&&e!==r)return(t,r,n,i)=>{n[i++]=t[r++],n[i++]=t[r++],e?r++:n[i++]=0,n[i++]=t[r++]??0};const i=2+(r?1:0)+(n?1:0),o=i-((!e&&r?1:0)+(!t&&n?1:0));return(e,t,r,n)=>{for(let s=0;s<i;++s)r[n++]=s<o?e[t++]??0:0}}function C(e,t,r){if(!e)return null;const{coords:n,hasZ:i,hasM:o}=e,[s,a]=n,l=i?n[2]:0,u=o?n[2+(i?1:0)]:0;return{x:s,y:a,z:t?l:void 0,m:r?u:void 0}}function x(e,t=(0,l.Pv)(e),r=(0,l.W0)(e)){const{x:n,y:i,z:o,m:s}=e,a=[n,i];return t&&a.push(o??0),r&&a.push(s??0),new c.A([],a,t,r)}function I(e,t,r){if(null==e)return null;const{coords:n,stride:i,hasZ:o,hasM:s}=e,a=S(o,s,t,r),l=[];for(let e=0;e<n.length;e+=i){const t=[];a(n,e,t,0),l.push(t)}return v({points:l},t,r)}function A(e,t=(0,l.Pv)(e),r=(0,l.W0)(e)){const{points:n,hasZ:i,hasM:o}=e,s=new c.A([n.length],[],t,r),{coords:a,stride:u}=s;let p=0;const d=S(i??!1,o??!1,t,r);for(const e of n)d(e,0,a,p),p+=u;return s}function M(e,t,r){if(!e)return null;const{coords:n,lengths:i,stride:o,hasZ:s,hasM:a}=e;let l=0;const u=S(s,a,t,r),p=[];for(const e of i){const t=[];for(let r=0;r<e;r++){const e=[];u(n,l,e,0),l+=o,t.push(e)}p.push(t)}return v({paths:p},t,r)}function T(e,t=(0,l.Pv)(e),r=(0,l.W0)(e)){const{paths:n,hasZ:i,hasM:o}=e,s=S(i??!1,o??!1,t,r),a=new c.A([],[],t,r),{lengths:u,coords:p,stride:d}=a;let y=0;for(const e of n){for(const t of e)s(t,0,p,y),y+=d;u.push(e.length)}return a}function P(e,t,r){if(!e)return null;const{coords:n,lengths:i,stride:o,hasZ:s,hasM:a}=e;let l=0;const u=S(s,a,t,r),p=[];for(const e of i){const t=[];for(let r=0;r<e;r++){const e=[];u(n,l,e,0),l+=o,t.push(e)}p.push(t)}return v({rings:p},t,r)}function F(e,t=(0,l.Pv)(e),r=(0,l.W0)(e)){const{rings:n,hasZ:i,hasM:o}=e,s=new c.A([],[],t,r),{lengths:a,coords:u,stride:p}=s;let d=0;const y=S(i??!1,o??!1,t,r);for(const e of n){for(const t of e)y(t,0,u,d),d+=p;a.push(e.length)}return s}const E=[],N=[];function O(e,t,r,n,i){E[0]=e;const[o]=R(N,E,t,r,n,i);return Y(E),Y(N),o}function R(e,t,r,i,o,s){if(Y(e),!r){for(const r of t){const t=(0,d.W)(r,s);e.push(new u.Om(null,r.attributes,null,t,void 0,r.distance,r.vertexCount))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,n,i){for(const o of t){const{geometry:t,attributes:s,centroid:a}=o,p=(0,l.Pv)(t),c=(0,l.W0)(t);e.push(new u.Om(t?x(t,r&&p,n&&c):null,s,a?x(a,!1,!1):null,(0,d.W)(o,i),o.displayId,o.distance,o.vertexCount))}return e}(e,t,i,o,s);case"esriGeometryMultipoint":return function(e,t,r,n,i){for(const o of t){const{geometry:t,attributes:s}=o,a=(0,l.Pv)(t),p=(0,l.W0)(t);e.push(new u.Om(t?A(t,r&&a,n&&p):null,s,null,(0,d.W)(o,i),o.displayId,o.distance,o.vertexCount))}return e}(e,t,i,o,s);case"esriGeometryPolyline":return function(e,t,r,n,i){for(const o of t){const{geometry:t,attributes:s,centroid:a}=o,p=(0,l.Pv)(t),c=(0,l.W0)(t);e.push(new u.Om(t?T(t,r&&p,n&&c):null,s,a?x(a,!1,!1):null,(0,d.W)(o,i),o.displayId,o.distance,o.vertexCount))}return e}(e,t,i,o,s);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,r,n,i){for(const o of t){const{geometry:t,attributes:s,centroid:a}=o,p=(0,l.Pv)(t),c=(0,l.W0)(t);e.push(new u.Om(t?F(t,r&&p,n&&c):null,s,a?x(a,!1,!1):null,(0,d.W)(o,i),o.displayId,o.distance,o.vertexCount))}return e}(e,t,i,o,s);default:y().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`)),Y(e)}return e}function L(e,t,r,n){N[0]=e,_(E,N,t,r,n);const i=E[0];return Y(E),Y(N),i}function Z(e,t=(0,l.Pv)(e),r=(0,l.W0)(e)){return null==e?null:(0,l.fT)(e)?x(e,t,r):(0,l.Bi)(e)?F(e,t,r):(0,l.Rg)(e)?T(e,t,r):(0,l.U9)(e)?A(e,t,r):void y().error("convertFromGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function G(e,t,r,i){if(null==e)return null;const o="coords"in e?e:e.geometry;if(null==o)return null;switch(t){case"esriGeometryPoint":return C(o,r,i);case"esriGeometryMultipoint":return I(o,r,i);case"esriGeometryPolyline":return M(o,r,i);case"esriGeometryPolygon":return P(o,r,i);default:return y().error("convertToGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`)),null}}function _(e,t,r,i,o){if(Y(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,n){for(const{geometry:i,attributes:o}of t)e.push({attributes:o,geometry:C(i,r,n)});return e}(e,t,i,o);case"esriGeometryMultipoint":return function(e,t,r,n){for(const{geometry:i,attributes:o}of t)e.push({geometry:i&&I(i,r,n),attributes:o});return e}(e,t,i,o);case"esriGeometryPolyline":return function(e,t,r,n){for(const{geometry:i,attributes:o}of t)e.push({geometry:i&&M(i,r,n),attributes:o});return e}(e,t,i,o);case"esriGeometryPolygon":return function(e,t,r,n){for(const{geometry:i,attributes:o,centroid:s}of t){const t=P(i,r,n),a=C(s,!1,!1);e.push(s?{geometry:t,attributes:o,centroid:a}:{geometry:t,attributes:o})}return e}(e,t,i,o);default:y().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`))}return e}function j(e){const{spatialReference:t,transform:r,fields:n,hasM:i,hasZ:o,features:s,geometryType:a,exceededTransferLimit:l,queryGeometry:u,queryGeometryType:p}=e,c={features:_([],s,a,o,i),fields:n,geometryType:a,spatialReference:t,queryGeometry:G(u,p,o,i)};return r&&(c.transform=r),l&&(c.exceededTransferLimit=l),i&&(c.hasM=i),o&&(c.hasZ=o),c}function k(e,t){const r=new p.A,{hasM:n,hasZ:i,features:o,spatialReference:s,geometryType:a,exceededTransferLimit:l,transform:u,fields:c,globalIdFieldName:d}=e;return c&&(r.fields=c),r.geometryType=a??null,r.spatialReference=s??null,o&&R(r.features,o,a,i,n,t),l&&(r.exceededTransferLimit=l),n&&(r.hasM=n),i&&(r.hasZ=i),u&&(r.transform=u),d&&(r.globalIdFieldName=d),r}function U(e,t){const{geometryType:r,features:n}=t;if(!e)return t;for(let t=0;t<n.length;t++){const i=n[t],o=i.weakClone();o.geometry=D(i.geometry,r,e),o.centroid=D(i.centroid,"esriGeometryPoint",e),n[t]=o}return t.transform=e,t}function D(e,t,r,n,i,o=!1){if(null==e)return null;if(!e?.coords.length)return null;const s=f[t],{coords:a,lengths:l,stride:u,hasZ:p,hasM:d}=e;n??=p,i??=d;const y=new c.A([],[],n,i),b=y.stride,v=S(p,d,n,i);let C=0;const x=[0,0,0,0].slice(b),I=o?m:h,A=o?w:g;function M(){v(a,C,x,0),C+=u,x[0]=I(r,x[0]),x[1]=A(r,x[1])}if(e.isPoint)return M(),y.coords.push(...x),y;let T=0;for(const e of l){if(e<s)continue;let t=1;M(),y.coords.push(...x);let[r,n]=x;for(let i=1;i<e;i++){M();const[e,i]=x;r===e&&n===i||(o||(x[0]-=r,x[1]-=n),y.coords.push(...x),r=e,n=i,t++)}t>=s?(y.lengths.push(t),T=y.coords.length):Y(y.coords,T)}return Y(y.coords,T),y.coords.length?y:null}function $(e,t,r,n=e.hasZ,i=e.hasM){if(!e.coords.length)return null;const o=f[t],{coords:s,lengths:a,stride:l,hasZ:u,hasM:p}=e,d=new c.A([],[],n,i),y=d.stride,h=S(u,p,n,i);if(e.isPoint)return h(s,0,d.coords,0),d;let g=0;const m=r*r;for(const e of a){if(e<o){g+=e*l;continue}const t=d.coords.length/y,r=g,n=g+(e-1)*l;h(s,r,d.coords,d.coords.length),z(d.coords,s,l,m,h,r,n),h(s,n,d.coords,d.coords.length);const i=d.coords.length/y-t;i>=o?d.lengths.push(i):Y(d.coords,t*y),g+=e*l}return d.coords.length?d:null}function q(e,t,r,n){const i=e[t],o=e[t+1],s=e[r],a=e[r+1],l=e[n],u=e[n+1];let p=s,c=a,d=l-p,y=u-c;if(0!==d||0!==y){const e=((i-p)*d+(o-c)*y)/(d*d+y*y);e>1?(p=l,c=u):e>0&&(p+=d*e,c+=y*e)}return d=i-p,y=o-c,d*d+y*y}function z(e,t,r,n,i,o,s){let a,l=n,u=0;for(let e=o+r;e<s;e+=r)a=q(t,e,o,s),a>l&&(u=e,l=a);l>n&&(u-o>r&&z(e,t,r,n,i,o,u),i(t,u,e,e.length),s-u>r&&z(e,t,r,n,i,u,s))}function V(e,t){if(!t?.coords?.length)return null;let r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;const{coords:l,stride:u}=t;for(let e=0;e<l.length;e+=u){const t=l[e],s=l[e+1];r=Math.min(r,t),i=Math.max(i,t),n=Math.min(n,s),o=Math.max(o,s)}return(0,s.is)(e)?(0,s.BI)(e,r,n,i,o):(0,a.fA)(r,n,i,o,e),e}function J(e,t){const{coords:r,lengths:n,stride:i,hasZ:s,hasM:a}=e;if(!r.length)return void(n.length=0);(0,o.Lw)(t);const{originPosition:l,scale:u,translate:p}=t,c=H;c.originPosition=l;const d=c.scale;d[0]=u[0]??1,d[1]=-(u[1]??1),d[2]=u[2]??1,d[3]=u[3]??1;const y=c.translate;if(y[0]=p[0]??0,y[1]=p[1]??0,y[2]=p[2]??0,y[3]=p[3]??0,a&&!s&&(d[2]=d[3],y[2]=y[3]),!n.length){for(let e=0;e<i;++e)r[e]=b(c,r[e],e);return void(n.length=0)}let f=0;for(let e=0;e<n.length;e++){const t=n[e];n[e]=t;for(let e=0;e<i;++e)r[f+e]=b(c,r[f+e],e);let o=r[f],s=r[f+1];f+=i;for(let e=1;e<t;e++,f+=i){o+=r[f]*d[0],s+=r[f+1]*d[1],r[f]=o,r[f+1]=s;for(let e=2;e<i;++e)r[f+e]=b(c,r[f+e],e)}}}function B(e,t,r,n){let i=0,o=e[n*t],s=e[n*(t+1)];for(let a=1;a<r;a++){const r=o+e[n*(t+a)],l=s+e[n*(t+a)+1],u=(r-o)*(l+s);o=r,s=l,i+=u}return.5*i}function W(e,t){const{coords:r,lengths:n}=e;let i=0,o=0;for(let e=0;e<n.length;e++){const s=n[e];o+=B(r,i,s,t),i+=s}return Math.abs(o)}function Y(e,t=0){e.length!==t&&(e.length=t)}const H={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},85113(e,t,r){r.d(t,{BM:()=>A,bd:()=>M,sO:()=>I,xD:()=>c});var n=r(67482),i=r(49186),o=r(21325),s=r(90708),a=r(43334),l=r(92722),u=r(30524);const p={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return p[e]}function*d(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*y(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function f(e){for(const t of e)if(t.length>2)return!0;return!1}function h(e){let t=0;for(let r=0;r<e.length;r++){const n=e[r],i=e[(r+1)%e.length];t+=n[0]*i[1]-i[0]*n[1]}return t<=0}function g(e){const t=e[0],r=e[e.length-1];t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]||e.push(t)}function m(e,t){const{coordinates:r,type:n}=e,i=t.hasZ??!1,o=!0;switch(n){case"Point":return new l.A([],[...r],i,!1);case"LineString":return(0,s.Ap)({paths:[r],hasZ:o},i,!1);case"MultiLineString":return(0,s.Ap)({paths:r,hasZ:o},i,!1);case"MultiPoint":return(0,s.PR)({points:r,hasZ:o},i,!1);case"Polygon":case"MultiPolygon":{const e=new l.A([],[],i,!1);for(const t of"Polygon"===n?[r]:r){w(e,t[0],i);for(let r=1;r<t.length;r++)b(e,t[r],i)}return e}}}function w(e,t,r){g(t),function(e){return!h(e)}(t)?S(e,t,r):v(e,t,r)}function b(e,t,r){g(t),function(e){return h(e)}(t)?S(e,t,r):v(e,t,r)}function v(e,t,r){for(const n of t)C(e,n,r);e.lengths.push(t.length)}function S(e,t,r){for(let n=t.length-1;n>=0;n--)C(e,t[n],r);e.lengths.push(t.length)}function C(e,[t,r,n],i){e.coords.push(t,r),i&&e.coords.push(n||0)}function x(e){switch(typeof e){case"string":return(0,n.C)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function I(e,t=4326){if(!e)throw new i.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new i.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:r}=e;if(!r)return;const n="string"==typeof r?r:"name"===r.type?r.properties.name:"EPSG"===r.type?r.properties.code:null,s=(0,o.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!n||!s.test(n))throw new i.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:r})}function A(e,t={}){const r=[],n=new Set,i=new Set;let o,s=!1,a=null,l=!1,{geometryType:p=null}=t;for(const t of d(e)){const{geometry:e,properties:d,id:h}=t;if((!e||(p||(p=c(e.type)),c(e.type)===p))&&(s||(s=f(y(e))),l||(l=null!=h,l&&(o=typeof h,d&&(a=Object.keys(d).filter(e=>d[e]===h)))),d&&a&&l&&null!=h&&(a.length>1?a=a.filter(e=>d[e]===h):1===a.length&&(a=d[a[0]]===h?a:[])),d))for(const e in d){if(n.has(e))continue;const t=x(d[e]);if("unknown"===t){i.add(e);continue}i.delete(e),n.add(e);const o=(0,u.rS)(e);o&&r.push({name:o,alias:e,type:t})}}const h=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(h)for(const e of r)if(e.name===h&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:p,hasZ:s,objectIdFieldName:h,objectIdFieldType:o,unknownFields:Array.from(i)}}function M(e,t){return Array.from(function*(e,t={}){const{geometryType:r,objectIdField:n}=t;for(const i of e){const{geometry:e,properties:o,id:s}=i;if(e&&c(e.type)!==r)continue;const l=o||{};let u;n&&(u=l[n],null==s||u||(l[n]=u=s)),yield new a.Om(e&&m(e,t),l,null,u)}}(d(e),t))}},64714(e,t,r){r.d(t,{F0:()=>a,Vx:()=>p,e2:()=>d,f:()=>y});var n=r(44208),i=r(4718),o=r(99352),s=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${c(t)} = null;`);for(const t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>t?{[t]:null,...e}:{...e}}}function c(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},69208(e,t,r){var n=r(32198),i=r(91429);r.d(t,["d",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,n.Cg)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},6455(e,t,r){r.d(t,{FJ:()=>m,Dp:()=>w,KV:()=>b});var n=r(32198),i=r(93637),o=r(91429),s=r(89317),a=r(69540),l=r(7762),u=r(25482),p=r(83960),c=r(13069);const d={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let y=class extends((0,a.OU)(u.o)){constructor(e){super(e),this.id=(0,c.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"id",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:d})],y.prototype,"maxScale",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:d})],y.prototype,"minScale",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"title",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"where",void 0),y=(0,n.Cg)([(0,o.$K)("esri.layers.support.DisplayFilter")],y);var f=r(41560),h=r(43937);let g=class extends((0,a.OU)(u.o)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(l.A.ofType(y)),this.mode="manual"}writeFilters(e,t,r,n){const i=e.toArray();"scale"===this.mode&&i.sort((e,t)=>{const r=(0,p.oW)(t.minScale,e.minScale),n=e.maxScale-t.maxScale;return 0===r?n:r}),t[r]=i.map(e=>e.toJSON(n))}write(e,t){return super.write(e,(0,f.mW)(this,t))}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],g.prototype,"activeFilterId",void 0),(0,n.Cg)([(0,o.MZ)({type:l.A.ofType(y),nonNullable:!0,json:{write:!0}})],g.prototype,"filters",void 0),(0,n.Cg)([(0,h.K)("filters")],g.prototype,"writeFilters",null),(0,n.Cg)([(0,o.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],g.prototype,"mode",void 0),g=(0,n.Cg)([(0,o.$K)("esri.layers.support.DisplayFilterInfo")],g);const m=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,n.Cg)([(0,o.MZ)(w)],r.prototype,"displayFilterEnabled",void 0),(0,n.Cg)([(0,o.MZ)(b)],r.prototype,"displayFilterInfo",void 0),r=(0,n.Cg)([(0,o.$K)("esri.layers.mixins.DisplayFilteredLayer")],r),r},w={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:s.K,writer(e,t,r){(0,i.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},b={type:g,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:s.K},origins:{"web-scene":{write:!1,read:!1}}}}},32756(e,t,r){r.d(t,{Rr:()=>a});var n=r(32198),i=r(93637),o=r(91429),s=r(91880);function a(e,t,r){if(!e)return null;const n=e.find(e=>!!e.field);if(!n)return null;const i=new s.A;return i.read(n,r),[i]}const l={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,n){const o=e.find(e=>!!e.field);o&&(0,i.sM)(r,[o.toJSON()],t)}}}};r.d(t,["fY",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,n.Cg)([(0,o.MZ)(l)],r.prototype,"orderBy",void 0),r=(0,n.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,l])},8303(e,t,r){var n=r(32198),i=r(92602),o=r(70333),s=r(56507),a=r(60999),l=r(49186),u=r(36563),p=r(53966),c=r(97768),d=r(17676),y=r(84952),f=r(91429),h=r(77548),g=r(20655),m=r(80812),w=r(41318),b=r(10407),v=r(36005),S=r(43937);const C={credential:null,user:null};r.d(t,["A",0,e=>{const t=e;let x=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(()=>r(41204));return(0,d.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;const n=t?.signal?null:new AbortController;try{const{reload:i}=await r.e(1204).then(()=>r(41204));return n&&this.addHandles((0,u.rE)(n),"reloadFromPortal"),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:n.signal})}catch(e){throw(0,d.zf)(e)||p.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{n&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!o.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let s,a;if(i)s=r.portal.url;else try{s=await(0,h.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!s||!(0,y.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const l=!0,u=!1,p=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new m.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,d.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,b.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=g.A.getDefault();if(i&&i.loaded&&(0,y.S8)(i.restUrl)===(0,y.S8)(n))return i.user;const l=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&n&&!(0,y.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n.Cg)([(0,f.MZ)({type:m.default})],x.prototype,"portalItem",null),(0,n.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],x.prototype,"readPortalItem",null),(0,n.Cg)([(0,S.K)("web-document","portalItem",{itemId:{type:String}})],x.prototype,"writePortalItem",null),(0,n.Cg)([(0,f.MZ)({clonable:!1})],x.prototype,"resourceReferences",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasEditingPrivileges",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasFullEditingPrivileges",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasUpdateItemPrivileges",void 0),x=(0,n.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],x),x}])},82935(e,t,r){var n=r(32198),i=r(91429),o=r(30524),s=r(96184),a=r(73133),l=r(79677),u=r(10184),p=r(36005);const c={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"}}};r.d(t,["B",0,c,"e",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,i=a.j.fromJSON(r.timeOffsetUnits);return n&&i?new u.A({value:n,unit:i}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n.Cg)([(0,i.MZ)({type:l.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,n.Cg)([(0,i.MZ)({type:u.A})],r.prototype,"timeOffset",void 0),(0,n.Cg)([(0,p.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,n.Cg)([(0,i.MZ)({value:null,type:s.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,n.Cg)([(0,i.MZ)(c)],r.prototype,"useViewTime",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},34322(e,t,r){r.d(t,{E:()=>Z,Fu:()=>C,O8:()=>P,UH:()=>k,YW:()=>F,mG:()=>T,x$:()=>R});var n=r(56507),i=r(49186),o=r(5479),s=r(84952),a=r(5443),l=r(99917),u=r(16930),p=r(21325),c=r(50498),d=r(85113),y=r(13043),f=r(60694),h=r(20437),g=r(30524);const m="xlink:href",w="2.0.0",b="__esri_wfs_id__",v="wfs-layer:feature-type-not-found",S="wfs-layer:unknown-geometry-type";async function C(e,t){const r=function(e){const t=G(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==w)throw new i.A("wfs-layer:unsupported-wfs-version",`Unsupported WFS version ${t}. Supported version: ${w}`)})(t),j(t);const r=t.firstElementChild,n=(0,o.PP)(function(e){return(0,y.i)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},r=new Set;return(0,y.p)(e,{Name:e=>{const{name:r,prefix:n}=_(e.textContent);t.typeName=`${n}:${r}`,t.name=r,t.namespacePrefix=n,t.namespaceUri=e.lookupNamespaceURI(n)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=a.A.fromJSON(function(e){let t,r,n,i;for(const o of e.children)switch(o.localName){case"LowerCorner":[t,r]=o.textContent.split(" ").map(e=>Number.parseFloat(e));break;case"UpperCorner":[n,i]=o.textContent.split(" ").map(e=>Number.parseFloat(e))}return{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:p.KK}}(e))},DefaultCRS:e=>{const n=M(e);n&&(t.defaultSpatialReference=n,r.add(n))},OtherCRS:e=>{const t=M(e);t&&r.add(t)}}),t.title||(t.title=t.name),r.add(4326),t.supportedSpatialReferences.push(...r),t}}})}(r));return{operations:A(r),get featureTypes(){return Array.from(n())},readFeatureTypes:n}}((await(0,n.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:w,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,s.m3)(e)&&((0,s.FX)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,s.lM)(t.operations.DescribeFeatureType.url)),(0,s.FX)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,s.lM)(t.operations.GetFeature.url)))}(e,r),r}const x=["json","application/json; subtype=geojson; charset=utf-8","application/json; subtype=geojson","application/json","geojson","application/geo+json"];function I(e){for(const t of x){const r=e.findIndex(e=>e.toLowerCase()===t);if(r>=0)return e[r]}return null}function A(e){let t=!0;const r={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},n=[],o=[];if((0,y.p)(e,{OperationsMetadata:{Parameter:e=>{if("outputformat"===e.getAttribute("name")?.toLowerCase())return{AllowedValues:{Value:({textContent:e})=>{e&&n.push(e)}}}},Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{r.GetCapabilities.url=e.getAttribute(m)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{r.DescribeFeatureType.url=e.getAttribute(m)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{r.GetFeature.url=e.getAttribute(m)}}},Parameter:e=>{if("outputformat"===e.getAttribute("name")?.toLowerCase())return{AllowedValues:{Value:({textContent:e})=>{e&&o.push(e)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{r.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),r.GetFeature.outputFormat=I(o)??I(n),!t)throw new i.A("wfs-layer:kvp-encoding-not-supported","WFS service doesn't support key/value pair (KVP) encoding");if(null==r.GetFeature.outputFormat)throw new i.A("wfs-layer:geojson-not-supported","WFS service doesn't support GeoJSON output format");return r}function M(e){const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function T(e,t,r){return(0,o.I6)(e,e=>r?e.name===t&&e.namespaceUri===r:e.typeName===t||e.name===t)}async function P(e,t,r,n={}){const{featureType:o,extent:s}=await async function(e,t,r,n={}){const o=e.readFeatureTypes(),s=t?T(o,t,r):o.next().value,{spatialReference:a=new u.A({wkid:s?.defaultSpatialReference})}=n;if(null==s)throw t?new i.A(v,`The type '${t}' could not be found in the service`):new i.A("wfs-layer:empty-service","The service is empty");let c=s.extent;if(c&&!(0,p.aI)(c.spatialReference,a))try{await(0,l.initializeProjection)(c.spatialReference,a,void 0,n),c=(0,l.project)(c,a)}catch{throw new i.A("wfs-layer:unsupported-spatial-reference","Projection not supported")}return{extent:c,spatialReference:a,featureType:s}}(e,t,r,n),{spatialReference:a}=k(e.operations.GetFeature.url,o,n.spatialReference),{fields:c,geometryType:d,swapXY:y,objectIdField:f,geometryField:h}=await async function(e,t,r,n={}){const{typeName:o}=t,[s,a]=await Promise.allSettled([N(e.operations.DescribeFeatureType.url,o,n),E(e,o,r,n)]),l=e=>new i.A("wfs-layer:getWFSLayerTypeInfo-error",`An error occurred while getting info about the feature type '${o}'`,{error:e});if("rejected"===s.status)throw l(s.reason);if("rejected"===a.status)throw l(a.reason);const{fields:u,errors:p}=s.value??{},c=s.value?.geometryType||a.value?.geometryType,d=a.value?.swapXY??!1;if(null==c)throw new i.A(S,`The geometry type could not be determined for type '${o}`,{typeName:o,geometryType:c,fields:u,errors:p});return{...F(u??[]),geometryType:c,swapXY:d}}(e,o,a,n);return{url:e.operations.GetCapabilities.url,name:o.name,namespaceUri:o.namespaceUri,fields:c,geometryField:h,geometryType:d,objectIdField:f,spatialReference:n.spatialReference??new u.A({wkid:o.defaultSpatialReference}),extent:s,swapXY:y,wfsCapabilities:e,customParameters:n.customParameters}}function F(e){const t=e.find(e=>"geometry"===e.type);let r=e.find(e=>"oid"===e.type);return e=e.filter(e=>"geometry"!==e.type),r||(r=new h.A({name:b,type:"oid",alias:b}),e.unshift(r)),{geometryField:t?.name??null,objectIdField:r.name,fields:e}}async function E(e,t,r,i={}){let o,s=!1;const[a,l]=await Promise.all([R(e.operations.GetFeature.url,t,r,e.operations.GetFeature.outputFormat,{...i,count:1}),(0,n.A)(e.operations.GetFeature.url,{responseType:"text",query:L(t,r,void 0,{...i,count:1}),signal:i?.signal})]),u="FeatureCollection"===a.type&&a.features[0]?.geometry;if(u){let e;switch(o=c.gy.fromJSON((0,d.xD)(u.type)),u.type){case"Point":e=u.coordinates;break;case"LineString":case"MultiPoint":e=u.coordinates[0];break;case"MultiLineString":case"Polygon":e=u.coordinates[0][0];break;case"MultiPolygon":e=u.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(l.data);if(t){const r=e[0].toFixed(3),n=e[1].toFixed(3),i=parseFloat(t[1]).toFixed(3);r===parseFloat(t[2]).toFixed(3)&&n===i&&(s=!0)}}return{geometryType:o,swapXY:s}}async function N(e,t,r){return function(e,t){const{name:r}=_(e),n=G(t);j(n);const s=(0,o.I6)((0,y.i)(n.firstElementChild,{element:e=>e}),e=>e.getAttribute("name")===r);if(null!=s){const e=s.getAttribute("type"),t=e?(0,o.I6)((0,y.i)(n.firstElementChild,{complexType:e=>e}),t=>t.getAttribute("name")===_(e).name):(0,o.I6)((0,y.i)(s,{complexType:e=>e}),()=>!0);if(t)return function(e){const t=[],r=[];let n;const o=(0,y.i)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const s of o){const o=s.getAttribute("name");if(!o)continue;let a,l;if(s.hasAttribute("type")?a=_(s.getAttribute("type")).name:(0,y.p)(s,{simpleType:{restriction:e=>(a=_(e.getAttribute("base")).name,{maxLength:e=>{l=+e.getAttribute("value")}})}}),!a)continue;const u="true"===s.getAttribute("nillable");let p=!1;switch(a.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":r.push(new h.A({name:o,alias:o,type:"integer",nullable:u,length:(0,g._b)("integer")}));break;case"float":case"double":case"decimal":r.push(new h.A({name:o,alias:o,type:"double",nullable:u,length:(0,g._b)("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":r.push(new h.A({name:o,alias:o,type:"string",nullable:u,length:l??(0,g._b)("string")}));break;case"datetime":case"date":r.push(new h.A({name:o,alias:o,type:"date",nullable:u,length:l??(0,g._b)("date")}));break;case"pointpropertytype":n="point",p=!0;break;case"multipointpropertytype":n="multipoint",p=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":n="polyline",p=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":n="polygon",p=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":p=!0,t.push(new i.A(S,`geometry type '${a}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new i.A("wfs-layer:unknown-field-type",`Unknown field type '${a}'`,{type:(new XMLSerializer).serializeToString(e)}))}p&&r.push(new h.A({name:o,alias:o,type:"geometry",nullable:u}))}for(const e of r)if("integer"===e.type&&!e.nullable&&O.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:n,fields:r,errors:t}}(t)}throw new i.A(v,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(n)})}(t,(await(0,n.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:w,TYPENAME:t,TYPENAMES:t,...r?.customParameters},signal:r?.signal})).data)}const O=new Set(["objectid","fid"]);async function R(e,t,r,o,s){let{data:a}=await(0,n.A)(e,{responseType:"text",query:L(t,r,o,s),signal:s?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(a)}catch(e){throw new i.A("wfs-layer:malformed-json","Error while parsing the response",{response:a,error:e})}}function L(e,t,r,n){const i="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:e,OUTPUTFORMAT:r,SRSNAME:"EPSG:"+i,STARTINDEX:n?.startIndex,COUNT:n?.count,...n?.customParameters}}async function Z(e,t,r){const i=await(0,n.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:t,RESULTTYPE:"hits",...r?.customParameters},signal:r?.signal}),o=/numberMatched=["'](?<numberMatched>\d+)["']/gi.exec(i.data);if(o?.groups)return+o.groups.numberMatched}function G(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function _(e){const[t,r]=e.split(":");return{prefix:r?t:"",name:r??t}}function j(e){let t="",r="";if((0,y.p)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{r=e.textContent}})}),t)throw new i.A(`wfs-layer:${t}`,r)}function k(e,t,r){const n={wkid:t.defaultSpatialReference},i=null!=r?.wkid?{wkid:r.wkid}:n;return{spatialReference:i,getFeatureSpatialReference:(0,f.Fi)(e)||i.wkid&&t.supportedSpatialReferences.includes(i.wkid)?{wkid:i.wkid}:{wkid:t.defaultSpatialReference}}}r.d(t,["i5",0,b])},13043(e,t,r){function n(e,t){if(e&&t)for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&n(r,t)}else n(r,e)}}function*i(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*i(r,e)}}r.d(t,{i:()=>i,p:()=>n})},46499(e,t,r){r.d(t,{A:()=>I});var n,i,o=r(32198),s=(r(44208),r(66552)),a=r(25482),l=r(4718),u=r(90629),p=r(91429),c=r(90360),d=r(73913),y=r(32730),f=r(77548),h=r(59868),g=r(73838),m=r(33910),w=r(36005),b=r(43937);const v=new s.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function S(e,t,r){return{enabled:!(0,f.TU)(r?.layer)}}function C(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function x(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let I=class extends a.o{static{n=y.vK}static{i=this}static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),i=n[3],o=r(t[n[4]],n[5],n[6]);switch(i){case"AND":return e&&o;case"OR":return e||o}}return!1}catch(e){}}constructor(e){super(e),this[n]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=h.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,y.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&C(n))e=new d.A({expression:this.getLabelExpressionArcade()});else if(!e)return;const i=e.toJSON(n);i.expression&&(t[r]=i)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,y.XJ)(this)}getLabelExpressionArcade(){return(0,y.BI)(this)}getLabelExpressionSingleField(){return(0,y.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new i({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],I.prototype,"name",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:S}}}}})],I.prototype,"allowOverrun",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:S}}}}})],I.prototype,"deconflictionStrategy",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&x(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],I.prototype,"labelExpression",void 0),(0,o.Cg)([(0,w.w)("labelExpression")],I.prototype,"readLabelExpression",null),(0,o.Cg)([(0,b.K)("labelExpression")],I.prototype,"writeLabelExpression",null),(0,o.Cg)([(0,p.MZ)({type:d.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return C(e)||x(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],I.prototype,"labelExpressionInfo",void 0),(0,o.Cg)([(0,b.K)("labelExpressionInfo")],I.prototype,"writeLabelExpressionInfo",null),(0,o.Cg)([(0,p.MZ)({type:v.apiValues,json:{type:v.jsonValues,read:v.read,write:v.write}})],I.prototype,"labelPlacement",void 0),(0,o.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],I.prototype,"offsetDistance",void 0),(0,o.Cg)([(0,p.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"labelPosition",void 0),(0,o.Cg)([(0,p.MZ)({type:Number})],I.prototype,"maxScale",void 0),(0,o.Cg)([(0,b.K)("maxScale")],I.prototype,"writeMaxScale",null),(0,o.Cg)([(0,p.MZ)({type:Number})],I.prototype,"minScale",void 0),(0,o.Cg)([(0,b.K)("minScale")],I.prototype,"writeMinScale",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],I.prototype,"repeatLabel",void 0),(0,o.Cg)([(0,p.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],I.prototype,"repeatLabelDistance",null),(0,o.Cg)([(0,p.MZ)({types:m.em,json:{types:m.em,origins:{"portal-item":{types:m.em,read:{reader:(0,c.C)({types:m.em})},default:null},"web-scene":{types:m.Rv,read:{reader:(0,c.C)({types:m.Rv})},write:g.oO,default:null}},write:g.oO,default:null}})],I.prototype,"symbol",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],I.prototype,"useCodedValues",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],I.prototype,"where",void 0),I=i=(0,o.Cg)([(0,p.$K)("esri.layers.support.LabelClass")],I)},73913(e,t,r){r.d(t,{A:()=>p});var n,i=r(32198),o=r(25482),s=r(91429),a=r(32730),l=r(36005),u=r(43937);let p=class extends o.o{static{n=this}constructor(e){super(e),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,a.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,a.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new n({expression:this.expression,title:this.title,value:this.value})}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],p.prototype,"expression",void 0),(0,i.Cg)([(0,l.w)("expression",["expression","value"])],p.prototype,"readExpression",null),(0,i.Cg)([(0,u.K)("expression")],p.prototype,"writeExpression",null),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],p.prototype,"title",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],p.prototype,"value",void 0),p=n=(0,i.Cg)([(0,s.$K)("esri.layers.support.LabelExpressionInfo")],p)},91880(e,t,r){r.d(t,{A:()=>u});var n,i=r(32198),o=r(66552),s=r(25482),a=r(91429);const l=new o.J({asc:"ascending",desc:"descending"});let u=class extends s.o{static{n=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,i.Cg)([(0,a.MZ)({type:l.apiValues,json:{type:l.jsonValues,read:l.read,write:l.write}})],u.prototype,"order",void 0),u=n=(0,i.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],u)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>o});var n=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:n}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],c(n));return t}(e);if(o&&((0,n.gg)(t,o[0])||(0,n.ZH)(r,o[1])))return"";const s=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=p(e.at(0)?.minScale),o=c(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(p(i.minScale),c(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const n of e.filters)l(n.minScale,n.maxScale,t,r)&&(yield n)}}function l(e,t,r,i){return e=p(e),r=p(r),t=c(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||Number.POSITIVE_INFINITY}function c(e){return e||0}},17036(e,t,r){r.d(t,{p:()=>l});var n=r(44208),i=r(53966),o=r(20437),s=r(95466),a=r(30524);function l(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,n.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");i.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},32730(e,t,r){r.d(t,{BI:()=>y,D3:()=>c,XJ:()=>d,lc:()=>p,mX:()=>h,rU:()=>f,tH:()=>v,zA:()=>C});var n=r(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i");function p(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function c(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function d(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=p(e.labelExpression),t.type="conventional"),t}function y(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return h(t.expression);case"arcade":return t.expression}return null}function f(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(g);return t?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function h(e){let t;return e?(t=(0,n.HC)(e,e=>i+'$feature["'+e+'"]'+o),t=l.test(t)?t.replace(l,""):'"'+t,t=u.test(t)?t.replace(u,""):t+'"',t=t.replaceAll(s,'" + ').replaceAll(a,' + "')):t='""',t}const g=/^\s*\{([^}]+)\}\s*$/i,m=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,b=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=m.exec(e)||w.exec(e);return t?t[1]||t[3]:(t=b.exec(e),t?t[2]:null)}const S=Symbol("LabelClassInstance");function C(e){return null!=e&&"object"==typeof e&&S in e}r.d(t,["vK",0,S])},39383(e,t,r){r.d(t,{w:()=>l,z:()=>c});var n=r(49186),i=r(53966),o=r(46499);const s=()=>i.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function l(e,t,r){return e?e.map(e=>{const n=new o.A;if(n.read(e,r),n.labelExpression){const e=t.fields||t.layerDefinition?.fields||this.fields;n.labelExpression=n.labelExpression.replaceAll(a,(t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const n=t[e].name;if(n.toLowerCase()===r)return n}return e}(r,e)}]`)}return n}):null}const u=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],p={esriGeometryPoint:u,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:u,esriGeometryEnvelope:null};function c(e,t){const r=[];for(const i of e){const e=i.labelPlacement,o=p[t];if(!i.symbol)return s().warn("No ILabelClass symbol specified."),[];if(!o)return s().error(new n.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(o.includes(e))r.push(i);else{const n=o[0];e&&s().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${n}`);const a=i.clone();a.labelPlacement=n,r.push(a)}}return r}},10407(e,t,r){r.d(t,{It:()=>y,LG:()=>s,OM:()=>u,Sm:()=>p,Y:()=>a,bK:()=>l,sQ:()=>c});var n=r(99917),i=r(16930),o=r(28735);function s(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?s(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,o.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.project)(e,r)}(r)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function y(e){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let o=!i||i.includes("features:user:edit"),s=!!r&&!!i?.includes("features:user:fullEdit");const a="update"===n||"admin"===n;return a?s=o=!0:s&&(o=!0),{features:{edit:o,fullEdit:s},content:{updateItem:a}}}r.d(t,["mm",0,d])},37745(e,t,r){r.r(t),r.d(t,{default:()=>d});var n,i=r(32198),o=r(52106),s=r(4718),a=r(91429);let l=class extends o.A{static{n=this}constructor(e){super(e),this.stackedAttributes=null}cloneShallow(){return new n(Object.assign({stackedAttributes:this.stackedAttributes},super.cloneShallow()))}toJSON(){return{...super.toJSON(),stackedAttributes:(0,s.o8)(this.stackedAttributes)}}};(0,i.Cg)([(0,a.MZ)()],l.prototype,"stackedAttributes",void 0),l=n=(0,i.Cg)([(0,a.$K)("esri.AttributeBinsGraphic")],l);var u=r(69540),p=r(22671),c=r(36005);let d=class extends((0,u.OU)(p.A)){constructor(e){super(e),this.features=[]}readFeatures(e,t){return this.readFeaturesWithClass(e,t,l)}};(0,i.Cg)([(0,a.MZ)({type:[l],json:{write:!0}})],d.prototype,"features",void 0),(0,i.Cg)([(0,c.w)("features")],d.prototype,"readFeatures",null),d=(0,i.Cg)([(0,a.$K)("esri.rest.support.AttributeBinsFeatureSet")],d)},22671(e,t,r){r.d(t,{A:()=>w});var n,i=r(32198),o=r(52106),s=r(66552),a=r(25482),l=r(4718),u=r(91429),p=r(16930),c=r(60408),d=r(65864),y=r(50498),f=r(20437),h=r(36005),g=r(43937);const m=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends a.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,n){if(e)return void m.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,d.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=p.A.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((i-e)/r));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,i],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*o+n,e=>i-e*s,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=p.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],s=r.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=n);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}i.push(s)}return i}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(a[0]),i=r(a[1]),o.push([n,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,c.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,c.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,c.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,i.Cg)([(0,h.w)("features")],w.prototype,"readFeatures",null),(0,i.Cg)([(0,u.MZ)({type:[f.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],w.prototype,"geometryType",void 0),(0,i.Cg)([(0,g.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i.Cg)([(0,h.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i.Cg)([(0,g.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,i.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){var n=r(32198),i=r(66552),o=r(53966),s=r(91429),a=r(93223);const l=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field";r.d(t,["K",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&u||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,n.Cg)([(0,a.e)(l,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,n.Cg)([(0,s.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,l])},93470(e,t,r){const n=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n};r.d(t,["Cb",0,i,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,n,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,o])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4708],{69052(e,t,n){n.d(t,{hr:()=>r});var s=n(34727);class r{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return o(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+i(this.range,e-t,n)}minimalMonotonic(e,t,n){return o(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(s)?n:s}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function o(e,t,n,s,r=0,o=!1){return(s-=r)<t?s+=i(e,t-s):s>n&&(s-=i(e,s-n)),o&&s===n&&(s=t),s+r}function i(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const a=new r(0,2*Math.PI),c=(new r(-Math.PI,Math.PI),new r(0,360));n.d(t,["ie",0,c,"uC",0,a])},18370(e,t,n){n.d(t,{z:()=>r});class s{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async e=>(this.module=e,e))),this._promise}}function r(e){return new s(e)}},52039(e,t,n){n.d(t,{O7:()=>f,el:()=>l});var s=n(69052),r=(n(49186),n(18370)),o=n(17676),i=(n(5443),n(39829)),a=(n(82799),n(16930)),c=(n(80754),n(21325));async function l(e,t,n){Array.isArray(e)||(e=[e]),null!=t&&"object"==typeof t&&"authMode"in t&&(n=t);let s=null;for(const t of e)s??=t?.spatialReference;if(!s)return e;const r=(0,c.Vp)(s);if(!r)return e;if(1===e.length&&"extent"===e[0]?.type){const t=e[0].clone().normalizeAsSingleGeometry(r);return["xmin"in t?t:new i.A(t)]}const[a,l]=r.valid;let f=!1;for(const t of e){if(!t)continue;if("point"===t.type){f||=t.x>=l,f||=t.x<=a;continue}const{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=l,f||=e.xmin<=a,f||=e.xmax>=l,f||=e.xmax<=a}if(!f)return e;const[{foldInto360Range:d},g]=await(0,o.qr)(Promise.all([u.getImportPromise(),h.getImportPromise()]),n),m=g.fromSpatialReference(s);return e.map(e=>{if(null==e||"mesh"===e.type)return e;const t=g.fromGeometry(e),n=g.toGeometry(d(t,m),s);return"extent"===e.type&&1===n?.rings.length?n.extent:n})}const u=(0,r.z)(()=>n.e(4144).then(()=>n(4144)).then(e=>e.load().then(()=>e))),h=(0,r.z)(()=>Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(3299),n.e(1550)]).then(()=>n(78125)));function f(e,t,n){const s=(0,c.Vp)(n);if(null==s)return e;const[r,o]=s.valid,i=2*o;let a=0,l=0;t>o?a=Math.ceil(Math.abs(t-o)/i):t<r&&(a=-Math.ceil(Math.abs(t-r)/i)),e>o?l=Math.ceil(Math.abs(e-o)/i):e<r&&(l=-Math.ceil(Math.abs(e-r)/i));let u=e+(a-l)*i;const h=u-t;return h>o?u-=i:h<r&&(u+=i),u}function d(e){const t=(0,c.Vp)(e);if(null==t)return null;const[n,r]=t.valid;return new s.hr(n,r)}const g=d(a.A.WGS84);d(a.A.WebMercator),n.d(t,["Y_",0,g])},80754(e,t,n){n.d(t,{kS:()=>l,kd:()=>c});var s=n(82799),r=n(16930),o=n(60408),i=n(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){if((0,i.Ed)(e))for(const n of function(e){return(0,o.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of n){if((0,i.aO)(e)){const[n,s]=e.c;n[0]+=t,s[0]+=t;continue}if((0,i.FG)(e)){const[n,s]=e.a;n[0]+=t,s[0]+=t;continue}if((0,i.n1)(e)){const[n,s,r]=e.b;n[0]+=t,s[0]+=t,r[0]+=t;continue}e[0]+=t}for(const n of function(e){return(0,o.Bi)(e)?e.rings:e.paths}(e))for(const e of n)e[0]+=t;return e}n.d(t,["j7",0,a])},31464(e,t,n){n.d(t,{Cv:()=>d,Nk:()=>f,lK:()=>m});var s=n(4576),r=n(99917),o=n(60408),i=n(21325),a=n(28735);const c=[0,0];function l(e,t){const n=(0,i.K8)(e)?a.je:a.tD;if((0,o.fT)(t)){const e={x:0,y:0};return[e.x,e.y]=n(t.x,t.y,c),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,o.ZC)(t)){const e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=n(t.xmin,t.ymin,c),[e.xmax,e.ymax]=n(t.xmax,t.ymax,c),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if((0,o.Bi)(t))return{rings:u(t.rings,n),hasM:t.hasM,hasZ:t.hasZ};if((0,o.Rg)(t))return{paths:u(t.paths,n),hasM:t.hasM,hasZ:t.hasZ};if((0,o.U9)(t))return{points:h(t.points,n),hasM:t.hasM,hasZ:t.hasZ};throw new Error}function u(e,t){const n=[];for(const s of e)n.push(h(s,t));return n}function h(e,t){const n=[];for(const s of e){const e=t(s[0],s[1],[0,0]);n.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return n}async function f(e,t){if(!e||!t)return;const n=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(s.Ru):[e];await(0,r.initializeProjection)(n.map(e=>({source:e,dest:t})))}function d(e,t,n,s){if(!e)return null;if(n||(n=t,t=e.spatialReference),!(0,i.fn)(t)||!(0,i.fn)(n)||(0,i.aI)(t,n))return e;if((0,a.y7)(t,n)){const t=l(n,e);return t.spatialReference=n,t}return(0,r.projectMany)([e],t,n,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,n,s){if(!e?.length||!t||!n||(0,i.aI)(t,n))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:n,options:s,resolve:Promise.withResolvers()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:n,outSpatialReference:s,resolve:o,options:i}=e,c=t.filter(e=>null!=e);let u;u=(0,a.y7)(n,s)&&null==i?.extendedParams?c.map(e=>l(s,e)):(0,r.projectMany)(c,n,s,i);let h=0;const f=t.map(e=>null==e?null:u[h++]);o.resolve(f),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(e,t,n,s){return g.push(e,t,n,s)}},60986(e,t,n){n.r(t),n.d(t,{createConnection:()=>C});var s=n(56507),r=n(49186),o=n(31464),i=n(9916),a=n(32198),c=n(65529),l=n(91429);let u=class extends c.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new r.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,a.Cg)([(0,l.MZ)({readOnly:!0})],u.prototype,"connectionError",null),u=(0,a.Cg)([(0,l.$K)("esri.layers.support.StreamConnection")],u);class h extends u{constructor(e,t){super(),this._config=e,this._outSpatialReference=t,this.connectionStatus="connected",this.errorString=null,this._isPolling=!1,this._lastIngestedAt=null,this._pollTimer=null,this._pollRecentData=async()=>{if(!this.destroyed&&!this._isPolling){this._isPolling=!0;try{const e=await this._queryChanges(this._lastIngestedAt);if(this.destroyed)return;this._handleResult(e)}catch(e){this.errorString=e instanceof Error?e.message:"Failed to fetch"}finally{this._isPolling=!1}}},this._initialize()}destroy(){super.destroy(),this._pollTimer&&(clearInterval(this._pollTimer),this._pollTimer=null)}sendMessageToSocket(e){throw new r.A("kusto:unsupported","sendMessageToSocket not supported for Kusto connections")}sendMessageToClient(e){throw new r.A("kusto:unsupported","sendMessageToClient not supported for Kusto connections")}updateCustomParameters(e){throw new r.A("kusto:unsupported","updateCustomParameters not supported for Kusto connections")}async _initialize(){await(0,o.Nk)(this._config.sourceSpatialReference,this._outSpatialReference);try{const e=await this._queryInitial();this._handleResult(e),this._pollTimer=setInterval(this._pollRecentData,6e4*this._config.refreshInterval)}catch{throw new r.A("kusto:connection","Failed to query KQL database")}}async _queryInitial(){const{trackIdField:e}=this._config,t=f(await this._executeQuery(`${(0,i.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | summarize arg_max(IngestedAt, *) by ${(0,i.xw)(e)}`));if(!t)throw new r.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(t),table:t}}async _queryChanges(e=null){const t=e??"1970-01-01T00:00:00Z",n=f(await this._executeQuery(`${(0,i.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | where IngestedAt > todatetime('${(0,i.iD)(t)}') | order by IngestedAt asc`));if(!n)throw new r.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(n),table:n}}async _executeQuery(e){const t=this._config.database,n=t.properties.queryServiceUri,{data:r}=await(0,s.A)(`${n}/v2/rest/query`,{responseType:"json",method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({db:t.displayName,csl:e})});return r}_handleResult(e){this._lastIngestedAt=e.ingestedAt;const t=this._createFeatures(e.table);if(null!=t){this.onMessage(t);for(const e of t)this.onFeature(e)}}_createFeatures(e){if(null==e||0===e.Rows.length)return null;const{xField:t,yField:n}=this._config.geometryEncoding,s=e.Columns.findIndex(e=>e.ColumnName===t),r=e.Columns.findIndex(e=>e.ColumnName===n);return e.Rows.map(t=>this._createFeature(e.Columns,s,r,t))}_createFeature(e,t,n,s){const{xField:r,yField:i}=this._config.geometryEncoding,a={};for(let t=0;t<e.length;t++){const n=e[t],o=s[t]??null;n.ColumnName!==i&&n.ColumnName!==r&&(a[n.ColumnName]=o)}let c=null;const l=s[t],u=s[n];return null!=u&&null!=l&&(c=(0,o.Cv)({x:l,y:u},this._config.sourceSpatialReference,this._outSpatialReference)),{attributes:a,geometry:c}}}function f(e){return e.find(e=>"DataTable"===e.FrameType&&"PrimaryResult"===e.TableKind)??null}function d(e){const t=e.Columns.findIndex(e=>"IngestedAt"===e.ColumnName);if(t<0)return null;let n=null;for(const s of e.Rows){const e=s[t];"string"==typeof e&&(null==n||e>n)&&(n=e)}return n}var g=n(53966),m=n(84952),p=n(16930),y=n(65864),_=n(17676),w=n(62815);function b(e,t){if(null==e&&null==t)return null;const n={};return null!=t&&(n.geometry=t),null!=e&&(n.where=e),n}let S=class extends u{constructor(e,t){super({}),this._outSpatialReference=t,this._outstandingMessages=[],this.errorString=null;const{geometryType:n,sourceSpatialReference:s}=e;this._config=e,this._featureZScaler=(0,w.N)(n,s,this._outSpatialReference),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.url.path,t=1e3,n=0){try{if(this.destroyed)return;const t=(0,m.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(s){const o=t/1e3;return this._config.maxReconnectionAttempts&&n>=this._config.maxReconnectionAttempts?(g.A.getLogger(this).error(new r.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(g.A.getLogger(this).error(new r.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${o}s`,s)),await(0,_.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),n+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void g.A.getLogger(this).error(new r.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,n)=>{const s=new WebSocket(e);s.onopen=()=>{if(s.onopen=null,this.destroyed)return s.onclose=null,void s.close();s.onclose=e=>this._onClose(e),s.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(s),t(s)},s.onclose=e=>{s.onopen=s.onclose=null,n(e)}})}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const n=Promise.withResolvers(),s=t.onmessage,o=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:i}=this._config,a=setTimeout(()=>n.reject(),e),c=()=>{clearTimeout(a),n.reject()};return t.onmessage=e=>{let l=null;try{l=JSON.parse(e.data)}catch(e){}l&&"object"==typeof l||(g.A.getLogger(this).error(new r.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),c(),this.destroy()),l.spatialReference?.wkid!==this._outSpatialReference?.wkid&&(g.A.getLogger(this).error(new r.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${this._outSpatialReference.wkid}`,e.data)),c(),this.destroy()),"json"!==l.format&&(g.A.getLogger(this).error(new r.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),c(),this.destroy()),o&&l.filter!==o&&g.A.getLogger(this).error(new r.A("websocket-connection","Tried to set filter, but server doesn't support it")),i&&l.outFields!==i&&g.A.getLogger(this).error(new r.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=s;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],clearTimeout(a),n.resolve()},t.send(JSON.stringify({filter:o,outFields:i,format:"json",spatialReference:{wkid:this._outSpatialReference.wkid}})),n.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),g.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&g.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,a.Cg)([(0,l.MZ)()],S.prototype,"connectionStatus",null),(0,a.Cg)([(0,l.MZ)()],S.prototype,"errorString",void 0),S=(0,a.Cg)([(0,l.$K)("esri.layers.graphics.sources.connections.WebSocketConnection")],S);var k=n(80893),A=n(97552);const x={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends S{constructor(e,t){super({...x,...e},t),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.url);e.timeInfo.trackIdField||g.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._outSpatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const n=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:s}=this._config;this.destroyed||this._setFilter(n,s)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void g.A.getLogger(this).error(new r.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},n=(0,s.A)(e.path,{query:t,responseType:"json"}),r=(await n).data;return this._serviceDefinition=r,r}_fetchWebSocketUrl(e,t){const n=e[0],{urls:s,token:r}=n,o=this._inferWebSocketBaseUrl(s);return(0,m.a6)(`${o}/subscribe`,{outSR:""+t.wkid,token:r})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return g.A.getLogger(this).error(new r.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const n=this._websocket;if(null==n||null==e&&null==t)return;const s=JSON.stringify({filter:this._serializeFilter(e,t)});let o=!1;const i=Promise.withResolvers();return n.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(g.A.getLogger(this).error(new r.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),i.reject(t.error)),this._setWebSocketJSONParseHandler(n),o=!0,i.resolve())},n.send(s),setTimeout(()=>{o||(this.destroyed||this._websocket!==n||g.A.getLogger(this).error(new r.A("geoevent-connection","Server timed out when setting filter")),i.reject())},1e4),i.promise}_serializeFilter(e,t){const n={};if(null==e&&null==t)return n;if(e?.geometry)try{const t=(0,y.rS)(e.geometry);if("extent"!==t.type)throw new r.A("geoevent-connection",`Expected extent but found type ${t.type}`);n.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){g.A.getLogger(this).error(new r.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(n.where=e.where),null!=t&&(n.outFields=t.join(",")),n}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,n=e.attributes[t],s=this._relatedFeatures.get(n);if(!s)return g.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:o,geometry:i}=s;for(const t in o)e.attributes[t]=o[t];return i&&(e.geometry=i),e.geometry||e.centroid||g.A.getLogger(this).error(new r.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,n=this._queryRelatedFeatures(e),s=this._queryArchive(t);await n;const r=await s;if(!r)return;for(const e of r.features)this.onFeature(this._enrich(e))}catch(e){g.A.getLogger(this).error(new r.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([n.e(6361),n.e(6914),n.e(7865),n.e(5732),n.e(9953),n.e(564),n.e(2869),n.e(3910),n.e(1214),n.e(2889),n.e(1017),n.e(9789),n.e(4674),n.e(7283),n.e(8589),n.e(812),n.e(3470),n.e(3331)]).then(()=>n(18589))).default)({url:e}),{capabilities:s}=await t.load(),r=s.query.supportsMaxRecordCountFactor,o=s.query.supportsPagination,i=s.query.supportsCentroid,a=this._config.maxRecordCountFactor,c=t.capabilities.query.maxRecordCount,l=r?c*a:c,u=new A.A;if(u.outFields=this._config.outFields??["*"],u.where=this._config.definitionExpression??"1=1",u.returnGeometry=!0,u.returnExceededLimitFeatures=!0,u.outSpatialReference=p.A.fromJSON(this._outSpatialReference),i&&(u.returnCentroid=!0),r&&(u.maxRecordCountFactor=a),o)return u.num=l,t.destroy(),this._queryPages(e,u);const h=await(0,k.eW)(e,u,this._config.sourceSpatialReference);return t.destroy(),h}async _queryPages(e,t,n=[],s=0){t.start=null!=t.num?s*t.num:null;const r=await(0,k.eW)(e,t,this._config.sourceSpatialReference);return r.exceededTransferLimit&&s<(this._config.maxQueryDepth??0)?(r.features.forEach(e=>n.push(e)),this._queryPages(e,t,n,s+1)):(n.forEach(e=>r.features.push(e)),r)}_addRelatedFeatures(e){const t=new Map,n=e.features,s=this._serviceDefinition.relatedFeatures.joinField;for(const e of n){const n=e.attributes[s];t.set(n,e)}this._relatedFeatures=t}};v=(0,a.Cg)([(0,l.$K)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);var R=n(64108);let M=class extends u{constructor(e,t){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:n,sourceSpatialReference:s}=e;this._featureZScaler=(0,w.N)(n,s,t)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function C(e,t){const n=t.toJSON();switch(e.type){case"client":return new M(e,n);case"custom":return new S(e,n);case"geoevent":return new v(e,n);case"kusto":return new h(e,n)}}(0,a.Cg)([(0,l.MZ)()],M.prototype,"connectionStatus",void 0),(0,a.Cg)([(0,l.MZ)()],M.prototype,"errorString",void 0),M=(0,a.Cg)([(0,R.$)("esri.layers.support.ClientSideConnection")],M)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4708],{69052(e,t,n){n.d(t,{hr:()=>r});var s=n(34727);class r{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return o(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+i(this.range,e-t,n)}minimalMonotonic(e,t,n){return o(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(s)?n:s}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function o(e,t,n,s,r=0,o=!1){return(s-=r)<t?s+=i(e,t-s):s>n&&(s-=i(e,s-n)),o&&s===n&&(s=t),s+r}function i(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const a=new r(0,2*Math.PI),c=(new r(-Math.PI,Math.PI),new r(0,360));n.d(t,["ie",0,c,"uC",0,a])},18370(e,t,n){n.d(t,{z:()=>r});class s{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async e=>(this.module=e,e))),this._promise}}function r(e){return new s(e)}},52039(e,t,n){n.d(t,{O7:()=>f,el:()=>l});var s=n(69052),r=(n(49186),n(18370)),o=n(17676),i=(n(5443),n(39829)),a=(n(82799),n(16930)),c=(n(80754),n(21325));async function l(e,t,n){Array.isArray(e)||(e=[e]),null!=t&&"object"==typeof t&&"authMode"in t&&(n=t);let s=null;for(const t of e)s??=t?.spatialReference;if(!s)return e;const r=(0,c.Vp)(s);if(!r)return e;if(1===e.length&&"extent"===e[0]?.type){const t=e[0].clone().normalizeAsSingleGeometry(r);return["xmin"in t?t:new i.A(t)]}const[a,l]=r.valid;let f=!1;for(const t of e){if(!t)continue;if("point"===t.type){f||=t.x>=l,f||=t.x<=a;continue}const{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=l,f||=e.xmin<=a,f||=e.xmax>=l,f||=e.xmax<=a}if(!f)return e;const[{foldInto360Range:d},g]=await(0,o.qr)(Promise.all([u.getImportPromise(),h.getImportPromise()]),n),m=g.fromSpatialReference(s);return e.map(e=>{if(null==e||"mesh"===e.type)return e;const t=g.fromGeometry(e),n=g.toGeometry(d(t,m),s);return"extent"===e.type&&1===n?.rings.length?n.extent:n})}const u=(0,r.z)(()=>n.e(4144).then(()=>n(4144)).then(e=>e.load().then(()=>e))),h=(0,r.z)(()=>Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(3299),n.e(1550)]).then(()=>n(78125)));function f(e,t,n){const s=(0,c.Vp)(n);if(null==s)return e;const[r,o]=s.valid,i=2*o;let a=0,l=0;t>o?a=Math.ceil(Math.abs(t-o)/i):t<r&&(a=-Math.ceil(Math.abs(t-r)/i)),e>o?l=Math.ceil(Math.abs(e-o)/i):e<r&&(l=-Math.ceil(Math.abs(e-r)/i));let u=e+(a-l)*i;const h=u-t;return h>o?u-=i:h<r&&(u+=i),u}function d(e){const t=(0,c.Vp)(e);if(null==t)return null;const[n,r]=t.valid;return new s.hr(n,r)}const g=d(a.A.WGS84);d(a.A.WebMercator),n.d(t,["Y_",0,g])},80754(e,t,n){n.d(t,{kS:()=>l,kd:()=>c});var s=n(82799),r=n(16930),o=n(60408),i=n(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){if((0,i.Ed)(e))for(const n of function(e){return(0,o.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of n){if((0,i.aO)(e)){const[n,s]=e.c;n[0]+=t,s[0]+=t;continue}if((0,i.FG)(e)){const[n,s]=e.a;n[0]+=t,s[0]+=t;continue}if((0,i.n1)(e)){const[n,s,r]=e.b;n[0]+=t,s[0]+=t,r[0]+=t;continue}e[0]+=t}for(const n of function(e){return(0,o.Bi)(e)?e.rings:e.paths}(e))for(const e of n)e[0]+=t;return e}n.d(t,["j7",0,a])},31464(e,t,n){n.d(t,{Cv:()=>d,Nk:()=>f,lK:()=>m});var s=n(4576),r=n(99917),o=n(60408),i=n(21325),a=n(28735);const c=[0,0];function l(e,t){const n=(0,i.K8)(e)?a.je:a.tD;if((0,o.fT)(t)){const e={x:0,y:0};return[e.x,e.y]=n(t.x,t.y,c),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,o.ZC)(t)){const e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=n(t.xmin,t.ymin,c),[e.xmax,e.ymax]=n(t.xmax,t.ymax,c),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if((0,o.Bi)(t))return{rings:u(t.rings,n),hasM:t.hasM,hasZ:t.hasZ};if((0,o.Rg)(t))return{paths:u(t.paths,n),hasM:t.hasM,hasZ:t.hasZ};if((0,o.U9)(t))return{points:h(t.points,n),hasM:t.hasM,hasZ:t.hasZ};throw new Error}function u(e,t){const n=[];for(const s of e)n.push(h(s,t));return n}function h(e,t){const n=[];for(const s of e){const e=t(s[0],s[1],[0,0]);n.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return n}async function f(e,t){if(!e||!t)return;const n=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(s.Ru):[e];await(0,r.initializeProjection)(n.map(e=>({source:e,dest:t})))}function d(e,t,n,s){if(!e)return null;if(n||(n=t,t=e.spatialReference),!(0,i.fn)(t)||!(0,i.fn)(n)||(0,i.aI)(t,n))return e;if((0,a.y7)(t,n)){const t=l(n,e);return t.spatialReference=n,t}return(0,r.projectMany)([e],t,n,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,n,s){if(!e?.length||!t||!n||(0,i.aI)(t,n))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:n,options:s,resolve:Promise.withResolvers()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:n,outSpatialReference:s,resolve:o,options:i}=e,c=t.filter(e=>null!=e);let u;u=(0,a.y7)(n,s)&&null==i?.extendedParams?c.map(e=>l(s,e)):(0,r.projectMany)(c,n,s,i);let h=0;const f=t.map(e=>null==e?null:u[h++]);o.resolve(f),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(e,t,n,s){return g.push(e,t,n,s)}},60986(e,t,n){n.r(t),n.d(t,{createConnection:()=>C});var s=n(56507),r=n(49186),o=n(31464),i=n(9916),a=n(32198),c=n(65529),l=n(91429);let u=class extends c.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new r.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,a.Cg)([(0,l.MZ)({readOnly:!0})],u.prototype,"connectionError",null),u=(0,a.Cg)([(0,l.$K)("esri.layers.support.StreamConnection")],u);class h extends u{constructor(e,t){super(),this._config=e,this._outSpatialReference=t,this.connectionStatus="connected",this.errorString=null,this._isPolling=!1,this._lastIngestedAt=null,this._pollTimer=null,this._pollRecentData=async()=>{if(!this.destroyed&&!this._isPolling){this._isPolling=!0;try{const e=await this._queryChanges(this._lastIngestedAt);if(this.destroyed)return;this._handleResult(e)}catch(e){this.errorString=e instanceof Error?e.message:"Failed to fetch"}finally{this._isPolling=!1}}},this._initialize()}destroy(){super.destroy(),this._pollTimer&&(clearInterval(this._pollTimer),this._pollTimer=null)}sendMessageToSocket(e){throw new r.A("kusto:unsupported","sendMessageToSocket not supported for Kusto connections")}sendMessageToClient(e){throw new r.A("kusto:unsupported","sendMessageToClient not supported for Kusto connections")}updateCustomParameters(e){throw new r.A("kusto:unsupported","updateCustomParameters not supported for Kusto connections")}async _initialize(){await(0,o.Nk)(this._config.sourceSpatialReference,this._outSpatialReference);try{const e=await this._queryInitial();this._handleResult(e),this._pollTimer=setInterval(this._pollRecentData,6e4*this._config.refreshInterval)}catch{throw new r.A("kusto:connection","Failed to query KQL database")}}async _queryInitial(){const{trackIdField:e}=this._config,t=f(await this._executeQuery(`${(0,i.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | summarize arg_max(IngestedAt, *) by ${(0,i.xw)(e)}`));if(!t)throw new r.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(t),table:t}}async _queryChanges(e=null){const t=e??"1970-01-01T00:00:00Z",n=f(await this._executeQuery(`${(0,i.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | where IngestedAt > todatetime('${(0,i.iD)(t)}') | order by IngestedAt asc`));if(!n)throw new r.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(n),table:n}}async _executeQuery(e){const t=this._config.database,n=t.properties.queryServiceUri,{data:r}=await(0,s.A)(`${n}/v2/rest/query`,{responseType:"json",method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({db:t.displayName,csl:e})});return r}_handleResult(e){this._lastIngestedAt=e.ingestedAt;const t=this._createFeatures(e.table);if(null!=t){this.onMessage(t);for(const e of t)this.onFeature(e)}}_createFeatures(e){if(null==e||0===e.Rows.length)return null;const{xField:t,yField:n}=this._config.geometryEncoding,s=e.Columns.findIndex(e=>e.ColumnName===t),r=e.Columns.findIndex(e=>e.ColumnName===n);return e.Rows.map(t=>this._createFeature(e.Columns,s,r,t))}_createFeature(e,t,n,s){const{xField:r,yField:i}=this._config.geometryEncoding,a={};for(let t=0;t<e.length;t++){const n=e[t],o=s[t]??null;n.ColumnName!==i&&n.ColumnName!==r&&(a[n.ColumnName]=o)}let c=null;const l=s[t],u=s[n];return null!=u&&null!=l&&(c=(0,o.Cv)({x:l,y:u},this._config.sourceSpatialReference,this._outSpatialReference)),{attributes:a,geometry:c}}}function f(e){return e.find(e=>"DataTable"===e.FrameType&&"PrimaryResult"===e.TableKind)??null}function d(e){const t=e.Columns.findIndex(e=>"IngestedAt"===e.ColumnName);if(t<0)return null;let n=null;for(const s of e.Rows){const e=s[t];"string"==typeof e&&(null==n||e>n)&&(n=e)}return n}var g=n(53966),m=n(84952),p=n(16930),y=n(65864),_=n(17676),w=n(62815);function b(e,t){if(null==e&&null==t)return null;const n={};return null!=t&&(n.geometry=t),null!=e&&(n.where=e),n}let S=class extends u{constructor(e,t){super({}),this._outSpatialReference=t,this._outstandingMessages=[],this.errorString=null;const{geometryType:n,sourceSpatialReference:s}=e;this._config=e,this._featureZScaler=(0,w.N)(n,s,this._outSpatialReference),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.url.path,t=1e3,n=0){try{if(this.destroyed)return;const t=(0,m.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(s){const o=t/1e3;return this._config.maxReconnectionAttempts&&n>=this._config.maxReconnectionAttempts?(g.A.getLogger(this).error(new r.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(g.A.getLogger(this).error(new r.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${o}s`,s)),await(0,_.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),n+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void g.A.getLogger(this).error(new r.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,n)=>{const s=new WebSocket(e);s.onopen=()=>{if(s.onopen=null,this.destroyed)return s.onclose=null,void s.close();s.onclose=e=>this._onClose(e),s.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(s),t(s)},s.onclose=e=>{s.onopen=s.onclose=null,n(e)}})}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const n=Promise.withResolvers(),s=t.onmessage,o=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:i}=this._config,a=setTimeout(()=>n.reject(),e),c=()=>{clearTimeout(a),n.reject()};return t.onmessage=e=>{let l=null;try{l=JSON.parse(e.data)}catch(e){}l&&"object"==typeof l||(g.A.getLogger(this).error(new r.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),c(),this.destroy()),l.spatialReference?.wkid!==this._outSpatialReference?.wkid&&(g.A.getLogger(this).error(new r.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${this._outSpatialReference.wkid}`,e.data)),c(),this.destroy()),"json"!==l.format&&(g.A.getLogger(this).error(new r.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),c(),this.destroy()),o&&l.filter!==o&&g.A.getLogger(this).error(new r.A("websocket-connection","Tried to set filter, but server doesn't support it")),i&&l.outFields!==i&&g.A.getLogger(this).error(new r.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=s;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],clearTimeout(a),n.resolve()},t.send(JSON.stringify({filter:o,outFields:i,format:"json",spatialReference:{wkid:this._outSpatialReference.wkid}})),n.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),g.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&g.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,a.Cg)([(0,l.MZ)()],S.prototype,"connectionStatus",null),(0,a.Cg)([(0,l.MZ)()],S.prototype,"errorString",void 0),S=(0,a.Cg)([(0,l.$K)("esri.layers.graphics.sources.connections.WebSocketConnection")],S);var k=n(80893),A=n(97552);const x={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends S{constructor(e,t){super({...x,...e},t),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.url);e.timeInfo.trackIdField||g.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._outSpatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const n=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:s}=this._config;this.destroyed||this._setFilter(n,s)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void g.A.getLogger(this).error(new r.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},n=(0,s.A)(e.path,{query:t,responseType:"json"}),r=(await n).data;return this._serviceDefinition=r,r}_fetchWebSocketUrl(e,t){const n=e[0],{urls:s,token:r}=n,o=this._inferWebSocketBaseUrl(s);return(0,m.a6)(`${o}/subscribe`,{outSR:""+t.wkid,token:r})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return g.A.getLogger(this).error(new r.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const n=this._websocket;if(null==n||null==e&&null==t)return;const s=JSON.stringify({filter:this._serializeFilter(e,t)});let o=!1;const i=Promise.withResolvers();return n.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(g.A.getLogger(this).error(new r.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),i.reject(t.error)),this._setWebSocketJSONParseHandler(n),o=!0,i.resolve())},n.send(s),setTimeout(()=>{o||(this.destroyed||this._websocket!==n||g.A.getLogger(this).error(new r.A("geoevent-connection","Server timed out when setting filter")),i.reject())},1e4),i.promise}_serializeFilter(e,t){const n={};if(null==e&&null==t)return n;if(e?.geometry)try{const t=(0,y.rS)(e.geometry);if("extent"!==t.type)throw new r.A("geoevent-connection",`Expected extent but found type ${t.type}`);n.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){g.A.getLogger(this).error(new r.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(n.where=e.where),null!=t&&(n.outFields=t.join(",")),n}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,n=e.attributes[t],s=this._relatedFeatures.get(n);if(!s)return g.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:o,geometry:i}=s;for(const t in o)e.attributes[t]=o[t];return i&&(e.geometry=i),e.geometry||e.centroid||g.A.getLogger(this).error(new r.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,n=this._queryRelatedFeatures(e),s=this._queryArchive(t);await n;const r=await s;if(!r)return;for(const e of r.features)this.onFeature(this._enrich(e))}catch(e){g.A.getLogger(this).error(new r.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([n.e(6361),n.e(6914),n.e(7865),n.e(5732),n.e(2869),n.e(9953),n.e(3910),n.e(564),n.e(1214),n.e(2889),n.e(1017),n.e(9789),n.e(4674),n.e(7283),n.e(8589),n.e(812),n.e(7582),n.e(9279)]).then(()=>n(18589))).default)({url:e}),{capabilities:s}=await t.load(),r=s.query.supportsMaxRecordCountFactor,o=s.query.supportsPagination,i=s.query.supportsCentroid,a=this._config.maxRecordCountFactor,c=t.capabilities.query.maxRecordCount,l=r?c*a:c,u=new A.A;if(u.outFields=this._config.outFields??["*"],u.where=this._config.definitionExpression??"1=1",u.returnGeometry=!0,u.returnExceededLimitFeatures=!0,u.outSpatialReference=p.A.fromJSON(this._outSpatialReference),i&&(u.returnCentroid=!0),r&&(u.maxRecordCountFactor=a),o)return u.num=l,t.destroy(),this._queryPages(e,u);const h=await(0,k.eW)(e,u,this._config.sourceSpatialReference);return t.destroy(),h}async _queryPages(e,t,n=[],s=0){t.start=null!=t.num?s*t.num:null;const r=await(0,k.eW)(e,t,this._config.sourceSpatialReference);return r.exceededTransferLimit&&s<(this._config.maxQueryDepth??0)?(r.features.forEach(e=>n.push(e)),this._queryPages(e,t,n,s+1)):(n.forEach(e=>r.features.push(e)),r)}_addRelatedFeatures(e){const t=new Map,n=e.features,s=this._serviceDefinition.relatedFeatures.joinField;for(const e of n){const n=e.attributes[s];t.set(n,e)}this._relatedFeatures=t}};v=(0,a.Cg)([(0,l.$K)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);var R=n(64108);let M=class extends u{constructor(e,t){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:n,sourceSpatialReference:s}=e;this._featureZScaler=(0,w.N)(n,s,t)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function C(e,t){const n=t.toJSON();switch(e.type){case"client":return new M(e,n);case"custom":return new S(e,n);case"geoevent":return new v(e,n);case"kusto":return new h(e,n)}}(0,a.Cg)([(0,l.MZ)()],M.prototype,"connectionStatus",void 0),(0,a.Cg)([(0,l.MZ)()],M.prototype,"errorString",void 0),M=(0,a.Cg)([(0,R.$)("esri.layers.support.ClientSideConnection")],M)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5676],{51927(e,t,s){s.d(t,{DP:()=>b,Nh:()=>k,Pg:()=>y,RP:()=>c,WF:()=>u,_N:()=>C,eH:()=>g,f4:()=>x,fP:()=>d,zj:()=>h,zt:()=>l});var n=s(97768),r=s(94778),a=s(14140),i=s(70274);const o=[.299,.587,.114];function l(e){if(null==e)return!1;const{max:t,min:s,size:n}=e;return(t-s)/n===1&&s>=-.5&&.5===Math.abs(s%1)&&t<=255.5}function u(e,t=256){t=Math.min(t,256);const{size:s,counts:n}=e,r=new Float64Array(s);r[0]=n[0]/t;for(let e=1;e<s;e++)r[e]=r[e-1]+n[e]/t;const a=new Uint8Array(t),i=t/r[r.length-1];if(s<=t){const n=l(e)?Math.max(0,Math.round(e.min+.5)):0;for(let e=n;e<t;e++)a[e]=e>=s+n?255:Math.min(255,Math.trunc(r[e-n]*i))}else{const e=r.map(e=>Math.min(255,Math.trunc(e*i)));for(let n=0;n<t;n++)a[n]=e[Math.round(s/t)];a[t-1]=255}return a}function c(e){const{minCutOff:t,maxCutOff:s,gamma:n,pixelType:r,rounding:a}=e;if(!["u8","u16","s8","s16"].includes(r))return null;const i=t.length,o="s8"===r?-127:"s16"===r?-32767:0,l=["u16","s16"].includes(r)?65536:256,u=[],c=[],{minOutput:d=0,maxOutput:m=255}=e,f=m-d;for(let e=0;e<i;e++)c[e]=s[e]-t[e],u[e]=0===c[e]?0:f/c[e];const p=[];if(n&&n.length>=i){const e=k(i,n);for(let r=0;r<i;r++){const i=[];for(let u=0;u<l;u++){if(0===c[r]){i[u]=d;continue}const l=u+o,h=(l-t[r])/c[r];let p=1;if(n[r]>1&&(p-=(1/f)**(h*e[r])),l<s[r]&&l>t[r]){const e=p*f*h**(1/n[r])+d;i[u]="floor"===a?Math.floor(e):"round"===a?Math.round(e):e}else l>=s[r]?i[u]=m:i[u]=d}p[r]=i}}else for(let e=0;e<i;e++){const n=[];for(let r=0;r<l;r++){const i=r+o;if(i<=t[e])n[r]=d;else if(i>=s[e])n[r]=m;else{const s=(i-t[e])*u[e]+d;n[r]="floor"===a?Math.floor(s):"round"===a?Math.round(s):s}}p[e]=n}if(null!=e.contrastOffset){const t=h(e.contrastOffset,e.brightnessOffset);for(let e=0;e<i;e++){const s=p[e];for(let e=0;e<l;e++)s[e]=t[s[e]]}}return{lut:p,offset:o}}function h(e,t){const s=Math.min(Math.max(e,-100),100),n=Math.min(Math.max(t??0,-100),100),r=new Uint8Array(256);for(let e=0;e<256;e++){let t=0;s>0&&s<100?t=(200*e-25500+510*n)/(2*(100-s))+128:s<=0&&s>-100?t=(200*e-25500+510*n)*(100+s)/2e4+128:100===s?(t=200*e-25500+256*(100-s)+510*n,t=t>0?255:0):-100===s&&(t=128),r[e]=t>255?255:t<0?0:t}return r}function d(e,t,s){const n=[];for(let r=0;r<t.length;r++){let a=0,i=0,l=0;"min"in t[r]?({min:a,max:i,avg:l}=t[r]):[a,i,l]=t[r];let u=l??0;"u8"!==e&&(u=255*(u-a)/(i-a)),s&&(u*=o[r]),n.push(m(u))}return n}function m(e){if(e<=0||e>=255)return 1;const t=e+(150===e?0:e<150?45*Math.cos(.01047*e):17*Math.sin(.021*e)),s=Math.log(e/255),n=Math.log(t/255);if(0===n)return 1;const r=s/n;return isNaN(r)?1:Math.min(9.9,Math.max(.01,r))}function f(e,t,s){let{min:n,max:r,count:a,avg:i,mode:o,median:l}=function(e,t,s=!1,n=!1){let r=1/0,a=-1/0,i=0,o=0,l=0,u=0;const c=e.length,h=new Map;for(let s=0;s<c;s++){const n=e[s];if(!t||t[s]){const e=(h.get(n)??0)+1;h.set(n,e),e>u&&(u=e,l=n),r=n<r?n:r,a=n>a?n:a,i+=n,o++}}const d=o>0?i/o:0;let m=r===a?r:void 0,f=r===a?r:void 0,p=r===a?r:void 0;if(s&&o>0&&o<2**24){let s=e.slice();if(t){let n=0;for(let r=0;r<c;r++){const a=e[r];t[r]&&(s[n++]=a)}}s=s.slice(0,o),s.sort((e,t)=>e-t);const r=o>>>1;m=o%2?s[Math.floor(r)]:(s[r-1]+s[r])/2,n&&(f=s[Math.floor(.25*o)],p=s[Math.floor(.75*o)])}return{min:r,max:a,count:o,avg:d,mode:l,median:m,quartile1:f,quartile3:p}}(e,t,!0);if(0===a)return{statistics:{min:0,max:0,avg:0,stddev:0,count:a,mode:0,median:0},histogram:null};const u={min:n,max:r,avg:i,mode:o,count:a,median:l},c=function(e,t,s,n=!1,r=!1){let a=0,i=0,o=0,l=0;for(let r=0;r<e.length;r++)if(!t||t[r]){const t=e[r]-s,u=t*t;if(a+=u,!n){const e=u*t;i+=e,o+=e*t}l++}if(l<2)return null;a/=l-1;const u=Math.sqrt(a);return n?{stddev:u}:(o/=l,{stddev:u,skewness:r?i*(l/((l-1)*(l-2)))/a**1.5:i/l/a**1.5,kurtosis:o/(a*a)})}(e,t,i,!s.includeSkewnessKurtosis);c&&(u.stddev=c.stddev,s.includeSkewnessKurtosis&&(u.skewness=c.skewness,u.kurtosis=c.kurtosis));const h=s?.histogramSize??256,d=!!s?.pixelType&&["u8","s8","u4","u2","u1"].includes(s.pixelType),m=!s?.skipHistograms;if(null==l){const s=p({band:e,mask:t,min:n,max:r,size:1e4,use8BitHistogram:d});if(l=function(e,t,s,n=50){const{counts:r,min:a,max:i,size:o}=s,l=r.reduce((e,t)=>e+t)*(n/=100);let u=0,c=0;for(;c<r.length&&(u+=r[c],!(u>=l+1));c++);const h=(i-a)/o,d=a+h*c,m=a+h*(c+1);if(1===h&&.5===Math.abs(a%1))return d+.5;const f=e.slice(0,r[c]).fill(0);for(let s=0,n=0;s<e.length;s++)if(!t||t[s]){const t=e[s];t>=d&&t<m&&(f[n++]=t)}f.sort((e,t)=>e-t);const p=u-Math.floor(l)-1;return f[Math.max(0,f.length-1-p)]}(e,t,s,50),m&&d&&256===h)return{statistics:u,histogram:s}}return m?{statistics:u,histogram:p({band:e,mask:t,min:n,max:r,size:h,use8BitHistogram:d&&256===h})}:{statistics:u,histogram:null}}function p(e){const{band:t,mask:s,min:n,max:r,use8BitHistogram:a}=e;if(a){const e=r-n+1,a=new Uint32Array(e);for(let e=0;e<t.length;e++)s&&!s[e]||a[t[e]-n]++;return{min:n-.5,max:r+.5,size:e,counts:a}}const i=e.size??256,o=new Uint32Array(i),l=(r-n)/i;if(0===l){const e=s?s.reduce((e,t)=>e+(t?1:0),0):t.length;return{min:n,max:r,size:1,counts:new Uint32Array(1).fill(e)}}const u=new Uint32Array(i+1),c=1/l;for(let e=0;e<t.length;e++)s&&!s[e]||u[Math.floor((t[e]-n)*c)]++;for(let e=0;e<i-1;e++)o[e]=u[e];return o[i-1]=u[i-1]+u[i],{min:n,max:r,size:i,counts:o}}function g(e,t){const{pixels:s,mask:n,pixelType:r,bandMasks:a}=e,i=s.map((e,s)=>f(e,a?.[s]??n,{pixelType:r,...t}));return{statistics:i.map(({statistics:e})=>e),histograms:i.map(({histogram:e})=>e)}}function x(e){if(!e?.pixels?.length)return null;const{pixels:t,mask:s,bandMasks:n,pixelType:r}=e,a=e.width*e.height,i=t.length,o=[],l=[],u=256;let c,h;for(let d=0;d<i;d++){let i=new Uint32Array(u);const m=t[d],f=n?.[d]??s;if("u8"===r){if(c=255,h=0,f){for(let e=0;e<a;e++)if(f[e]){const t=m[e];c=t<c?t:c,h=t>h?t:h,i[t]++}}else for(let e=0;e<a;e++){const t=m[e];c=t<c?t:c,h=t>h?t:h,i[t]++}i=i.slice(c,h+1)}else{let t=!1;e.statistics||(e.updateStatistics(),t=!0);const s=e.statistics;c=s[d].minValue,h=s[d].maxValue;const n=(h-c)/u;if(0===n){!s||e.validPixelCount||t||e.updateStatistics();const n=(e.validPixelCount||e.width*e.height)/u;for(let e=0;e<u;e++)i[e]=Math.round(n*(e+1))-Math.round(n*e)}else{const e=new Uint32Array(257);for(let t=0;t<a;t++)f&&!f[t]||e[Math.floor((m[t]-c)/n)]++;for(let t=0;t<255;t++)i[t]=e[t];i[255]=e[255]+e[u]}}const p="u8"===r?c-.5:c,g="u8"===r?h+.5:h;o.push({min:p,max:g,size:i.length,counts:i});let x=0,y=0,b=0;for(let e=0;e<i.length;e++)x+=i[e],y+=e*i[e];const k=y/x;for(let e=0;e<i.length;e++)b+=i[e]*(e-k)**2;const C=Math.sqrt(b/(x-1)),M=(g-p)/i.length,S=(k+("u8"===r?0:.5))*M+c,w=C*M;l.push({min:c,max:h,avg:S,stddev:w})}return{statistics:l,histograms:o}}function y(e){const t=[];for(let s=0;s<e.length;s++){const{min:n,max:r,size:a,counts:i}=e[s];let o=0,l=0;for(let e=0;e<a;e++)o+=i[e],l+=e*i[e];const u=l/o;let c=0;for(let e=0;e<a;e++)c+=i[e]*(e-u)**2;const h=(r-n)/a,d=(u+.5)*h+n,m=Math.sqrt(c/(o-1))*h;t.push({min:n,max:r,avg:d,stddev:m})}return t}function b(e,t){const{pixelBlock:s,bandIds:a,returnHistogramLut:o,rasterInfo:l}=t;let c=null,h=null,d=e.stretchType;if("number"==typeof d&&(d=i.x[d]),e.dra)if("minMax"===d&&s?.statistics)c=s.statistics.map(e=>[e.minValue,e.maxValue,0,0]);else{const e=x(s);c=null!=e?e.statistics:null,h=null!=e?e.histograms:null}else c=e.statistics?.length?e.statistics:l.statistics,h="histograms"in e?e.histograms:void 0,h||(h=l.histograms);"percentClip"!==d&&"histogramEqualization"!==d||h?.length||(d="minMax");const m=c?.length||h?.length||l.bandCount,f=[],p=[];c&&!Array.isArray(c[0])&&(c=c.map(e=>[e.min,e.max,e.avg,e.stddev]));const[g,y]=(0,r.hP)(l.pixelType);if(!c?.length){c=[];for(let e=0;e<m;e++)c.push([g,y,1,1]);"standardDeviation"===d&&(d="minMax")}switch(d){case"none":for(let e=0;e<m;e++)f[e]=g,p[e]=y;break;case"minMax":for(let e=0;e<m;e++){const t=c[e];f[e]=t[0],p[e]=t[1]}break;case"standardDeviation":{const{numberOfStandardDeviations:t=2}=e;for(let e=0;e<m;e++){const s=c[e];f[e]=s[2]-t*s[3],p[e]=s[2]+t*s[3],f[e]<s[0]&&(f[e]=s[0]),p[e]>s[1]&&(p[e]=s[1])}}break;case"histogramEqualization":(0,n.Lw)(h);for(let e=0;e<m;e++)f[e]=h[e].min,p[e]=h[e].max;break;case"percentClip":(0,n.Lw)(h);for(let t=0;t<h.length;t++){const s=h[t],n=new Uint32Array(s.size),r=[...s.counts];r.length>=20&&(r[0]=r[1]=r[2]=r[r.length-1]=r[r.length-2]=0);let a=0;const i=(s.max-s.min)/s.size,o=-.5===s.min&&1===i?.5:0;for(let e=0;e<s.size;e++)a+=r[e],n[e]=a;let l=(e.minPercent||0)*a/100;f[t]=s.min+o;for(let e=0;e<s.size;e++)if(n[e]>l){f[t]=s.min+i*(e+o);break}l=(1-(e.maxPercent||0)/100)*a,p[t]=s.max+o;for(let e=s.size-2;e>=0;e--)if(n[e]<l){p[t]=s.min+i*(e+2-o);break}if(p[t]<f[t]){const e=f[t];f[t]=p[t],p[t]=e}}break;default:for(let e=0;e<m;e++){const t=c[e];f[e]=t[0],p[e]=t[1]}}let b,k,C;return"histogramEqualization"===d?((0,n.Lw)(h),k=h[0].size||256,b=0,o&&(C=h.map(e=>u(e)))):(k=e.max||255,b=e.min||0),function(e,t){if(null==t||0===t.length)return e;const s=Math.max.apply(null,t),{minCutOff:n,maxCutOff:r,minOutput:a,maxOutput:i,histogramLut:o}=e;return n.length===t.length||n.length<=s?e:{minCutOff:t.map(e=>n[e]),maxCutOff:t.map(e=>r[e]),histogramLut:o?t.map(e=>o[e]):null,minOutput:a,maxOutput:i}}({minCutOff:f,maxCutOff:p,maxOutput:k,minOutput:b,histogramLut:C},a)}function k(e,t){const s=new Float32Array(e);for(let n=0;n<e;n++)t[n]>1?t[n]>2?s[n]=6.5+(t[n]-2)**2.5:s[n]=6.5+100*(2-t[n])**4:s[n]=1;return s}function C(e,t){if(!e?.pixels?.length)return e;const{mask:s,bandMasks:n,width:r,height:i,pixels:o}=e,{minCutOff:l,maxCutOff:u,minOutput:c,maxOutput:h,gamma:d}=t,m=r*i,f=t.outputPixelType||"u8",p=e.pixels.map(()=>a.A.createEmptyBand(f,m)),g=p.length,x=h-c,y=[],b=[];for(let e=0;e<g;e++)b[e]=u[e]-l[e],y[e]=0===b[e]?0:x/b[e];const C=f.startsWith("u")||f.startsWith("s"),M=d&&d.length>=g,S=!!t.isRenderer;if(M){const e=k(g,d);for(let t=0;t<g;t++){const r=n?.[t]??s;for(let s=0;s<m;s++)if(null==r||r[s]){if(0===b[t]){p[t][s]=c;continue}const n=o[t][s],r=(n-l[t])/b[t];let a=1;if(d[t]>1&&(a-=(1/x)**(r*e[t])),n<u[t]&&n>l[t]){const e=a*x*r**(1/d[t])+c;p[t][s]=S?Math.floor(e):C?Math.round(e):e}else n>=u[t]?p[t][s]=h:p[t][s]=c}}}else for(let e=0;e<g;e++){const t=n?.[e]??s;for(let s=0;s<m;s++)if(null==t||t[s]){const t=o[e][s];if(t<u[e]&&t>l[e]){const n=(t-l[e])*y[e]+c;p[e][s]=S?Math.floor(n):C?Math.round(n):n}else t>=u[e]?p[e][s]=h:p[e][s]=c}}const w=new a.A({width:r,height:i,mask:s,bandMasks:n,pixels:p,pixelType:f});return w.updateStatistics(),w}},51181(e,t,s){s.d(t,{E0:()=>f,PP:()=>p,SC:()=>h,di:()=>m,fw:()=>c,ng:()=>o,yy:()=>d});var n=s(47520),r=s(14140),a=s(4151);const i=1/111e3;function o(e){let{altitude:t,azimuth:s}=e;const{hillshadeType:n,pixelSizePower:r=1,pixelSizeFactor:a=1,scalingType:o,isGCS:l,resolution:u}=e,c="multi-directional"===n?2*e.zFactor:e.zFactor,{x:h,y:d}=u;let m=c/(8*h),f=c/(8*d);if(l&&c>.001&&(m/=i,f/=i),"adjusted"===o)if(l){const e=h*i,t=d*i;m=(c+e**r*a)/(8*e),f=(c+t**r*a)/(8*t)}else m=(c+h**r*a)/(8*h),f=(c+d**r*a)/(8*d);let p=(90-t)*Math.PI/180,g=Math.cos(p),x=(360-s+90)*Math.PI/180,y=Math.sin(p)*Math.cos(x),b=Math.sin(p)*Math.sin(x);const k=[315,270,225,360,180,0],C=[60,60,60,60,60,90],M=new Float32Array([3,5,3,2,1,4]),S=M.reduce((e,t)=>e+t),w=M.map(e=>e/S),v="multi-directional"===n?k.length:1,z=new Float32Array(6),R=new Float32Array(6),I=new Float32Array(6);if("multi-directional"===n)for(let e=0;e<v;e++)t=C[e],s=k[e],p=(90-t)*Math.PI/180,g=Math.cos(p),x=(360-s+90)*Math.PI/180,y=Math.sin(p)*Math.cos(x),b=Math.sin(p)*Math.sin(x),z[e]=g,R[e]=y,I[e]=b;else z.fill(g),R.fill(y),I.fill(b);return{resolution:u,factor:[m,f],sinZcosA:y,sinZsinA:b,cosZ:g,sinZcosAs:[...R],sinZsinAs:[...I],cosZs:[...z],weights:[...w],hillshadeType:["traditional","multi-directional"].indexOf(n)}}function l(e,t){const{width:s,height:n}=e,r=s*n,a=new Uint8Array(r),i=null!=e.mask;let o;if(i){o=new Uint8Array(e.mask);for(let e=0;e<o.length;e++)o[e]&&(a[e]=1,o[e]=1)}const l=e.pixels[0],u=new Float32Array(r),c=new Float32Array(r);let h,d=0;if(t){const{resolution:e}=t,s=e?(e.x+e.y)/2:1;d=200*t.zFactor/(s*s),h=new Float32Array(r)}const m=t?.curvatureType;let f,p,g,x,y,b,k,C;for(let e=1;e<n-1;e++){const t=e*s;for(let e=1;e<s-1;e++){const n=t+e;if(0!==o?.[n]){if(o){if(o[n-s-1]+o[n-s]+o[n-s+1]+o[n-1]+o[n+1]+o[n+s-1]+o[n+s]+o[n+s+1]<7){a[n]=0;continue}f=o[n-s-1]?l[n-s-1]:l[n],p=o[n-s]?l[n-s]:l[n],g=o[n-s+1]?l[n-s+1]:l[n],x=o[n-1]?l[n-1]:l[n],y=o[n+1]?l[n+1]:l[n],b=o[n+s-1]?l[n+s-1]:l[n],k=o[n+s]?l[n+s]:l[n],C=o[n+s+1]?l[n+s+1]:l[n]}else f=l[n-s-1],p=l[n-s],g=l[n-s+1],x=l[n-1],y=l[n+1],b=l[n+s-1],k=l[n+s],C=l[n+s+1];if(u[n]=g+y+y+C-(f+x+x+b),c[n]=b+k+k+C-(f+p+p+g),null!=h){const e=l[n],t=.5*(x+y)-e,s=.5*(p+k)-e;if("standard"===m)h[n]=-d*(t+s);else{const e=(-f+g+b-C)/4,r=(-x+y)/2,a=(p-k)/2,i=r*r,o=a*a,l=i+o;l&&(h[n]="profile"===m?d*(t*i+s*o+e*r*a)/l:-d*(t*o+s*i-e*r*a)/l)}}}}}return{outMask:i?a:null,dzxs:u,dzys:c,curvatures:h}}function u(e,t,s){for(let n=0;n<s;n++)e[n*t]=e[n*t+1],e[(n+1)*t-1]=e[(n+1)*t-2];for(let n=1;n<t-1;n++)e[n]=e[n+t],e[n+(s-1)*t]=e[n+(s-2)*t]}function c(e,t){if(!(0,n.AB)(e))return e;const{factor:s,sinZcosA:i,sinZsinA:c,cosZ:h,sinZcosAs:d,sinZsinAs:m,cosZs:f,weights:p}=o(t),[g,x]=s,y="traditional"===t.hillshadeType,{width:b,height:k}=e,C=new Uint8Array(b*k),{dzxs:M,dzys:S,outMask:w}=l(e);for(let e=1;e<k-1;e++){const t=e*b;for(let e=1;e<b-1;e++){const s=t+e;if(!w||w[s]){const e=M[s]*g,t=S[s]*x,n=Math.sqrt(1+e*e+t*t);let r=0;if(y){let s=255*(h+c*t-i*e)/n;s<0&&(s=0),r=s}else{const s=m.length;for(let a=0;a<s;a++){let s=255*(f[a]+m[a]*t-d[a]*e)/n;s<0&&(s=0),r+=s*p[a]}}C[s]=255&r}}}return u(C,b,k),new r.A({width:b,height:k,pixels:[C],mask:w,pixelType:"u8",validPixelCount:e.validPixelCount,statistics:[new a.A(0,255)]})}function h(e,t,s,r){if(!(0,n.AB)(e)||!(0,n.AB)(t))return;const{min:a,max:i}=r,o=e.pixels[0],{pixels:l,mask:u}=t,c=l[0],h=255.00001/(i-a),d=new Uint8ClampedArray(c.length),m=new Uint8ClampedArray(c.length),f=new Uint8ClampedArray(c.length),p=s.length-1;for(let e=0;e<c.length;e++){if(0===u?.[e])continue;const t=Math.floor((c[e]-a)*h),[n,r]=s[t<0?0:t>p?p:t],i=o[e],l=i*r,g=l*(1-Math.abs(n%2-1)),x=i-l;switch(Math.floor(n)){case 0:d[e]=l+x,m[e]=g+x,f[e]=x;break;case 1:d[e]=g+x,m[e]=l+x,f[e]=x;break;case 2:d[e]=x,m[e]=l+x,f[e]=g+x;break;case 3:d[e]=x,m[e]=g+x,f[e]=l+x;break;case 4:d[e]=g+x,m[e]=x,f[e]=l+x;break;case 5:case 6:d[e]=l+x,m[e]=x,f[e]=g+x}}e.pixels=[d,m,f],e.updateStatistics()}function d(e,t){if(!(0,n.AB)(e))return e;const s=t.zFactor,a=t.pixelSizePower??1,o=t.pixelSizeFactor??1,c=t.slopeType,h=t.isGCS,{x:d,y:m}=t.resolution;let f=s/(8*d),p=s/(8*m);h&&Math.abs(s-1)<1e-4&&(f/=i,p/=i),"adjusted"===c&&(f=(s+d**a*o)/(8*d),p=(s+m**a*o)/(8*m));const{dzxs:g,dzys:x,outMask:y}=l(e),{width:b,height:k}=e,C=new Float32Array(b*k);for(let e=1;e<k-1;e++){const t=e*b;for(let e=1;e<b-1;e++){const s=t+e;if(!y||y[s]){const n=g[s]*f,r=x[s]*p,a=Math.sqrt(n*n+r*r);C[t+e]="percent-rise"===c?100*a:57.2957795*Math.atan(a)}}}u(C,b,k);const M=new r.A({width:b,height:k,pixels:[C],mask:y,pixelType:"f32",validPixelCount:e.validPixelCount});return M.updateStatistics(),M}function m(e,t={}){if(!(0,n.AB)(e))return e;const{resolution:s}=t,i=s?1/s.x:1,o=s?1/s.y:1,{dzxs:c,dzys:h,outMask:d}=l(e),{width:m,height:f}=e,p=new Float32Array(m*f);for(let e=1;e<f-1;e++){const t=e*m;for(let e=1;e<m-1;e++){const s=t+e;if(!d||d[s]){const n=c[s]*i,r=h[s]*o;let a=-1;0===n&&0===r||(a=90-57.29578*Math.atan2(r,-n),a<0&&(a+=360),360===a?a=0:a>360&&(a%=360)),p[t+e]=a}}}return u(p,m,f),new r.A({width:m,height:f,pixels:[p],mask:d,pixelType:"f32",validPixelCount:e.validPixelCount,statistics:[new a.A(-1,360)]})}function f(e,t){if(!(0,n.AB)(e))return e;const{curvatures:s,outMask:a}=l(e,t),{width:i,height:o}=e;u(s,i,o);const c=new r.A({width:i,height:o,pixels:[s],mask:a,pixelType:"f32",validPixelCount:e.validPixelCount});return c.updateStatistics(),c}function p(e,t,s){const{hillshadeType:n,altitude:r,azimuth:a,zFactor:i,pixelSizeFactor:o,pixelSizePower:l,slopeType:u}=e;return{hillshadeType:n,altitude:r,azimuth:a,zFactor:i,pixelSizePower:l,pixelSizeFactor:o,scalingType:"scaled"===u?"adjusted":"none",resolution:t,isGCS:s}}s.d(t,["rk",0,i])},85676(e,t,s){s.d(t,{A:()=>f});var n=s(32198),r=s(25482),a=s(53966),i=s(91429),o=s(94778),l=s(47520),u=s(51927),c=s(51181),h=s(87186),d=s(67369),m=s(88178);let f=class extends r.o{constructor(e){super(e),this.lookup={rendererJSON:{}},this.canRenderInWebGL=!1}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e?.pixelBlock;if(!p(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let s;switch(t.pixels.length>3&&(t=t.extractBands(e.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":s=this._symbolizeColormap(t);break;case"classBreaks":s=this._symbolizeClassBreaks(t);break;case"rasterStretch":s=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const n=e.extent,r=n.spatialReference.isGeographic,a={x:(n.xmax-n.xmin)/t.width,y:(n.ymax-n.ymin)/t.height};s=this._symbolizeShadedRelief(t,{isGCS:r,resolution:a});break}}return s}catch(e){return a.A.getLogger(this).error("symbolize",e.message),t}}simpleStretch(e,t){if(!p(e))return e;try{return e.pixels.length>3&&(e=e.extractBands([0,1,2])),(0,u._N)(e,{...t,isRenderer:!0})}catch(t){return a.A.getLogger(this).error("symbolize",t.message),e}}generateWebGLParameters(e){const{rendererJSON:t}=this;switch(t.type){case"uniqueValue":case"rasterColormap":case"classBreaks":return this._generateColormapWebGLParams("classBreaks"===t.type);case"rasterStretch":return this._generateStretchWebGLParams(e.pixelBlock,t,e.bandIds);case"rasterShadedRelief":return this._generateShadedReliefWebGLParams(t,e.isGCS,e.resolution??void 0);case"vectorField":return this._generateVectorFieldWebGLParams(t);default:return null}}_isLUTChanged(e){const t=this.lookup.rendererJSON;if(!t)return!0;const{rendererJSON:s}=this;if("colorRamp"in s&&s.colorRamp){const n=s.colorRamp;if(e)return JSON.stringify(n)!==JSON.stringify(t.colorRamp)}return JSON.stringify(s)!==JSON.stringify(t)}_symbolizeColormap(e){return this._isLUTChanged()&&!this.bind().success?e:(0,l.qL)(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?e:t?(0,l.qL)(e,this.lookup.colormapLut):(0,l.Hx)(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){if(!e)return null;const{rasterInfo:s,lookup:n}=this,{pixelType:r,bandCount:a}=s,i=this.rendererJSON,o=["u8","u16","s8","s16"].includes(r);let c;const{dra:h}=i,{gamma:d}=n;if(h&&(t=null),"histogramEqualization"===i.stretchType){const r=h?null:n.histogramLut,a=(0,u.DP)(i,{rasterInfo:s,pixelBlock:e,bandIds:t,returnHistogramLut:!r}),o="u8"===s.pixelType&&!h&&(0,u.zt)(s.histograms?.[0])?e:(0,u._N)(e,{...a,gamma:d,isRenderer:!0});c=(0,l.eH)(o,{lut:h?a.histogramLut:t?.length?t.map(e=>r[e]):r,offset:0})}else if(o){let o;if(h){const n=(0,u.DP)(i,{rasterInfo:s,pixelBlock:e,bandIds:t});o=(0,u.RP)({pixelType:r,...n,gamma:d,rounding:"floor"})}else{if(this._isLUTChanged()&&!this.bind().success)return e;o=n.stretchLut}if(!o)return e;a>1&&null!=t&&t.length===e?.pixels.length&&o.lut.length===a&&(o={lut:t.map(e=>o.lut[e]),offset:o.offset}),c=(0,l.eH)(e,o)}else{const n=(0,u.DP)(i,{rasterInfo:s,pixelBlock:e,bandIds:t});c=(0,u._N)(e,{...n,gamma:d,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return e;c=(0,l.qL)(c,n.colormapLut)}return c}_symbolizeShadedRelief(e,t){const s=this.rendererJSON,n={...s,...t},r=(0,c.fw)(e,n);if(!s.colorRamp)return r;if(this._isLUTChanged(!0)&&!this.bind().success)return r;const{hsvMap:a}=this.lookup;if(!a)return r;const i=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,c.SC)(r,e,a,i),r}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:s,pixelType:n}=this.rasterInfo,r=e.field1;if(!r)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const a=e.defaultSymbol,i=1===t&&["u8","s8"].includes(n);if(!(0,m.hu)(this.rasterInfo,r)&&!i)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const o=[];if(null!=s){const t=s.fields.find(e=>"value"===e.name.toLowerCase());if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};s.features.forEach(s=>{const n=e.uniqueValueInfos?.find(e=>String(e.value)===String(s.attributes[r])),i=n?.symbol?.color;i?o.push([s.attributes[t.name]].concat(i)):a&&o.push([s.attributes[t.name]].concat(a.color))})}else{if("value"!==r.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not available.'};e.uniqueValueInfos?.forEach(e=>{const t=e?.symbol?.color;t?o.push([parseInt(""+e.value,10)].concat(t)):a&&o.push([parseInt(""+e.value,10)].concat(a?.color))})}if(0===o.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const u=(0,l.zg)({colormap:o});return this.lookup={rendererJSON:e,colormapLut:u},this.canRenderInWebGL=(0,m.WN)(u?.indexedColormap),{success:!0}}_updateColormapRenderer(e){if(!(0,m.FA)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map(e=>[e.value].concat(e.color)).sort((e,t)=>e[0]-t[0]);if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const s=(0,l.zg)({colormap:t});return this.lookup={rendererJSON:e,colormapLut:s},this.canRenderInWebGL=(0,m.WN)(s?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(e){if(!(0,m.iL)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){const t=(0,d.R8)(e.colorRamp,{interpolateAlpha:!0}),s=(0,l.zg)({colormap:t}),n=(0,d.S2)(s.indexedColormap);this.lookup={rendererJSON:e,colormapLut:s,hsvMap:n}}else this.lookup={rendererJSON:e};return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){const{attributeTable:t,pixelType:s}=this.rasterInfo,n=t?.fields.find(e=>"value"===e.name.toLowerCase()),r=t?.fields.find(t=>t.name.toLowerCase()===e.field.toLowerCase()),a=null!=n&&null!==r;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(s)||a,tableValueField:n,tableBreakField:r}}_updateClassBreaksRenderer(e){const{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:s,tableValueField:n,tableBreakField:r}=this._analyzeClassBreaks(e),a=e.classBreakInfos;if(!a?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const i=a.sort((e,t)=>e.classMaxValue-t.classMaxValue),u=i[i.length-1];let c=e.minValue;if(!s){const t=[];for(let e=0;e<i.length;e++)t.push({value:i[e].classMinValue??c,mappedColor:i[e].symbol.color}),c=i[e].classMaxValue;return t.push({value:u.classMaxValue,mappedColor:u.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const h=[];if(null!=t&&null!=n&&null!==r&&n!==r){const s=n.name,a=r.name,o=i[i.length-1],{classMaxValue:l}=o;c=e.minValue;for(const e of t.features){const t=e.attributes[s],n=e.attributes[a],r=n===l?o:n<c?null:i.find(({classMaxValue:e})=>e>n);r&&h.push([t].concat(r.symbol.color))}}else{const[t,s]=(0,o.hP)(this.rasterInfo.pixelType);c=Math.max(t,Math.floor(e.minValue));for(let e=0;e<i.length;e++){const t=i[e],n=Math.min(s,Math.ceil(t.classMaxValue));for(let e=c;e<n;e++)h.push([e].concat(t.symbol.color));c=n}u.classMaxValue!==c&&c!==s||h.push([c].concat(u.symbol.color))}const d=(0,l.zg)({colormap:h,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:d},this.canRenderInWebGL=(0,m.WN)(d?.indexedColormap),{success:!0}}_updateStretchRenderer(e){let{stretchType:t,dra:s}=e;if(!("none"===t||e.statistics?.length||function(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}(this.rasterInfo.statistics)||s))return{success:!1,error:"Unsupported renderer; StretchRenderer.customStatistics is required when dynamic range adjustment is not used."};const n=e.histograms||this.rasterInfo.histograms;!function(e){return"percentClip"===e||"histogramEqualization"===e}(e.stretchType)||n?.length||s||(t="minMax");const{computeGamma:r,useGamma:a,colorRamp:i}=e;let{gamma:o}=e;if(a&&r&&!o?.length){const t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;o=(0,u.fP)(this.rasterInfo.pixelType,t)}const c=this.rasterInfo.pixelType,h=!s&&["u8","u16","s8","s16"].includes(c);if("histogramEqualization"===t){const t=n.map(e=>(0,u.WF)(e));this.lookup={rendererJSON:e,histogramLut:t}}else if(h){const t=(0,u.DP)(e,{rasterInfo:this.rasterInfo}),s=(0,u.RP)({pixelType:c,...t,gamma:a?o:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:s}}else this.lookup={rendererJSON:e};if(i&&!function(e){return"algorithmic"===e.type&&["0,0,0,255","0,0,0"].includes(e.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(e.toColor.join(","))}(i)){const t=(0,d.R8)(i,{interpolateAlpha:!0});this.lookup.colormapLut=(0,l.zg)({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=a&&o?.length?o:null,this.canRenderInWebGL="histogramEqualization"!==t,{success:!0}}_generateColormapWebGLParams(e){const{indexedColormap:t,offset:s}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:s,isClassBreaks:e,type:"lut"}}_generateStretchWebGLParams(e,t,s){const{colormapLut:n}=this.lookup,r=t.colorRamp?n?.indexedColormap:null,a=t.colorRamp?n?.offset:null;"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:i}=this.lookup,o=!(!t.useGamma||!i?.some(e=>1!==e));let l=0;null!=e&&(l=e.getPlaneCount(),2===l&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const{bandCount:c}=this.rasterInfo,h=Math.min(3,s?.length||l||c,c),d=r||o?1:255,m=new Float32Array(h);if(o&&i)for(let e=0;e<h;e++)i[e]>1?i[e]>2?m[e]=6.5+(i[e]-2)**2.5:m[e]=6.5+100*(2-i[e])**4:m[e]=1;const f=o&&i?[i[0],i[1]??i[0],i[2]??i[0]]:[1,1,1],p=o?[m[0],m[1]??m[0],m[2]??m[0]]:[1,1,1];if(t.dra&&null==e&&("minMax"===t.stretchType||"standardDeviation"===t.stretchType))return{bandCount:h,minOutput:(t.min??0)/d,maxOutput:(t.max??255)/d,minCutOff:[0,0,0],maxCutOff:[1,1,1],factor:[1,1,1],useGamma:o,gamma:f,gammaCorrection:p,colormap:r,colormapOffset:a,stretchType:t.stretchType,dynamicRangeAdjustment:t.dra,numberOfStandardDeviations:t.numberOfStandardDeviations??2,type:"stretch"};const{minCutOff:g,maxCutOff:x,minOutput:y,maxOutput:b}=(0,u.DP)(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:s});1===g.length&&(g[2]=g[1]=g[0]),1===x.length&&(x[2]=x[1]=x[0]);const k=x.map((e,t)=>x[t]===g[t]?0:(b-y)/(x[t]-g[t])/d);return{bandCount:h,minOutput:y/d,maxOutput:b/d,minCutOff:g,maxCutOff:x,factor:k,useGamma:o,gamma:f,gammaCorrection:p,colormap:r,colormapOffset:a,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,s={x:0,y:0}){const{colormapLut:n}=this.lookup,r=e.colorRamp?n?.indexedColormap:null,a=e.colorRamp?n?.offset:null,i={...e,isGCS:t,resolution:s},o=(0,c.ng)(i),l=this.rasterInfo.statistics?.[0];return{...o,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:r,colormapOffset:a}}_generateVectorFieldWebGLParams(e){const{style:t,inputUnit:s,outputUnit:n,visualVariables:r,symbolTileSize:a,flowRepresentation:i}=e,o=this.rasterInfo.statistics?.[0].min??0,l=this.rasterInfo.statistics?.[0].max??50,u=r?.find(e=>"sizeInfo"===e.type)??{maxDataValue:l,maxSize:.8*a,minDataValue:o,minSize:.2*a},c=u.minDataValue??o,h=u.maxDataValue??l,d=null!=u.maxSize&&null!=u.minSize?[u.minSize/a,u.maxSize/a]:[.2,.8];if("wind_speed"===t){const e=(d[0]+d[1])/2;d[0]=d[1]=e}const m=null!=c&&null!=h?[c,h]:null;let f=null;if("classified_arrow"===t)if(null!=c&&null!=h&&null!=u){f=[];const e=(u.maxDataValue-u.minDataValue)/5;for(let t=0;t<6;t++)f.push(u.minDataValue+e*t)}else f=[0,1e-6,3.5,7,10.5,14];const p="flow_to"===i==("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,g=r?.find(e=>"rotationInfo"===e.type);return{breakValues:f,dataRange:m,inputUnit:s,outputUnit:n,symbolTileSize:a,symbolPercentRange:d,style:t||"single_arrow",rotation:p,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":g?.rotationType||e.rotationType,type:"vectorField"}}};function p(e){return(0,l.AB)(e)&&0!==e.validPixelCount}(0,n.Cg)([(0,i.MZ)({json:{write:!0}})],f.prototype,"rendererJSON",void 0),(0,n.Cg)([(0,i.MZ)({type:h.A,json:{write:!0}})],f.prototype,"rasterInfo",void 0),(0,n.Cg)([(0,i.MZ)({json:{write:!0}})],f.prototype,"lookup",void 0),(0,n.Cg)([(0,i.MZ)()],f.prototype,"canRenderInWebGL",void 0),f=(0,n.Cg)([(0,i.$K)("esri.renderers.support.RasterSymbolizer")],f)}}]);
|
|
Binary file
|
|
@@ -102,6 +102,13 @@
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
// Firefox will add scroll bars after the input has been interacted with when the input is contained in a
|
|
106
|
+
// calcite-panel. This prevents unnecessary scroll bars from appearing. This serves as a stop-gap until calcite
|
|
107
|
+
// can address https://github.com/Esri/calcite-design-system/issues/15187
|
|
108
|
+
calcite-autocomplete.esri-batch-attribute-form__input {
|
|
109
|
+
overflow: clip;
|
|
110
|
+
}
|
|
111
|
+
|
|
105
112
|
&__input--disabled {
|
|
106
113
|
background-color: var(--calcite-color-background);
|
|
107
114
|
font-weight: var(--calcite-font-weight-medium);
|