@arcgis/core 5.1.0-next.65 → 5.1.0-next.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +11 -1
- package/applications/KnowledgeStudio/generalSdkInternalAccess.js +1 -1
- package/applications/WebEditor/drawToolZSnapping.d.ts +17 -0
- package/applications/WebEditor/drawToolZSnapping.js +2 -0
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01be1315c60810651783.js +1 -0
- package/assets/esri/core/workers/chunks/02e8fc598ee09cf1b678.js +1 -0
- package/assets/esri/core/workers/chunks/0e90e9ea1ad587eb3495.js +1 -0
- package/assets/esri/core/workers/chunks/0f196ec93925dfefc69a.js +1 -0
- package/assets/esri/core/workers/chunks/12294f8c32c34788b6de.js +1 -0
- package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +1 -0
- package/assets/esri/core/workers/chunks/1515824f11ef5ab95378.js +1 -0
- package/assets/esri/core/workers/chunks/151c2766a4cacc6adbd6.js +1 -0
- package/assets/esri/core/workers/chunks/155f57fe9886ef322e2a.js +1 -0
- package/assets/esri/core/workers/chunks/170f4d83555d238e365b.js +1 -0
- package/assets/esri/core/workers/chunks/171cca726a763c770469.js +1 -0
- package/assets/esri/core/workers/chunks/17445fd8048966617d49.js +1 -0
- package/assets/esri/core/workers/chunks/1761dc5799850ca7b66c.js +1 -0
- package/assets/esri/core/workers/chunks/17d54e77001ccb48a258.js +1 -0
- package/assets/esri/core/workers/chunks/19afacc9a741038e4bfb.js +1 -0
- package/assets/esri/core/workers/chunks/1d8777266fb1c5cfca55.js +1 -0
- package/assets/esri/core/workers/chunks/1f16bc8c02d8c4b2f693.js +1 -0
- package/assets/esri/core/workers/chunks/1f76c06af4682c85bc21.js +1 -0
- package/assets/esri/core/workers/chunks/{9eef3cd5f519c8ae88c0.js → 205e957ffd7e95f530f7.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa6e1ad099b43a6f5501.js → 21a8e2a11ffacc226e2b.js} +1 -1
- package/assets/esri/core/workers/chunks/27262083d37fe623ca9c.js +1 -0
- package/assets/esri/core/workers/chunks/2a3145a595d19391bb8a.js +1 -0
- package/assets/esri/core/workers/chunks/2a65bbe6c63c384cbf5f.js +1 -0
- package/assets/esri/core/workers/chunks/{f550fc8c078ebd47d7a3.js → 2e1aecdf59ad3421bbad.js} +1 -1
- package/assets/esri/core/workers/chunks/{811b378fa5bf8a4d3d66.js → 2f8ed1e7c1b10cb30972.js} +1 -1
- package/assets/esri/core/workers/chunks/2fa69ca3ba8c442dd7d6.js +1 -0
- package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +1 -0
- package/assets/esri/core/workers/chunks/32e22d6eee9fed1f70b0.js +1 -0
- package/assets/esri/core/workers/chunks/38816f95e801f1c5bbad.js +1 -0
- package/assets/esri/core/workers/chunks/3d9032217347dadcbe41.js +1 -0
- package/assets/esri/core/workers/chunks/3f8e8f83ebda07d29ca8.js +1 -0
- package/assets/esri/core/workers/chunks/41396724040180d2537f.js +1 -0
- package/assets/esri/core/workers/chunks/{66baacbef23291eab853.js → 413d2fa54508e6f42c74.js} +1 -1
- package/assets/esri/core/workers/chunks/41e59d75ccb51a238739.js +1 -0
- package/assets/esri/core/workers/chunks/44016e1176629c36bc11.js +1 -0
- package/assets/esri/core/workers/chunks/4d069a0ebadb9c53b550.js +1 -0
- package/assets/esri/core/workers/chunks/4e7b084f7104deea1ddb.js +1 -0
- package/assets/esri/core/workers/chunks/4fd1bf82939e3bb9bc03.js +1 -0
- package/assets/esri/core/workers/chunks/{9c72127de7afcbaafbaf.js → 51852ef71ac04954fdae.js} +1 -1
- package/assets/esri/core/workers/chunks/549a51dedcc49f366e53.js +1 -0
- package/assets/esri/core/workers/chunks/{42e084704dea6e4135b6.js → 54c0306082d30d59cba2.js} +1 -1
- package/assets/esri/core/workers/chunks/56036327e721f9c42b33.js +1 -0
- package/assets/esri/core/workers/chunks/57cdd5d4ae073d5ca725.js +1 -0
- package/assets/esri/core/workers/chunks/5b9257c5359fa05f4f28.js +1 -0
- package/assets/esri/core/workers/chunks/5d574079f0e96e883aab.js +1 -0
- package/assets/esri/core/workers/chunks/5d967bcf71c05ddb1ab6.js +1 -0
- package/assets/esri/core/workers/chunks/5fccb372b4d5ee2f64cc.js +1 -0
- package/assets/esri/core/workers/chunks/61778185d702da468b00.js +1 -0
- package/assets/esri/core/workers/chunks/61794a861a9209b72622.js +1 -0
- package/assets/esri/core/workers/chunks/61b49cdaf288f36f9288.js +1 -0
- package/assets/esri/core/workers/chunks/{8ea67b502f9355dab7e9.js → 621ea864e2774f160d1c.js} +1 -1
- package/assets/esri/core/workers/chunks/644dd906bee3ef465ec0.js +1 -0
- package/assets/esri/core/workers/chunks/679086351352756b33c9.js +1 -0
- package/assets/esri/core/workers/chunks/681e97ebbf9c69c410c6.js +1 -0
- package/assets/esri/core/workers/chunks/684ea7f75a7a5fb52cde.js +1 -0
- package/assets/esri/core/workers/chunks/69520cad347947b09f21.js +1 -0
- package/assets/esri/core/workers/chunks/{c86b15f6a18880f921cd.js → 6a567755b67c06d16f21.js} +1 -1
- package/assets/esri/core/workers/chunks/{45f1e682668cffc00b44.js → 6c40b3c2b9071edb758d.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdf4c1f202cfddf0f226.js → 6d11ec355e5474b2968b.js} +1 -1
- package/assets/esri/core/workers/chunks/6e7bb6d3e739527116a4.js +1 -0
- package/assets/esri/core/workers/chunks/6ef3b8d67b498d655a99.js +1 -0
- package/assets/esri/core/workers/chunks/751f3cfb000045ac78bb.js +1 -0
- package/assets/esri/core/workers/chunks/{64ad6130de549083caba.js → 789357e0f79823f145dd.js} +1 -1
- package/assets/esri/core/workers/chunks/{b6d94cbd1c5adad2f247.js → 78fbfc03d9b827c3f767.js} +1 -1
- package/assets/esri/core/workers/chunks/79df97e3f5975b42dc4d.js +1 -0
- package/assets/esri/core/workers/chunks/{25e4568a3ff76f48ac5e.js → 7a56c836c89a8b978800.js} +1 -1
- package/assets/esri/core/workers/chunks/{af40e2e6eaf3d2226812.js → 7d73472696ec76458758.js} +1 -1
- package/assets/esri/core/workers/chunks/7e9b790fe01b89acdf6d.js +1 -0
- package/assets/esri/core/workers/chunks/7fb9a5bc22d7581f1d20.js +1 -0
- package/assets/esri/core/workers/chunks/{5c1abb46b9937a050c32.js → 7ffcd308087c35adda04.js} +1 -1
- package/assets/esri/core/workers/chunks/84eb889b9cce35dac2e5.js +1 -0
- package/assets/esri/core/workers/chunks/891d97d0da6361d63679.js +1 -0
- package/assets/esri/core/workers/chunks/8a0f254d45d00b293479.js +1 -0
- package/assets/esri/core/workers/chunks/8ede12f54b215c52cf3c.js +1 -0
- package/assets/esri/core/workers/chunks/8fed6becd107d2ed9bbd.js +1 -0
- package/assets/esri/core/workers/chunks/90cef6f96df7dc27db39.js +1 -0
- package/assets/esri/core/workers/chunks/921c30b7f4dfc3e018d9.js +1 -0
- package/assets/esri/core/workers/chunks/927773ed23b1fc245bf7.js +1 -0
- package/assets/esri/core/workers/chunks/{b056b4c79bcd542dd1d2.js → 9622a83b29acb768fcb5.js} +1 -1
- package/assets/esri/core/workers/chunks/97062996e1e4196cfa7c.js +1 -0
- package/assets/esri/core/workers/chunks/97210bcb5e3cf3ac961b.js +1 -0
- package/assets/esri/core/workers/chunks/9c819ebdc98ed8b6afcf.js +1 -0
- package/assets/esri/core/workers/chunks/9dfd00972c12a4adc15d.js +1 -0
- package/assets/esri/core/workers/chunks/9fab410b9fa668dc498b.js +1 -0
- package/assets/esri/core/workers/chunks/a118de5a163ae42bee60.js +1 -0
- package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +1 -0
- package/assets/esri/core/workers/chunks/a59db907ec1e31002100.js +1 -0
- package/assets/esri/core/workers/chunks/a5b395e518e4c5fc95d0.js +1414 -0
- package/assets/esri/core/workers/chunks/a5d9dbb1fef8c4465943.js +1 -0
- package/assets/esri/core/workers/chunks/{62c2757f5dc4aaca2df8.js → a73e8b80760dc88f926f.js} +1 -1
- package/assets/esri/core/workers/chunks/{32e9e92bbbd000fbbaf7.js → a8ef9ed9b59de95f2b23.js} +2 -2
- package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +1 -0
- package/assets/esri/core/workers/chunks/{0f3b8a08f843a080af0d.js → abd5c1d4b7b91d9ea1eb.js} +1 -1
- package/assets/esri/core/workers/chunks/af007ec833ab49e4c958.js +1 -0
- package/assets/esri/core/workers/chunks/afea4a4b072c329d3749.js +1 -0
- package/assets/esri/core/workers/chunks/b4fb4484fa39eede1f62.js +1 -0
- package/assets/esri/core/workers/chunks/b50a42a9f96515beb929.js +1 -0
- package/assets/esri/core/workers/chunks/{4eca871ca51a59f6540a.js → b5648a0b92cf1a2c81ad.js} +1 -1
- package/assets/esri/core/workers/chunks/b8bf3e8b8b870f69f231.js +1 -0
- package/assets/esri/core/workers/chunks/b8e85b7d5eed6e7c79b5.js +1 -0
- package/assets/esri/core/workers/chunks/{fd629a3ab558adf52617.js → bc2c7cb99e227ddbd3a6.js} +1 -1
- package/assets/esri/core/workers/chunks/bc85bb82cfcbc216fa31.js +1 -0
- package/assets/esri/core/workers/chunks/be1e4c3ec53fc92a26f1.js +1 -0
- package/assets/esri/core/workers/chunks/be4d13088a557b7de4b1.js +1 -0
- package/assets/esri/core/workers/chunks/bf758d57091fa534c1f8.js +1 -0
- package/assets/esri/core/workers/chunks/bfd516c37fb717e14d71.js +1 -0
- package/assets/esri/core/workers/chunks/c22945637a40355fbe61.js +1 -0
- package/assets/esri/core/workers/chunks/c25a58d9f94aaa96957d.js +1 -0
- package/assets/esri/core/workers/chunks/c4e936879c6cb25cf586.js +1 -0
- package/assets/esri/core/workers/chunks/c6a43f748dbf8bac4bb5.js +1 -0
- package/assets/esri/core/workers/chunks/c9461568e1002ebac534.js +1 -0
- package/assets/esri/core/workers/chunks/cb9185ed31109781fe59.js +1 -0
- package/assets/esri/core/workers/chunks/d21fdd67477800101f3b.js +1 -0
- package/assets/esri/core/workers/chunks/d264aed5dbe09e34040f.js +1 -0
- package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +1 -0
- package/assets/esri/core/workers/chunks/d4465fd3319d0b6a26cc.js +1 -0
- package/assets/esri/core/workers/chunks/{13eb0162d95b4d27389c.js → d598d08dbf2796742e8c.js} +1 -1
- package/assets/esri/core/workers/chunks/d5c7ebfd5c2ca635a7a8.js +1 -0
- package/assets/esri/core/workers/chunks/{d4368e281c12fa7c17c5.js → d635f97b7b82a37482d6.js} +1 -1
- package/assets/esri/core/workers/chunks/d7b92bd9198dd3b27eb5.js +1 -0
- package/assets/esri/core/workers/chunks/d83ac66478a419e08af6.js +1 -0
- package/assets/esri/core/workers/chunks/d8dde0d1759e009b8373.js +1 -0
- package/assets/esri/core/workers/chunks/d94dfb2ce31e59b3306b.js +1 -0
- package/assets/esri/core/workers/chunks/e0fcb5fa0e9f21fde2b6.js +1 -0
- package/assets/esri/core/workers/chunks/{9d289cee96e7c7fe1029.js → e268e5be096392c2e69b.js} +1 -1
- package/assets/esri/core/workers/chunks/e305ced975d885c28e7e.js +1 -0
- package/assets/esri/core/workers/chunks/e3c60b7df2740e600066.js +1 -0
- package/assets/esri/core/workers/chunks/e611cd03eee4fae7c413.js +1 -0
- package/assets/esri/core/workers/chunks/e64a92b6f4075616f40f.js +1 -0
- package/assets/esri/core/workers/chunks/e78b442417f6a903b9b1.js +1 -0
- package/assets/esri/core/workers/chunks/{ba72989749543122a6fe.js → e9f2b573f482718306e6.js} +1 -1
- package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +1 -0
- package/assets/esri/core/workers/chunks/eb7392799a01c2a8497a.js +1 -0
- package/assets/esri/core/workers/chunks/{c17c3453d014dc73fe0b.js → ef013a77950c1902de11.js} +1 -1
- package/assets/esri/core/workers/chunks/ef0fe4e1a9e960a74c60.js +1 -0
- package/assets/esri/core/workers/chunks/efbbcf467b2a27a92b85.js +1 -0
- package/assets/esri/core/workers/chunks/f201edf9b68717a6106d.js +1 -0
- package/assets/esri/core/workers/chunks/f43a63094190d2074cd0.js +1 -0
- package/assets/esri/core/workers/chunks/f59f1db572be1f19887f.js +1 -0
- package/assets/esri/core/workers/chunks/{dc07dc1cd30edc0c4193.js → f62e42659b406435573d.js} +1 -1
- package/assets/esri/core/workers/chunks/fa160a2a5dc9f5a7c34b.js +1 -0
- package/assets/esri/core/workers/chunks/fa7ae035472540999721.js +1 -0
- package/assets/esri/core/workers/chunks/fe3b42eadcdd9ba54f05.js +1 -0
- package/assets/esri/core/workers/chunks/fee31d9297648219375d.js +1 -0
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ar.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bg.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ca.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_cs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_da.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_de.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_el.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_es.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_et.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_he.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hu.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_id.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_it.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ja.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ko.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lt.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_no.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-BR.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-PT.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ro.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ru.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_th.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_tr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_uk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_vi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-CN.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-HK.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-TW.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
- package/chunks/ComponentShader.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +13 -3
- package/chunks/OITDim.glsl.js +3 -2
- package/chunks/Path.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +2 -2
- package/chunks/ShadowHighlight.glsl.js +3 -3
- package/chunks/ShadowHighlightBuffer.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/Water.glsl.js +1 -1
- package/config.js +1 -1
- package/core/timeUtils.js +1 -1
- package/core/workers/Connection.js +1 -1
- package/form/elements/FieldElement.d.ts +2 -2
- package/form/elements/inputs/DateTimeOffsetPickerInput.d.ts +1 -1
- package/form/elements/inputs/DateTimeOffsetPickerInput.js +1 -1
- package/form/elements/inputs/Input.d.ts +1 -1
- package/form/elements/inputs/inputUtils.js +1 -1
- package/form/elements/inputs.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/interfaces.d.ts +4 -9
- package/intl.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +7 -0
- package/layers/FeatureLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/raster/datasets/MRFRaster.js +1 -1
- package/layers/raster/functions/changeDetectionUtils.js +1 -1
- package/layers/support/ExportImageServiceParameters.js +1 -1
- package/layers/support/SymbolLayerDrawing.d.ts +15 -0
- package/layers/support/SymbolLayerDrawing.js +2 -0
- package/networks/UnitIdentifierManager.d.ts +61 -0
- package/networks/UnitIdentifierManager.js +1 -1
- package/networks/UtilityNetwork.d.ts +0 -60
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/jsonTypes.d.ts +36 -11
- package/package.json +4 -4
- package/popup/Feature.d.ts +14 -4
- package/popup/Features.d.ts +88 -242
- package/popup/Features.js +1 -1
- package/popup/actionUtils.js +2 -0
- package/popup/actions.js +2 -0
- package/popup/support/FeatureAbilities.d.ts +45 -9
- package/popup/types.d.ts +11 -67
- package/rest/featureService/types.d.ts +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/basemapDefinitions.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/types.d.ts +6 -0
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
- package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightSurfaces.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/support/DisplayGL.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/QueryEngine.js +1 -1
- package/views/3d/layers/graphics/QueryEngineContext.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
- package/views/3d/layers/support/SceneLayerViewRequiredFields.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/terrain/support/MultiSizeFramebuffer.js +1 -1
- package/views/3d/webgl/ManagedFBO.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +18 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDim.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/analysis/ExclusiveOperationManager.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/support/InteractiveHandle.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/drawUtils.js +1 -1
- package/views/draw/support/reshapeTooltipUtils.js +1 -1
- package/views/draw/support/types.d.ts +9 -1
- package/views/interactive/sketch/SketchOptions.d.ts +34 -0
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureViewModel.d.ts +14 -4
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureTable/ColumnVisibilityMenuVisibleElements.d.ts +8 -1
- package/widgets/FeatureTable/ColumnVisibilityMenuVisibleElements.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable.d.ts +13 -0
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesViewModel.d.ts +16 -5
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup/PopupViewModel.d.ts +2 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Popup.d.ts +13 -4
- package/widgets/Popup.js +1 -1
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +0 -1
- package/assets/esri/core/workers/chunks/05c8d2c0362af4511d86.js +0 -1
- package/assets/esri/core/workers/chunks/06868e4f52de9d918255.js +0 -1
- package/assets/esri/core/workers/chunks/06c0b93e276cfc1fb7ac.js +0 -1
- package/assets/esri/core/workers/chunks/0888baa99c9007ad63bc.js +0 -1
- package/assets/esri/core/workers/chunks/0de66f13e84830a654fb.js +0 -1
- package/assets/esri/core/workers/chunks/0f597c690e5c60fe944b.js +0 -1
- package/assets/esri/core/workers/chunks/0f8736242544f9e9a57a.js +0 -1
- package/assets/esri/core/workers/chunks/0ff12fe9e358100668d9.js +0 -1
- package/assets/esri/core/workers/chunks/11a8541f3909f9ffb000.js +0 -1
- package/assets/esri/core/workers/chunks/13a009229c96ecb7b04f.js +0 -1
- package/assets/esri/core/workers/chunks/185f59f90070d5d6ac94.js +0 -1
- package/assets/esri/core/workers/chunks/190bc75254bc0542a6be.js +0 -1
- package/assets/esri/core/workers/chunks/1af247c86d1c4ae8fef3.js +0 -1
- package/assets/esri/core/workers/chunks/2339465190c9d5ede25f.js +0 -1
- package/assets/esri/core/workers/chunks/23eb204d3cb818adea32.js +0 -1
- package/assets/esri/core/workers/chunks/241ef4a1bea20b49d812.js +0 -1
- package/assets/esri/core/workers/chunks/254898b41cabe313b6ce.js +0 -1
- package/assets/esri/core/workers/chunks/2669a7195f1de21a9cf3.js +0 -1
- package/assets/esri/core/workers/chunks/2a2d5f9ea42cb2eee9c6.js +0 -1
- package/assets/esri/core/workers/chunks/2a7e7a497823e9f05aa3.js +0 -1
- package/assets/esri/core/workers/chunks/31e0bfc2cab055aebf9a.js +0 -1
- package/assets/esri/core/workers/chunks/32360a55d1836b2a737e.js +0 -1
- package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +0 -1
- package/assets/esri/core/workers/chunks/34acecd7a314fed12335.js +0 -1
- package/assets/esri/core/workers/chunks/34fe4570eef9e73839b8.js +0 -1
- package/assets/esri/core/workers/chunks/368b4c0a5eecbb06feac.js +0 -1
- package/assets/esri/core/workers/chunks/37729578a7c4cf15eded.js +0 -1
- package/assets/esri/core/workers/chunks/3af1e2f0b3d30c58d0c2.js +0 -1
- package/assets/esri/core/workers/chunks/3c155efd5768003a91eb.js +0 -1
- package/assets/esri/core/workers/chunks/3d4bb59ab2f644f4d675.js +0 -1
- package/assets/esri/core/workers/chunks/3f0d9fdd8c37605dd85d.js +0 -1
- package/assets/esri/core/workers/chunks/48eca6f51112ba80bd3b.js +0 -1
- package/assets/esri/core/workers/chunks/4b5737021a149aa786af.js +0 -1
- package/assets/esri/core/workers/chunks/55214e1d9f3d98fa7ed9.js +0 -1
- package/assets/esri/core/workers/chunks/55a0b69cf034ac32fc25.js +0 -1
- package/assets/esri/core/workers/chunks/576a1784e93c5406e657.js +0 -1
- package/assets/esri/core/workers/chunks/59289867cce97da74e39.js +0 -1
- package/assets/esri/core/workers/chunks/5a6d6082c5bcb1a80eda.js +0 -1
- package/assets/esri/core/workers/chunks/5a9620cb66c8e64e4668.js +0 -1
- package/assets/esri/core/workers/chunks/5eeb6d3a7b815d41621e.js +0 -1
- package/assets/esri/core/workers/chunks/5f06a57b4f7d7de16bbf.js +0 -1
- package/assets/esri/core/workers/chunks/5f2e246ffcbdedea4de5.js +0 -1
- package/assets/esri/core/workers/chunks/5ff41f43e57be0557541.js +0 -1414
- package/assets/esri/core/workers/chunks/6b32b3f98872771ff81e.js +0 -1
- package/assets/esri/core/workers/chunks/6be9d00839002f24fafd.js +0 -1
- package/assets/esri/core/workers/chunks/6c886f19875291d02407.js +0 -1
- package/assets/esri/core/workers/chunks/77f6659e400064d38130.js +0 -1
- package/assets/esri/core/workers/chunks/78c7eace6ec3fa5c7413.js +0 -1
- package/assets/esri/core/workers/chunks/7cee28575fd57430cf02.js +0 -1
- package/assets/esri/core/workers/chunks/82e0691995d821137d5f.js +0 -1
- package/assets/esri/core/workers/chunks/8435b6bf356959009b76.js +0 -1
- package/assets/esri/core/workers/chunks/8677865189081e0b83bc.js +0 -1
- package/assets/esri/core/workers/chunks/86f1aa2c108f5224d8b5.js +0 -1
- package/assets/esri/core/workers/chunks/86f70bd786d6d57fde69.js +0 -1
- package/assets/esri/core/workers/chunks/8878ab87ef7961fafae8.js +0 -1
- package/assets/esri/core/workers/chunks/8a893f23827769d42092.js +0 -1
- package/assets/esri/core/workers/chunks/8d1d0c3f0532aa98487d.js +0 -1
- package/assets/esri/core/workers/chunks/8e68b4628e9616356c34.js +0 -1
- package/assets/esri/core/workers/chunks/8edae79554843dd77ada.js +0 -1
- package/assets/esri/core/workers/chunks/9032c040b214b5af775b.js +0 -1
- package/assets/esri/core/workers/chunks/909ef35fa33be2b6da41.js +0 -1
- package/assets/esri/core/workers/chunks/90b7acc70adba193b215.js +0 -1
- package/assets/esri/core/workers/chunks/91718795fc4ca6516ac7.js +0 -1
- package/assets/esri/core/workers/chunks/92d4e962284e13ba2fc5.js +0 -1
- package/assets/esri/core/workers/chunks/94f80c46ccf5e19038b8.js +0 -1
- package/assets/esri/core/workers/chunks/979c2f52b6d6e1e8241b.js +0 -1
- package/assets/esri/core/workers/chunks/97f10efb0fe05bedcebd.js +0 -1
- package/assets/esri/core/workers/chunks/98f5bf1b91f3696b2fce.js +0 -1
- package/assets/esri/core/workers/chunks/9c52d4b54dfdb69dee29.js +0 -1
- package/assets/esri/core/workers/chunks/9de8149ae0a0726a4ab2.js +0 -1
- package/assets/esri/core/workers/chunks/9def5d17b94e5db71883.js +0 -1
- package/assets/esri/core/workers/chunks/9f272445c285ee9abb7b.js +0 -1
- package/assets/esri/core/workers/chunks/a10be7eb05a007fff1ed.js +0 -1
- package/assets/esri/core/workers/chunks/a32c87b89567a9fd1efc.js +0 -1
- package/assets/esri/core/workers/chunks/a3b29eca5807978fb2a3.js +0 -1
- package/assets/esri/core/workers/chunks/a446dff865332268625a.js +0 -1
- package/assets/esri/core/workers/chunks/a5bf2718c02a0e645013.js +0 -1
- package/assets/esri/core/workers/chunks/a6d166058e3025bb280e.js +0 -1
- package/assets/esri/core/workers/chunks/a8e111a5cfd6151d5dbb.js +0 -1
- package/assets/esri/core/workers/chunks/a971e61336f455b953d5.js +0 -1
- package/assets/esri/core/workers/chunks/aed45f7e7eee154a21b8.js +0 -1
- package/assets/esri/core/workers/chunks/af3bd661b355eed3da21.js +0 -1
- package/assets/esri/core/workers/chunks/b0f2ce61d3cad413898e.js +0 -1
- package/assets/esri/core/workers/chunks/b2b77598048818c957b7.js +0 -1
- package/assets/esri/core/workers/chunks/b744b950999b92393e37.js +0 -1
- package/assets/esri/core/workers/chunks/b75165880704efccc47c.js +0 -1
- package/assets/esri/core/workers/chunks/ba9e107edc2027238be3.js +0 -1
- package/assets/esri/core/workers/chunks/bc3b22dc08c147b8d425.js +0 -1
- package/assets/esri/core/workers/chunks/c08e9914deb1dc62bc0f.js +0 -1
- package/assets/esri/core/workers/chunks/c0bb53d8d58ad18334d3.js +0 -1
- package/assets/esri/core/workers/chunks/c0d453f93af2d4a6ce64.js +0 -1
- package/assets/esri/core/workers/chunks/c9a42d86185a0ad35dd1.js +0 -1
- package/assets/esri/core/workers/chunks/cbb50415f7de8746ee1a.js +0 -1
- package/assets/esri/core/workers/chunks/d23dd7da45a7aa341540.js +0 -1
- package/assets/esri/core/workers/chunks/d2801df3fa44dee15ec8.js +0 -1
- package/assets/esri/core/workers/chunks/d53b31c9056f82831bc0.js +0 -1
- package/assets/esri/core/workers/chunks/d626e08d23330d84413b.js +0 -1
- package/assets/esri/core/workers/chunks/d9d69cf2496ebe76eade.js +0 -1
- package/assets/esri/core/workers/chunks/db6e03fe8dd316f5005f.js +0 -1
- package/assets/esri/core/workers/chunks/de79645e559a2d1ffa67.js +0 -1
- package/assets/esri/core/workers/chunks/e2779965db231fb666a5.js +0 -1
- package/assets/esri/core/workers/chunks/e4e2f059c52674dcae5b.js +0 -1
- package/assets/esri/core/workers/chunks/e622a23034f055de8b55.js +0 -1
- package/assets/esri/core/workers/chunks/ec21311584e4fb13e510.js +0 -1
- package/assets/esri/core/workers/chunks/ec9d5dcf2a0a11c85341.js +0 -1
- package/assets/esri/core/workers/chunks/eca45cd479f7fd28ca6e.js +0 -1
- package/assets/esri/core/workers/chunks/ed60b5eaa5765bfcb99c.js +0 -1
- package/assets/esri/core/workers/chunks/efdd75896ca53eb6242f.js +0 -1
- package/assets/esri/core/workers/chunks/f1c348cf2a1e35da9b20.js +0 -1
- package/assets/esri/core/workers/chunks/f4053e4e2d6e678db48a.js +0 -1
- package/assets/esri/core/workers/chunks/f4d577ff61da7964e08a.js +0 -1
- package/assets/esri/core/workers/chunks/f7da652f8dab57677cc3.js +0 -1
- package/assets/esri/core/workers/chunks/fe92f54e45fd21ccd75f.js +0 -1
- package/assets/esri/core/workers/chunks/fee1d873127dca02459f.js +0 -1
- package/assets/esri/core/workers/chunks/ff31936236dd9b1acb24.js +0 -1
- /package/assets/esri/core/workers/chunks/{32e9e92bbbd000fbbaf7.js.LICENSE.txt → a8ef9ed9b59de95f2b23.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9235],{34930(t,e,s){s.d(e,{$Q:()=>a,Sd:()=>u,b7:()=>l});var n=s(86211),r=s(5443),o=s(86738),i=s(14140);async function a(t,e,n){if("extent"===n.type)return function(t,e,s){const{width:n,height:r}=t,o=new Uint8Array(n*r),a=e.width/n,u=e.height/r;if(s.width/a<.5||s.height/u<.5)return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,pixels:[...t.pixels]});const{xmin:l,xmax:c,ymin:p,ymax:h}=e,{xmin:m,xmax:d,ymin:g,ymax:f}=s,y=Math.max(l,m),x=Math.min(c,d),w=Math.max(p,g),A=Math.min(h,f),v=.5*a,C=.5*u;if(x-y<v||A-w<C||x<l+v||y>c-v||w>h-C||A<p+C)return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,pixels:[...t.pixels]});const b=Math.max(0,(y-l)/a),M=Math.min(n,Math.max(0,(x-l)/a)),T=Math.max(0,(h-A)/u),P=Math.min(r,Math.max(0,(h-w)/u)),N=Math.round(b),I=Math.round(M)-1,R=Math.round(T),F=Math.round(P)-1;if(N===I&&b%1>.5&&M%1<.5||R===F&&T%1>.5&&P%1<.5)return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,pixels:[...t.pixels]});if(0===N&&0===R&&I===n&&F===r)return t;const k=t.mask;for(let t=R;t<=F;t++)for(let e=N;e<=I;e++){const s=t*n+e;o[s]=k?k[s]:255}return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,pixels:[...t.pixels]})}(t,e,n);const{width:r,height:o}=t,a=new Uint8Array(r*o);return(await Promise.all([s.e(3661),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(1132)]).then(s.bind(s,25275))).execute(e,n)?"polyline"===n.type?function(t,e,s){const{width:n,height:r}=t,o=new Uint8Array(n*r),a=e.width/n,u=e.height/r,{xmin:l,ymax:c}=e,{paths:p}=s,h=t.mask;for(let t=0;t<p.length;t++){const e=p[t];for(let t=0;t<e.length-1;t++){const[s,i]=e[t],[p,m]=e[t+1],d=Math.min(i,m),g=Math.max(i,m),f=Math.max(0,Math.floor((c-g)/u)),y=Math.min(r-1,Math.floor((c-d)/u));if(!(y<f))if(f===y){const t=Math.min(s,p),e=Math.max(s,p),r=Math.max(0,Math.floor((t-l)/a)),i=Math.min(n-1,Math.floor((e-l)/a));if(i<r)continue;const u=f*n;for(let t=u+r;t<=u+i;t++)o[t]=h?h[t]:255}else{const t=(s-l)/a,e=(p-s)/(m-i)/a,r=u*e;for(let s=f;s<=y;s++){const a=e*(c-s*u-i)+t,l=Math.max(0,Math.floor(r>0?a-r:a)),p=Math.min(n-1,Math.floor(r>0?a:a-r));if(p<l)continue;const m=s*n;for(let t=m+l;t<=m+p;t++)o[t]=h?h[t]:255}}}}return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,pixels:[...t.pixels]})}(t,e,n):(await Promise.all([s.e(3661),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(6671)]).then(s.bind(s,30912))).execute(n,e)?t:function(t,e,s){if(!t)return t;const{width:n,height:r}=t,o=function(t){const{geometry:e,size:s,srcExtent:n,srcMask:r}=t,[o,i]=s;let a;const u=n.width/o,l=n.height/i,{xmin:c,ymax:p}=n;if("extent"===e.type){const t=(e.xmin-c)/u,s=(e.xmax-c)/u,n=(p-e.ymax)/l,r=(p-e.ymin)/l;a=[[[t,n],[t,r],[s,r],[s,n],[t,n]]]}else a=e.rings.map(t=>t.map(([t,e])=>[(t-c)/u,(p-e)/l]));return function(t,e,s){const[n,r]=e,o=new OffscreenCanvas(n,r).getContext("2d");o.fillStyle="#f00",o.beginPath(),t.forEach(t=>{o.moveTo(t[0][0],t[0][1]);for(let e=0;e<t.length;e++)o.lineTo(t[e][0],t[e][1]);o.closePath()}),o.fill();const i=o.getImageData(0,0,n,r).data,a=n*r,u=new Uint8Array(a);let l=!1;for(let t=0;t<a;t++)s&&!s[t]||(i[4*t+3]>127?u[t]=255:l=!0);return l||s?u:void 0}(a,s,r)}({geometry:s,size:[n,r],srcExtent:e,srcMask:t.mask});return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,maskIsAlpha:!1,pixels:[...t.pixels]})}(t,e,n):new i.A({pixelType:t.pixelType,width:r,height:o,mask:a,maskIsAlpha:!1,pixels:[...t.pixels]})}function u(t,e){const{extent:s}=l(t,e,new o.A({x:t.pixelSize.x,y:t.pixelSize.y,spatialReference:t.spatialReference})),{extent:n}=t.extent;if(s.xmax=Math.min(s.xmax,n.xmax),s.ymax=Math.min(s.ymax,n.ymax),s.xmin<s.xmax&&s.ymin<s.ymax){const{x:e,y:n}=t.pixelSize,r=Math.round(s.width/e),o=Math.round(s.height/n);t.extent=s,t.width=r,t.height=o}}function l(t,e,s,o=!0){const{spatialReference:i}=t,{x:a,y:u}=function(t,e){if(t.spatialReference.equals(e))return t;const s=(0,n.GA)(t.spatialReference),r=(0,n.GA)(e);if(s===r)return t;const o=s/r;return{x:t.x*o,y:t.y*o}}(s,i);let l,c,p;const h="extent"===e.type?e:e.extent;let{xmin:m,xmax:d,ymax:g,ymin:f}=h;const{xmin:y,ymax:x}=t.extent;return o?(m=y+(m>y?a*Math.round((m-y)/a):0),g=x-(g<x?u*Math.round((x-g)/u):0),d=y+(d>y?a*Math.round((d-y)/a):0),f=x-(f<x?u*Math.round((x-f)/u):0),l=new r.A({xmin:m,ymax:g,xmax:d,ymin:f,spatialReference:i}),c=Math.round(l.width/a),p=Math.round(l.height/u)):(c=Math.floor((d-m)/a+.8),p=Math.floor((g-f)/u+.8),m=y+(m>y?a*Math.floor((m-y)/a+.1):0),g=x-(g<x?u*Math.floor((x-g)/u+.1):0),d=m+c*a,f=g-p*u,l=new r.A({xmin:m,ymax:g,xmax:d,ymin:f,spatialReference:i})),{extent:l,width:c,height:p}}},99235(t,e,s){s.d(e,{vt:()=>Un,UD:()=>Vn});var n=s(85334),r=s(49186),o=s(4718),i=s(5482),a=s(91429),u=s(94778),l=s(25482);let c=class extends l.o{constructor(){super(...arguments),this.raster=void 0}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"raster",void 0),c=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseFunctionArguments")],c);const p=c;var h;let m=h=class extends p{constructor(){super(...arguments),this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new h({raster:this.raster,raster2:this.raster2,operation:this.operation})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"operation",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"raster2",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"rasters",null),m=h=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunctionArguments")],m);const d=m;var g=s(14140),f=s(87186);const y=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let x=class extends l.o{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.rawSourceRasterInfos=null,this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this.isRoot=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const e=[t],{parameters:s}=t;let n=s.rasters||s.raster&&[s.raster];for(;n?.length;){e.unshift(...n);const t=[];for(let e=0;e<n.length;e++){const{parameters:s}=n[e],r=s.rasters||s.raster&&[s.raster];r?.length&&t.push(...r)}n=t}for(let t=e.length-1;t>=0;t--)e[t].isNoopProcess&&e.splice(t,1);let r=!1;for(let t=0;t<e.length;t++){const s=e[t];s.id=e.length-t-1;const{rasters:n}=s.parameters;r=r||null!=n&&n.length>1}const o=e.some(({name:t})=>y.has(t.toLowerCase())),{rawSourceRasterInfos:i}=this;return{functions:e,hasBranches:r,hasFocalFunction:o,isSourceSingleBand:1===i?.[0]?.bandCount}}get neighborhoodSize(){let{rows:t,cols:e}=this._getNeighborhoodSize();const s=this.getImmediateChildFunctions();for(const n of s){const s=n.neighborhoodSize;t=Math.max(t,s.rows),e=Math.max(e,s.cols)}return{rows:t,cols:e}}bind(t,e=!1,s=-1){this.id=s+1;const n=this._getRasterValues();let r=!0;for(let s=0;s<n.length;s++){const o=n[s];if(null!=o&&this._isRasterFunctionValue(o)){const n=o.bind(t,e,this.id+s);if(!n.success)return this._bindingResult=n,n;r=r&&n.supportsGPU}}return!this.rasterInfo||e?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),r&&=this._bindingResult.supportsGPU,this._bindingResult.success&&(this._patchRasterInfo(),r&&this.isRoot)&&(this.processInputBandIds(),this.swizzleInputBandIds(this.rawInputBandIds)||(r=this.rawInputBandIds.length<=3)),this._bindingResult.supportsGPU=r,this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this._bindingResult)}queryRasterFunction(t){const e=[this];for(;e.length;){const s=e.pop();if(t(s))return s;const n=s.getImmediateChildFunctions();e.push(...n)}}getImmediateChildFunctions(){return this._getRasterValues().filter(t=>t&&"object"==typeof t&&"bind"in t)}process(t,e){const s=this._getRasterValues(),n=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map(s=>this._readRasterValue(s,t,e));return this._processPixels({...t,pixelBlocks:n},e)}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);if(t.length>1){const e=t.map(t=>t.processInputBandIds());return this.rawInputBandIds=[...new Set(e.flat())],this.rawInputBandIds}const e=t[0];if(e)return this.rawInputBandIds=e.processInputBandIds(),this.rawInputBandIds;const{bandCount:s}=this.sourceRasterInfos[0],n=Array.from({length:s},(t,e)=>e);return this.rawInputBandIds=this._getInputBandIds(n),this.rawInputBandIds}swizzleInputBandIds(t){const e=this._getRasterValues().filter(this._isRasterFunctionValue);let s=!0;for(const n of e)s=n.swizzleInputBandIds(t)&&s;return!!s&&this._swizzleBandIds(t)}getPrimaryRasters(){const t=[],e=[];return this._getPrimaryRasters(this,t,e),{rasters:t,rasterIds:e}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:e,rasters:s}=this.functionArguments;return s&&Array.isArray(s)&&s.length?(t.rasters=s.map(t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}),t.rasters.some(t=>null!=t)||(t.rasters=null)):this._isRasterFunctionValue(e)&&(t.raster=e.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getClippingGeometries(){const t=[];"Clip"===this.functionName&&t.push(this.functionArguments);const{raster:e,rasters:s}=this.functionArguments;if(s&&Array.isArray(s)&&s.length)s.forEach(e=>{if(this._isRasterFunctionValue(e)){const s=e.getClippingGeometries();t.push(...s)}});else if(this._isRasterFunctionValue(e)){const s=e.getClippingGeometries();t.push(...s)}return t}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_swizzleBandIds(t){return!0}_isInputRasterPrimaryOrConstant(){return!this._getRasterValues().some(t=>t&&"object"==typeof t&&"rasterFunction"in t&&t.rasterFunction)}_getNeighborhoodSize(){return{rows:1,cols:1}}_removeStatsHistColormapVAT(t){t.statistics=null,t.histograms=null,t.colormap=null,t.attributeTable=null,t.multidimensionalInfo?.variables.forEach(t=>{t.statistics=void 0,t.histograms=void 0})}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.flatMap(t=>this.functionArguments[t])}_getSourceRasterInfos(t){const e=this._getRasterValues(),{rasterInfos:s,rasterIds:n}=t;if(0===e.length)return s;const r=e.map(t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&n.includes(t)?s[n.indexOf(t)]:"number"!=typeof t?s[0]:void 0),o=r.find(t=>t)??s[0];return r.forEach((t,e)=>{void 0===t&&(r[e]=o)}),r}_getPrimaryRasterId(t){return t?.rasterId}_getPrimaryRasters(t,e=[],s=[]){for(let n=0;n<t.sourceRasters.length;n++){const r=t.sourceRasters[n];if("number"!=typeof r)if("bind"in r)this._getPrimaryRasters(r,e,s);else{const t=r,n=this._getPrimaryRasterId(t);if(null==n)continue;s.includes(n)||(this.mainPrimaryRasterId===n?(e.unshift(t),s.unshift(n)):(e.push(t),s.push(n)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,e,s){const{primaryPixelBlocks:n}=e;if(null==t||"$$"===t){const t=n[0];return null==t?null:t.clone()}if("string"==typeof t){const s=e.primaryRasterIds.indexOf(t);return-1===s?null:n[s]}if("number"==typeof t){const e=n[0];if(null==e)return null;const{width:s,height:r,pixelType:o}=e,i=new Float32Array(s*r);i.fill(t);const a=this.sourceRasterInfos[0].bandCount,u=new Array(a).fill(i);return new g.A({width:s,height:r,pixelType:o,pixels:u})}return t.process(e,s)}_patchRasterInfo(){const{rasterInfo:t}=this;if(!t?.keyProperties)return;const{bandCount:e,keyProperties:s,statistics:n,histograms:r}=t,o=s.BandProperties;o&&o.length!==e&&(t.keyProperties={...s,BandProperties:void 0}),n&&n.length!==e&&(t.statistics=n.length>e?n.slice(0,e):null),r&&r.length!==e&&(t.histograms=r.length>e?r.slice(0,e):null),s.BAND_COUNT&&Number(s.BAND_COUNT)!==e&&(t.keyProperties={...s,BAND_COUNT:"string"==typeof s.BAND_COUNT?String(e):e})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}}),(0,a.wg)(t=>t?.toLowerCase())],x.prototype,"outputPixelType",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"mainPrimaryRasterId",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"sourceRasters",void 0),(0,i.Cg)([(0,a.MZ)({type:[f.A],json:{write:!0}})],x.prototype,"sourceRasterInfos",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"rasterInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"readingBufferSize",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"isNoopProcess",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"supportsGPU",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"rawInputBandIds",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"rawSourceRasterInfos",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"isInputBandIdsSwizzled",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"swizzledBandSelection",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"isBranch",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"isRoot",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"flatWebGLFunctionChain",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"neighborhoodSize",null),(0,i.Cg)([(0,a.MZ)()],x.prototype,"_bindingResult",void 0),x=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseRasterFunction")],x);const w=x,A={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},v={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},C={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},b={setNull:50,conditional:78},M={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65,...v,...C,majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75,...b},T=new Map([[C.acos,{domain:[0,Math.PI],isInteger:!1}],[C.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[C.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[C.cos,{domain:[-1,1],isInteger:!1}],[C.sin,{domain:[-1,1],isInteger:!1}],[v.booleanAnd,{domain:[0,1],isInteger:!0}],[v.booleanNot,{domain:[0,1],isInteger:!0}],[v.booleanOr,{domain:[0,1],isInteger:!0}],[v.booleanXOr,{domain:[0,1],isInteger:!0}],[v.equalTo,{domain:[0,1],isInteger:!0}],[v.notEqual,{domain:[0,1],isInteger:!0}],[v.greaterThan,{domain:[0,1],isInteger:!0}],[v.greaterThanEqual,{domain:[0,1],isInteger:!0}],[v.lessThan,{domain:[0,1],isInteger:!0}],[v.lessThanEqual,{domain:[0,1],isInteger:!0}],[v.isNull,{domain:[0,1],isInteger:!0}]]);function P(t){return T.get(t)}const N=[0,2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,2,1,1,1,999,999,1,1,999,1,1,2,999,999,2,2,999,999,999,999,999,999,999,999,999,999,3,999,3];function I(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]+r[t]);return i}function R(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand("f32",r);return o.set(n),o}function F(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=n[t]*n[t]);return o}function k(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]-r[t]);return i}function _(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]*r[t]);return i}function S(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=Math.sign(n[t])*Math.floor(Math.abs(n[t])));return o}function B(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]/r[t]);return i}function j(t,e,s){return B(t,e,"f32")}function Z(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=Math.floor(n[t]/r[t]));return i}function z(t,e,s,n){const r=t[0],o=r.length,i=g.A.createEmptyBand(s,o);if(n===C.atanh){for(let t=0;t<o;t++)if(e[t]){const s=r[t];Math.abs(s)>=1?e[t]=0:i[t]=Math.atanh(s)}return i}const a=n===C.asin?Math.asin:Math.acos;for(let t=0;t<o;t++)if(e[t]){const s=r[t];Math.abs(s)>1?e[t]=0:i[t]=a(s)}return i}function G(t,e,s,n){const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n(r[t]));return i}function O(t,e,s,n){const[r,o]=t,i=r.length,a=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=n(r[t],o[t]));return a}function D(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]&r[t]);return i}function E(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]<<r[t]);return i}function V(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=~n[t]);return o}function U(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]|r[t]);return i}function L(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]>>r[t]);return i}function $(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]^r[t]);return i}function K(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]&&r[t]?1:0);return i}function W(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=n[t]?0:1);return o}function H(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]||r[t]?1:0);return i}function q(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=(n[t]?1:0)^(r[t]?1:0));return i}function J(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]===r[t]?1:0);return i}function X(t,e,s,n){const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o),a=n===Math.E;for(let t=0;t<o;t++)e&&!e[t]||(i[t]=a?Math.exp(r[t]):n**r[t]);return i}function Q(t,e,s){return X(t,e,s,10)}function Y(t,e,s){return X(t,e,s,2)}function tt(t,e,s){return X(t,e,s,Math.E)}function et(t,e,s,n){const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(r[t]<=0?e[t]=0:i[t]=n(r[t]));return i}function st(t,e,s){return et(t,e,s,Math.log10)}function nt(t,e,s){return et(t,e,s,Math.log2)}function rt(t,e,s){return et(t,e,s,Math.log)}function ot(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]>r[t]?1:0);return i}function it(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]>=r[t]?1:0);return i}function at(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]<r[t]?1:0);return i}function ut(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]<=r[t]?1:0);return i}function lt(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);if(!e)return o;for(let t=0;t<r;t++)o[t]=e[t]?0:1;return o}function ct(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]%r[t]);return i}function pt(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=-n[t]);return o}function ht(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]===r[t]?0:1);return i}function mt(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o),a=new Uint8Array(o);for(let t=0;t<o;t++)null!=e&&!e[t]||0!==n[t]||(i[t]=r[t],a[t]=255);return{band:i,mask:a}}function dt(t,e,s){const[n,r,o]=t,i=n.length,a=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=n[t]?r[t]:o[t]);return a}function gt(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s]){let e=r[s];for(let r=1;r<n;r++){const n=t[r][s];e<n&&(e=n)}i[s]=e}return i}function ft(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s]){let e=r[s];for(let r=1;r<n;r++){const n=t[r][s];e>n&&(e=n)}i[s]=e}return i}function yt(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s]){let e=r[s],o=e;for(let r=1;r<n;r++){const n=t[r][s];o<n?o=n:e>n&&(e=n)}i[s]=o-e}return i}function xt(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s]){let e=0;for(let r=0;r<n;r++)e+=t[r][s];i[s]=e/n}return i}function wt(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s])for(let e=0;e<n;e++){const n=t[e];i[s]+=n[s]}return i}function At(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s]){const e=new Float32Array(n);let r=0;for(let o=0;o<n;o++){const n=t[o];r+=n[s],e[o]=n[s]}r/=n;let o=0;for(let t=0;t<n;t++)o+=(e[t]-r)**2;i[s]=Math.sqrt(o/n)}return i}function vt(t,e,s){const n=t.length;if(n<2)return t[0];const r=Math.floor(n/2),[o]=t,i=o.length,a=g.A.createEmptyBand(s,i),u=new Float32Array(n),l=n%2==1;for(let s=0;s<i;s++)if(!e||e[s]){for(let e=0;e<n;e++)u[e]=t[e][s];u.sort(),a[s]=l?u[r]:(u[r]+u[r-1])/2}return a}function Ct(t,e,s){const[n,r]=t;if(null==r)return n;const o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]<r[t]?n[t]:r[t]);return i}function bt(t,e,s){const n=t.length;if(n<=2)return Ct(t,e,s);const r=t[0].length,o=g.A.createEmptyBand(s,r),i=new Map;for(let s=0;s<r;s++)if(!e||e[s]){i.clear();for(let e=0;e<n;e++){const n=t[e][s];i.set(n,i.has(n)?i.get(n)+1:1)}let e=0,r=0;const a=[];for(const t of i.keys())e=i.get(t),e>r?(r=e,a.length=0,a.push(t)):e===r&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),o[s]=a[0]}return o}function Mt(t,e,s){const n=t.length;if(n<=2)return Ct(t,e,s);const r=t[0].length,o=g.A.createEmptyBand(s,r),i=new Map;for(let s=0;s<r;s++)if(!e||e[s]){i.clear();for(let e=0;e<n;e++){const n=t[e][s];i.set(n,i.has(n)?i.get(n)+1:1)}let e=0,r=t.length;const a=[];for(const t of i.keys())e=i.get(t),e<r?(r=e,a.length=0,a.push(t)):e===r&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),o[s]=a[0]}return o}function Tt(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o),a=new Set;for(let s=0;s<o;s++)if(!e||e[s]){let e;a.clear();for(let r=0;r<n;r++)e=t[r][s],a.add(e);i[s]=a.size}return i}const Pt=new Map,Nt=new Map,It=new Map,Rt=new Map;function Ft(){Pt.size||(Pt.set(4,Math.sqrt),Pt.set(6,Math.acos),Pt.set(7,Math.asin),Pt.set(8,Math.atan),Pt.set(9,Math.atanh),Pt.set(10,Math.abs),Pt.set(21,Math.cos),Pt.set(22,Math.cosh),Pt.set(48,Math.floor),Pt.set(49,Math.ceil),Pt.set(51,Math.sin),Pt.set(52,Math.sinh),Pt.set(56,Math.tan),Pt.set(57,Math.tanh),Pt.set(59,Math.acosh),Pt.set(60,Math.asinh),Pt.set(65,Math.floor),Nt.set(5,Math.pow),Nt.set(61,Math.atan2),It.set(1,I),It.set(2,k),It.set(3,_),It.set(11,D),It.set(12,E),It.set(13,V),It.set(14,U),It.set(15,L),It.set(16,$),It.set(17,K),It.set(18,W),It.set(19,H),It.set(20,q),It.set(23,B),It.set(24,J),It.set(25,tt),It.set(26,Q),It.set(27,Y),It.set(28,ot),It.set(29,it),It.set(30,S),It.set(31,lt),It.set(32,R),It.set(33,at),It.set(34,ut),It.set(35,rt),It.set(36,st),It.set(37,nt),It.set(44,ct),It.set(45,pt),It.set(46,ht),It.set(53,F),It.set(64,j),It.set(65,Z),It.set(76,dt),It.set(78,dt),Rt.set(38,bt),Rt.set(39,gt),Rt.set(40,xt),Rt.set(41,vt),Rt.set(42,ft),Rt.set(43,Mt),Rt.set(47,yt),Rt.set(54,At),Rt.set(55,wt),Rt.set(58,Tt),Rt.set(66,bt),Rt.set(67,gt),Rt.set(68,xt),Rt.set(69,vt),Rt.set(70,ft),Rt.set(71,Mt),Rt.set(72,yt),Rt.set(73,At),Rt.set(74,wt),Rt.set(75,Tt))}function kt(t,e,s={}){Ft();let n=function(t,e=!1){const s=t.map(t=>t.mask),n=s.filter(t=>null!=t),r=t[0].pixels[0].length;if(0===n.length||e&&n.length!==s.length)return new Uint8Array(r).fill(255);const o=n[0],i=new Uint8Array(o);if(1===n.length)return i;if(!e){for(let t=1;t<n.length;t++){const e=n[t];for(let t=0;t<i.length;t++)i[t]&&(i[t]=e[t]?255:0)}return i}for(let t=1;t<n.length;t++){const e=n[t];for(let t=0;t<i.length;t++)0===i[t]&&(i[t]=e[t]?255:0)}return i}(t,e>=66&&e<=75);const{outputPixelType:r="f32"}=s,o=!Rt.has(e)||s.processAsMultiband,i=o?t[0].pixels.length:1,a=[];for(let s=0;s<i;s++){const i=Rt.has(e)&&!o?t.flatMap(t=>t.pixels):t.map(t=>t.pixels[s]);let l,c=!0;if(e===b.setNull){const t=mt(i,n,r);l=t.band,n=t.mask,c=!1}else It.has(e)?l=It.get(e)(i,n,"f64"):Pt.has(e)?l=e===C.asin||e===C.acos||e===C.atanh?z(i,n,"f64",e):G(i,n,"f64",Pt.get(e)):Nt.has(e)?l=O(i,n,"f64",Nt.get(e)):Rt.has(e)?l=Rt.get(e)(i,n,"f64"):(l=i[0],c=!1);if(c&&e!==v.isNull&&!T.has(e)){const t=g.A.createEmptyBand(r,l.length);n||(n=new Uint8Array(l.length).fill(255)),(0,u.$p)(l,n),(0,u.yM)(l,n,r,t),l=t}a.push(l)}const l=t[0];return new g.A({width:l.width,height:l.height,pixelType:r,mask:e===v.isNull?null:n,pixels:a})}let _t=class extends w{constructor(){super(...arguments),this.functionName="Arithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){const{operation:t}=this.functionArguments;if(t<1||t>6)return{success:!1,supportsGPU:!1,error:"unsupported operation"};const e=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:e.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;return null==e?.[0]||null==e?.[1]?null:function(t,e,s){return kt(t,e=[null,1,2,3,23,5,44][e]??1,{outputPixelType:s})}(e,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=["","plus","minus","times","divide","power","mod"][t],s=this.outputPixelType??"f32";let[n,r]=(0,u.hP)(s);const o=(0,u.zw)(s);return o&&(n-=1e-4,r+=1e-4),{imageCount:2,operationName:e,domainRange:[n,r],isOutputRounded:o}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],_t.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:d,json:{write:!0,name:"rasterFunctionArguments"}})],_t.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],_t.prototype,"rasterArgumentNames",void 0),_t=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunction")],_t);const St=_t;var Bt;let jt=Bt=class extends p{clone(){return new Bt({raster:this.raster})}};jt=Bt=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunctionArguments")],jt);const Zt=jt;var zt=s(51181);let Gt=class extends w{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.isGCS=t.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");const e=t.clone();return e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),e.statistics=[{min:-1,max:360,avg:180,stddev:30}],e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{extent:s,primaryPixelSizes:n}=t,r=n?.[0],o=r??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1});return(0,zt.di)(e,{resolution:o})}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Gt.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Zt,json:{write:!0,name:"rasterFunctionArguments"}})],Gt.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Gt.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gt.prototype,"isGCS",void 0),Gt=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunction")],Gt);const Ot=Gt;var Dt=s(66552);const Et=new Set(["+","-","*","/","(",")"]);function Vt(t,e){return t.toLowerCase().startsWith("b")?e[parseInt(t.slice(1),10)-1]:parseFloat(t)}function Ut(t,e,s,n){if("number"==typeof s&&"number"==typeof n)return s+n;let r,o,i;"number"==typeof s?(i=n,r=i.length,o=new Float32Array(r),o.fill(s)):(r=s.length,o=s,n.constructor===Number?(i=new Float32Array(r),i.fill(n)):i=n);const a=new Float32Array(r);switch(e){case"+":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]+i[e]);break;case"-":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]-i[e]);break;case"*":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]*i[e]);break;case"/":for(let e=0;e<r;e++)(null==t||t[e])&&i[e]&&(a[e]=o[e]/i[e]);break;case"(":case")":throw new Error("encountered error with custom band index equation")}return a}function Lt(t,e){t.splice(e,1);let s=0,n=0;do{s=0,n=0;for(let e=0;e<t.length;e++)if("("===t[e])s=e;else if(")"===t[e]){n=e;break}n===s+1&&t.splice(s,2)}while(n===s+1);return t}function $t(t){if(1===t.length)return{opIndex:0,numIndex:0};let e=0,s=0;for(let n=0;n<t.length;n++)if("("===t[n])e=n;else if(")"===t[n]){s=n;break}const n=0===s?t:t.slice(e+1,s);let r=-1;for(let t=0;t<n.length;t++)if("*"===n[t]||"/"===n[t]){r=t;break}if(r>-1)s>0&&(r+=e+1);else{for(let t=0;t<n.length;t++)if("+"===n[t]||"-"===n[t]){r=t;break}s>0&&(r+=e+1)}let o=0;for(let e=0;e<r;e++)"("===t[e]&&o++;return{opIndex:r,numIndex:r-o}}var Kt=s(47520);const Wt=new Dt.J({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function Ht(t,e){if(!(0,Kt.AB)(t))return t;const{equation:s,method:n}=e,r=e.bandIndexes.map(t=>t-1),{pixels:o,mask:i}=t;let a;switch(n){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":a=Jt(i,o[r[0]],o[r[1]]);break;case"ndwi":a=Jt(i,o[r[1]],o[r[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":a=function(t,e,s){const n=s.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){const t=e[o],n=s[o];n&&(r[o]=t/n)}return[r]}(i,o[r[0]],o[r[1]]);break;case"ci-g":case"ci-re":a=function(t,e,s){const n=e.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){const t=e[o],n=s[o];n&&(r[o]=t/n-1)}return[r]}(i,o[r[0]],o[r[1]]);break;case"savi":a=function(t,e,s,n){const r=s.length,o=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){const t=s[i],r=e[i],a=r+t+n;a&&(o[i]=(r-t)/a*(1+n))}return[o]}(i,o[r[0]],o[r[1]],r[2]+1);break;case"tsavi":a=function(t,e,s,n,r,o){const i=s.length,a=new Float32Array(i),u=-r*n+o*(1+n*n);for(let o=0;o<i;o++)if(null==t||t[o]){const t=s[o],i=e[o],l=r*i+t+u;l&&(a[o]=n*(i-n*t-r)/l)}return[a]}(i,o[r[0]],o[r[1]],r[2]+1,r[3]+1,r[4]+1);break;case"msavi":a=function(t,e,s){const n=s.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){const t=s[o],n=e[o],i=2*n+1;r[o]=.5*(i-Math.sqrt(i*i-8*(n-t)))}return[r]}(i,o[r[0]],o[r[1]]);break;case"gemi":a=function(t,e,s){const n=s.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){const t=s[o],n=e[o];if(1!==t&&n+t+.5!==0){const e=(2*(n*n-t*t)+1.5*n+.5*t)/(n+t+.5);r[o]=e*(1-.25*e)-(t-.125)/(1-t)}}return[r]}(i,o[r[0]],o[r[1]]);break;case"pvi":a=function(t,e,s,n,r){const o=s.length,i=new Float32Array(o),a=1/Math.sqrt(1+n*n);for(let u=0;u<o;u++)if(null==t||t[u]){const t=s[u],o=e[u];i[u]=(o-n*t-r)*a}return[i]}(i,o[r[0]],o[r[1]],r[2]+1,r[3]+1);break;case"gvitm":a=function(t,e){const[s,n,r,o,i,a]=e,u=s.length,l=new Float32Array(u);for(let e=0;e<u;e++)(null==t||t[e])&&(l[e]=-.2848*s[e]-.2435*n[e]-.5436*r[e]+.7243*o[e]+.084*i[e]-.18*a[e]);return[l]}(i,[o[r[0]],o[r[1]],o[r[2]],o[r[3]],o[r[4]],o[r[5]]]);break;case"sultan":a=function(t,e){const[s,n,r,o,i]=e,a=s.length,u=new Float32Array(a),l=new Float32Array(a),c=new Float32Array(a);for(let e=0;e<a;e++)(null==t||t[e])&&(u[e]=i[e]?o[e]/i[e]*100:0,l[e]=s[e]?o[e]/s[e]*100:0,c[e]=r[e]?n[e]/r[e]*(o[e]/r[e])*100:0);return[u,l,c]}(i,[o[r[0]],o[r[1]],o[r[2]],o[r[3]],o[r[4]]]);break;case"vari":a=function(t,e){const[s,n,r]=e,o=s.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=s[e],o=n[e],a=o+t-r[e];a&&(i[e]=(o-t)/a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"mtvi2":a=function(t,e){const[s,n,r]=e,o=s.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=s[e],o=n[e],a=r[e],u=Math.sqrt((2*t+1)**2-(6*t-5*Math.sqrt(o))-.5);if(u){const s=1.5*(1.2*(t-a)-2.5*(o-a));i[e]=s/u}}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"rtvi-core":a=function(t,e){const[s,n,r]=e,o=s.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=s[e],o=n[e],a=r[e];i[e]=100*(t-o)-10*(t-a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"evi":a=function(t,e){const[s,n,r]=e,o=s.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=s[e],o=n[e],a=t+6*o-7.5*r[e]+1;a&&(i[e]=2.5*(t-o)/a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"wndwi":a=function(t,e,s=.5){const[n,r,o]=e,i=r.length,a=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){const t=n[e],i=r[e],u=o[e],l=t+s*i+(1-s)*u;l&&(a[e]=(t-s*i-(1-s)*u)/l)}return[a]}(i,[o[r[0]],o[r[1]],o[r[2]]],r[3]?r[3]+1:.5);break;case"bai":a=function(t,e,s){const n=s.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o])for(o=0;o<n;o++){const t=(.1-e[o])**2+(.06-s[o])**2;t&&(r[o]=1/t)}return[r]}(i,o[r[0]],o[r[1]]);break;case"custom":a=function(t,e,s){let n,{ops:r,nums:o}=function(t,e){(t=t.replaceAll(" ","")).startsWith("-")&&(t="0"+t),t.startsWith("+")&&(t=t.slice(1));const s=t.split(""),n=[],r=[];let o="";for(let t=0;t<s.length;t++){const i=s[t];Et.has(i)?(o.length&&r.push(Vt(o,e)),n.push(i),o=""):o=o.concat(i)}return o.length&&r.push(Vt(o,e)),{ops:n,nums:r}}(s,e);if(0===r.length){const t=1===o.length?o[0]:e[0];if(t instanceof Float32Array)return[t];const s=new Float32Array(e[0].length);return"number"==typeof t?s.fill(t):s.set(t),[s]}for(;r.length>0;){const{numIndex:e,opIndex:s}=$t(r);if(n=Ut(t,r[s],o[e],o[e+1]),1===r.length)break;r=Lt(r,s),o.splice(e,2,n)}return[n]}(i,o,s);break;default:return t}const{outputPixelType:l="f32"}=e,c=null!=l&&(0,u.zw)(l);let p;i?(p=new Uint8Array(t.width*t.height),p.set(i)):c&&(p=new Uint8Array(t.width*t.height).fill(255)),c&&(a=a.map(t=>{const e=g.A.createEmptyBand(l,t.length);return(0,u.yM)(t,p,l,e),e}));const h=new g.A({width:t.width,height:t.height,pixelType:l,pixels:a,mask:p});return h.updateStatistics(),h}function qt(t){const e=new Float32Array(9);return e[3*t[0]]=1,e[3*t[1]+1]=1,e[3*t[2]+2]=1,e}function Jt(t,e,s){const n=s.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){const t=e[o],n=s[o],i=t+n;i&&(r[o]=(t-n)/i)}return[r]}var Xt,Qt=s(93223);let Yt=Xt=class extends p{constructor(){super(...arguments),this.method="custom"}clone(){return new Xt({method:this.method,bandIndexes:this.bandIndexes,raster:(0,o.o8)(this.raster)})}};(0,i.Cg)([(0,a.MZ)({json:{type:String,write:!0}})],Yt.prototype,"bandIndexes",void 0),(0,i.Cg)([(0,Qt.e)(Wt)],Yt.prototype,"method",void 0),Yt=Xt=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunctionArguments")],Yt);const te=Yt,ee=new Set(["vari","mtvi2","rtvi-core","evi"]);let se=class extends w{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0];if(t.bandCount<2)return{success:!1,supportsGPU:!1,error:"band-arithmetic-function: source raster has insufficient amount of raster bands"};const e=t.clone();return e.pixelType=this.outputPixelType,e.bandCount="sultan"===this.functionArguments.method?3:1,this._removeStatsHistColormapVAT(e),e.keyProperties={...e.keyProperties,BandProperties:void 0},this.rasterInfo=e,{success:!0,supportsGPU:!["custom","gvitm","sultan"].includes(this.functionArguments.method)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{method:s,bandIndexes:n}=this.functionArguments,r=n.split(" ").map(t=>parseFloat(t));if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this,e=ee.has(this.functionArguments.method)?3:2,s=r.slice(0,e).map(e=>t.indexOf(e-1));r.splice(0,e,...s)}return Ht(e,{method:s,bandIndexes:r,equation:n,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const t=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===t.length&&t.push(0);const e=this.isInputBandIdsSwizzled?[0,1,2]:t;let s,n;const r=new Float32Array(3),{method:o}=this.functionArguments;switch(o){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":s=qt([e[0],e[1],0]),n="ndxi";break;case"ndwi":s=qt([e[1],e[0],0]),n="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":s=qt([e[0],e[1],0]),n="sr";break;case"ci-g":case"ci-re":s=qt([e[0],e[1],0]),n="ci";break;case"savi":s=qt([e[0],e[1],0]),n="savi",r[0]=t[2]+1;break;case"tsavi":s=qt([e[0],e[1],0]),n="tsavi",r[0]=t[2]+1,r[1]=t[3]+1,r[2]=t[4]+1;break;case"msavi":s=qt([e[0],e[1],0]),n="msavi";break;case"gemi":s=qt([e[0],e[1],0]),n="gemi";break;case"pvi":s=qt([e[0],e[1],0]),n="tsavi",r[0]=t[2]+1,r[1]=t[3]+1;break;case"vari":s=qt([e[0],e[1],e[2]]),n="vari";break;case"mtvi2":s=qt([e[0],e[1],e[2]]),n="mtvi";break;case"rtvi-core":s=qt([e[0],e[1],e[2]]),n="rtvicore";break;case"evi":s=qt([e[0],e[1],e[2]]),n="evi";break;case"wndwi":s=qt([e[0],e[1],0]),n="wndwi",r[0]=t[3]?t[3]+1:.5;break;case"bai":s=qt([e[1],e[0],0]),n="bai";break;default:s=qt([0,1,2]),n="custom"}return{bandIndexMat3:s,indexType:n,adjustments:r,isOutputRounded:(0,u.zw)(this.outputPixelType)}}_getInputBandIds(t){if("custom"===this.functionArguments.method)return t;const e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1),s=t.length,n=e.map(t=>t>=s?s-1:t),r=ee.has(this.functionArguments.method)?3:2,o=n.slice(0,r).map(e=>t[e]);return 2===o.length&&o.push(0),o}_swizzleBandIds(t){const e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===e.length&&e.push(0);const{method:s}=this.functionArguments,n=(["vari","mtvi2","rtvi-core","evi"].includes(s)?e.slice(0,3):"bai"===s||"ndwi"===s?[e[1],e[0]]:e.slice(0,2)).map(e=>t.indexOf(e));return n[2]??=n[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=n,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],se.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:te,json:{write:!0,name:"rasterFunctionArguments"}})],se.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],se.prototype,"rasterArgumentNames",void 0),se=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunction")],se);const ne=se;var re,oe=s(65864),ie=s(50498);const ae=new Dt.J({1:"outside",2:"inside"},{useNumericKeys:!0});let ue=re=class extends p{constructor(){super(...arguments),this.clippingType="outside"}clone(){return new re({clippingGeometry:this.clippingGeometry.clone(),clippingType:this.clippingType})}};(0,i.Cg)([(0,a.MZ)({types:ie.yR,json:{read:oe.rS,write:!0}})],ue.prototype,"clippingGeometry",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:ae.read,write:ae.write}})],ue.prototype,"clippingType",void 0),ue=re=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunctionArguments")],ue);const le=ue;var ce=s(34930),pe=s(37373);let he=class extends w{constructor(){super(...arguments),this.functionName="Clip",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{functionArguments:e}=this,{clippingGeometry:s,clippingType:n}=e;if(!s)return{success:!1,supportsGPU:!1,error:"missing clipping geometry"};if("outside"===n)try{const{spatialReference:e}=t,n="extent"===s.type?(0,pe._l)(s,e):(0,pe.uk)(s,e).extent;n&&(0,ce.Sd)(t,n)}catch{}return{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}_getWebGLParameters(){const{clippingGeometry:t,clippingType:e}=this.functionArguments;return{clippingGeometry:t.toJSON(),clippingType:e}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],he.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:le,json:{write:!0,name:"rasterFunctionArguments"}})],he.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],he.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],he.prototype,"isNoopProcess",void 0),he=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunction")],he);const me=he;var de,ge=s(67369),fe=s(95349),ye=s(36005);let xe=de=class extends p{castColormapName(t){if(!t)return null;const e=t.toLowerCase();return ge.L7.includes(e)?e:null}readColorRamp(t){return(0,fe.r)(t)}readColorRampName(t,e){if(!t)return null;const s=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return s?ge.kH.fromJSON(s):null}clone(){return new de({colormap:(0,o.o8)(this.colormap),colormapName:this.colormapName,colorRamp:this.colorRamp?.clone(),colorRampName:this.colorRampName})}};(0,i.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],xe.prototype,"colormap",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],xe.prototype,"colormapName",void 0),(0,i.Cg)([(0,a.wg)("colormapName")],xe.prototype,"castColormapName",null),(0,i.Cg)([(0,a.MZ)({types:fe.g,json:{write:!0}})],xe.prototype,"colorRamp",void 0),(0,i.Cg)([(0,ye.w)("colorRamp")],xe.prototype,"readColorRamp",null),(0,i.Cg)([(0,a.MZ)({type:ge.kH.apiValues,json:{type:ge.kH.jsonValues,write:ge.kH.write}})],xe.prototype,"colorRampName",void 0),(0,i.Cg)([(0,ye.w)("colorRampName")],xe.prototype,"readColorRampName",null),xe=de=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunctionArguments")],xe);const we=xe,Ae=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[112,75,3],[113,76,3],[114,77,3],[115,77,3],[116,78,3],[117,79,3],[118,79,3],[119,80,3],[121,81,4],[122,82,4],[123,82,4],[124,83,4],[125,84,4],[126,84,4],[127,85,4],[128,86,4],[129,86,4],[130,87,4],[131,88,4],[132,89,4],[133,89,4],[134,90,4],[135,91,4],[136,91,4],[137,92,4],[138,93,4],[139,94,4],[140,94,4],[142,95,5],[143,96,5],[144,96,5],[145,97,5],[146,98,5],[147,99,5],[148,99,5],[149,100,5],[150,101,5],[151,101,5],[152,102,5],[153,103,5],[154,104,5],[155,104,5],[156,105,5],[157,106,5],[158,106,5],[159,107,5],[160,108,5],[161,108,5],[162,109,5],[164,110,6],[165,111,6],[166,111,6],[167,112,6],[168,113,6],[169,113,6],[170,114,6],[171,115,6],[172,116,6],[173,116,6],[174,117,6],[245,0,0],[245,5,0],[245,10,0],[246,15,0],[246,20,0],[246,25,0],[246,30,0],[247,35,0],[247,40,0],[247,45,0],[247,50,0],[247,55,0],[248,60,0],[248,65,0],[248,70,0],[248,75,0],[249,81,0],[249,86,0],[249,91,0],[249,96,0],[250,101,0],[250,106,0],[250,111,0],[250,116,0],[250,121,0],[251,126,0],[251,131,0],[251,136,0],[251,141,0],[252,146,0],[252,151,0],[252,156,0],[252,156,0],[251,159,0],[250,162,0],[249,165,0],[248,168,0],[247,171,0],[246,174,0],[245,177,0],[245,179,0],[244,182,0],[243,185,0],[242,188,0],[241,191,0],[240,194,0],[239,197,0],[238,200,0],[237,203,0],[236,206,0],[235,209,0],[234,212,0],[233,215,0],[232,218,0],[231,221,0],[230,224,0],[230,226,0],[229,229,0],[228,232,0],[227,235,0],[226,238,0],[225,241,0],[224,244,0],[223,247,0],[165,247,0],[163,244,0],[161,240,0],[158,237,0],[156,233,1],[154,230,1],[152,227,1],[149,223,1],[147,220,1],[145,216,1],[143,213,1],[140,210,2],[138,206,2],[136,203,2],[134,200,2],[132,196,2],[129,193,2],[127,189,2],[125,186,3],[123,183,3],[120,179,3],[118,176,3],[116,172,3],[114,169,3],[111,166,3],[109,162,4],[107,159,4],[105,155,4],[103,152,4],[100,149,4],[98,145,4],[96,142,4],[94,138,5],[91,135,5],[89,132,5],[87,128,5],[85,125,5],[82,121,5],[80,118,5],[78,115,6],[76,111,6],[73,108,6],[71,105,6],[69,101,6],[67,98,6],[65,94,6],[62,91,7],[60,88,7],[58,84,7],[56,81,7],[53,77,7],[51,74,7],[49,71,7],[47,67,8],[44,64,8],[42,60,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8]],ve=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[245,20,0],[245,24,0],[245,29,0],[245,31,0],[247,33,0],[247,33,0],[247,37,0],[247,41,0],[247,41,0],[247,41,0],[247,45,0],[247,45,0],[247,47,0],[247,49,0],[247,49,0],[247,54,0],[247,54,0],[247,56,0],[247,58,0],[247,58,0],[250,62,0],[250,62,0],[250,62,0],[250,67,0],[250,67,0],[250,67,0],[250,69,0],[250,71,0],[250,71,0],[250,75,0],[250,75,0],[250,78,0],[250,79,0],[250,79,0],[250,79,0],[250,81,0],[250,83,0],[250,83,0],[250,87,0],[250,87,0],[250,90,0],[250,92,0],[252,93,0],[252,93,0],[252,97,0],[252,97,0],[252,97,0],[252,97,0],[252,101,0],[252,101,0],[252,101,0],[252,101,0],[252,105,0],[252,105,0],[252,107,0],[252,109,0],[252,109,0],[252,113,13],[255,118,20],[255,119,23],[255,121,25],[255,126,33],[255,132,38],[255,133,40],[255,135,43],[255,141,48],[255,144,54],[255,150,59],[255,152,61],[255,153,64],[255,159,69],[255,163,77],[255,165,79],[255,168,82],[255,174,87],[255,176,92],[255,181,97],[255,183,99],[255,186,102],[255,191,107],[255,197,115],[255,201,120],[255,203,123],[255,205,125],[255,209,130],[255,214,138],[255,216,141],[255,218,143],[255,224,150],[255,228,156],[255,234,163],[255,236,165],[255,238,168],[255,243,173],[255,248,181],[255,252,186],[253,252,186],[250,252,187],[244,250,180],[238,247,176],[234,246,173],[231,245,169],[223,240,163],[217,237,157],[211,235,150],[205,233,146],[200,230,142],[195,227,136],[189,224,132],[184,222,126],[180,220,123],[174,217,119],[169,214,114],[163,212,108],[160,210,105],[154,207,101],[148,204,96],[143,201,93],[138,199,88],[134,197,84],[130,194,81],[126,191,77],[117,189,70],[115,186,68],[112,184,64],[106,181,60],[100,179,55],[94,176,49],[92,174,47],[90,173,45],[81,168,37],[75,166,33],[71,163,28],[66,160,24],[62,158,21],[56,156,14],[51,153,0],[51,153,0],[51,153,0],[50,150,0],[50,150,0],[50,150,0],[50,150,0],[49,148,0],[49,148,0],[49,148,0],[48,145,0],[48,145,0],[48,145,0],[48,145,0],[48,143,0],[48,143,0],[48,143,0],[48,143,0],[47,140,0],[47,140,0],[47,140,0],[47,140,0],[46,138,0],[46,138,0],[46,138,0],[46,138,0],[45,135,0],[45,135,0],[45,135,0],[45,135,0],[44,133,0],[44,133,0],[44,133,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[42,128,0],[42,128,0],[42,128,0],[42,125,0],[42,125,0],[42,125,0],[42,125,0],[41,122,0],[41,122,0],[41,122,0],[41,122,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[39,117,0],[39,117,0],[39,117,0],[39,117,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0]];function Ce(t,e){const s=[],n=[];for(let e=0;e<t.length-1;e++)s.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:t[e].slice(1),toColor:t[e+1].slice(1)}),n.push(t[e+1][0]-t[e][0]);const r=t[t.length-1][0];return(0,ge.iv)({type:"multipart",colorRamps:s},{numColors:r,weights:e=e??n})}let be=class extends w{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:e,colormapName:s,colorRamp:n,colorRampName:r}=this.functionArguments;if(!e?.length)if(n)this.colorRamp=n,e=(0,ge.R8)(n,{interpolateAlpha:!0});else if(r){const t=(0,ge.M5)(r);t&&(e=(0,ge.R8)(t),this.colorRamp=(0,fe.r)(t))}else s&&(e=function(t){let e;switch(t){case"elevation":e=Ce([[0,0,191,191],[51,0,0,255],[102,255,0,255],[153,255,0,127],[204,191,63,127],[256,20,20,20]]);break;case"gray":e=(0,ge.iv)({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:[0,0,0],toColor:[255,255,255]});break;case"hillshade":e=Ce([[0,38,41,54],[69,79,82,90],[131,156,156,156],[256,253,253,241]],[.268,.238,.495]);break;case"ndvi":e=Ae;break;case"ndvi2":e=function(){const t=Ce([[0,255,255,255],[70,0,255,0],[80,205,173,193],[100,150,150,150],[110,120,51,100],[130,120,100,200],[140,28,3,144],[160,6,0,55],[180,10,25,30],[201,6,7,27]]);for(let e=t.length;e<256;e++)t.push([6,27,7]);return t}();break;case"ndvi3":e=ve;break;case"random":e=function(){const t=[];for(let e=0;e<256;e++){const e=[];for(let t=0;t<3;t++)e.push(Math.round(255*Math.random()));t.push(e)}return t}()}return e?(e=e.map((t,e)=>[e,...t]),e):null}(s));if(!e?.length)return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};const o=this._getOutputPixelType(t.pixelType);this.outputPixelType=o.startsWith("f")?"s32":o;const i=t.clone();return i.pixelType=this.outputPixelType,i.colormap=e,i.bandCount=1,this.rasterInfo=i,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];return!e||(0,u.zw)(e.pixelType)||(e=e.clone(),e.clamp(this.outputPixelType)),e}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],be.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:we,json:{write:!0,name:"rasterFunctionArguments"}})],be.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],be.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],be.prototype,"isNoopProcess",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],be.prototype,"indexedColormap",void 0),(0,i.Cg)([(0,a.MZ)()],be.prototype,"colorRamp",void 0),be=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunction")],be);const Me=be;var Te;let Pe=Te=class extends p{clone(){return new Te({raster:this.raster})}};Pe=Te=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunctionArguments")],Pe);const Ne=Pe;var Ie=s(4151),Re=s(88178);let Fe=class extends w{constructor(){super(...arguments),this.functionName="ColormapToRGB",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1||!t.colormap?.length)return{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: source data must be single band with a colormap"};const e=t.clone();e.pixelType=this.outputPixelType=this._getOutputPixelType("u8"),this._removeStatsHistColormapVAT(e),e.bandCount=3,e.statistics=[{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20}],this.rasterInfo=e;const s=[...t.colormap].sort((t,e)=>t[0]-e[0]),{indexedColormap:n,offset:r}=(0,Kt.zg)({colormap:s});return n?(this.lookup={indexedColormap:n,offset:r},{success:!0,supportsGPU:(0,Re.WN)(n)}):{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: the colormap is not supported"}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e||!this.lookup)return e;e=e.clone();const s=e.pixels[0],n=e.mask??new Uint8Array(s.length).fill(255),r=new Uint8Array(s.length),o=new Uint8Array(s.length),i=new Uint8Array(s.length),{indexedColormap:a,offset:u}=this.lookup,l=a.length;for(let t=0;t<s.length;t++)if(n[t]){let e=4*(s[t]-u);e<0||e>l-4?n[t]=0:(r[t]=a[e++],o[t]=a[e++],i[t]=a[e++])}return e.pixels=[r,o,i],e.statistics=[new Ie.A(0,255),new Ie.A(0,255),new Ie.A(0,255)],e.pixelType=this.outputPixelType,e}_getWebGLParameters(){return this.lookup}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Fe.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ne,json:{write:!0,name:"rasterFunctionArguments"}})],Fe.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Fe.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Fe.prototype,"lookup",void 0),Fe=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunction")],Fe);const ke=Fe;var _e,Se=s(43937);let Be=_e=class extends p{constructor(){super(...arguments),this.rasters=[]}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new _e({rasters:(0,o.o8)(this.rasters)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Be.prototype,"rasters",void 0),(0,i.Cg)([(0,Se.K)("rasters")],Be.prototype,"writeRasters",null),Be=_e=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunctionArguments")],Be);const je=Be;let Ze=class extends w{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const s=e.clone();if(s.attributeTable=null,s.colormap=null,s.pixelType=this.outputPixelType,s.bandCount=t.map(({bandCount:t})=>t).reduce((t,e)=>t+e),t.every(({statistics:t})=>null!=t&&t.length)){const e=[];t.forEach(({statistics:t})=>null!=t&&e.push(...t)),s.statistics=e}if(t.every(({histograms:t})=>null!=t&&t.length)){const e=[];t.forEach(({histograms:t})=>null!=t&&e.push(...t)),s.histograms=e}s.multidimensionalInfo&&s.multidimensionalInfo.variables.forEach(e=>{const s=t.map(t=>t.multidimensionalInfo?.variables.find(({name:t})=>t===e.name)),n=s.map(t=>t?.statistics?.length?t.statistics:null),r=s.map(t=>t?.histograms?.length?t.histograms:null);e.statistics=n.every(t=>null!=t)?n.flat():null,e.histograms=r.every(t=>null!=t)?r.flat():null}),s.bandCount>1&&(s.colormap=null,s.attributeTable=null);const n=t.every(t=>t.keyProperties.BandProperties?.length)?t.flatMap(t=>t.keyProperties.BandProperties):void 0;return s.keyProperties={...s.keyProperties,BandProperties:n},this.rasterInfo=s,{success:!0,supportsGPU:s.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;if(!e)return null;const s=e?.[0];return null==s?null:(0,Kt.Wy)(e)}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ze.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:je,json:{write:!0,name:"rasterFunctionArguments"}})],Ze.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Ze.prototype,"rasterArgumentNames",void 0),Ze=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunction")],Ze);const ze=Ze,Ge=new Dt.J({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),Oe=new Dt.J({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});var De;let Ee=De=class extends p{constructor(){super(...arguments),this.method="difference",this.keepMethod="all",this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new De({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};(0,i.Cg)([(0,Qt.e)(Ge)],Ee.prototype,"method",void 0),(0,i.Cg)([(0,Qt.e)(Oe)],Ee.prototype,"keepMethod",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ee.prototype,"raster2",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],Ee.prototype,"rasters",null),Ee=De=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunctionArguments")],Ee);const Ve=Ee;var Ue=s(20437);let Le=class extends w{constructor(){super(...arguments),this.functionName="ComputeChange",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){const{method:t}=this.functionArguments,e=this.sourceRasterInfos[0].clone();if(this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),"categorical"===t){const t=this.sourceRasterInfos.map(t=>t.attributeTable),s=this._getFieldNames(t,"value"),n=t.map(t=>this._getClassFieldName(t));if(null==s[0]||null==s[1]||null==n[0]||null==n[1])return{success:!1,supportsGPU:!1,error:"both inputs must have proper attribute table with value and class fields"};this._updateAttributeTable(e,s,n)}return e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:"difference"===t||"relative-difference"===t}}_processPixels(t){const{pixelBlocks:e}=t;if(null==e?.[0]||null==e?.[1])return null;const{method:s}=this.functionArguments;return function(t,e,s,n){const[r,o]=t,i=(0,u.zw)(s)&&!(0,u.zw)(r.pixelType)&&!(0,u.zw)(o.pixelType),a=[r.mask,o.mask].filter(t=>t),l=g.A.combineBandMasks(a),c=t.map(t=>t.pixels[0]),{width:p,height:h}=r,m=g.A.createEmptyBand(s,p*h);switch(e){case"difference":case"relative-difference":!function(t){const{bands:[e,s],mask:n,isRelative:r,isRoundingNeeded:o,outBand:i}=t,a=e.length;for(let t=0;t<a;t++)if(!n||n[t]){let n=e[t]-s[t];if(r){const r=Math.max(Math.abs(e[t])-Math.abs(s[t]));n=r>0?n/r:0}i[t]=o?Math.round(n):n}}({bands:c,mask:l,outBand:m,isRoundingNeeded:i,isRelative:"relative-difference"===e});break;case"categorical":!function(t){const{bands:[e,s],categoryIndexLookups:[n,r],classNames:[o,i],mask:a,keepMethod:u,outBand:l}=t,c=e.length,p=o.length,h=i.length,m=p*h,d=m+1,g=m+2;for(let t=0;t<c;t++)if(!a||a[t]){const a=e[t],c=s[t],p=n[a],f=r[c],y=o[p],x=i[f];l[t]=null==p||null==f?m:"changed"===u&&y===x?d:"unchanged"===u&&y!==x?g:p*h+f}}({bands:c,mask:l,outBand:m,...n});break;case"euclidean-distance":!function(t){const{pixels:[e,s],mask:n,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!n||n[t]){let n=0;for(let r=0;r<i;r++){const o=e[r][t]-s[r][t];n+=o*o}r[t]=Math.sqrt(n)}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m});break;case"angle-difference":!function(t){const{pixels:[e,s],mask:n,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!n||n[t]){let n=0,o=0,a=0;for(let r=0;r<i;r++){const i=e[r][t],u=s[r][t];n+=i*u,o+=i*i,a+=u*u}const u=Math.sqrt(o*a);r[t]=u?Math.acos(n/u):1.5707963267948966}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m});break;case"band-with-most-change":!function(t){const{pixels:[e,s],mask:n,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!n||n[t]){let n=0,o=0;for(let r=0;r<i;r++){const i=Math.abs(e[r][t]-s[r][t]);i>n&&(n=i,o=r)}r[t]=o}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m})}const d=new g.A({width:p,height:h,pixels:[m],pixelType:s,mask:l});return d.updateStatistics(),d}(e,s,this.outputPixelType,this._categoryConfig)}_getWebGLParameters(){const t=this.outputPixelType??"f32";let[e,s]=(0,u.hP)(t);const n=(0,u.zw)(t);return n&&(e-=1e-4,s+=1e-4),{method:this.functionArguments.method,domainRange:[e,s],isOutputRounded:n}}_updateAttributeTable(t,e,s){const n=this.sourceRasterInfos.map(t=>t.attributeTable),r=n.map((t,s)=>t.features.map(t=>t.attributes[e[s]])),o=n.map((t,e)=>t.features.map(t=>t.attributes[s[e]])),i=r.map(t=>{const e=[];return t.forEach((t,s)=>e[t]=s),e}),{keepMethod:a}=this.functionArguments;this._categoryConfig={categoryIndexLookups:i,classNames:o,keepMethod:a};const u=n[0].clone();u.fields=[new Ue.A({name:"OID",type:"oid"}),new Ue.A({name:"Value",type:"integer"}),new Ue.A({name:"ClassName",type:"string"}),new Ue.A({name:"Class_From",type:"string"}),new Ue.A({name:"Class_To",type:"string"})];const l=this._getFieldNames(n,"red"),c=this._getFieldNames(n,"green"),p=this._getFieldNames(n,"blue"),h=[],m=2===l.length&&2===c.length&&2===p.length;m&&(h.push(...n.map((t,e)=>t.features.map(t=>[t.attributes[l[e]],t.attributes[c[e]],t.attributes[p[e]]]))),u.fields.push(new Ue.A({name:"Red",type:"integer"}),new Ue.A({name:"Green",type:"integer"}),new Ue.A({name:"Blue",type:"integer"})));const d=u.features[0].clone();d.geometry=null;const g=[],[f,y]=r.map(t=>t.length);let x=1;for(let t=0;t<f;t++){const e=o[0][t];for(let s=0;s<y;s++){const n=o[1][s];if("changed"===a&&e===n||"unchanged"===a&&e!==n)continue;const r=d.clone();r.attributes={OID:x++,Value:t*y+s,ClassName:e===n?e:`${e} -> ${n}`,Class_From:e,Class_To:n},m&&(r.attributes.Red=h[0][t][0]+h[1][s][0]>>1,r.attributes.Green=h[0][t][1]+h[1][s][1]>>1,r.attributes.Blue=h[0][t][2]+h[1][s][2]>>1),g.push(r)}}if("changed"===a){const t=d.clone();t.attributes={OID:x++,Value:f*y+1,ClassName:"No Change",Class_From:"Same",Class_To:"Same"},g.push(t)}else if("unchanged"===a){const t=d.clone();t.attributes={OID:x++,Value:f*y+2,ClassName:"Changed",Class_From:"Any",Class_To:"Any"},g.push(t)}u.features=g,t.attributeTable=u}_getFieldNames(t,e){return t.map(({fields:t})=>t.find(t=>t.name.toLowerCase()===e)?.name).filter(t=>t)}_getClassFieldName(t){const e=t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().startsWith("class"))??t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().includes("class")||t.name.toLowerCase().includes("type")||t.name.toLowerCase().includes("name"))??t.fields.find(t=>"string"===t.type);return e?.name}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Le.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ve,json:{write:!0,name:"rasterFunctionArguments"}})],Le.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Le.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Le.prototype,"_categoryConfig",void 0),Le=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunction")],Le);const $e=Le;var Ke;let We=Ke=class extends p{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new Ke({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],We.prototype,"contrastOffset",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],We.prototype,"brightnessOffset",void 0),We=Ke=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunctionArguments")],We);const He=We;var qe=s(51927);let Je=class extends w{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];if("u8"!==e.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");const s=e.clone();this._removeStatsHistColormapVAT(s),this.rasterInfo=s;const{contrastOffset:n,brightnessOffset:r}=this.functionArguments;return this.lookup=(0,qe.zj)(n,r),{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:(0,Kt.eH)(e,{lut:e.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){const{contrastOffset:t,brightnessOffset:e}=this.functionArguments;return{contrastOffset:t,brightnessOffset:e}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Je.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:He,json:{write:!0,name:"rasterFunctionArguments"}})],Je.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Je.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Je.prototype,"lookup",void 0),Je=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunction")],Je);const Xe=Je;function Qe(t,e,s,n,r){const o=Math.floor(n/2);for(let n=0;n<o;n++)for(let o=0;o<e;o++)t[n*e+o]=t[(r-1-n)*e+o],t[(s-1-n)*e+o]=t[(s-r+n)*e+o];const i=Math.floor(r/2);for(let n=0;n<s;n++){const s=n*e;for(let n=0;n<i;n++)t[s+n]=t[s+r-1-n],t[s+e-n-1]=t[s+e+n-r]}}const Ye=new Map;function ts(t,e,s,n,r,o,i){const a=new Float32Array(e*s),u=o.length,l=i?0:n,c=i?n:0,p=i?1:e;for(let i=l;i<s-l;i++){const s=i*e;for(let i=c;i<e-c;i++){if(r&&!r[s+i])continue;let e=0;for(let r=0;r<u;r++)e+=t[s+i+(r-n)*p]*o[r];a[s+i]=e}}return a}function es(t,e,s,n,r,o,i){const a=new Float32Array(e*s),u=Math.floor(n/2),l=Math.floor(r/2);for(let c=u;c<s-u;c++){const s=c*e;for(let c=l;c<e-l;c++){if(o&&!o[s+c])continue;let p=0;for(let o=0;o<n;o++)for(let n=0;n<r;n++)p+=t[s+c+(o-u)*e+n-l]*i[o*r+n];a[s+c]=p}}return a}var ss;Ye.set(A.none,[0,0,0,0,1,0,0,0,0]),Ye.set(A.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),Ye.set(A.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),Ye.set(A.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),Ye.set(A.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),Ye.set(A.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(A.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(A.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),Ye.set(A.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),Ye.set(A.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),Ye.set(A.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),Ye.set(A.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),Ye.set(A.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),Ye.set(A.smoothing5x5,[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1]),Ye.set(A.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Ye.set(A.sharpening5x5,[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1]),Ye.set(A.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),Ye.set(A.laplacian5x5,[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0]),Ye.set(A.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(A.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(A.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),Ye.set(A.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),Ye.set(A.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let ns=ss=class extends p{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(t){this._set("convolutionType",t);const e=Ye.get(t);if(!e||t===A.userDefined||t===A.none)return;const s=Math.round(Math.sqrt(e.length));this._set("kernel",e),this._set("cols",s),this._set("rows",s)}clone(){return new ss({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:(0,o.o8)(this.raster)})}};(0,i.Cg)([(0,a.MZ)({json:{type:Number,write:!0}})],ns.prototype,"rows",void 0),(0,i.Cg)([(0,a.MZ)({json:{type:Number,write:!0,name:"columns"}})],ns.prototype,"cols",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"type",type:Number,write:!0}})],ns.prototype,"convolutionType",null),(0,i.Cg)([(0,a.MZ)({json:{type:[Number],write:!0}})],ns.prototype,"kernel",void 0),ns=ss=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunctionArguments")],ns);const rs=ns;let os=class extends w{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){const{kernel:t,convolutionType:e}=this.functionArguments,s=t.reduce((t,e)=>t+e);return-1===e||0===s||1===s?t:t.map(t=>t/s)}_bindSourceRasters(){const{convolutionType:t,rows:e,cols:s,kernel:n}=this.functionArguments;if(!Object.values(A).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==A.none&&e*s!==n.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};const r=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(r.pixelType);const o=r.clone();o.pixelType=this.outputPixelType;const i=[A.none,A.sharpen,A.sharpen2,A.sharpening3x3,A.sharpening5x5];return(-1===t||"u8"!==this.outputPixelType&&!i.includes(t))&&(o.statistics=null,o.histograms=null),o.colormap=null,o.attributeTable=null,this.rasterInfo=o,{success:!0,supportsGPU:n.length<=25}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e||this.functionArguments.convolutionType===A.none)return e;const{rows:s,cols:n}=this.functionArguments,{_normalizedKernel:r}=this;return function(t,e){const s=function(t){const e=Math.sqrt(t.length),s=t.slice(0,e),n=[1];for(let s=1;s<e;s++){let r=null;for(let n=0;n<e;n++){const o=t[n+s*e],i=t[n];if(null==r)if(0===i){if(o)return{separable:!1,row:null,col:null}}else r=o/i;else if(o/i!==r)return{separable:!1,row:null,col:null}}if(null==r)return{separable:!1,row:null,col:null};n.push(r)}return{separable:!0,row:s,col:n}}(e.kernel),n=!1!==e.mirrorEdges,r=s.separable?function(t,e,s,n=!0){const{pixels:r,width:o,height:i,pixelType:a,mask:u}=t,l=r.length,c=[],p=e.length,h=s.length,m=Math.floor(p/2),d=Math.floor(h/2);for(let t=0;t<l;t++){let a=ts(r[t],o,i,m,u,e,!0);a=ts(a,o,i,d,u,s,!1),n&&Qe(a,o,i,p,h),c.push(a)}return new g.A({width:o,height:i,pixelType:a,pixels:c,mask:u})}(t,s.row,s.col,n):function(t,e,s=!0){const{pixels:n,width:r,height:o,pixelType:i,mask:a}=t,u=n.length,l=[],{kernel:c,rows:p,cols:h}=e;for(let t=0;t<u;t++){const e=es(n[t],r,o,p,h,a,c);s&&Qe(e,r,o,p,h),l.push(e)}return new g.A({width:r,height:o,pixelType:i,pixels:l,mask:a})}(t,e,n),{outputPixelType:o}=e;return o&&r.clamp(o),r}(e,{kernel:r,rows:s,cols:n,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const t=new Float32Array(25),{rows:e,cols:s}=this.functionArguments,{_normalizedKernel:n}=this;for(let r=0;r<e;r++)for(let e=0;e<s;e++)t[5*r+e]=n[r*s+e];return{kernelRows:e,kernelCols:s,kernel:t,clampRange:(0,u.hP)(this.outputPixelType)}}_getNeighborhoodSize(){const{rows:t,cols:e}=this.functionArguments;return{rows:t,cols:e}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],os.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:rs,json:{write:!0,name:"rasterFunctionArguments"}})],os.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],os.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],os.prototype,"_normalizedKernel",null),os=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunction")],os);const is=os;var as;const us=new Dt.J({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let ls=as=class extends p{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(t,e){return us.fromJSON(e.type??e.curvatureType??0)}clone(){return new as({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:{target:"type"}}}),(0,Qt.e)(us)],ls.prototype,"curvatureType",void 0),(0,i.Cg)([(0,ye.w)("curvatureType",["type","curvatureType"])],ls.prototype,"readCurvatureType",null),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],ls.prototype,"zFactor",void 0),ls=as=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunctionArguments")],ls);const cs=ls;let ps=class extends w{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:s,curvatureType:n}=this.functionArguments,{extent:r,primaryPixelSizes:o}=t,i=o?.[0],a=i??(r?{x:r.width/e.width,y:r.height/e.height}:{x:1,y:1}),u=this.isGCS&&s>=1?s*zt.rk:s;return(0,zt.E0)(e,{zFactor:u,curvatureType:n,resolution:a})}_getWebGLParameters(){const{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*zt.rk:t}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ps.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:cs,json:{write:!0,name:"rasterFunctionArguments"}})],ps.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],ps.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ps.prototype,"isGCS",void 0),ps=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunction")],ps);const hs=ps;var ms;let ds=ms=class extends p{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=0}clone(){return new ms({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandIds",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandWavelengths",void 0),(0,i.Cg)([(0,Qt.e)({0:"name",1:"wavelength",2:"id"})],ds.prototype,"method",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"missingBandAction",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"wavelengthMatchTolerance",void 0),ds=ms=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunctionArguments")],ds);const gs=ds;let fs=class extends w{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{functionArguments:t,sourceRasterInfos:e}=this,s=e[0],{method:n,bandNames:r,bandWavelengths:o,bandIds:i,missingBandAction:a}=t,u=r?.length&&("name"===n||"id"!==n&&!i?.length),l=o?.length&&("wavelength"===n||"id"!==n&&!i?.length),c=1===a,p=u?function(t,e){const s=t.bandInfos.map(({name:t})=>t.toLowerCase()),n=[];for(let t=0;t<e.length;t++){const r=e[t].toLowerCase();let o=s.indexOf(r);if(-1===o&&"nearinfrared"===r&&(o=s.findIndex(t=>t.startsWith("nearinfrared_1")),-1===o&&(o=s.findIndex(t=>t.startsWith("nearinfrared")))),-1===o)return null;n.push(o)}return n}(s,r):l?function(t,e,{wavelengthMatchTolerance:s},n){const{bandInfos:r}=t,o=[];for(let t=0;t<r.length;t++){const{minWavelength:e,maxWavelength:s}=r[t];if(!e||!s)return null;o.push({minWavelength:e,maxWavelength:s})}const i=[];for(let t=0;t<e.length;t++){const r=e[t];let a=!1,u=-1,l=Number.MAX_VALUE;for(let t=0;t<o.length;t++){const e=o[t],s=r>=e.minWavelength&&r<=e.maxWavelength,n=Math.abs(r-(e.minWavelength+e.maxWavelength)/2);s?n<l&&(a=!0,u=t,l=n):!a&&n<l&&(u=t,l=n)}if(!a&&s&&l<s&&(a=!0),!a&&n)return null;i.push(u)}return i}(s,o,this.functionArguments,c):function(t,e,s){const{bandCount:n}=t;return!e?.length||s&&e.some(t=>t<0||t>=n)?null:e}(s,i,c);if(null==p)return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${u?"band names":l?"band wavelengths":"band ids"} for the imagery data source`};this.functionArguments.bandIds=p,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType(s.pixelType);const h=s.clone();h.pixelType=this.outputPixelType,h.bandCount=p.length;const{statistics:m,histograms:d}=h;null!=m&&m.length&&(h.statistics=p.map(t=>m[t]||m[m.length-1])),null!=d&&d.length&&(h.histograms=p.map(t=>d[t]||d[d.length-1])),h.multidimensionalInfo&&h.multidimensionalInfo.variables.forEach(t=>{const{statistics:e,histograms:s}=t;null!=e&&e.length&&(t.statistics=p.map(t=>e[t]||e[e.length-1])),null!=s&&s.length&&(t.histograms=p.map(t=>s[t]||s[s.length-1]))});let g=h.keyProperties?.BandProperties;return g?.length&&(g=p.map(t=>t>=g.length?g[g.length-1]:g[t]),h.keyProperties={...h.keyProperties,BandProperties:g}),this.rasterInfo=h,{success:!0,supportsGPU:h.bandCount<=3}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;let{bandIds:s}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this;s=s.map(e=>t.indexOf(e))}else{const t=e.pixels.length;s=s.map(e=>e>=t?t-1:e)}return e.extractBands(s)}_getWebGLParameters(){let t;if(this.isInputBandIdsSwizzled)t=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{t=[...this.functionArguments.bandIds],0===t.length?t=[0,1,2]:t.length<3&&(t[1]=t[1]??t[0],t[2]=t[2]??t[1]);for(let e=0;e<3;e++)t[e]=Math.min(t[e],2)}return{bandIndexMat3:qt(t)}}_getInputBandIds(t){const e=t.length;return this.functionArguments.bandIds.map(t=>t>=e?e-1:t).map(e=>t[e])}_swizzleBandIds(t){const e=this.functionArguments.bandIds.map(e=>t.indexOf(e));return this.isInputBandIdsSwizzled=!0,e[1]??=e[0],e[2]??=e[1],this.swizzledBandSelection=e,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],fs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:gs,json:{write:!0,name:"rasterFunctionArguments"}})],fs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],fs.prototype,"rasterArgumentNames",void 0),fs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunction")],fs);const ys=fs;function xs(t,e,s,n){const{pixels:r,width:o,height:i}=t,a=r.length,l=s.startsWith("f"),c=!l,[p,h]=(0,u.hP)(s),m=o*i,d=g.A.createEmptyBand(s,m);for(let t=0;t<i;t++){let s=t*o;for(let t=0;t<o;t++,s++)if(!n||n[s]){let t=0;for(let n=0;n<a;n++)t+=e[n]*r[n][s];l||(t=Math.round(t),c&&(t=t>h?h:t<p?p:t)),d[s]=t}}return d}var ws;let As=ws=class extends p{clone(){return new ws({conversionParameters:[...this.conversionParameters],raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],As.prototype,"conversionParameters",void 0),As=ws=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunctionArguments")],As);const vs=As;let Cs=class extends w{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){const{conversionParameters:t}=this.functionArguments,e=t.reduce((t,e)=>t+e);return t.map(t=>t/e)}_bindSourceRasters(){const{conversionParameters:t}=this.functionArguments;if(!t?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};const e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType;const s=3===t.length||3===e.bandCount&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:s}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:function(t,e,s){const{width:n,height:r,mask:o,bandMasks:i}=t,a=i?.length?g.A.combineBandMasks(i):o,u=xs(t,e,s,a),l=new g.A({width:n,height:r,pixels:[u],pixelType:s,mask:a});return l.updateStatistics(),l}(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Cs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:vs,json:{write:!0,name:"rasterFunctionArguments"}})],Cs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Cs.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],Cs.prototype,"_normalizedWeights",null),Cs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunction")],Cs);const bs=Cs;var Ms;const Ts=new Dt.J({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),Ps=new Dt.J({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let Ns=Ms=class extends p{constructor(){super(...arguments),this.altitude=45,this.azimuth=315,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.slopeType="degree",this.zFactor=1,this.removeEdgeEffect=!1}clone(){return new Ms({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"altitude",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"azimuth",void 0),(0,i.Cg)([(0,a.MZ)(),(0,Qt.e)(Ts)],Ns.prototype,"hillshadeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psPower"}})],Ns.prototype,"pixelSizePower",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psZFactor"}})],Ns.prototype,"pixelSizeFactor",void 0),(0,i.Cg)([(0,a.MZ)(),(0,Qt.e)(Ps)],Ns.prototype,"slopeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"zFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Ns.prototype,"removeEdgeEffect",void 0),Ns=Ms=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunctionArguments")],Ns);const Is=Ns;let Rs=class extends w{constructor(){super(...arguments),this.functionName="Hillshade",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"hillshade-function: source data must be single band"};this.outputPixelType=this._getOutputPixelType("u8");const e=t.clone();return this._removeStatsHistColormapVAT(e),e.pixelType=this.outputPixelType,e.bandCount=1,e.statistics=[{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(!e)return null;const{extent:s,primaryPixelSizes:n}=t,r=n?.[0],o=r??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1}),i=(0,zt.PP)(this.functionArguments,o,this.isGCS),a=(0,zt.fw)(e,i);return a.pixelType=this.outputPixelType,a}_getWebGLParameters(){const t=(0,zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,zt.ng)(t),{slopeType:s,zFactor:n,pixelSizeFactor:r,pixelSizePower:o}=this.functionArguments,i="scaled"===s,a=(0,u.zw)(this.outputPixelType);return{...e,zFactor:n,gcsFactor:this.isGCS?zt.rk:1,pixelSizeFactor:i?r:0,pixelSizePower:i?o:0,isOutputRounded:a}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Rs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Is,json:{write:!0,name:"rasterFunctionArguments"}})],Rs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Rs.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Rs.prototype,"isGCS",void 0),Rs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunction")],Rs);const Fs=Rs;var ks;let _s=ks=class extends p{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new ks({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,o.o8)(this.rasters)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],_s.prototype,"operation",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],_s.prototype,"rasters",void 0),(0,i.Cg)([(0,Se.K)("rasters")],_s.prototype,"writeRasters",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],_s.prototype,"processAsMultiband",void 0),_s=ks=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunctionArguments")],_s);const Ss=_s;let Bs=class extends w{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0],{bandCount:s}=e,{processAsMultiband:n}=this.functionArguments;if(t.some(t=>t.bandCount!==s))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};const{operation:r,rasters:o}=this.functionArguments,i=N[r];if(!(999===i||o.length===i||o.length<=1&&1===i))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${i}`};const a=e.clone();return a.bandCount=999!==i||n?s:1,this._removeStatsHistColormapVAT(a),this._updateStatistics(a),this._updatePixelType(a),this.rasterInfo=a,{success:!0,supportsGPU:1===a.bandCount&&i<=3}}_processPixels(t){const{pixelBlocks:e}=t;return null==e||e.some(t=>null==t)?null:kt(e,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=N[t],s=Object.keys(M).find(e=>M[e]===t)?.toLowerCase()??"undefined",n=this.outputPixelType??"f32";let[r,o]=(0,u.hP)(n);const i=(0,u.zw)(n);return i&&(r-=1e-4,o+=1e-4),{imageCount:e,operationName:s,domainRange:[r,o],isOutputRounded:i}}_updateStatistics(t){const e=this.sourceRasterInfos[0],{operation:s}=this.functionArguments,n=P(s)?.domain;if(n){t.statistics=[];for(let e=0;e<t.bandCount;e++)t.statistics[e]={min:n[0],max:n[1],avg:(n[0]+n[1])/2,stddev:(n[0]+n[1])/10}}else 45===s&&e.statistics?.length&&(t.statistics=e.statistics.map(t=>({min:-t.max,max:-t.min,avg:null!=t.avg?-t.avg:void 0,stddev:null!=t.stddev?-t.stddev:void 0})))}_updatePixelType(t){const{statistics:e,pixelType:s}=this.sourceRasterInfos[0],{operation:n}=this.functionArguments,{domain:r,isInteger:o}=P(n)??{domain:null,isInteger:!1};let i="f32";if(r&&o)i=(0,u.X1)(r[0],r[1]);else if(30===n){const t=e?.[0];i=t?(0,u.X1)(t.min,t.max):(0,u.zw)(s)?s:"s32"}else if(45===n&&(0,u.zw)(s)){const t=e?.map(({max:t})=>-t),n=e?.map(({min:t})=>-t),r=t?.length?Math.min(...t):null,o=n?.length?Math.min(...n):null;i=null!=r&&null!=o?(0,u.X1)(r,o):s.startsWith("s")?s.replace("s","u"):"u1"===s||"u2"===s||"u4"===s?"s8":"u8"===s?"s16":"s32"}t.pixelType=this.outputPixelType=this._getOutputPixelType(i)}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Bs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ss,json:{write:!0,name:"rasterFunctionArguments"}})],Bs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Bs.prototype,"rasterArgumentNames",void 0),Bs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunction")],Bs);const js=Bs;var Zs,zs=s(34727);let Gs=Zs=class extends p{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=0}get normalizedNoDataValues(){const{noDataValues:t}=this;if(!t?.length)return null;let e=!1;const s=t.map(t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){const s=t.trim().split(" ").filter(t=>""!==t.trim()).map(t=>Number(t));return e=e||s.length>0,0===s.length?null:s}return null});return e?s:null}clone(){return new Zs({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"includedRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"noDataValues",void 0),(0,i.Cg)([(0,a.MZ)()],Gs.prototype,"normalizedNoDataValues",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"noDataInterpretation",void 0),Gs=Zs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunctionArguments")],Gs);const Os=Gs;let Ds=class extends w{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{includedRanges:s,normalizedNoDataValues:n}=this.functionArguments;if(!s?.length&&!n?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let r=[];for(let o=0;o<t.bandCount;o++){const t=(0,Kt.Wt)(e,s?.slice(2*o,2*o+2),n?.[o]);if(null==t){r=null;break}r.push(t)}this.lookups=r;const o=null!=n&&n.every(t=>t?.length===n[0]?.length);return{success:!0,supportsGPU:(!s||s.length<=2*Kt.et)&&(!n||o&&n[0].length<=Kt.et)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{outputPixelType:s,lookups:n}=this,{includedRanges:r,noDataInterpretation:o,normalizedNoDataValues:i}=this.functionArguments;return(0,Kt.dK)(e,{includedRanges:r,noDataValues:i,outputPixelType:s,matchAll:1===o,lookups:n})}_getWebGLParameters(){const{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,s=new Float32Array(Kt.et);s.fill(zs.pq),e?.[0]?.length&&s.set(e[0]);const n=new Float32Array(6);for(let e=0;e<n.length;e+=2)n[e]=t?.[e]??-zs.pq,n[e+1]=t?.[e+1]??zs.pq;return t?.length&&n.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:s,includedRanges:n}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ds.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Os,json:{write:!0,name:"rasterFunctionArguments"}})],Ds.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Ds.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ds.prototype,"lookups",void 0),Ds=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunction")],Ds);const Es=Ds;var Vs;let Us=Vs=class extends p{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){const{visibleBandID:t,infraredBandID:e,scientificOutput:s}=this;return new Vs({visibleBandID:t,infraredBandID:e,scientificOutput:s})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"visibleBandID",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"infraredBandID",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"scientificOutput",void 0),Us=Vs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunctionArguments")],Us);const Ls=Us;let $s=class extends w{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{scientificOutput:t,visibleBandID:e,infraredBandID:s}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");const n=this.sourceRasterInfos[0],r=Math.max(e,s);if(n.bandCount<2||r>=n.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};if(e<0||s<0)return{success:!1,supportsGPU:!1,error:"ndvi-function: invalid visible or infrared band id"};const o=n.clone();o.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(o),o.bandCount=1,o.keyProperties={...o.keyProperties,BandProperties:void 0};const[i,a,u,l]=t?[-1,1,0,.1]:[0,200,100,10];return o.statistics=[{min:i,max:a,avg:u,stddev:l}],this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;let{visibleBandID:s,infraredBandID:n,scientificOutput:r}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this;n=t.indexOf(n),s=t.indexOf(s)}return function(t,e,s,n){const{mask:r,pixels:o,width:i,height:a}=t,u=o[s],l=o[e],c=l.length,p=n?new Uint8Array(c):new Float32Array(c),h=n?100:1,m=n?100.5:0;for(let t=0;t<c;t++)if(null==r||r[t]){const e=u[t],s=l[t],n=e+s;n&&(p[t]=(e-s)/n*h+m)}const d=new g.A({width:i,height:a,mask:r,pixelType:n?"u8":"f32",pixels:[p]});return d.updateStatistics(),d}(e,s,n,!r)}_getWebGLParameters(){const{visibleBandID:t,infraredBandID:e,scientificOutput:s}=this.functionArguments;return{bandIndexMat3:qt(this.isInputBandIdsSwizzled?[0,1,2]:[e,t,0]),scaled:!s}}_getInputBandIds(t){const{visibleBandID:e,infraredBandID:s}=this.functionArguments;return[s,e,0].map(e=>t[e])}_swizzleBandIds(t){const{visibleBandID:e,infraredBandID:s}=this.functionArguments,n=[e,s].map(e=>t.indexOf(e));return n[2]=n[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=n,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],$s.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ls,json:{write:!0,name:"rasterFunctionArguments"}})],$s.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],$s.prototype,"rasterArgumentNames",void 0),$s=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunction")],$s);const Ks=$s;var Ws;let Hs=Ws=class extends p{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new Ws({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"inputRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"outputValues",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"noDataRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"allowUnmatched",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"replacementValue",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"isLastInputRangeInclusive",void 0),Hs=Ws=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunctionArguments")],Hs);const qs=Hs;let Js=class extends w{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;t.bandCount=1;const{statistics:s}=t;this._removeStatsHistColormapVAT(t);const{allowUnmatched:n,replacementValue:r,outputValues:o,inputRanges:i,noDataRanges:a,isLastInputRangeInclusive:l}=this.functionArguments,c="unknown"===this.outputPixelType||null==this.outputPixelType;if(this.outputPixelType=this._getOutputPixelType(e),o?.length){const i=s?.[0];if(n&&null==r){let e=i?.min??o[0],s=i?.max??o[0];e=Math.min.apply(null,[...o,e]),s=Math.max.apply(null,[...o,s]),t.statistics=[{min:e,max:s,avg:i?.avg??0,stddev:i?.stddev??-1}]}else{let e=o[0],s=e;for(let t=0;t<o.length;t++)e=e>o[t]?o[t]:e,s=s>o[t]?s:o[t];n&&null!=r&&(e=Math.min(e,r),s=Math.max(s,r)),t.statistics=[{min:e,max:s,avg:i?.avg??0,stddev:i?.stddev??-1}]}if(c){const{min:s,max:i}=t.statistics[0],a=["u8","s8","u16","s16","u32","s32","f32"],l=a.find(t=>{const[e,n]=(0,u.hP)(t);return s>=e&&i<=n})??"f64";o.some(t=>Math.floor(t)!==t)?this.outputPixelType="f64"===l?"f64":"f32":this.outputPixelType=n&&null==r&&a.indexOf(e)>a.indexOf(l)?e:l}}return t.pixelType=this.outputPixelType,this.rasterInfo=t,this.lookup=n?null:(0,Kt.XU)({srcPixelType:e,inputRanges:i,outputValues:o,noDataRanges:a,allowUnmatched:n,isLastInputRangeInclusive:l,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!o||o.length<=Kt.et)&&(!a||a.length<=Kt.et)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{lookup:s,outputPixelType:n}=this;if(s){const t=(0,Kt.eH)(e,{lut:[s.lut],offset:s.offset,outputPixelType:n});return null!=t&&s.mask&&(t.mask=(0,Kt.UK)(e.pixels[0],e.mask,s.mask,s.offset,"u8")),t}const{inputRanges:r,outputValues:o,noDataRanges:i,allowUnmatched:a,isLastInputRangeInclusive:u,replacementValue:l}=this.functionArguments;return(0,Kt.Ew)(e,{inputRanges:r,outputValues:o,noDataRanges:i,outputPixelType:n,allowUnmatched:a,isLastInputRangeInclusive:u,replacementValue:l})}_getWebGLParameters(){const{allowUnmatched:t,noDataRanges:e,isLastInputRangeInclusive:s}=this.functionArguments,n=this.functionArguments.inputRanges??[],r=this.functionArguments.outputValues??[],o=(0,Kt.bL)(n,r,s),i=new Float32Array(2*Kt.et);return i.fill(zs.pq),e?.length&&i.set(e),{allowUnmatched:t,rangeMaps:o,noDataRanges:i,clampRange:(0,u.hP)(this.outputPixelType),replacementValue:this.functionArguments.replacementValue}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Js.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:qs,json:{write:!0,name:"rasterFunctionArguments"}})],Js.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Js.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Js.prototype,"lookup",void 0),Js=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunction")],Js);const Xs=Js;var Qs;let Ys=Qs=class extends Is{readColorRamp(t){if("string"==typeof t){const e=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return e?(0,ge.M5)(ge.kH.fromJSON(e)):null}return"toJSON"in t?t.toJSON():t}clone(){return new Qs({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,colorRamp:this.colorRamp,colormap:this.colormap,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ys.prototype,"colorRamp",void 0),(0,i.Cg)([(0,ye.w)("colorRamp")],Ys.prototype,"readColorRamp",null),(0,i.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],Ys.prototype,"colormap",void 0),Ys=Qs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunctionArguments")],Ys);const tn=Ys;let en=class extends w{constructor(){super(...arguments),this.functionName="ShadedRelief",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: source data must be single band"};let{colorRamp:e,colormap:s}=this.functionArguments;if(!e&&!s?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a color ramp argument must be specified"};this.outputPixelType=this._getOutputPixelType("u8");const n=t.clone();this._removeStatsHistColormapVAT(n),n.pixelType=this.outputPixelType,n.bandCount=3,n.statistics=[{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=n,this.isGCS=n.spatialReference?.isGeographic??!1,s?.length||(s=(0,ge.R8)(e,{interpolateAlpha:!0}));const{indexedColormap:r,offset:o}=(0,Kt.zg)({colormap:s});if(!r?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a valid colorramp is required"};const i=(0,ge.S2)(r);return this.lookup={indexedColormap:r,offset:o,hsvMap:i},{success:!0,supportsGPU:(0,Re.WN)(r)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(!e||!this.lookup)return null;let s=t.primaryPixelSizes?.[0];if(null==s){const{extent:n}=t;s=n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1}}const n=(0,zt.PP)(this.functionArguments,s,this.isGCS),r=(0,zt.fw)(e,n),o=this.sourceRasterInfos[0].statistics?.[0]??{min:0,max:8e3};return(0,zt.SC)(r,e,this.lookup.hsvMap,o),r.pixelType=this.outputPixelType,r}_getWebGLParameters(){const t=(0,zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,zt.ng)(t),{slopeType:s,zFactor:n,pixelSizeFactor:r,pixelSizePower:o}=this.functionArguments,i="scaled"===s,{indexedColormap:a,offset:l}=this.lookup,c=this.sourceRasterInfos[0].statistics?.[0],p=(0,u.zw)(this.outputPixelType);return{...e,indexedColormap:a,offset:l,zFactor:n,gcsFactor:this.isGCS?zt.rk:1,pixelSizeFactor:i?r:0,pixelSizePower:i?o:0,minValue:c?.min??0,maxValue:c?.max??8e3,isOutputRounded:p}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],en.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:tn,json:{write:!0,name:"rasterFunctionArguments"}})],en.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],en.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],en.prototype,"isGCS",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],en.prototype,"lookup",void 0),en=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunction")],en);const sn=en;var nn;const rn=new Dt.J({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let on=nn=class extends p{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new nn({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,i.Cg)([(0,Qt.e)(rn)],on.prototype,"slopeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],on.prototype,"zFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"psPower",write:!0}})],on.prototype,"pixelSizePower",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"psZFactor",write:!0}})],on.prototype,"pixelSizeFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],on.prototype,"removeEdgeEffect",void 0),on=nn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunctionArguments")],on);const an=on;let un=class extends w{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),t.statistics="percent-rise"!==this.functionArguments.slopeType?[{min:0,max:90,avg:1,stddev:1}]:null,t.bandCount=1,this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:s,slopeType:n,pixelSizePower:r,pixelSizeFactor:o}=this.functionArguments,{isGCS:i}=this,{extent:a,primaryPixelSizes:u}=t,l=u?.[0],c=l??(a?{x:a.width/e.width,y:a.height/e.height}:{x:1,y:1});return(0,zt.yy)(e,{zFactor:s,slopeType:n,pixelSizePower:r,pixelSizeFactor:o,isGCS:i,resolution:c})}_getWebGLParameters(){const{zFactor:t,slopeType:e,pixelSizeFactor:s,pixelSizePower:n}=this.functionArguments;return{zFactor:this.isGCS&&t>=1?t*zt.rk:t,slopeType:e,pixelSizeFactor:s??0,pixelSizePower:n??0,isOutputRounded:(0,u.zw)(this.outputPixelType)}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],un.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:an,json:{write:!0,name:"rasterFunctionArguments"}})],un.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],un.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],un.prototype,"isGCS",void 0),un=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunction")],un);const ln=un;var cn;let pn=cn=class extends p{clone(){return new cn({conversionMatrix:[...this.conversionMatrix],raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],pn.prototype,"conversionMatrix",void 0),pn=cn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunctionArguments")],pn);const hn=pn;let mn=class extends w{constructor(){super(...arguments),this.functionName="SpectralConversion",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,{success:!0,supportsGPU:3===t.bandCount&&9===this.functionArguments.conversionMatrix.length}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:function(t,e,s){const{width:n,height:r,mask:o,bandMasks:i}=t,a=i?.length?g.A.combineBandMasks(i):o,u=[],l=t.pixels.length;for(let n=0;n<e.length/l;n++){const r=xs(t,e.slice(n*l,(n+1)*l),s,a);u.push(r)}const c=new g.A({width:n,height:r,pixels:u,pixelType:s,mask:a});return c.updateStatistics(),c}(e,this.functionArguments.conversionMatrix,this.outputPixelType)}_getWebGLParameters(){const t=(0,u.hP)(this.outputPixelType),[e,s,n,r,o,i,a,l,c]=this.functionArguments.conversionMatrix;return{weights:[e,r,a,s,o,l,n,i,c],clampRange:t}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],mn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:hn,json:{write:!0,name:"rasterFunctionArguments"}})],mn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],mn.prototype,"rasterArgumentNames",void 0),mn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunction")],mn);const dn=mn,gn=new Dt.J({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function fn(t,e){const{fillNoDataOnly:s}=e,{band:n,width:r,height:o,mask:i,outBand:a}=t;if(s&&!i)return void a.set(n);const{statisticsType:u,kernelRows:l,kernelCols:c}=e,p="stddev"===u,h=r*o,m=new Float64Array(h),d=new Float64Array(h),g=new Uint32Array(h);for(let t=0;t<o;t++){const e=t*r;let s=0,o=0,a=0;for(let t=0;t<c;t++)i&&!i[e+t]||(s+=n[e+t],p&&(o+=n[e+t]**2),a++);m[e]=s,d[e]=o,g[e]=a;for(let t=1;t<=r-c;t++){const r=e+t-1,u=r+c;i?(i[r]&&(a--,s-=n[r],p&&(o-=n[r]**2)),i[u]&&(a++,s+=n[u],p&&(o+=n[u]**2))):(s-=n[r],s+=n[u],p&&(o-=n[r]**2,o+=n[u]**2)),m[e+t]=s,g[e+t]=a,p&&(d[e+t]=o)}}const f=new Float64Array(h),y=new Float64Array(h),x=new Uint32Array(h),w=l*r;for(let t=0;t<=r-c;t++){let e=0,s=0,n=0;for(let o=0;o<l;o++){const i=o*r+t;e+=m[i],n+=g[i],p&&(s+=d[i])}f[t]=e,y[t]=s,x[t]=n;for(let i=1;i<=o-l;i++){const o=(i-1)*r+t,a=o+w;e-=m[o],e+=m[a],n-=g[o],n+=g[a],p&&(s-=d[o],s+=d[a]),f[i*r+t]=e,y[i*r+t]=s,x[i*r+t]=n}}const A=Math.floor(l/2),v=Math.floor(c/2);for(let t=A;t<o-A;t++){const e=t*r;for(let n=v;n<r-v;n++){const o=(t-A)*r+n-v,u=x[o];if(0===u||s&&(!i||i[e+n]))continue;const l=f[o]/u,c=p?Math.sqrt((y[o]-f[o]*l)/u):l;a[e+n]=c,i&&(i[e+n]=255)}}}function yn(t,e){const{fillNoDataOnly:s}=e,{band:n,width:r,height:o,mask:i,outBand:a}=t;if(s&&!i)return void a.set(n);const{kernelRows:u,kernelCols:l,statisticsType:c}=e,p=Math.floor(u/2),h=Math.floor(l/2),m="min"===c,d=a.slice(),g=new Uint32Array(r*o);for(let t=p;t<o-p;t++){const e=t*r;for(let t=h;t<r-h;t++){let s=m?Number.MAX_VALUE:-Number.MAX_VALUE,o=0;for(let a=0;a<u;a++)for(let u=0;u<l;u++){const l=e+t+(a-p)*r+u-h;i&&!i[l]||(s=m?Math.min(s,n[l]):Math.max(s,n[l]),o++)}i?(d[e+t]=0===o?0:s,g[e+t]=o):a[e+t]=0===o?0:s}}if(i)for(let t=p;t<o-p;t++){const e=t*r;for(let t=h;t<r-h;t++)if(g[e+t]){if(s&&i[e+t])continue;a[e+t]=d[e+t],i[e+t]=255}}}function xn(t,e){const{fillNoDataOnly:s}=e,{band:n,width:r,height:o,mask:i,outBand:a}=t;if(s&&!i)return void a.set(n);const{kernelRows:u,kernelCols:l}=e,c=Math.floor(u/2),p=Math.floor(l/2),h=a.slice(),m=new Uint32Array(r*o);for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++){if(s&&i?.[e+t])continue;const o=[];for(let s=0;s<u;s++)for(let a=0;a<l;a++){const u=e+t+(s-c)*r+a-p;i&&!i[u]||o.push(n[u])}o.length&&(o.sort((t,e)=>t-e),i?(h[e+t]=o[Math.floor((o.length-1)/2)],m[e+t]=o.length):a[e+t]=o[Math.floor((o.length-1)/2)])}}if(i)for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++)if(m[e+t]){if(s&&i[e+t])continue;a[e+t]=h[e+t],i[e+t]=255}}}function wn(t,e){const{fillNoDataOnly:s}=e,{band:n,width:r,height:o,mask:i,outBand:a}=t;if(s&&!i)return void a.set(n);const{kernelRows:u,kernelCols:l}=e,c=Math.floor(u/2),p=Math.floor(l/2),h="majority"===e.statisticsType,m=u*l,d=a.slice(),g=new Uint32Array(r*o);for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++){if(s&&i?.[e+t])continue;const o=new Map;for(let s=0;s<u;s++)for(let a=0;a<l;a++){const u=e+t+(s-c)*r+a-p;if(i&&!i[u])continue;const l=n[u];o.set(l,o.has(l)?o.get(l)+1:1)}if(0===o.size)continue;let f=0,y=0,x=h?0:m+1;for(const t of o.keys())y=o.get(t),h===y>x&&(x=y,f=t);i?(d[e+t]=f,g[e+t]=o.size):a[e+t]=f}}if(i)for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++)if(g[e+t]){if(s&&i[e+t])continue;a[e+t]=d[e+t],i[e+t]=255}}}var An;let vn=An=class extends p{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new An({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:(0,o.o8)(this.raster)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelRows","rows"],reader:(t,e)=>Number(t??e?.kernelRows??3)}}})],vn.prototype,"rows",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelCols","cols"],reader:(t,e)=>Number(t??e?.kernelCols??3)}}})],vn.prototype,"cols",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],vn.prototype,"fillNoDataOnly",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:{source:["statisticsType","type"],reader:(t,e)=>gn.fromJSON(e?.statisticsType??e?.type)??"min"},write:{target:"type"}}}),(0,Qt.e)(gn)],vn.prototype,"statisticsType",void 0),vn=An=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunctionArguments")],vn);const Cn=vn;let bn=class extends w{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{type:t}=this.functionArguments.toJSON();if(t<1||t>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${t}`};const e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const s=e.clone();s.pixelType=this.outputPixelType;const{statisticsType:n}=this.functionArguments;return"stddev"===n&&this._removeStatsHistColormapVAT(s),this.rasterInfo=s,{success:!0,supportsGPU:s.bandCount<=3&&t<5}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{statisticsType:s,rows:n,cols:r,fillNoDataOnly:o}=this.functionArguments;return function(t,e){const{mask:s}=t,{fillNoDataOnly:n}=e;if(n&&!s)return t;const{pixels:r,width:o,height:i,bandMasks:a,pixelType:u}=t,l=r.length,c=o*i,p=[],{kernelRows:h,kernelCols:m,statisticsType:d,mirrorEdges:f}=e;if(n&&!s)return t;const y=e.outputPixelType??u,x=[];for(let t=0;t<l;t++){const u=r[t],l=g.A.createEmptyBand(y,c);n&&l.set(u);const w=a?.[t]??s,A=w?.slice()??null,v={band:u,width:o,height:i,mask:A,outBand:l};switch(d){case"min":case"max":yn(v,e);break;case"mean":case"stddev":fn(v,e);break;case"median":xn(v,e);break;case"majority":case"minority":wn(v,e)}f&&!n&&Qe(l,o,i,h,m),p.push(l),A&&x.push(A)}let w=x[0]??s;x.length!==l&&(x.length=0),l>1&&a?.length&&(w=g.A.combineBandMasks(a));const A=new g.A({pixelType:y,width:o,height:i,pixels:p,bandMasks:a&&x.length?x:null,mask:w});return A.updateStatistics(),A}(e,{kernelRows:n,kernelCols:r,fillNoDataOnly:o,outputPixelType:this.outputPixelType,statisticsType:s,mirrorEdges:!0})}_getWebGLParameters(){const{rows:t,cols:e,statisticsType:s,fillNoDataOnly:n}=this.functionArguments;return{fillNoDataOnly:n,kernelRows:t,kernelCols:e,statisticsType:s,clampRange:(0,u.hP)(this.outputPixelType)}}_getNeighborhoodSize(){const{rows:t,cols:e}=this.functionArguments;return{rows:t,cols:e}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],bn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Cn,json:{write:!0,name:"rasterFunctionArguments"}})],bn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],bn.prototype,"rasterArgumentNames",void 0),bn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunction")],bn);const Mn=bn;var Tn;let Pn=Tn=class extends p{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,e){if(!t?.length)return null;const s=[];return t.forEach(t=>{const e={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};s.push(e)}),s}writeStatistics(t,e,s){if(!t?.length)return;const n=[];t.forEach(t=>{const e={...t,mean:t.avg,standardDeviation:t.stddev};delete e.avg,delete e.stddev,n.push(e)}),e[s]=n}clone(){return new Tn({statistics:(0,o.o8)(this.statistics),histograms:(0,o.o8)(this.histograms)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Pn.prototype,"statistics",void 0),(0,i.Cg)([(0,ye.w)("statistics")],Pn.prototype,"readStatistics",null),(0,i.Cg)([(0,Se.K)("statistics")],Pn.prototype,"writeStatistics",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Pn.prototype,"histograms",void 0),Pn=Tn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunctionArguments")],Pn);const Nn=Pn;let In=class extends w{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");const e=t.clone(),{statistics:s,histograms:n}=this.functionArguments;return n&&(e.histograms=n),s&&(e.statistics=s),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],In.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Nn,json:{write:!0,name:"rasterFunctionArguments"}})],In.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],In.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],In.prototype,"indexedColormap",void 0),(0,i.Cg)([(0,a.MZ)()],In.prototype,"isNoopProcess",void 0),In=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunction")],In);const Rn=In;var Fn;const kn=new Dt.J({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let _n=Fn=class extends p{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(t,e,s){t?.length&&(Array.isArray(t[0])||(t=t.map(t=>[t.min,t.max,t.avg,t.stddev])),e[s]=t)}clone(){return new Fn({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:(0,o.o8)(this.statistics),gamma:(0,o.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:(0,o.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_n.prototype,"computeGamma",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{name:"dra",write:!0}})],_n.prototype,"dynamicRangeAdjustment",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],_n.prototype,"gamma",void 0),(0,i.Cg)([(0,a.MZ)()],_n.prototype,"histograms",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"maxPercent",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"minPercent",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"numberOfStandardDeviations",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"max",write:!0}})],_n.prototype,"outputMax",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"min",write:!0}})],_n.prototype,"outputMin",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"sigmoidStrengthLevel",void 0),(0,i.Cg)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],_n.prototype,"statistics",void 0),(0,i.Cg)([(0,Se.K)("statistics")],_n.prototype,"writeStatistics",null),(0,i.Cg)([(0,Qt.e)(kn)],_n.prototype,"stretchType",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_n.prototype,"useGamma",void 0),_n=Fn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunctionArguments")],_n);const Sn=_n;let Bn=class extends w{constructor(){super(...arguments),this.functionName="Stretch",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null,this.cutOffs=null}_bindSourceRasters(){this.lookup=null,this.cutOffs=null;const t=this.sourceRasterInfos[0],{pixelType:e}=t,{functionArguments:s}=this,{dynamicRangeAdjustment:n,gamma:r,useGamma:o}=s;if(!n&&["u8","u16","s8","s16"].includes(e)){const n=(0,qe.DP)(s.toJSON(),{rasterInfo:t}),i=(0,u.zw)(this.outputPixelType)?"round":"float";this.lookup=(0,qe.RP)({pixelType:e,...n,gamma:o?r:null,rounding:i}),this.cutOffs=n}else n||(this.cutOffs=(0,qe.DP)(s.toJSON(),{rasterInfo:t}));this.outputPixelType=this._getOutputPixelType(e);const i=t.clone();i.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(i),"u8"===this.outputPixelType&&(i.keyProperties.DataType="processed");const{outputMin:a=0,outputMax:l=255}=this.functionArguments;i.statistics=[];for(let t=0;t<i.bandCount;t++)i.statistics[t]={min:a,max:l};return this.rasterInfo=i,{success:!0,supportsGPU:!n}}_processPixels(t,e){const s=t.pixelBlocks?.[0];if(null==s)return s;const{lookup:n}=this;if(n)return(0,Kt.eH)(s,{...n,outputPixelType:this.rasterInfo.pixelType});const{functionArguments:r}=this,o=e?.stretchCutoff??this.cutOffs??(0,qe.DP)(r.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:s}),i=r.useGamma?r.gamma:null;return(0,qe._N)(s,{...o,gamma:i,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const{outputMin:t=0,outputMax:e=255,gamma:s,useGamma:n}=this.functionArguments,r=this.rasterInfo.bandCount>=2?3:1,o=n&&s?.length?(0,qe.Nh)(r,s):[1,1,1],{minCutOff:i,maxCutOff:a}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};1===i.length&&(i[1]=i[2]=i[0],a[1]=a[2]=a[0]);const l=a.map((s,n)=>(e-t)/(a[n]-i[n])),c=(0,u.zw)(this.outputPixelType),p=n&&s?[s[0],s[1]??s[0],s[2]??s[0]]:[1,1,1],h=n?[o[0],o[1]??o[0],o[2]??o[0]]:[1,1,1];return{bandCount:r,minOutput:t,maxOutput:e,minCutOff:i,maxCutOff:a,factor:l,useGamma:n,gamma:p,gammaCorrection:h,stretchType:this.functionArguments.stretchType,isOutputRounded:c,type:"stretch"}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Bn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Sn,json:{write:!0,name:"rasterFunctionArguments"}})],Bn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Bn.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Bn.prototype,"lookup",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Bn.prototype,"cutOffs",void 0),Bn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunction")],Bn);const jn=Bn;var Zn;let zn=Zn=class extends p{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new Zn({attributeTableAsRecordSet:(0,o.o8)(this.attributeTableAsRecordSet)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],zn.prototype,"attributeTableAsRecordSet",void 0),zn=Zn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunctionArguments")],zn);const Gn=zn;let On=class extends w{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1||t.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};const{attributeTableAsRecordSet:e}=this.functionArguments;if(!e)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(t.pixelType);const s=t.clone();return s.pixelType=this.outputPixelType,s.bandCount=1,"thematic"!==s.dataType&&(s.keyProperties=s.keyProperties?{...s.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=s,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],On.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Gn,json:{write:!0,name:"rasterFunctionArguments"}})],On.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],On.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],On.prototype,"isNoopProcess",void 0),On=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunction")],On);const Dn=On,En=new Map;function Vn(t,e){const{rasterFunctionArguments:s}=t;s&&(s.rasters||[s.raster,s.raster2]).forEach(t=>{t&&"number"!=typeof t&&("string"==typeof t?t.startsWith("http")&&(e.includes(t)||e.push(t)):"rasterFunctionArguments"in t&&Vn(t,e))})}function Un(t,e){e=e??{};try{if("function"in(t=(0,o.o8)(t))&&"arguments"in t&&t.arguments){const s=Jn(t,new Map,e);if(Qn(s),!s.renderingRule)throw new r.A("raster-function-helper","Unsupported raster function json.");t=s.renderingRule}if("rasterFunction"in t){const s=Kn(t=$n(t),e);return s.isRoot=!0,s}}catch{}throw new r.A("raster-function-helper","unsupported raster function json.")}function Ln(t){return!!(t&&"object"==typeof t&&t.rasterFunction&&t.rasterFunctionArguments)}function $n(t){const{rasterFunction:e,rasterFunctionArguments:s}=t,n={};for(const t in s){let e=s[t];const r=t.toLowerCase();if("rasters"===r&&Array.isArray(e))n.rasters=e.map(t=>Ln(t)?$n(t):t);else switch(Ln(e)&&(e=$n(e)),r){case"dra":n.dra=e;break;case"pspower":n.psPower=e;break;case"pszfactor":n.psZFactor=e;break;case"bandids":n.bandIds=e;break;default:n[t[0].toLowerCase()+t.slice(1)]=e}}return"Local"!==e||n.rasters?.length||(n.rasters=["$$"]),{...t,rasterFunctionArguments:n}}function Kn(t,e){const{rasterFunction:s,rasterFunctionArguments:n}=t,o=t.outputPixelType?.toLowerCase();if(null==s||!En.has(s))throw new r.A("raster-function-helper",`unsupported raster function: ${s}`);const i=En.get(s),a=("function"==typeof i.ctor?i.ctor:i.ctor.default).fromJSON({...t,outputPixelType:o}),{rasterArgumentNames:u}=a,l=[],c=function(t,e){return"rasters"===e[0]&&Array.isArray(t.rasters)?t.rasters:e.map(e=>t[e])}(n,u),p="rasters"===u[0]||u.length>1,h=[];for(let t=0;t<c.length;t++){const s=c[t];let n;null==s||"string"==typeof s&&s.startsWith("$")?l.push(e?.raster):"string"==typeof s?e[s]&&l.push(e[s]):"number"!=typeof s&&"rasterFunction"in s&&(n=Kn(s,e),p||(a.functionArguments[u[t]]=n),l.push(n)),p&&h.push(n??s)}if(p&&("rasters"===u[0]?a.functionArguments.rasters=h:u.forEach((t,e)=>{a.functionArguments[t]=h[e]})),e){a.sourceRasters=l;const t=e.raster?.url;t&&(a.mainPrimaryRasterId=t)}return a}function Wn(t,e){if(t&&e)for(const s in t){const n=t[s];n&&"object"==typeof n&&"type"in n&&("RasterFunctionTemplate"===n.type?Wn(n.arguments,e):"RasterFunctionVariable"===n.type&&null!=e[n.name]&&(n.value=e[n.name]))}}function Hn(t,e){if(!t||"object"!=typeof t)return t;const{value:s}=t;if(!s||"object"!=typeof s)return t.isDataset?"$$":s;if(Array.isArray(s))return 0===s.length?[]:s.map(t=>t&&"object"==typeof t&&"RasterFunctionVariable"===t.type?Hn(t,e):t);if("value"in s&&["number","string","boolean"].includes(typeof s.value))return s.value;if(t.isDataset&&"Scalar"!==s.type)return"$$";if(!("type"in s))return s;let n=s;switch(s.type){case"Scalar":n=s.value;break;case"AlgorithmicColorRamp":n=qn(s);break;case"MultiPartColorRamp":n={type:"multipart",colorRamps:s.ArrayOfColorRamp.map(qn)};break;case"ArgumentArray":if(s.elements?.length&&"RasterStatistics"!==s.elements[0].type){const t=[];for(let n=0;n<s.elements.length;n++){const o=s.elements[n],{type:i}=o;if(i)if("RasterFunctionTemplate"===i){const{renderingRule:s}=Jn(o,e);t.push(s),null!=o._object_id&&e.set(o._object_id,s)}else{if("RasterFunctionVariable"!==i)throw new r.A("raster-function-helper","unsupported raster function json.");{const s=Hn(o,e);t.push(s),null!=o._object_id&&e.set(o._object_id,s)}}else t.push(o)}n=t}else n=s.elements}return null!=s._object_id&&e.set(s._object_id,n),n}function qn(t){const e=t.algorithm??"esriHSVAlgorithm";let{FromColor:s,ToColor:r}=t;if(!Array.isArray(s)){const{r:t,g:e,b:r}=(0,n.$)({h:s.Hue,s:s.Saturation,v:s.Value});s=[t,e,r,s.AlphaValue]}if(!Array.isArray(r)){const{r:t,g:e,b:s}=(0,n.$)({h:r.Hue,s:r.Saturation,v:r.Value});r=[t,e,s,r.AlphaValue]}return{type:"algorithmic",algorithm:e,fromColor:s,toColor:r}}function Jn(t,e,s){s&&Wn(t,s);const n={renderingRule:{},templates:e};return Xn(t,n),n}function Xn(t,e){if(!t||!e.renderingRule)return;const{renderingRule:s,templates:n}=e,{function:r,arguments:o,_object_id:i}=t;if(!r||!o)return;null!=i&&n.set(i,s),s.rasterFunction=r.type.replace("Function",""),s.outputPixelType=r.pixelType;const a={};s.rasterFunctionArguments=a;for(const t in o){if("type"===t||"object_id"===t||"_object_ref_id"===t)continue;const e=o[t];e&&"object"==typeof e&&"type"in e&&("RasterFunctionTemplate"===e.type||"RasterFunctionVariable"===e.type)?("RasterFunctionVariable"===e.type?a[t]=Hn(e,n):(s.rasterFunctionArguments[t]={},Xn(e,{renderingRule:s.rasterFunctionArguments[t],templates:n})),null!=e._object_id&&n.set(e._object_id,a[t])):a[t]=e}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),s.rasterFunction){case"Stretch":!function(t){t.Statistics?.length&&"object"==typeof t.Statistics&&(t.Statistics=t.Statistics.map(t=>[t.min,t.max,t.mean,t.standardDeviation])),null!=t.NumberOfStandardDeviation&&(t.NumberOfStandardDeviations=t.NumberOfStandardDeviation,delete t.NumberOfStandardDeviation)}(a);break;case"Colormap":!function(t){"randomcolorramp"===t.ColorRamp?.type?.toLowerCase()&&(delete t.ColorRamp,t.ColormapName="Random"),0===t.ColorSchemeType&&delete t.ColorRamp}(a);break;case"Convolution":!function(t){null!=t.ConvolutionType&&(t.Type=t.ConvolutionType,delete t.ConvolutionType)}(a);break;case"Mask":!function(t){t.NoDataValues?.length&&"string"==typeof t.NoDataValues[0]&&(t.NoDataValues=t.NoDataValues.filter(t=>""!==t).map(t=>Number(t)))}(a)}}function Qn(t){const{renderingRule:e,templates:s}=t;if("object"!=typeof e||!e?.rasterFunctionArguments||!s.size)return;const{rasterFunctionArguments:n}=e;for(const t in n){const e=n[t],o="_object_ref_id"===t?e:e&&"object"==typeof e&&"_object_ref_id"in e?e._object_ref_id:null;if(null!=o){if(!s.has(o))throw new r.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${o} does not exist`);const e=s.get(o);"_object_ref_id"!==t?n[t]=e:e&&"object"==typeof e&&Object.assign(n,e);continue}e&&"object"==typeof e&&(e.rasterFunctionArguments&&Qn({renderingRule:e,templates:s}),Array.isArray(e)&&e.forEach((t,n)=>{if(t&&"object"==typeof t)if(null!=t._object_ref_id){if(!s.has(t._object_ref_id))throw new r.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${e} does not exist`);const i=s.get(o);i&&"object"==typeof i?Object.assign(t,i):e[n]=i}else Qn({renderingRule:t,templates:s})}))}}En.set("Arithmetic",{desc:"Arithmetic Function",ctor:St,rasterArgumentNames:["rasters"]}),En.set("Aspect",{desc:"Aspect Function",ctor:Ot,rasterArgumentNames:["raster"]}),En.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:ne,rasterArgumentNames:["raster"]}),En.set("Colormap",{desc:"Colormap Function",ctor:Me,rasterArgumentNames:["raster"]}),En.set("ColormapToRGB",{desc:"ColormapToRGB Function",ctor:ke,rasterArgumentNames:["raster"]}),En.set("CompositeBand",{desc:"CompositeBand Function",ctor:ze,rasterArgumentNames:["rasters"]}),En.set("ComputeChange",{desc:"ComputeChange Function",ctor:$e,rasterArgumentNames:["rasters"]}),En.set("Convolution",{desc:"Convolution Function",ctor:is,rasterArgumentNames:["raster"]}),En.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Xe,rasterArgumentNames:["raster"]}),En.set("ExtractBand",{desc:"ExtractBand Function",ctor:ys,rasterArgumentNames:["raster"]}),En.set("Curvature",{desc:"Curvature Function",ctor:hs,rasterArgumentNames:["raster"]}),En.set("Hillshade",{desc:"Hillshade Function",ctor:Fs,rasterArgumentNames:["raster"]}),En.set("ShadedRelief",{desc:"ShadedRelief Function",ctor:sn,rasterArgumentNames:["raster"]}),En.set("Grayscale",{desc:"Grayscale Function",ctor:bs,rasterArgumentNames:["raster"]}),En.set("Clip",{desc:"Clip Function",ctor:me,rasterArgumentNames:["raster"]}),En.set("Local",{desc:"Local Function",ctor:js,rasterArgumentNames:["rasters"]}),En.set("Mask",{desc:"Mask Function",ctor:Es,rasterArgumentNames:["raster"]}),En.set("NDVI",{desc:"NDVI Function",ctor:Ks,rasterArgumentNames:["raster"]}),En.set("Remap",{desc:"Remap Function",ctor:Xs,rasterArgumentNames:["raster"]}),En.set("Slope",{desc:"Slope Function",ctor:ln,rasterArgumentNames:["raster"]}),En.set("SpectralConversion",{desc:"Spectral Conversion",ctor:dn,rasterArgumentNames:["raster"]}),En.set("Statistics",{desc:"Focal Statistics Function",ctor:Mn,rasterArgumentNames:["raster"]}),En.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:Rn,rasterArgumentNames:["raster"]}),En.set("Stretch",{desc:"Stretch Function",ctor:jn,rasterArgumentNames:["raster"]}),En.set("Table",{desc:"Attribute Table Function",ctor:Dn,rasterArgumentNames:["raster"]})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[262],{52106(e,t,r){r.d(t,{A:()=>M});var n,i,o=r(5482),s=r(37838),a=r(69540),l=r(51447),u=r(25482),c=r(53966),p=r(36708),h=r(24326),d=r(91429),f=r(12195),y=r(65864),m=r(50498),g=r(55156),w=r(60950),b=r(54339),v=r(94128),_=r(33910);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 M=class extends((0,a.OU)(u.o)){static{n=v.Z}static{i=this}constructor(e){super(e),this[n]=!0,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,h.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(c.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}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),"mesh"!==e?.type&&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,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,g.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,g.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(){return{aggregateGeometries:x(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}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.addHandles([(0,p.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.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,p.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&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",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,o.Cg)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,y.rS)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,d.MZ)({value:null})],M.prototype,"attributes",null),(0,o.Cg)([(0,d.MZ)({value:null,types:m.yR,json:{read:y.rS}})],M.prototype,"geometry",null),(0,o.Cg)([(0,d.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,o.Cg)([(0,d.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,o.Cg)([(0,d.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,o.Cg)([(0,d.MZ)({type:s.A,value:null})],M.prototype,"popupTemplate",null),(0,o.Cg)([(0,d.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,d.MZ)({value:null,types:_.Es})],M.prototype,"symbol",null),(0,o.Cg)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,o.Cg)([(0,d.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=i=(0,o.Cg)([(0,d.$K)("esri.Graphic")],M)},563(e,t,r){r.d(t,{QueueProcessor:()=>u,SharedConcurrency:()=>p});var n=r(97768),i=r(17676),o=r(9775),s=r(32587),a=r(76030),l=r(44794);class u{constructor(e){this._schedule=null,this._deferreds=new s.A,this._controllers=new s.A,this._processingItems=new s.A,this._pausedSignal=(0,l.v)(!1),this.process=e.process,this.concurrency=e.concurrency,this.sharedConcurrency=e.sharedConcurrency??h,this._queue=new o.A(e.peeker)}destroy(){this.clear(),this._schedule=(0,n.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&!this.full}get full(){return this._processingItems.size>=this.concurrency||this.sharedConcurrency.full}abort(e){const t=this._controllers.get(e);t?.abort()}clear(){this._queue.clear();const e=Array.from(this._controllers.values());this._controllers.clear(),e.forEach(e=>e.abort()),this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,r)=>e(r))}_get(e){const t=this._deferreds.get(e);return t?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const r=this._get(e);if(r)return r;const n=new AbortController,o=Promise.withResolvers(),s=t?(0,i.u7)(t,()=>n.abort()):null,a=(0,i.NY)(n.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),l(),o.reject((0,i.NK)())}),l=()=>{a.remove(),s?.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()};return this._deferreds.set(e,o),this._controllers.set(e,n),o.promise.then(l,l),this._queue.push(e),this._scheduleNext(),o.promise}last(){return this._queue.last()}reset(){const e=Array.from(this._processingItems.values());this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.has(e)&&(this._processingItems.delete(e),this.sharedConcurrency.current.value-=1)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,a._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency&&!this.sharedConcurrency.full;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const r=new AbortController,n=new c(e,r);this._processingItems.set(e,n),this.sharedConcurrency.current.value+=1;try{t=this.process(e,r.signal)}catch(e){this._processError(n,e)}(0,i.$X)(t)?(n.promise=t,t.then(e=>this._processResult(n,e),e=>this._processError(n,e))):this._processResult(n,t)}}class c{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class p{constructor(e){this.limit=e,this.current=(0,l.v)(0)}get full(){return this.current.value>=this.limit}}const h=new p(1/0)},32587(e,t,r){r.d(t,{A:()=>o});var n=r(62788),i=r(95488);class o{constructor(e){this._observable=new i.I,this._notifyPending=!1,this._batchDepth=0,this._map=new Map(e)}get size(){return(0,n.gc)(this._observable),this._map.size}batch(e){try{this._batchDepth++,e()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(e){const t=this._map.delete(e);return t&&this._notify(),t}entries(){return(0,n.gc)(this._observable),this._map.entries()}forEach(e,t){(0,n.gc)(this._observable),this._map.forEach((r,n)=>e.call(t,r,n,this),t)}get(e){return(0,n.gc)(this._observable),this._map.get(e)}has(e){return(0,n.gc)(this._observable),this._map.has(e)}keys(){return(0,n.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._notify(),this}transformValues(e,t=this._map.keys()){this.batch(()=>{for(const r of t){if(!this._map.has(r))continue;const t=this._map.get(r),n=e(t,r);n!==t&&this.set(r,n)}})}values(){return(0,n.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,n.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},46140(e,t,r){r.d(t,{A:()=>i});var n=r(49186);class i{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new i(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new n.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!s.test(o))throw new n.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),l=parseInt(o,10);return new i(a,l,t)}}},6797(e,t,r){r.d(t,{Ui:()=>h});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 c(e){return e?e.declaredClass:null}function p(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)),h=n.filter(e=>!i.includes(e)),d=n.filter(r=>i.includes(r)&&u(e,r)!==u(t,r)).concat(o,h).sort(),f=c(e);if(f&&s.has(f)&&d.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=a(e)&&a(t);for(const n of d){const i=u(e,n),o=u(t,n);let s;if((m||"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&&c(i)===c(o)?p(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=y?y.diff[n]=s:y={type:"partial",diff:{[n]:s}})}}return y}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},9093(e,t,r){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>i,vt:()=>n,zK:()=>o});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:i,create:n,fromValues:function(e,t,r,n,i,o,s,a,l,u,c,p,h,d,f,y){return[e,t,r,n,i,o,s,a,l,u,c,p,h,d,f,y]}},Symbol.toStringTag,{value:"Module"}))},35522(e,t,r){r.d(t,{$A:()=>T,Bw:()=>o,C:()=>s,Cc:()=>C,DI:()=>x,Il:()=>G,Io:()=>w,Ln:()=>g,Om:()=>A,Qr:()=>p,Re:()=>u,S8:()=>M,T9:()=>y,WQ:()=>l,Z0:()=>S,_S:()=>d,aI:()=>P,ei:()=>F,fw:()=>O,gL:()=>E,hG:()=>b,hZ:()=>a,hs:()=>m,jb:()=>R,jk:()=>f,lo:()=>k,lw:()=>c,m3:()=>v,oW:()=>N,t2:()=>j,tn:()=>h,uE:()=>L,xg:()=>z,ze:()=>_});var n=r(51850),i=r(34304);function o(e){const t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function p(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function h(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function d(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function f(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function y(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function g(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function w(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}function b(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function v(e){const t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function _(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function x(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function M(e,t){const r=t[0],n=t[1],i=t[2];let o=r*r+n*n+i*i;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}function A(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function T(e,t,r){const n=t[0],i=t[1],o=t[2],s=r[0],a=r[1],l=r[2];return e[0]=i*l-o*a,e[1]=o*s-n*l,e[2]=n*a-i*s,e}function C(e,t,r,n){const i=t[0],o=t[1],s=t[2];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e[2]=s+n*(r[2]-s),e}function S(e,t,r){const n=t[0],i=t[1],o=t[2];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12],e[1]=r[1]*n+r[5]*i+r[9]*o+r[13],e[2]=r[2]*n+r[6]*i+r[10]*o+r[14],e}function F(e,t,r){const n=t[0],i=t[1],o=t[2];return e[0]=n*r[0]+i*r[3]+o*r[6],e[1]=n*r[1]+i*r[4]+o*r[7],e[2]=n*r[2]+i*r[5]+o*r[8],e}function E(e,t,r){return O(e,t,r[0],r[1],r[2],r[3])}function O(e,t,r,n,i,o){const s=t[0],a=t[1],l=t[2],u=n*l-i*a,c=i*s-r*l,p=r*a-n*s,h=n*p-i*c,d=i*u-r*p,f=r*c-n*u,y=2*o;return e[0]=s+u*y+2*h,e[1]=a+c*y+2*d,e[2]=l+p*y+2*f,e}const I=(0,n.vt)(),q=(0,n.vt)();function j(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function P(e,t){if(e===t)return!0;const r=e[0],n=e[1],o=e[2],s=t[0],a=t[1],l=t[2],u=(0,i.FD)();return Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-a)<=u*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(o-l)<=u*Math.max(1,Math.abs(o),Math.abs(l))}function N(e,t,r){const n=r[0]-t[0],i=r[1]-t[1],o=r[2]-t[2];let s=n*n+i*i+o*o;return s>0?(s=1/Math.sqrt(s),e[0]=n*s,e[1]=i*s,e[2]=o*s,e):(e[0]=0,e[1]=0,e[2]=0,e)}const R=u,$=c,Z=p,z=w,k=b,G=o,L=v;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:l,angle:function(e,t){M(I,e),M(q,t);const r=A(I,q);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(e,t,r,n,i,o){const s=1-o,a=s*s,l=o*o,u=a*s,c=3*o*a,p=3*l*s,h=l*o;return e[0]=t[0]*u+r[0]*c+n[0]*p+i[0]*h,e[1]=t[1]*u+r[1]*c+n[1]*p+i[1]*h,e[2]=t[2]*u+r[2]*c+n[2]*p+i[2]*h,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,r=1){return e[0]=Math.min(Math.max(e[0],t),r),e[1]=Math.min(Math.max(e[1],t),r),e[2]=Math.min(Math.max(e[2],t),r),e},copy:s,cross:T,crossAndNormalize:function(e,t,r){const n=t[0],i=t[1],o=t[2],s=r[0],a=r[1],l=r[2],u=i*l-o*a,c=o*s-n*l,p=n*a-i*s,h=Math.sqrt(u*u+c*c+p*p);return e[0]=u/h,e[1]=c/h,e[2]=p/h,e},direction:N,dist:z,distance:w,div:Z,divide:p,dot:A,equals:P,exactEquals:j,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,r,n,i,o){const s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,u=s*(o-1),c=s*(3-2*o);return e[0]=t[0]*a+r[0]*l+n[0]*u+i[0]*c,e[1]=t[1]*a+r[1]*l+n[1]*u+i[1]*c,e[2]=t[2]*a+r[2]*l+n[2]*u+i[2]*c,e},inverse:x,len:G,length:o,lerp:C,max:y,min:f,mul:$,multiply:c,negate:_,normalize:M,random:function(e,t=1){const r=i.Ov,n=2*r()*Math.PI,o=2*r()-1,s=Math.sqrt(1-o*o)*t;return e[0]=Math.cos(n)*s,e[1]=Math.sin(n)*s,e[2]=o*t,e},rotateX:function(e,t,r,n){const i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[0],o[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),o[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateY:function(e,t,r,n){const i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),o[1]=i[1],o[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateZ:function(e,t,r,n){const i=[],o=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],o[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),o[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),o[2]=i[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:m,scaleAndAdd:g,set:a,sign:d,sqrDist:k,sqrLen:L,squaredDistance:b,squaredLength:v,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:R,subtract:u,transformMat3:F,transformMat4:S,transformQuat:E,transformQuatValues:O},Symbol.toStringTag,{value:"Module"}))},44794(e,t,r){r.d(t,{v:()=>a});var n=r(4718),i=r(62788),o=r(95488);class s{constructor(e,t){this._observable=new o.I,this._value=e,this._equalityFunction=t}get value(){return(0,i.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=n.gh){return new s(e,t)}},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){r.d(t,{h:()=>n});const n=r(29953).ho},4197(e,t,r){r.d(t,{Vj:()=>u,cj:()=>l,jh:()=>o,l5:()=>a,xm:()=>s});var n=r(34275),i=r(9093);function o(e){return e<=n.y9?new Array(e).fill(0):new Float64Array(e)}function s(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function a(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function l(e){return[...e]}function u(e){const t=(0,i.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},70328(e,t,r){r.d(t,{BI:()=>b,DC:()=>p,Ej:()=>d,Ie:()=>g,Jt:()=>w,Ne:()=>f,RF:()=>c,aI:()=>_,fA:()=>s,gE:()=>l,hZ:()=>m,iT:()=>h,is:()=>v,qv:()=>x,vI:()=>y,vY:()=>a,v_:()=>M,vt:()=>o,w1:()=>u}),r(35522);var n=r(5443),i=(r(19419),r(4197));function o(e=M){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,n,i,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=s,a}function a(e,t=o()){return function(e,t,r,n=o()){return m(n,x),function(e,t,r=0,n=t.length/3){let i=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function l(e,t=(0,i.jh)(24)){const[r,n,o,s,a,l]=e;return t[0]=r,t[1]=n,t[2]=o,t[3]=r,t[4]=n,t[5]=l,t[6]=r,t[7]=a,t[8]=o,t[9]=r,t[10]=a,t[11]=l,t[12]=s,t[13]=n,t[14]=o,t[15]=s,t[16]=n,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function f(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?m(e,x):o(x)}function w(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function v(e){return 6===e.length}function _(e,t,r){if(null==e||null==t)return e===t;if(!v(e)||!v(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const x=[1/0,1/0,1/0,-1/0,-1/0,-1/0],M=[0,0,0,0,0,0];o()},55156(e,t,r){r.d(t,{I:()=>i,e:()=>n});const n=Symbol("idFieldsProviderSymbol");function i(e){return(t=e)&&n in t?e[n]:void 0;var t}},99680(e,t,r){r.r(t),r.d(t,{default:()=>ne});var n=r(5482),i=r(37838),o=r(69540),s=r(7762),a=r(49186),l=r(44208),u=r(25728),c=r(93637),p=r(36708),h=r(10107),d=r(36005),f=r(64108),y=r(43937),m=r(5443),g=r(16930),w=r(55156),b=r(60950),v=r(89808),_=r(99959);const x=Symbol("isParquetGraphicOrigin");var M;class A extends _.A{get[(M=x,b.ym)](){return this.layer}get[w.e](){return this.layer}get[v.Q](){return this.layer}constructor(e){super(),this[M]=!0,this.type="parquet",this.layer=e}get id(){return this.layer.id}}var T=r(4146),C=r(92474),S=r(53966),F=r(17676),E=r(83027),O=r(42760),I=r(22671);let q=class extends C.x_{constructor(e){super(e),this.type="parquet"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._initialize(t)),Promise.resolve(this)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}setCustomParameters(e){this._proxy.setCustomParameters(e).catch(()=>{S.A.getLogger(this).warn("Failed to update customParameters")})}async updateFiles(e){await this._proxy.updateFiles(e)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._proxy.queryFeatures(e.toJSON(),{signal:t?.signal})}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,{signal:t?.signal});return I.A.fromJSON(r)}async queryObjectIds(e,t){return await this._proxy.queryObjectIds(e.toJSON(),{signal:t?.signal})}async queryFeatureCount(e,t){return this._proxy.queryFeatureCount(e.toJSON(),{signal:t?.signal})}async queryExtent(e,t){if(null==this.layer.geometryEncoding)return S.A.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const r=await this._proxy.queryExtent(e.toJSON(),{signal:t?.signal});return{count:r.count,extent:m.A.fromJSON(r.extent)}}async _initialize(e){this._connection=await(0,E.h)("ParquetSourceWorker",{strategy:"dedicated",signal:e,registryTarget:this}),(0,F.Te)(e),this._proxy=this._connection.createInvokeProxy();const{layerDefinition:t,capabilities:r}=await this._proxy.load({urls:this.layer.urls.items,fields:this.layer.fields?.map(e=>e.toJSON()),geometryType:this.layer.geometryType?(0,O.sA)(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters});(0,F.Te)(e),this.sourceJSON=t,this.capabilities=r}};(0,n.Cg)([(0,h.MZ)()],q.prototype,"type",void 0),(0,n.Cg)([(0,h.MZ)({constructOnly:!0})],q.prototype,"layer",void 0),(0,n.Cg)([(0,h.MZ)()],q.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,h.MZ)()],q.prototype,"capabilities",void 0),q=(0,n.Cg)([(0,f.$)("esri.layers.graphics.sources.ParquetSource")],q);var j=r(63074),P=r(69208),N=r(87718),R=r(56658),$=r(16131),Z=r(32756),z=r(25036),k=r(10873),G=r(29005),L=r(20437),D=r(17036),J=r(30524),V=r(46499),U=r(39383),B=r(10427),K=r(16238),Q=r(41214),Y=r(61956),W=r(97159),H=r(30291);const X=(0,D.p)(),ee="__OBJECTID",te={types:{key:"type",base:null,typeMap:{wkb:K.A,location:B.A}},json:{name:"layerDefinition.geometryEncoding",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryEncoding"}}}}};let re=class extends((0,R.J)((0,N.F)((0,j.dM)((0,Z.fY)((0,z.j)((0,$.q)((0,u.M)((0,P.d)((0,o.OU)(T.A)))))))))){constructor(e){super(e),this.copyright=null,this.definitionExpression=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new A(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=ee,this.operationalLayerType="ParquetLayer",this.outFields=null,this.persistenceEnabled=!!(0,l.A)("parquetlayer-persistence-enabled"),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new s.A}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([(0,p.wB)(()=>this.urls,e=>this.source?.updateFiles(e.items)),(0,p.wB)(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get capabilities(){return this.source?.capabilities}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r,n){const i=e.filter(e=>!(e.name===ee&&"oid"===e.type)).map(e=>e.toJSON(n));(0,c.sM)(r,i,t)}get isTable(){return null==this.geometryEncoding&&null==this.displayOptimization}set renderer(e){(0,J.yp)(e,this.fieldsIndex),this._set("renderer",e)}readUrls(e){return new s.A("files"===e.type?e.urls:[])}writeUrls(e,t,r,n){const i=[];if(e?.length){n={blockedRelativeUrls:n?.blockedRelativeUrls};for(let t of e)t=(0,W.t)(t,n),t&&i.push(t)}i.length?t.source={type:"files",urls:i}:n.messages?.push(new a.A("parquet-layer:missing-urls","Missing or empty 'urls'",{layer:this}))}createPopupTemplate(e){return(0,H.tn)(this,e)}createQuery(){const e=new Y.A;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}async createSource(e){const t=new q({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t),n=this.graphicOrigin;if(r?.features)for(const e of r.features)e.layer=e.sourceLayer=this,e.origin=n;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return Y.A.from(e)??this.createQuery()}async _load(e){const t=await this.createSource(e);this._set("source",t),this.read(t.sourceJSON,{origin:"service"}),["fields"].forEach(e=>this.revertToOrigin(e,"service")),(0,J.yp)(this.renderer,this.fieldsIndex),null==this.spatialReference&&(this.spatialReference=g.A.WGS84)}};(0,n.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1,write:!1}})],re.prototype,"capabilities",null),(0,n.Cg)([(0,h.MZ)({type:String})],re.prototype,"copyright",void 0),(0,n.Cg)([(0,h.MZ)({readOnly:!0})],re.prototype,"defaultPopupTemplate",null),(0,n.Cg)([(0,h.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],re.prototype,"definitionExpression",void 0),(0,n.Cg)([(0,h.MZ)()],re.prototype,"displayOptimization",void 0),(0,n.Cg)([(0,h.MZ)({type:[L.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],re.prototype,"fields",void 0),(0,n.Cg)([(0,y.K)("fields")],re.prototype,"writeFields",null),(0,n.Cg)([(0,h.MZ)(X.fieldsIndex)],re.prototype,"fieldsIndex",void 0),(0,n.Cg)([(0,h.MZ)(te)],re.prototype,"geometryEncoding",void 0),(0,n.Cg)([(0,h.MZ)({type:m.A,json:{name:"extent"}})],re.prototype,"fullExtent",void 0),(0,n.Cg)([(0,h.MZ)({type:O.ye.apiValues,json:{name:"layerDefinition.geometryType",read:{reader:O.ye.read},write:{writer:O.ye.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"geometryType",reader:O.ye.read}}}}})],re.prototype,"geometryType",void 0),(0,n.Cg)([(0,h.MZ)({readOnly:!0,clonable:!1})],re.prototype,"graphicOrigin",void 0),(0,n.Cg)([(0,h.MZ)(k.kF)],re.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,h.MZ)({type:[V.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U.w},write:!0}})],re.prototype,"labelingInfo",void 0),(0,n.Cg)([(0,h.MZ)(k.fV)],re.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,h.MZ)()],re.prototype,"file",void 0),(0,n.Cg)([(0,h.MZ)({type:String,readOnly:!0})],re.prototype,"objectIdField",void 0),(0,n.Cg)([(0,h.MZ)({type:["ParquetLayer"]})],re.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,h.MZ)(X.outFields)],re.prototype,"outFields",void 0),(0,n.Cg)([(0,h.MZ)(k.M6)],re.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,h.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],re.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,h.MZ)({types:Q.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{read:{source:"drawingInfo.renderer"}}}}})],re.prototype,"renderer",null),(0,n.Cg)([(0,h.MZ)({type:q,readOnly:!0,cast:null,json:{read:!1}})],re.prototype,"source",void 0),(0,n.Cg)([(0,h.MZ)({type:g.A,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:"extent.spatialReference"}}}}})],re.prototype,"spatialReference",void 0),(0,n.Cg)([(0,h.MZ)({type:[G.A]})],re.prototype,"templates",void 0),(0,n.Cg)([(0,h.MZ)()],re.prototype,"title",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1},readOnly:!0})],re.prototype,"type",void 0),(0,n.Cg)([(0,h.MZ)({type:s.A.ofType(String),json:{name:"source",write:{isRequired:!0,ignoreOrigin:!0}}})],re.prototype,"urls",void 0),(0,n.Cg)([(0,d.w)("urls")],re.prototype,"readUrls",null),(0,n.Cg)([(0,y.K)("urls")],re.prototype,"writeUrls",null),re=(0,n.Cg)([(0,f.$)("esri.layers.ParquetLayer")],re);const ne=re},76369(e,t,r){r.d(t,{LF:()=>x,M9:()=>M});var n=r(49186),i=r(93637),o=r(40876),s=r(59247),a=r(27865);class l extends SyntaxError{constructor(e,t,r,n){super(e),this.expected=t,this.found=r,this.location=n,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null;const n=e.find(e=>e.source===this.location.source);n&&(r=n.text.split(/\r\n|\n|\r/g));const i=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,s=this.location.source+":"+o.line+":"+o.column;if(r){const e=this.location.end,n="".padEnd(o.line.toString().length," "),a=r[i.line-1],l=(i.line===e.line?e.column:a.length+1)-i.column||1;t+="\n --\x3e "+s+"\n"+n+" |\n"+o.line+" | "+a+"\n"+n+" | "+"".padEnd(i.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}const n=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function i(e){return n?e.replace(n,e=>"\\u{"+r(e)+"}"):e}function o(e){return i(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return i(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}const a={literal:e=>'"'+o(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return a[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."}}function u(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=c(e);return t&&0!==t.length?t:null}const t=e.map(e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new n.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:c(e.value)}});t.sort((e,t)=>t.effects.length-e.effects.length);for(let e=0;e<t.length-1;e++){if(!(0,a.mj)(t[e].effects,t[e+1].effects))throw new n.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,a.O9)(t[e].effects,t[e+1].effects)}return t.sort((e,t)=>t.scale-e.scale),t}function c(e){let t;if(!e)return[];try{t=function(e,t){const r={},n=(t=void 0!==t?t:{}).grammarSource,i={start:_e};let o=_e;const s="none",a=")",u=",",c="(",p="%",h="px",d="cm",f="mm",y="in",m="pt",g="pc",w="deg",b="rad",v="grad",_="turn",x="#",M=".",A="e",T=/^[ \t\n\r]/,C=/^[a-z\-]/,S=/^[0-9a-fA-F]/,F=/^[+\-]/,E=/^[0-9]/,O=ge("none"),I=ye("none",!1),q=ye(")",!1),j=ye(",",!1),P=me([" ","\t","\n","\r"],!1,!1,!1),N=ge("function"),R=ye("(",!1),$=ge("identifier"),Z=me([["a","z"],"-"],!1,!1,!1),z=ge("percentage"),k=ye("%",!1),G=ge("length"),L=ye("px",!1),D=ye("cm",!1),J=ye("mm",!1),V=ye("in",!1),U=ye("pt",!1),B=ye("pc",!1),K=ge("angle"),Q=ye("deg",!1),Y=ye("rad",!1),W=ye("grad",!1),H=ye("turn",!1),X=ge("number"),ee=ge("color"),te=ye("#",!1),re=me([["0","9"],["a","f"],["A","F"]],!1,!1,!1),ne=me(["+","-"],!1,!1,!1),ie=me([["0","9"]],!1,!1,!1),oe=ye(".",!1),se=ye("e",!1);let ae=0|t.peg$currPos,le=ae;const ue=[{line:1,column:1}];let ce,pe=ae,he=t.peg$maxFailExpected||[],de=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in i))throw new Error("Can't start parsing from rule \""+t.startRule+'".');o=i[t.startRule]}function fe(){return e.substring(le,ae)}function ye(e,t){return{type:"literal",text:e,ignoreCase:t}}function me(e,t,r,n){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:n}}function ge(e){return{type:"other",description:e}}function we(t){let r,n=ue[t];if(n)return n;if(t>=ue.length)r=ue.length-1;else for(r=t;!ue[--r];);for(n=ue[r],n={line:n.line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return ue[t]=n,n}function be(e,t,r){const i=we(e),o=we(t);return{source:n,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:o.line,column:o.column}}}function ve(e){ae<pe||(ae>pe&&(pe=ae,he=[]),he.push(e))}function _e(){let e;return e=xe(),e===r&&(e=function(){let e,t;if(e=[],t=Me(),t!==r)for(;t!==r;)e.push(t),t=Me();else e=r;return e}()),e}function xe(){let t,n;return de++,t=ae,Te(),e.substr(ae,4)===s?(n=s,ae+=4):(n=r,0===de&&ve(I)),n!==r?(Te(),le=t,t=[]):(ae=t,t=r),de--,t===r&&0===de&&ve(O),t}function Me(){let t,n,i,o;return t=ae,Te(),n=function(){let t,n,i;return de++,t=ae,n=Ce(),n!==r?(40===e.charCodeAt(ae)?(i=c,ae++):(i=r,0===de&&ve(R)),i!==r?(le=t,t=n):(ae=t,t=r)):(ae=t,t=r),de--,t===r&&(n=r,0===de&&ve(N)),t}(),n!==r?(Te(),i=function(){let t,n,i,o,s,a,l,c;if(t=ae,n=Ae(),n!==r){for(i=[],o=ae,s=Te(),44===e.charCodeAt(ae)?(a=u,ae++):(a=r,0===de&&ve(j)),a===r&&(a=null),l=Te(),c=Ae(),c!==r?(s=[s,a,l,c],o=s):(ae=o,o=r);o!==r;)i.push(o),o=ae,s=Te(),44===e.charCodeAt(ae)?(a=u,ae++):(a=r,0===de&&ve(j)),a===r&&(a=null),l=Te(),c=Ae(),c!==r?(s=[s,a,l,c],o=s):(ae=o,o=r);le=t,t=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map(function(e){return e[3]})}(t))}(e,t):[e]}(n,i)}else ae=t,t=r;return t}(),i===r&&(i=null),Te(),41===e.charCodeAt(ae)?(o=a,ae++):(o=r,0===de&&ve(q)),o!==r?(Te(),le=t,t=function(e,t){return{type:"function",name:e,parameters:t||[]}}(n,i)):(ae=t,t=r)):(ae=t,t=r),t}function Ae(){let e,t;return e=ae,t=Se(),t===r&&(t=Fe(),t===r&&(t=Ee(),t===r&&(t=function(){let e,t;return de++,e=ae,Te(),t=Ie(),t!==r?(le=e,e=function(e){return{value:e,unit:null}}(t)):(ae=e,e=r),de--,e===r&&0===de&&ve(X),e}()))),t!==r&&(le=e,t=function(e){return{type:"quantity",value:e.value,unit:e.unit}}(t)),e=t,e===r&&(e=ae,t=Oe(),t!==r&&(le=e,t=function(e){return{type:"color",colorType:e.type,value:e.value}}(t)),e=t),e}function Te(){let t,n;for(de++,t=[],n=e.charAt(ae),T.test(n)?ae++:(n=r,0===de&&ve(P));n!==r;)t.push(n),n=e.charAt(ae),T.test(n)?ae++:(n=r,0===de&&ve(P));return de--,t}function Ce(){let t,n,i;if(de++,t=ae,n=[],i=e.charAt(ae),C.test(i)?ae++:(i=r,0===de&&ve(Z)),i!==r)for(;i!==r;)n.push(i),i=e.charAt(ae),C.test(i)?ae++:(i=r,0===de&&ve(Z));else n=r;return n!==r&&(le=t,n=fe()),t=n,de--,t===r&&(n=r,0===de&&ve($)),t}function Se(){let t,n,i;return de++,t=ae,Te(),n=Ie(),n!==r?(37===e.charCodeAt(ae)?(i=p,ae++):(i=r,0===de&&ve(k)),i!==r?(le=t,t=function(e){return{value:e,unit:"%"}}(n)):(ae=t,t=r)):(ae=t,t=r),de--,t===r&&0===de&&ve(z),t}function Fe(){let t,n,i;return de++,t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===h?(i=h,ae+=2):(i=r,0===de&&ve(L)),i!==r?(le=t,t=function(e){return{value:e,unit:"px"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===d?(i=d,ae+=2):(i=r,0===de&&ve(D)),i!==r?(le=t,t=function(e){return{value:e,unit:"cm"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===f?(i=f,ae+=2):(i=r,0===de&&ve(J)),i!==r?(le=t,t=function(e){return{value:e,unit:"mm"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===y?(i=y,ae+=2):(i=r,0===de&&ve(V)),i!==r?(le=t,t=function(e){return{value:e,unit:"in"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===m?(i=m,ae+=2):(i=r,0===de&&ve(U)),i!==r?(le=t,t=function(e){return{value:e,unit:"pt"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Te(),n=Ie(),n!==r?(e.substr(ae,2)===g?(i=g,ae+=2):(i=r,0===de&&ve(B)),i!==r?(le=t,t=function(e){return{value:e,unit:"pc"}}(n)):(ae=t,t=r)):(ae=t,t=r)))))),de--,t===r&&0===de&&ve(G),t}function Ee(){let t,n,i;return de++,t=ae,n=Ie(),n!==r?(e.substr(ae,3)===w?(i=w,ae+=3):(i=r,0===de&&ve(Q)),i!==r?(le=t,t=function(e){return{value:e,unit:"deg"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,n=Ie(),n!==r?(e.substr(ae,3)===b?(i=b,ae+=3):(i=r,0===de&&ve(Y)),i!==r?(le=t,t=function(e){return{value:e,unit:"rad"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,n=Ie(),n!==r?(e.substr(ae,4)===v?(i=v,ae+=4):(i=r,0===de&&ve(W)),i!==r?(le=t,t=function(e){return{value:e,unit:"grad"}}(n)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,n=Ie(),n!==r?(e.substr(ae,4)===_?(i=_,ae+=4):(i=r,0===de&&ve(H)),i!==r?(le=t,t=function(e){return{value:e,unit:"turn"}}(n)):(ae=t,t=r)):(ae=t,t=r)))),de--,t===r&&(n=r,0===de&&ve(K)),t}function Oe(){let t,n,i,o;if(de++,t=ae,35===e.charCodeAt(ae)?(n=x,ae++):(n=r,0===de&&ve(te)),n!==r){if(i=[],o=e.charAt(ae),S.test(o)?ae++:(o=r,0===de&&ve(re)),o!==r)for(;o!==r;)i.push(o),o=e.charAt(ae),S.test(o)?ae++:(o=r,0===de&&ve(re));else i=r;i!==r?(le=t,t={type:"hex",value:fe()}):(ae=t,t=r)}else ae=t,t=r;return t===r&&(t=ae,n=Me(),n!==r&&(le=t,n=function(e){return{type:"function",value:e}}(n)),t=n,t===r&&(t=ae,n=Ce(),n!==r&&(le=t,n={type:"named",value:fe()}),t=n)),de--,t===r&&(n=r,0===de&&ve(ee)),t}function Ie(){let t,n,i,o,s,a,l,u;for(t=ae,n=e.charAt(ae),F.test(n)?ae++:(n=r,0===de&&ve(ne)),n===r&&(n=null),i=ae,o=[],s=e.charAt(ae),E.test(s)?ae++:(s=r,0===de&&ve(ie));s!==r;)o.push(s),s=e.charAt(ae),E.test(s)?ae++:(s=r,0===de&&ve(ie));if(46===e.charCodeAt(ae)?(s=M,ae++):(s=r,0===de&&ve(oe)),s!==r){if(a=[],l=e.charAt(ae),E.test(l)?ae++:(l=r,0===de&&ve(ie)),l!==r)for(;l!==r;)a.push(l),l=e.charAt(ae),E.test(l)?ae++:(l=r,0===de&&ve(ie));else a=r;a!==r?(o=[o,s,a],i=o):(ae=i,i=r)}else ae=i,i=r;if(i===r)if(i=[],o=e.charAt(ae),E.test(o)?ae++:(o=r,0===de&&ve(ie)),o!==r)for(;o!==r;)i.push(o),o=e.charAt(ae),E.test(o)?ae++:(o=r,0===de&&ve(ie));else i=r;if(i!==r){if(o=ae,101===e.charCodeAt(ae)?(s=A,ae++):(s=r,0===de&&ve(se)),s!==r){if(a=e.charAt(ae),F.test(a)?ae++:(a=r,0===de&&ve(ne)),a===r&&(a=null),l=[],u=e.charAt(ae),E.test(u)?ae++:(u=r,0===de&&ve(ie)),u!==r)for(;u!==r;)l.push(u),u=e.charAt(ae),E.test(u)?ae++:(u=r,0===de&&ve(ie));else l=r;l!==r?(s=[s,a,l],o=s):(ae=o,o=r)}else ae=o,o=r;o===r&&(o=null),le=t,t=parseFloat(fe())}else ae=t,t=r;return t}ce=o();const qe=ce!==r&&ae===e.length;function je(){throw ce!==r&&ae<e.length&&ve({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(he,pe<e.length?function(t=ae){const r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(pe):null,pe<e.length?be(pe,pe+1):be(pe,pe))}return t.peg$library?{peg$result:ce,peg$currPos:ae,peg$FAILED:r,peg$maxFailExpected:he,peg$maxFailPos:pe,peg$success:qe,peg$throw:qe?void 0:je}:qe?ce:void je()}(e)}catch(t){throw new n.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map(e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return p(e.parameters,1),1===e.parameters.length&&(t=m(e.parameters[0])),new s.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return p(e.parameters,1),1===e.parameters.length&&(t=m(e.parameters[0])),new s.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return p(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=f[e.unit]))throw new n.A("effect:type-error",`Expected <angle>, Actual: ${h(e)}`,{term:e})}(e),e.value*f[e.unit]||0}(e.parameters[0])),new s.Nd(t)}(e);case"blur":return function(e){let t=0;return p(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0]),d(t,e.parameters[0])),new s.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let r=null;for(const i of e.parameters)if("color"===i.type){if(t.length&&Object.freeze(t),r)throw new n.A("effect:type-error","Accepts only one color",{});r=w(i)}else{const e=g(i);if(Object.isFrozen(t))throw new n.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&d(e,i)}if(t.length<2||t.length>3)throw new n.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new s.$b(t[0],t[1],t[2]||0,r||b("black"))}(e);case"bloom":return function(e){let t=1,r=0,n=0;return p(e.parameters,3),e.parameters[0]&&(t=m(e.parameters[0])),e.parameters[1]&&(r=g(e.parameters[1]),d(r,e.parameters[1])),e.parameters[2]&&(n=m(e.parameters[2])),new s.bv(t,r,n)}(e)}}catch(t){throw t.details.filter=e,t}throw new n.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e))}function p(e,t){if(e.length>t)throw new n.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function h(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in y)return"<length>";if(e.unit in f)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function d(e,t){if(e<0)throw new n.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const f={deg:1,grad:.9,rad:180/Math.PI,turn:360},y={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function m(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new n.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${h(e)}`,{term:e})}(e);const t=e.value;return d(t,e),"%"===e.unit?.01*t:t}function g(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=y[e.unit]))throw new n.A("effect:type-error",`Expected <length>, Actual: ${h(e)}`,{term:e})}(e),e.value*y[e.unit]||0}function w(e){switch(e.colorType){case"hex":return(0,o.j5)(e.value);case"named":return b(e.value);case"function":return function(e){if(p(e.parameters,4),v.test(e.name))return[m(e.parameters[0]),m(e.parameters[1]),m(e.parameters[2]),e.parameters[3]?m(e.parameters[3]):1];if(_.test(e.name))return(0,o.ay)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new n.A("effect:type-error",`Expected <double>, Actual: ${h(e)}`,{term:e})}(e),d(e.value,e),e.value}(e.parameters[0]),m(e.parameters[1]),m(e.parameters[2]),e.parameters[3]?m(e.parameters[3]):1);throw new n.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function b(e){if(!(0,o.V6)(e))throw new n.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,o.c4)(e)}const v=/^rgba?/i,_=/^hsla?/i;function x(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:A(r.value)});return t}return A(e)}(e)}catch(e){r?.messages?.push(e)}return null}function M(e,t,r,n){try{const n=function(e){const t=u(e);return t?(0,a.dw)(t)?t.map(e=>e.toJSON()):t.map(({scale:e,effects:t})=>({scale:e,value:t.map(e=>e.toJSON())})):null}(e);(0,i.sM)(r,n,t)}catch(e){n.messages&&n.messages.push(e)}}function A(e){if(!e?.length)return"";const t=[];for(const r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[T(r,"amount")];break;case"blur":e=[T(r,"radius","pt")];break;case"hue-rotate":e=[T(r,"angle","deg")];break;case"drop-shadow":e=[T(r,"xoffset","pt"),T(r,"yoffset","pt"),T(r,"blurRadius","pt"),C(r,"color")];break;case"bloom":e=[T(r,"strength"),T(r,"radius","pt"),T(r,"threshold")]}const n=`${r.type}(${e.filter(Boolean).join(" ")})`;u(n),t.push(n)}return t.join(" ")}function T(e,t,r){if(null==e[t])throw new n.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function C(e,t){if(null==e[t])throw new n.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||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})},63074(e,t,r){r.d(t,{LF:()=>u,dM:()=>c,sU:()=>a});var n=r(5482),i=r(91429),o=r(89317),s=r(76369);const a={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:o.K}},"portal-item":{read:!0,write:{layerContainerTypes:o.K}}}}},l={read:{reader:s.LF},write:{allowNull:!0,writer:s.M9,layerContainerTypes:o.K}},u={json:{read:!1,write:!1,origins:{"web-map":l,"portal-item":l}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,n.Cg)([(0,i.MZ)(a)],r.prototype,"blendMode",void 0),(0,n.Cg)([(0,i.MZ)(u)],r.prototype,"effect",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.BlendLayer")],r),r}},69208(e,t,r){r.d(t,{d:()=>o});var n=r(5482),i=r(91429);const o=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}},32756(e,t,r){r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>l});var n=r(5482),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)}}}},u=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}},25036(e,t,r){r.d(t,{j:()=>o});var n=r(5482),i=r(91429);const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,n.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,n.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,n.Cg)([(0,i.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}},29005(e,t,r){r.d(t,{A:()=>u});var n=r(5482),i=r(69540),o=r(66552),s=r(25482),a=r(91429);const l=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,n.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],u.prototype,"drawingTool",void 0),(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,n.Cg)([(0,a.$K)("esri.layers.support.FeatureTemplate")],u)},91880(e,t,r){r.d(t,{A:()=>u});var n,i=r(5482),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)},10427(e,t,r){r.d(t,{A:()=>a});var n=r(5482),i=r(69540),o=r(25482),s=r(91429);let a=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="location",this.xField=null,this.yField=null}};(0,n.Cg)([(0,s.MZ)({type:["location"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"xField",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"yField",void 0),a=(0,n.Cg)([(0,s.$K)("esri.layers.support.ParquetGeometryEncodingLocation")],a)},16238(e,t,r){r.d(t,{A:()=>a});var n=r(5482),i=r(69540),o=r(25482),s=r(91429);let a=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="wkb",this.field=null}};(0,n.Cg)([(0,s.MZ)({type:["wkb"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,n.Cg)([(0,s.MZ)({type:["counter-clockwise"],json:{write:!0}})],a.prototype,"orientation",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0),a=(0,n.Cg)([(0,s.$K)("esri.layers.support.ParquetGeometryEncodingWkb")],a)},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:()=>d,D3:()=>p,XJ:()=>h,lc:()=>c,mX:()=>y,rU:()=>f,tH:()=>v});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 c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function p(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function h(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=c(e.labelExpression),t.type="conventional"),t}function d(e){const t=h(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function f(e){const t=h(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(m);return t?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function y(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 m=/^\s*\{([^}]+)\}\s*$/i,g=/^\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=g.exec(e)||w.exec(e);return t?t[1]||t[3]:(t=b.exec(e),t?t[2]:null)}},54625(e,t,r){r.d(t,{i_:()=>i});var n=r(30524);function i(e,t,r){t=(0,n.rS)(t)?.toLowerCase(),r=(0,n.rS)(r)?.toLowerCase();const i=e.map(e=>e.toLowerCase()),a=t?e[i.indexOf(t)]:null,l=r?e[i.indexOf(r)]:null;return{longitudeFieldName:a||e[i.indexOf(s.find(e=>i.includes(e)))],latitudeFieldName:l||e[i.indexOf(o.find(e=>i.includes(e)))]}}const o=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],s=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"]},42760(e,t,r){r.d(t,{hG:()=>y,nc:()=>m,sA:()=>f,ye:()=>h}),r(7762);var n=r(49186),i=r(66552),o=r(16930),s=r(20437),a=r(30524),l=r(54625),u=r(10427),c=r(16238),p=r(63892);const h=new i.J({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"}),d=new Set(["uncompressed","snappy","gzip"]);function f(e){return h.toJSON(e)}function y(e){return h.fromJSON(e)}async function m(e,t={}){if(e.urls.length<1)throw new n.A("parquet:bad-input","At least one url must be specified",e);if(e.geometryType&&e.spatialReference&&e.geometryEncoding&&e.fields)return e;const r=await(0,p.DV)(e.urls.getItemAt(0),{getCustomParameters:()=>t.customParameters});for(const e of r.compressionCodecs())if(!d.has(e))throw new n.A("parquet:unsupported",`Compression codec ${e} is unsupported. Must be of type ${Array.from(d).join(",")}`);const i=(0,p.hD)(r),h={...e,file:r};if(null==h.fields&&(h.fields=r.fields(!1).map(e=>s.A.fromJSON({name:e.name,alias:e.name,type:e.type}))),null!=h.geometryEncoding){const e=h.geometryEncoding;switch(e.type){case"wkb":{const t=h.fields.find(t=>t.name===e.field);if(!t)throw new n.A("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==t.type)throw new n.A("parquet:unsupported",`Invalid field type for geometry encoding. Found ${t.type} but expected 'blob'`);break}case"location":for(const t of[e.xField,e.yField])if(null!=t){const e=h.fields.find(e=>e.name===t);if(!e)throw new n.A("parquet:unsupported",`Geometry encoding references field ${t} which does not exist`);if(!(0,a.WA)(e))throw new n.A("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}null==h.geometryEncoding&&(h.geometryEncoding=function(e,t){if(null!=e){const t=e.primary_column,r=e.columns[t];return new c.A({field:t,orientation:"counterclockwise"===r.orientation?"counter-clockwise":null})}const r=t.filter(e=>(0,a.WA)(e)).map(e=>e.name),n=(0,l.i_)(r);return n.latitudeFieldName&&n.longitudeFieldName?new u.A({xField:n.longitudeFieldName,yField:n.latitudeFieldName}):null}(i,h.fields));const f=(0,p.Xj)(r);if(f&&(h.displayOptimization=f),h.geometryEncoding)switch(h.geometryEncoding.type){case"location":null==h.spatialReference&&(h.spatialReference=o.A.WGS84),null==h.geometryType&&(h.geometryType="point");break;case"wkb":{if(!i)return h;const e=i.primary_column,t=i.columns[e];if(h.geometryType||(h.geometryType=function(e){const{geometry_types:t}=e,r=new Set;for(const e of t){const t=g(e);t&&r.add(t)}if(r.size>1)throw new n.A("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:r});return 1===r.size?r.values().next().value:void 0}(t)),h.spatialReference||(h.spatialReference=function(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?new o.A({wkid:t}):void 0}(t)),h.fields)for(const e of Object.keys(i.columns))h.fields=h.fields.filter(t=>t.name!==e)}}if(h.displayOptimization){const e=h.displayOptimization.index;if(!h.spatialReference&&e.wkid&&(h.spatialReference=new o.A({wkid:e.wkid})),!h.geometryType)switch(e.type){case"z":h.geometryType="point";break;case"xz":h.geometryType=e.geometryType}}return h}function g(e){switch(e){case"Point":return"point";case"Polygon":case"MultiPolygon":return"polygon";case"LineString":return"polyline";case"MultiPoint":return"multipoint";default:return null}}},39412(e,t,r){r.d(t,{N:()=>o});var n=r(2741);let i=null;async function o(){return i||(i=async function(){const e=await r.e(7733).then(r.bind(r,57733));return await e.default({module_or_path:(0,n.s)("esri/libs/parquet/pkg/bundle_bg.wasm")}),e}()),i}},63892(e,t,r){r.d(t,{DV:()=>y,Xj:()=>g,hD:()=>m});var n=r(11254),i=r(49186),o=r(44208),s=r(563),a=r(84952),l=r(39412);const u="parquet.v1",c=new s.QueueProcessor({concurrency:12,process:async e=>{const{data:t}=await(0,n.A)(e.url,e.options);return t}}),p=e=>async function(t,r,n,i){const s=e?.(),a={url:t,options:{responseType:"array-buffer",query:s??{},cacheMode:"no-store",useQueue:!0,headers:{range:`bytes=${r}-${n}`}}};if(!(0,o.A)("parquetlayer-cache-enabled"))return c.push(a);const l=new URL(t);l.searchParams.append("range",`${r}-${n}`);try{const e=await caches.open(`${u}:${t}`),r=await e.match(l);if(r)return await r.arrayBuffer();const n=await c.push(a);return await e.put(l,new Response(n,{headers:{"Content-Type":"application/octet-stream","Content-Length":n.byteLength.toString()}})),n}catch(e){return c.push(a)}},h=e=>async function(t){if((0,a.w8)(t)){const{data:e}=await(0,n.A)(t,{responseType:"blob"});return e.size}const{data:r}=await(0,n.A)(t,{responseType:"native",method:"head",query:e?.()}),i=r.headers.get("Content-Length");if(null==i)throw new Error("Unable to parse content length");const s=parseInt(i,10);if(!(0,o.A)("parquetlayer-cache-enabled"))return s;try{const e=`${u}:${t}`,n=new URL(t);n.searchParams.append("metadata","true");let i=await caches.open(e);const o=r.headers.get("etag")??r.headers.get("Last-Modified");if(null==o)return await caches.delete(e),s;const a=await i.match(n),l=await(a?.json());l?.tag!==o&&(await caches.delete(e),i=await caches.open(e));const c=JSON.stringify({tag:o});await i.put(n,new Response(c,{headers:{"Content-Type":"application/json","Content-Length":c.length.toString()}}))}catch(e){}return s};function d(e,t){switch(t){case"esriGeometryPoint":return e.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return e.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return e.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return e.GeometryType.Multipoint;default:throw new i.A("parquet",`Found unexpected GeometryType: ${t}`)}}function f(e,t){const r=e.GeometryInfo.new();t.geometry&&r.setGeometry(function(e,t){const r=t.encoding,n=d(e,t.geometryType),i=t.spatialReference.wkid;if(null==i)throw new Error("InternalError: Wkid must be defined.");switch(r.type){case"wkb":return e.GeometryField.fromWkb(r.field,i,n);case"location":{const{yField:t,xField:o}=r;return e.GeometryField.fromLocation(t,o,i,n)}}}(e,t.geometry));const n=t.displayOptimization;if(n){const{index:t,parentColumn:i}=n,o=e=>null!=i?[i,e].join("."):e;if("z"===t.type){const n=e.DisplayOptimizationZBuilder.new();n.setCodeField(o(t.code)),n.setXColumn(o(t.xColumn)),n.setYColumn(o(t.yColumn)),n.setCooordinatePrecision(t.coordinatePrecision),n.setFullExtent(t.fullExtent),n.setSpatialReference(t.wkid,t.wkt),n.setHasZ(!!t.zColumn),n.setHasM(!!t.mColumn),r.setOptmizationZ(n)}if("xz"===t.type){const n=d(e,t.geometryType),i=e.DisplayOptimizationXZBuilder.new();i.setCodeField(o(t.code)),i.setEncoding(t.encoding),i.setFullExtent(t.fullExtent),i.setGeometryType(n),i.setSpatialReference(t.wkid,t.wkt),i.setMaxLevel(t.maxLevel),i.setHasZ(t.hasZ??!1),i.setHasM(t.hasM??!1);for(const r of t.levels??[]){const[t,n]=r.transform.translate,[s,a]=r.transform.scale,l=new Float64Array([t,n]),u=new Float64Array([s,a]),c=o(r.column);i.addLevel(e.MultiscaleGeometryField.new(r.level,r.scale,c,l,u))}r.setOptmizationXZ(i)}}return r}async function y(e,t={}){const r=await(0,l.N)(),n=p(t.getCustomParameters),o=h(t.getCustomParameters),s=t.geometryInfo?f(r,t.geometryInfo):null;try{return await r.ParquetFile.fromUrl(e,n,o,s)}catch(e){throw new i.A("parquet","Failed to parse file",{error:e})}}function m(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function g(e){if(e.keyValueMetadata("esri"))throw new i.A("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const t=e.keyValueMetadata("geodisplay");if(null!=t)return JSON.parse(t);const r=e.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=r){const e=JSON.parse(r);for(const t of e.fields)if(null!=t.metadata&&"type"in t.metadata&&("xz"===t.metadata.type||"z"===t.metadata.type)){const e={parentColumn:t.name,index:t.metadata};if("xz"===e.index.type&&(e.index.geometryType=e.index.geometryType.toLowerCase(),"esri-pbf"===e.index.encoding&&(e.index.encoding="esriPBF"),"esriPBF"!==e.index.encoding))throw new i.A("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${e.index.encoding}`);return e}}return null}},73681(e,t,r){r.d(t,{n:()=>l});var n=r(49186),i=r(53966),o=r(46140),s=r(95466),a=r(55674);class l{static async from(e,t,r){const s=e.dictionary_version?o.A.parse(e.dictionary_version):null,c=new Set(e.itemsNames),p={};if(t)for(const e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))h.delete(e);h.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const d=await(0,a.xR)(e.expression,null,p);if(!d)throw new n.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!s||!s.greaterEqual(4,0);f&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:s});const y=new u(r,f);return new l(f,c,d,y)}constructor(e,t,r,n){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=n}get itemNames(){return this._itemNames}evaluate(e,t,r,n){try{return this._reader.bind(e,r,n),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new s.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new s.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},61760(e,t,r){r.d(t,{PU:()=>s,YW:()=>l,ex:()=>i,hv:()=>a,zp:()=>o}),r(34727);var n=r(90629);r(78955),r(91829);const i=2.4;function o(e){return(0,n.PN)(e*i)}function s(e){return(0,n.Lz)(e)/i}function a(e,t,r){const n=Math.sqrt(e**2+t**2)/r;return n>1?0:3/(Math.PI*r**2)*(1-n**2)**2}function l(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},22671(e,t,r){r.d(t,{A:()=>w});var n,i=r(5482),o=r(52106),s=r(66552),a=r(25482),l=r(4718),u=r(91429),c=r(16930),p=r(60408),h=r(65864),d=r(50498),f=r(20437),y=r(36005),m=r(43937);const g=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 g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=c.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=c.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,p.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,p.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,p.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,y.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:g.read}}})],w.prototype,"geometryType",void 0),(0,i.Cg)([(0,m.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:d.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i.Cg)([(0,y.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i.Cg)([(0,u.MZ)({type:c.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i.Cg)([(0,m.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){r.d(t,{K:()=>p,Q:()=>l});var n=r(5482),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",c="field",p=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&&c||r&&u||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n.Cg)([(0,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}},55674(e,t,r){r.d(t,{Ad:()=>d,Gj:()=>m,QY:()=>h,lL:()=>g,xR:()=>f});var n=r(66131),i=r(49186),o=(r(44208),r(44729)),s=r(15032),a=r(65864),l=r(95466),u=r(43668),c=r(98623);const p=["geometry","scale","timeProperties"];function h(e,t){if(null!=t)for(const r of p)t.hasArcadeDependency(r)&&e.add(r);return e}function d(e,t){return y.create(e,t,null,["$feature","$view"])}function f(e,t,r){return y.create(e,t,r,["$feature","$view","$config"])}class y{static async create(e,t,r,n){const{arcade:o,Dictionary:s}=await(0,u.l)();let a;try{a=o.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=o.scriptUsesGeometryEngine(a);l&&await o.enableGeometrySupport(),await o.loadDependentModules(new Set,a,null,!1,l);const c={vars:n.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},p=o.compileScript(a,c);let h=null;null!=r&&(h=new s(r),h.immutable=!0);const d=new s;return d.immutable=!1,d.setField("scale",0),new y(e,o,a,p,t,d,h,s)}constructor(e,t,r,n,i,o,s,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=n,this._spatialReference=i,this._viewDict=o,this._configDict=s,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:o}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=i?null!=r?n.lY.epochToArcadeDate(i,r):n.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=o?null!=r?n.lY.epochToArcadeDate(o,r):n.lY.unknownEpochToArcadeDate(o):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const n=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=n.fields,this._boundSchema.fieldsIndex=n,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return s.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return n.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?n.lY.unknownEpochToArcadeDate(t):n.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}}}]);
|