@arcgis/core 6.0.0-next.42 → 6.0.0-next.43

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.
Files changed (489) hide show
  1. package/Basemap.js +1 -1
  2. package/Graphic.js +1 -1
  3. package/Ground.js +1 -1
  4. package/WebDocument2D.js +1 -1
  5. package/WebScene.js +1 -1
  6. package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +1 -0
  7. package/analysis/ElevationProfileAnalysis.d.ts +15 -0
  8. package/analysis/LineOfSightAnalysis.d.ts +6 -1
  9. package/analysis/ShadowCastAnalysis.d.ts +18 -22
  10. package/analysis/ShadowCastAnalysis.js +1 -1
  11. package/analysis/ViewshedAnalysis.d.ts +6 -1
  12. package/applications/Components/analysisUtils.d.ts +6 -0
  13. package/applications/Components/analysisUtils.js +1 -1
  14. package/arcade/ArcadeModuleResolver.js +1 -1
  15. package/arcade/arcadeCompiler.js +1 -1
  16. package/arcade/featureset/actions/Adapted.js +1 -1
  17. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  18. package/arcade/featureset/support/FeatureSet.js +1 -1
  19. package/arcade/featureset/support/shared.js +1 -1
  20. package/arcade/featureset/support/sqlUtils.js +1 -1
  21. package/arcade/functions/knowledgegraph.js +1 -1
  22. package/arcade/functions/maths.js +1 -1
  23. package/assets/esri/core/workers/RemoteClient.js +1 -1
  24. package/assets/esri/core/workers/chunks/{2f54e4feb554c1a7b9c4.js → 02debe67e6fef9d88bdd.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{bd046399e05e759e0bc2.js → 035204000954973b0ebc.js} +1 -1
  26. package/assets/esri/core/workers/chunks/05225506fdba0c827407.js +1 -0
  27. package/assets/esri/core/workers/chunks/{4c73c493dabe949c2512.js → 077b755688346e0dc8d3.js} +1 -1
  28. package/assets/esri/core/workers/chunks/0c1d8e0c2eae21f97fc0.js +1 -0
  29. package/assets/esri/core/workers/chunks/105865a4d8cb4ddf8a8a.js +1 -0
  30. package/assets/esri/core/workers/chunks/{afe3e89737fb45189a99.js → 14ed0c34b910eba3434e.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{f67b37253d6d05d1e339.js → 14ef986665b4a1f6ccdc.js} +1 -1
  32. package/assets/esri/core/workers/chunks/158cbf4075d3eca83a6a.js +1 -0
  33. package/assets/esri/core/workers/chunks/{a03f15f2cbc3fed291c2.js → 15f2b27b8edc0d53e399.js} +1 -1
  34. package/assets/esri/core/workers/chunks/181d24ced5ef6b1f959b.js +1 -0
  35. package/assets/esri/core/workers/chunks/18dbee576b7b9dbe69fb.js +1 -0
  36. package/assets/esri/core/workers/chunks/1aebb8fe0692058bf2fb.js +1 -0
  37. package/assets/esri/core/workers/chunks/1cdb55d9a5ab1a5e3f08.js +1 -0
  38. package/assets/esri/core/workers/chunks/{cf2e5f827cea7d7319ce.js → 1e5c5029b0653047a769.js} +1 -1
  39. package/assets/esri/core/workers/chunks/20db6e844708d3e71437.js +1 -0
  40. package/assets/esri/core/workers/chunks/21a4c3d8265aca775616.js +1 -0
  41. package/assets/esri/core/workers/chunks/23fff0505e02fd364909.js +1 -0
  42. package/assets/esri/core/workers/chunks/286e3e050b29e6158e6f.js +1 -0
  43. package/assets/esri/core/workers/chunks/29ef9d357e30082d267a.js +1 -0
  44. package/assets/esri/core/workers/chunks/29feef121b0916fb90bf.js +1 -0
  45. package/assets/esri/core/workers/chunks/2ef91e8da260454f46d8.js +1 -0
  46. package/assets/esri/core/workers/chunks/32b9bedd4bb0504f0b1d.js +1 -0
  47. package/assets/esri/core/workers/chunks/{279089a6a3f08022c678.js → 361d620b3f91868b1490.js} +1 -1
  48. package/assets/esri/core/workers/chunks/37c16e20f022ca27cdae.js +1 -0
  49. package/assets/esri/core/workers/chunks/380aefa522dfeccb8c65.js +1 -0
  50. package/assets/esri/core/workers/chunks/394ae3199c78a94c6a2a.js +1 -0
  51. package/assets/esri/core/workers/chunks/{fdd2b35388f9fe42b623.js → 3a90b6eafa92f1a68ac5.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{6a65fc1a2931230fe994.js → 3bb1e06861cd0563ed9f.js} +1 -1
  53. package/assets/esri/core/workers/chunks/3f92afa58c895bf87e62.js +1 -0
  54. package/assets/esri/core/workers/chunks/422784ceae0d511868a0.js +1 -0
  55. package/assets/esri/core/workers/chunks/44782e8318dc47cb08a0.js +1 -0
  56. package/assets/esri/core/workers/chunks/{5882f349f3771868e67f.js → 4521f72ab0ea872e5d7c.js} +1 -1
  57. package/assets/esri/core/workers/chunks/45b5a61c4e9fbd9ca0b3.js +1 -0
  58. package/assets/esri/core/workers/chunks/47af220003adfca2167e.js +1 -0
  59. package/assets/esri/core/workers/chunks/487500443a6037d3599f.js +1 -0
  60. package/assets/esri/core/workers/chunks/4a4fab74442c3d914505.js +1 -0
  61. package/assets/esri/core/workers/chunks/4a8903fb1a5d30a68df9.js +1 -0
  62. package/assets/esri/core/workers/chunks/4d818b231e6d1fa73cc5.js +1 -0
  63. package/assets/esri/core/workers/chunks/{e0cf6e1e21d0ee739009.js → 4e03aa5518d46a36661c.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{1a614bac5db42c6263f8.js → 4fe10650ba3cd30aa9a2.js} +1 -1
  65. package/assets/esri/core/workers/chunks/50b8b1cce0a5f77c8372.js +1 -0
  66. package/assets/esri/core/workers/chunks/5470a29a69010c8361c4.js +1 -0
  67. package/assets/esri/core/workers/chunks/564d7f2e58fbc16853c0.js +1 -0
  68. package/assets/esri/core/workers/chunks/5c2e79f2ca401741bf3e.js +1 -0
  69. package/assets/esri/core/workers/chunks/5c9ab86bec07264dc9f2.js +1 -0
  70. package/assets/esri/core/workers/chunks/{04d55ed51e8b2683c4b4.js → 5d908a823b324bafda1e.js} +1 -1
  71. package/assets/esri/core/workers/chunks/5e6d6676a5c47c0e132a.js +1 -0
  72. package/assets/esri/core/workers/chunks/5fd4d3cb3c9350131a59.js +1 -0
  73. package/assets/esri/core/workers/chunks/60637f38159e9bf68d4e.js +1 -0
  74. package/assets/esri/core/workers/chunks/69b73251257088ce7099.js +1 -0
  75. package/assets/esri/core/workers/chunks/6cd17c3a254a0b5c2476.js +1 -0
  76. package/assets/esri/core/workers/chunks/{06102715e9a8f218e07c.js → 6f3732e7ba2d031ba789.js} +1 -1
  77. package/assets/esri/core/workers/chunks/7191ab31fa040a7c561e.js +1 -0
  78. package/assets/esri/core/workers/chunks/71ba848c3352ea3ff96f.js +1 -0
  79. package/assets/esri/core/workers/chunks/76dc8e3264a456f33e61.js +1 -0
  80. package/assets/esri/core/workers/chunks/77d80b6d65d761214a7c.js +1 -0
  81. package/assets/esri/core/workers/chunks/{e2430bc3a1edeb5c3266.js → 78a69594c82d37aecbfb.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{787c1a8bda7d745633f2.js → 81b9894e81cce3490984.js} +1 -1
  83. package/assets/esri/core/workers/chunks/85cd525705eec6803dd3.js +1 -0
  84. package/assets/esri/core/workers/chunks/863f04cacdc843d3f208.js +1 -0
  85. package/assets/esri/core/workers/chunks/8766832c7253557da8fe.js +1 -0
  86. package/assets/esri/core/workers/chunks/87992070008812f8ae6f.js +1 -0
  87. package/assets/esri/core/workers/chunks/892fd2c3533ce46a9258.js +1 -0
  88. package/assets/esri/core/workers/chunks/89b9d716d96135d4f057.js +1 -0
  89. package/assets/esri/core/workers/chunks/{4b2d392ad8e381bfd6b3.js → 89e9ebc8d5c1022cb265.js} +1 -1
  90. package/assets/esri/core/workers/chunks/8b38798ac6d774185238.js +1 -0
  91. package/assets/esri/core/workers/chunks/8b53369cace136ed1329.js +1 -0
  92. package/assets/esri/core/workers/chunks/8ba4f5e1912edf397947.js +1 -0
  93. package/assets/esri/core/workers/chunks/{987424121cf30b0f3c50.js → 8d3e92a3367a3ddc02bd.js} +1 -1
  94. package/assets/esri/core/workers/chunks/8e7a3b1b088c160f4db7.js +1 -0
  95. package/assets/esri/core/workers/chunks/8f4fba4d2339c91c8b3f.js +1 -0
  96. package/assets/esri/core/workers/chunks/{45aaefbdffe5e15dfb24.js → 919a6aedf38e9631ee09.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{487c46d5245cfb35c4bb.js → 921917e53bac82693ec8.js} +1 -1
  98. package/assets/esri/core/workers/chunks/92809b209b68abcb97ee.js +1 -0
  99. package/assets/esri/core/workers/chunks/{beccbfff549902733c4e.js → 9869c696e6321c8db0a9.js} +1 -1
  100. package/assets/esri/core/workers/chunks/98957dba728c93506e50.js +1 -0
  101. package/assets/esri/core/workers/chunks/99ffb839407cb3c26ad8.js +1 -0
  102. package/assets/esri/core/workers/chunks/9b517c8d26a86dedb921.js +1 -0
  103. package/assets/esri/core/workers/chunks/{cb2329d1ea72ce5cc057.js → 9c3f56f22e9baa80a387.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{1860104c2b33f68785dd.js → 9d0976f5979c4f9154dc.js} +1 -1
  105. package/assets/esri/core/workers/chunks/9fe1812aad6e566aea31.js +1 -0
  106. package/assets/esri/core/workers/chunks/a1602995ef96beb7df29.js +1 -0
  107. package/assets/esri/core/workers/chunks/{dff845574c0037a1dca6.js → a332e31165b65a6fb92e.js} +1 -1
  108. package/assets/esri/core/workers/chunks/a553478664a688f32488.js +1 -0
  109. package/assets/esri/core/workers/chunks/a7937b06f4b0860c7671.js +1 -0
  110. package/assets/esri/core/workers/chunks/{1980fd7ae1617ef4d19d.js → a95186214f1206efd8ed.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{853563c66ecf58d53d36.js → ab60e8fbe0f92340616a.js} +1 -1
  112. package/assets/esri/core/workers/chunks/acea0946049136578354.js +1 -0
  113. package/assets/esri/core/workers/chunks/{342a97974a78007b25e0.js → ad94f54b4c88b3a047bc.js} +1 -1
  114. package/assets/esri/core/workers/chunks/ae29fec228e70a93ced1.js +1 -0
  115. package/assets/esri/core/workers/chunks/ae6dc159be974ca0e8da.js +1 -0
  116. package/assets/esri/core/workers/chunks/ae70972bf88d586fd453.js +1 -0
  117. package/assets/esri/core/workers/chunks/b021fa4654ede1d04279.js +1 -0
  118. package/assets/esri/core/workers/chunks/b03f32f02858244c6cd0.js +1 -0
  119. package/assets/esri/core/workers/chunks/b2d922ecc2c4899dbee1.js +1 -0
  120. package/assets/esri/core/workers/chunks/b42e50ec6b819f669400.js +1 -0
  121. package/assets/esri/core/workers/chunks/b6a82775b83d20599635.js +1 -0
  122. package/assets/esri/core/workers/chunks/b6d365b9198b74b05338.js +1 -0
  123. package/assets/esri/core/workers/chunks/{48c6230b8a6d3a8a7906.js → bc21241bc9acb83d1b1c.js} +1 -1
  124. package/assets/esri/core/workers/chunks/bd02d927b0b4991b61c5.js +1 -0
  125. package/assets/esri/core/workers/chunks/bdf1c4c038d556527483.js +1 -0
  126. package/assets/esri/core/workers/chunks/c1273f14a5ef3d81de0d.js +1 -0
  127. package/assets/esri/core/workers/chunks/c752f1e732bb019f657d.js +1 -0
  128. package/assets/esri/core/workers/chunks/{3f74c61359b4bd6dcf00.js → c7f49493bd548d5dc1e0.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{36bafcc29ac133a05558.js → c86d3af148b28ded5875.js} +10 -10
  130. package/assets/esri/core/workers/chunks/{692f0093c444fcc752b5.js → cadd60fa4370284c7ae3.js} +1 -1
  131. package/assets/esri/core/workers/chunks/{d5e251cddd41d643510c.js → cb62326b6526cde429c1.js} +1 -1
  132. package/assets/esri/core/workers/chunks/cd8304b1db83d48c57db.js +1 -0
  133. package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +1 -0
  134. package/assets/esri/core/workers/chunks/d00dd961a5b79f563123.js +1 -0
  135. package/assets/esri/core/workers/chunks/d893c3bb093104d3db95.js +1 -0
  136. package/assets/esri/core/workers/chunks/d8fb1d9da16492574a11.js +1 -0
  137. package/assets/esri/core/workers/chunks/{520f499d79fa71f262c7.js → dd7e4c94a88452425750.js} +1 -1
  138. package/assets/esri/core/workers/chunks/ddb4689624d091922471.js +1 -0
  139. package/assets/esri/core/workers/chunks/df32a3fe81d60f0d7462.js +1 -0
  140. package/assets/esri/core/workers/chunks/dfc6b33f51dc81f3a7be.js +1 -0
  141. package/assets/esri/core/workers/chunks/e55934eb4a17a5b24c94.js +1 -0
  142. package/assets/esri/core/workers/chunks/{5473409fee59db80f87d.js → e5bdfef7c2cc5354be52.js} +1 -1
  143. package/assets/esri/core/workers/chunks/e8cdec961e9cff1cb73b.js +1 -0
  144. package/assets/esri/core/workers/chunks/{446d172834f8675f1202.js → eaf720dfdf6ceca31249.js} +1 -1
  145. package/assets/esri/core/workers/chunks/ef274db3fa260eadf371.js +1 -0
  146. package/assets/esri/core/workers/chunks/efca82a4dc494f57380b.js +1 -0
  147. package/assets/esri/core/workers/chunks/f05990e6fb378e2e1a3b.js +1 -0
  148. package/assets/esri/core/workers/chunks/f0fc89cdf50a40913c02.js +1 -0
  149. package/assets/esri/core/workers/chunks/{8b5dcc4282772bf6b675.js → f11eaab5354cc6aa9569.js} +1 -1
  150. package/assets/esri/core/workers/chunks/f1c2f7c7ce4bd4096eb0.js +1 -0
  151. package/assets/esri/core/workers/chunks/f4e63c5f82b8c2bbfacb.js +1 -0
  152. package/assets/esri/core/workers/chunks/f86ff791a10c802879ec.js +1 -0
  153. package/assets/esri/core/workers/chunks/{7452b5ae971a9ff2e6e9.js → fdffefd7de540272a8a6.js} +1 -1
  154. package/assets/esri/core/workers/chunks/fe0248af95d3f37e099e.js +1 -0
  155. package/chunks/languageUtils.js +1 -1
  156. package/config.js +1 -1
  157. package/core/Accessor.js +1 -1
  158. package/core/Collection.js +1 -1
  159. package/core/LRUCache.js +1 -1
  160. package/core/MapUtils.js +1 -1
  161. package/core/Version.js +1 -1
  162. package/core/asyncUtils.js +1 -1
  163. package/core/fontUtils.js +1 -1
  164. package/core/has.js +1 -1
  165. package/core/sql/SqlInterval.js +1 -1
  166. package/core/sql/WhereClause.js +1 -1
  167. package/core/sql/writeUtils.js +1 -1
  168. package/core/sql.js +1 -1
  169. package/core/urlUtils.js +1 -1
  170. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  171. package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
  172. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  173. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
  174. package/geometry/Point.js +1 -1
  175. package/geometry/Polygon.js +1 -1
  176. package/geometry/SpatialReference.js +1 -1
  177. package/geometry/support/webMercatorUtils.js +1 -1
  178. package/kernel.js +1 -1
  179. package/layers/FeatureLayer.js +1 -1
  180. package/layers/GeoJSONLayer.d.ts +5 -1
  181. package/layers/GeospatialPDFLayer.js +1 -1
  182. package/layers/KnowledgeGraphLayer.js +1 -1
  183. package/layers/LineOfSightLayer.d.ts +6 -1
  184. package/layers/LinkChartLayer.js +1 -1
  185. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  186. package/layers/SubtypeGroupLayer.js +1 -1
  187. package/layers/TileLayer.js +1 -1
  188. package/layers/VectorTileLayer.d.ts +53 -0
  189. package/layers/VectorTileLayer.js +1 -1
  190. package/layers/VideoLayer.js +1 -1
  191. package/layers/ViewshedLayer.d.ts +6 -1
  192. package/layers/VoxelLayer.js +1 -1
  193. package/layers/effects/jsonUtils.js +1 -1
  194. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  195. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
  196. package/layers/graphics/data/QueryEngineResult.js +1 -1
  197. package/layers/graphics/data/projectionSupport.js +1 -1
  198. package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
  199. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  200. package/layers/graphics/sources/geojson/geojson.js +1 -1
  201. package/layers/graphics/sources/parquet/FileProvider.js +1 -1
  202. package/layers/graphics/sources/support/QueryTask.js +1 -1
  203. package/layers/graphics/sources/support/uploads.js +1 -1
  204. package/layers/knowledgeGraph/cypherUtils.js +1 -1
  205. package/layers/mixins/refresh.js +1 -1
  206. package/layers/ogc/ogcFeatureUtils.js +1 -1
  207. package/layers/ogc/wfsUtils.js +1 -1
  208. package/layers/parquet.js +1 -1
  209. package/layers/raster/datasets/BaseRaster.js +1 -1
  210. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  211. package/layers/raster/datasets/TIFFRaster.js +1 -1
  212. package/layers/raster/datasets/wcsCoverageParser.js +1 -1
  213. package/layers/raster/formats/Lerc.js +1 -1
  214. package/layers/support/ClientSideConnection.js +1 -1
  215. package/layers/support/ElevationSampler.js +1 -1
  216. package/layers/support/MultidimensionalSubset.js +1 -1
  217. package/layers/support/SpriteSource.js +1 -1
  218. package/layers/support/TileInfo.js +1 -1
  219. package/layers/support/fieldUtils.js +1 -1
  220. package/layers/support/infoFor3D.js +1 -1
  221. package/layers/support/vectorTileLayerLoader.js +1 -1
  222. package/layers/support/wmsUtils.js +1 -1
  223. package/layers/support/wmtsUtils.js +1 -1
  224. package/layers/video/videoUtils.js +1 -1
  225. package/libs/lyr3d/Lyr3DModule.js +1 -1
  226. package/linkChart/utils.js +1 -1
  227. package/networks/support/Circuit.js +1 -1
  228. package/networks/support/CircuitSection.js +1 -1
  229. package/package.json +2 -2
  230. package/portal/Portal.js +1 -1
  231. package/portal/PortalItemResource.js +1 -1
  232. package/portal/PortalQueryParams.js +1 -1
  233. package/renderers/HeatmapRenderer.js +1 -1
  234. package/renderers/UniqueValueRenderer.js +1 -1
  235. package/rest/knowledgeGraphService.js +1 -1
  236. package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
  237. package/rest/query/operations/queryAttachments.js +1 -1
  238. package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
  239. package/symbols/cim/types.d.ts +15 -11
  240. package/symbols/support/previewSymbol3D.js +1 -1
  241. package/tables/support/templateUtils.js +1 -1
  242. package/views/2d/engine/vectorTiles/SourceLayerData.js +1 -1
  243. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  244. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  245. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  246. package/views/2d/engine/vectorTiles/TileManager.js +1 -1
  247. package/views/2d/engine/vectorTiles/TileParser.js +1 -1
  248. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  249. package/views/2d/engine/vectorTiles/VectorTileSourceData.js +2 -0
  250. package/views/2d/engine/vectorTiles/WorkerTile.js +1 -1
  251. package/views/2d/engine/vectorTiles/WorkerTileHandler.js +1 -1
  252. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  253. package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
  254. package/views/2d/engine/vectorTiles/style/Filter.js +1 -1
  255. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
  256. package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
  257. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  258. package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
  259. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +4 -4
  260. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  261. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  262. package/views/2d/layers/features/Processor.js +1 -1
  263. package/views/2d/layers/features/support/TileStore.js +1 -1
  264. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  265. package/views/2d/tiling/TileKey.js +1 -1
  266. package/views/2d/tiling/TileStrategy.js +1 -1
  267. package/views/3d/analysis/Dimension/LengthDimensionComputation.js +1 -1
  268. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  269. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  270. package/views/3d/analysis/images/generateTextures.js +1 -1
  271. package/views/3d/environment/EnvironmentView.js +1 -1
  272. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  273. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  274. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  275. package/views/3d/layers/I3SMeshView3D.js +1 -1
  276. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  277. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  278. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  279. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  280. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  281. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  282. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  283. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  284. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  285. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  286. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  287. package/views/3d/layers/graphics/MeshFastUpdateProcessor.js +1 -1
  288. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  289. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  290. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  291. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  292. package/views/3d/layers/i3s/I3SAsyncElevationUpdater.js +1 -1
  293. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  294. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  295. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  296. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  297. package/views/3d/state/ConstraintsManager.js +1 -1
  298. package/views/3d/state/controllers/GroundNavigationController.js +1 -1
  299. package/views/3d/support/QualityProfile.js +1 -1
  300. package/views/3d/support/TextureCollection.js +1 -1
  301. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  302. package/views/3d/terrain/TerrainRenderer.js +1 -1
  303. package/views/3d/terrain/Tile.js +1 -1
  304. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  305. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  306. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  307. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  308. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
  309. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  310. package/views/3d/webgl-engine/lib/CutFill.js +1 -1
  311. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  312. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  313. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  314. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  315. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  316. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  317. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  318. package/views/3d/webgl-engine/materials/intersectWithPolygonOffset.js +1 -1
  319. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  320. package/views/SceneView.js +1 -1
  321. package/views/SelectionManager.js +1 -1
  322. package/views/analysis/ElevationProfile/ElevationProfileChart.js +2 -2
  323. package/views/analysis/ElevationProfile/elevationProfileChartBoundsUtils.js +1 -1
  324. package/views/draw/DrawAction.js +1 -1
  325. package/views/draw/support/PluginContext.js +1 -1
  326. package/views/interactive/sketch/normalizedPoint.js +1 -1
  327. package/views/interactive/tooltip/fields/TooltipFieldElevation.js +1 -1
  328. package/views/interactive/tooltip/fields/TooltipFieldOrientation.js +1 -1
  329. package/views/interactive/tooltip/fields/TooltipFieldSize.js +1 -1
  330. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
  331. package/widgets/Attachments.js +1 -1
  332. package/widgets/Attribution/AttributionViewModel.js +1 -1
  333. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  334. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  335. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  336. package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
  337. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  338. package/widgets/BatchAttributeForm.js +1 -1
  339. package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
  340. package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
  341. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
  342. package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
  343. package/widgets/CatalogLayerList.js +1 -1
  344. package/widgets/Compass/CompassViewModel.js +1 -1
  345. package/widgets/CoordinateConversion/support/Format.js +1 -1
  346. package/widgets/CoordinateConversion/support/formatUtils.js +1 -1
  347. package/widgets/Daylight/DaylightViewModel.js +1 -1
  348. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  349. package/widgets/Editor/support/SketchController.js +1 -1
  350. package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
  351. package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
  352. package/widgets/Expand/ExpandViewModel.js +1 -1
  353. package/widgets/Expand.js +1 -1
  354. package/widgets/Feature/FeatureMedia.js +1 -1
  355. package/widgets/Feature/FeatureViewModel.js +1 -1
  356. package/widgets/Feature.js +1 -1
  357. package/widgets/FeatureForm.js +1 -1
  358. package/widgets/FeatureTemplates.js +1 -1
  359. package/widgets/Features/FeaturesViewModel.js +1 -1
  360. package/widgets/Features.js +1 -1
  361. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  362. package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
  363. package/widgets/Histogram/HistogramViewModel.js +1 -1
  364. package/widgets/Histogram.js +1 -1
  365. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
  366. package/widgets/Home/HomeViewModel.js +1 -1
  367. package/widgets/LayerList/LayerListViewModel.js +1 -1
  368. package/widgets/Legend/LegendViewModel.js +1 -1
  369. package/widgets/Legend/styles/card/CardView.js +1 -1
  370. package/widgets/Legend/styles/classic/ClassicView.js +1 -1
  371. package/widgets/Locate/LocateViewModel.js +1 -1
  372. package/widgets/Locate.js +1 -1
  373. package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
  374. package/widgets/NavigationToggle.js +1 -1
  375. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  376. package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
  377. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  378. package/widgets/OrientedImageryViewer/support/urlUtils.js +1 -1
  379. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  380. package/widgets/Search.js +1 -1
  381. package/widgets/ShadowCast/DiscreteOptions.js +1 -1
  382. package/widgets/ShadowCast/DurationOptions.js +1 -1
  383. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  384. package/widgets/ShadowCast/ThresholdOptions.js +1 -1
  385. package/widgets/Sketch.js +1 -1
  386. package/widgets/Slider/SliderViewModel.js +1 -1
  387. package/widgets/Slider.js +1 -1
  388. package/widgets/TableList/TableListViewModel.js +1 -1
  389. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  390. package/widgets/Weather/WeatherViewModel.js +1 -1
  391. package/widgets/Widget.js +1 -1
  392. package/widgets/Zoom/ZoomViewModel.js +1 -1
  393. package/widgets/support/AnalysisViewModelMixin.js +1 -1
  394. package/widgets/support/GridControls.js +1 -1
  395. package/widgets/support/dateUtils.js +1 -1
  396. package/assets/esri/core/workers/chunks/00d43f02119167531d1b.js +0 -1
  397. package/assets/esri/core/workers/chunks/0696fa44a04b99738d7b.js +0 -1
  398. package/assets/esri/core/workers/chunks/091ec4fe83038f3558f4.js +0 -1
  399. package/assets/esri/core/workers/chunks/098ac10877d92fde1006.js +0 -1
  400. package/assets/esri/core/workers/chunks/0a29d87b6e58a3c6df8f.js +0 -1
  401. package/assets/esri/core/workers/chunks/0d04353843ccb7440342.js +0 -1
  402. package/assets/esri/core/workers/chunks/0d87cb6417672de95d53.js +0 -1
  403. package/assets/esri/core/workers/chunks/1132e28aaa5825b10b6e.js +0 -1
  404. package/assets/esri/core/workers/chunks/1380cec385426673f294.js +0 -1
  405. package/assets/esri/core/workers/chunks/1b24a40c0fa197014873.js +0 -1
  406. package/assets/esri/core/workers/chunks/1c7096eb48a3a7f27d4f.js +0 -1
  407. package/assets/esri/core/workers/chunks/1cc03067f8405285057c.js +0 -1
  408. package/assets/esri/core/workers/chunks/1f76f6dcdae9f55389cb.js +0 -1
  409. package/assets/esri/core/workers/chunks/21e1d423ee33f916547e.js +0 -1
  410. package/assets/esri/core/workers/chunks/247617c0dbae2386ab3b.js +0 -1
  411. package/assets/esri/core/workers/chunks/25657f70c5f04a4ed978.js +0 -1
  412. package/assets/esri/core/workers/chunks/2690d5fcd9d5ca92ebf6.js +0 -1
  413. package/assets/esri/core/workers/chunks/2853606099602f73d379.js +0 -1
  414. package/assets/esri/core/workers/chunks/28ed020d9995b6577be5.js +0 -1
  415. package/assets/esri/core/workers/chunks/2b27d3bc492e000bbe58.js +0 -1
  416. package/assets/esri/core/workers/chunks/2d64a13c2303e9cae613.js +0 -1
  417. package/assets/esri/core/workers/chunks/36e5f070009b29b7ac3d.js +0 -1
  418. package/assets/esri/core/workers/chunks/3b5e9e0b180dc10491ec.js +0 -1
  419. package/assets/esri/core/workers/chunks/46edd6c9ed6701e6b975.js +0 -1
  420. package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +0 -1
  421. package/assets/esri/core/workers/chunks/4e4f747de424941a0bfa.js +0 -1
  422. package/assets/esri/core/workers/chunks/4e8e322b469657ac22e2.js +0 -1
  423. package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +0 -1
  424. package/assets/esri/core/workers/chunks/553a8bf5bc5c56d1bcaf.js +0 -1
  425. package/assets/esri/core/workers/chunks/55c0c074e4afe05f5d4d.js +0 -1
  426. package/assets/esri/core/workers/chunks/5bfb962ca192f90a2724.js +0 -1
  427. package/assets/esri/core/workers/chunks/60c8eedd06080edab3e3.js +0 -1
  428. package/assets/esri/core/workers/chunks/61d36730564c5ac5edab.js +0 -1
  429. package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +0 -1
  430. package/assets/esri/core/workers/chunks/661c6324529dd17b297e.js +0 -1
  431. package/assets/esri/core/workers/chunks/6699fac01ccd842851ba.js +0 -1
  432. package/assets/esri/core/workers/chunks/672a5390182b20d632be.js +0 -1
  433. package/assets/esri/core/workers/chunks/67caef2ecf0dc5f2eed3.js +0 -1
  434. package/assets/esri/core/workers/chunks/68dd1fd2025c7125ead1.js +0 -1
  435. package/assets/esri/core/workers/chunks/68fd7b314377d27aaa54.js +0 -1
  436. package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +0 -1
  437. package/assets/esri/core/workers/chunks/6f2e7e663229b223b4df.js +0 -1
  438. package/assets/esri/core/workers/chunks/7390af96250e89194332.js +0 -1
  439. package/assets/esri/core/workers/chunks/7b45ac83e279fe9516a5.js +0 -1
  440. package/assets/esri/core/workers/chunks/7e0ed6e8f7b77e43f628.js +0 -1
  441. package/assets/esri/core/workers/chunks/832c887fdc5af4c08cf2.js +0 -1
  442. package/assets/esri/core/workers/chunks/84fb27e3425515cd0e3f.js +0 -1
  443. package/assets/esri/core/workers/chunks/8502274806ea52308822.js +0 -1
  444. package/assets/esri/core/workers/chunks/867502158997cb2d6406.js +0 -1
  445. package/assets/esri/core/workers/chunks/8ceb6697e8adbeffe019.js +0 -1
  446. package/assets/esri/core/workers/chunks/8e391b5b82429f39791e.js +0 -1
  447. package/assets/esri/core/workers/chunks/8e6276ddd8d094c61f08.js +0 -1
  448. package/assets/esri/core/workers/chunks/8fe22c2370219f25c15b.js +0 -1
  449. package/assets/esri/core/workers/chunks/90d797ab82d4a68ba32f.js +0 -1
  450. package/assets/esri/core/workers/chunks/91586bf29492735e692d.js +0 -1
  451. package/assets/esri/core/workers/chunks/96f87c8efd4b11b37686.js +0 -1
  452. package/assets/esri/core/workers/chunks/9826baa3c15ea2062669.js +0 -1
  453. package/assets/esri/core/workers/chunks/9c3de54513bf8619271c.js +0 -1
  454. package/assets/esri/core/workers/chunks/a125650edbed802e419a.js +0 -1
  455. package/assets/esri/core/workers/chunks/a18c3cbe505a19d29569.js +0 -1
  456. package/assets/esri/core/workers/chunks/a422a801e55fa125546e.js +0 -1
  457. package/assets/esri/core/workers/chunks/a5f17e9a025ac2b6e1bf.js +0 -1
  458. package/assets/esri/core/workers/chunks/a6e846361bf5dd3a11c7.js +0 -1
  459. package/assets/esri/core/workers/chunks/a91dc05a6a609d04ed04.js +0 -1
  460. package/assets/esri/core/workers/chunks/a99c50b4e1c7568210e1.js +0 -1
  461. package/assets/esri/core/workers/chunks/ab48faea5432e2dbd45c.js +0 -1
  462. package/assets/esri/core/workers/chunks/ac107079342251a984dd.js +0 -1
  463. package/assets/esri/core/workers/chunks/acf4737ba509cbd73cce.js +0 -1
  464. package/assets/esri/core/workers/chunks/b7205620ca248f4efc88.js +0 -1
  465. package/assets/esri/core/workers/chunks/bbddeb1c893ff8bbae5d.js +0 -1
  466. package/assets/esri/core/workers/chunks/bc2e2bdf1194e6e9eb5e.js +0 -1
  467. package/assets/esri/core/workers/chunks/c0eb27263f608dc3684b.js +0 -1
  468. package/assets/esri/core/workers/chunks/c3ba1a3247e14f6b7b3a.js +0 -1
  469. package/assets/esri/core/workers/chunks/c5d0a034ff31d5954571.js +0 -1
  470. package/assets/esri/core/workers/chunks/c8057b47c7c6c02a0bda.js +0 -1
  471. package/assets/esri/core/workers/chunks/ca21786e519c914fc9e1.js +0 -1
  472. package/assets/esri/core/workers/chunks/cd46d9b4a8de644e7332.js +0 -1
  473. package/assets/esri/core/workers/chunks/d4c8673ca65df874a7ce.js +0 -1
  474. package/assets/esri/core/workers/chunks/da1e6962ba0c85c37953.js +0 -1
  475. package/assets/esri/core/workers/chunks/dcdf837a452dc0cac582.js +0 -1
  476. package/assets/esri/core/workers/chunks/e0864ca82ffa3c9a0776.js +0 -1
  477. package/assets/esri/core/workers/chunks/e69cd62f824ce7a22fa0.js +0 -1
  478. package/assets/esri/core/workers/chunks/e9457a67befc61e11095.js +0 -1
  479. package/assets/esri/core/workers/chunks/f190a3124d6d03417d73.js +0 -1
  480. package/assets/esri/core/workers/chunks/f4135779bfdaf349352a.js +0 -1
  481. package/assets/esri/core/workers/chunks/f6bd7b52745b82ba73dc.js +0 -1
  482. package/assets/esri/core/workers/chunks/fbe3a3b9d6c8c0b52f65.js +0 -1
  483. package/assets/esri/core/workers/chunks/fc77eb7683e708774168.js +0 -1
  484. package/assets/esri/core/workers/chunks/fe7184993ef5713d13fb.js +0 -1
  485. package/assets/esri/core/workers/chunks/fecaf0bc28aeea4d15db.js +0 -1
  486. package/views/2d/engine/vectorTiles/style/VectorTilePbfWriter.js +0 -2
  487. package/views/2d/engine/vectorTiles/style/encodeVectorTileFeatures.js +0 -2
  488. package/views/2d/layers/features/support/FeatureSetReaderVectorTileFeatureCursor.js +0 -2
  489. /package/views/2d/engine/vectorTiles/{Feature.js → PbfFeature.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{deprecateUnnecessaryViewModel as n}from"../../core/deprecate.js";import{EventedAccessor as r}from"../../core/Evented.js";import i from"../../core/Logger.js";import{after as a,isAbortError as o}from"../../core/promiseUtils.js";import{watch as s,initial as c,syncAndInitial as l,whenOnce as u}from"../../core/reactiveUtils.js";import{offsetDate as d}from"../../core/timeUtils.js";import{property as f,cast as p,subclass as m}from"../../core/accessorSupport/decorators.js";import{ensureType as h}from"../../core/accessorSupport/ensureType.js";import g from"../../time/TimeExtent.js";import _ from"../../time/TimeInterval.js";import v from"../../webdoc/Widgets.js";import y from"../../webdoc/widgets/TimeSlider.js";const b=1e4;function x(e){return!!e&&`count`in e}function S(e){return!!e&&`interval`in e}function C(e){return!!e&&`dates`in e}let w=class extends r{constructor(e){super(e),this._animationController=null,this._isViewTimeExtentInitialized=!1,this._timerId=null,this.actions=new t,this.fullTimeExtent=null,this.loop=!1,this.mode=`time-window`,this.stops={count:10},this.timeExtent=null,this.view=null,e?.suppressDeprecationWarning||n(i.getLogger(this),`Time Bar`,`arcgis-time-bar`,{version:`5.2`})}normalizeCtorArgs(e){let{suppressDeprecationWarning:t,...n}=e??{};return n}initialize(){this.addHandles([s(()=>this.effectiveStops,()=>{this.timeExtent??=this._getDefaultTimeExtent()},c),s(()=>this.view,(e,t)=>{this._unregisterWidget(t),this._registerWidget(e)},l),s(()=>this.timeExtent,e=>{if(!this.view)return;let t=this.view.timeExtent;(e&&!e.isAllTime||t&&!t.isAllTime)&&(e&&t&&e.equals(t)||(this.view.timeExtent=e))},c),s(()=>this.view?.timeExtent,e=>{this._isViewTimeExtentInitialized?(e&&!e.isAllTime||this.timeExtent&&!this.timeExtent.isAllTime)&&(e&&this.timeExtent&&e.equals(this.timeExtent)||(this.timeExtent=e)):this._isViewTimeExtentInitialized=!0})])}destroy(){this._timerId!=null&&(clearInterval(this._timerId),this._timerId=null),this._unregisterWidget(this.view),this.view=null,this._animationController?.abort(),this._animationController=null}get effectiveStops(){let{fullTimeExtent:e,stops:t}=this;if(C(t)){let{dates:n}=t;if(!n?.length)return null;let r=n.sort((e,t)=>e.getTime()-t.getTime());if(!e)return r;let{start:i,end:a}=e;return!i||!a?r:r.filter(e=>!(e.getTime()<i.getTime()||e.getTime()>a.getTime()))}if(x(t)){let n=t.timeExtent??e;return this._divideTimeExtentByCount(n,t.count)}if(S(t)){let n=t.timeExtent??e;return this._divideTimeExtentByInterval(n,t.interval)}return[]}get isPreCommonEra(){return(this.fullTimeExtent?.start?.getFullYear()??0)<0}set playRate(e){e<=0||e>36e5||(this.state===`playing`&&this._startAnimation(),this._set(`playRate`,e))}get state(){return this.fullTimeExtent?this._animationController?`playing`:`ready`:`disabled`}castStops(e){if(!e)return null;if(S(e)){if(e.interval.unit===`unknown`)return i.getLogger(this).warn(`A stop interval with an "unknown" time units is not supported. The default stop definition will be used.`),{count:10};e.interval=h(_,e.interval)}return(S(e)||x(e))&&(e.timeExtent=h(g,e.timeExtent)),e}get timeExtentValues(){let{mode:e,timeExtent:t}=this;if(!t||t.isAllTime||t.isEmpty)return null;let{start:n,end:r}=t;switch(e){case`cumulative-from-end`:case`instant`:return n?[n.getTime()]:null;case`cumulative-from-start`:return r?[r.getTime()]:null;case`time-window`:return n&&r?[n.getTime(),r.getTime()]:null}}next(){this._step({forward:!0,allowRestart:!1})}play(){this._startAnimation()}previous(){this._step({forward:!1,allowRestart:!1})}stop(){this._stopAnimation()}triggerAction(e){this.emit(`trigger-action`,{action:e})}updateWebDocument(e){let t=new y({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:x(this.stops)?this.stops.count:null,numThumbs:this.mode===`time-window`?2:1,stopDelay:this.playRate,stopInterval:S(this.stops)?this.stops.interval:null,stops:C(this.stops)?this.stops.dates:null});e.widgets??=new v,e.widgets.timeSlider=t}valuesToTimeExtent(e){if(!e)return null;let t=e.sort((e,t)=>e-t).map(e=>new Date(e)),n=t.length>0?t[0]:null,r=t.length>1?t[1]:null;switch(this.mode){case`time-window`:return new g({start:n,end:r});case`instant`:return new g({start:n,end:n});case`cumulative-from-start`:return new g({start:null,end:n});case`cumulative-from-end`:return new g({start:n,end:null});default:return g.allTime}}async _animate(){try{let e=this.view,t=this._animationController?.signal;await Promise.all([a(this.playRate,null,t),e&&u(()=>!e.updating,t)])}catch(e){o(e)||i.getLogger(this).error(e),this._animationController=null;return}this._step({forward:!0,allowRestart:!1}),this._animationController&&this._animate()}_divideTimeExtentByCount(e,t=10){if(!e||!t)return[];let{start:n,end:r}=e;if(!n||!r)return[];if(t>b)return this._divideTimeExtentByCount(e);let i=[],a=n.getTime(),o=r.getTime()-a;for(let e=0;e<=t;e++)i.push(new Date(a+e/t*o));return i}_divideTimeExtentByInterval(e,t,n=b){if(!e||!t)return[];let{start:r,end:i}=e;if(!r||!i)return[];let a=i.getTime()-r.getTime(),o=t.toMilliseconds();if(o<=0||a/o>n)return this._divideTimeExtentByCount(e);let s=[],{value:c,unit:l}=t,u=r;for(;u.getTime()<=i.getTime();)s.push(new Date(u)),u=d(u,c,l);return s}_getDefaultTimeExtent(){let{effectiveStops:e,mode:t}=this;if(!e||!t)return null;switch(t){case`time-window`:return e.length>1?new g({start:e[0],end:e[1]}):null;case`cumulative-from-start`:return e.length>0?new g({start:null,end:e[0]}):null;case`cumulative-from-end`:return e.length>0?new g({start:e[0],end:null}):null;case`instant`:return e.length>0?new g({start:e[0],end:e[0]}):null;default:return null}}_registerWidget(e){e?.registerComponent(this)}_startAnimation(){this._stopAnimation(),this._animationController=new AbortController,this._step({forward:!0,allowRestart:!0}),this._animate()}_step(e){let{forward:t,allowRestart:n}=e,{effectiveStops:r}=this;if(!this.timeExtentValues||!r)return;let i=r.map(e=>e.getTime()),a=this.timeExtentValues.map(e=>{let t=i.indexOf(e);if(t!==-1)return t;let n=i.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t);return i.indexOf(n)}),o=a.map(e=>e+=t?1:-1),s=o.some(e=>e<0||e>i.length-1),{loop:c,state:l}=this;if(s){if(c||n){let e=Math.min(...a),n=Math.max(...a),r=(t?a.map(t=>t-e):a.map(e=>e+(i.length-1-n))).map(e=>i[e]);this.timeExtent=this.valuesToTimeExtent(r)}else l===`playing`&&this.stop()}else{let e=o.map(e=>i[e]);this.timeExtent=this.valuesToTimeExtent(e)}}_stopAnimation(){this._animationController!=null&&(this._animationController.abort(),this._animationController=null)}_unregisterWidget(e){e?.unregisterComponent(this)}};e([f()],w.prototype,`_animationController`,void 0),e([f({type:t})],w.prototype,`actions`,void 0),e([f({readOnly:!0})],w.prototype,`effectiveStops`,null),e([f({type:g})],w.prototype,`fullTimeExtent`,void 0),e([f()],w.prototype,`isPreCommonEra`,null),e([f({nonNullable:!0})],w.prototype,`loop`,void 0),e([f({nonNullable:!0})],w.prototype,`mode`,void 0),e([f({nonNullable:!0,value:1e3})],w.prototype,`playRate`,null),e([f({readOnly:!0})],w.prototype,`state`,null),e([f()],w.prototype,`stops`,void 0),e([p(`stops`)],w.prototype,`castStops`,null),e([f({type:g})],w.prototype,`timeExtent`,void 0),e([f({readOnly:!0})],w.prototype,`timeExtentValues`,null),e([f()],w.prototype,`view`,void 0),e([f()],w.prototype,`next`,null),e([f()],w.prototype,`play`,null),e([f()],w.prototype,`previous`,null),e([f()],w.prototype,`stop`,null),e([f()],w.prototype,`updateWebDocument`,null),w=e([m(`esri.widgets.TimeSlider.TimeSliderViewModel`)],w);const T=w;export{T as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{deprecateUnnecessaryViewModel as n}from"../../core/deprecate.js";import{EventedAccessor as r}from"../../core/Evented.js";import i from"../../core/Logger.js";import{after as a,isAbortError as o}from"../../core/promiseUtils.js";import{watch as s,initial as c,syncAndInitial as l,whenOnce as u}from"../../core/reactiveUtils.js";import{offsetDate as d}from"../../core/timeUtils.js";import{property as f,cast as p,subclass as m}from"../../core/accessorSupport/decorators.js";import{ensureType as h}from"../../core/accessorSupport/ensureType.js";import g from"../../time/TimeExtent.js";import _ from"../../time/TimeInterval.js";import v from"../../webdoc/Widgets.js";import y from"../../webdoc/widgets/TimeSlider.js";const b=1e4;function x(e){return!!e&&`count`in e}function S(e){return!!e&&`interval`in e}function C(e){return!!e&&`dates`in e}let w=class extends r{constructor(e){let{suppressDeprecationWarning:r,...a}=e??{};super(a),this._animationController=null,this._isViewTimeExtentInitialized=!1,this._timerId=null,this.actions=new t,this.fullTimeExtent=null,this.loop=!1,this.mode=`time-window`,this.stops={count:10},this.timeExtent=null,this.view=null,r||n(i.getLogger(this),`Time Bar`,`arcgis-time-bar`,{version:`5.2`})}initialize(){this.addHandles([s(()=>this.effectiveStops,()=>{this.timeExtent??=this._getDefaultTimeExtent()},c),s(()=>this.view,(e,t)=>{this._unregisterWidget(t),this._registerWidget(e)},l),s(()=>this.timeExtent,e=>{if(!this.view)return;let t=this.view.timeExtent;(e&&!e.isAllTime||t&&!t.isAllTime)&&(e&&t&&e.equals(t)||(this.view.timeExtent=e))},c),s(()=>this.view?.timeExtent,e=>{this._isViewTimeExtentInitialized?(e&&!e.isAllTime||this.timeExtent&&!this.timeExtent.isAllTime)&&(e&&this.timeExtent&&e.equals(this.timeExtent)||(this.timeExtent=e)):this._isViewTimeExtentInitialized=!0})])}destroy(){this._timerId!=null&&(clearInterval(this._timerId),this._timerId=null),this._unregisterWidget(this.view),this.view=null,this._animationController?.abort(),this._animationController=null}get effectiveStops(){let{fullTimeExtent:e,stops:t}=this;if(C(t)){let{dates:n}=t;if(!n?.length)return null;let r=n.sort((e,t)=>e.getTime()-t.getTime());if(!e)return r;let{start:i,end:a}=e;return!i||!a?r:r.filter(e=>!(e.getTime()<i.getTime()||e.getTime()>a.getTime()))}if(x(t)){let n=t.timeExtent??e;return this._divideTimeExtentByCount(n,t.count)}if(S(t)){let n=t.timeExtent??e;return this._divideTimeExtentByInterval(n,t.interval)}return[]}get isPreCommonEra(){return(this.fullTimeExtent?.start?.getFullYear()??0)<0}set playRate(e){e<=0||e>36e5||(this.state===`playing`&&this._startAnimation(),this._set(`playRate`,e))}get state(){return this.fullTimeExtent?this._animationController?`playing`:`ready`:`disabled`}castStops(e){if(!e)return null;if(S(e)){if(e.interval.unit===`unknown`)return i.getLogger(this).warn(`A stop interval with an "unknown" time units is not supported. The default stop definition will be used.`),{count:10};e.interval=h(_,e.interval)}return(S(e)||x(e))&&(e.timeExtent=h(g,e.timeExtent)),e}get timeExtentValues(){let{mode:e,timeExtent:t}=this;if(!t||t.isAllTime||t.isEmpty)return null;let{start:n,end:r}=t;switch(e){case`cumulative-from-end`:case`instant`:return n?[n.getTime()]:null;case`cumulative-from-start`:return r?[r.getTime()]:null;case`time-window`:return n&&r?[n.getTime(),r.getTime()]:null}}next(){this._step({forward:!0,allowRestart:!1})}play(){this._startAnimation()}previous(){this._step({forward:!1,allowRestart:!1})}stop(){this._stopAnimation()}triggerAction(e){this.emit(`trigger-action`,{action:e})}updateWebDocument(e){let t=new y({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:x(this.stops)?this.stops.count:null,numThumbs:this.mode===`time-window`?2:1,stopDelay:this.playRate,stopInterval:S(this.stops)?this.stops.interval:null,stops:C(this.stops)?this.stops.dates:null});e.widgets??=new v,e.widgets.timeSlider=t}valuesToTimeExtent(e){if(!e)return null;let t=e.sort((e,t)=>e-t).map(e=>new Date(e)),n=t.length>0?t[0]:null,r=t.length>1?t[1]:null;switch(this.mode){case`time-window`:return new g({start:n,end:r});case`instant`:return new g({start:n,end:n});case`cumulative-from-start`:return new g({start:null,end:n});case`cumulative-from-end`:return new g({start:n,end:null});default:return g.allTime}}async _animate(){try{let e=this.view,t=this._animationController?.signal;await Promise.all([a(this.playRate,null,t),e&&u(()=>!e.updating,t)])}catch(e){o(e)||i.getLogger(this).error(e),this._animationController=null;return}this._step({forward:!0,allowRestart:!1}),this._animationController&&this._animate()}_divideTimeExtentByCount(e,t=10){if(!e||!t)return[];let{start:n,end:r}=e;if(!n||!r)return[];if(t>b)return this._divideTimeExtentByCount(e);let i=[],a=n.getTime(),o=r.getTime()-a;for(let e=0;e<=t;e++)i.push(new Date(a+e/t*o));return i}_divideTimeExtentByInterval(e,t,n=b){if(!e||!t)return[];let{start:r,end:i}=e;if(!r||!i)return[];let a=i.getTime()-r.getTime(),o=t.toMilliseconds();if(o<=0||a/o>n)return this._divideTimeExtentByCount(e);let s=[],{value:c,unit:l}=t,u=r;for(;u.getTime()<=i.getTime();)s.push(new Date(u)),u=d(u,c,l);return s}_getDefaultTimeExtent(){let{effectiveStops:e,mode:t}=this;if(!e||!t)return null;switch(t){case`time-window`:return e.length>1?new g({start:e[0],end:e[1]}):null;case`cumulative-from-start`:return e.length>0?new g({start:null,end:e[0]}):null;case`cumulative-from-end`:return e.length>0?new g({start:e[0],end:null}):null;case`instant`:return e.length>0?new g({start:e[0],end:e[0]}):null;default:return null}}_registerWidget(e){e?.registerComponent(this)}_startAnimation(){this._stopAnimation(),this._animationController=new AbortController,this._step({forward:!0,allowRestart:!0}),this._animate()}_step(e){let{forward:t,allowRestart:n}=e,{effectiveStops:r}=this;if(!this.timeExtentValues||!r)return;let i=r.map(e=>e.getTime()),a=this.timeExtentValues.map(e=>{let t=i.indexOf(e);if(t!==-1)return t;let n=i.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t);return i.indexOf(n)}),o=a.map(e=>e+=t?1:-1),s=o.some(e=>e<0||e>i.length-1),{loop:c,state:l}=this;if(s){if(c||n){let e=Math.min(...a),n=Math.max(...a),r=(t?a.map(t=>t-e):a.map(e=>e+(i.length-1-n))).map(e=>i[e]);this.timeExtent=this.valuesToTimeExtent(r)}else l===`playing`&&this.stop()}else{let e=o.map(e=>i[e]);this.timeExtent=this.valuesToTimeExtent(e)}}_stopAnimation(){this._animationController!=null&&(this._animationController.abort(),this._animationController=null)}_unregisterWidget(e){e?.unregisterComponent(this)}};e([f()],w.prototype,`_animationController`,void 0),e([f({type:t})],w.prototype,`actions`,void 0),e([f({readOnly:!0})],w.prototype,`effectiveStops`,null),e([f({type:g})],w.prototype,`fullTimeExtent`,void 0),e([f()],w.prototype,`isPreCommonEra`,null),e([f({nonNullable:!0})],w.prototype,`loop`,void 0),e([f({nonNullable:!0})],w.prototype,`mode`,void 0),e([f({nonNullable:!0,value:1e3})],w.prototype,`playRate`,null),e([f({readOnly:!0})],w.prototype,`state`,null),e([f()],w.prototype,`stops`,void 0),e([p(`stops`)],w.prototype,`castStops`,null),e([f({type:g})],w.prototype,`timeExtent`,void 0),e([f({readOnly:!0})],w.prototype,`timeExtentValues`,null),e([f()],w.prototype,`view`,void 0),e([f()],w.prototype,`next`,null),e([f()],w.prototype,`play`,null),e([f()],w.prototype,`previous`,null),e([f()],w.prototype,`stop`,null),e([f()],w.prototype,`updateWebDocument`,null),w=e([m(`esri.widgets.TimeSlider.TimeSliderViewModel`)],w);const T=w;export{T as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as n}from"../../core/deprecate.js";import r from"../../core/Logger.js";import{watch as i,syncAndInitial as a}from"../../core/reactiveUtils.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../views/3d/environment/CloudyWeather.js";import l from"../../views/3d/environment/FoggyWeather.js";import u from"../../views/3d/environment/RainyWeather.js";import d from"../../views/3d/environment/SnowyWeather.js";import f from"../../views/3d/environment/SunnyWeather.js";import{validateWeatherType as p}from"../../views/3d/environment/weather.js";let m=class extends t{constructor(e){super(e),this.view=null,this._weatherByType={sunny:new f,cloudy:new c,rainy:new u,snowy:new d,foggy:new l},this._settingWeather=!1,e?.suppressDeprecationWarning||n(r.getLogger(this),`Weather`,`arcgis-weather`,{version:`4.33`})}normalizeCtorArgs(e={}){let{suppressDeprecationWarning:t,...n}=e;return n}initialize(){this.addHandles([i(()=>this.current,e=>{this._settingWeather||e==null||(this._weatherByType={...this._weatherByType,[e.type]:e})},a)])}get state(){let e=this.view;if(e==null||!e.ready)return`disabled`;if(this.error!=null)switch(this.error){case`not-visible`:return`ready`;default:return`error`}return`ready`}get weatherByType(){return this._weatherByType}get error(){let e=this.view;return e==null||!e.ready?null:e.type===`3d`?e.viewingMode===`local`?`local-scene`:e.environment.atmosphereEnabled?e.environment.weatherAvailable?null:`not-visible`:`no-atmosphere`:`unsupported-view`}get current(){return this._environment?.weather??this._weatherByType.sunny}set current(e){let t=this._environment;t&&(t.weather=e)}get _environment(){let e=this.view;return e!=null&&e.type===`3d`?e.environment:null}setWeatherByType(e){if(!p(e,r.getLogger(this)))return;let t=this._environment;t!=null&&(this._settingWeather=!0,t.weather=this._weatherByType[e],this._settingWeather=!1)}setSnowCoverEnabled(e){let t=this.current;`snowCover`in t&&(t.snowCover=e?`enabled`:`disabled`)}};e([o()],m.prototype,`view`,void 0),e([o()],m.prototype,`state`,null),e([o()],m.prototype,`_weatherByType`,void 0),e([o()],m.prototype,`weatherByType`,null),e([o()],m.prototype,`error`,null),e([o()],m.prototype,`current`,null),e([o()],m.prototype,`_environment`,null),m=e([s(`esri.widgets.Weather.WeatherViewModel`)],m);const h=m;export{h as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as n}from"../../core/deprecate.js";import r from"../../core/Logger.js";import{watch as i,syncAndInitial as a}from"../../core/reactiveUtils.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../views/3d/environment/CloudyWeather.js";import l from"../../views/3d/environment/FoggyWeather.js";import u from"../../views/3d/environment/RainyWeather.js";import d from"../../views/3d/environment/SnowyWeather.js";import f from"../../views/3d/environment/SunnyWeather.js";import{validateWeatherType as p}from"../../views/3d/environment/weather.js";let m=class extends t{constructor(e){let{suppressDeprecationWarning:t,...i}=e??{};super(i),this.view=null,this._weatherByType={sunny:new f,cloudy:new c,rainy:new u,snowy:new d,foggy:new l},this._settingWeather=!1,t||n(r.getLogger(this),`Weather`,`arcgis-weather`,{version:`4.33`})}initialize(){this.addHandles([i(()=>this.current,e=>{this._settingWeather||e==null||(this._weatherByType={...this._weatherByType,[e.type]:e})},a)])}get state(){let e=this.view;if(e==null||!e.ready)return`disabled`;if(this.error!=null)switch(this.error){case`not-visible`:return`ready`;default:return`error`}return`ready`}get weatherByType(){return this._weatherByType}get error(){let e=this.view;return e==null||!e.ready?null:e.type===`3d`?e.viewingMode===`local`?`local-scene`:e.environment.atmosphereEnabled?e.environment.weatherAvailable?null:`not-visible`:`no-atmosphere`:`unsupported-view`}get current(){return this._environment?.weather??this._weatherByType.sunny}set current(e){let t=this._environment;t&&(t.weather=e)}get _environment(){let e=this.view;return e!=null&&e.type===`3d`?e.environment:null}setWeatherByType(e){if(!p(e,r.getLogger(this)))return;let t=this._environment;t!=null&&(this._settingWeather=!0,t.weather=this._weatherByType[e],this._settingWeather=!1)}setSnowCoverEnabled(e){let t=this.current;`snowCover`in t&&(t.snowCover=e?`enabled`:`disabled`)}};e([o()],m.prototype,`view`,void 0),e([o()],m.prototype,`state`,null),e([o()],m.prototype,`_weatherByType`,void 0),e([o()],m.prototype,`weatherByType`,null),e([o()],m.prototype,`error`,null),e([o()],m.prototype,`current`,null),e([o()],m.prototype,`_environment`,null),m=e([s(`esri.widgets.Weather.WeatherViewModel`)],m);const h=m;export{h as default};
package/widgets/Widget.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{fetchMessageBundle as t,onLocaleChange as n}from"../intl.js";import{byId as r}from"../core/domUtils.js";import{EventedAccessor as i}from"../core/Evented.js";import{isEventedOrEventTarget as a,on as o}from"../core/events.js";import"../core/has.js";import{clone as s}from"../core/lang.js";import c from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{EsriPromiseMixin as u}from"../core/Promise.js";import{debounce as d,throwIfNotAbortError as f}from"../core/promiseUtils.js";import{watch as p,syncAndInitial as m,when as h}from"../core/reactiveUtils.js";import{generateUUID as g}from"../core/uuid.js";import{property as _,subclass as v}from"../core/accessorSupport/decorators.js";import{runTracked as y}from"../core/accessorSupport/tracking.js";import{SimpleTrackingTarget as b}from"../core/accessorSupport/tracking/SimpleTrackingTarget.js";import{createAdvancedProjector as x}from"../libs/maquette-advanced-projector/projector.js";import{commitAssetPath as S}from"./support/componentsUtils.js";import{isWidgetConstructor as C,processWidgets as w}from"./support/jsxWidgetSupport.js";import{widgetSymbol as T,widgetTestDataSymbol as E}from"./support/symbols.js";import{registerAlive as D,registerLoading as O}from"./support/tests.js";import{getVNodeCache as k,setVNodeCache as A,deleteVNodeCache as j,clearVNodeCache as M}from"./support/vnodeCache.js";import{classes as N}from"./support/widget.js";var P,F;let I=0;function L(e,t){let n=Object.prototype.hasOwnProperty;for(let r in t)n.call(t,r)&&n.call(e,r)&&(e[r]!=null&&t[r]!=null&&typeof e[r]==`object`&&typeof t[r]==`object`?L(e[r],t[r]):e[r]=t[r]);return e}const R=x({postProcessProjectionOptions(e){let t=e.eventHandlerInterceptor,n=/capture$/i;e.eventHandlerInterceptor=(e,r,i,a)=>{let o=t?.(e,r,i,a),s=n.test(e);if(e=e.replace(n,``),!(e.toLowerCase()in i)||s){let t=e[2].toLowerCase()+e.slice(3),n=e=>o?.call(i,e);i.addEventListener(t,n,s);let r=()=>i.removeEventListener(t,n,s),c=a.afterRemoved;a.afterRemoved=e=>{c?.(e),r()}}return o}},handleInterceptedEvent(e,t,n,r){let{eventPhase:i,type:a}=r,o=i===Event.CAPTURING_PHASE,s=`on${a}${o?`capture`:``}`,c=t.properties;(!c||!(s in c))&&(s=`on${a[0].toUpperCase()}${a.slice(1)}${o?`Capture`:``}`,!c||!(s in c))||(M(),e.scheduleRender(),c[s].call(c.bind||n,r))}});let z=!1,B=class extends u(i){static{this[P]=!0}constructor(e){super(e),this[F]=!0,this._attached=!1,this._projector=R,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this.topLayerDisabled=!1,this._loadLocale=d(async()=>{if(this._messageBundleProps?.length){let e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:n})=>{if(this.destroyed)return;let r=await t(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=L(s(r),this.uiStrings)),this[n]=r)}));if(this.destroyed)return;for(let t of e)t.status===`rejected`&&c.getLogger(this).error(`widget-intl:locale-error`,this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles(D()),S();let n=`esri-widget-uid-`+g(),r=this.render.bind(this);this._trackingTarget=new b(()=>{this.autoRenderingEnabled&&this.scheduleRender()});let i=()=>({vnodeSelector:`div`,properties:{key:`${n}-hidden`,class:``,styles:{display:`none`}},domNode:null,children:void 0,text:void 0}),a=()=>{if(!this._readyForTrueRender||this.destroyed)return null;let e=r()??i(),t=e.properties??={};t.key??=n,C(e.vnodeSelector)?t.visible=this.visible&&t.visible!==!1:(this.visible?t.styles||={}:(t.class=``,t.styles={display:`none`}),t.styles.display??=``);let a=0;return e.children?.forEach(e=>{C(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${a++}`)}),w(this,e)};this.render=()=>{if(z)return a();let e=k(this)??null;if(e)return e;this._trackingTarget.clear(),z=!0;try{e=y(this._trackingTarget,a)}catch(e){throw c.getLogger(this).error(e),e}finally{z=!1}return e&&A(this,e),e};let o=this.beforeFirstRender();o?this._resourcesFetch=o.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),O(this._resourcesFetch)}normalizeCtorArgs(e){return{...e}}postInitialize(){}beforeFirstRender(){let e=this.loadDependencies();return!this._messageBundleProps?.length&&!e?null:Promise.all([e,this._loadLocale()]).then(()=>{}).catch(f)}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||(l(this._trackingTarget),!this.viewModel?.destroyed&&!this.viewModel?.destroying&&l(this.viewModel),this._detach(this.container),this._set(`container`,null),this.render=()=>null,this._projector=null,j(this))}get container(){return this._get(`container`)}set container(e){this._get(`container`)||this._set(`container`,r(e))}get destroyed(){return super.destroyed}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome(`icon`,e)}get id(){return this._get(`id`)||this.container?.id||Date.now().toString(16)+`-widget-`+I++}set id(e){e&&this._set(`id`,e)}get label(){return this.declaredClass.split(`.`).pop()}set label(e){this._overrideIfSome(`label`,e)}get renderable(){return this._resourcesFetch}get visible(){return this._get(`visible`)}set visible(e){this._set(`visible`,e)}get[(P=T,F=T,E)](){return{projector:this._projector}}static{this.vnodeSelector=`div`}render(){throw Error(`not implemented`)}removeContainer(){this._set(`container`,null)}scheduleRender(){this.destroyed||(j(this),this._projector.scheduleRender())}classes(...e){return N.apply(this,e)}renderNow(){this.destroyed||(j(this),this._projector.renderNow())}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles(p(()=>this.viewModel,(e,t)=>{t&&this.removeHandles(`delegated-events`),e&&a(e)&&this.addHandles(this._delegatedEventNames.map(t=>o(e,t,e=>{this.emit(t,e)})),`delegated-events`)},m)),this.postInitialize();let e=async()=>{await this._loadLocale().catch(f),this.scheduleRender()};this.addHandles([n(e),p(()=>this.uiStrings,e)]),this.addHandles(h(()=>this.container,e=>{this.destroyed||(e.closest(`[arcgis-widget-wrapped]`)||(this.topLayerDisabled=!0,this.announceDeprecation?.()),this._attach(e))},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&=(this._projector.detach(this.render),!1),e?.parentNode?.removeChild(e)}};e([_()],B.prototype,`_readyForTrueRender`,void 0),e([_({value:null})],B.prototype,`container`,null),e([_()],B.prototype,`icon`,null),e([_()],B.prototype,`id`,null),e([_()],B.prototype,`label`,null),e([_()],B.prototype,`renderable`,null),e([_()],B.prototype,`uiStrings`,void 0),e([_()],B.prototype,`viewModel`,void 0),e([_({value:!0})],B.prototype,`visible`,null),e([_()],B.prototype,`key`,void 0),e([_()],B.prototype,`children`,void 0),e([_()],B.prototype,`afterCreate`,void 0),e([_()],B.prototype,`afterUpdate`,void 0),e([_()],B.prototype,`afterRemoved`,void 0),e([_()],B.prototype,`topLayerDisabled`,void 0),B=e([v(`esri.widgets.Widget`)],B);const V=B;export{V as default};
2
+ import{__decorate as e}from"tslib";import{fetchMessageBundle as t,onLocaleChange as n}from"../intl.js";import{byId as r}from"../core/domUtils.js";import{EventedAccessor as i}from"../core/Evented.js";import{isEventedOrEventTarget as a,on as o}from"../core/events.js";import"../core/has.js";import{clone as s}from"../core/lang.js";import c from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{EsriPromiseMixin as u}from"../core/Promise.js";import{debounce as d,throwIfNotAbortError as f}from"../core/promiseUtils.js";import{watch as p,syncAndInitial as m,when as h}from"../core/reactiveUtils.js";import{generateUUID as g}from"../core/uuid.js";import{property as _,subclass as v}from"../core/accessorSupport/decorators.js";import{runTracked as y}from"../core/accessorSupport/tracking.js";import{SimpleTrackingTarget as b}from"../core/accessorSupport/tracking/SimpleTrackingTarget.js";import{createAdvancedProjector as x}from"../libs/maquette-advanced-projector/projector.js";import{commitAssetPath as S}from"./support/componentsUtils.js";import{isWidgetConstructor as C,processWidgets as w}from"./support/jsxWidgetSupport.js";import{widgetSymbol as T,widgetTestDataSymbol as E}from"./support/symbols.js";import{registerAlive as D,registerLoading as O}from"./support/tests.js";import{getVNodeCache as k,setVNodeCache as A,deleteVNodeCache as j,clearVNodeCache as M}from"./support/vnodeCache.js";import{classes as N}from"./support/widget.js";var P,F;let I=0;function L(e,t){let n=Object.prototype.hasOwnProperty;for(let r in t)n.call(t,r)&&n.call(e,r)&&(e[r]!=null&&t[r]!=null&&typeof e[r]==`object`&&typeof t[r]==`object`?L(e[r],t[r]):e[r]=t[r]);return e}const R=x({postProcessProjectionOptions(e){let t=e.eventHandlerInterceptor,n=/capture$/i;e.eventHandlerInterceptor=(e,r,i,a)=>{let o=t?.(e,r,i,a),s=n.test(e);if(e=e.replace(n,``),!(e.toLowerCase()in i)||s){let t=e[2].toLowerCase()+e.slice(3),n=e=>o?.call(i,e);i.addEventListener(t,n,s);let r=()=>i.removeEventListener(t,n,s),c=a.afterRemoved;a.afterRemoved=e=>{c?.(e),r()}}return o}},handleInterceptedEvent(e,t,n,r){let{eventPhase:i,type:a}=r,o=i===Event.CAPTURING_PHASE,s=`on${a}${o?`capture`:``}`,c=t.properties;(!c||!(s in c))&&(s=`on${a[0].toUpperCase()}${a.slice(1)}${o?`Capture`:``}`,!c||!(s in c))||(M(),e.scheduleRender(),c[s].call(c.bind||n,r))}});let z=!1,B=class extends u(i){static{this[P]=!0}constructor(e){super({...e}),this[F]=!0,this._attached=!1,this._projector=R,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this.topLayerDisabled=!1,this._loadLocale=d(async()=>{if(this._messageBundleProps?.length){let e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:n})=>{if(this.destroyed)return;let r=await t(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=L(s(r),this.uiStrings)),this[n]=r)}));if(this.destroyed)return;for(let t of e)t.status===`rejected`&&c.getLogger(this).error(`widget-intl:locale-error`,this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles(D()),S();let n=`esri-widget-uid-`+g(),r=this.render.bind(this);this._trackingTarget=new b(()=>{this.autoRenderingEnabled&&this.scheduleRender()});let i=()=>({vnodeSelector:`div`,properties:{key:`${n}-hidden`,class:``,styles:{display:`none`}},domNode:null,children:void 0,text:void 0}),a=()=>{if(!this._readyForTrueRender||this.destroyed)return null;let e=r()??i(),t=e.properties??={};t.key??=n,C(e.vnodeSelector)?t.visible=this.visible&&t.visible!==!1:(this.visible?t.styles||={}:(t.class=``,t.styles={display:`none`}),t.styles.display??=``);let a=0;return e.children?.forEach(e=>{C(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${a++}`)}),w(this,e)};this.render=()=>{if(z)return a();let e=k(this)??null;if(e)return e;this._trackingTarget.clear(),z=!0;try{e=y(this._trackingTarget,a)}catch(e){throw c.getLogger(this).error(e),e}finally{z=!1}return e&&A(this,e),e};let o=this.beforeFirstRender();o?this._resourcesFetch=o.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),O(this._resourcesFetch)}postInitialize(){}beforeFirstRender(){let e=this.loadDependencies();return!this._messageBundleProps?.length&&!e?null:Promise.all([e,this._loadLocale()]).then(()=>{}).catch(f)}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||(l(this._trackingTarget),!this.viewModel?.destroyed&&!this.viewModel?.destroying&&l(this.viewModel),this._detach(this.container),this._set(`container`,null),this.render=()=>null,this._projector=null,j(this))}get container(){return this._get(`container`)}set container(e){this._get(`container`)||this._set(`container`,r(e))}get destroyed(){return super.destroyed}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome(`icon`,e)}get id(){return this._get(`id`)||this.container?.id||Date.now().toString(16)+`-widget-`+I++}set id(e){e&&this._set(`id`,e)}get label(){return this.declaredClass.split(`.`).pop()}set label(e){this._overrideIfSome(`label`,e)}get renderable(){return this._resourcesFetch}get visible(){return this._get(`visible`)}set visible(e){this._set(`visible`,e)}get[(P=T,F=T,E)](){return{projector:this._projector}}static{this.vnodeSelector=`div`}render(){throw Error(`not implemented`)}removeContainer(){this._set(`container`,null)}scheduleRender(){this.destroyed||(j(this),this._projector.scheduleRender())}classes(...e){return N.apply(this,e)}renderNow(){this.destroyed||(j(this),this._projector.renderNow())}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles(p(()=>this.viewModel,(e,t)=>{t&&this.removeHandles(`delegated-events`),e&&a(e)&&this.addHandles(this._delegatedEventNames.map(t=>o(e,t,e=>{this.emit(t,e)})),`delegated-events`)},m)),this.postInitialize();let e=async()=>{await this._loadLocale().catch(f),this.scheduleRender()};this.addHandles([n(e),p(()=>this.uiStrings,e)]),this.addHandles(h(()=>this.container,e=>{this.destroyed||(e.closest(`[arcgis-widget-wrapped]`)||(this.topLayerDisabled=!0,this.announceDeprecation?.()),this._attach(e))},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&=(this._projector.detach(this.render),!1),e?.parentNode?.removeChild(e)}};e([_()],B.prototype,`_readyForTrueRender`,void 0),e([_({value:null})],B.prototype,`container`,null),e([_()],B.prototype,`icon`,null),e([_()],B.prototype,`id`,null),e([_()],B.prototype,`label`,null),e([_()],B.prototype,`renderable`,null),e([_()],B.prototype,`uiStrings`,void 0),e([_()],B.prototype,`viewModel`,void 0),e([_({value:!0})],B.prototype,`visible`,null),e([_()],B.prototype,`key`,void 0),e([_()],B.prototype,`children`,void 0),e([_()],B.prototype,`afterCreate`,void 0),e([_()],B.prototype,`afterUpdate`,void 0),e([_()],B.prototype,`afterRemoved`,void 0),e([_()],B.prototype,`topLayerDisabled`,void 0),B=e([v(`esri.widgets.Widget`)],B);const V=B;export{V as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as n}from"../../core/deprecate.js";import r from"../../core/Logger.js";import{property as i,subclass as a}from"../../core/accessorSupport/decorators.js";let o=class extends t{constructor(e){super(e),this.view=null,e?.suppressDeprecationWarning||n(r.getLogger(this),`Zoom`,`arcgis-zoom`,{version:`5.0`})}normalizeCtorArgs(e){let{suppressDeprecationWarning:t,...n}=e??{};return n}destroy(){this.view=null}get canZoomIn(){return!!this.view?.canZoomIn}get canZoomOut(){return!!this.view?.canZoomOut}get state(){return this.view?.ready?`ready`:`disabled`}zoomIn(){this.view?.zoomIn()}zoomOut(){this.view?.zoomOut()}};e([i()],o.prototype,`canZoomIn`,null),e([i()],o.prototype,`canZoomOut`,null),e([i({readOnly:!0})],o.prototype,`state`,null),e([i()],o.prototype,`view`,void 0),o=e([a(`esri.widgets.Zoom.ZoomViewModel`)],o);const s=o;export{s as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as n}from"../../core/deprecate.js";import r from"../../core/Logger.js";import{property as i,subclass as a}from"../../core/accessorSupport/decorators.js";let o=class extends t{constructor(e){let{suppressDeprecationWarning:t,...i}=e??{};super(i),this.view=null,t||n(r.getLogger(this),`Zoom`,`arcgis-zoom`,{version:`5.0`})}destroy(){this.view=null}get canZoomIn(){return!!this.view?.canZoomIn}get canZoomOut(){return!!this.view?.canZoomOut}get state(){return this.view?.ready?`ready`:`disabled`}zoomIn(){this.view?.zoomIn()}zoomOut(){this.view?.zoomOut()}};e([i()],o.prototype,`canZoomIn`,null),e([i()],o.prototype,`canZoomOut`,null),e([i({readOnly:!0})],o.prototype,`state`,null),e([i()],o.prototype,`view`,void 0),o=e([a(`esri.widgets.Zoom.ZoomViewModel`)],o);const s=o;export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import"../../core/has.js";import n from"../../core/Logger.js";import{abortMaybe as r,removeMaybe as i}from"../../core/maybe.js";import{throwIfAborted as a,isAbortError as o,isAborted as s}from"../../core/promiseUtils.js";import{when as c,syncAndInitial as l,watch as u,sync as d,on as f,whenOnce as p}from"../../core/reactiveUtils.js";import{property as m,subclass as h}from"../../core/accessorSupport/decorators.js";const g=g=>{let v=g,y=class extends v{constructor(e={}){super(e),this.view=null,this.analysisView=null,this._reconnectViewTask=null,this._forceInteractiveHandle=null,this._changeFromReconnect=!1,this._startUserOperation=null;let t=e?.analysis;t==null?(this._set(`analysis`,this.constructAnalysis()),this._set(`isAnalysisOwner`,!0)):this.analysis=t,e?.visible!=null&&(this.visible=e.visible)}normalizeCtorArgs(e){let{analysis:t,suppressDeprecationWarning:n,...r}=e;return r}initialize(){let e=()=>{!this._changeFromReconnect&&!this._viewHasAnalysis&&this._set(`isAnalysisOwner`,!1);let e=!this._changeFromReconnect;this._changeFromReconnect=!1,e&&this._scheduleViewReconnect()};this.addHandles([c(()=>this.view!=null&&this.view.ready&&!this.supported,()=>n.getLogger(this).errorOnce(this.unsupportedErrorMessage),l),u(()=>[this.analysis,this._viewHasAnalysis],e,d),f(()=>this.view,`analysis-view-destroy`,t=>{t.analysis===this.analysis&&e()}),u(()=>({view:this.view,ready:this.view!=null&&this.view.ready,supported:this.supported}),({view:e},t)=>{let n=t?.view;e!==n&&(this._startUserOperation=r(this._startUserOperation),this._disconnectFromView(n)),this._scheduleViewReconnect()},l)])}destroy(){this._reconnectViewTask=r(this._reconnectViewTask),this._startUserOperation=r(this._startUserOperation),this.analysisView!=null&&(this.analysisView.visible=void 0),this._disconnectFromView(this.view),this._set(`view`,null),this.analysis!=null&&this.isAnalysisOwner&&(this.analysis.destroy(),this._set(`analysis`,null))}get supported(){return this.view==null||this.view.type===this.supportedViewType}set visible(e){this._set(`visible`,e),this.analysisView!=null&&(this.analysisView.visible=e)}get active(){return this.tool!=null&&this.tool.active}get disabled(){return this.view==null||!this.view.ready||!this.supported}set analysis(e){e!==this._get(`analysis`)&&(this._startUserOperation=r(this._startUserOperation),this._disconnectFromView(this.view),this._setExternalAnalysis(e),this._scheduleViewReconnect())}get ready(){return this.analysisView!=null&&!this.connectingToView}get connectingToView(){return this._reconnectViewTask!=null}get isAnalysisOwner(){return this._get(`isAnalysisOwner`)}get _viewHasAnalysis(){let{view:e}=this;return e!=null&&e.analyses.includes(this.analysis)}get tool(){return this.analysisView?.tool}clear(){this._startUserOperation=r(this._startUserOperation),this._resetInteractiveCreationState(),this.tool!=null&&this.view!=null&&this.tool.active&&(this.view.activeTool=null)}async start(){if(!this.visible){n.getLogger(this).warn(`Cannot start analysis when not visible`);return}this.clear();let e={task:null,abort:null,state:0},r=t(async t=>{if(e.state=1,await p(()=>this.ready,t),e.state=2,this.analysisView==null||this.view==null||this.analysisView.tool==null)return;let n=this._startInteractiveCreation(this.analysisView);if(n!=null){let t=e.abort;e.abort=()=>{n(),t()}}});return e.task=r,e.abort=()=>r.abort(),this._startUserOperation=e,r.promise}onConnectToAnalysisView(e){}onDisconnectFromAnalysisView(){}_startInteractiveCreation(e){let{tool:t}=e;t!=null&&(e.view.activeTool=t,c(()=>t.created,()=>{t.active&&(e.view.activeTool=null)},{initial:!0,once:!0}))}_scheduleViewReconnect(){this._reconnectViewTask=r(this._reconnectViewTask);let e=t(async t=>{try{await this._reconnectView(t)}catch(e){if(a(t),!o(e)){n.getLogger(this).warn(`Failed to use analysis in view model`,e);return}throw e}finally{e===this._reconnectViewTask&&(this._reconnectViewTask=null)}});this._reconnectViewTask=e}async _reconnectView(e){let{view:t}=this,n=t!=null&&t.ready&&this.supported,r=this.analysis;this._startUserOperation=_(this._startUserOperation),this._disconnectFromView(t),n&&t!=null&&r!=null&&(this.isAnalysisOwner&&(this._changeFromReconnect=!0,t.analyses.add(r)),this.analysisView=await t.whenAnalysisView(r),s(e)?this._startUserOperation=_(this._startUserOperation):(this.analysisView.visible=this.visible,this._forceInteractiveHandle=this.analysisView.forceInteractive(),this.addHandles(this._forceInteractiveHandle),this.onConnectToAnalysisView(this.analysisView)))}_disconnectFromView(e){e!=null&&this.isAnalysisOwner&&e.analyses.includes(this.analysis)&&(this._changeFromReconnect=!0,this.analysis.clear(),e.analyses.remove(this.analysis)),this.onDisconnectFromAnalysisView(),this._forceInteractiveHandle=i(this._forceInteractiveHandle),this.analysisView=null}_setExternalAnalysis(e){this.analysisView!=null&&!this.isAnalysisOwner&&(this.analysisView.visible=void 0,this._forceInteractiveHandle=i(this._forceInteractiveHandle)),this.analysisView=null,this._set(`isAnalysisOwner`,!1),this._set(`analysis`,e),this._changeFromReconnect=!1}_resetInteractiveCreationState(){this.analysis.clear(),this.tool?.resetCreated()}get testInfo(){}};return e([m()],y.prototype,`supported`,null),e([m()],y.prototype,`view`,void 0),e([m({type:Boolean,value:!0})],y.prototype,`visible`,null),e([m()],y.prototype,`active`,null),e([m()],y.prototype,`disabled`,null),e([m({nonNullable:!0})],y.prototype,`analysis`,null),e([m()],y.prototype,`analysisView`,void 0),e([m()],y.prototype,`ready`,null),e([m()],y.prototype,`connectingToView`,null),e([m({readOnly:!0})],y.prototype,`isAnalysisOwner`,null),e([m()],y.prototype,`_viewHasAnalysis`,null),e([m()],y.prototype,`_reconnectViewTask`,void 0),e([m()],y.prototype,`_forceInteractiveHandle`,void 0),e([m()],y.prototype,`tool`,null),y=e([h(`esri.widgets.support.AnalysisViewModelMixin`)],y),y};function _(e){return e!=null&&e.state>=2?(e.abort(),null):e}export{g as AnalysisViewModelMixin};
2
+ import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import"../../core/has.js";import n from"../../core/Logger.js";import{abortMaybe as r,removeMaybe as i}from"../../core/maybe.js";import{throwIfAborted as a,isAbortError as o,isAborted as s}from"../../core/promiseUtils.js";import{when as c,syncAndInitial as l,watch as u,sync as d,on as f,whenOnce as p}from"../../core/reactiveUtils.js";import{property as m,subclass as h}from"../../core/accessorSupport/decorators.js";const g=g=>{let v=g,y=class extends v{constructor(e={}){let{analysis:t,suppressDeprecationWarning:n,...r}=e;super(r),this.view=null,this.analysisView=null,this._reconnectViewTask=null,this._forceInteractiveHandle=null,this._changeFromReconnect=!1,this._startUserOperation=null;let i=t;i==null?(this._set(`analysis`,this.constructAnalysis()),this._set(`isAnalysisOwner`,!0)):this.analysis=i,e?.visible!=null&&(this.visible=e.visible)}initialize(){let e=()=>{!this._changeFromReconnect&&!this._viewHasAnalysis&&this._set(`isAnalysisOwner`,!1);let e=!this._changeFromReconnect;this._changeFromReconnect=!1,e&&this._scheduleViewReconnect()};this.addHandles([c(()=>this.view!=null&&this.view.ready&&!this.supported,()=>n.getLogger(this).errorOnce(this.unsupportedErrorMessage),l),u(()=>[this.analysis,this._viewHasAnalysis],e,d),f(()=>this.view,`analysis-view-destroy`,t=>{t.analysis===this.analysis&&e()}),u(()=>({view:this.view,ready:this.view!=null&&this.view.ready,supported:this.supported}),({view:e},t)=>{let n=t?.view;e!==n&&(this._startUserOperation=r(this._startUserOperation),this._disconnectFromView(n)),this._scheduleViewReconnect()},l)])}destroy(){this._reconnectViewTask=r(this._reconnectViewTask),this._startUserOperation=r(this._startUserOperation),this.analysisView!=null&&(this.analysisView.visible=void 0),this._disconnectFromView(this.view),this._set(`view`,null),this.analysis!=null&&this.isAnalysisOwner&&(this.analysis.destroy(),this._set(`analysis`,null))}get supported(){return this.view==null||this.view.type===this.supportedViewType}set visible(e){this._set(`visible`,e),this.analysisView!=null&&(this.analysisView.visible=e)}get active(){return this.tool!=null&&this.tool.active}get disabled(){return this.view==null||!this.view.ready||!this.supported}set analysis(e){e!==this._get(`analysis`)&&(this._startUserOperation=r(this._startUserOperation),this._disconnectFromView(this.view),this._setExternalAnalysis(e),this._scheduleViewReconnect())}get ready(){return this.analysisView!=null&&!this.connectingToView}get connectingToView(){return this._reconnectViewTask!=null}get isAnalysisOwner(){return this._get(`isAnalysisOwner`)}get _viewHasAnalysis(){let{view:e}=this;return e!=null&&e.analyses.includes(this.analysis)}get tool(){return this.analysisView?.tool}clear(){this._startUserOperation=r(this._startUserOperation),this._resetInteractiveCreationState(),this.tool!=null&&this.view!=null&&this.tool.active&&(this.view.activeTool=null)}async start(){if(!this.visible){n.getLogger(this).warn(`Cannot start analysis when not visible`);return}this.clear();let e={task:null,abort:null,state:0},r=t(async t=>{if(e.state=1,await p(()=>this.ready,t),e.state=2,this.analysisView==null||this.view==null||this.analysisView.tool==null)return;let n=this._startInteractiveCreation(this.analysisView);if(n!=null){let t=e.abort;e.abort=()=>{n(),t()}}});return e.task=r,e.abort=()=>r.abort(),this._startUserOperation=e,r.promise}onConnectToAnalysisView(e){}onDisconnectFromAnalysisView(){}_startInteractiveCreation(e){let{tool:t}=e;t!=null&&(e.view.activeTool=t,c(()=>t.created,()=>{t.active&&(e.view.activeTool=null)},{initial:!0,once:!0}))}_scheduleViewReconnect(){this._reconnectViewTask=r(this._reconnectViewTask);let e=t(async t=>{try{await this._reconnectView(t)}catch(e){if(a(t),!o(e)){n.getLogger(this).warn(`Failed to use analysis in view model`,e);return}throw e}finally{e===this._reconnectViewTask&&(this._reconnectViewTask=null)}});this._reconnectViewTask=e}async _reconnectView(e){let{view:t}=this,n=t!=null&&t.ready&&this.supported,r=this.analysis;this._startUserOperation=_(this._startUserOperation),this._disconnectFromView(t),n&&t!=null&&r!=null&&(this.isAnalysisOwner&&(this._changeFromReconnect=!0,t.analyses.add(r)),this.analysisView=await t.whenAnalysisView(r),s(e)?this._startUserOperation=_(this._startUserOperation):(this.analysisView.visible=this.visible,this._forceInteractiveHandle=this.analysisView.forceInteractive(),this.addHandles(this._forceInteractiveHandle),this.onConnectToAnalysisView(this.analysisView)))}_disconnectFromView(e){e!=null&&this.isAnalysisOwner&&e.analyses.includes(this.analysis)&&(this._changeFromReconnect=!0,this.analysis.clear(),e.analyses.remove(this.analysis)),this.onDisconnectFromAnalysisView(),this._forceInteractiveHandle=i(this._forceInteractiveHandle),this.analysisView=null}_setExternalAnalysis(e){this.analysisView!=null&&!this.isAnalysisOwner&&(this.analysisView.visible=void 0,this._forceInteractiveHandle=i(this._forceInteractiveHandle)),this.analysisView=null,this._set(`isAnalysisOwner`,!1),this._set(`analysis`,e),this._changeFromReconnect=!1}_resetInteractiveCreationState(){this.analysis.clear(),this.tool?.resetCreated()}get testInfo(){}};return e([m()],y.prototype,`supported`,null),e([m()],y.prototype,`view`,void 0),e([m({type:Boolean,value:!0})],y.prototype,`visible`,null),e([m()],y.prototype,`active`,null),e([m()],y.prototype,`disabled`,null),e([m({nonNullable:!0})],y.prototype,`analysis`,null),e([m()],y.prototype,`analysisView`,void 0),e([m()],y.prototype,`ready`,null),e([m()],y.prototype,`connectingToView`,null),e([m({readOnly:!0})],y.prototype,`isAnalysisOwner`,null),e([m()],y.prototype,`_viewHasAnalysis`,null),e([m()],y.prototype,`_reconnectViewTask`,void 0),e([m()],y.prototype,`_forceInteractiveHandle`,void 0),e([m()],y.prototype,`tool`,null),y=e([h(`esri.widgets.support.AnalysisViewModelMixin`)],y),y};function _(e){return e!=null&&e.state>=2?(e.abort(),null):e}export{g as AnalysisViewModelMixin};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../Color.js";import{substitute as n}from"../../intl.js";import{deprecateWidget as r}from"../../core/deprecate.js";import i from"../../core/Logger.js";import{watch as a,initial as o}from"../../core/reactiveUtils.js";import{formatDecimal as s}from"../../core/unitFormatUtils.js";import{property as c,subclass as l}from"../../core/accessorSupport/decorators.js";import u from"../../views/interactive/snapping/SnappingOptions.js";import d from"../Widget.js";import{loadCalciteComponents as f}from"./componentsUtils.js";import{globalCss as p}from"./globalCss.js";import{loadLabeledSwitchComponents as m,LabeledSwitch as h}from"./LabeledSwitch.js";import{tsx as g,classes as _,messageBundle as v}from"./widget.js";import y from"./GridControls/GridControlsViewModel.js";import{userInputToGridRotation as b,gridRotationToDegrees as x}from"./GridControls/gridUtils.js";import S from"./GridControls/VisibleElements.js";const C=`esri-grid-controls`,w={base:C,borderedSwitch:`${C}__switch--bordered`,container:`${C}__container`,numericInputsContainer:`${C}__numeric-inputs__container`,tilegroup:`${C}__tilegroup`,tile:`${C}__tile`,tileDisabled:`${C}__tile--disabled`,tileContent:`${C}__tile__content`,suffixedInputContainer:`${C}__input-with-suffix__container`,inlineIcon:`${C}__inline-icon`},T={widgetIcon:`grid-unit`,gridTheme:{light:`circle`,dark:`circle-area`,custom:`palette`},placementState:{interactive:`maximum-territory-distance`,place:`move`,rotate:`rotate`},warning:`exclamation-mark-triangle`},E=t.fromArray([115,115,115]),D=t.fromArray([200,200,200]),O=[`interactive`,`place`,`rotate`];let k=class extends d{constructor(e){super(e),this.customColor=null,this.messages=null,this.messagesUnits=null,this.viewModel=new y,this.visibleElements=new S,e?.suppressDeprecationWarning||r(i.getLogger(this),`Grid Controls`,`arcgis-grid-controls`,{version:`4.33`})}normalizeCtorArgs(e={}){let{suppressDeprecationWarning:t,...n}=e;return n}initialize(){this.addHandles([a(()=>this.viewModel.gridColor,e=>{e&&!E.equals(e)&&!D.equals(e)&&(this.customColor=e)},o)])}loadDependencies(){return Promise.all([f({action:()=>import(`@esri/calcite-components/dist/components/calcite-action`),"action-bar":()=>import(`@esri/calcite-components/dist/components/calcite-action-bar`),label:()=>import(`@esri/calcite-components/dist/components/calcite-label`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),popover:()=>import(`@esri/calcite-components/dist/components/calcite-popover`),tooltip:()=>import(`@esri/calcite-components/dist/components/calcite-tooltip`),"color-picker":()=>import(`@esri/calcite-components/dist/components/calcite-color-picker`),"input-number":()=>import(`@esri/calcite-components/dist/components/calcite-input-number`)}),m()])}get icon(){return T.widgetIcon}set icon(e){this._overrideIfSome(`icon`,e)}get label(){return this.messages.widgetLabel}set label(e){this._overrideIfSome(`label`,e)}get snappingManager(){return this.viewModel.snappingManager}set snappingManager(e){this.viewModel.snappingManager=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get theme(){let e=this.viewModel.gridColor;return e?E.equals(e)?`dark`:D.equals(e)?`light`:`custom`:null}set theme(e){let{viewModel:t,customColor:n,view:r}=this;switch(e){case`light`:t.gridColor=D;break;case`dark`:t.gridColor=E;break;case`custom`:t.gridColor=n??r?.effectiveTheme.accentColor??E}}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){return g(`div`,{"aria-label":this.label,class:this.classes(w.base,p.widget,p.panel)},g(`div`,{class:w.container},this._renderContent()))}_renderContent(){let{visibleElements:e}=this;return[e.gridEnabledToggle?this._renderEnabledToggle():null,e.placementButtons?this._renderGridPlacementButtons():null,e.numericInputs?this._renderNumericInputs():null,e.lineIntervalInput?this._renderIntervalInput():null,e.gridSnapEnabledToggle&&this.viewModel.snappingOptions?this._renderSnappingToggle():null,e.dynamicScaleToggle?this._renderDynamicScaleToggle():null,e.rotateWithMapToggle?this._renderRotateToggle():null,e.colorSelection?this._renderColorSelection():null]}_renderGridPlacementButtons(){let{interactivePlacementState:e,placementDisabled:t,gridControlsEnabled:n}=this.viewModel,r=t||!n;return g(`calcite-label`,{key:`grid-placement-buttons`,scale:`s`},this.messages.placementOptions,g(`calcite-action-bar`,{expandToggleDisabled:!0,layout:`horizontal`},O.map(t=>this._renderPlacementModeButton(t,r,e))))}_renderPlacementModeButton(e,t,n){let r=this.messages.placementState[e],i=`__placement-action-${e}`;return g(`div`,null,g(`calcite-action`,{active:n===e,alignment:`center`,disabled:t,icon:T.placementState[e],id:i,text:r,onclick:()=>this.viewModel.togglePlacementState(e)}),g(`calcite-tooltip`,{overlayPositioning:`fixed`,placement:`top`,referenceElement:i,topLayerDisabled:this.topLayerDisabled},r))}_renderNumericInputs(){let{rotation:e,spacing:t,effectiveSpacingAfterDynamicScaling:r,numericSpacingInputShouldBeVisible:i,unit:a=`meters`}=this.viewModel,o=this.messagesUnits.units[a].abbr,c=this.viewModel.gridControlsEnabled,l=r!=null&&r!==this.viewModel.spacing,u=`__spacing_input_scaled-${this.id}`;return g(`div`,{class:this.classes(w.numericInputsContainer)},[i?g(`calcite-label`,{key:`spacing-label`,scale:`s`},g(`span`,null,this.messages.inputLabel.spacing,l?g(`calcite-icon`,{class:this.classes(w.inlineIcon),icon:T.warning,id:u,scale:`s`,tabIndex:0}):void 0),g(`div`,{class:w.suffixedInputContainer},g(`calcite-input-number`,{disabled:!c,numberButtonType:`none`,suffixText:o,value:`${t?.toFixed(2)}`,onCalciteInputNumberChange:({currentTarget:e})=>{let t=parseFloat(e.value);this.viewModel.spacing=t,t!==this.viewModel.spacing&&(e.value=`${this.viewModel.spacing}`)}}),l?g(`calcite-tooltip`,{overlayPositioning:`fixed`,placement:`leading`,referenceElement:u,topLayerDisabled:this.topLayerDisabled},n(this.messages.warnings.dynamicSpacing,{actualSpacingIncludingUnit:s(this.messagesUnits,r,a,2,`plural`)})):void 0)):void 0,g(`calcite-label`,{key:`angle-label`,scale:`s`},this.messages.inputLabel.angle,g(`calcite-input-number`,{disabled:!c,integer:!0,numberButtonType:`none`,suffixText:this.messagesUnits.units.degrees.abbr,value:`${x(e)}`,onCalciteInputNumberChange:({currentTarget:e})=>this.viewModel.rotation=b(e.value)}))])}_renderIntervalInput(){let{majorLineInterval:e,gridControlsEnabled:t}=this.viewModel;return g(`div`,{class:this.classes(w.numericInputsContainer)},g(`calcite-label`,{scale:`s`},this.messages.inputLabel.interval,g(`calcite-input-number`,{disabled:!t,integer:!0,max:15,min:1,numberButtonType:`vertical`,value:`${e}`,onCalciteInputNumberChange:({currentTarget:e})=>{let t=Number.parseInt(e.value,10);this.viewModel.majorLineInterval=t,t!==this.viewModel.majorLineInterval&&(e.value=`${this.viewModel.majorLineInterval}`)}})))}_renderSnappingToggle(){let{snappingOptions:e,gridControlsEnabled:t}=this.viewModel,n=e?.gridEnabled??!1;return g(h,{checked:!!n,disabled:!(t&&e),key:`grid-snap-enabled-toggle`,label:this.messages.switchLabel.snap,topLayerDisabled:this.topLayerDisabled,onChange:e=>this.viewModel.snappingOptions?.set(`gridEnabled`,e)})}_renderDynamicScaleToggle(){let{viewModel:e,messages:t}=this,n=this.visibleElements.outOfScaleWarning&&e.gridOutOfScale;return g(h,{checked:e.dynamicScaling,disabled:!e.gridControlsEnabled,hint:n?t.warnings.outOfScale:void 0,hintIcon:T.warning,hintKind:`warning`,key:`grid-dynamic-scale-toggle-${this.id}`,label:t.switchLabel.scaling,topLayerDisabled:this.topLayerDisabled,onChange:t=>e.dynamicScaling=t})}_renderRotateToggle(){let{gridControlsEnabled:e,rotateWithMap:t}=this.viewModel;return g(h,{checked:t,disabled:!e,key:`grid-rotate-map-toggle`,label:this.messages.switchLabel.rotateWithMap,topLayerDisabled:this.topLayerDisabled,onChange:e=>this.viewModel.rotateWithMap=e})}_renderEnabledToggle(){return g(`div`,{class:w.borderedSwitch},g(h,{checked:this.viewModel.displayEnabled,disabled:!!this.viewModel.interactivePlacementState,key:`grid-enabled-toggle`,label:this.messages.switchLabel.display,topLayerDisabled:this.topLayerDisabled,onChange:e=>this.viewModel.trySetDisplayEnabled(e)}))}_renderColorSelection(){let{customColor:e}=this,n=`${this.id}--custom-grid-color-button`;return g(`calcite-label`,{scale:`s`},this.messages.inputLabel.theme,g(`div`,{class:w.tilegroup},[this._renderThemeTile({value:`dark`}),this._renderThemeTile({value:`light`}),this._renderThemeTile({value:`custom`,id:n}),g(`calcite-popover`,{closable:!0,heading:this.messages.colorInputHeading,label:this.messages.gridLineColorPopoverLabel,overlayPositioning:`fixed`,referenceElement:n,topLayerDisabled:this.topLayerDisabled},g(`calcite-color-picker`,{alphaChannel:!0,savedDisabled:!0,value:e?.toHex({digits:8})??`#000000ff`,onCalciteColorPickerChange:e=>{let n=t.fromHex(e.currentTarget.value);n&&(this.customColor=n,this.theme=`custom`)}}))]))}_renderThemeTile(e){let{theme:t}=this,{value:n}=e,r=this.messages.gridTheme[n],i=`${this.id}--theme_tile_${n}`,a=`${i}__label`,o=T.gridTheme[n],s=this.viewModel.gridControlsEnabled;return g(`div`,{class:_({[w.tile]:!0,[w.tileDisabled]:!s}),id:e.id,role:`button`},g(`input`,{"aria-labelledby":a,checked:t===n,disabled:!s,id:i,name:`${this.id}--theme`,tabIndex:0,type:`radio`,onchange:e=>{this.theme=n,e.target?.focus()}}),g(`div`,{class:w.tileContent},g(`calcite-icon`,{icon:o,scale:`l`}),g(`calcite-label`,{for:i,id:a},r)))}};e([c({type:t})],k.prototype,`customColor`,void 0),e([c()],k.prototype,`icon`,null),e([c()],k.prototype,`label`,null),e([c(),v(`esri/widgets/support/GridControls/t9n/GridControls`)],k.prototype,`messages`,void 0),e([c(),v(`esri/core/t9n/Units`)],k.prototype,`messagesUnits`,void 0),e([c()],k.prototype,`snappingManager`,null),e([c({type:u})],k.prototype,`snappingOptions`,null),e([c()],k.prototype,`theme`,null),e([c()],k.prototype,`view`,null),e([c({type:y})],k.prototype,`viewModel`,void 0),e([c({type:S,nonNullable:!0})],k.prototype,`visibleElements`,void 0),k=e([l(`esri.widgets.support.GridControls`)],k);const A=k;export{A as default};
2
+ import{__decorate as e}from"tslib";import t from"../../Color.js";import{substitute as n}from"../../intl.js";import{deprecateWidget as r}from"../../core/deprecate.js";import i from"../../core/Logger.js";import{watch as a,initial as o}from"../../core/reactiveUtils.js";import{formatDecimal as s}from"../../core/unitFormatUtils.js";import{property as c,subclass as l}from"../../core/accessorSupport/decorators.js";import u from"../../views/interactive/snapping/SnappingOptions.js";import d from"../Widget.js";import{loadCalciteComponents as f}from"./componentsUtils.js";import{globalCss as p}from"./globalCss.js";import{loadLabeledSwitchComponents as m,LabeledSwitch as h}from"./LabeledSwitch.js";import{tsx as g,classes as _,messageBundle as v}from"./widget.js";import y from"./GridControls/GridControlsViewModel.js";import{userInputToGridRotation as b,gridRotationToDegrees as x}from"./GridControls/gridUtils.js";import S from"./GridControls/VisibleElements.js";const C=`esri-grid-controls`,w={base:C,borderedSwitch:`${C}__switch--bordered`,container:`${C}__container`,numericInputsContainer:`${C}__numeric-inputs__container`,tilegroup:`${C}__tilegroup`,tile:`${C}__tile`,tileDisabled:`${C}__tile--disabled`,tileContent:`${C}__tile__content`,suffixedInputContainer:`${C}__input-with-suffix__container`,inlineIcon:`${C}__inline-icon`},T={widgetIcon:`grid-unit`,gridTheme:{light:`circle`,dark:`circle-area`,custom:`palette`},placementState:{interactive:`maximum-territory-distance`,place:`move`,rotate:`rotate`},warning:`exclamation-mark-triangle`},E=t.fromArray([115,115,115]),D=t.fromArray([200,200,200]),O=[`interactive`,`place`,`rotate`];let k=class extends d{constructor(e){let{suppressDeprecationWarning:t,...n}=e??{};super(n),this.customColor=null,this.messages=null,this.messagesUnits=null,this.viewModel=new y,this.visibleElements=new S,t||r(i.getLogger(this),`Grid Controls`,`arcgis-grid-controls`,{version:`4.33`})}initialize(){this.addHandles([a(()=>this.viewModel.gridColor,e=>{e&&!E.equals(e)&&!D.equals(e)&&(this.customColor=e)},o)])}loadDependencies(){return Promise.all([f({action:()=>import(`@esri/calcite-components/dist/components/calcite-action`),"action-bar":()=>import(`@esri/calcite-components/dist/components/calcite-action-bar`),label:()=>import(`@esri/calcite-components/dist/components/calcite-label`),icon:()=>import(`@esri/calcite-components/dist/components/calcite-icon`),popover:()=>import(`@esri/calcite-components/dist/components/calcite-popover`),tooltip:()=>import(`@esri/calcite-components/dist/components/calcite-tooltip`),"color-picker":()=>import(`@esri/calcite-components/dist/components/calcite-color-picker`),"input-number":()=>import(`@esri/calcite-components/dist/components/calcite-input-number`)}),m()])}get icon(){return T.widgetIcon}set icon(e){this._overrideIfSome(`icon`,e)}get label(){return this.messages.widgetLabel}set label(e){this._overrideIfSome(`label`,e)}get snappingManager(){return this.viewModel.snappingManager}set snappingManager(e){this.viewModel.snappingManager=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get theme(){let e=this.viewModel.gridColor;return e?E.equals(e)?`dark`:D.equals(e)?`light`:`custom`:null}set theme(e){let{viewModel:t,customColor:n,view:r}=this;switch(e){case`light`:t.gridColor=D;break;case`dark`:t.gridColor=E;break;case`custom`:t.gridColor=n??r?.effectiveTheme.accentColor??E}}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){return g(`div`,{"aria-label":this.label,class:this.classes(w.base,p.widget,p.panel)},g(`div`,{class:w.container},this._renderContent()))}_renderContent(){let{visibleElements:e}=this;return[e.gridEnabledToggle?this._renderEnabledToggle():null,e.placementButtons?this._renderGridPlacementButtons():null,e.numericInputs?this._renderNumericInputs():null,e.lineIntervalInput?this._renderIntervalInput():null,e.gridSnapEnabledToggle&&this.viewModel.snappingOptions?this._renderSnappingToggle():null,e.dynamicScaleToggle?this._renderDynamicScaleToggle():null,e.rotateWithMapToggle?this._renderRotateToggle():null,e.colorSelection?this._renderColorSelection():null]}_renderGridPlacementButtons(){let{interactivePlacementState:e,placementDisabled:t,gridControlsEnabled:n}=this.viewModel,r=t||!n;return g(`calcite-label`,{key:`grid-placement-buttons`,scale:`s`},this.messages.placementOptions,g(`calcite-action-bar`,{expandToggleDisabled:!0,layout:`horizontal`},O.map(t=>this._renderPlacementModeButton(t,r,e))))}_renderPlacementModeButton(e,t,n){let r=this.messages.placementState[e],i=`__placement-action-${e}`;return g(`div`,null,g(`calcite-action`,{active:n===e,alignment:`center`,disabled:t,icon:T.placementState[e],id:i,text:r,onclick:()=>this.viewModel.togglePlacementState(e)}),g(`calcite-tooltip`,{overlayPositioning:`fixed`,placement:`top`,referenceElement:i,topLayerDisabled:this.topLayerDisabled},r))}_renderNumericInputs(){let{rotation:e,spacing:t,effectiveSpacingAfterDynamicScaling:r,numericSpacingInputShouldBeVisible:i,unit:a=`meters`}=this.viewModel,o=this.messagesUnits.units[a].abbr,c=this.viewModel.gridControlsEnabled,l=r!=null&&r!==this.viewModel.spacing,u=`__spacing_input_scaled-${this.id}`;return g(`div`,{class:this.classes(w.numericInputsContainer)},[i?g(`calcite-label`,{key:`spacing-label`,scale:`s`},g(`span`,null,this.messages.inputLabel.spacing,l?g(`calcite-icon`,{class:this.classes(w.inlineIcon),icon:T.warning,id:u,scale:`s`,tabIndex:0}):void 0),g(`div`,{class:w.suffixedInputContainer},g(`calcite-input-number`,{disabled:!c,numberButtonType:`none`,suffixText:o,value:`${t?.toFixed(2)}`,onCalciteInputNumberChange:({currentTarget:e})=>{let t=parseFloat(e.value);this.viewModel.spacing=t,t!==this.viewModel.spacing&&(e.value=`${this.viewModel.spacing}`)}}),l?g(`calcite-tooltip`,{overlayPositioning:`fixed`,placement:`leading`,referenceElement:u,topLayerDisabled:this.topLayerDisabled},n(this.messages.warnings.dynamicSpacing,{actualSpacingIncludingUnit:s(this.messagesUnits,r,a,2,`plural`)})):void 0)):void 0,g(`calcite-label`,{key:`angle-label`,scale:`s`},this.messages.inputLabel.angle,g(`calcite-input-number`,{disabled:!c,integer:!0,numberButtonType:`none`,suffixText:this.messagesUnits.units.degrees.abbr,value:`${x(e)}`,onCalciteInputNumberChange:({currentTarget:e})=>this.viewModel.rotation=b(e.value)}))])}_renderIntervalInput(){let{majorLineInterval:e,gridControlsEnabled:t}=this.viewModel;return g(`div`,{class:this.classes(w.numericInputsContainer)},g(`calcite-label`,{scale:`s`},this.messages.inputLabel.interval,g(`calcite-input-number`,{disabled:!t,integer:!0,max:15,min:1,numberButtonType:`vertical`,value:`${e}`,onCalciteInputNumberChange:({currentTarget:e})=>{let t=Number.parseInt(e.value,10);this.viewModel.majorLineInterval=t,t!==this.viewModel.majorLineInterval&&(e.value=`${this.viewModel.majorLineInterval}`)}})))}_renderSnappingToggle(){let{snappingOptions:e,gridControlsEnabled:t}=this.viewModel,n=e?.gridEnabled??!1;return g(h,{checked:!!n,disabled:!(t&&e),key:`grid-snap-enabled-toggle`,label:this.messages.switchLabel.snap,topLayerDisabled:this.topLayerDisabled,onChange:e=>this.viewModel.snappingOptions?.set(`gridEnabled`,e)})}_renderDynamicScaleToggle(){let{viewModel:e,messages:t}=this,n=this.visibleElements.outOfScaleWarning&&e.gridOutOfScale;return g(h,{checked:e.dynamicScaling,disabled:!e.gridControlsEnabled,hint:n?t.warnings.outOfScale:void 0,hintIcon:T.warning,hintKind:`warning`,key:`grid-dynamic-scale-toggle-${this.id}`,label:t.switchLabel.scaling,topLayerDisabled:this.topLayerDisabled,onChange:t=>e.dynamicScaling=t})}_renderRotateToggle(){let{gridControlsEnabled:e,rotateWithMap:t}=this.viewModel;return g(h,{checked:t,disabled:!e,key:`grid-rotate-map-toggle`,label:this.messages.switchLabel.rotateWithMap,topLayerDisabled:this.topLayerDisabled,onChange:e=>this.viewModel.rotateWithMap=e})}_renderEnabledToggle(){return g(`div`,{class:w.borderedSwitch},g(h,{checked:this.viewModel.displayEnabled,disabled:!!this.viewModel.interactivePlacementState,key:`grid-enabled-toggle`,label:this.messages.switchLabel.display,topLayerDisabled:this.topLayerDisabled,onChange:e=>this.viewModel.trySetDisplayEnabled(e)}))}_renderColorSelection(){let{customColor:e}=this,n=`${this.id}--custom-grid-color-button`;return g(`calcite-label`,{scale:`s`},this.messages.inputLabel.theme,g(`div`,{class:w.tilegroup},[this._renderThemeTile({value:`dark`}),this._renderThemeTile({value:`light`}),this._renderThemeTile({value:`custom`,id:n}),g(`calcite-popover`,{closable:!0,heading:this.messages.colorInputHeading,label:this.messages.gridLineColorPopoverLabel,overlayPositioning:`fixed`,referenceElement:n,topLayerDisabled:this.topLayerDisabled},g(`calcite-color-picker`,{alphaChannel:!0,savedDisabled:!0,value:e?.toHex({digits:8})??`#000000ff`,onCalciteColorPickerChange:e=>{let n=t.fromHex(e.currentTarget.value);n&&(this.customColor=n,this.theme=`custom`)}}))]))}_renderThemeTile(e){let{theme:t}=this,{value:n}=e,r=this.messages.gridTheme[n],i=`${this.id}--theme_tile_${n}`,a=`${i}__label`,o=T.gridTheme[n],s=this.viewModel.gridControlsEnabled;return g(`div`,{class:_({[w.tile]:!0,[w.tileDisabled]:!s}),id:e.id,role:`button`},g(`input`,{"aria-labelledby":a,checked:t===n,disabled:!s,id:i,name:`${this.id}--theme`,tabIndex:0,type:`radio`,onchange:e=>{this.theme=n,e.target?.focus()}}),g(`div`,{class:w.tileContent},g(`calcite-icon`,{icon:o,scale:`l`}),g(`calcite-label`,{for:i,id:a},r)))}};e([c({type:t})],k.prototype,`customColor`,void 0),e([c()],k.prototype,`icon`,null),e([c()],k.prototype,`label`,null),e([c(),v(`esri/widgets/support/GridControls/t9n/GridControls`)],k.prototype,`messages`,void 0),e([c(),v(`esri/core/t9n/Units`)],k.prototype,`messagesUnits`,void 0),e([c()],k.prototype,`snappingManager`,null),e([c({type:u})],k.prototype,`snappingOptions`,null),e([c()],k.prototype,`theme`,null),e([c()],k.prototype,`view`,null),e([c({type:y})],k.prototype,`viewModel`,void 0),e([c({type:S,nonNullable:!0})],k.prototype,`visibleElements`,void 0),k=e([l(`esri.widgets.support.GridControls`)],k);const A=k;export{A as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{getLocale as e}from"../../intl.js";import t from"../../core/Error.js";import{clamp as n}from"../../core/mathUtils.js";import{formatTimestamp as r,formatTimeOnly as i,formatDateOnly as a,formatDate as o,convertDateFormatToIntlOptions as s}from"../../intl/date.js";import{timestampOffsetToDateTime as c,timeOnlyToDateTime as l,dateOnlyToDateTime as u,TimeStampOffsetPattern as d,defaultDatePattern as f,defaultTimePattern as p}from"../../support/dateUtils.js";import{isString as m,isNumber as h}from"../../support/guards.js";import{utc as g}from"../../time/constants.js";import{DateTime as _,FixedOffsetZone as v}from"luxon";const y=g,b={date:null,time:null,timeZoneOffset:null},x=new Map([[`hours`,3600],[`minutes`,60],[`seconds`,1],[`deciseconds`,.1],[`centiseconds`,.01],[`milliseconds`,.001]]),S=`latn`,C=e=>`valueAsDate`in e;function w(t){return{locale:e(),numberingSystem:S,zone:t??y}}function T(e){return e?.isValid?e.toMillis():null}function E(e,t){return e==null?null:_.fromMillis(e,w(t))}function D(e,t){if(e==null||!m(e)||e===``){if(t){let e=_.local({zone:t});return{date:null,time:null,timeZoneOffset:e.isValid?e.offset.toString():null}}return b}let n=_.fromISO(e,{setZone:!0});return{date:n.toFormat(f,w()),time:n.toFormat(d.HMS_MS,w()),timeZoneOffset:n.offset.toString()}}function O(e,t){if(e==null||!h(e)||isNaN(e))return b;let n=E(e,t);return n?{date:n.toFormat(f,w(t)),time:n.toFormat(p,w(t))}:b}function k(e){switch(e.type){case`date`:return s(`short-date-short-time`);case`date-only`:return s(`short-date`);case`time-only`:return s(`short-time`);case`timestamp-offset`:return{...s(`short-date-short-time`),timeZone:void 0,timeZoneName:`short`};default:return s(`short-date-short-time`)}}function A(e,t,n){if(!e||t==null)return null;switch(e.type){case`date`:return o(t,n);case`date-only`:return a(t,n);case`time-only`:return i(t,n);case`timestamp-offset`:return r(t,n);default:return null}}function j(e){let{dateComponent:t,defaultTimeZone:n,timeComponent:r,timeZoneComponent:i,oldValue:a}=e;if(!t?.value)return null;let{year:o,month:s,day:c}=_.fromFormat(t.value,f),{hour:l,minute:u,second:d,millisecond:p}=F(r,g)??_.now(),m=D(a,n),h=i?.value===``?null:i?.value,y=h?parseInt(h,10):m.timeZoneOffset==null?new Date().getTimezoneOffset():parseInt(m.timeZoneOffset,10),b=v.instance(y),x=_.fromObject({year:o,month:s,day:c,hour:l,minute:u,second:d,millisecond:p},{zone:b});return x.isValid?x.toISO({includeOffset:!0}):null}function M(e,t=`system`){return _.fromJSDate(e,{zone:t}).isInDST}function N(e){return Math.round((e??Date.now())/1e3)*1e3}function P(e){let{dateComponent:t,timeComponent:n,timeZone:r,max:i,min:a,oldValue:o,fallbackOverride:s}=e,c=F(t,r),l=!!e.applyRange;if(!c)return null;let u=N(s),d=null;if(n?.value!=null){let e=F(n,r),t=i!=null&&i<u?i:u,a=_.fromMillis(t,w(r)),o=c||a,{year:s,month:l,day:f}=o,{hour:p,minute:m,second:h,millisecond:g}=e||a;d=o.set({year:s,month:l,day:f,hour:p,minute:m,second:h,millisecond:g})}else{let e=E(L({value:o??u,max:i,min:a}),r),{year:t,month:n,day:s}=c,{hour:f,minute:p,second:m,millisecond:h}=e;l=!0,d=c.set({year:t,month:n,day:s,hour:f,minute:p,second:m,millisecond:h})}if(!d.isValid)return null;let f=d.toMillis();return l?L({value:f,max:i,min:a}):f}function F(e,t){if(e?.value==null||Array.isArray(e.value))return null;let n=null;return n=C(e)?_.fromFormat(e.value,f,w(t)):l(e.value),n?.isValid?n:null}function I(e){let{max:t,min:n,value:r}=e;return!(isNaN(r)||t!=null&&r>t||n!=null&&r<n)}function L(e){let{max:t,min:r,value:i}=e;return t!=null&&r!=null?n(i,r,t):t!=null&&i>t?t:r!=null&&i<r?r:i}function R(e){if(!e)return``;let n=e.split(`.`).at(0);if(!n||n.length<1)throw new t(`invalid time-only field`,`Cannot parse valid time-only field value from ${e}`);let r=n.split(`:`),i=[,,,];for(let e=0;e<3;e++){let t=r.at(e)??``;i[e]=t.padStart(2,`0`)}return i.join(`:`)}function z(e,t){switch(t){case`date`:return e.getTime();case`date-only`:return e.toISODate();case`time-only`:return R(e.toISOTime(!0,!1));case`timestamp-offset`:return e.toISOString(!1);default:return null}}function B(e){return!!e&&typeof e==`object`&&`getTime`in e&&`toISOString`in e&&`timeZone`in e}function V(e){let{type:t,range:n,value:r}=e;if(r==null||!n||r===n.min||r===n.max)return!0;if(t===`date`)return I({value:r,min:n.min,max:n.max});let{rawMax:i,rawMin:a}=n,o=null,s=null,d=null;switch(t){case`date-only`:o=u(i),s=u(a),d=u(r);break;case`time-only`:o=l(i),s=l(a),d=l(r);break;case`timestamp-offset`:o=c(i),s=c(a),d=c(r)}return!d||I({value:d.valueOf(),min:s?.valueOf(),max:o?.valueOf()})}export{z as arcadeDateToFieldValue,L as clampValueToRange,E as createDateTimeFromFieldValue,V as dateTimeIsInRange,T as dateTimeToFieldValue,w as getDefaultLocaleOptions,j as getISOFieldValueFromDateComponents,k as getIntlOptionsForField,A as getLabelForDateFieldValue,F as getLocalDateTimeFromComponent,N as getTimeFallback,P as getUnixFieldValueFromDateComponents,B as isArcadeDate,C as isCalciteDateComponent,M as isInDST,R as normalizeTimeOnlyString,S as numberingSystem,D as prepareISOFieldValueForDateComponents,O as prepareUnixFieldValueForDateComponents,x as timeResolutionToStepMap,I as valueIsInRange};
2
+ import{getLocale as e}from"../../intl.js";import t from"../../core/Error.js";import{clamp as n}from"../../core/mathUtils.js";import{formatTimestamp as r,formatTimeOnly as i,formatDateOnly as a,formatDate as o,convertDateFormatToIntlOptions as s}from"../../intl/date.js";import{timestampOffsetToDateTime as c,timeOnlyToDateTime as l,dateOnlyToDateTime as u,TimeStampOffsetPattern as d,defaultDatePattern as f,defaultTimePattern as p}from"../../support/dateUtils.js";import{isString as m,isNumber as h}from"../../support/guards.js";import{utc as g}from"../../time/constants.js";import{DateTime as _,FixedOffsetZone as v}from"luxon";const y=g,b={date:null,time:null,timeZoneOffset:null},x=new Map([[`hours`,3600],[`minutes`,60],[`seconds`,1],[`deciseconds`,.1],[`centiseconds`,.01],[`milliseconds`,.001]]),S=`latn`,C=e=>`valueAsDate`in e;function w(t){return{locale:e(),numberingSystem:S,zone:t??y}}function T(e){return e?.isValid?e.toMillis():null}function E(e,t){return e==null?null:_.fromMillis(e,w(t))}function D(e,t){if(e==null||!m(e)||e===``){if(t){let e=_.local({zone:t});return{date:null,time:null,timeZoneOffset:e.isValid?e.offset.toString():null}}return b}let n=_.fromISO(e,{setZone:!0});return{date:n.toFormat(f,w()),time:n.toFormat(d.HMS_MS,w()),timeZoneOffset:n.offset.toString()}}function O(e,t){if(e==null||!h(e)||isNaN(e))return b;let n=E(e,t);return n?{date:n.toFormat(f,w(t)),time:n.toFormat(p,w(t))}:b}function k(e){switch(e.type){case`date`:return s(`short-date-short-time`);case`date-only`:return s(`short-date`);case`time-only`:return s(`short-time`);case`timestamp-offset`:return{...s(`short-date-short-time`),timeZone:void 0,timeZoneName:`short`};default:return s(`short-date-short-time`)}}function A(e,t,n){if(!e||t==null)return null;switch(e.type){case`date`:return o(t,n);case`date-only`:return a(t,n);case`time-only`:return i(t,n);case`timestamp-offset`:return r(t,n);default:return null}}function j(e){let{dateComponent:t,defaultTimeZone:n,timeComponent:r,timeZoneComponent:i,oldValue:a}=e;if(!t?.value)return null;let{year:o,month:s,day:c}=_.fromFormat(t.value,f),{hour:l,minute:u,second:d,millisecond:p}=F(r,g)??_.now(),m=D(a,n),h=i?.value===``?null:i?.value,y=h?parseInt(h,10):m.timeZoneOffset==null?new Date().getTimezoneOffset():parseInt(m.timeZoneOffset,10),b=v.instance(y),x=_.fromObject({year:o,month:s,day:c,hour:l,minute:u,second:d,millisecond:p},{zone:b});return x.isValid?x.toISO({includeOffset:!0}):null}function M(e,t=`system`){return _.fromJSDate(e,{zone:t}).isInDST}function N(e){return Math.round((e??Date.now())/1e3)*1e3}function P(e){let{dateComponent:t,timeComponent:n,timeZone:r,max:i,min:a,oldValue:o,fallbackOverride:s}=e,c=F(t,r),l=!!e.applyRange;if(!c)return null;let u=N(s),d=null;if(n?.value!=null){let e=F(n,r),t=i!=null&&i<u?i:u,a=_.fromMillis(t,w(r)),o=c||a,{year:s,month:l,day:f}=o,{hour:p,minute:m,second:h,millisecond:g}=e||a;d=o.set({year:s,month:l,day:f,hour:p,minute:m,second:h,millisecond:g})}else{let e=E(L({value:o??u,max:i,min:a}),r),{year:t,month:n,day:s}=c,{hour:f,minute:p,second:m,millisecond:h}=e;l=!0,d=c.set({year:t,month:n,day:s,hour:f,minute:p,second:m,millisecond:h})}if(!d.isValid)return null;let f=d.toMillis();return l?L({value:f,max:i,min:a}):f}function F(e,t){if(e?.value==null||Array.isArray(e.value))return null;let n=null;return n=C(e)?_.fromFormat(e.value,f,w(t)):l(e.value),n?.isValid?n:null}function I(e){let{max:t,min:n,value:r}=e;return!(isNaN(r)||t!=null&&r>t||n!=null&&r<n)}function L(e){let{max:t,min:r,value:i}=e;return t!=null&&r!=null?n(i,r,t):t!=null&&i>t?t:r!=null&&i<r?r:i}function R(e){if(!e)return``;let n=e.split(`.`,1).at(0);if(!n||n.length<1)throw new t(`invalid time-only field`,`Cannot parse valid time-only field value from ${e}`);let r=n.split(`:`),i=[,,,];for(let e=0;e<3;e++){let t=r.at(e)??``;i[e]=t.padStart(2,`0`)}return i.join(`:`)}function z(e,t){switch(t){case`date`:return e.getTime();case`date-only`:return e.toISODate();case`time-only`:return R(e.toISOTime(!0,!1));case`timestamp-offset`:return e.toISOString(!1);default:return null}}function B(e){return!!e&&typeof e==`object`&&`getTime`in e&&`toISOString`in e&&`timeZone`in e}function V(e){let{type:t,range:n,value:r}=e;if(r==null||!n||r===n.min||r===n.max)return!0;if(t===`date`)return I({value:r,min:n.min,max:n.max});let{rawMax:i,rawMin:a}=n,o=null,s=null,d=null;switch(t){case`date-only`:o=u(i),s=u(a),d=u(r);break;case`time-only`:o=l(i),s=l(a),d=l(r);break;case`timestamp-offset`:o=c(i),s=c(a),d=c(r)}return!d||I({value:d.valueOf(),min:s?.valueOf(),max:o?.valueOf()})}export{z as arcadeDateToFieldValue,L as clampValueToRange,E as createDateTimeFromFieldValue,V as dateTimeIsInRange,T as dateTimeToFieldValue,w as getDefaultLocaleOptions,j as getISOFieldValueFromDateComponents,k as getIntlOptionsForField,A as getLabelForDateFieldValue,F as getLocalDateTimeFromComponent,N as getTimeFallback,P as getUnixFieldValueFromDateComponents,B as isArcadeDate,C as isCalciteDateComponent,M as isInDST,R as normalizeTimeOnlyString,S as numberingSystem,D as prepareISOFieldValueForDateComponents,O as prepareUnixFieldValueForDateComponents,x as timeResolutionToStepMap,I as valueIsInRange};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7237],{11006(t,e,i){function n(t,e,i,n,s){r(t,e,i||0,n||t.length-1,s||o)}function r(t,e,i,n,o){for(;n>i;){if(n-i>600){var l=n-i+1,h=e-i+1,a=Math.log(l),u=.5*Math.exp(2*a/3),f=.5*Math.sqrt(a*u*(l-u)/l)*(h-l/2<0?-1:1);r(t,e,Math.max(i,Math.floor(e-h*u/l+f)),Math.min(n,Math.floor(e+(l-h)*u/l+f)),o)}var c=t[e],d=i,y=n;for(s(t,i,e),o(t[n],c)>0&&s(t,i,n);d<y;){for(s(t,d,y),d++,y--;o(t[d],c)<0;)d++;for(;o(t[y],c)>0;)y--}0===o(t[i],c)?s(t,i,y):s(t,++y,n),y<=e&&(i=y+1),e<=y&&(n=y-1)}}function s(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function o(t,e){return t<e?-1:+(t>e)}i.d(e,{q:()=>n})},69540(t,e,i){var n=i(32198),r=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(88620),h=i(64108);const a=Symbol("ClonableMixin"),u=t=>{var e;let i=t,r=class extends i{constructor(){super(...arguments),this[e]=!0}static{e=a}clone(t){let e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");let i=e.metadata,n=e.store,r={},h=new Map;for(let e in i){let o=i[e],l=n?.originOf(e),a=o.clonable;if(o.readOnly||!1===a||7!==l&&0!==l&&5!==l&&4!==l)continue;let u=this[e],f=null;if("function"==typeof a)f=a(u,t);else if("reference"===a)f=u;else if(f=(0,s.TU)(u,t),null!=u&&null==f)continue;0===l?h.set(e,f):r[e]=f}let a=new(0,Object.getPrototypeOf(this).constructor)(r);if(h.size){let t=(0,l.oY)(a)?.store;if(t)for(let[e,i]of h)t.set(e,i,0)}return a}};return r=(0,n.Cg)([(0,h.$)("esri.core.Clonable")],r),r},f=u(r.A);i.d(e,["OU",0,u,"Pw",0,f])},67482(t,e,i){function n(t){return null!==r(t)}function r(t){return function(t){let e=s.exec(t);if(!e?.groups)return null;let i=e.groups,n=+i.year,r=i.month-1,o=+i.day,l=+(i.hours??"0"),h=+(i.minutes??"0"),a=+(i.seconds??"0");if(l>23||h>59||a>59)return null;let u,f=i.ms??"0",c=f?+f.padEnd(3,"0").slice(0,3):0;if(i.isUTC||!i.offsetSign)u=Date.UTC(n,r,o,l,h,a,c);else{let t=+i.offsetHours,e=+i.offsetMinutes;u=6e4*("+"===i.offsetSign?-1:1)*(60*t+e)+Date.UTC(n,r,o,l,h,a,c)}return Number.isNaN(u)?null:u}(t)??function(t){let e=new Date(t),i=e.getTime();return Number.isNaN(i)?null:t.toLowerCase()===e.toUTCString().toLowerCase()?i:null}(t)??function(t){if(!o.test(t))return null;let e=new Date(t);return Number.isNaN(e.getTime())?null:e.getTime()-6e4*e.getTimezoneOffset()}(t)}i.d(e,{C:()=>n,_:()=>r});const s=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,o=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(t,e,i){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}i.d(e,{o8:()=>r,vt:()=>n});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:n,fromValues:function(t,e,i,n,r,s,o,l,h,a,u,f,c,d,y,m){return[t,e,i,n,r,s,o,l,h,a,u,f,c,d,y,m]}},Symbol.toStringTag,{value:"Module"})),i.d(e,["zK",0,s])},35522(t,e,i){i.d(e,{$A:()=>T,Bw:()=>s,C:()=>o,Cc:()=>P,DI:()=>b,Io:()=>g,Ln:()=>_,Om:()=>I,Qr:()=>f,Re:()=>a,S8:()=>v,T9:()=>m,WQ:()=>h,Z0:()=>A,_S:()=>d,aI:()=>G,ei:()=>B,fw:()=>R,gL:()=>S,hG:()=>x,hZ:()=>l,hs:()=>p,jk:()=>y,lw:()=>u,m3:()=>M,oW:()=>O,t2:()=>Z,tn:()=>c,ze:()=>w});var n=i(51850),r=i(34304);function s(t){let e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function l(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t}function h(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function a(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function u(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function f(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function c(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function m(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function p(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function _(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t}function g(t,e){let i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(i*i+n*n+r*r)}function x(t,e){let i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return i*i+n*n+r*r}function M(t){let e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function w(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function b(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function v(t,e=t){let i=e[0],n=e[1],r=e[2],s=i*i+n*n+r*r;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s),t}function I(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function T(t,e,i){let n=e[0],r=e[1],s=e[2],o=i[0],l=i[1],h=i[2];return t[0]=r*h-s*l,t[1]=s*o-n*h,t[2]=n*l-r*o,t}function P(t,e,i,n){let r=e[0],s=e[1],o=e[2];return t[0]=r+n*(i[0]-r),t[1]=s+n*(i[1]-s),t[2]=o+n*(i[2]-o),t}function A(t,e,i){let n=e[0],r=e[1],s=e[2];return t[0]=i[0]*n+i[4]*r+i[8]*s+i[12],t[1]=i[1]*n+i[5]*r+i[9]*s+i[13],t[2]=i[2]*n+i[6]*r+i[10]*s+i[14],t}function B(t,e,i){let n=e[0],r=e[1],s=e[2];return t[0]=n*i[0]+r*i[3]+s*i[6],t[1]=n*i[1]+r*i[4]+s*i[7],t[2]=n*i[2]+r*i[5]+s*i[8],t}function S(t,e,i){return R(t,e,i[0],i[1],i[2],i[3])}function R(t,e,i,n,r,s){let o=e[0],l=e[1],h=e[2],a=n*h-r*l,u=r*o-i*h,f=i*l-n*o,c=n*f-r*u,d=r*a-i*f,y=i*u-n*a,m=2*s;return t[0]=o+a*m+2*c,t[1]=l+u*m+2*d,t[2]=h+f*m+2*y,t}const C=(0,n.vt)(),F=(0,n.vt)();function Z(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function G(t,e){if(t===e)return!0;let i=t[0],n=t[1],s=t[2],o=e[0],l=e[1],h=e[2],a=(0,r.FD)();return Math.abs(i-o)<=a*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-l)<=a*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(s-h)<=a*Math.max(1,Math.abs(s),Math.abs(h))}function O(t,e,i){let n=i[0]-e[0],r=i[1]-e[1],s=i[2]-e[2],o=n*n+r*r+s*s;return o>0?(o=1/Math.sqrt(o),t[0]=n*o,t[1]=r*o,t[2]=s*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const j=a,q=u,N=f,Y=g,z=x,X=s,k=M;Object.freeze(Object.defineProperty({__proto__:null,abs:c,add:h,angle:function(t,e){v(C,t),v(F,e);let i=I(C,F);return i>1?0:i<-1?Math.PI:Math.acos(i)},applyTranslation:function(t,e,i){return t[0]=e[0]+i[12],t[1]=e[1]+i[13],t[2]=e[2]+i[14],t},bezier:function(t,e,i,n,r,s){let o=1-s,l=o*o,h=s*s,a=l*o,u=3*s*l,f=3*h*o,c=h*s;return t[0]=e[0]*a+i[0]*u+n[0]*f+r[0]*c,t[1]=e[1]*a+i[1]*u+n[1]*f+r[1]*c,t[2]=e[2]*a+i[2]*u+n[2]*f+r[2]*c,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,i=1){return t[0]=Math.min(Math.max(t[0],e),i),t[1]=Math.min(Math.max(t[1],e),i),t[2]=Math.min(Math.max(t[2],e),i),t},copy:o,cross:T,crossAndNormalize:function(t,e,i){let n=e[0],r=e[1],s=e[2],o=i[0],l=i[1],h=i[2],a=r*h-s*l,u=s*o-n*h,f=n*l-r*o,c=Math.sqrt(a*a+u*u+f*f);return t[0]=a/c,t[1]=u/c,t[2]=f/c,t},direction:O,dist:Y,distance:g,div:N,divide:f,dot:I,equals:G,exactEquals:Z,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,i,n,r,s){let o=s*s,l=o*(2*s-3)+1,h=o*(s-2)+s,a=o*(s-1),u=o*(3-2*s);return t[0]=e[0]*l+i[0]*h+n[0]*a+r[0]*u,t[1]=e[1]*l+i[1]*h+n[1]*a+r[1]*u,t[2]=e[2]*l+i[2]*h+n[2]*a+r[2]*u,t},inverse:b,len:X,length:s,lerp:P,max:m,min:y,mul:q,multiply:u,negate:w,normalize:v,random:function(t,e=1){let i=r.Ov,n=2*i()*Math.PI,s=2*i()-1,o=Math.sqrt(1-s*s)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=s*e,t},rotateX:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[0],s[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),s[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},rotateY:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),s[1]=r[1],s[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},rotateZ:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),s[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),s[2]=r[2],t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:p,scaleAndAdd:_,scaleTo:function(t,e){return p(t,t,e/X(t))},set:l,sign:d,sqrDist:z,sqrLen:k,squaredDistance:x,squaredLength:M,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:j,subtract:a,transformMat3:B,transformMat4:A,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:S,transformQuatValues:R},Symbol.toStringTag,{value:"Module"})),i.d(e,["Il",0,X,"jb",0,j,"lo",0,z,"uE",0,k])},75503(t,e,i){i.d(e,{wq:()=>l});var n=i(4576),r=i(21818),s=(i(44208),i(15142)),o=i(11006);class l{constructor(t=9,e){this._compareMinX=c,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),w.prune(),b.prune(),v.prune(),I.prune()}all(t){h(this._data,t)}search(t,e){let i=this._data,n=this._toBBox;if(x(t,i))for(w.clear();i;){for(let r=0,s=i.children.length;r<s;r++){let s=i.children[r],o=i.leaf?n(s):s;x(t,o)&&(i.leaf?e(s):g(t,o)?h(s,e):w.push(s))}i=w.pop()}}collides(t){let e=this._data,i=this._toBBox;if(!x(t,e))return!1;for(w.clear();e;){for(let n=0,r=e.children.length;n<r;n++){let r=e.children[n],s=e.leaf?i(r):r;if(x(t,s)){if(e.leaf||g(t,s))return!0;w.push(r)}}e=w.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){let t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(t){if(!t)return this;let e,i=this._data,s=null,o=0,l=!1,h=this._toBBox(t);for(v.clear(),I.clear();i||v.length>0;){if(i||(i=v.pop(),s=v.data[v.length-1],o=I.pop()??0,l=!0),i.leaf&&(e=(0,n.qh)(i.children,(0,r.z)(t),i.children.length,i.indexHint),-1!==e))return i.children.splice(e,1),v.push(i),this._condense(v),this;l||i.leaf||!g(i,h)?s?(o++,i=s.children[o],l=!1):i=null:(v.push(i),I.push(o),o=0,s=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,i,n){let r=i-e+1,s=this._maxEntries;if(r<=s){let n=new A(t.slice(e,i+1));return a(n,this._toBBox),n}n||(n=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(n-1)));let o=new B([]);o.height=n;let l=Math.ceil(r/s),h=l*Math.ceil(Math.sqrt(s));M(t,e,i,h,this._compareMinX);for(let r=e;r<=i;r+=h){let e=Math.min(r+h-1,i);M(t,r,e,l,this._compareMinY);for(let i=r;i<=e;i+=l){let r=Math.min(i+l-1,e);o.children.push(this._build(t,i,r,n-1))}}return a(o,this._toBBox),o}_insert(t,e,i){let n=this._toBBox,r=i?t:n(t);v.clear();let s=function(t,e,i,n){for(;n.push(e),!0!==e.leaf&&n.length-1!==i;){let i,n=1/0,r=1/0;for(let s=0,o=e.children.length;s<o;s++){let o=e.children[s],l=y(o),h=p(t,o)-l;h<r?(r=h,n=l<n?l:n,i=o):h===r&&l<n&&(n=l,i=o)}e=i||e.children[0]}return e}(r,this._data,e,v);for(s.children.push(t),f(s,r);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;!function(t,e,i){for(let n=i;n>=0;n--)f(e.data[n],t)}(r,v,e)}_split(t,e){let i=t.data[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);let s=this._chooseSplitIndex(i,r,n);if(!s)return;let o=i.children.splice(s,i.children.length-s),l=i.leaf?new A(o):new B(o);l.height=i.height,a(i,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(i,l)}_splitRoot(t,e){this._data=new B([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,i){let n,r,s;n=r=1/0;for(let o=e;o<=i-e;o++){let e=u(t,0,o,this._toBBox),l=u(t,o,i,this._toBBox),h=_(e,l),a=y(e)+y(l);h<n?(n=h,s=o,r=a<r?a:r):h===n&&a<r&&(r=a,s=o)}return s}_chooseSplitAxis(t,e,i){let n=t.leaf?this._compareMinX:c,r=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);let r=this._toBBox,s=u(t,0,e,r),o=u(t,i-e,i,r),l=m(s)+m(o);for(let n=e;n<i-e;n++){let e=t.children[n];f(s,t.leaf?r(e):e),l+=m(s)}for(let n=i-e-1;n>=e;n--){let e=t.children[n];f(o,t.leaf?r(e):e),l+=m(o)}return l}_condense(t){for(let e=t.length-1;e>=0;e--){let i=t.data[e];if(0===i.children.length)if(e>0){let r=t.data[e-1],s=r.children;s.splice((0,n.qh)(s,i,s.length,r.indexHint),1)}else this.clear();else a(i,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function h(t,e){let i=t;for(b.clear();i;){if(!0===i.leaf)for(let t of i.children)e((0,r.z)(t));else b.pushArray(i.children);i=b.pop()??null}}function a(t,e){u(t,0,t.children.length,e,t)}function u(t,e,i,n,r){r||=new A([]),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=e;o<i;o++)s=t.children[o],f(r,t.leaf?n(s):s);return r}function f(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function y(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function m(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function _(t,e){let i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),s=Math.min(t.maxY,e.maxY);return Math.max(0,r-i)*Math.max(0,s-n)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function x(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,i,n,r){let s=[e,i];for(;s.length;){let e=s.pop(),i=s.pop();if(e-i<=n)continue;let l=i+Math.ceil((e-i)/n/2)*n;(0,o.q)(t,l,i,e,r),s.push(i,l,l,e)}}const w=new s.A,b=new s.A,v=new s.A,I=new s.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class B extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},69397(t,e,i){i.d(e,{Qf:()=>h,Qh:()=>o,lM:()=>s,ro:()=>a,rq:()=>u});var n=i(44208),r=i(34275);function s(t){if(!t)return 0;let e=f;for(let i in t)t.hasOwnProperty(i)&&(e+=l(t[i],!1));return e}function o(t){if(!t)return 0;if("number"==typeof t[0])return h(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return u(t,8);let i=c;for(let n=0;n<e;n++)i+=l(t[n]);return i}(t);let e=f;for(let i in t)t.hasOwnProperty(i)&&(e+=l(t[i]));return e}function l(t,e=!0){switch(typeof t){case"object":return e?o(t):f;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function h(...t){return t.reduce((t,e)=>t+a(e),0)}function a(t,e=16){return t?(0,r.iu)(t)?t.byteLength+y:Array.isArray(t)?u(t,e):0:0}function u(t,e){return c+t.length*e}const f=32,c=16,d=(0,n.A)("ios")||!(0,n.A)("chrome")&&!(0,n.A)("opr")?8:4,y=145;i.d(e,["JY",0,d])},48526(t,e,i){i.d(e,{A:()=>p});var n,r=i(32198),s=i(4576),o=i(4718),l=i(91429),h=i(5443),a=i(91075),u=i(86738),f=i(16930),c=i(90634),d=i(47610),y=i(56993),m=i(43937);let p=n=class extends a.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:i,hasZ:n,spatialReference:r}=t;switch(e??=[],e?.at(0)?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=f.A.WGS84,{...t,hasM:i,hasZ:n,points:e,spatialReference:r}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let t=(0,c.ge)(this);return t?new h.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,o.o8)(this.points)}clone(){let{points:t,spatialReference:e,hasM:i,hasZ:r}=this;return new n({points:(0,o.o8)(t),spatialReference:e.clone(),hasM:i,hasZ:r})}equals(t){if(this===t)return!0;if(null==t)return!1;let e=this.spatialReference,i=t.spatialReference;return!(null!=e!=(null!=i)||null!=e&&null!=i&&!e.equals(i))&&(0,s.aI)(this.points,t.points,d.v6)}addPoint(t){return(0,y.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;let e=this.points[t],i={x:e[0],y:e[1],spatialReference:this.spatialReference},n=2;return this.hasZ&&(i.z=e[2],n=3),this.hasM&&(i.m=e[n]),new u.A(i)}removePoint(t){if(!this._validateInputs(t))return null;let[e,i,n,r]=this.points.splice(t,1)[0],s=new u.A({x:e,y:i,z:n,m:r,spatialReference:this.spatialReference});return this.notifyChange("points"),s}setPoint(t,e){return this._validateInputs(t)&&((0,y.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points")),this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,r.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,r.Cg)([(0,l.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],p.prototype,"points",void 0),(0,r.Cg)([(0,m.K)("points")],p.prototype,"writePoints",null),p=n=(0,r.Cg)([(0,l.$K)("esri.geometry.Multipoint")],p),p.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,i){i.d(e,{A:()=>y});var n,r=i(32198),s=i(4718),o=i(91429),l=i(5443),h=i(91075),a=i(86738),u=i(16930),f=i(90634),c=i(56993),d=i(43937);let y=n=class extends h.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:i,hasZ:n,spatialReference:r}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=u.A.WGS84,{...t,hasM:i,hasZ:n,paths:e,spatialReference:r}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,s.o8)(t)}get extent(){let t=(0,f.Z3)(this),{spatialReference:e}=this;return t?new l.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,s.o8)(this.paths)}addPath(t){if(!t)return;let e=this.paths,i=e.length;if(function(t){return!Array.isArray(t[0])}(t)){let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e].toArray();e[i]=n}else e[i]=t.slice();return this.notifyChange("paths"),this}clone(){let t=new n;return t.spatialReference=this.spatialReference,t.paths=(0,s.o8)(this.paths),t.curvePaths=(0,s.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;let i=this.paths[t][e],n=this.hasZ,r=this.hasM;return n&&!r?new a.A({x:i[0],y:i[1],z:i[2],spatialReference:this.spatialReference}):r&&!n?new a.A({x:i[0],y:i[1],m:i[2],spatialReference:this.spatialReference}):n&&r?new a.A({x:i[0],y:i[1],z:i[2],m:i[3],spatialReference:this.spatialReference}):new a.A({x:i[0],y:i[1],spatialReference:this.spatialReference})}insertPoint(t,e,i){return this._validateInputs(t,e,!0)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t].splice(e,0,i),this.notifyChange("paths")),this}removePath(t){if(!this._validateInputs(t,null))return null;let e=this.paths.splice(t,1)[0],i=this.spatialReference,n=e.map(t=>new a.A({x:t[0],y:t[1],z:t[2],m:t[3],spatialReference:i}));return this.notifyChange("paths"),n}removePoint(t,e){if(!this._validateInputs(t,e))return null;let[i,n,r,s]=this.paths[t].splice(e,1)[0],o=new a.A({x:i,y:n,z:r,m:s,spatialReference:this.spatialReference});return this.notifyChange("paths"),o}setPoint(t,e,i){return this._validateInputs(t,e)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t][e]=i,this.notifyChange("paths")),this}_validateInputs(t,e,i=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){let n=this.paths[t];if(i&&(e<0||e>n.length)||!i&&(e<0||e>=n.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],y.prototype,"curvePaths",void 0),(0,r.Cg)([(0,d.K)("curvePaths")],y.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],y.prototype,"paths",void 0),(0,r.Cg)([(0,d.K)("paths")],y.prototype,"writePaths",null),y=n=(0,r.Cg)([(0,o.$K)("esri.geometry.Polyline")],y),y.prototype.toJSON.isDefaultToJSON=!0},4197(t,e,i){i.d(e,{Vj:()=>o,cj:()=>s,jh:()=>r});var n=i(9093);function r(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function s(t){return[...t]}function o(t){let e=(0,n.vt)();for(let i=0;i<16;++i)e[i]=t[i];return e}},6774(t,e,i){i.d(e,{O3:()=>s,Ox:()=>o,bR:()=>n});class n{constructor(t,e){this.x=t,this.y=e}static fromArray(t){return new n(t[0],t[1])}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){return this.x=t,this.y=e,this}normalize(){let t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return this.x/=i,this.y/=i,this}rightPerpendicular(){let t=this.x;return this.x=this.y,this.y=-t,this}leftPerpendicular(){let t=this.x;return this.x=-this.y,this.y=t,this}move(t,e){return this.x+=t,this.y+=e,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}assignSub(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}rotate(t,e){let i=this.x,n=this.y;return this.x=i*t-n*e,this.y=i*e+n*t,this}rotateReverse(t,e){let i=this.x,n=this.y;return this.x=i*t+n*e,this.y=-i*e+n*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){let t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}sub(t){return this.x-=t.x,this.y-=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}static distance(t,e){let i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}class r{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class s{constructor(t,e,i,n=8,r=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=n,this._pixelMargin=r,this._tileSize=512*n,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;let i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new n(t,e),this._firstPt=new n(t,e),this._dist=0}lineTo(t,e){let i,s,o,l,h,a,u,f,c=this._isIn(t,e),d=new n(t,e),y=n.distance(this._prevPt,d);if(c)this._prevIsIn?this._lineTo(t,e,!0):(i=this._prevPt,s=d,o=this._intersect(s,i),this._start=this._dist+y*(1-this._r),this._lineTo(o.x,o.y,!0),this._lineTo(s.x,s.y,!0));else if(this._prevIsIn)s=this._prevPt,i=d,o=this._intersect(s,i),this._lineTo(o.x,o.y,!0),this._lineTo(i.x,i.y,!1);else{let t=this._prevPt,e=d;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{let i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(l=(this._xmin-t.x)/(e.x-t.x),f=t.y+l*(e.y-t.y),f<this._ymin?a=!1:f>this._ymax?a=!0:i.push(new r(l,this._xmin,f))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(l=(this._xmax-t.x)/(e.x-t.x),f=t.y+l*(e.y-t.y),f<this._ymin?a=!1:f>this._ymax?a=!0:i.push(new r(l,this._xmax,f))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(l=(this._ymin-t.y)/(e.y-t.y),u=t.x+l*(e.x-t.x),u<=this._xmin?h=!1:u>=this._xmax?h=!0:i.push(new r(l,u,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(l=(this._ymax-t.y)/(e.y-t.y),u=t.x+l*(e.x-t.x),u<=this._xmin?h=!1:u>=this._xmax?h=!0:i.push(new r(l,u,this._ymax))),0===i.length)h?a?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):a?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+y*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+y*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=y,this._prevIsIn=c,this._prevPt=d}close(){if(this._line.length>2){let t=this._firstPt,e=this._prevPt;(t.x!==e.x||t.y!==e.y)&&this.lineTo(t.x,t.y);let i=this._line,n=i.length;for(;n>=4&&(i[0].x===i[1].x&&i[0].x===i[n-2].x||i[0].y===i[1].y&&i[0].y===i[n-2].y);)i.pop(),i[0].x=i[n-2].x,i[0].y=i[n-2].y,--n}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(3===this._type&&t&&l.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(2!==this._type)throw Error("Only valid for lines");this._pushLine();let t=this._lines,e=t.length;if(0===e)return null;let i=[];for(let n=0;n<e;n++)i.push({line:t[n],start:this._starts[n]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,r,s;if(e.x>=this._xmin&&e.x<=this._xmax)r=e.y<=this._ymin?this._ymin:this._ymax,s=(r-t.y)/(e.y-t.y),i=t.x+s*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,s=(i-t.x)/(e.x-t.x),r=t.y+s*(e.y-t.y);else{r=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;let n=(i-t.x)/(e.x-t.x),o=(r-t.y)/(e.y-t.y);n<o?(s=n,r=t.y+n*(e.y-t.y)):(s=o,i=t.x+o*(e.x-t.x))}return this._r=s,new n(i,r)}_pushLine(){this._line&&(1===this._type?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):2===this._type?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):3===this._type&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){3===this._type?(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)),this._isH=!1,this._isV=!1):i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)))}_lineTo(t,e,i){let r,s;if(3!==this._type)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(r=this._line[this._line.length-1],r.equals(t,e)))return;this._line.push(new n(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){r=this._line[this._line.length-1];let i=r.x===t,o=r.y===e;if(i&&o)return;this._isH&&i||this._isV&&o?(r.x=t,r.y=e,s=this._line[this._line.length-2],s.x===t&&s.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(s=this._line[this._line.length-2],this._isH=s.x===t,this._isV=s.y===e)):(this._isH=s.x===t,this._isV=s.y===e)):(this._line.push(new n(t,e)),this._isH=i,this._isV=o)}else this._line.push(new n(t,e))}}class o{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];let i=this._ratio;this._line.push(new n(t*i,e*i))}lineTo(t,e){let i=this._ratio;this._line.push(new n(t*i,e*i))}close(){let t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}class l{static simplify(t,e,i){if(!i)return;let n=-e,r=t+e,s=-e,o=t+e,h=[],a=[],u=i.length;for(let t=0;t<u;++t){let e=i[t];if(!e||e.length<2)continue;let l,u=e[0],f=e.length;for(let i=1;i<f;++i)l=e[i],u.x===l.x&&(u.x<=n&&(u.y>l.y?(h.push(t),h.push(i),h.push(0),h.push(-1)):(a.push(t),a.push(i),a.push(0),a.push(-1))),u.x>=r&&(u.y<l.y?(h.push(t),h.push(i),h.push(1),h.push(-1)):(a.push(t),a.push(i),a.push(1),a.push(-1)))),u.y===l.y&&(u.y<=s&&(u.x<l.x?(h.push(t),h.push(i),h.push(2),h.push(-1)):(a.push(t),a.push(i),a.push(2),a.push(-1))),u.y>=o&&(u.x>l.x?(h.push(t),h.push(i),h.push(3),h.push(-1)):(a.push(t),a.push(i),a.push(3),a.push(-1)))),u=l}if(0===h.length||0===a.length)return;l.fillParent(i,a,h),l.fillParent(i,h,a);let f=[];l.calcDeltas(f,a,h),l.calcDeltas(f,h,a),l.addDeltas(f,i)}static fillParent(t,e,i){let n=i.length,r=e.length;for(let s=0;s<r;s+=4){let r=e[s],o=e[s+1],l=e[s+2],a=t[r][o-1],u=t[r][o],f=8092,c=-1;for(let e=0;e<n;e+=4){if(i[e+2]!==l)continue;let n=i[e],r=i[e+1],s=t[n][r-1],o=t[n][r];switch(l){case 0:case 1:if(h(a.y,s.y,o.y)&&h(u.y,s.y,o.y)){let t=Math.abs(o.y-s.y);t<f&&(f=t,c=e)}break;case 2:case 3:if(h(a.x,s.x,o.x)&&h(u.x,s.x,o.x)){let t=Math.abs(o.x-s.x);t<f&&(f=t,c=e)}}}e[s+3]=c}}static calcDeltas(t,e,i){let n=e.length;for(let r=0;r<n;r+=4){let n=l.calcDelta(r,e,i,[]);t.push(e[r]),t.push(e[r+1]),t.push(e[r+2]),t.push(n)}}static calcDelta(t,e,i,n){let r=e[t+3];if(-1===r)return 0;let s=n.length;return s>1&&n[s-2]===r?0:(n.push(r),l.calcDelta(r,i,e,n)+1)}static addDeltas(t,e){let i=t.length,n=0;for(let e=0;e<i;e+=4){let i=t[e+3];i>n&&(n=i)}for(let r=0;r<i;r+=4){let i=e[t[r]],s=t[r+1],o=n-t[r+3];switch(t[r+2]){case 0:i[s-1].x-=o,i[s].x-=o,1===s&&(i[i.length-1].x-=o),s===i.length-1&&(i[0].x-=o);break;case 1:i[s-1].x+=o,i[s].x+=o,1===s&&(i[i.length-1].x+=o),s===i.length-1&&(i[0].x+=o);break;case 2:i[s-1].y-=o,i[s].y-=o,1===s&&(i[i.length-1].y-=o),s===i.length-1&&(i[0].y-=o);break;case 3:i[s-1].y+=o,i[s].y+=o,1===s&&(i[i.length-1].y+=o),s===i.length-1&&(i[0].y+=o)}}}}const h=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},70328(t,e,i){i.d(e,{BI:()=>A,C:()=>o,DC:()=>c,Ej:()=>x,Ie:()=>T,Jt:()=>P,Lu:()=>w,Ne:()=>b,RF:()=>f,TF:()=>_,VL:()=>y,aI:()=>S,fA:()=>l,gE:()=>a,gX:()=>g,hZ:()=>I,iT:()=>d,is:()=>B,pg:()=>M,uJ:()=>p,vI:()=>v,vY:()=>h,vt:()=>s,w1:()=>u,yr:()=>m}),i(35522);var n=i(5443),r=(i(19419),i(4197));function s(t=C){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,e){for(let i=0;i<6;i++)t[i]=e[i];return t}function l(t,e,i,n,r,o,l=s()){return l[0]=t,l[1]=e,l[2]=i,l[3]=n,l[4]=r,l[5]=o,l}function h(t,e=s()){return function(t,e,i,n=s()){return I(n,R),function(t,e,i=0,n=e.length/3){let r=t[0],s=t[1],o=t[2],l=t[3],h=t[4],a=t[5];for(let t=0;t<n;t++)r=Math.min(r,e[i+3*t]),s=Math.min(s,e[i+3*t+1]),o=Math.min(o,e[i+3*t+2]),l=Math.max(l,e[i+3*t]),h=Math.max(h,e[i+3*t+1]),a=Math.max(a,e[i+3*t+2]);t[0]=r,t[1]=s,t[2]=o,t[3]=l,t[4]=h,t[5]=a}(n,t,e,i),n}(t,0,t.length/3,e)}function a(t,e=(0,r.jh)(24)){let[i,n,s,o,l,h]=t;return e[0]=i,e[1]=n,e[2]=s,e[3]=i,e[4]=n,e[5]=h,e[6]=i,e[7]=l,e[8]=s,e[9]=i,e[10]=l,e[11]=h,e[12]=o,e[13]=n,e[14]=s,e[15]=o,e[16]=n,e[17]=h,e[18]=o,e[19]=l,e[20]=s,e[21]=o,e[22]=l,e[23]=h,e}function u(t,e){return isFinite(t[2])||isFinite(t[5])?new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function f(t,e,i=t){i[0]=Math.min(t[0],e[0]),i[1]=Math.min(t[1],e[1]),i[2]=Math.min(t[2],e[2]),i[3]=Math.max(t[3],e[3]),i[4]=Math.max(t[4],e[4]),i[5]=Math.max(t[5],e[5])}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,i,n]){!function(t,e,i,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.min(t[2],n),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],i),t[5]=Math.max(t[5],n)}(t,e,i,n)}function y(t){return t[0]>=t[3]?0:t[3]-t[0]}function m(t){return t[1]>=t[4]?0:t[4]-t[1]}function p(t){return t[2]>=t[5]?0:t[5]-t[2]}function _(t){let e=y(t),i=p(t),n=m(t);return e*e+i*i+n*n}function g(t,e=[0,0,0]){return e[0]=t[0]+y(t)/2,e[1]=t[1]+m(t)/2,e[2]=t[2]+p(t)/2,e}function x(t,e=[0,0,0]){return e[0]=y(t),e[1]=m(t),e[2]=p(t),e}function M(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function w(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function b(t,e,i=t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i!==t&&(i[3]=t[3],i[4]=t[4],i[5]=t[5]),i}function v(t,e,i=t){return i[3]=e[0],i[4]=e[1],i[5]=e[2],i!==t&&(i[0]=t[0],i[1]=t[1],i[2]=t[2]),t}function I(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function T(t){return t?I(t,R):s(R)}function P(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function A(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=-1/0,t[3]=n,t[4]=r,t[5]=1/0,t}function B(t){return 6===t.length}function S(t,e,i){if(null==t||null==e)return t===e;if(!B(t)||!B(e))return!1;if(i){for(let n=0;n<t.length;n++)if(!i(t[n],e[n]))return!1}else for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}const R=[1/0,1/0,1/0,-1/0,-1/0,-1/0],C=[0,0,0,0,0,0];s(),i.d(e,["qv",0,R,"v_",0,C])},60408(t,e,i){function n(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function r(t){return void 0!==t.points}function s(t){return void 0!==t.x&&void 0!==t.y}function o(t){return void 0!==t.paths||void 0!==t.curvePaths}function l(t){return void 0!==t.rings||void 0!==t.curveRings}function h(t){return"object"==typeof t&&"vertexAttributes"in t}function a(t){return t?s(t)?"esriGeometryPoint":o(t)?"esriGeometryPolyline":l(t)?"esriGeometryPolygon":n(t)?"esriGeometryEnvelope":r(t)?"esriGeometryMultipoint":null:null}function u(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function f(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}i.d(e,{$B:()=>a,Bi:()=>l,Pv:()=>u,Rg:()=>o,U9:()=>r,W0:()=>f,ZC:()=>n,fT:()=>s,uW:()=>h})},65864(t,e,i){i.d(e,{rS:()=>u,xD:()=>c});var n=i(5443),r=i(91075),s=i(48526),o=i(86738),l=i(39829),h=i(82799),a=i(60408);function u(t){return null==t?null:t instanceof r.A?t:(0,a.fT)(t)?o.A.fromJSON(t):(0,a.Rg)(t)?h.A.fromJSON(t):(0,a.Bi)(t)?l.A.fromJSON(t):(0,a.U9)(t)?s.A.fromJSON(t):(0,a.ZC)(t)?n.A.fromJSON(t):null}const f={esriGeometryPoint:o.A,esriGeometryPolyline:h.A,esriGeometryPolygon:l.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:s.A,esriGeometryMultiPatch:l.A};function c(t){return t&&f[t]||null}},43334(t,e,i){i.d(e,{N3:()=>l,Om:()=>o});var n=i(69397),r=i(27647),s=i(92722);class o{constructor(t,e,i,n,r=0,s=null,o=null){this.geometry=t,this.attributes=e,this.centroid=i,this.objectId=n,this.displayId=r,this.distance=s,this.vertexCount=o}static fromJSON(t){let e=t.geometry?s.A.fromJSON(t.geometry):null,i=t.centroid?s.A.fromJSON(t.centroid):null,n=t.objectId;return new o(e,t.attributes,i,n,void 0,t.distance,t.vertexCount)}weakClone(){return new o(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new o(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(t){return this.centroid??=(0,r.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(t){return!!t.geometry?.coords?.length}},58512(t,e,i){i.d(e,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let t=new n;return t.globalIdFieldName=this.globalIdFieldName,t.geohashFieldName=this.geohashFieldName,t.geometryProperties=this.geometryProperties,t.geometryType=this.geometryType,t.spatialReference=this.spatialReference,t.hasZ=this.hasZ,t.hasM=this.hasM,t.features=this.features,t.fields=this.fields,t.transform=this.transform,t.exceededTransferLimit=this.exceededTransferLimit,t.uniqueIdField=this.uniqueIdField,t.queryGeometry=this.queryGeometry,t.queryGeometryType=this.queryGeometryType,t}}},92722(t,e,i){i.d(e,{A:()=>r});var n=i(69397);class r{constructor(t=[],e=[],i=!1,n=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=i,this.hasM=n}static fromJSON({lengths:t,coords:e,hasZ:i,hasM:n}){return new r(t,e,i||!1,n||!1)}static fromRect([t,e,i,n]){let s=i-t,o=n-e;return new r([5],[t,e,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let t=0,e=0;for(let i of this.lengths){if(i<3)continue;let{stride:n}=this,r=this.coords[n*e],s=this.coords[n*e+1];for(let o=1;o<i;o+=1){let i=n*(e+o),l=this.coords[i],h=this.coords[i+1];t+=-.5*(l-r)*(h+s),r=l,s=h}e+=i}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);let{stride:i}=this;for(let n of this.lengths){for(let r=0;r<n;r++){let n=i*(e+r);t(this.coords[n],this.coords[n+1])}e+=n}}deltaDecode(){let t=this.clone(),{coords:e,lengths:i}=t,n=0,{stride:r}=this;for(let t of i){for(let i=1;i<t;i++){let t=r*(n+i);e[t]+=e[t-r],e[t+1]+=e[t+1-r]}n+=t}return t}clone(t){if(this.isPoint)return new r([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let e=Array.from(this.lengths),{stride:i,size:n}=this,s=this.coords.slice(0,n*i);return t?(t.set(s),new r(e,t,this.hasZ,this.hasM)):new r(e,Array.from(s),this.hasZ,this.hasM)}justXY(){let{stride:t,size:e}=this;if(2===t)return this;let i=Array(e*t);for(let e=0,n=0;e<i.length;e+=t)i[n++]=this.coords[e],i[n++]=this.coords[e+1];return new r(this.lengths,i,!1,!1)}}},27647(t,e,i){i.d(e,{Q:()=>s});var n=i(92722);function r(t,e){return t?e?4:3:e?3:2}function s(t){if(null==t||!t?.lengths.length)return null;let{lengths:e,coords:i,stride:r,hasZ:s,hasM:h}=t,a=new n.A([],[],s,!1),u=a.coords,f=[],c=s?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],d=0;for(let t of e){let e=o(c,i,d,t,s,h);e&&f.push(e),d+=t*r}if(f.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&s&&(i=t[4]-e[4]),i}),f.length){let t=6*f[0][2];u[0]=f[0][0]/t,u[1]=f[0][1]/t,s&&(t=6*f[0][4],u[2]=0===t?0:f[0][3]/t),(u[0]<c[0]||u[0]>c[1]||u[1]<c[2]||u[1]>c[3]||s&&(u[2]<c[4]||u[2]>c[5]))&&(u.length=0)}if(!u.length){let n=t.lengths[0]?l(i,0,e[0],s,h):null;if(!n)return null;u[0]=n[0],u[1]=n[1],s&&(u[2]=n[2]??0)}return a}function o(t,e,i,n,s,o){let l=r(s,o),h=i,a=i+l,u=0,f=0,c=0,d=0,y=0;for(let i=0,r=n-1;i<r;i++,h+=l,a+=l){let i=e[h],n=e[h+1],r=e[h+2],o=e[a],l=e[a+1],m=e[a+2],p=i*l-o*n;d+=p,u+=(i+o)*p,f+=(n+l)*p,s&&(p=i*m-o*r,c+=(r+m)*p,y+=p),i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i),n<t[2]&&(t[2]=n),n>t[3]&&(t[3]=n),s&&(r<t[4]&&(t[4]=r),r>t[5]&&(t[5]=r))}if(d>0&&(d*=-1),y>0&&(y*=-1),!d)return null;let m=[u,f,.5*d];return s&&(m[3]=c,m[4]=.5*y),m}function l(t,e,i,n,s){let o=r(n,s),l=e,c=e+o,d=0,y=0,m=0,p=0;for(let e=0,r=i-1;e<r;e++,l+=o,c+=o){let e=t[l],i=t[l+1],r=t[l+2],s=t[c],o=t[c+1],_=t[c+2],g=n?a(e,i,r,s,o,_):h(e,i,s,o);if(g)if(d+=g,n){let t=f(e,i,r,s,o,_);y+=g*t[0],m+=g*t[1],p+=g*t[2]}else{let t=u(e,i,s,o);y+=g*t[0],m+=g*t[1]}}return d>0?n?[y/d,m/d,p/d]:[y/d,m/d]:i>0?n?[t[e],t[e+1],t[e+2]]:[t[e],t[e+1]]:null}function h(t,e,i,n){let r=i-t,s=n-e;return Math.sqrt(r*r+s*s)}function a(t,e,i,n,r,s){let o=n-t,l=r-e,h=s-i;return Math.sqrt(o*o+l*l+h*h)}function u(t,e,i,n){return[t+.5*(i-t),e+.5*(n-e)]}function f(t,e,i,n,r,s){return[t+.5*(n-t),e+.5*(r-e),i+.5*(s-i)]}},6518(t,e,i){i.d(e,{F:()=>l});var n=i(44208),r=i(75503),s=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class l{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,n.A)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let t=Array(this._idByBounds.size),e=0;this._idByBounds.forEach((i,n)=>{t[e++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(t=>this._idByBounds.has(t))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let t=(0,s.Ie)();for(let e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){let e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,i){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,i)}(this._index,t,t=>e(this._idByBounds.get(t)))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){let e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(t,e,i){i.d(e,{A:()=>d});var n=i(4576),r=i(49186),s=i(65529),o=i(53966),l=i(70328),h=i(19419),a=i(90708),u=i(6518),f=i(37730);const c=(0,l.vt)();class d{constructor(t){this.geometryInfo=t,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=f.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach(e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;let[e,i,n,r]=this.fullBounds;return{xmin:e,ymin:i,xmax:n,ymax:r,spatialReference:t}}add(t){this._add(t),this._emitChanged()}addMany(t){for(let e of t)this._add(e);this._emitChanged()}upsertMany(t){let e=t.map(t=>this._upsert(t));return this._emitChanged(),e.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(t){let e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(let e of t){let t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(let i of t){let t=this._boundsStore.get(i.objectId);t&&e((0,l.Jt)(c,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach(e=>t(e))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,t=>{e(this._featuresById.get(t))})}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;let e=t.objectId;if(null==e)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:t}));let i,n=this._featuresById.get(e);n?(t.displayId=n.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(t),t.geometry?.coords?.length?(i=(0,a.jQ)(i??(0,h.vt)(),t.geometry),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t),this._usedMemory+=this.estimateFeatureUsedMemory?.(t)??0):(this._boundsStore.set(e,null),this._featuresById.set(e,t))}_upsert(t){let e=t?.objectId;if(null==e)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;let i=this._featuresById.get(e);if(!i)return this._add(t),t;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:n,attributes:s}=t;for(let t in s)i.attributes[t]=s[t];return n&&(i.geometry=n,this._boundsStore.set(e,(0,a.jQ)((0,h.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);let e=t.objectId;return this._boundsStore.delete(e),this._featuresById.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(t)??0,t}}},54339(t,e,i){function n(t,e){switch(e.type){case"object-id":case"unique-id-simple":return t.attributes[e.fieldName];case"unique-id-composite":{let i=[];for(let n of e.fieldNames)i.push(t.attributes[n]??null);return JSON.stringify(i)}}}function r(t,e){if("uniqueIdFields"in e&&e.uniqueIdFields?.length){if(1===e.uniqueIdFields.length)return t.attributes?.[e.uniqueIdFields[0]];let i=e.uniqueIdFields.map(e=>t.attributes?.[e]);return JSON.stringify(i)}return"objectIdField"in e&&e.objectIdField?t.attributes?.[e.objectIdField]:null}i.d(e,{W:()=>n,r:()=>r})},37730(t,e,i){var n=i(43334);const r={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e,i)=>new n.Om(e,t.attributes,null,t.objectId,t.displayId,t.distance,t.vertexCount),getGeometry:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)};i.d(e,["T",0,r])},31464(t,e,i){i.d(e,{Cv:()=>d,Nk:()=>c,lK:()=>m});var n=i(4576),r=i(99917),s=i(60408),o=i(21325),l=i(28735);const h=[0,0];function a(t,e){let i=(0,o.K8)(t)?l.je:l.tD;if((0,s.fT)(e)){let t={x:0,y:0};return[t.x,t.y]=i(e.x,e.y,h),null!=e.z&&(t.z=e.z),null!=e.m&&(t.m=e.m),t}if((0,s.ZC)(e)){let t={xmin:0,ymin:0,xmax:0,ymax:0};return[t.xmin,t.ymin]=i(e.xmin,e.ymin,h),[t.xmax,t.ymax]=i(e.xmax,e.ymax,h),e.hasZ&&(t.zmin=e.zmin,t.zmax=e.zmax,t.hasZ=!0),e.hasM&&(t.mmin=e.mmin,t.mmax=e.mmax,t.hasM=!0),t}if((0,s.Bi)(e))return{rings:u(e.rings,i),hasM:e.hasM,hasZ:e.hasZ};if((0,s.Rg)(e))return{paths:u(e.paths,i),hasM:e.hasM,hasZ:e.hasZ};if((0,s.U9)(e))return{points:f(e.points,i),hasM:e.hasM,hasZ:e.hasZ};throw Error()}function u(t,e){let i=[];for(let n of t)i.push(f(n,e));return i}function f(t,e){let i=[];for(let n of t){let t=e(n[0],n[1],[0,0]);i.push(t),n.length>2&&t.push(n[2]),n.length>3&&t.push(n[3])}return i}async function c(t,e){if(!t||!e)return;let i=Array.isArray(t)?t.map(t=>null==t.geometry?null:t.geometry.spatialReference).filter(n.Ru):[t];await(0,r.initializeProjection)(i.map(t=>({source:t,dest:e})))}function d(t,e,i,n){if(!t)return null;if(i||(i=e,e=t.spatialReference),!(0,o.fn)(e)||!(0,o.fn)(i)||(0,o.aI)(e,i))return t;if((0,l.y7)(e,i)){let e=a(i,t);return e.spatialReference=i,e}let[s]=(0,r.projectMany)([t],e,i,n);return s}const y=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(t,e,i,n){if(!t?.length||!e||!i||(0,o.aI)(e,i))return t;let r={geometries:t,inSpatialReference:e,outSpatialReference:i,options:n,resolve:Promise.withResolvers()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;let t=this._jobs.shift();if(!t)return;let e,{geometries:i,inSpatialReference:n,outSpatialReference:s,resolve:o,options:h}=t,u=i.filter(t=>null!=t);e=(0,l.y7)(n,s)&&null==h?.extendedParams?u.map(t=>a(s,t)):(0,r.projectMany)(u,n,s,h);let f=0,c=i.map(t=>null==t?null:e[f++]);o.resolve(c),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(t,e,i,n){return y.push(t,e,i,n)}},90708(t,e,i){i.d(e,{Ap:()=>A,B2:()=>p,DF:()=>b,Di:()=>Z,E2:()=>F,IE:()=>m,Nl:()=>X,PR:()=>T,Rk:()=>U,Ux:()=>O,Ye:()=>S,ZF:()=>N,aQ:()=>V,jH:()=>z,jQ:()=>D,kz:()=>k,oN:()=>G,q3:()=>Y,qN:()=>v,zv:()=>j});var n=i(49186),r=i(53966),s=i(97768),o=i(70328),l=i(19419),h=i(60408),a=i(43334),u=i(58512),f=i(92722),c=i(54339);const d=()=>r.A.getLogger("esri.layers.graphics.featureConversionUtils"),y={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function m({scale:t,translate:e},i){return Math.round((i-e[0])/t[0])}function p({scale:t,translate:e},i){return Math.round((e[1]-i)/t[1])}function _({scale:t,translate:e},i){return Math.round((i-e[0])/t[0])}function g({scale:t,translate:e},i){return Math.round((i-e[1])/t[1])}function x({scale:t,translate:e},i,n){return i*t[n]+e[n]}function M(t,e,i){return e&&(t.hasZ=!0),i&&(t.hasM=!0),t}function w(t,e,i,n){if(e&&n&&t!==i)return(e,i,n,r)=>{n[r++]=e[i++],n[r++]=e[i++],t?i++:n[r++]=0,n[r++]=e[i++]??0};let r=+!!i+2+ +!!n,s=r-((!t&&i?1:0)+(!e&&n?1:0));return(t,e,i,n)=>{for(let o=0;o<r;++o)i[n++]=o<s?t[e++]??0:0}}function b(t,e,i){if(!t)return null;let{coords:n,hasZ:r,hasM:s}=t,[o,l]=n,h=r?n[2]:0,a=s?n[+!!r+2]:0;return{x:o,y:l,z:e?h:void 0,m:i?a:void 0}}function v(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{x:n,y:r,z:s,m:o}=t,l=[n,r];return e&&l.push(s??0),i&&l.push(o??0),new f.A([],l,e,i)}function I(t,e,i){if(null==t)return null;let{coords:n,stride:r,hasZ:s,hasM:o}=t,l=w(s,o,e,i),h=[];for(let t=0;t<n.length;t+=r){let e=[];l(n,t,e,0),h.push(e)}return M({points:h},e,i)}function T(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{points:n,hasZ:r,hasM:s}=t,o=new f.A([n.length],[],e,i),{coords:l,stride:a}=o,u=0,c=w(r??!1,s??!1,e,i);for(let t of n)c(t,0,l,u),u+=a;return o}function P(t,e,i){if(!t)return null;let{coords:n,lengths:r,stride:s,hasZ:o,hasM:l}=t,h=0,a=w(o,l,e,i),u=[];for(let t of r){let e=[];for(let i=0;i<t;i++){let t=[];a(n,h,t,0),h+=s,e.push(t)}u.push(e)}return M({paths:u},e,i)}function A(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{paths:n,hasZ:r,hasM:s}=t,o=w(r??!1,s??!1,e,i),l=new f.A([],[],e,i),{lengths:a,coords:u,stride:c}=l,d=0;for(let t of n){for(let e of t)o(e,0,u,d),d+=c;a.push(t.length)}return l}function B(t,e,i){if(!t)return null;let{coords:n,lengths:r,stride:s,hasZ:o,hasM:l}=t,h=0,a=w(o,l,e,i),u=[];for(let t of r){let e=[];for(let i=0;i<t;i++){let t=[];a(n,h,t,0),h+=s,e.push(t)}u.push(e)}return M({rings:u},e,i)}function S(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{rings:n,hasZ:r,hasM:s}=t,o=new f.A([],[],e,i),{lengths:l,coords:a,stride:u}=o,c=0,d=w(r??!1,s??!1,e,i);for(let t of n){for(let e of t)d(e,0,a,c),c+=u;l.push(t.length)}return o}const R=[],C=[];function F(t,e,i,n,r){R[0]=t;let[s]=Z(C,R,e,i,n,r);return W(R),W(C),s}function Z(t,e,i,r,s,o){if(W(t),!i){for(let i of e){let e=(0,c.W)(i,o);t.push(new a.Om(null,i.attributes,null,e,void 0,i.distance,i.vertexCount))}return t}switch(i){case"esriGeometryPoint":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?v(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryMultipoint":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o}=s,l=(0,h.Pv)(e),u=(0,h.W0)(e);t.push(new a.Om(e?T(e,i&&l,n&&u):null,o,null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryPolyline":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?A(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?S(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`)),W(t)}return t}function G(t,e,i,n){C[0]=t,q(R,C,e,i,n);let r=R[0];return W(R),W(C),r}function O(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){return null==t?null:(0,h.fT)(t)?v(t,e,i):(0,h.Bi)(t)?S(t,e,i):(0,h.Rg)(t)?A(t,e,i):(0,h.U9)(t)?T(t,e,i):void d().error("convertFromGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`))}function j(t,e,i,r){if(null==t)return null;let s="coords"in t?t:t.geometry;if(null==s)return null;switch(e){case"esriGeometryPoint":return b(s,i,r);case"esriGeometryMultipoint":return I(s,i,r);case"esriGeometryPolyline":return P(s,i,r);case"esriGeometryPolygon":return B(s,i,r);default:return d().error("convertToGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`)),null}}function q(t,e,i,r,s){if(W(t),null==i)return function(t,e){for(let i of e)t.push({attributes:i.attributes});return t}(t,e);switch(i){case"esriGeometryPoint":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({attributes:s,geometry:b(r,i,n)});return t}(t,e,r,s);case"esriGeometryMultipoint":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({geometry:r&&I(r,i,n),attributes:s});return t}(t,e,r,s);case"esriGeometryPolyline":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({geometry:r&&P(r,i,n),attributes:s});return t}(t,e,r,s);case"esriGeometryPolygon":return function(t,e,i,n){for(let{geometry:r,attributes:s,centroid:o}of e){let e=B(r,i,n),l=b(o,!1,!1);t.push(o?{geometry:e,attributes:s,centroid:l}:{geometry:e,attributes:s})}return t}(t,e,r,s);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`))}return t}function N(t){let{spatialReference:e,transform:i,fields:n,hasM:r,hasZ:s,features:o,geometryType:l,exceededTransferLimit:h,queryGeometry:a,queryGeometryType:u}=t,f={features:q([],o,l,s,r),fields:n,geometryType:l,spatialReference:e,queryGeometry:j(a,u,s,r)};return i&&(f.transform=i),h&&(f.exceededTransferLimit=h),r&&(f.hasM=r),s&&(f.hasZ=s),f}function Y(t,e){let i=new u.A,{hasM:n,hasZ:r,features:s,spatialReference:o,geometryType:l,exceededTransferLimit:h,transform:a,fields:f,globalIdFieldName:c}=t;return f&&(i.fields=f),i.geometryType=l??null,i.spatialReference=o??null,s&&Z(i.features,s,l,r,n,e),h&&(i.exceededTransferLimit=h),n&&(i.hasM=n),r&&(i.hasZ=r),a&&(i.transform=a),c&&(i.globalIdFieldName=c),i}function z(t,e){let{geometryType:i,features:n}=e;if(!t)return e;for(let e=0;e<n.length;e++){let r=n[e],s=r.weakClone();s.geometry=X(r.geometry,i,t),s.centroid=X(r.centroid,"esriGeometryPoint",t),n[e]=s}return e.transform=t,e}function X(t,e,i,n,r,s=!1){if(null==t||!t?.coords.length)return null;let o=y[e],{coords:l,lengths:h,stride:a,hasZ:u,hasM:c}=t;n??=u,r??=c;let d=new f.A([],[],n,r),x=d.stride,M=w(u,c,n,r),b=0,v=[0,0,0,0].slice(x),I=s?_:m,T=s?g:p;function P(){M(l,b,v,0),b+=a,v[0]=I(i,v[0]),v[1]=T(i,v[1])}if(t.isPoint)return P(),d.coords.push(...v),d;let A=0;for(let t of h){if(t<o)continue;let e=1;P(),d.coords.push(...v);let[i,n]=v;for(let r=1;r<t;r++){P();let[t,r]=v;(i!==t||n!==r)&&(s||(v[0]-=i,v[1]-=n),d.coords.push(...v),i=t,n=r,e++)}e>=o?(d.lengths.push(e),A=d.coords.length):W(d.coords,A)}return W(d.coords,A),d.coords.length?d:null}function k(t,e,i,n=t.hasZ,r=t.hasM){if(!t.coords.length)return null;let s=y[e],{coords:o,lengths:l,stride:h,hasZ:a,hasM:u}=t,c=new f.A([],[],n,r),d=c.stride,m=w(a,u,n,r);if(t.isPoint)return m(o,0,c.coords,0),c;let p=0,_=i*i;for(let t of l){if(t<s){p+=t*h;continue}let e=c.coords.length/d,i=p,n=p+(t-1)*h;m(o,i,c.coords,c.coords.length),E(c.coords,o,h,_,m,i,n),m(o,n,c.coords,c.coords.length);let r=c.coords.length/d-e;r>=s?c.lengths.push(r):W(c.coords,e*d),p+=t*h}return c.coords.length?c:null}function L(t,e,i,n){let r=t[e],s=t[e+1],o=t[i],l=t[i+1],h=t[n],a=t[n+1],u=o,f=l,c=h-u,d=a-f;if(0!==c||0!==d){let t=((r-u)*c+(s-f)*d)/(c*c+d*d);t>1?(u=h,f=a):t>0&&(u+=c*t,f+=d*t)}return c=r-u,d=s-f,c*c+d*d}function E(t,e,i,n,r,s,o){let l,h=n,a=0;for(let t=s+i;t<o;t+=i)l=L(e,t,s,o),l>h&&(a=t,h=l);h>n&&(a-s>i&&E(t,e,i,n,r,s,a),r(e,a,t,t.length),o-a>i&&E(t,e,i,n,r,a,o))}function D(t,e){if(!e?.coords?.length)return null;let i=1/0,n=1/0,r=-1/0,s=-1/0,{coords:h,stride:a}=e;for(let t=0;t<h.length;t+=a){let e=h[t],o=h[t+1];i=Math.min(i,e),r=Math.max(r,e),n=Math.min(n,o),s=Math.max(s,o)}return(0,o.is)(t)?(0,o.BI)(t,i,n,r,s):(0,l.fA)(i,n,r,s,t),t}function V(t,e){let{coords:i,lengths:n,stride:r,hasZ:o,hasM:l}=t;if(!i.length)return void(n.length=0);(0,s.Lw)(e);let{originPosition:h,scale:a,translate:u}=e,f=$;f.originPosition=h;let c=f.scale;c[0]=a[0]??1,c[1]=-(a[1]??1),c[2]=a[2]??1,c[3]=a[3]??1;let d=f.translate;if(d[0]=u[0]??0,d[1]=u[1]??0,d[2]=u[2]??0,d[3]=u[3]??0,l&&!o&&(c[2]=c[3],d[2]=d[3]),!n.length){for(let t=0;t<r;++t)i[t]=x(f,i[t],t);return void(n.length=0)}let y=0;for(let t=0;t<n.length;t++){let e=n[t];n[t]=e;for(let t=0;t<r;++t)i[y+t]=x(f,i[y+t],t);let s=i[y],o=i[y+1];y+=r;for(let t=1;t<e;t++,y+=r){s+=i[y]*c[0],o+=i[y+1]*c[1],i[y]=s,i[y+1]=o;for(let t=2;t<r;++t)i[y+t]=x(f,i[y+t],t)}}}function J(t,e,i,n){let r=0,s=t[n*e],o=t[n*(e+1)];for(let l=1;l<i;l++){let i=s+t[n*(e+l)],h=o+t[n*(e+l)+1],a=(i-s)*(h+o);s=i,o=h,r+=a}return.5*r}function U(t,e){let{coords:i,lengths:n}=t,r=0,s=0;for(let t=0;t<n.length;t++){let o=n[t];s+=J(i,r,o,e),r+=o}return Math.abs(s)}function W(t,e=0){t.length!==e&&(t.length=e)}const $={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},85113(t,e,i){i.d(e,{BM:()=>T,bd:()=>P,sO:()=>I,xD:()=>f});var n=i(67482),r=i(49186),s=i(21325),o=i(90708),l=i(43334),h=i(92722),a=i(30524);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function f(t){return u[t]}function*c(t){switch(t.type){case"Feature":yield t;break;case"FeatureCollection":for(let e of t.features)e&&(yield e)}}function*d(t){if(t)switch(t.type){case"Point":yield t.coordinates;break;case"LineString":case"MultiPoint":yield*t.coordinates;break;case"MultiLineString":case"Polygon":for(let e of t.coordinates)yield*e;break;case"MultiPolygon":for(let e of t.coordinates)for(let t of e)yield*t}}function y(t){for(let e of t)if(e.length>2)return!0;return!1}function m(t){let e=0;for(let i=0;i<t.length;i++){let n=t[i],r=t[(i+1)%t.length];e+=n[0]*r[1]-r[0]*n[1]}return e<=0}function p(t){let e=t[0],i=t[t.length-1];(e[0]!==i[0]||e[1]!==i[1]||e[2]!==i[2])&&t.push(e)}function _(t,e){let{coordinates:i,type:n}=t,r=e.hasZ??!1;switch(n){case"Point":{let t=r||3!==i.length?r&&2===i.length?[...i,0]:[...i]:i.slice(0,2);return new h.A([],t,r,!1)}case"LineString":return(0,o.Ap)({paths:[i],hasZ:!0},r,!1);case"MultiLineString":return(0,o.Ap)({paths:i,hasZ:!0},r,!1);case"MultiPoint":return(0,o.PR)({points:i,hasZ:!0},r,!1);case"Polygon":case"MultiPolygon":{let t=new h.A([],[],r,!1);for(let e of"Polygon"===n?[i]:i){g(t,e[0],r);for(let i=1;i<e.length;i++)x(t,e[i],r)}return t}}}function g(t,e,i){p(e),function(t){return!m(t)}(e)?w(t,e,i):M(t,e,i)}function x(t,e,i){p(e),function(t){return m(t)}(e)?w(t,e,i):M(t,e,i)}function M(t,e,i){for(let n of e)b(t,n,i);t.lengths.push(e.length)}function w(t,e,i){for(let n=e.length-1;n>=0;n--)b(t,e[n],i);t.lengths.push(e.length)}function b(t,[e,i,n],r){t.coords.push(e,i),r&&t.coords.push(n||0)}function v(t){switch(typeof t){case"string":return(0,n.C)(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function I(t,e=4326){if(!t)throw new r.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==t.type&&"FeatureCollection"!==t.type)throw new r.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:t});let{crs:i}=t;if(!i)return;let n="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,o=(0,s.oT)({wkid:e})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${e})$`,"i");if(!n||!o.test(n))throw new r.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function T(t,e={}){let i,n=[],r=new Set,s=new Set,o=!1,l=null,h=!1,{geometryType:u=null}=e;for(let e of c(t)){let{geometry:t,properties:c,id:m}=e;if((!t||(u||=f(t.type),f(t.type)===u))&&(o||=y(d(t)),h||(h=null!=m,h&&(i=typeof m,c&&(l=Object.keys(c).filter(t=>c[t]===m)))),c&&l&&h&&null!=m&&(l.length>1?l=l.filter(t=>c[t]===m):1===l.length&&(l=c[l[0]]===m?l:[])),c))for(let t in c){if(r.has(t))continue;let e=v(c[t]);if("unknown"===e){s.add(t);continue}s.delete(t),r.add(t);let i=(0,a.rS)(t);i&&n.push({name:i,alias:t,type:e})}}let m=(0,a.rS)(1===l?.length&&l[0]||null)??void 0;if(m)for(let t of n)if(t.name===m&&(0,a.WA)(t)){t.type="esriFieldTypeOID";break}return{fields:n,geometryType:u,hasZ:o,objectIdFieldName:m,objectIdFieldType:i,unknownFields:Array.from(s)}}function P(t,e){return Array.from(function*(t,e={}){let{geometryType:i,objectIdField:n}=e;for(let r of t){let{geometry:t,properties:s,id:o}=r;if(t&&f(t.type)!==i)continue;let h,a=s||{};n&&(h=a[n],null!=o&&!h&&(a[n]=h=o)),yield new l.Om(t&&_(t,e),a,null,h)}}(c(t),e))}},14289(t,e,i){i.r(e),i.d(e,{default:()=>P});var n=i(56507),r=i(17676),s=i(19419),o=i(21325),l=i(6774),h=i(90708),a=i(92722),u=i(83221),f=i(31464),c=i(85113);const d=new TextEncoder;class y{constructor(){this._bytes=[]}finish(){return new Uint8Array(this._bytes)}writeBooleanField(t,e){this._writeTag(t,0),this.writeVarint(+!!e)}writeDoubleField(t,e){this._writeTag(t,1);let i=new ArrayBuffer(8);new DataView(i).setFloat64(0,e,!0),this._writeBytes(new Uint8Array(i))}writeMessage(t,e,i){this._writeTag(t,2);let n=this._bytes.length;for(let t=0;t<5;t++)this._bytes.push(0);let r=this._bytes.length;e(i,this),this._writeMessageLength(n,this._bytes.length-r)}writeStringField(t,e){let i=d.encode(e);this._writeTag(t,2),this.writeVarint(i.byteLength),this._writeBytes(i)}writeSVarintField(t,e){this._writeTag(t,0),this.writeVarint(e<0?2*-e-1:2*e)}writeVarint(t){for(;t>127;)this._bytes.push(127&t|128),t=Math.floor(t/128);this._bytes.push(t)}writeVarintField(t,e){this._writeTag(t,0),this.writeVarint(e)}_writeBytes(t){for(let e of t)this._bytes.push(e)}_writeMessageLength(t,e){let i=0;for(;e>127;)this._bytes[t+i++]=127&e|128,e=Math.floor(e/128);this._bytes[t+i++]=e,this._bytes.splice(t+i,5-i)}_writeTag(t,e){this.writeVarint(t<<3|e)}}function m(t,e,i){let n=new y;return n.writeMessage(3,p,{cursor:e,extent:i,keyIndices:new Map,keys:[],name:t,valueIndices:new Map,values:[]}),Uint8Array.from(n.finish()).buffer}function p(t,e){for(e.writeVarintField(15,1),e.writeStringField(1,t.name),e.writeVarintField(5,t.extent);t.cursor.next();)e.writeMessage(2,_,t);for(let i of t.keys)e.writeStringField(3,i);for(let i of t.values)e.writeMessage(4,M,i)}function _(t,e){let i=t.cursor.getId();"number"==typeof i&&e.writeVarintField(1,i),e.writeMessage(2,g,t),e.writeVarintField(3,t.cursor.getType()),e.writeMessage(4,x,t.cursor)}function g(t,e){let i=t.cursor.getAttributes();if(i)for(let n of Object.keys(i)){let r=w(i[n]);if(null==r)continue;let s=t.keyIndices.get(n);s??(s=t.keys.length,t.keyIndices.set(n,s),t.keys.push(n));let o=`${typeof r}:${r}`,l=t.valueIndices.get(o);l??(l=t.values.length,t.valueIndices.set(o,l),t.values.push(r)),e.writeVarint(s),e.writeVarint(l)}}function x(t,e){let i=t.getType(),n=0,r=0;for(let s=0;s<t.getPathCount();s++){let o=t.getPathLength(s),l=1===i?o:1;e.writeVarint(b(1,l));let h=3===i?o-1:o;for(let o=0;o<h;o++){1===o&&1!==i&&e.writeVarint(b(2,h-1));let l=t.getX(s,o),a=t.getY(s,o);e.writeVarint(v(l-n)),e.writeVarint(v(a-r)),n=l,r=a}3===i&&e.writeVarint(b(7,1))}}function M(t,e){"string"==typeof t?e.writeStringField(1,t):"boolean"==typeof t?e.writeBooleanField(7,t):Number.isInteger(t)?t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t):e.writeDoubleField(3,t)}function w(t){return"string"==typeof t||"boolean"==typeof t||"number"==typeof t?t:null==t?null:JSON.stringify(t)??null}function b(t,e){return(e<<3)+(7&t)}function v(t){return t<<1^t>>31}const I=4096,T=[{geometryType:"esriGeometryPolygon",vectorTileGeometryType:3},{geometryType:"esriGeometryPolyline",vectorTileGeometryType:2},{geometryType:"esriGeometryPoint",vectorTileGeometryType:1},{geometryType:"esriGeometryMultipoint",vectorTileGeometryType:1}];class P{constructor(){this._buffer=128,this._featureIds=new Map,this._name="",this._stores=[],this._webMercatorStores=null,this._tolerance=.375}destroy(){for(let{store:t}of this._stores)t.clear();for(let{store:t}of this._webMercatorStores??[])t.clear();this._webMercatorStores=null,this._featureIds.clear(),this._stores.length=0}async initialize({definition:t,name:e,requestOptions:i},s={}){if(null==t.data)throw Error(`GeoJSON source '${e}' must define a data property.`);if(!0===t.lineMetrics)throw Error("GeoJSON lineMetrics are not supported.");if(t.promoteId&&t.generateId)throw Error("GeoJSON promoteId and generateId cannot be used together.");let o="string"==typeof t.data?(await(0,n.A)(t.data,{...i,responseType:"json",signal:s.signal})).data:t.data;(0,r.Te)(s),(0,c.sO)(o),this.destroy(),this._buffer=t.buffer??128,this._name=e,this._tolerance=t.tolerance??.375;let l=0;for(let{geometryType:e,vectorTileGeometryType:i}of T){let n=(0,c.bd)(o,{geometryType:e,hasZ:!1}),r=A(o,e,t);if(0===n.length)continue;let s=new u.A({geometryType:e,hasM:!1,hasZ:!1}),h=[];for(let[t,e]of n.entries())e.geometry&&(e.objectId=l++,this._featureIds.set(e.objectId,r[t]??null),h.push(e));h.length>0&&(s.addMany(h),this._stores.push({geometryType:e,store:s,vectorTileGeometryType:i}))}return(0,r.Te)(s),{geometryTypes:["polygon","line","point"].filter(t=>this._stores.some(({vectorTileGeometryType:e})=>e===function(t){switch(t){case"polygon":return 3;case"line":return 2;case"point":return 1}}(t)))}}requestTile(t,e={}){(0,r.Te)(e);let i=this._getTileFeatures(t),n=i.length>0?m(this._name,new S(i),I):new ArrayBuffer(0);return(0,r.Te)(e),{result:n,transferList:[n]}}_getStores(t){return(0,o.K8)(t)?(this._webMercatorStores||=this._stores.map(({geometryType:t,store:e,vectorTileGeometryType:i})=>{let n=new u.A({geometryType:t,hasM:!1,hasZ:!1});return e.forEach(e=>{let i=function(t,e){return t?(0,h.Ux)((0,f.Cv)((0,h.zv)(t,e,!1,!1),o.KK,o.ch))??null:null}(e.geometry,t);if(i){let t=e.weakClone();t.geometry=i,n.add(t)}}),{geometryType:t,store:n,vectorTileGeometryType:i}}),this._webMercatorStores):this._stores}_getTileFeatures({col:t,row:e,origin:i,tileSpan:n,spatialReference:r}){let l=i.x+t*n,h=i.y-e*n,{valid:a}=(0,o.Vp)(r),u=a[1]-a[0],f=this._getStores(r),c=n/I,d=this._buffer*c,y=this._tolerance*c,m=[];for(let t of[-u,0,u]){let e=(0,s.fA)(l-d-t,h-n-d,l+n+d-t,h+d),i={scale:[c,-c,1,1],translate:[l-t,h,0,0]};for(let{geometryType:t,store:n,vectorTileGeometryType:r}of f)n.forEachInBounds(e,e=>{let n=B(e,t,r,i,y,this._buffer);n&&m.push({attributes:e.attributes,geometry:n,id:this._featureIds.get(e.objectId),type:r})})}return m}}function A(t,e,i){let n=[],r="FeatureCollection"===t.type?t.features:[t];for(let t=0;t<r.length;t++){let s=r[t];if(!s.geometry||(0,c.xD)(s.geometry.type)!==e)continue;let o=i.promoteId?s.properties?.[i.promoteId]:!0===i.generateId?t:s.id;n.push("number"==typeof o||"string"==typeof o?o:null)}return n}function B(t,e,i,n,r,s){if(!t.geometry)return null;let o=r>0?(0,h.kz)(t.geometry,e,r,!1,!1):t.geometry;return function(t,e,i){if(!t)return null;let n=new l.O3(0,0,0,8,i/8);if(n.setExtent(I),n.reset(e),1===e)for(let e=0;e<t.size;e++){let i=e*t.stride;n.moveTo(t.coords[i],t.coords[i+1])}else{let i=0;for(let r of t.lengths){n.moveTo(t.coords[i],t.coords[i+1]);for(let e=1;e<r;e++){let r=i+e*t.stride;n.lineTo(t.coords[r],t.coords[r+1])}3===e&&n.close(),i+=r*t.stride}}let r=n.result();if(!r)return null;let s=1===e?[r.length]:r.map(t=>t.length),o=[];for(let t of r)for(let e of t)o.push(e.x,e.y);return new a.A(s,o)}((0,h.Nl)(o,e,n,!1,!1,!0),i,s)}class S{constructor(t){this._features=t,this._index=-1,this._pathOffsets=[]}get _feature(){return this._features[this._index]}destroy(){}getAttributes(){return this._feature.attributes}getId(){return this._feature.id}getPathCount(){return 1===this._feature.type?1:this._feature.geometry.lengths.length}getPathLength(t){return 1===this._feature.type?this._feature.geometry.size:this._feature.geometry.lengths[t]}getType(){return this._feature.type}getX(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)]}getY(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)+1]}next(){return!(++this._index>=this._features.length||(this._pathOffsets=function(t){let e=Array(t.lengths.length),i=0;for(let n=0;n<t.lengths.length;n++)e[n]=i,i+=t.lengths[n];return e}(this._feature.geometry),0))}_getCoordinateIndex(t,e){return(1===this._feature.type?e:this._pathOffsets[t]+e)*this._feature.geometry.stride}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8595],{82806(e,t,i){var r=i(32198),n=i(56507),l=i(49186),s=i(53966),a=i(91429),o=i(78888),u=i(86738),c=i(16930),h=i(21325),d=i(7548),f=i(23636),p=i(4366),m=i(34930),g=i(99235),y=i(37373),x=i(51927),w=i(60694),R=i(10873),b=i(45617),v=i(33446),I=i(43577),_=i(13868),S=i(22796),C=i(69409),k=i(87045),M=i(12711),T=i(85676),A=i(94359),P=i(22048),F=i(49410),z=i(34606),B=i(51508),D=i(93223),J=i(36005);i.d(t,["b",0,e=>{let t=e,H=class extends t{constructor(...e){super(...e),this._draRasterConfig=null,this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=(0,d.qg)(e[0]?.raster)}destroy(){this._draRasterConfig?.rasterJobHandler?.destroy(),this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",(0,w.Jf)(e,s.A.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;let{activePresetRendererName:e,presetRenderers:t}=this;return e?(t?.find(({name:t})=>t===e))?.renderer.clone():this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){let r=t?.layerDefinition?.drawingInfo?.renderer;return(0,A.LF)(r,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,o.PZ)(P.A,e).clone();let{serviceRasterInfo:i}=this;if(null==i)throw new l.A("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");let{geometry:r}=e;if(null==r)throw new l.A("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=r,{spatialReference:s}=i;if(!r.spatialReference.equals(s)){await(0,y.Hh)();let e="extent"===r.type?(0,y._l)(r,s):(0,y.uk)(r,s);if(null==e)throw new l.A("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}let a=e.pixelSize??new u.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:s}),{extent:c,width:h,height:d}=(0,m.b7)(i,n,a),f=await this.fetchPixels(c,h,d,{...t,interpolation:"nearest"});if(null==f.pixelBlock)throw new l.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");let p=await(0,m.$Q)(f.pixelBlock,c,n),g=this._rasterJobHandler;return g?g.computeStatisticsHistograms({pixelBlock:p},t):(0,x.eH)(p)}normalizeRasterFetchOptions(e){let{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;let i=(0,p.XU)({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return!this.loaded||"imagery-tile"!==this.type||!this.rasterFunction&&!this._cachedRasterFunctionJson||JSON.stringify(this.rasterFunction)===JSON.stringify(this._cachedRasterFunctionJson)||(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction()),this._rasterFunctionUpdatePromise}async updateRenderer(){let{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;let{rasterInfo:r}=this.raster,n=(0,p.ct)(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset})?.name,l=(0,M.m7)(r,n);return this._updateSymbolizer(t,i,n,l)}async applyRenderer(e,t,i){let r=e?.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;await this.updateRenderer();let n=this.bandIds??[],{pixelBlock:l}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:n,symbolizer:this.symbolizer},i);return l}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&(0,d.qg)(t)){let i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;let r=(0,h.Vp)(e);return k.A.create({size:256,spatialReference:e,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,i,r={}){if(N(this),r.requestAsImageElement){let l=this.getTileUrl(e,t,i),{data:s}=await(0,n.A)(l,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:r.signal});return s}let{serviceRasterInfo:l}=this;if(null!=l.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition){let n=r.tileInfo||l.storageInfo.tileInfo,s=this.raster.getTileExtentFromTileInfo(e,t,i,n);if(s)return{extent:s,pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(r={...r,buffer:{cols:1,rows:1}}),r={...r,refreshParameters:this.refreshParameters},this.raster.fetchTile(e,t,i,r)}async fetchImageBitmapTile(e,t,i,r={}){N(this);let l=this.getTileUrl(e,t,i),{data:s}=await(0,n.A)(l,{responseType:"blob",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:r?.signal});return(0,v.Cp)(s,e,t,i,r)}async fetchPixels(e,t,i,r={}){if(null!=this.serviceRasterInfo.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition)return{extent:e,pixelBlock:null};await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i);let n=await this.raster.fetchPixels(e,t,i,r);return r.bandIds?.length&&!this.raster.rasterInfo.storageInfo.isBsqTile&&(n.pixelBlock=n.pixelBlock?.extractBands(r.bandIds)),n}async getSamples(e,t){await this.load();let i=(0,o.PZ)(z.A,e).clone();if(i.interpolation&&"nearest"!==i.interpolation)throw new l.A("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");let r=i.mosaicRule?.multidimensionalDefinition,n={...t,multidimensionalDefinition:r},s=(await this._getSampleLocations(i)).map(e=>this.identify(e,n).then(t=>(t.location=e,t))),a=(await Promise.all(s)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new B.A({samples:a})}async identify(e,t={}){await this.load();let i=(0,o.PZ)(u.A,e).clone().normalize(),{raster:r,serviceRasterInfo:n}=this;if(null!=n?.multidimensionalInfo&&(!n.hasMultidimensionalTranspose||!(0,p.DY)(t.multidimensionalDefinition)&&!t.transposedVariableName)&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:i,value:null};let s,a=this.multidimensionalSubset?.areaOfInterest;if(a&&!a.contains(i))throw new l.A("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");if(this.serviceRasterInfo?.storageInfo.isBsqTile){let e=(0,d.qg)(r)?this.getRawDisplayBandIds():this.bandIds;s=e?.length?e:void 0}return r.identify(i,{...t,bandIds:s})}hasStandardTime(){let e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;let t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date((0,p.$E)(e)).toISOString()}getMultidimensionalSubsetVariables(e){let t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,p.z2)(this.multidimensionalSubset,t)}async getDynamicRangeInputRaster(){if(!this.rasterFunction||!(0,d.qg)(this.raster)||!this._cachedRasterFunctionJson)return null;let e=JSON.stringify(this._cachedRasterFunctionJson);if(this._draRasterConfig?.functionJson===e)return this._draRasterConfig;let t=this.raster.rasterFunction.queryRasterFunction(e=>"Stretch"===e.functionName&&e.functionArguments.dynamicRangeAdjustment);if(!t)return null;let i=t.toJSON(),r=this.raster.primaryRasters.rasters,n=t.functionArguments.raster,l=i.rasterFunctionArguments;if(!n||"object"!=typeof n||!("functionName"in n))return this._draRasterConfig={functionJson:e,raster:r[0],functionArguments:l,rasterJobHandler:this._draRasterConfig?.rasterJobHandler},this._draRasterConfig;let s={raster:r[0]};r.length>1&&r.forEach(e=>s[e.url]=e);let a=(0,g.vt)(n.toJSON(),s),o=new f.A({rasterFunction:a});await o.open();let u=this._draRasterConfig?.rasterJobHandler;try{u||(u=new C.A,await u.initialize()),o.rasterJobHandler=u,await o.syncJobHandler()}catch{}return this._draRasterConfig={functionJson:e,raster:o,functionArguments:l,rasterJobHandler:u},this._draRasterConfig}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||=(0,p.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset}),this.rasterFunction&&(0,d.qg)(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;N(this);let{raster:e}=this;e.rasterJobHandler!==this._rasterJobHandler&&(e.rasterJobHandler=this._rasterJobHandler,(0,d.qg)(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer())}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){let{geometry:t}=e;if("point"===t.type)return[t];let{spatialReference:r,type:n}=t;if("multipoint"===n)return t.points.map(e=>new u.A({x:e[0],y:e[1],spatialReference:r}));if("polyline"===n){let n=t;if(e.sampleCount||e.sampleDistance){let{densifyExecute:r}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(4642)]).then(()=>i(88411)),{lengthExecute:l}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(2174)]).then(()=>i(965)),s=l(t,{unit:"meters"}),a=Math.min(e.sampleCount||100,1e3),o=e.sampleDistance;o||=s/(a+ +(2===n.paths[0].length)),n=r(t,o,{unit:"meters"})}return n.paths.flatMap(e=>e.map(e=>new u.A({x:e[0],y:e[1],spatialReference:r})))}let l=Math.min(e.sampleCount||100,1e3),s="extent"===t.type,a=s?t:t.extent,o=Math.sqrt(a.width*a.height/l),c=a.height/o,h=a.width/o,{xmin:d,ymax:f}=a,p=[];for(let e=0;e<c;e++)for(let i=0;i<h;i++){let n=new u.A({x:d+(i+.5)*o,y:f-(e+.5)*o,spatialReference:r});(s||t.contains(n))&&p.push(n)}return p}_configDefaultInterpolation(){if(null==this.interpolation){N(this);let{raster:e}=this,t=(0,M.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){N(this);let{rasterInfo:t}=this.raster,i=(0,p.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset})?.name,r=(0,M.I8)({variableName:i,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=r?.bandIds??(0,M.ci)(t)),!this.renderer||"override"===e){let e=(0,M.Mm)(this.raster),n=r?.renderer??(0,M.PD)(t,{bandIds:this.bandIds,variableName:i,rasterFunctionColorRamp:e}),l=t.statistics,s=l&&l.length>0?l[0]:null,a=s?.max??0,o=s?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===n.type&&(a>1e24||o<-1e24)&&(n.dynamicRangeAdjustment=!0,n.customStatistics=null,"none"===n.stretchType&&(n.stretchType="min-max")),this.renderer=n}let n=(0,M.$P)({...this.renderer.toJSON(),variableName:i}),l=(0,M.m7)(t,i);this.symbolizer?(this.symbolizer.rendererJSON=n,this.symbolizer.rasterInfo=l):this.symbolizer=new T.A({rendererJSON:n,rasterInfo:l});let a=this.symbolizer.bind();if(a.success){if("auto"===e){let{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){let e=(0,M.PD)(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){let e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else s.A.getLogger(this).warn("imagery-tile-mixin",a.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&(0,d.qg)(this.raster)){let e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",S.A.fromJSON(e)))}let e,t=this.raster,i=!1;(0,d.qg)(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];let{rasterFunction:r}=this;if(r){let i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);let n=(0,g.vt)(r.functionDefinition?.toJSON()??r.toJSON(),i),l=new f.A({rasterFunction:n});l.rasterJobHandler=this._rasterJobHandler,await l.open(),this.raster=l}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!r)return;let{bandIds:n}=this,{bandCount:l}=this.raster.rasterInfo,s=n?.length?n.some(e=>e>=l):l>=3;n&&(s||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){let{rasterInfo:i}=this.raster,r=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),n=(i.pixelSize.x+i.pixelSize.y)/2*r;if(!e.dataSeries?.length)return[new F.A({location:e.location,pixelValue:e.value,locationId:t,resolution:n})];let l=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:r},s)=>{let a={Variables:r[0].variableName,Dimensions:r.flatMap(({dimensionName:e})=>e).join(",")};for(let{dimensionName:e,values:t}of r){a[e]=Array.isArray(t[0])?t[0][0]:t[0];let i=t[t.length-1];a[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}let o=new F.A({location:e.location,pixelValue:i,rasterId:s,locationId:t,resolution:n,attributes:a});l.push(o)}),l}};function N(e){if(!e.raster||!e.serviceRasterInfo)throw new l.A("imagery-tile","no raster")}return(0,r.Cg)([(0,a.MZ)({clonable:!1})],H.prototype,"_cachedRasterFunctionJson",void 0),(0,r.Cg)([(0,a.MZ)({clonable:!1})],H.prototype,"_compatibleFullExtent",void 0),(0,r.Cg)([(0,a.MZ)({clonable:!1})],H.prototype,"_draRasterConfig",void 0),(0,r.Cg)([(0,a.MZ)({clonable:!1})],H.prototype,"_isConstructedFromFunctionRaster",void 0),(0,r.Cg)([(0,a.MZ)({clonable:!1})],H.prototype,"_rasterFunctionUpdatePromise",void 0),(0,r.Cg)([(0,a.MZ)({type:[o.jz],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],H.prototype,"bandIds",void 0),(0,r.Cg)([(0,a.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],H.prototype,"copyright",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:!1}})],H.prototype,"fullExtent",null),(0,r.Cg)([(0,a.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,D.e)(_.SZ)],H.prototype,"interpolation",void 0),(0,r.Cg)([(0,a.MZ)()],H.prototype,"ioConfig",void 0),(0,r.Cg)([(0,a.MZ)({type:[b.A],json:{write:!0}})],H.prototype,"multidimensionalDefinition",null),(0,r.Cg)([(0,a.MZ)({type:I.A,json:{write:!0}})],H.prototype,"multidimensionalSubset",void 0),(0,r.Cg)([(0,a.MZ)()],H.prototype,"raster",void 0),(0,r.Cg)([(0,a.MZ)({type:S.A})],H.prototype,"rasterFunction",null),(0,r.Cg)([(0,a.MZ)({constructOnly:!0})],H.prototype,"serviceRasterInfo",void 0),(0,r.Cg)([(0,a.MZ)()],H.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,a.MZ)({readOnly:!0,type:c.A,json:{read:!1}})],H.prototype,"spatialReference",void 0),(0,r.Cg)([(0,a.MZ)({type:k.A})],H.prototype,"tileInfo",void 0),(0,r.Cg)([(0,a.MZ)(R.OZ)],H.prototype,"url",null),(0,r.Cg)([(0,a.MZ)({types:A.uy})],H.prototype,"renderer",null),(0,r.Cg)([(0,a.MZ)({types:A.uy,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){let e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:A.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],H.prototype,"internalRenderer",null),(0,r.Cg)([(0,J.w)("internalRenderer")],H.prototype,"readRenderer",null),(0,r.Cg)([(0,a.MZ)({clonable:!1})],H.prototype,"symbolizer",void 0),H=(0,r.Cg)([(0,a.$K)("esri.layers.mixins.TiledImagery")],H),H}])},49859(e,t,i){i.d(t,{A:()=>J});var r=i(32198),n=i(56507),l=i(49186),s=i(25482),a=i(53966),o=i(17676),u=i(563),c=i(91429),h=i(78888),d=i(5443),f=i(86738),p=i(16930),m=i(7548),g=i(4366),y=i(37373);const x=new Map,w=new class{constructor(e=15e3,t=5e3,i=-1){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t),this._size=i}decreaseRefCount(e,t){let i=e+"/"+t,r=this._cachedBlocks;if(r.has(i)){let e=r.get(i);return e.refCount--,e.refCount<=0&&(r.delete(i),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){let i=e+"/"+t,r=this._cachedBlocks;if(r.has(i)){let e=r.get(i);return e.ts=Date.now(),e.refCount++,r.delete(i),r.set(i,e),e.block}return null}putBlock(e,t,i,r){let n=this._cachedBlocks,l=e+"/"+t;if(n.has(l)){let e=n.get(l);e.ts=Date.now(),e.refCount++}else n.set(l,{block:i,ts:Date.now(),refCount:1,controller:r});this._trim(),this._updateTimer()}deleteBlock(e,t){let i=this._cachedBlocks,r=e+"/"+t;i.has(r)&&i.delete(r)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;let e=this._cachedBlocks;this._timer=setInterval(()=>{let t=Array.from(e),i=Date.now();for(let r=0;r<t.length&&t[r][1].ts<=i-this._duration;r++)e.delete(t[r][0]);0===e.size&&this._clearTimer()},this._interval)}_trim(){let e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;let t=Array.from(e).sort((e,t)=>e[1].refCount-t[1].refCount||e[1].ts-t[1].ts);for(let i=0;i<t.length-this._size;i++)e.delete(t[i][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}}(15e3,5e3,100);function R(e,t,i){let r=x.get(e);if(!r)return null==t?w.decreaseRefCount(e,i):0;if(null==t||null==r[t])return w.decreaseRefCount(e,i);let n=r[t]?.cache,l=n?.get(i);if(n&&l){if(l.refCount--,0===l.refCount){n.delete(i);for(let e=0;e<r.length;e++)r[e]?.cache.delete(i);l.controller&&l.controller.abort()}return l.refCount}return 0}function b(e,t,i){let r=x.get(e);if(!r)return null==t?w.getBlock(e,i):null;if(null==t||null==r[t]){for(let e=0;e<r.length;e++){let t=r[e]?.cache.get(i);if(t)return t.refCount++,t.block}return w.getBlock(e,i)}let n=r[t]?.cache.get(i);if(n)return n.refCount++,n.block;for(let e=0;e<r.length;e++){if(e===t||!r[e])continue;let n=r[e]?.cache,l=n?.get(i);if(n&&l)return l.refCount++,n.set(i,l),l.block}return null}function v(e,t,i,r,n=null){let l=x.get(e);if(!l)return void(t??w.putBlock(e,i,r,n));if(null==t||null==l[t])return void w.putBlock(e,i,r,n);let s={refCount:1,block:r,isResolved:!1,isRejected:!1,controller:n};r.then(()=>s.isResolved=!0).catch(()=>s.isRejected=!0),l[t]?.cache.set(i,s)}function I(e,t,i){let r=x.get(e);r?null==t||null==r[t]?w.deleteBlock(e,i):r[t]?.cache.delete(i):t??w.deleteBlock(e,i)}var _=i(94778),S=i(40951),C=i(34930),k=i(47520),M=i(34251),T=i(60694),A=i(10873),P=i(45617),F=i(91806),z=i(20223),B=i(87045);let D=0,J=class extends s.o{constructor(){super(...arguments),this._tileFetchQueue=new u.QueueProcessor({concurrency:32,process:(e,t)=>this.fetchRawTile(e.pyramidLevel,e.row,e.col,{...e.options,signal:t})}),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"},this.rawBlockRegistryIds=[],this.refresh=(0,o.sg)(async e=>{await this._openPromise;let t=await this._refresh(e);return t.dataChanged&&function(e,t){let i=x.get(e);if(i){let e=t.map(e=>i[e]).filter(e=>null!=e);for(let t of e)t&&(Array.from(t.cache.values()).forEach(e=>{!e.isResolved&&!e.isRejected&&e.controller&&e.controller.abort()}),t.cache.clear())}}(this.rasterId,this.rawBlockRegistryIds),t})}normalizeCtorArgs(e){return e?.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:B.A.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){let{rasterInfo:e}=this,t=(0,y.FT)(e.spatialReference);return null!=t&&e.extent.width>=t/2}get _hasNoneOrGCSShiftTransform(){let{transform:e}=this.rasterInfo;return null==e||"gcs-shift"===e.type}set rasterJobHandler(e){this._set("rasterJobHandler",e),(0,m.qg)(this)&&this.primaryRasters?.rasters?.forEach(t=>t.rasterJobHandler=e)}get rasterId(){return this.url||"rasterId-"+D++}set url(e){this._set("url",(0,T.Jf)(e,a.A.getLogger(this)))}async open(e){return this._openPromise??=(0,y.Hh)().then(()=>this._open(e)),this._openPromise}async fetchTile(e,t,i,r={}){let n=r.tileInfo||this.rasterInfo.storageInfo.tileInfo,s=this.getTileExtentFromTileInfo(e,t,i,n);if(!s)throw new l.A("imagery-tile:out-of-bounds","Level for fetch tile out of range");return r={noClip:!0,...r},this.fetchPixels(s,n.size[0],n.size[1],r)}async identify(e,t={}){e=(0,h.PZ)(f.A,e).clone().normalize();let{multidimensionalDefinition:i,timeExtent:r}=t,{rasterInfo:n}=this,{hasMultidimensionalTranspose:l,multidimensionalInfo:s}=n,{transposedVariableName:a}=t,o=null!=s&&l&&(null!=r||(0,g.DY)(i));o&&!a&&(a=null!=i&&i.length>0?i[0].variableName??void 0:s.variables[0].name,t={...t,transposedVariableName:a}),t=this._getRequestOptionsWithSliceId(t);let{spatialReference:u,extent:c}=n,{datumTransformation:p}=t,x=(0,y._I)(e,u,p);if(!c.intersects(x))return{location:x,value:null};if(null!=n.transform){let e=n.transform.inverseTransform(x);if(!n.nativeExtent.intersects(e))return{location:e,value:null};x=e}let w=null!=a&&null!=s&&n.hasMultidimensionalTranspose;if((0,m.qg)(this)){let e=this.primaryRasters.rasters[0];if(w)return e.identify(x,t);let{pixelSize:r}=n,l=3*r.x/2,s=3*r.y/2,a=new d.A({xmin:x.x-l,xmax:x.x+l,ymin:x.y-s,ymax:x.y+s,spatialReference:u}),o={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId,bandIds:t.bandIds},{pixelBlock:c}=await e.fetchPixels(a,3,3,o),{pixelBlock:h}=await this.fetchPixels(a,3,3,o);if(null==c)return{location:x,value:null};let f,p=!c.mask||c.mask[4]?c.pixels.map(e=>e[4]):null;return null!=h&&(f=!h.mask||h.mask[4]?h.pixels.map(e=>e[4]):void 0),{location:x,value:p,processedValue:f,pyramidLevel:0}}let R=0;if(!w){let{srcResolution:i}=t;if(i)i.spatialReference&&(i=(0,C.T5)(new f.A(i),u)),R=(0,y.t$)(i,n,this.ioConfig.sampling).pyramidLevel;else if(R=await this.computeBestPyramidLevelForLocation(e,t),null==R)return{location:x,value:null}}let b=this.identifyPixelLocation(x,R,null,w);if(null===b)return{location:x,value:null};let{row:v,col:I,rowOffset:_,colOffset:S,blockWidth:k}=b,M=await this._fetchRawTile(R,v,I,t);if(!M?.pixels?.length)return{location:x,value:null};let T=_*k+S;return this._processIdentifyResult(M,{srcLocation:x,position:T,pyramidLevel:R,useTransposedTile:!!w,requestSomeSlices:o,identifyOptions:t})}async fetchPixels(e,t,i,r={}){e=(0,y.Ps)(e),r=this._getRequestOptionsWithSliceId(r);let{_hasNoneOrGCSShiftTransform:n}=this;if(r.requestRawData&&n)return this._fetchPixels(e,t,i,r);let l=(0,y.FT)(e.spatialReference),s=(0,y.OM)(e);if(null==l||0===s||1===s&&this._isGlobalWrappableSource&&n)return this._fetchPixels(e,t,i,r);if(s>=3)return{extent:e,pixelBlock:null};let a=[],{xmin:o,xmax:u}=e,c=Math.round(l/(u-o)*t),h=c-Math.round((l/2-o)/(u-o)*t),f=0,p=[];for(let n=0;n<=s;n++){let m=0===n?o:-l/2,g=n===s?u-l*n:l/2,y=new d.A({xmin:m,xmax:g,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),x=0===n?c-h:n===s?t-f:c;f+=x,p.push(x);let w=r.disableWrapAround&&n>0?null:this._fetchPixels(y,x,i,r);a.push(w)}let m=(await Promise.all(a)).map(e=>e?.pixelBlock),g=null,x={width:t,height:i};return g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:x,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:p},r)).pixelBlock:(0,k.z7)(m,x,{blockWidths:p}),{extent:e,srcExtent:(0,y._l)(e,this.rasterInfo.spatialReference,r.datumTransformation),pixelBlock:g}}async fetchRawPixels(e,t,i,r={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};let n=await this._fetchRawTiles(e,t,i,r),{nativeExtent:l,nativePixelSize:s,storageInfo:a}=this.rasterInfo,o=2**e,u=s.x*o,c=s.y*o,h=new d.A({xmin:l.xmin+u*t.x,xmax:l.xmin+u*(t.x+i.width-1),ymin:l.ymax-c*(t.y+i.height-1),ymax:l.ymax-c*t.y,spatialReference:l.spatialReference});if(!n)return{extent:h,srcExtent:h,pixelBlock:null};let{pixelBlocks:f,mosaicSize:p}=n;if(1===f.length&&null!=f[0]&&f[0].width===i.width&&f[0].height===i.height)return{extent:h,srcExtent:h,pixelBlock:n.pixelBlocks[0]};let m,g=e>0?a.pyramidBlockWidth:a.blockWidth,y=e>0?a.pyramidBlockHeight:a.blockHeight,x={x:t.x%g,y:t.y%y};return m=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:f,srcMosaicSize:p,destDimension:i,clipOffset:x,clipSize:i,coefs:null,sampleSpacing:null,interpolation:r.interpolation,alignmentInfo:null,blockWidths:null},r)).pixelBlock:(0,k.z7)(f,p,{clipOffset:x,clipSize:i}),{extent:h,srcExtent:h,pixelBlock:m}}fetchRawTile(e,t,i,r){throw new l.A("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,y._l)(this.rasterInfo.extent,e)}decodePixelBlock(e,t,i){return this.rasterJobHandler?this.rasterJobHandler.decode({data:e,options:t},i):(0,S.D)(e,t,i)}async request(e,t,i=0){let{customFetchParameters:r}=this.ioConfig,{range:l,query:s,headers:a}=t;i=i??t.retryCount??this.ioConfig.retryCount;let o=l?{Range:`bytes=${l.from}-${l.to}`}:null;try{return await(0,n.A)(e,{...t,query:{...s,...r},headers:{...a,...o}})}catch(r){if(i>0)return i--,this.request(e,t,i);throw r}}getSliceIndex(e){let{multidimensionalInfo:t}=this.rasterInfo;return null==t||null==e||0===e.length?null:(0,g.NG)(e,t)}getTileExtentFromTileInfo(e,t,i,r){let n=r.lodAt(e);return n?this.getTileExtent({x:n.resolution,y:n.resolution},t,i,r.origin,r.spatialReference,r.size):null}updateTileInfo(){let{storageInfo:e,spatialReference:t,extent:i,pixelSize:r}=this.rasterInfo,{pyramidResolutions:n}=e;if(!e.tileInfo){let l=[],s=e.maximumPyramidLevel||0,a=(r.x+r.y)/2,o=1/.0254*96*a;for(let e=0;e<=s&&(l.unshift(new F.A({level:s-e,resolution:a,scale:o})),e!==s);e++)if(n){let t=(n[e].x+n[e].y)/2;o*=t/a,a=t}else a*=2,o*=2;let u=new f.A({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new B.A({origin:u,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:l}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,r){let{width:n,height:l,nativeExtent:s,pixelSize:a,spatialReference:o}=e,u=new f.A({x:s.xmin,y:s.ymax,spatialReference:o});r??=Math.max(0,Math.round(Math.log(Math.max(n,l))/Math.LN2-8));let c=this.computeBlockBoundary(s,t,i,{x:s.xmin,y:s.ymax},[a],r);e.storageInfo=new z.A({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:u,firstPyramidLevel:1,maximumPyramidLevel:r,blockBoundary:c})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,r,n,l=0,s=2){if(1===n.length&&l>0){n=[...n];let{x:e,y:t}=n[0];for(let i=0;i<l;i++)e*=s,t*=s,n.push({x:e,y:t})}let a=[],{x:o,y:u}=r;for(let r=0;r<n.length;r++){let{x:l,y:s}=n[r];a.push({minCol:Math.floor((e.xmin-o+.1*l)/t/l),maxCol:Math.floor((e.xmax-o-.1*l)/t/l),minRow:Math.floor((u-e.ymax+.1*s)/i/s),maxRow:Math.floor((u-e.ymin-.1*s)/i/s)})}return a}getPyramidPixelSize(e){let{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:r}=this.rasterInfo.storageInfo;if(0===e)return t;if(null!=i&&i.length)return i[e-1];let n=r**e;return{x:t.x*n,y:t.y*n}}identifyPixelLocation(e,t,i,r){let{spatialReference:n,nativeExtent:l,storageInfo:s}=this.rasterInfo,{maximumPyramidLevel:a,origin:o,transposeInfo:u}=s,c=r&&null!=u?u.tileSize[0]:s.blockWidth,h=r&&null!=u?u.tileSize[1]:s.blockHeight,d=(0,y._I)(e,n,i);if(!l.intersects(d)||t<0||t>a)return null;let{x:f,y:p}=this.getPyramidPixelSize(t),m=(o.y-d.y)/p/h,g=(d.x-o.x)/f/c,x=Math.min(h-1,Math.floor((m-Math.floor(m))*h)),w=Math.min(c-1,Math.floor((g-Math.floor(g))*c));return{pyramidLevel:t,row:Math.floor(m),col:Math.floor(g),rowOffset:x,colOffset:w,blockWidth:c,srcLocation:d}}getTileExtent(e,t,i,r,n,l){let[s,a]=l,o=r.x+i*s*e.x,u=o+s*e.x,c=r.y-t*a*e.y,h=c-a*e.y;return new d.A({xmin:o,xmax:u,ymin:h,ymax:c,spatialReference:n})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){let r=this.rasterInfo.storageInfo.blockBoundary[e];return!r||r.maxRow<t||r.maxCol<i||r.minRow>t||r.minCol>i}updateImageSpaceRasterInfo(e){let{pixelSize:t}=e,{width:i,height:r}=e,n=p.A.WebMercator;e.spatialReference=n,e.extent=e.nativeExtent=new d.A({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-r,spatialReference:n}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new f.A({x:1,y:1,spatialReference:n});let{extent:l,storageInfo:s}=e;if(s){s.origin=new f.A({x:l.xmin,y:l.ymax,spatialReference:n});let{pyramidResolutions:i,tileInfo:r}=s;if(i&&i.forEach(e=>{e.x/=t.x,e.y/=t.y}),r){r.origin=s.origin;let t=(e.nativePixelSize.x+e.nativePixelSize.y)/2;r.lods.forEach((e,i)=>{e.resolution=t*2**i,e.scale=96*e.resolution/.0254})}}}async _refresh(e){return{dataChanged:!0}}async _fetchPixels(e,t,i,r={}){let n=(0,y.OM)(e);if(n>=2)return{extent:e,pixelBlock:null};let l=this._getSourceDataInfo(e,t,i,r),{pyramidLevel:s,srcResolution:a,srcWidth:o,srcHeight:u,ul:c}=l,{srcExtent:h}=l;if(0===o||0===u)return{extent:e,srcExtent:h,pixelBlock:null};let{rasterInfo:d}=this,p=d.transform,m="gcs-shift"===p?.type,g=null!=(0,y.FT)(e.spatialReference);(m||!g)&&(n=(0,y.OM)(h,m));let x=await this._fetchRawTiles(s,c,{width:o,height:u,wrapCount:n},r);if(!x)return{extent:e,srcExtent:h,pixelBlock:null};h=x.extent;let w=d.storageInfo,R=s>0?w.pyramidBlockWidth:w.blockWidth,b=s>0?w.pyramidBlockHeight:w.blockHeight,{x:v,y:I}=d.pixelSize;if(s>0){let{pyramidResolutions:e,pyramidScalingFactor:t}=w;if(null!=e&&e[s-1])({x:v,y:I}=e[s-1]);else{let e=t**s;v*=e,I*=e}}let _=d.spatialReference,S=new f.A({x:v,y:I,spatialReference:_}),C=R===o&&b===u&&c.x%R===0&&c.y%b===0,T=new f.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),A=!e.spatialReference.equals(_),P=_.isGeographic?1e-9:1e-4,{datumTransformation:F}=r;if(!A&&C&&1===x.pixelBlocks.length&&R===t&&b===i&&function(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}(a,T,P))return{extent:e,srcExtent:h,srcTilePixelSize:S,pixelBlock:x.pixelBlocks[0]};let z=g&&null!=(0,y.FT)(h.spatialReference)&&this._hasNoneOrGCSShiftTransform,B=r.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");B&&!this.rasterJobHandler&&await(0,y.Hh)();let D,J=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:h,pixelSize:T.toJSON(),datumTransformation:F,rasterTransform:p,hasWrapAround:n>0||z,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:B},r):(0,y.l0)({projectedExtent:e,srcBufferExtent:h,pixelSize:T,datumTransformation:F,rasterTransform:p,hasWrapAround:n>0||z,isAdaptive:!1,includeGCSGrid:B}),H=!r.requestRawData,N={rows:J.spacing[0],cols:J.spacing[1]},O=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(s,h.xmin):void 0,{pixelBlocks:E,mosaicSize:Z,isPartiallyFilled:L}=x,W=null;if(this.rasterJobHandler){let e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:E,srcMosaicSize:Z,destDimension:H?{width:t,height:i}:null,coefs:H?J.coefficients:null,sampleSpacing:H?N:null,projectDirections:B,gcsGrid:B?J.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:r.interpolation,alignmentInfo:O,blockWidths:null},r);({pixelBlock:D,localNorthDirections:W}=e)}else{let e=(0,k.z7)(E,Z,{alignmentInfo:O});D=H?(0,k.$i)(e,{width:t,height:i},J.coefficients,N,r.interpolation):e,B&&J.gcsGrid&&(W=(0,k.QF)({width:t,height:i},J.gcsGrid),D=(0,M.Y2)(D,this.rasterInfo.dataType,W))}return r.requestRawData||B?{extent:e,srcExtent:h,srcTilePixelSize:S,pixelBlock:D,transformGrid:J,localNorthDirections:W,isPartiallyFilled:L}:{extent:e,srcExtent:e,srcTilePixelSize:S,pixelBlock:D}}async _fetchRawTiles(e,t,i,r){let{origin:n,blockBoundary:l}=this.rasterInfo.storageInfo,{blockWidth:s,blockHeight:a}=this.getBlockWidthHeight(e),{x:o,y:u}=t,{width:c,height:h,wrapCount:f}=i,p=this._getRasterTileAlignmentInfo(e,0);r.buffer&&(o-=r.buffer.cols,u-=r.buffer.rows,c+=2*r.buffer.cols,h+=2*r.buffer.rows);let m=0,g=0,y=0;f&&null!=p&&(({worldColumnCountFromOrigin:g,originColumnOffset:y,rightPadding:m}=p),g*p.blockWidth-m>=o+c&&(m=0));let x=Math.floor(o/s),w=Math.floor(u/a),R=Math.floor((o+c+m-1)/s),b=Math.floor((u+h+m-1)/a),v=l[e];if(!v)return null;let{minRow:I,minCol:_,maxCol:S,maxRow:C}=v;if(0===f&&(b<I||R<_||w>C||x>S))return null;let k=[],M=!1,T=null==this.ioConfig.allowPartialFill?r.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=w;t<=b;t++)for(let i=x;i<=R;i++){let n=i;if(!r.disableWrapAround&&f&&null!=p&&g<=i&&(n=i-g-y),t>=I&&n>=_&&C>=t&&S>=n){let i=this._fetchRawTile(e,t,n,r);T?k.push(new Promise(e=>{i.then(t=>e(t)).catch(()=>{M=!0,e(null)})})):k.push(i)}else k.push(Promise.resolve(null))}if(0===k.length)return null;let A=await Promise.all(k),P={height:(b-w+1)*a,width:(R-x+1)*s},{spatialReference:F}=this.rasterInfo,{x:z,y:B}=this.getPyramidPixelSize(e);return{extent:new d.A({xmin:n.x+x*s*z,xmax:n.x+(R+1)*s*z,ymin:n.y-(b+1)*a*B,ymax:n.y-w*a*B,spatialReference:F}),pixelBlocks:A,mosaicSize:P,isPartiallyFilled:M}}_fetchRawTile(e,t,i,r){let{storageInfo:n}=this.rasterInfo,l=null!=n.transposeInfo&&!!r.transposedVariableName;if(!l){let r=n.blockBoundary[e];if(!r)return Promise.resolve(null);let{minRow:l,minCol:s,maxCol:a,maxRow:o}=r;if(t<l||i<s||t>o||i>a)return Promise.resolve(null)}let s=l?r.transposeVariableName:r.sliceId,a=n.isBsqTile?r.bandIds:null,u=function(e,t,i){let r=[];return null!=t&&r.push(`sliceId=${t}`),null!=i&&r.push(`bandIds=${i.join(",")}`),r.length?`${e}?${r.join("&")}`:e}(this.rasterId,s,a),c=`${e}/${t}/${i}`,h=this.ioConfig.rawBlockCacheMode??"default",d="no-cache"===h,f="minimum"===h?void 0:r.registryId,p=d?null:b(u,f,c);if(null==p){let l=d?null:new AbortController,s=l?.signal??r.signal,a=r.bandIds?.slice();if(a?.length&&n.isBsqTile){let n=new Set(a),l=[],o=Array.from(n);for(let n of o)l.push(this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:{...r,bandIds:[n]}},{signal:s}));p=Promise.all(l).then(e=>{if(e.some(e=>null==e))return null;if(o.length!==a.length){let t=[];for(let i of a){let r=e[o.indexOf(i)];t.includes(r)&&(r=r.clone()),t.push(r)}e=t}return this.rasterJobHandler?this.rasterJobHandler.compositeBands({pixelBlocks:e},{signal:s,transferPixelsToWorker:!0}):(0,k.Wy)(e)})}else p=this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:r},{signal:s});d||(v(u,f,c,p,l),p.catch(()=>I(u,f,c)))}return!d&&r.signal&&(0,o.u7)(r,()=>{R(u,f,c)}),p}_computeMagDirValues(e){let{bandCount:t,dataType:i}=this.rasterInfo;if((2!==t||"vector-magdir"!==i)&&"vector-uv"!==i||2!==e?.length||!e[0]?.length)return null;let r=e[0].length;if("vector-magdir"===i){let t=e[1].map(e=>(e+360)%360);return[e[0],t]}let[n,l]=e,s=[],a=[];for(let e=0;e<r;e++){let[t,i]=(0,M.Lu)([n[e],l[e]]);s.push(t),a.push(i)}return[s,a]}_getRasterTileAlignmentInfo(e,t){return this._rasterTileAlignmentInfo??=(0,y.DO)(this.rasterInfo),null==this._rasterTileAlignmentInfo.pyramidsInfo?null:{startX:t,halfWorldWidth:this._rasterTileAlignmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlignmentInfo.hasGCSSShiftTransform,...this._rasterTileAlignmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,r={}){let n={datumTransformation:r.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0,ul:{x:0,y:0}};r.srcResolution&&(n.srcResolution=r.srcResolution,this._updateSourceDataInfo(e,n));let l=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:s,srcHeight:a,pyramidLevel:o}=n,u=s/t,c=a/i,h=o<l&&u*c>=16,d=o===l&&this._requireTooManySrcTiles(s,a,t,i);if(h||d||0===s||0===a){let s=new f.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),a=(0,y.Wo)(s,this.rasterInfo.spatialReference,e,n.datumTransformation),d=!a||r.srcResolution&&a.x+a.y<r.srcResolution.x+r.srcResolution.y;if(h&&r.srcResolution&&d){let e=Math.round(Math.log(Math.max(u,c))/Math.LN2)-1;if(l-o+3>=e){let t=2**e;a={x:r.srcResolution.x*t,y:r.srcResolution.y*t}}}a&&(n.srcResolution=a,this._updateSourceDataInfo(e,n))}return this._requireTooManySrcTiles(n.srcWidth,n.srcHeight,t,i)&&(n.srcWidth=0,n.srcHeight=0),n}_requireTooManySrcTiles(e,t,i,r){let{tileInfo:n}=this.rasterInfo.storageInfo,l=e/i,s=t/r;return Math.ceil(e/n.size[0])*Math.ceil(t/n.size[1])>=256*Math.max(1,(i+r)/1024)||l>8||s>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;let{rasterInfo:i}=this,r=i.spatialReference,{srcResolution:n,datumTransformation:l}=t,{pyramidLevel:s,pyramidResolution:a,excessiveReading:o}=(0,y.t$)(n,i,this.ioConfig.sampling);if(o)return;let u=t.srcExtent||(0,y._l)(e,r,l);if(null==u)return;let c=i.transform;c&&(u=c.inverseTransform(u)),t.srcExtent=u;let{origin:h}=i.storageInfo,{width:d,height:f,ul:p}=(0,m.$g)(u,h,a,s);t.pyramidLevel=s,t.pyramidResolution=a,t.srcWidth=d,t.srcHeight=f,t.ul=p}_getRequestOptionsWithSliceId(e){return null!=this.rasterInfo.multidimensionalInfo&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){let{srcLocation:i,position:r,pyramidLevel:n,useTransposedTile:l}=t,s=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[r])return{location:i,value:null};let{multidimensionalInfo:a}=this.rasterInfo;if(null==a||!l){let t=e.pixels.map(e=>e[r]),l={location:i,value:t,pyramidLevel:n},s=this._computeMagDirValues(t.map(e=>[e]));return s?.length&&(l.magdirValue=s.map(e=>e[0])),l}let o=e.pixels.map(e=>e.slice(r*s,r*s+s)),u=this._computeMagDirValues(o),{requestSomeSlices:c,identifyOptions:h}=t,d=(0,g.QW)(a,h.transposedVariableName);if(c){let e=(0,g.xx)(d,h.multidimensionalDefinition,h.timeExtent);o=o.map(t=>e.map(e=>t[e])),u=u?.map(t=>e.map(e=>t[e])),d=e.map(e=>d[e])}let f,p=e.noDataValues||this.rasterInfo.noDataValue,m={pixels:o,pixelType:e.pixelType};return null!=p&&((0,_.Sp)(m,p),f=m.mask),{location:i,value:null,dataSeries:d.map((e,t)=>{let i={value:0===f?.[t]?null:o.map(e=>e[t]),multidimensionalDefinition:e.multidimensionalDefinition.map(e=>new P.A({...e,isSlice:!0}))};return u?.length&&(i.magdirValue=[u[0][t],u[1][t]]),i}),pyramidLevel:n}}};(0,r.Cg)([(0,c.MZ)()],J.prototype,"_rasterTileAlignmentInfo",void 0),(0,r.Cg)([(0,c.MZ)()],J.prototype,"_tileFetchQueue",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],J.prototype,"_isGlobalWrappableSource",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],J.prototype,"_hasNoneOrGCSShiftTransform",null),(0,r.Cg)([(0,c.MZ)()],J.prototype,"_openPromise",void 0),(0,r.Cg)([(0,c.MZ)()],J.prototype,"rasterJobHandler",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],J.prototype,"rasterId",null),(0,r.Cg)([(0,c.MZ)(A.OZ)],J.prototype,"url",null),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],J.prototype,"datasetName",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],J.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,c.MZ)()],J.prototype,"hasUniqueSourceStorageInfo",void 0),(0,r.Cg)([(0,c.MZ)()],J.prototype,"rasterInfo",void 0),(0,r.Cg)([(0,c.MZ)()],J.prototype,"ioConfig",void 0),(0,r.Cg)([(0,c.MZ)()],J.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,c.MZ)()],J.prototype,"rawBlockRegistryIds",void 0),J=(0,r.Cg)([(0,c.$K)("esri.layers.raster.datasets.BaseRaster")],J)},23636(e,t,i){i.d(t,{A:()=>p});var r=i(32198),n=i(49186),l=i(91429),s=i(5443),a=i(86738),o=i(39829),u=i(49859),c=i(34930),h=i(47520),d=i(37373),f=i(22671);let p=class extends u.A{constructor(){super(...arguments),this.datasetFormat="Function",this.tileType="Raster",this.rasterFunction=null,this._clippingGeometry=new Map}async fetchPixels(e,t,i,r={}){let{rasters:n}=this.primaryRasters,l=!1,{interpolation:s}=r,a=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!r.requestRawData&&a&&(l=1===n.length&&!r.skipRasterFunction,r={...r,interpolation:"bilinear",requestRawData:l}),r.requestRawData&&n.length>1&&!this.hasUniqueSourceStorageInfo&&(l=!1,r={...r,requestRawData:!1});let o=n.map(n=>n.fetchPixels(e,t,i,r)),u=await Promise.all(o),d=u.map(e=>e.pixelBlock),f=l||r.requestRawData?u.map(e=>e.srcTilePixelSize):void 0;if(r.skipRasterFunction||d.every(e=>null==e))return u[0];let p=u.find(e=>null!=e.pixelBlock)?.extent??e,m=await this._processPixelBlock(d,p,f),{transformGrid:g}=u[0];if(!l||null==m||null==g){let e=r.noClip?null:this.getClippingGeometry(p.spatialReference);return!r.noClip&&null!=m&&e&&(m=await(0,c.$Q)(m,p,e)),{...u[0],pixelBlock:m}}let y,x={rows:g.spacing[0],cols:g.spacing[1]};y=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[m],srcMosaicSize:{width:m.width,height:m.height},destDimension:{width:t,height:i},coefs:g.coefficients,sampleSpacing:x,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:s,alignmentInfo:void 0,blockWidths:null},r)).pixelBlock:(0,h.$i)(m,{width:t,height:i},g.coefficients,x,s);let w=r.noClip?null:this.getClippingGeometry(e.spatialReference);return!r.noClip&&null!=y&&null!=w&&(y=await(0,c.$Q)(y,e,w)),{extent:e,srcExtent:u[0].srcExtent,pixelBlock:y,srcTilePixelSize:u[0].srcTilePixelSize}}async processOnePixel(e,t){let{extent:i,pixelBlock:r}=t;if(!r)return null;let{row:n,col:l}=e,{width:a,height:o}=r;if(n<0||n>=o||l<0||l>=a)return null;let{neighborhoodSize:u}=this.rasterFunction,c=Math.max(2,u.rows),d=Math.max(2,u.cols),f=d>>>1,p=c>>>1,m={x:Math.max(0,l-f),y:Math.max(0,n-p)},g=i.width/a,y=i.height/o,x=i.xmin+g*m.x,w=x+g*d,R=i.ymax-y*m.y,b=R-y*c,v=new s.A({xmin:x,ymin:b,xmax:w,ymax:R,spatialReference:i.spatialReference}),I=(0,h.$Q)(r,m,{width:d,height:c});if(null==I)return null;let _=await this.processPixelData({extent:v,pixelBlock:I}),S=(n-m.y)*d+(l-m.x);return _&&0!==_.mask?.[S]?_.pixels.map(e=>e[S]):null}async processPixelData(e){let{extent:t,pixelBlock:i}=e;if(!i)return null;let r=new a.A({x:t.width/i.width,y:t.height/i.height,spatialReference:t.spatialReference});return await this._processPixelBlock([i],t,[r])}getClippingGeometry(e){let t=this._clippingGeometry.get("0");if(!e||!t)return t;let i=function(e){return String(e.wkid??e.wkt??e.wkt2)}(e),r=this._clippingGeometry.get(i);return r??(r=e.equals(t.spatialReference)?t:(0,d.uk)(t,e),this._clippingGeometry.set(i,r)),r}async _open(e){let{rasterFunction:t}=this;t.isRoot=!0,this.primaryRasters?.rasters?.length?t.sourceRasters=this.primaryRasters.rasters:(this.primaryRasters=t.getPrimaryRasters(),this.rasterJobHandler&&this.primaryRasters.rasters?.forEach(e=>e.rasterJobHandler=this.rasterJobHandler));let{rasters:i,rasterIds:r}=this.primaryRasters,l=i.map(t=>t.rasterInfo?void 0:t.open(e));await Promise.all(l);let s=i.map(({rasterInfo:e})=>e),a=t.bind({rasterInfos:s,rasterIds:r});if(t.rawSourceRasterInfos=s,!a.success||0===s.length)throw new n.A("raster-function:open",`cannot bind the function: ${a.error??""}`);let o="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===o?.functionName&&(t.rasterInfo.attributeTable=f.A.fromJSON(o.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();let u=s[0];this.hasUniqueSourceStorageInfo=1===s.length||s.slice(1).every(e=>function(e,t){let{storageInfo:i,pixelSize:r,spatialReference:n,extent:l}=e,{storageInfo:s,pixelSize:a,spatialReference:o,extent:u}=t;return r.x===a.x&&r.y===a.y&&n.equals(o)&&l.equals(u)&&i.blockHeight===s.blockHeight&&i.blockWidth===s.blockWidth&&i.maximumPyramidLevel===s.maximumPyramidLevel&&i.firstPyramidLevel===s.firstPyramidLevel&&i.pyramidBlockWidth===s.pyramidBlockWidth&&i.pyramidBlockHeight===s.pyramidBlockHeight&&i.pyramidScalingFactor===s.pyramidScalingFactor}(e,u)),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",t.rasterInfo),await this._updateClipGeometry()}async syncJobHandler(){return this.rasterJobHandler?.updateRasterFunction(this.rasterFunction)}async _processPixelBlock(e,t,i){let{processParameters:r,primaryRasters:{rasterIds:n}}=this;return this.rasterJobHandler?await this.rasterJobHandler.process({extent:t,primaryPixelBlocks:e,primaryPixelSizes:i,primaryRasterIds:n,parameters:r}):this.rasterFunction.process({extent:t,primaryPixelBlocks:e,primaryPixelSizes:i,primaryRasterIds:n},r)}async _updateClipGeometry(){let e=this.rasterFunction.getClippingGeometries()[0],t=e?.clippingGeometry;if(t&&"inside"===e.clippingType){let{extent:e}=this.rasterInfo,{densifyExecute:r}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(4642)]).then(()=>i(88411)),{differenceExecute:n}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(7217)]).then(()=>i(93054)),l=r(o.A.fromExtent(e),2*(e.width+e.height)/40);l=(0,d.uk)(l,t.spatialReference),t=n(l,t)}this._clippingGeometry.clear(),t&&this._clippingGeometry.set("0",t)}};(0,r.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,l.MZ)()],p.prototype,"tileType",void 0),(0,r.Cg)([(0,l.MZ)()],p.prototype,"rasterFunction",void 0),(0,r.Cg)([(0,l.MZ)()],p.prototype,"processParameters",void 0),(0,r.Cg)([(0,l.MZ)()],p.prototype,"primaryRasters",void 0),p=(0,r.Cg)([(0,l.$K)("esri.layers.raster.datasets.FunctionRaster")],p)},330(e,t,i){function r(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";let n=[];if(t){let l=r(e,i);for(let e=0;e<l.length;e++)r(l[e],t).forEach(e=>n.push(e));return n}let l=e.getElementsByTagNameNS("*",i);if(!l||0===l.length)return[];for(let e=0;e<l.length;e++)n.push(l[e]||l.item(e));return n}function n(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";let l=r(e,i);return l.length>0?t?n(l[0],t):l[0]:null}function l(e,t=null){let i,r=t?n(e,t):e;return r?(i=r.textContent||r.nodeValue,i?i.trim():null):null}function s(e,t){let i,n=r(e,t),l=[];for(let e=0;e<n.length;e++)i=n[e].textContent||n[e].nodeValue,i&&(i=i.trim(),""!==i&&l.push(i));return l}function a(e,t=null){return l(e,t)?.split(" ").map(e=>Number(e))??[]}function o(e,t){return s(e,t).map(e=>Number(e))}function u(e,t){let i=l(e,t);return Number(i)}function c(e,t){let i=e?.nodeName?.toLowerCase(),r=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===r}function h(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}i.d(t,{Dy:()=>s,IC:()=>r,Ui:()=>o,V6:()=>n,g7:()=>c,mX:()=>l,pN:()=>a,v7:()=>u,vv:()=>h})},91806(e,t,i){i.d(t,{A:()=>o});var r,n=i(32198),l=i(25482),s=i(91429),a=i(78888);let o=class extends l.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"cols",void 0),(0,n.Cg)([(0,s.MZ)({type:a.jz,json:{write:!0}})],o.prototype,"level",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],o.prototype,"levelValue",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"origin",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],o.prototype,"resolution",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"rows",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],o.prototype,"scale",void 0),o=r=(0,n.Cg)([(0,s.$K)("esri.layers.support.LOD")],o)},87045(e,t,i){i.d(t,{A:()=>w});var r,n=i(32198),l=i(66552),s=i(25482),a=i(86211),o=i(91429),u=i(78888),c=i(86738),h=i(16930),d=i(21325),f=i(28735),p=i(91806),m=i(72802),g=i(36005),y=i(43937);const x=new l.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",JPEGPlus:"jpgplus",pbf:"pbf"});let w=class extends s.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:n=256,spatialReference:l=h.A.WebMercator,numLODs:s=24}=e;if(!(0,d.fn)(l)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new p.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=s-1;i>=0;i--)e.unshift(new p.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new c.A({x:0,y:0,spatialReference:l}),size:[n,n],spatialReference:l})}let o=(0,d.Vp)(l),u=e.origin?new c.A({x:e.origin.x,y:e.origin.y,spatialReference:l}):o?new c.A({x:o.origin[0],y:o.origin[1],spatialReference:l}):new c.A({x:0,y:0,spatialReference:l}),f=1/(39.37*(0,a.GA)(l)*96),m=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*f;m.push(new p.A({level:e,scale:t,resolution:r}))}else{let e=(0,d.EA)(l)?512/n*591657527.5917094:256/n*591657527.591555,i=Math.ceil(s/t);m.push(new p.A({level:0,scale:e,resolution:e*f}));for(let r=1;r<i;r++){let i=e/2**t,n=i*f;m.push(new p.A({level:r,scale:i,resolution:n})),e=i}}return new r({dpi:96,lods:m,origin:u,size:[n,n],spatialReference:l})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){let{spatialReference:e,origin:t}=this;if(e&&t){let i=(0,d.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return c.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0,r=[],n=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,n[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){let t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];let i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){let t=this.scales,i=t.length-1,r=0;for(;r<i;r++){let i=t[r],n=t[r+1];if(i<=e)return r;if(n===e)return r+1;if(i>e&&n<e)return r+Math.log(i/e)/Math.log(i/n)}return r}tileAt(e,t,i,r){let n,l,s=this.lodAt(e);if(!s)return null;if("number"==typeof t)n=t,l=i;else if((0,d.aI)(t.spatialReference,this.spatialReference))n=t.x,l=t.y,r=i;else{let e=(0,f.Cv)(t,this.spatialReference);if(null==e)return null;n=e.x,l=e.y,r=i}let a=s.resolution*this.size[0],o=s.resolution*this.size[1];return r??=new m.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-l)/o+.001),r.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){let t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;let r=e.level-i.level,n=i.resolution*this.size[0]/2**r,l=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*l,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+l,!0}upsampleTile(e){let t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){let i=this.lodAt(t.level);if(null==i)return null;let{resolution:r}=i,n=r*this.size[0],l=r*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*l,e[2]=e[0]+n,e[3]=e[1]+l,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;let t=(512===this.size[0]&&256===e?-1:0)+ +!!this.spatialReference.isGeographic;if(this.size[0]===e&&0===t)return this;let i=[],n=this.lods.length-t;for(let e=0;e<n;e++){let r=e+t,{scale:n,resolution:l}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new p.A({level:e,scale:n,resolution:l}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){let e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){let r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{read:x.read,write:x.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,n.Cg)([(0,o.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,n.Cg)([(0,o.MZ)({type:c.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,n.Cg)([(0,g.w)("origin")],w.prototype,"readOrigin",null),(0,n.Cg)([(0,o.MZ)({type:[p.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,n.Cg)([(0,o.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,n.Cg)([(0,o.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,n.Cg)([(0,g.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,n.Cg)([(0,y.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],w.prototype,"writeSize",null),(0,n.Cg)([(0,o.MZ)({type:h.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=r=(0,n.Cg)([(0,o.$K)("esri.layers.support.TileInfo")],w)},72802(e,t,i){i.d(t,{U:()=>n});var r=i(19419);class n{constructor(e,t,i,n=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=n}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new n(e.level,e.row,e.col,e.extent)}}}}]);