@arcgis/core 4.33.0-next.20250209 → 4.33.0-next.20250211

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 (279) hide show
  1. package/AttributeBinsGraphic.js +1 -1
  2. package/Graphic.js +1 -1
  3. package/Ground.js +1 -1
  4. package/WebMap.js +1 -1
  5. package/WebScene.js +1 -1
  6. package/arcade/ArcadeModuleResolver.js +1 -1
  7. package/arcade/featureset/actions/Adapted.js +1 -1
  8. package/arcade/featureset/support/FeatureSet.js +1 -1
  9. package/arcade/featureset/support/Guid.js +1 -1
  10. package/arcade/featureset/support/cache.js +1 -1
  11. package/assets/esri/core/workers/RemoteClient.js +1 -1
  12. package/assets/esri/core/workers/chunks/{d31f7598629f7cc50233.js → 004853abf357f865b4fa.js} +1 -1
  13. package/assets/esri/core/workers/chunks/00e374e3b4781c4f9a3e.js +1 -0
  14. package/assets/esri/core/workers/chunks/{746c964cf07e4306f21f.js → 03f51ea011ffbcfb7c7d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{ad3e692681b50bd1acc2.js → 03fac4c79641603d8cba.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{0167cf867d8e46c818b0.js → 09260bbe1fd6ce5a53e6.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{d1718ad93e3271b0525e.js → 0e4350fda5328862f2fb.js} +1 -1
  18. package/assets/esri/core/workers/chunks/12199e8abf377ffc27cd.js +1 -0
  19. package/assets/esri/core/workers/chunks/1a286d43daa3b811c30d.js +1 -0
  20. package/assets/esri/core/workers/chunks/{e5e3b6d00d27b5bb354f.js → 1d282700e76285a1684c.js} +1 -1
  21. package/assets/esri/core/workers/chunks/2130e0c8d2410c87f880.js +1 -0
  22. package/assets/esri/core/workers/chunks/2530e5d1f438db8a7b5c.js +1 -0
  23. package/assets/esri/core/workers/chunks/{dfaf1da323906ee60549.js → 2876419a32537e24b7da.js} +1 -1
  24. package/assets/esri/core/workers/chunks/2b733e8043659466e194.js +1 -0
  25. package/assets/esri/core/workers/chunks/311c85bd94d5fb28e272.js +1 -0
  26. package/assets/esri/core/workers/chunks/33c6fd524711efd8ef13.js +1 -0
  27. package/assets/esri/core/workers/chunks/{594d923400fd74881833.js → 35392bf8f21005ad6170.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{de1f3c4b8000c2d73013.js → 39dca492cc5f089e1609.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{5b85f9da022742f602e2.js → 3c8e5b5fb52611e30ed6.js} +1 -1
  30. package/assets/esri/core/workers/chunks/491effb2c681493cc3a6.js +1 -0
  31. package/assets/esri/core/workers/chunks/{e93dea6b112ce8e2779b.js → 4b47549614d53ce1e384.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{369a2b8484a8807bde38.js → 4be5e453fe54f5631659.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{2971266a49226e769360.js → 5e5045add6567588b90a.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{5721557a1d8eab23a55b.js → 5eceedac9b2b4d1ef133.js} +1 -1
  35. package/assets/esri/core/workers/chunks/6a9a1cd8134a903dd05a.js +1 -0
  36. package/assets/esri/core/workers/chunks/6c9bb00f33649ab59dab.js +314 -0
  37. package/assets/esri/core/workers/chunks/7485588bd24217669578.js +1 -0
  38. package/assets/esri/core/workers/chunks/74e0116ae84def626c87.js +1 -0
  39. package/assets/esri/core/workers/chunks/{c4374b6bc5c8dc6435c7.js → 7c81e08fc8a67dcd9dad.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{433576983754f690bcc7.js → 7e3b374f906441cd7fb0.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{8c32cee395da0a7b9a8e.js → 80d3aa3f27ad5b2b969b.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{de4384b5833a60e88e31.js → 84c1c3336011a1b79669.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{9d61590c4d21c7421925.js → 88a34690480d3658bad8.js} +1 -1
  44. package/assets/esri/core/workers/chunks/8939479cd433cc53f6c1.js +1 -0
  45. package/assets/esri/core/workers/chunks/{28dd172faa85080511c5.js → 8a2f3ce46eeac853b3a9.js} +1 -1
  46. package/assets/esri/core/workers/chunks/8b6580329e1e35ea4190.js +1 -0
  47. package/assets/esri/core/workers/chunks/8bfeef7cffe1e65c9dab.js +1 -0
  48. package/assets/esri/core/workers/chunks/{b44cf0e4c2f93408cabc.js → 9205115bdb5bc03d0c02.js} +1 -1
  49. package/assets/esri/core/workers/chunks/92d76d59113b4139befe.js +1 -0
  50. package/assets/esri/core/workers/chunks/9421ae38fdf986b9b107.js +1 -0
  51. package/assets/esri/core/workers/chunks/99c136b800e5fc7e04f4.js +1 -0
  52. package/assets/esri/core/workers/chunks/{d339dee99c4820b63f39.js → 9b74635d80d029498da1.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{c2336d1f5b2b7bf6e7a7.js → 9bd6a4bf8150a6f618ea.js} +1 -1
  54. package/assets/esri/core/workers/chunks/9e7895e8201127ffe0a8.js +1 -0
  55. package/assets/esri/core/workers/chunks/{15e08e8a8a72b177d74c.js → a38cb1fff519bad8abe3.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{7b367bb0ed9c218ca595.js → a52690a27f8732739c02.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{cdd8983cf3a301805680.js → a52c282609a7e9c8ca9e.js} +1 -1
  58. package/assets/esri/core/workers/chunks/a56b3dffd9f38973f350.js +1 -0
  59. package/assets/esri/core/workers/chunks/a9274c9132e7a2691abb.js +1 -0
  60. package/assets/esri/core/workers/chunks/b253cf42e53f957b4b4e.js +1 -0
  61. package/assets/esri/core/workers/chunks/b50176897ffadc53573e.js +1 -0
  62. package/assets/esri/core/workers/chunks/{c26ffbff1115e76bcb0f.js → baee20c14763bef80b09.js} +1 -1
  63. package/assets/esri/core/workers/chunks/c3dc355d0f8d89b9b7b8.js +1 -0
  64. package/assets/esri/core/workers/chunks/c77ade444aa2f3f2b599.js +1 -0
  65. package/assets/esri/core/workers/chunks/c7927c2d5414f19defd5.js +1 -0
  66. package/assets/esri/core/workers/chunks/ca6180e572e69540c183.js +1 -0
  67. package/assets/esri/core/workers/chunks/{16f82e9d98371431b46d.js → cc085918c63da416e59d.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{8e90c5fee4ad7c7275dc.js → cccd215b0a4890551957.js} +1 -1
  69. package/assets/esri/core/workers/chunks/ce88224af357957dd83a.js +1 -0
  70. package/assets/esri/core/workers/chunks/{07c5f3fc475c57f5a7a7.js → cf00df122df3db3b0c23.js} +1 -1
  71. package/assets/esri/core/workers/chunks/d074c916b414432a7b6a.js +1 -0
  72. package/assets/esri/core/workers/chunks/d342c56558f164e9e786.js +1 -0
  73. package/assets/esri/core/workers/chunks/{3c591f76e7d6204b7780.js → d3f7ff03ab5b40062d89.js} +1 -1
  74. package/assets/esri/core/workers/chunks/e03e237e7e6ffc8b7f0d.js +1 -0
  75. package/assets/esri/core/workers/chunks/{0b62871b89dcb4c70457.js → e21941260bae30061c2c.js} +1 -1
  76. package/assets/esri/core/workers/chunks/e6633f0326a44477f630.js +1 -0
  77. package/assets/esri/core/workers/chunks/e71b780d1e6a32f303b7.js +1 -0
  78. package/assets/esri/core/workers/chunks/eac28b0f6fccfabcc3ca.js +1 -0
  79. package/assets/esri/core/workers/chunks/{01c3507d78398baaf61b.js → eb0ce7937813d1be1284.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{f198f4ba7d3d52882d98.js → efded84870064c3d8210.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{c8a0089e080140db9076.js → f285ed5425b31123d2bc.js} +1 -1
  82. package/assets/esri/core/workers/chunks/f4ba823c8acd60c7c82d.js +1 -0
  83. package/core/Accessor.js +1 -1
  84. package/core/Collection.js +1 -1
  85. package/core/Logger.js +1 -1
  86. package/core/ObjectPool.js +1 -1
  87. package/core/RandomLCG.js +1 -1
  88. package/core/XHRAdapter.js +1 -1
  89. package/core/accessorSupport/watch.js +1 -1
  90. package/core/pbf.js +1 -1
  91. package/core/sql/UnknownTimeZone.js +1 -1
  92. package/core/workers/RemoteClient.js +1 -1
  93. package/geometry/SpatialReference.js +1 -1
  94. package/geometry/support/MeshGeoreferencedVertexSpace.js +1 -1
  95. package/geometry/support/MeshTexture.js +1 -1
  96. package/geometry/support/MeshTransform.js +1 -1
  97. package/geometry/support/buffer/BufferPool.js +1 -1
  98. package/geometry/support/buffer/BufferView.js +1 -1
  99. package/geometry/support/buffer/internals/Mat3.js +1 -1
  100. package/geometry/support/buffer/internals/Mat4.js +1 -1
  101. package/geometry/support/buffer/internals/Scalar.js +1 -1
  102. package/geometry/support/buffer/internals/Vec2.js +1 -1
  103. package/geometry/support/buffer/internals/Vec3.js +1 -1
  104. package/geometry/support/buffer/internals/Vec4.js +1 -1
  105. package/geometry/support/meshUtils/exporters/gltf/glb.js +1 -1
  106. package/identity/OAuthInfo.js +1 -1
  107. package/interfaces.d.ts +7 -1
  108. package/layers/mixins/EditBusLayer.js +1 -1
  109. package/layers/mixins/PublishableLayer.js +1 -1
  110. package/layers/support/AggregateField.js +1 -1
  111. package/layers/support/CodedValueDomain.js +1 -1
  112. package/layers/support/Field.js +1 -1
  113. package/layers/support/ImageElement.js +1 -1
  114. package/layers/support/InheritedDomain.js +1 -1
  115. package/layers/support/LOD.js +1 -1
  116. package/layers/support/LabelClass.js +1 -1
  117. package/layers/support/LabelExpressionInfo.js +1 -1
  118. package/layers/support/OrderByInfo.js +1 -1
  119. package/layers/support/PurgeOptions.js +1 -1
  120. package/layers/support/RangeDomain.js +1 -1
  121. package/layers/support/Sublayer.js +1 -1
  122. package/layers/support/TileInfo.js +1 -1
  123. package/layers/support/TilemapCache.js +1 -1
  124. package/layers/support/VideoElement.js +1 -1
  125. package/layers/support/source/DataLayerSource.js +1 -1
  126. package/package.json +1 -1
  127. package/portal/Portal.js +1 -1
  128. package/rest/support/AttachmentQuery.js +1 -1
  129. package/rest/support/ClosestFacilityParameters.js +1 -1
  130. package/rest/support/DirectionLine.js +1 -1
  131. package/rest/support/DirectionPoint.js +1 -1
  132. package/rest/support/JobInfo.js +1 -1
  133. package/rest/support/NetworkFeatureSet.js +1 -1
  134. package/rest/support/PointBarrier.js +1 -1
  135. package/rest/support/PolygonBarrier.js +1 -1
  136. package/rest/support/PolylineBarrier.js +1 -1
  137. package/rest/support/Query.js +1 -1
  138. package/rest/support/RelationshipQuery.js +1 -1
  139. package/rest/support/RouteInfo.js +1 -1
  140. package/rest/support/RouteParameters.js +1 -1
  141. package/rest/support/ServiceAreaParameters.js +1 -1
  142. package/rest/support/Stop.js +1 -1
  143. package/rest/support/TopFeaturesQuery.js +1 -1
  144. package/support/revision.js +1 -1
  145. package/symbols/ExtrudeSymbol3DLayer.js +1 -1
  146. package/symbols/FillSymbol3DLayer.js +1 -1
  147. package/symbols/IconSymbol3DLayer.js +1 -1
  148. package/symbols/LineSymbol3DLayer.js +1 -1
  149. package/symbols/ObjectSymbol3DLayer.js +1 -1
  150. package/symbols/PathSymbol3DLayer.js +1 -1
  151. package/symbols/TextSymbol3DLayer.js +1 -1
  152. package/symbols/WaterSymbol3DLayer.js +1 -1
  153. package/symbols/cim/OverrideHelper.js +1 -1
  154. package/symbols/cim/effects/EffectAddControlPoints.js +1 -1
  155. package/symbols/cim/effects/EffectArrow.js +1 -1
  156. package/symbols/cim/effects/EffectBuffer.js +1 -1
  157. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  158. package/symbols/cim/effects/EffectCut.js +1 -1
  159. package/symbols/cim/effects/EffectDashes.js +1 -1
  160. package/symbols/cim/effects/EffectDonut.js +1 -1
  161. package/symbols/cim/effects/EffectJog.js +1 -1
  162. package/symbols/cim/effects/EffectMove.js +1 -1
  163. package/symbols/cim/effects/EffectOffset.js +1 -1
  164. package/symbols/cim/effects/EffectReverse.js +1 -1
  165. package/symbols/cim/effects/EffectRotate.js +1 -1
  166. package/symbols/cim/effects/EffectScale.js +1 -1
  167. package/symbols/cim/effects/EffectWave.js +1 -1
  168. package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
  169. package/symbols/cim/placements/PlacementAtExtremities.js +1 -1
  170. package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
  171. package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
  172. package/symbols/cim/placements/PlacementOnLine.js +1 -1
  173. package/symbols/cim/placements/PlacementOnVertices.js +1 -1
  174. package/symbols/cim/placements/PlacementPolygonCenter.js +1 -1
  175. package/symbols/support/ElevationInfo.js +1 -1
  176. package/time/TimeExtent.js +1 -1
  177. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  178. package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
  179. package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
  180. package/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial.js +1 -1
  181. package/views/2d/engine/vectorTiles/shaders/VTLFillMaterial.js +1 -1
  182. package/views/2d/engine/vectorTiles/shaders/VTLLineMaterial.js +1 -1
  183. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  184. package/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial.js +1 -1
  185. package/views/2d/engine/vectorTiles/style/StyleDefinition.js +1 -1
  186. package/views/2d/engine/webgl/DisplayEntity.js +1 -1
  187. package/views/2d/engine/webgl/DisplayRecord.js +1 -1
  188. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  189. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphNode.js +1 -1
  190. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  191. package/views/2d/layers/features/FeatureStoreQueryAdapter.js +1 -1
  192. package/views/2d/tiling/TileCoverage.js +1 -1
  193. package/views/2d/tiling/TileKey.js +1 -1
  194. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  195. package/views/3d/environment/SceneViewEnvironment.js +1 -1
  196. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  197. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  198. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  199. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  200. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  201. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  202. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  203. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  204. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  205. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  206. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandEncoder.js +1 -1
  207. package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +1 -1
  208. package/views/3d/state/Frustum.js +1 -1
  209. package/views/3d/support/DisplayQualityProfile.js +1 -1
  210. package/views/3d/terrain/TerrainSurface.js +1 -1
  211. package/views/3d/terrain/TextureFader.js +1 -1
  212. package/views/3d/terrain/TilingScheme.js +1 -1
  213. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  214. package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
  215. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  216. package/views/3d/webgl-engine/lib/edgeRendering/edgeBufferWriters.js +1 -1
  217. package/views/SceneView.js +1 -1
  218. package/views/View.js +1 -1
  219. package/views/View2D.js +1 -1
  220. package/views/draw/DrawAction.js +1 -1
  221. package/views/draw/drawSurfaces.js +1 -1
  222. package/views/input/BrowserEventSource.js +1 -1
  223. package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
  224. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  225. package/views/support/imageReprojection.js +1 -1
  226. package/views/webgl/FramebufferObject.js +1 -1
  227. package/views/webgl/ShaderBuilder.js +1 -1
  228. package/views/webgl/Texture.js +1 -1
  229. package/webscene/Environment.js +1 -1
  230. package/webscene/SunLighting.js +1 -1
  231. package/webscene/VirtualLighting.js +1 -1
  232. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  233. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  234. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  235. package/widgets/Feature/FeatureViewModel.js +1 -1
  236. package/widgets/LayerList/LayerListItem.js +1 -1
  237. package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
  238. package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
  239. package/widgets/Search/SearchViewModel.js +1 -1
  240. package/widgets/Sketch/support/ResponsiveToolbar/OverflowGroup.js +1 -1
  241. package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
  242. package/widgets/Widget.js +1 -1
  243. package/widgets/support/forms/expressions/FormExpressionArcadeExecutor.js +1 -1
  244. package/assets/esri/core/workers/chunks/00e0c53d89e074399f04.js +0 -1
  245. package/assets/esri/core/workers/chunks/12d6baeffd55a98a7c75.js +0 -1
  246. package/assets/esri/core/workers/chunks/207c040b0e42358a5389.js +0 -1
  247. package/assets/esri/core/workers/chunks/21c12edc0632eb911e73.js +0 -1
  248. package/assets/esri/core/workers/chunks/24c94f97a76646d415ae.js +0 -1
  249. package/assets/esri/core/workers/chunks/2611adb4f328f95ee508.js +0 -1
  250. package/assets/esri/core/workers/chunks/26a2bd432e7a1b3870c3.js +0 -1
  251. package/assets/esri/core/workers/chunks/2def7db73a776e759dae.js +0 -1
  252. package/assets/esri/core/workers/chunks/2ff63a71213f618377d6.js +0 -1
  253. package/assets/esri/core/workers/chunks/44abd2cd17aae3299ede.js +0 -1
  254. package/assets/esri/core/workers/chunks/4b56c0c109e10d7409b8.js +0 -1
  255. package/assets/esri/core/workers/chunks/5660f13d78e9e4240034.js +0 -1
  256. package/assets/esri/core/workers/chunks/568bcf809fcfd4d9c713.js +0 -1
  257. package/assets/esri/core/workers/chunks/5e889a675cbaff03ad5a.js +0 -1
  258. package/assets/esri/core/workers/chunks/61795bde00f2e16d04f1.js +0 -1
  259. package/assets/esri/core/workers/chunks/62a1d60ad4bf6469c4dd.js +0 -1
  260. package/assets/esri/core/workers/chunks/6ea02ff25f051c08e6c3.js +0 -1
  261. package/assets/esri/core/workers/chunks/7bf08823f861628144a1.js +0 -1
  262. package/assets/esri/core/workers/chunks/86149b4a5a148744c7d1.js +0 -1
  263. package/assets/esri/core/workers/chunks/9b2fab133786e5d47631.js +0 -1
  264. package/assets/esri/core/workers/chunks/9bfb091cec7eed6c8111.js +0 -1
  265. package/assets/esri/core/workers/chunks/a2409d4921c02614169a.js +0 -1
  266. package/assets/esri/core/workers/chunks/b1baf39daf5725404be5.js +0 -1
  267. package/assets/esri/core/workers/chunks/b43d88b6e7dc4ab13599.js +0 -1
  268. package/assets/esri/core/workers/chunks/b9d9a1dc3c5d799e2685.js +0 -1
  269. package/assets/esri/core/workers/chunks/c1970657a287ec96001e.js +0 -1
  270. package/assets/esri/core/workers/chunks/cc75bbfd779f409943a3.js +0 -1
  271. package/assets/esri/core/workers/chunks/d35efcbe439500bf18bc.js +0 -1
  272. package/assets/esri/core/workers/chunks/d599ba865da87b487b1b.js +0 -1
  273. package/assets/esri/core/workers/chunks/da1157e288dbc6ba842a.js +0 -1
  274. package/assets/esri/core/workers/chunks/ddc30044f61a2c2df3fe.js +0 -1
  275. package/assets/esri/core/workers/chunks/e37e5d2e233d7f6ccd52.js +0 -314
  276. package/assets/esri/core/workers/chunks/f14b318bab5efcf43419.js +0 -1
  277. package/assets/esri/core/workers/chunks/f29715459ecd46180829.js +0 -1
  278. package/assets/esri/core/workers/chunks/f4e48bbdbc9da10ec71a.js +0 -1
  279. package/assets/esri/core/workers/chunks/f62f657f9fef28f492e0.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7112],{5503:(e,t,r)=>{r.d(t,{A:()=>P});var s,i=r(90237),n=r(98291),o=r(65529),a=r(36563),l=r(4718),h=r(93687);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(s||(s={}));var c,d=r(11932),u=r(56507),p=r(62788),m=r(10107),f=r(7695),g=r(40608),_=r(95488);class v{constructor(e,t,r,s,i){this.target=e,this.added=t,this.removed=r,this.start=s,this.deleteCount=i}}const y=new h.A(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function A(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function S(e){return e?e instanceof M?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e?.length)return e[0]}function T(e,t,r,s){const i=Math.min(e.length-r,t.length-s);let n=0;for(;n<i&&e[r+n]===t[s+n];)n++;return n}function I(e,t,r,s){t&&t.forEach(((t,i,n)=>{e.push(t),I(e,r.call(s,t,i,n),r,s)}))}const b=new Set,k=new Set,E=new Set,U=new Map;let C=0,M=c=class extends o.A.EventedAccessor{static isCollection(e){return null!=e&&e instanceof c}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new _.I,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:C++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof c?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return(0,p.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,S(e)),this._emitAfterChanges(s.ADD))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,a.hA)();if("change"===e){const e=this._chgListeners,r={removed:!1,callback:t};return e.push(r),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,a.hA)((()=>{r.removed=!0,e.splice(e.indexOf(r),1)}))}return this._emitter.on(e,t)}once(e,t){const r="deref"in t?()=>t.deref():()=>t,s=this.on(e,(e=>{r()?.call(null,e),s.remove()}));return s}add(e,t){if((0,p.gc)(this._observable),this._emitBeforeChanges(s.ADD))return this;const r=this.getNextIndex(t??null);return this._splice(r,0,[e]),this._emitAfterChanges(s.ADD),this}addMany(e,t=this._items.length){if((0,p.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const r=this.getNextIndex(t);return this._splice(r,0,S(e)),this._emitAfterChanges(s.ADD),this}at(e){if((0,p.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,p.gc)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(s.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,p.gc)(this._observable),this._createNewInstance({items:this._items.map(l.o8)})}concat(...e){(0,p.gc)(this._observable);const t=e.map(S);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,p.gc)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const r=this._splice(0,this.length),i=r.length;for(let s=0;s<i;s++)e.call(t,r[s],s,r);this._emitAfterChanges(s.REMOVE)}destroyAll(){this.drain(A)}destroyMany(e){const t=this.removeMany(e);return t.forEach(A),t}every(e,t){return(0,p.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,p.gc)(this._observable);const r=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:r})}find(e,t){return(0,p.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,p.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,p.gc)(this._observable);const r=[];return I(r,this,e,t),new c(r)}forEach(e,t){return(0,p.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,p.gc)(this._observable),this._items[e]}getNextIndex(e){(0,p.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,p.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,p.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,p.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,p.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,p.gc)(this._observable);const r=this._items.map(e,t);return new c({items:r})}reorder(e,t=this.length-1){(0,p.gc)(this._observable);const r=this.indexOf(e);if(-1!==r){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(s.MOVE))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(s.MOVE)}return e}}pop(){if((0,p.gc)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),e}push(...e){return(0,p.gc)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(s.ADD)),this.length}reduce(e,t){(0,p.gc)(this._observable);const r=this._items;return 2===arguments.length?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){(0,p.gc)(this._observable);const r=this._items;return 2===arguments.length?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return(0,p.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,p.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(s.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(s.REMOVE),t}removeMany(e){if((0,p.gc)(this._observable),!e?.length||this._emitBeforeChanges(s.REMOVE))return[];const t=e instanceof c?e.toArray():e,r=this._items,i=[],n=t.length;for(let e=0;e<n;e++){const s=t[e],n=r.indexOf(s);if(n>-1){const s=1+T(t,r,e+1,n+1),o=this._splice(n,s);o&&o.length>0&&i.push.apply(i,o),e+=s-1}}return this._emitAfterChanges(s.REMOVE),i}reverse(){if((0,p.gc)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,p.gc)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),e}slice(e=0,t=this.length){return(0,p.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,p.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,p.gc)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(s.MOVE),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let r=0;r<t;r++)if(e(this.items[r],this.items[r+1])>0)return!0;return!1}splice(e,t,...r){(0,p.gc)(this._observable);const i=(t?s.REMOVE:0)|(r.length?s.ADD:0);if(this._emitBeforeChanges(i))return[];const n=this._splice(e,t,r)||[];return this._emitAfterChanges(i),n}toArray(){return(0,p.gc)(this._observable),this._items.slice()}toJSON(){return(0,p.gc)(this._observable),this.toArray()}toLocaleString(){return(0,p.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,p.gc)(this._observable),this._items.toString()}unshift(...e){return(0,p.gc)(this._observable),!e.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,e),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const s=this._items,i=this.itemType;let n,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,d._)((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(o=s.splice(e,t),this.hasEventListener("before-remove")){const t=y.acquire();t.target=this,t.cancellable=!0;for(let r=0,i=o.length;r<i;r++)n=o[r],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(r,1),s.splice(e,0,n),e+=1,r-=1,i-=1);y.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=y.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let r=0;r<t;r++)e.reset(o[r]),this.emit("after-remove",e);y.release(e)}}if(r?.length){if(i){const e=[];for(const t of r){const r=i.ensureType(t);null==r&&null!=t||e.push(r)}r=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),o=e===this.length;if(t||n){const i=y.acquire();i.target=this,i.cancellable=!0;const a=y.acquire();a.target=this,a.cancellable=!1;for(const l of r)t?(i.reset(l),this.emit("before-add",i),i.defaultPrevented||(o?s.push(l):s.splice(e++,0,l),this._set("length",s.length),n&&(a.reset(l),this.emit("after-add",a)))):(o?s.push(l):s.splice(e++,0,l),this._set("length",s.length),a.reset(l),this.emit("after-add",a));y.release(a),y.release(i)}else{if(o)for(const e of r)s.push(e);else s.splice(e,0,...r);this._set("length",s.length)}}if((r?.length||o?.length)&&this._notifyChangeEvent(r,o),this.hasEventListener("after-splice")){const s=new v(this,r,o,e,t);this.emit("after-splice",s)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=y.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,y.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=y.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),y.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;b.clear(),k.clear(),E.clear();for(const{added:t,removed:r}of e){if(t)if(0===E.size&&0===k.size)for(const e of t)b.add(e);else for(const e of t)k.has(e)?(E.add(e),k.delete(e)):E.has(e)||b.add(e);if(r)if(0===E.size&&0===b.size)for(const e of r)k.add(e);else for(const e of r)b.has(e)?b.delete(e):(E.delete(e),k.add(e))}const r=n.A.acquire();b.forEach((e=>{r.push(e)}));const s=n.A.acquire();k.forEach((e=>{s.push(e)}));const i=this._items,o=t.items,a=n.A.acquire();if(E.forEach((e=>{o.indexOf(e)!==i.indexOf(e)&&a.push(e)})),t.listeners&&(r.length||s.length||a.length)){const e={target:this,added:r,removed:s,moved:a},i=t.listeners.length;for(let r=0;r<i;r++){const s=t.listeners[r];s.removed||s.callback.call(this,e)}}n.A.release(r),n.A.release(s),n.A.release(a)}b.clear(),k.clear(),E.clear()}};M.ofType=e=>{if(!e)return c;if(U.has(e))return U.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const r in e.typeMap){const s=e.typeMap[r].prototype.declaredClass;t?t+=` | ${s}`:t=s}let r=class extends c{};return(0,i._)([(0,f.u)({Type:e,ensureType:"function"==typeof e?(0,u.dp)(e):(0,u.aq)(e)})],r.prototype,"itemType",void 0),r=(0,i._)([(0,g.$)(`esri.core.Collection<${t}>`)],r),U.set(e,r),r},(0,i._)([(0,m.MZ)()],M.prototype,"_updating",void 0),(0,i._)([(0,m.MZ)()],M.prototype,"length",void 0),(0,i._)([(0,m.MZ)()],M.prototype,"items",null),(0,i._)([(0,m.MZ)({readOnly:!0})],M.prototype,"updating",null),M=c=(0,i._)([(0,g.$)("esri.core.Collection")],M);const P=M},65529:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(90237),i=r(69622),n=r(36563),o=r(40608);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){let r=this._listenersMap?.get(e);if(!r)return!1;const s=this._target||this;let i=!1;for(const e of r.slice()){const r="deref"in e?e.deref():e;r?r?.call(s,t):i=!0}return i&&(r=r.filter((e=>!("deref"in e)||null!=e.deref())),this._listenersMap.set(e,r)),r.length>0}on(e,t){if(Array.isArray(e)){const r=e.map((e=>this.on(e,t)));return(0,n.vE)(r)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??=new Map;const r=this._listenersMap.get(e)||[];return r.push(t),this._listenersMap.set(e,r),(0,n.hA)((()=>{const r=this._listenersMap?.get(e),s=r?.indexOf(t)??-1;s>=0&&r.splice(s,1)}))}once(e,t){const r=this.on(e,(e=>{r.remove();const s="deref"in t?t.deref():t;s?.call(null,e)}));return r}hasEventListener(e){const t=this._listenersMap?.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let r=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return r=(0,s._)([(0,o.$)("esri.core.Evented")],r),r};let r=class extends i.A{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};r=(0,s._)([(0,o.$)("esri.core.Evented.EventedAccessor")],r),e.EventedAccessor=r}(a)},61893:(e,t,r)=>{r.d(t,{A:()=>u});var s,i,n=r(90237),o=r(69622),a=r(74887),l=r(40608);(i=s||(s={}))[i.PENDING=0]="PENDING",i[i.RESOLVED=1]="RESOLVED",i[i.REJECTED=2]="REJECTED";class h{constructor(){this._resolver=(0,a.Tw)(),this._status=s.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=s.RESOLVED,this._cleanUp()}),(()=>{this._status=s.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return this._status===s.RESOLVED}isRejected(){return this._status===s.REJECTED}isFulfilled(){return this._status!==s.PENDING}abort(){this._resolver.reject((0,a.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const e=(0,a.Tw)(),t=[...this._resolvingPromises,e.promise],r=this._allPromise=Promise.all(t);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(e=>{this.isFulfilled()||this._allPromise!==r||(0,a.zf)(e)||this._resolver.reject(e)})),e.resolve()}}const c=e=>{let t=class extends e{constructor(...e){super(...e),this._promiseProps=new h,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return this._promiseProps.promise.then((()=>this)).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}};return t=(0,n._)([(0,l.$)("esri.core.Promise")],t),t};let d=class extends(c(o.A)){};d=(0,n._)([(0,l.$)("esri.core.Promise")],d),function(e){e.EsriPromiseMixin=c}(d||(d={}));const u=d},79901:(e,t,r)=>{r.d(t,{w:()=>l});var s=r(56507),i=r(96156);const n=Object.prototype.toString;function o(e){const t="__accessorMetadata__"in e?(0,s.dp)(e):e;return function(...e){if(e.push(t),"number"==typeof e[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return a.apply(this,e)}}function a(e,t,r,s){(0,i.z4)(e,t).cast=s}function l(...e){if(3!==e.length||"string"!=typeof e[1])return 1===e.length&&"[object Function]"===n.call(e[0])?o(e[0]):1===e.length&&"string"==typeof e[0]?function(e){return(t,r)=>{(0,i.z4)(t,e).cast=t[r]}}(e[0]):void 0}},7695:(e,t,r)=>{function s(e){return(t,r)=>{t[r]=e}}r.d(t,{u:()=>s})},95488:(e,t,r)=>{r.d(t,{I:()=>i});var s=r(11406);class i extends s.T{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},60999:(e,t,r)=>{r.d(t,{DZ:()=>m,Ke:()=>p,Tj:()=>c,UT:()=>f,jJ:()=>h});var s=r(90237),i=r(69622),n=r(97768),o=r(74887),a=r(10107),l=r(40608);function h(e,t,r){return(0,o.Lx)(e.map(((e,s)=>t.apply(r,[e,s]))))}async function c(e,t,r){return(await(0,o.Lx)(e.map(((e,s)=>t.apply(r,[e,s]))))).map((e=>e.value))}function d(e){return{ok:!0,value:e}}function u(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return u(e)}}async function m(e){try{return d(await e)}catch(e){return(0,o.QP)(e),u(e)}}function f(e,t){return new g(e,t)}let g=class extends i.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then((e=>{this._result=d(e),this._cleanup()}),(e=>{this._result=u(e),this._cleanup()})),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,s._)([(0,a.MZ)()],g.prototype,"value",null),(0,s._)([(0,a.MZ)()],g.prototype,"error",null),(0,s._)([(0,a.MZ)()],g.prototype,"finished",null),(0,s._)([(0,a.MZ)()],g.prototype,"promise",void 0),(0,s._)([(0,a.MZ)()],g.prototype,"_result",void 0),g=(0,s._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g)},66552:(e,t,r)=>{r.d(t,{J:()=>i,O:()=>o});var s=r(93637);class i{constructor(e,t={ignoreUnknown:!1,useNumericKeys:!1}){this._jsonToAPI=e,this._options=t,this.apiValues=[],this.jsonValues=[],this._apiToJSON=function(e){const t={};for(const r in e)t[e[r]]=r;return t}(e),this.apiValues=n(this._apiToJSON),this.jsonValues=n(this._jsonToAPI),this.read=e=>this.fromJSON(e),this.write=(e,t,r)=>{const i=this.toJSON(e);void 0!==i&&(0,s.sM)(r,i,t)},this.write.isJSONMapWriter=!0}toJSON(e){if(null==e)return null;if(this._apiToJSON.hasOwnProperty(e)){const t=this._apiToJSON[e];return this._options.useNumericKeys?+t:t}return this._options.ignoreUnknown?null:e}fromJSON(e){return null!=e&&this._jsonToAPI.hasOwnProperty(e)?this._jsonToAPI[e]:this._options.ignoreUnknown?void 0:e}}function n(e){const t=[];for(const r in e)t.push(r);return t.sort(),t}function o(){return function(e,t){return new i(e,{ignoreUnknown:!0,...t})}}},36708:(e,t,r)=>{r.d(t,{C_:()=>u,OH:()=>f,Vh:()=>g,on:()=>d,pc:()=>_,wB:()=>l,z7:()=>h}),r(60999),r(5503);var s=r(37955),i=r(36563),n=r(97768),o=r(74887),a=r(14012);function l(e,t,r={}){return c(e,t,r,p)}function h(e,t,r={}){return c(e,t,r,m)}function c(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function d(e,t,r,o={}){let a=null,h=null,c=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function u(e){o.once&&o.once&&(0,n.xt)(c),r(e)}const p=l(e,((e,r)=>{d(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return c=(0,i.hA)((()=>{p.remove(),d()})),c}function u(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise(((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,(()=>{l(),n((0,o.NK)())})),c(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??p)])}))}(e,m,t)}function p(e){return!0}function m(e){return!!e}r(80559);const f={sync:!0},g={initial:!0},_={sync:!0,initial:!0}},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>i,vD:()=>o,yS:()=>n});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},67112:(e,t,r)=>{r.r(t),r.d(t,{default:()=>dt});var s=r(70333),i=r(90237),n=r(92602),o=r(78888),a=r(49186),l=r(65529),h=r(37955),c=r(4718),d=r(93637),u=r(74887),p=r(84952),m=r(10107),f=(r(44208),r(53966)),g=r(40608);r(47566),r(87811);var _=r(97768),v=r(61893),y=r(36708),A=r(13069),S=r(79901),w=r(62788),T=r(71429),I=r(37330),b=r(98291),k=r(36563),E=r(11932);const U=new Map;function C(){U.clear()}function M(e){U.delete(e)}function P(...e){const t=b.A.acquire();for(let r=0;r<e.length;r++){const s=e[r],i=typeof s;if("string"===i)t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if("object"===i)for(const e in s)s[e]&&t.push(e)}const r=t.join(" ");return b.A.release(t),r}(()=>{const e=new Map;new ResizeObserver((t=>{C();for(const r of t)e.get(r.target)?.(r)}))})();const x=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce(((e,t)=>(e[t]=[],e)),{}),O=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],R=new I.I({whiteList:x,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(O.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),D="http://www.w3.org/",N=`${D}2000/svg`,L=`${D}1999/xlink`;let j=[],V=(e,t)=>{let r={};return Object.keys(e).forEach((t=>{r[t]=e[t]})),t&&Object.keys(t).forEach((e=>{r[e]=t[e]})),r},Z=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),q=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},B=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(Z(e[s],t))return s;return-1},$=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let n=i.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if(Z(t,i))throw new Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},z=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},F=[],G=!1,H=e=>{(e.children||[]).forEach(H),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},J=()=>{G=!1,F.forEach(H),F.length=0},W=e=>{F.push(e),G||(G=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(J,{timeout:16}):setTimeout(J,16))},K=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),W(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),W(e))},Y=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),n=i.length;for(let o=0;o<n;o++){let n=i[o],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)re(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],n=a[s];n&&(q(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let i=typeof a;"function"===i?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===N?"href"===n?e.setAttributeNS(L,n,a):e.setAttribute(n,a):"string"===i&&"value"!==n?"innerHTML"===n?e[n]=R.sanitize(a):X(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function X(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let Q,ee=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)te(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),Y(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},te=(e,t,r,s)=>{let i,n=0,o=e.vnodeSelector,a=t.ownerDocument;if(""===o)i=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(i,r):t.appendChild(i);else{for(let l=0;l<=o.length;++l){let h=o.charAt(l);if(l===o.length||"."===h||"#"===h){let h=o.charAt(n-1),c=o.slice(n,l);"."===h?i.classList.add(c):"#"===h?i.id=c:("svg"===c&&(s=V(s,{namespace:N})),void 0!==s.namespace?i=e.domNode=a.createElementNS(s.namespace,c):(i=e.domNode=e.domNode||a.createElement(c),"input"===c&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(i,r):i.parentNode!==t&&t.appendChild(i)),n=l+1}}ee(i,e,s)}},re=(e,t,r)=>{t&&t.split(" ").forEach((t=>{t&&e.classList.toggle(t,r)}))},se=(e,t,r,s,i)=>{if(r===s)return!1;s=s||j;let n,o=(r=r||j).length,a=s.length,l=0,h=0,c=!1;for(;h<a;){let a=l<o?r[l]:void 0,d=s[h];if(void 0!==a&&Z(a,d))c=Q(a,d,i)||c,l++;else{let a=B(r,d,l+1);if(a>=0){for(n=l;n<a;n++)K(r[n]),$(r,n,e,"removed");c=Q(r[a],d,i)||c,l=a+1}else te(d,t,l<o?r[l].domNode:void 0,i),z(d),$(s,h,e,"added")}h++}if(o>l)for(n=l;n<o;n++)K(r[n]),$(r,n,e,"removed");return c};Q=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=V(r,{namespace:N})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=se(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let i=!1,n=Object.keys(r),o=n.length;for(let a=0;a<o;a++){let o=n[a],l=r[o],h=t[o];if("class"===o)h!==l&&(re(e,h,!1),re(e,l,!0));else if("classes"===o){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(i=!0,n?t.add(s):t.remove(s))}}else if("styles"===o){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],o=l[r];o!==h[r]&&(i=!0,o?(q(o),s.styleApplyer(e,r,o)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"!==o||X(e)){if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===N?"href"===o?e.setAttributeNS(L,o,l):e.setAttribute(o,l):"string"===t?"innerHTML"===o?e[o]=R.sanitize(l):"role"===o&&""===l?e.removeAttribute(o):X(e)&&o in e?e[o]=l:e.setAttribute(o,l):e[o]!==l&&(e[o]=l),i=!0)}}else{let t=e[o];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[o]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}}return i})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let ie=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,Q(s,r,t)},domNode:e.domNode});const ne={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let oe,ae=e=>V(ne,e),le=(e,t,r)=>(r=ae(r),te(t,e,void 0,r),ie(t,r)),he=(e,t,r)=>(r=ae(r),te(t,e.parentNode,e,r),ie(t,r)),ce=(e,t,r)=>(r=ae(r),t.domNode=e,ee(e,t,r),ie(t,r)),de=(e,t,r)=>(r=ae(r),te(t,e.parentNode,e,r),e.parentNode.removeChild(e),ie(t,r));oe=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const ue={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},pe={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}},me=(e,t,r=!1)=>{let s=e;return t.forEach(((e,i)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,(t=>t.domNode===e)):void 0;r&&!n&&i!==t.length-1||(s=n)})),s};var fe=r(14813),ge=r(2741);let _e;_e="components/assets";const ve=Symbol("widget"),ye=Symbol("widget-test-data"),Ae=[],Se={},we=new WeakMap;function Te(e,t){let r=t.children;if(r?.length)for(let t=0;t<r.length;++t)r[t]=Te(e,r[t]);else r=Ae;const s=t.vnodeSelector;if(Ee(s)){const i=t.properties||Se,n=i.key||s,o={key:n,afterCreate:Ie,afterUpdate:be,afterRemoved:ke,parentWidget:e,widgetConstructor:s,widgetProperties:{...i,key:n,children:r}};return{vnodeSelector:s.vnodeSelector,properties:o,children:void 0,text:void 0,domNode:null}}return t}function Ie(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:n}){const o=new i(n);o.container=e,we.set(e,o),o.afterCreate?.(o,e),s.addHandles((0,k.hA)((()=>ke(e)))),queueMicrotask((()=>{o[ye].projector.renderNow()}))}function be(e,t,r,{widgetProperties:s}){const i=we.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function ke(e){const t=we.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),we.delete(e))}function Ee(e){return"function"==typeof e&&e[ve]}const Ue=new Set;var Ce,Me=r(73444),Pe=r(10838);let xe=0;function Oe(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?Oe(e[s],t[s]):e[s]=t[s]);return e}const Re=(e=>{let t;const r={...ue,...e},s=(n=r,{...pe,...n}),i=s.performanceLogger;var n;let o,a=!0,l=!1;const h=[],c=[],d=(e,n,o)=>{let a;s.eventHandlerInterceptor=(e,s,n,o)=>function(e){let s;i("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),o=n.some((e=>customElements.get(e?.tagName?.toLowerCase())));if(e.eventPhase!==Event.CAPTURING_PHASE&&o){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();s=me(a.getLastRender(),r,!0)}else n.reverse(),s=me(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),i("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=o();a=e(n,l,s),s.eventHandlerInterceptor=void 0,h.push(a),c.push(o),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(o=void 0,a){a=!1,i("renderStart",void 0);for(let e=0;e<h.length;e++){const t=c[e]();i("rendered",void 0);try{h[e].update(t)}catch(e){console.error(e)}i("patched",void 0)}i("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,c)),t={renderNow:u,scheduleRender:()=>{o||l||(o=requestAnimationFrame(u))},stop:()=>{o&&(cancelAnimationFrame(o),o=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{d(le,e,t)},insertBefore:(e,t)=>{d(he,e,t)},merge:(e,t)=>{d(ce,e,t)},replace:(e,t)=>{d(de,e,t)},detach:e=>{for(let t=0;t<c.length;t++)if(c[t]===e)return c.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,n)=>{const o=t?.(e,s,i,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>o?.call(i,e);i.addEventListener(t,r,a);const s=()=>i.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return o}},handleInterceptedEvent(e,t,r,s){const{eventPhase:i,type:n}=s,o=i===Event.CAPTURING_PHASE;let a=`on${n}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${o?"Capture":""}`,l&&a in l))&&(C(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let De=!1,Ne=class extends(v.A.EsriPromiseMixin(l.A.EventedAccessor)){constructor(e,t){super(e,t),this._attached=!1,this._projector=Re,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this._loadLocale=(0,u.sg)((async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map((async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,Pe.ud)(e);this.uiStrings&&Object.keys(this.uiStrings)&&(r=Oe((0,c.o8)(r),this.uiStrings)),this[t]=r})));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&f.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()})),fe.qu||(0,fe.Qu)((0,p.s2)((0,ge.s)("components/assets")));const r="esri-widget-uid-"+(0,A.lk)(),s=this.render.bind(this);this._trackingTarget=new T.r((()=>{this.autoRenderingEnabled&&this.scheduleRender()}));const i=()=>({vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),n=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??i(),t=e.properties??={};if(t.key??=r,Ee(e.vnodeSelector)){if(!this.visible)return i()}else this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="";let n=0;return e.children?.forEach((e=>{Ee(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${n++}`)})),Te(this,e)};this.render=()=>{if(De)return n();let e=function(e){return U.get(e)}(this)??null;if(e)return e;this._trackingTarget.clear(),De=!0;try{e=(0,w.a)(this._trackingTarget,n)}catch(e){throw f.A.getLogger(this).error(e),e}finally{De=!1}return e&&function(e,t){U.set(e,t)}(this,e),e};const o=this.beforeFirstRender();var a;o?this._resourcesFetch=o.then((()=>{this._readyForTrueRender=!0,this._postInitialize()})):(this._resourcesFetch=Promise.resolve().then((()=>{this._postInitialize()})),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),a=this._resourcesFetch,Ue.add(a),a.finally((()=>Ue.delete(a)))}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then((()=>{})).catch(u.jH):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||((0,_.pR)(this._trackingTarget),(0,_.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this._emitter.clear(),this.render=()=>null,this._projector=null,M(this))}set container(e){this._get("container")||this._set("container",e)}castContainer(e){return"string"==typeof(t=e)?document.getElementById(t):t??null;var t}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-"+xe++}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[(Ce=ve,ye)](){return{projector:this._projector}}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(M(this),this._projector.scheduleRender())}classes(...e){return P.apply(this,e)}renderNow(){M(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,y.wB)((()=>this.viewModel),((e,t)=>{t&&this.removeHandles("delegated-events"),e&&(0,h.wb)(e)&&this.addHandles(this._delegatedEventNames.map((t=>(0,h.on)(e,t,(e=>{this.emit(t,e)})))),"delegated-events")}),y.pc)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(u.jH),this.scheduleRender()};this.addHandles([(0,Me.oQ)(e),(0,y.wB)((()=>this.uiStrings),e),(0,y.z7)((()=>this.container),(e=>{this.destroyed||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),this._attached=!1),e?.parentNode?.removeChild(e)}};Ne[Ce]=!0,Ne.vnodeSelector="div",(0,i._)([(0,m.MZ)()],Ne.prototype,"_readyForTrueRender",void 0),(0,i._)([(0,m.MZ)({value:null})],Ne.prototype,"container",null),(0,i._)([(0,S.w)("container")],Ne.prototype,"castContainer",null),(0,i._)([(0,m.MZ)()],Ne.prototype,"icon",null),(0,i._)([(0,m.MZ)()],Ne.prototype,"id",null),(0,i._)([(0,m.MZ)()],Ne.prototype,"label",null),(0,i._)([(0,m.MZ)()],Ne.prototype,"renderable",null),(0,i._)([(0,m.MZ)()],Ne.prototype,"uiStrings",void 0),(0,i._)([(0,m.MZ)()],Ne.prototype,"viewModel",void 0),(0,i._)([(0,m.MZ)({value:!0})],Ne.prototype,"visible",null),(0,i._)([(0,m.MZ)()],Ne.prototype,"key",void 0),(0,i._)([(0,m.MZ)()],Ne.prototype,"children",void 0),(0,i._)([(0,m.MZ)()],Ne.prototype,"afterCreate",void 0),(0,i._)([(0,m.MZ)()],Ne.prototype,"afterUpdate",void 0),(0,i._)([(0,m.MZ)()],Ne.prototype,"afterRemoved",void 0),Ne=(0,i._)([(0,g.$)("esri.widgets.Widget")],Ne);const Le=Ne;function je(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}}var Ve=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Ze=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Ze(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=Ve(i)),t.push(i))}};function qe(e,t,...r){return"function"!=typeof e||Ee(e)?function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var i=[];return Ze(r,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}function Be(){return"calcite-mode-"+(getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\s|'|"/g,"").startsWith("dark")?"dark":"light")}var $e=r(71754);const ze="esri-identity-modal",Fe={base:ze,info:`${ze}__info`,notice:`${ze}__notice`};let Ge=class extends Le{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return function(e){const t=[];for(const r of Object.keys(e))customElements.get(`calcite-${r}`)||t.push(e[r]?.());return t.length>0?Promise.all(t):null}({button:()=>Promise.all([r.e(7007),r.e(7836)]).then(r.bind(r,37836)),dialog:()=>Promise.all([r.e(7007),r.e(8666)]).then(r.bind(r,68666)),input:()=>Promise.all([r.e(7007),r.e(4546)]).then(r.bind(r,2165)),label:()=>r.e(224).then(r.bind(r,87843)),notice:()=>Promise.all([r.e(7007),r.e(8098)]).then(r.bind(r,48098))})}get title(){return this.commonMessages?.auth.signIn}render(){const{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:i,server:n,resource:o,error:a}=this,{info:l,oAuthInfo:h,lblItem:c,invalidUser:d,noAuthService:u,lblUser:p,lblPwd:m,lblCancel:f,lblSigning:g,lblOk:_}=r;return qe("div",{class:this.classes(Fe.base,Be())},qe("form",{bind:this,onsubmit:this._submit},qe("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",widthScale:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},qe("div",{class:Fe.info},(0,$e.V)(i?h:l,{server:n&&/\.arcgis\.com/i.test(n)?"ArcGIS Online":n,resource:`(${o||c})`})),a?qe("calcite-notice",{class:Fe.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},qe("div",{slot:"message"},a.details?.httpStatus?d:u)):null,i?null:[qe("calcite-label",null,p,qe("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),qe("calcite-label",null,m,qe("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],qe("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"footer-end",type:"button"},f),qe("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?g:_))))}_focusUsernameInput(){return async function(e){await(0,E.$m)((0,u.Mq)(void 0));const t=e();t&&("setFocus"in t&&"function"==typeof t.setFocus?await t.setFocus():t instanceof HTMLElement&&t.focus())}((()=>this._usernameInputNode))}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,i._)([(0,m.MZ)({readOnly:!0})],Ge.prototype,"container",void 0),(0,i._)([(0,m.MZ)(),je("esri/t9n/common")],Ge.prototype,"commonMessages",void 0),(0,i._)([(0,m.MZ)()],Ge.prototype,"error",void 0),(0,i._)([(0,m.MZ)(),je("esri/identity/t9n/identity")],Ge.prototype,"messages",void 0),(0,i._)([(0,m.MZ)()],Ge.prototype,"oAuthPrompt",void 0),(0,i._)([(0,m.MZ)()],Ge.prototype,"open",void 0),(0,i._)([(0,m.MZ)()],Ge.prototype,"signingIn",void 0),(0,i._)([(0,m.MZ)()],Ge.prototype,"server",void 0),(0,i._)([(0,m.MZ)({readOnly:!0})],Ge.prototype,"title",null),(0,i._)([(0,m.MZ)()],Ge.prototype,"resource",void 0),Ge=(0,i._)([(0,g.$)("esri.identity.IdentityModal")],Ge);const He=Ge,Je="esriJSAPIOAuth";class We{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(Je,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken",r=new FormData;if(r.append("f","json"),r.append("auth_token",this.refreshToken||this.token),r.append("client_id",t.appId),r.append("token_type_hint",this.refreshToken?"refresh_token":"access_token"),"function"==typeof navigator.sendBeacon)navigator.sendBeacon(e,r);else{const t=new XMLHttpRequest;t.open("POST",e),t.send(r)}}if(t?.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(Je,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(Je);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}We.prototype.declaredClass="esri.identity.OAuthCredential";var Ke,Ye=r(25482);let Xe=Ke=class extends Ye.A{constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return Ke.fromJSON(this.toJSON())}};(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"appId",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"authNamespace",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"expiration",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"flowType",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"forceLogin",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"forceUserId",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"locale",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"minTimeUntilExpiration",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"popup",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"popupCallbackUrl",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"popupWindowFeatures",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"portalUrl",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"preserveUrlHash",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],Xe.prototype,"userId",void 0),Xe=Ke=(0,i._)([(0,g.$)("esri.identity.OAuthInfo")],Xe);const Qe=Xe;let et=class extends Ye.A{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,i._)([(0,m.MZ)({json:{write:!0}})],et.prototype,"adminTokenServiceUrl",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],et.prototype,"currentVersion",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],et.prototype,"hasPortal",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],et.prototype,"hasServer",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],et.prototype,"owningSystemUrl",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],et.prototype,"owningTenant",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],et.prototype,"server",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],et.prototype,"shortLivedTokenValidity",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],et.prototype,"tokenServiceUrl",void 0),(0,i._)([(0,m.MZ)({json:{write:!0}})],et.prototype,"webTierAuth",void 0),et=(0,i._)([(0,g.$)("esri.identity.ServerInfo")],et);const tt=et;var rt=r(39131);const st={},it=e=>{const t=new p.s0(e.owningSystemUrl).host,r=new p.s0(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},nt=(e,t)=>!!(it(e)&&t&&t.some((t=>t.test(e.server))));let ot=null,at=null;try{ot=window.localStorage,at=window.sessionStorage}catch{}class lt extends l.A{constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,p.An)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",(e=>{this._pageShowHandler(e)}))}registerServers(e){const t=this.serverInfos;t?(e=e.filter((e=>!this.findServerInfo(e.server))),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach((e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)}))}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new tt,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new ht({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,c.oy)({serverInfos:this.serverInfos.map((e=>e.toJSON())),oAuthInfos:this.oAuthInfos.map((e=>e.toJSON())),credentials:this.credentials.map((e=>e.toJSON()))})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach((t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new tt(t))})),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach((t=>{t.appId&&e.push(t.declaredClass?t:new Qe(t))})),e.length&&this.registerOAuthInfos(e)}s&&s.forEach((e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new ht(e)).emitTokenChange(),this.credentials.push(e))}))}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s,i=!0;t&&(r=!!t.token,s=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,o=(0,u.Tw)();if(t.signal&&(0,u.u7)(t.signal,(()=>{n.abort()})),(0,u.u7)(n,(()=>{o.reject(new a.A("identity-manager:user-aborted","ABORTED"))})),(0,u.G4)(n))return o.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=r?this.findCredential(e):null;let c;if(h&&s&&s.details&&498===s.details.httpStatus)h.destroy();else if(h)return c=new a.A("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:s}),o.reject(c),o.promise;const d=this._findCredential(e,t);if(d)return o.resolve(d),o.promise;let m=this.findServerInfo(e);if(m)!m.hasPortal&&m.server&&m.owningSystemUrl&&this._hasSameServerInstance(m.server,m.owningSystemUrl)&&(m.hasPortal=!0),!m.hasServer&&this._isServerRsrc(e)&&(m._restInfoPms=this._getTokenSvcUrl(e),m.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return c=new a.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),o.reject(c),o.promise;m=new tt,m.server=this._getServerInstanceRoot(e),"string"==typeof t?(m.tokenServiceUrl=t,m.hasPortal=!0):(m._restInfoPms=t,m.hasServer=!0),this.registerServers([m])}return m.hasPortal&&void 0===m._selfReq&&(i||(0,p.FX)(m.tokenServiceUrl,this._appOrigin)||this._gwDomains.some((e=>e.tokenServiceUrl===m.tokenServiceUrl)))&&(m._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(m.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,m,t,o,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),i=new p.s0(this._appOrigin),n=e.shortLivedTokenValidity;let l,h,c,d,u,m,f,g;t&&(g=this.tokenValidity||n||this._defaultTokenValidity,g>n&&n>0&&(g=n)),r&&(l=r.isAdmin,h=r.serverUrl,c=r.token,m=r.signal,f=r.ssl,e.customParameters=r.customParameters),l?d=e.adminTokenServiceUrl:(d=e.tokenServiceUrl,u=new p.s0(d.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!f&&"http"===i.scheme&&((0,p.FX)(i.uri,d,!0)||"https"===u.scheme&&i.host===u.host&&"7080"===i.port&&"7443"===u.port)&&(d=d.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const _={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:c,expiration:g,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:m,...r?.ioArgs};return s||(_.withCredentials=!1),(0,o.A)(d,_).then((r=>{const s=r.data;if(!s?.token)return new a.A("identity-manager:authentication-failed","Unable to generate token");const i=e.server;return st[i]||(st[i]={}),t&&(st[i][t.username]=t.password),s.validity=g,s}))}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then((i=>{let n;const l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r?.force))n=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};n=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};n=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,o.A)(n,{query:l,authMode:"anonymous"}).then((e=>{if(!1===e.data.valid)throw new a.A("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}})).catch((e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw i.destroy(),new a.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new a.A("identity-manager:invalid-request");return{credential:i}}))})).then((e=>({credential:e.credential,viewOnly:s})))}setOAuthResponseHash(e){e&&("#"===e.charAt(0)&&(e=e.slice(1)),this._processOAuthPopupParams((0,p.zf)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=(0,u.Tw)(),i=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},n=()=>{i(),this._oAuthDfd=null,s.reject(new a.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,u.u7)(r.signal,(()=>{n()}));const o=new He({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=o,this.emit("dialog-create");let l=o.on("cancel",n),h=o.on("submit",(e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then((n=>{i();const o=new ht({userId:e.username,server:t.server??void 0,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(o)})).catch((e=>{o.error=e,o.signingIn=!1}))}));return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=(0,u.Tw)();const i=this._oAuthDfd;let n;s?.signal&&(0,u.u7)(s.signal,(()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&c()})),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;const o=r._oAuthCred;if(o.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,p.$1)(e),o.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),o.stateUID=(0,p.$1)(e),o.save()||(o.codeVerifier=n=null)}else o.codeVerifier=null;let l,h;this._getCodeChallenge(n).then((i=>{const n=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!n)return void this._doOAuthSignIn(e,t,r,i);const o=new He({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=o,this.emit("dialog-create"),l=o.on("cancel",c),h=o.on("submit",(()=>{d(),this._doOAuthSignIn(e,t,r,i)}))}));const c=()=>{d(),this._oAuthDfd=null,i.reject(new a.A("identity-manager:user-aborted","ABORTED"))},d=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return i.promise}destroyCredentials(){this.credentials&&this.credentials.slice().forEach((e=>{e.destroy()})),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,h.on)(window,"message",(t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then((e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)})).catch((e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)}))}}))}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){"#"===e.charAt(0)&&(e=e.slice(1));const t=(0,p.zf)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){"?"===t.charAt(0)&&(t=t.slice(1));const e=(0,p.zf)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach((e=>{delete t[e]}));const r=(0,p.x0)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,o.A)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then((e=>e.data))}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return(0,p.$1)(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new a.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t?.token,l=t?.resource,h=this._isServerRsrc(e)?"server":"portal",c=this.credentials.filter((t=>this._hasSameServerInstance(t.server,e)&&t.scope===h));if(e=l||e,c.length)if(1===c.length){if(r=c[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(c.some((a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0)))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!(0,p.FX)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,p.FX)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new p.s0(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,rt.$E)(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=(0,rt.qG)(e),t=(0,rt.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){const t=(n.A.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.slice(r+t.length+1)),e=(0,p.S8)(e),(0,p.An)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new p.s0(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some((e=>e.regex.test(t.uri)));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||n.A.portalUrl&&(s=(0,p.FX)(t,n.A.portalUrl,!0)),s||(s=this._portals.some((e=>this._hasSameServerInstance(e,t.uri)))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach(((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)}));let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&it(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,o.A)(e=s+"/rest/info",{query:{f:"json"}}).then((e=>e.data)),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some((r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t))),t||this._portals.some((r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t))),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.slice(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new p.s0(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then((i=>{const n=new ht({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?ot:at,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n}))}const i=new ht({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?ot:at,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new a.A(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then((e=>{t.resolve(e)})).catch((e=>{t.reject(e)}))}_setOAuthResponseQueryString(e){e&&("?"===e.charAt(0)&&(e=e.slice(1)),this._processOAuthPopupParams((0,p.zf)(e)))}async _exchangeToken(e,t,r){return(await(0,o.A)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}})).data.token}async _getPlatformSelf(e,t){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const r=await(0,o.A)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,r.data}catch(e){throw"OAUTH_0066"===e.details?.messageCode&&(this._getPlatformSelfError=[e,Date.now()]),e}}_getPortalSelf(e,t){let r;return this._gwDomains.some((t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r))),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,o.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then((e=>e.data)))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,p.FX)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,p.zs)(n)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!i)&&r(new a.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),i}_enqueue(e,t,r,s,i,n){return s||(s=(0,u.Tw)()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach((e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}})),e.resolve(t),o.forEach((e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)})),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,n,o,l)=>{const c=e.sinfo_,d=!e.options_||!1!==e.options_.prompt,m=c.hasPortal&&this._findOAuthInfo(e.resUrl_);let f,g;if(i)t(new ht({userId:i,server:c.server??void 0,token:o??void 0,expires:null!=l?Number(l):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,h.on)(window,"message",(e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new a.A("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new ht(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new a.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(a.A.fromJSON(e.data.error))))}));(0,u.u7)(e.options_?.signal,(()=>{s.remove()}))}else if(m){let i=m._oAuthCred;if(!i){const e=new We(m,ot),t=new We(m,at);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,m._oAuthCred=i}if(i.isValid()){f=new ht({userId:i.userId??void 0,server:c.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});const n=m.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);n||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(c.server,i.refreshToken,i.appId).then((e=>(f.expires=Date.now()+1e3*e.expires_in,f.token=e.access_token,f))):Promise.resolve(f),e._pendingDfd.then((e=>n?this._exchangeToken(e.server,m.appId,e.token).then((t=>(e.token=t,e))).catch((()=>e)):e)).then((e=>{t(e)})).catch((e=>{const t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),s()):r(e)}))):t(f)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(m.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,m,c).then((e=>{t(e)})).catch(r)}else{const s=()=>{d?e._pendingDfd=this.oAuthSignIn(e.resUrl_,c,m,e.options_).then(t,r):(g=new a.A("identity-manager:not-authenticated","User is not signed in."),r(g))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(c.server,m.appId).then((e=>{(0,p.FX)(e.portalUrl,this._appOrigin,!0)?(f=new ht({userId:e.username,server:c.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(f)):s()})).catch(s):s()}}else if(d){if(this._checkProtocol(e.resUrl_,c,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,c,s).then(t,r)}}else g=new a.A("identity-manager:not-authenticated","User is not signed in."),r(g)},i=()=>{const s=e.sinfo_,i=s.owningSystemUrl,n=e.options_;let o,a,l,h;if(n&&(o=n.token,a=n.error,l=n.prompt),h=this._findCredential(i,{token:o,resource:e.resUrl_}),!h)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){h=e;break}if(h){const i=this.findCredential(e.resUrl_,h.userId);if(i)t(i);else if(nt(s,this._legacyFed)){const e=h.toJSON();e.server=s.server,e.resources=null,t(new ht(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(h.server),null,{serverUrl:e.resUrl_,token:h.token,signal:e.options_.signal,ssl:h.ssl})).then((r=>{t(new ht({userId:h?.userId,server:s.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))}),r)}else this._busy=null,o&&(e.options_.token=null),(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,token:o,error:a,prompt:l})).then((()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)}),(t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)}))};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,o=this._isServerRsrc(e.resUrl_),l=e.sinfo_._restInfoPms;l?l.promise.then((t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,d.wc)("authInfo.tokenServicesUrl",t)||(0,d.wc)("authInfo.tokenServiceUrl",t)||(0,d.wc)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,d.wc)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}o&&r.owningSystemUrl?i():s()}),(()=>{e.sinfo_._restInfoPms=null;const t=new a.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)})):o&&n?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then((t=>{const r={};let s,i,n,o;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch((()=>null)).then((e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r))):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch((()=>null)).then((()=>r)):r})).catch((()=>null)).then((t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()})):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const i=e.customBaseUrl,n=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=window.location.href;let e=r.indexOf("?");e>-1&&(r=r.slice(0,e)),e=r.search(/\/(apps|home)\//),r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,o.A)(r+"/sharing/rest",{query:{f:"json"}}).then((()=>{this._defaultOAuthInfo=new Qe({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})}))):t=Promise.resolve(),t.then((()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,o.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:n,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,p.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then((e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&i?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+i:t.portalUrl=s,t.popup=window!==window.top||!((0,p.FX)(s,this._appOrigin)||this._gwDomains.some((e=>e.regex.test(s)&&e.regex.test(this._appOrigin)))),this.oAuthInfos.push(t)}}))}))}_doOAuthSignIn(e,t,r,s){const i=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),i.stateUID&&(n.uid=i.stateUID);const o={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(o.force_login=!0),r.forceUserId&&r.userId&&(o.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(o.redirectToUserOrgUrl=!0),i.codeVerifier&&(o.code_challenge=s||i.codeVerifier,o.code_challenge_method=s?"S256":"plain");const l=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",c=l+"?"+(0,p.x0)(o);if(r.popup){const e=window.open(c,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval((()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new a.A("identity-manager:user-aborted","ABORTED");e.reject(t)}}}),500),this._oAuthOnPopupHandle=(0,h.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],(e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)}));else{const e=new a.A("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:o,authorizeUrl:l,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=c}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,p.s2)(e.popupCallbackUrl);if(t){const e=(0,p.An)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach((t=>{delete e.query[t]})),(0,p.a6)(e.path,e.query)}return r}}lt.prototype.declaredClass="esri.identity.IdentityManagerBase";let ht=class extends l.A.EventedAccessor{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){const e=s.id,t=e.findServerInfo(this.server),r=t?.owningSystemUrl,i=!!r&&"server"===this.scope,n=i&&nt(t,e._legacyFed),o=t.webTierAuth,a=o&&e.normalizeWebTierAuth,l=st[this.server],h=l?.[this.userId];let c,d=this.resources&&this.resources[0],u=i?e.findServerInfo(r):null,p={username:this.userId,password:h};if(o&&!a)return;i&&!u&&e.serverInfos.some((t=>(e._isIdProvider(r,t.server)&&(u=t),!!u)));const m=u?e.findCredential(u.server,this.userId):null;if(!i||m){if(!n){if(i)c={serverUrl:d,token:m?.token,ssl:m?.ssl};else if(a)p=null,c={ssl:this.ssl};else{if(!h){let r;return d&&(d=e._sanitizeUrl(d),this._enqueued=1,r=e._enqueue(d,t,null,null,this.isAdmin,this),r.then((()=>{this._enqueued=0,this.refreshServerTokens()})).catch((()=>{this._enqueued=0}))),r}this.isAdmin&&(c={isAdmin:!0})}return e.generateToken(i?u:t,i?null:p,c).then((e=>{this.token=e.token,this.expires=null!=e.expires?Number(e.expires):null,this.creationTime=Date.now(),this.validity=e.validity,this.emitTokenChange(),this.refreshServerTokens()})).catch((()=>{}))}m?.refreshToken()}}refreshServerTokens(){if("portal"===this.scope){const e=s.id;e.credentials.forEach((t=>{const r=e.findServerInfo(t.server),s=r?.owningSystemUrl;t!==this&&t.userId===this.userId&&s&&"server"===t.scope&&(e._hasSameServerInstance(this.server,s)||e._isIdProvider(s,this.server))&&(nt(r,e._legacyFed)?(t.token=this.token,t.expires=this.expires,t.creationTime=this.creationTime,t.validity=this.validity,t.emitTokenChange()):t.refreshToken())}))}}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=s.id,r=this.server?t.findServerInfo(this.server):null,i=r?.owningSystemUrl,n=i?t.findServerInfo(i):null;!1===e||i&&"portal"!==this.scope&&(!n?.webTierAuth||t.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,c.oy)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,i._)([(0,m.MZ)()],ht.prototype,"creationTime",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"expires",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"isAdmin",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"oAuthState",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"resources",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"scope",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"server",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"ssl",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"token",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"tokenRefreshBuffer",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"userId",void 0),(0,i._)([(0,m.MZ)()],ht.prototype,"validity",void 0),ht=(0,i._)([(0,g.$)("esri.identity.Credential")],ht);class ct extends lt{}ct.prototype.declaredClass="esri.identity.IdentityManager";const dt=new ct;(0,s.Aq)(dt)},47566:(e,t,r)=>{r(97770),r(18047),r(71754),r(73444);var s=r(10838),i=r(78888),n=r(49186);async function o(e){if(null!=l.fetchBundleAsset)return l.fetchBundleAsset(e);const t=await(0,i.A)(e,{responseType:"text"});return JSON.parse(t.data)}class a{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,i){const a=t.exec(r);if(!a)throw new n.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",h=a[2],c=(0,s.xO)(i),d=`${l}${h}.json`,u=c?`${l}${h}_${c}.json`:d;let p;try{p=await o(e(u))}catch(t){if(u===d)throw new n.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{p=await o(e(d))}catch(e){throw new n.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return p}(this.getAssetUrl,this.matcher,e,t)}}const l={};var h,c=r(2741);(0,s.ao)((h={pattern:"esri/",location:c.s},new a(h)))},97770:(e,t,r)=>{r.d(t,{J2:()=>A,Yq:()=>S,_v:()=>g,wj:()=>w});var s=r(66552),i=r(73444),n=r(56400);r(96285),n.n$;const o={year:"numeric",month:"numeric",day:"numeric"},a={year:"numeric",month:"long",day:"numeric"},l={year:"numeric",month:"short",day:"numeric"},h={year:"numeric",month:"long",weekday:"long",day:"numeric"},c={hour:"numeric",minute:"numeric"},d={...c,second:"numeric"},u={hourCycle:"h23"},p={...c,...u},m={...d,...u},f={"short-date":o,"short-date-short-time":{...o,...c},"short-date-short-time-24":{...o,...p},"short-date-long-time":{...o,...d},"short-date-long-time-24":{...o,...m},"short-date-le":o,"short-date-le-short-time":{...o,...c},"short-date-le-short-time-24":{...o,...p},"short-date-le-long-time":{...o,...d},"short-date-le-long-time-24":{...o,...m},"long-month-day-year":a,"long-month-day-year-short-time":{...a,...c},"long-month-day-year-short-time-24":{...a,...p},"long-month-day-year-long-time":{...a,...d},"long-month-day-year-long-time-24":{...a,...m},"day-short-month-year":l,"day-short-month-year-short-time":{...l,...c},"day-short-month-year-short-time-24":{...l,...p},"day-short-month-year-long-time":{...l,...d},"day-short-month-year-long-time-24":{...l,...m},"long-date":h,"long-date-short-time":{...h,...c},"long-date-short-time-24":{...h,...p},"long-date-long-time":{...h,...d},"long-date-long-time-24":{...h,...m},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":c,"long-time":d},g=(0,s.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),_={ar:"ar-u-nu-latn-ca-gregory"};let v=new WeakMap;const y=f["short-date-short-time"];function A(e){return f[e]}function S(e,t=y){return function(e){let t=v.get(e);if(!t){const r=(0,i.JK)(),s=_[r]||r,o=w(e.timeZone??n.qU),a={...e,timeZone:o};t=new Intl.DateTimeFormat(s,a),v.set(e,t)}return t}(t).format(e)}function w(e){switch(e){case n.qU:return n.N5;case n.L5:return n.n$;default:return e}}(0,i.Ml)((()=>{v=new WeakMap}))},73444:(e,t,r)=>{r.d(t,{JK:()=>l,Ml:()=>p,Z0:()=>h,oQ:()=>d});var s=r(36563);let i;const n=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale,o=globalThis.document?.documentElement;function a(){const e=o?.getAttribute("lang"),t=globalThis.navigator?.language;return n??e??t??"en"}function l(){return void 0===i&&(i=a()),i}function h(e=l()){const t=/^([a-zA-Z]{2,3})(?:[_-][a-zA-Z0-9]+)*$/.exec(e);return t?.[1].toLowerCase()}const c=[];function d(e){return c.push(e),(0,s.hA)((()=>c.splice(c.indexOf(e),1)))}const u=[];function p(e){return u.push(e),(0,s.hA)((()=>u.splice(u.indexOf(e),1)))}function m(){const e=a();i!==e&&([...u].forEach((t=>t(e))),i=e,[...c].forEach((t=>t(e))))}globalThis.addEventListener?.("languagechange",m),o&&new MutationObserver((()=>{m()})).observe(o,{attributeFilter:["lang"]})},10838:(e,t,r)=>{r.d(t,{ao:()=>p,ud:()=>m,xO:()=>f});var s=r(49186),i=r(36563),n=r(74887),o=r(73444);const a=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:"no",nl:!0,no:!0,pl:!0,pt:"pt-BR","pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,zh:"zh-CN","zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function h(e){if(function(e){return e in l}(e)){const t=l[e];return!0===t?e:t}return null}const c=[],d=new Map;function u(e){for(const t of d.keys())g(e.pattern,t)&&d.delete(t)}function p(e){return c.includes(e)||(u(e),c.unshift(e)),(0,i.hA)((()=>{const t=c.indexOf(e);t>-1&&(c.splice(t,1),u(e))}))}async function m(e){const t=(0,o.JK)();d.has(e)||d.set(e,async function(e,t){const r=[];for(const s of c)if(g(s.pattern,e))try{return await s.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new s.A("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new s.A("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=d.get(e);return r&&await _.add(r),r}function f(e){if(!a.test(e))return null;const t=a.exec(e);if(null===t)return null;const[,r,s]=t;return h(r+(s?"-"+s.toUpperCase():""))??h(r)}function g(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,o.Ml)((()=>{d.clear()}));const _=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,n.Tw)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18047:(e,t,r)=>{r.d(t,{ZV:()=>a});var s=r(73444);const i={ar:"ar-u-nu-latn"};let n=new WeakMap,o={};function a(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const r=(0,s.JK)(),o=i[(0,s.JK)()]||r;n.set(t,new Intl.NumberFormat(o,e))}return n.get(t)}(t).format(e)}(0,s.Ml)((()=>{n=new WeakMap,o={}})),new Map},71754:(e,t,r)=>{r.d(t,{V:()=>h});var s=r(53966),i=r(93637),n=r(799),o=r(97770),a=r(18047);const l=()=>s.A.getLogger("esri.intl.substitute");function h(e,t,r={}){const{format:s={}}=r;return(0,n.HC)(e,(e=>function(e,t,r){let s,n;const o=e.indexOf(":");if(-1===o?s=e.trim():(s=e.slice(0,o).trim(),n=e.slice(o+1).trim()),!s)return"";const a=(0,i.wc)(s,t);if(null==a)return"";const l=(n?r?.[n]:null)??r?.[s];return l?c(a,l):n?d(a,n):u(a)}(e,t,s)))}function c(e,t){switch(t.type){case"date":return(0,o.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return l().warn("missing format descriptor for key {key}"),u(e)}}function d(e,t){switch(t.toLowerCase()){case"dateformat":return(0,o.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return l().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,o.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):u(e)}}function u(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,o.Yq)(e):""}}},56400:(e,t,r)=>{r.d(t,{ZS:()=>c,wr:()=>d,qU:()=>n,N5:()=>l,P6:()=>h,L5:()=>o,n$:()=>a});const s=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Bishkek"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Mazatlan"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);var i=r(96285);const n="system",o="unknown",a="UTC",l=Intl.DateTimeFormat().resolvedOptions().timeZone;function h(e,t=!1){return{json:{read:{source:e,reader:(t,r)=>r[e]?c(r[e]):null},write:!!t&&{allowNull:!0,writer(t,r){r[e]=t?function(e){return{timeZoneIANA:e}}(t):null}}}}}function c(e,t=n){return e?function(e){return"timeZoneIANA"in e}(e)?e.timeZoneIANA:function(e,t=n){if(!e||!s.has(e.timeZone))return t;const r=s.get(e.timeZone);return function(e){return e.startsWith("UTC")}(e.timeZone)||e.respectsDaylightSaving?r:function(e){const t=i.c9.local().setZone(e),r=Math.min(t.set({month:1,day:1}).offset,t.set({month:5}).offset);return 0===r?"Etc/UTC":`Etc/GMT${i.mQ.instance(-r).formatOffset(0,"narrow")}`}(r)}(e,t):t}function d(e){const t=new Set(["etc/utc","etc/gmt","gmt"]),r=new Set(Intl.supportedValuesOf("timeZone").map((e=>e.toLowerCase())));return e===n||e===o||t.has(e.toLowerCase())||r.has(e.toLowerCase())}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8096],{8096:(e,t,s)=>{s.r(t),s.d(t,{toBinaryGLTF:()=>Q});var n,i=s(74887);!function(e){e[e.JSON=1313821514]="JSON",e[e.BIN=5130562]="BIN"}(n||(n={}));class r{constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=r.HEADER_SIZE,this._length+=r.CHUNK_HEADER_SIZE;const s=function(e){return(new TextEncoder).encode(e).buffer}(e);if(this._length+=_(s.byteLength,4),t&&(this._length+=r.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,n.JSON,32);t&&this._writeChunk(t,i,n.BIN)}_writeHeader(){this._outView.setUint32(0,r.MAGIC,!0),this._outView.setUint32(4,r.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,n=0){const i=_(e.byteLength,4);for(this._outView.setUint32(t,i,!0),this._outView.setUint32(t+=4,s,!0),function(e,t,s,n,i){new Uint8Array(e,s,i).set(new Uint8Array(t,0,i),0)}(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)n&&this._outView.setUint8(t,n),t++;return t}}function _(e,t){return t*Math.ceil(e/t)}r.HEADER_SIZE=12,r.CHUNK_HEADER_SIZE=8,r.MAGIC=1179937895,r.VERSION=2;var E,a,o,T,A,R,c,N,u=s(40876),f=s(53966),h=s(91869),l=s(34727),O=s(67026),S=s(82534),C=s(38954),I=s(51850),d=s(80882),L=s(72258);(N=E||(E={}))[N.External=0]="External",N[N.DataURI=1]="DataURI",N[N.GLB=2]="GLB",function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(a||(a={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={})),function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(T||(T={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(e){e.OPAQUE="OPAQUE",e.MASK="MASK",e.BLEND="BLEND"}(R||(R={})),function(e){e[e.NoColor=0]="NoColor",e[e.FaceColor=1]="FaceColor",e[e.VertexColor=2]="VertexColor"}(c||(c={}));var M=s(63907);class D{constructor(e,t,s,n,i){this._buffer=e,this._componentType=s,this._dataType=n,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:i};const r=this._getElementSize();r>=4&&i!==o.ELEMENT_ARRAY_BUFFER&&(this._bufferView.byteStride=r),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,n=this._accessorMin[s];this._accessorMin[s]="number"!=typeof n?e:Math.min(n,e);const i=this._accessorMax[s];this._accessorMax[s]="number"!=typeof i?e:Math.max(i,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return function(e){return 4*Math.ceil(e/4)}(this.dataSize)}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case M.pe.BYTE:return new Int8Array(e,t);case M.pe.FLOAT:return new Float32Array(e,t);case M.pe.SHORT:return new Int16Array(e,t);case M.pe.UNSIGNED_BYTE:return new Uint8Array(e,t);case M.pe.UNSIGNED_INT:return new Uint32Array(e,t);case M.pe.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then((e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise})),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const n={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case M.pe.UNSIGNED_BYTE:case M.pe.UNSIGNED_SHORT:n.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,n}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise((e=>this._finalizedPromiseResolve=e))}async finalize(){const e=this._bufferView,t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),await Promise.allSettled(t),this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case M.pe.BYTE:case M.pe.UNSIGNED_BYTE:return 1;case M.pe.SHORT:case M.pe.UNSIGNED_SHORT:return 2;case M.pe.UNSIGNED_INT:case M.pe.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case T.SCALAR:return 1;case T.VEC2:return 2;case T.VEC3:return 3;case T.VEC4:case T.MAT2:return 4;case T.MAT3:return 9;case T.MAT4:return 16}}}class p{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const n=new D(this,this._gltf,e,t,s);return this._bufferViews.push(n),n}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then((()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e})),this._gltf.extras.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function U(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&m(s.faces,t)}function m(e,t){null==t.normal&&(t.normal=new Float32Array(t.position.length));const{position:s,normal:n}=t,i=e.length/3;for(let t=0;t<i;++t){const i=3*e[3*t],r=3*e[3*t+1],_=3*e[3*t+2],E=(0,C.i)(G,s[i],s[i+1],s[i+2]),a=(0,C.i)(P,s[r],s[r+1],s[r+2]),o=(0,C.i)(B,s[_],s[_+1],s[_+2]),T=(0,C.d)(a,a,E),A=(0,C.d)(o,o,E),R=(0,C.e)(T,T,A);n[i]+=R[0],n[i+1]+=R[1],n[i+2]+=R[2],n[r]+=R[0],n[r+1]+=R[1],n[r+2]+=R[2],n[_]+=R[0],n[_+1]+=R[1],n[_+2]+=R[2]}for(let e=0;e<n.length;e+=3)(0,C.i)(g,n[e],n[e+1],n[e+2]),(0,C.n)(g,g),n[e]=g[0],n[e+1]=g[1],n[e+2]=g[2]}const G=(0,I.vt)(),P=(0,I.vt)(),B=(0,I.vt)(),g=(0,I.vt)();s(44208);var F=s(49186),w=s(84952);async function b(e,t){const s=H(e);if(null==s)throw new F.A("imageToArrayBuffer","Unsupported image type");const n=function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,w.DB)(t)){const e=(0,w.r$)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),r=await new Promise((e=>s.toBlob(e,n)));if((0,i.Te)(t),!r)throw new F.A("imageToArrayBuffer","Failed to encode image");const _=await r.arrayBuffer();return(0,i.Te)(t),{data:_,type:n}}function H(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}var x=s(51530);const y=()=>f.A.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class V{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.output.buffer===E.GLB||t.output.image===a.GLB;s&&(t.binChunkBuffer=new p(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,C.p)(s,I.uY)||(t.translation=(0,I.o8)(s));const n=e.rotation;(0,O.t2)(n,S.zK)||(t.rotation=(0,S.o8)(n));const i=e.scale;(0,C.p)(i,I.Un)||(t.scale=(0,I.o8)(i));const r=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),n=[r];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),n.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return n}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[r]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.output.buffer===E.GLB;let n;n=s?t.binChunkBuffer:new p(this.gltf);const i=this.options.origin,r=e.vertexSpace.clone();r.origin=[i.x,i.y,i.z??0];const _=(0,L.UR)({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},r,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!_)return[];U(e,_),Y(_);const{position:a,normal:A,tangent:R}=_,{uv:c,color:N}=e.vertexAttributes,u=n.addBufferView(M.pe.FLOAT,T.VEC3,o.ARRAY_BUFFER);let f,h,l,O;A&&(f=n.addBufferView(M.pe.FLOAT,T.VEC3,o.ARRAY_BUFFER)),c&&(h=n.addBufferView(M.pe.FLOAT,T.VEC2,o.ARRAY_BUFFER)),R&&(l=n.addBufferView(M.pe.FLOAT,T.VEC4,o.ARRAY_BUFFER)),N&&(O=n.addBufferView(M.pe.FLOAT,T.VEC4,o.ARRAY_BUFFER)),u.startAccessor("POSITION"),f&&f.startAccessor("NORMAL"),h&&h.startAccessor("TEXCOORD_0"),l&&l.startAccessor("TANGENT"),O&&O.startAccessor("COLOR_0");const S=_.position.length/3;for(let e=0;e<S;++e)u.push(a[3*e]),u.push(a[3*e+1]),u.push(a[3*e+2]),f&&null!=A&&(f.push(A[3*e]),f.push(A[3*e+1]),f.push(A[3*e+2])),h&&null!=c&&(h.push(c[2*e]),h.push(c[2*e+1])),l&&null!=R&&(l.push(R[4*e]),l.push(R[4*e+1]),l.push(R[4*e+2]),l.push(R[4*e+3])),O&&null!=N&&(O.push(z(N[4*e]/255)),O.push(z(N[4*e+1]/255)),O.push(z(N[4*e+2]/255)),O.push(N[4*e+3]/255));const C=u.endAccessor(),I=this._addAccessor(u.index,C);let d,D,m,G,P;if(f){const e=f.endAccessor();d=this._addAccessor(f.index,e)}if(h){const e=h.endAccessor();D=this._addAccessor(h.index,e)}if(l){const e=l.endAccessor();m=this._addAccessor(l.index,e)}if(O){const e=O.endAccessor();G=this._addAccessor(O.index,e)}const B=[];return e.components&&e.components.length>0&&e.components[0].faces?(P=n.addBufferView(M.pe.UNSIGNED_INT,T.SCALAR,o.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(P,e.components,B,I,d,D,m,G)):this._addMeshVertexNonIndexed(e.components,B,I,d,D,m,G),u.finalize(),f&&f.finalize(),h&&h.finalize(),l&&l.finalize(),P&&P.finalize(),O&&O.finalize(),s||n.finalize(),B}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=R.MASK;break;case"auto":case"blend":s.alphaMode=R.BLEND}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const n=e=>{const t=e.toRgba();return t[0]=z(t[0]/255),t[1]=z(t[1]/255),t[2]=z(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=n(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof d.A){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=n(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,y().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const i=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),i}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:(0,l.kU)(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,h.tE)(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},n=t.length;return t.push(s),n}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const n=this.gltf.extras;switch(n.output.image){case a.GLB:{const e=n.binChunkBuffer.addBufferView(M.pe.UNSIGNED_BYTE,T.SCALAR);if((0,x.x3)(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const i=b(t,this.options.signal).then((({data:e,type:t})=>(s.mimeType=t,e)));n.promises.push(e.writeAsync(i).then((()=>{e.finalize()})))}s.bufferView=e.index;break}case a.DataURI:if((0,x.x3)(t)){y().warnOnce("Image export for basis compressed textures not available.");break}s.uri=function(e){const t=H(e);return null!=t?t.toDataURL():""}(t);break;default:if((0,x.x3)(t)){y().warnOnce("Image export for basis compressed textures not available.");break}n.promises.push(b(t,this.options.signal).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const n=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,n),n}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=M.pF.REPEAT,s=M.pF.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=M.pF.CLAMP_TO_EDGE,s=M.pF.CLAMP_TO_EDGE;break;case"mirror":t=M.pF.MIRRORED_REPEAT,s=M.pF.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=M.pF.CLAMP_TO_EDGE;break;case"mirror":s=M.pF.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=M.pF.CLAMP_TO_EDGE;break;case"mirror":t=M.pF.MIRRORED_REPEAT}}const n={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(n)===JSON.stringify(this.gltf.samplers[e]))return e;const i=this.gltf.samplers.length;return this.gltf.samplers.push(n),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const n=this.gltf.accessors.length;return this.gltf.accessors.push(s),n}_addMeshVertexIndexed(e,t,s,n,i,r,_,E){const a=new Map;for(const o of t){if(e.startAccessor("INDICES"),o.faces)for(let t=0;t<o.faces.length;++t)e.push(o.faces[t]);const t=e.endAccessor(),T={attributes:{POSITION:n},indices:this._addAccessor(e.index,t),material:this._addMaterial(o.material)};i&&"flat"!==o.shading&&(T.attributes.NORMAL=i),r&&(T.attributes.TEXCOORD_0=r),_&&"flat"!==o.shading&&(T.attributes.TANGENT=_),E&&(T.attributes.COLOR_0=E);const A=a.get(o.name);if(A)A.primitives.push(T);else{const e={name:o.name,primitives:[T]};a.set(o.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,n,i,r,_){const E={primitives:[]};t.push(E);const a={attributes:{POSITION:s}};n&&(a.attributes.NORMAL=n),i&&(a.attributes.TEXCOORD_0=i),r&&(a.attributes.TANGENT=r),_&&(a.attributes.COLOR_0=_),e&&(a.material=this._addMaterial(e[0].material)),E.primitives.push(a)}}function Y({position:e,normal:t,tangent:s}){v(e,3),v(t,3),v(s,4)}function v(e,t){if(null!=e)for(let s=1,n=2;s<e.length;s+=t,n+=t){const t=e[s],i=e[n];e[s]=i,e[n]=-t}}function z(e){return e**u.Tf}var X=s(4576);class k{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,X.TF)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class W{constructor(e){this.mesh=e,this.name="",this.translation=(0,I.vt)(),this.rotation=(0,S.vt)(),this.scale=(0,I.o8)(I.Un),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,O.A6)(this.rotation,e[0],e[1],e[2])}}const K="model.gltf",j="model.glb";async function Z(e,t){const s=new V(e,t).gltf,n=s.extras.promises;let _=1,o=1,T=null;await Promise.allSettled(n),(0,i.Te)(t.signal);const A=t.jsonSpacing??4,R=new Map,c=JSON.stringify(s,((e,s)=>{if("extras"!==e){if(s instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(s))switch(t.output?.image){case a.DataURI:case a.GLB:break;case a.External:default:{const e=`img${o}.png`;return o++,R.set(e,s),e}}switch(t.output?.buffer){case E.DataURI:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(s);case E.GLB:if(T)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(T=s);case E.External:default:{const e=`data${_}.bin`;return _++,R.set(e,s),e}}}return s}}),A);return t.output?.buffer===E.GLB||t.output?.image===a.GLB?R.set(j,new r(c,T).buffer):R.set(K,c),R}class J{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}async function Q(e,t){const s=new k,n=new J;return s.addScene(n),n.addNode(new W(e)),await async function(e,t){const s=(await Z(e,{output:{buffer:E.GLB,image:a.GLB},jsonSpacing:0,...t})).get(j);if(!(s&&s instanceof ArrayBuffer))throw new Error("failed to export to glb");return s}(s,{origin:e.origin,...t})}},51530:(e,t,s)=>{s.d(t,{KB:()=>E,Xi:()=>r,pn:()=>a,x3:()=>_});var n=s(44208),i=s(89192);class r{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=i.JS.KTX2_ENCODING}}function _(e){return"encoded-mesh-texture"===e?.type}async function E(e){const t=new Blob([e]),s=await t.text();return JSON.parse(s)}async function a(e,t){if(t===i.JS.KTX2_ENCODING)return new r(e);const s=new Blob([e],{type:t});let _=URL.createObjectURL(s);switch(t){case"image/jpeg":_+="#.jpg";break;case"image/png":_+="#.png"}const E=new Image;if((0,n.A)("esri-iPhone"))return new Promise(((e,t)=>{const s=()=>{i(),e(E)},n=e=>{i(),t(e)},i=()=>{URL.revokeObjectURL(_),E.removeEventListener("load",s),E.removeEventListener("error",n)};E.addEventListener("load",s),E.addEventListener("error",n),E.src=_}));try{E.src=_,await E.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(_),E}},89192:(e,t,s)=>{var n,i,r,_,E,a,o,T;s.d(t,{Am:()=>_,C7:()=>r,JS:()=>T,Mg:()=>a,dd:()=>E,it:()=>i,s2:()=>n,sf:()=>o}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(n||(n={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(r||(r={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(_||(_={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(E||(E={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee"}(a||(a={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(o||(o={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(T||(T={}))},63907:(e,t,s)=>{var n,i,r,_,E,a,o,T,A,R,c,N,u,f,h,l,O,S,C,I,d,L,M;s.d(t,{Ab:()=>f,Ac:()=>o,Ap:()=>u,CQ:()=>p,Cj:()=>c,Co:()=>C,H0:()=>h,Hr:()=>M,MT:()=>A,NV:()=>n,NZ:()=>E,Nm:()=>L,R:()=>I,Tb:()=>_,WR:()=>i,Y7:()=>a,_U:()=>S,dn:()=>r,eA:()=>R,ld:()=>l,nI:()=>D,pF:()=>N,pe:()=>T,vt:()=>d,yQ:()=>O}),function(e){e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e[e.COLOR=16384]="COLOR"}(n||(n={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(i||(i={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(r||(r={})),function(e){e[e.ADD=32774]="ADD",e[e.MIN=32775]="MIN",e[e.MAX=32776]="MAX",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(_||(_={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",e[e.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(E||(E={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(a||(a={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(o||(o={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT",e[e.HALF_FLOAT=5131]="HALF_FLOAT"}(T||(T={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(A||(A={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(R||(R={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(N||(N={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(u||(u={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(f||(f={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(h||(h={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(l||(l={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(O||(O={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(S||(S={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(C||(C={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(I||(I={})),function(e){e[e.Texture=0]="Texture",e[e.BufferObject=1]="BufferObject",e[e.VertexArrayObject=2]="VertexArrayObject",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.FramebufferObject=5]="FramebufferObject",e[e.Renderbuffer=6]="Renderbuffer",e[e.TransformFeedback=7]="TransformFeedback",e[e.Sync=8]="Sync",e[e.UNCOUNTED=9]="UNCOUNTED",e[e.LinesOfCode=9]="LinesOfCode",e[e.Uniform=10]="Uniform",e[e.COUNT=11]="COUNT"}(d||(d={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(L||(L={})),function(e){e[e.NONE=0]="NONE",e[e.BACK=1029]="BACK"}(M||(M={}));const D=33306;var p,U,m,G,P,B,g;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(p||(p={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(U||(U={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(m||(m={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(G||(G={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(P||(P={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(B||(B={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(g||(g={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[364],{51624:(e,t,r)=>{r.d(t,{A:()=>d});var s,n,a=r(44208),i=r(69397),o=r(93687);(n=s||(s={}))[n.varint=0]="varint",n[n.fixed64=1]="fixed64",n[n.delimited=2]="delimited",n[n.fixed32=5]="fixed32",n[n.unknown=99]="unknown";const u=4294967296,l=new TextDecoder("utf-8"),c=(0,a.A)("safari")||(0,a.A)("ios")?6:(0,a.A)("ff")?12:32;class d{constructor(e,t,r=0,n=(e?e.byteLength:0)){this._tag=0,this._dataType=s.unknown,this._init(e,t,r,n)}_init(e,t,r,s){this._data=e,this._dataView=t,this._pos=r,this._end=s}get usedMemory(){return 64+(0,i.Qf)(this._data)}asUnsafe(){return this}clone(){return new d(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*u;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*u;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,s){const n=this.getMessage(),a=e(n,t,r,s);return n.release(),a}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=d.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){d.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case s.varint:this._decodeVarint();break;case s.fixed64:this._skip(8);break;case s.delimited:this._skip(this._getLength());break;case s.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,s=0;if(this._end-t>=10)do{if(s=e[t++],r|=127&s,!(128&s))break;if(s=e[t++],r|=(127&s)<<7,!(128&s))break;if(s=e[t++],r|=(127&s)<<14,!(128&s))break;if(s=e[t++],r|=(127&s)<<21,!(128&s))break;if(s=e[t++],r+=268435456*(127&s),!(128&s))break;if(s=e[t++],r+=34359738368*(127&s),!(128&s))break;if(s=e[t++],r+=4398046511104*(127&s),!(128&s))break;if(s=e[t++],r+=562949953421312*(127&s),!(128&s))break;if(s=e[t++],r+=72057594037927940*(127&s),!(128&s))break;if(s=e[t++],r+=0x8000000000000000*(127&s),!(128&s))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(s=e[t],128&s);)++t,r+=(127&s)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=s*n}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t,r=0,s=0;const n=1&e[this._pos];if(s=e[this._pos++],r|=127&s,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<7,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<14,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r|=(127&s)<<21,!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=268435456*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=34359738368*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(s=e[this._pos++],r+=4398046511104*(127&s),!(128&s))return n?-(r+1)/2:r/2;if(t=BigInt(r),s=e[this._pos++],t+=0x2000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);if(s=e[this._pos++],t+=0x100000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);if(s=e[this._pos++],t+=0x8000000000000000n*BigInt(127&s),!(128&s))return Number(n?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==s.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>c){const s=e.subarray(t,r);return l.decode(s)}let s="",n="";for(let a=t;a<r;++a){const t=e[a];128&t?n+="%"+t.toString(16):(s+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(s+=decodeURIComponent(n)),s}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}d.pool=new o.A(d,void 0,(e=>{e._data=null,e._dataView=null}))},10536:(e,t,r)=>{function s(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=s(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>s})},20615:(e,t,r)=>{r.d(t,{I:()=>i});var s=r(2272),n=r(80893),a=r(61956);async function i(e,t,r){const i=(0,s.Dl)(e),{data:o}=await(0,n.gW)(i,a.A.from(t),r);return o.count}},78286:(e,t,r)=>{r.d(t,{V:()=>i});var s=r(2272),n=r(80893),a=r(61956);async function i(e,t,r){const i=(0,s.Dl)(e),{data:o}=await(0,n.Pk)(i,a.A.from(t),r);return o.objectIds}},99199:(e,t,r)=>{r.d(t,{e:()=>u,s:()=>o});var s=r(2272),n=r(80893),a=r(22671),i=r(61956);async function o(e,t,r){const s=await u(e,t,r);return a.A.fromJSON(s)}async function u(e,t,r){const a=(0,s.Dl)(e),o={...r},u=i.A.from(t),{data:l}=await(0,n.eW)(a,u,u.sourceSpatialReference,o);return l}},53655:(e,t,r)=>{r.d(t,{SH:()=>R,ae:()=>T,cn:()=>m});var s=r(49186),n=r(51624),a=r(92722),i=r(69418);const o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],u=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],l=["upperLeft","lowerLeft"];function c(e){return e>=o.length?null:o[e]}function d(e){return e>=u.length?null:u[e]}function p(e){return e>=l.length?null:l[e]}function h(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function g(e,t,r){const s=e.asUnsafe(),n=t.createPointGeometry(r);for(;s.next();)switch(s.tag()){case 3:{const e=s.getUInt32(),r=s.pos()+e;let a=0;for(;s.pos()<r;)t.addCoordinatePoint(n,s.getSInt64(),a++);break}default:s.skip()}return n}function f(e,t,r){const s=e.asUnsafe(),n=t.createGeometry(r),a=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;s.next();)switch(s.tag()){case 2:{const e=s.getUInt32(),r=s.pos()+e;let a=0;for(;s.pos()<r;)t.addLength(n,s.getUInt32(),a++);break}case 3:{const e=s.getUInt32(),r=s.pos()+e;let i=0;for(t.allocateCoordinates(n);s.pos()<r;)t.addCoordinate(n,s.getSInt64(),i),i++,i===a&&(i=0);break}default:s.skip()}return n}function y(e){const t=e.asUnsafe(),r=new a.A;let s="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),s=t.pos()+e;for(;t.pos()<s;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),s=t.pos()+e;for(;t.pos()<s;)r.coords.push(t.getSInt64());break}case 1:s=i.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:s}}function _(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function m(e){const t=e.asUnsafe(),r={type:c(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=c(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=d(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function k(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}function b(e,t,r,s){const n=t.createFeature(r);let a=0;for(;e.next();)switch(e.tag()){case 1:{const t=s[a++].name;n.attributes[t]=e.processMessage(_);break}case 2:n.geometry=e.processMessageWithArgs(f,t,r);break;case 4:n.centroid=e.processMessageWithArgs(g,t,r);break;default:e.skip()}return n}function S(e){const t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function w(e){const t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function T(e){const t={originPosition:p(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=p(r.getEnum());break;case 2:t.scale=r.processMessage(S);break;case 3:t.translate=r.processMessage(w);break;default:r.skip()}return t}function x(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function I(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function F(e,t){const r=t.createFeatureResult(),s=e.asUnsafe();r.geometryType=h(t,0);let n=!1;for(;s.next();)switch(s.tag()){case 1:r.objectIdFieldName=s.getString();break;case 3:r.globalIdFieldName=s.getString();break;case 4:r.geohashFieldName=s.getString();break;case 5:r.geometryProperties=s.processMessage(x);break;case 7:r.geometryType=h(t,s.getEnum());break;case 8:r.spatialReference=s.processMessageWithArgs(I,t);break;case 10:r.hasZ=s.getBool();break;case 11:r.hasM=s.getBool();break;case 12:r.transform=s.processMessage(T);break;case 9:r.exceededTransferLimit=s.getBool();break;case 13:t.addField(r,s.processMessage(m));break;case 15:n||(t.prepareFeatures(r),n=!0),t.addFeature(r,s.processMessageWithArgs(b,t,r,r.fields));break;case 2:r.uniqueIdField=s.processMessage(k);break;default:s.skip()}return t.finishFeatureResult(r),r}function q(e,t){const r={};let s=null;for(;e.next();)switch(e.tag()){case 4:s=e.processMessageWithArgs(y);break;case 1:r.featureResult=e.processMessageWithArgs(F,t);break;default:e.skip()}return null!=s&&r.featureResult&&t.addQueryGeometry(r,s),r}function R(e,t){try{const r=2,s=new n.A(new Uint8Array(e),new DataView(e)),a={};for(;s.next();)s.tag()===r?a.queryResult=s.processMessageWithArgs(q,t):s.skip();return a}catch(e){throw new s.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},69418:(e,t,r)=>{r.d(t,{S:()=>l,z:()=>u});var s=r(83047),n=r(21325),a=r(43334),i=r(58512),o=r(92722);const u=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class l{constructor(e){this._options=e,this.geometryTypes=u,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new i.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,n.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,s.G9)(this._options.sourceSpatialReference)/(0,s.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,a.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new a.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.A}}},66208:(e,t,r)=>{r.d(t,{m:()=>n});var s=r(53655);function n(e,t){const r=(0,s.SH)(e,t),n=r.queryResult.featureResult,a=r.queryResult.queryGeometry,i=r.queryResult.queryGeometryType;if(n&&n.features&&n.features.length&&n.objectIdFieldName){const e=n.objectIdFieldName;for(const t of n.features)t.attributes&&(t.objectId=t.attributes[e])}return n&&(n.queryGeometry=a,n.queryGeometryType=i),n}},80893:(e,t,r)=>{r.d(t,{IJ:()=>g,Jf:()=>m,Pk:()=>y,eW:()=>h,gW:()=>_,kS:()=>f});var s=r(78888),n=r(84952),a=r(65864),i=r(17136),o=r(21325),u=r(10536),l=r(66208),c=r(58501);const d="Layer does not support extent calculation.";function p(e,t){const r=e.geometry,s=e.toJSON();delete s.compactGeometryEnabled,delete s.defaultSpatialReferenceEnabled;const n=s;let i,u,l;if(null!=r&&(u=r.spatialReference,l=(0,o.YX)(u),n.geometryType=(0,a.$B)(r),n.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(r,e.compactGeometryEnabled),n.inSR=l),s.groupByFieldsForStatistics&&(n.groupByFieldsForStatistics=s.groupByFieldsForStatistics.join(",")),s.objectIds&&(n.objectIds=s.objectIds.join(",")),s.orderByFields&&(n.orderByFields=s.orderByFields.join(",")),!s.outFields||!s.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete n.outFields:s.outFields.includes("*")?n.outFields="*":n.outFields=s.outFields.join(","),s.outSR?(n.outSR=(0,o.YX)(s.outSR),i=e.outSpatialReference):r&&(s.returnGeometry||s.returnCentroid)&&(n.outSR=n.inSR,i=u),s.returnGeometry&&delete s.returnGeometry,s.outStatistics&&(n.outStatistics=JSON.stringify(s.outStatistics)),s.fullText&&(n.fullText=JSON.stringify(s.fullText)),s.pixelSize&&(n.pixelSize=JSON.stringify(s.pixelSize)),s.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete s.quantizationParameters.extent.spatialReference,n.quantizationParameters=JSON.stringify(s.quantizationParameters)),s.parameterValues&&(n.parameterValues=JSON.stringify(s.parameterValues)),s.rangeValues&&(n.rangeValues=JSON.stringify(s.rangeValues)),s.dynamicDataSource&&(n.layer=JSON.stringify({source:s.dynamicDataSource}),delete s.dynamicDataSource),s.timeExtent){const e=s.timeExtent,{start:t,end:r}=e;null==t&&null==r||(n.time=t===r?t:`${t??"null"},${r??"null"}`),delete s.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=i&&u.equals(i)&&(n.defaultSR=n.inSR,delete n.inSR,delete n.outSR),n}async function h(e,t,r,s){const n=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await k(e,t,"json",s);return(0,c.q)(t,r,n.data),n}async function g(e,t,r,s){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:r.createFeatureResult()};const n=await f(e,t,s),a=n;return a.data=(0,l.m)(n.data,r),a}function f(e,t,r){return k(e,t,"pbf",r)}function y(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):k(e,t,"json",r,{returnIdsOnly:!0})}function _(e,t,r){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):k(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}async function m(e,t,r){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const s=await k(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),n=s.data;if(n.hasOwnProperty("extent"))return s;if(n.features)throw new Error(d);if(n.hasOwnProperty("count"))throw new Error(d);return s}async function k(e,t,r,a={},o={}){const l="string"==typeof e?(0,n.An)(e):e,c=t.geometry?[t.geometry]:[],d=await(0,i.el)(c,null,{signal:a.signal}),h=d?.[0];null!=h&&((t=t.clone()).geometry=h);const g=(0,u.z)({...l.query,f:r,...o,...p(t,o)});return(0,s.A)((0,n.fj)(l.path,(f=o,null==t.formatOf3DObjects||f.returnCountOnly||f.returnExtentOnly||f.returnIdsOnly?"query":"query3d")),{...a,responseType:"pbf"===r?"array-buffer":"json",query:{...g,...a.query}});var f}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3513],{47685:(e,t,n)=>{n.d(t,{Mk:()=>m,Zk:()=>c,w6:()=>F});var i=n(90237),r=n(65529),s=n(4718),o=n(74887),d=n(10107),a=(n(44208),n(53966),n(40608)),u=n(20816);const l=new r.A.EventEmitter;function c(e,t,n=null,i=!1){const r=(0,o.Tw)();return i=null==t||i,l.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:n,mayReceiveServiceEdits:i,result:r.promise}),r}const h=Symbol();function m(e){return null!=e&&"object"==typeof e&&h in e}function f(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function p(e,t,n){const i=new URL(e).host,r=u.Z3.get(i),s=e=>!e||e===r;return s(t)&&s(n)||t===n}const F=e=>{var t;let n=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:n,gdbVersion:i,mayReceiveServiceEdits:r,result:o}=e,d=t===this.url,a=null!=n&&null!=this.layerId&&n===this.layerId,u=f(this),l=f(this)&&p(t,i,this.gdbVersion);if(!d||u&&!l||!a&&!r)return;const c=o.then((e=>{if(this.lastEditsEventDate=new Date,a&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,s.o8)(e)),e;const n=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(n){const{adds:t,updates:i,deletes:r}=n.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:i?i.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,s.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(e.historicMoment)};return this.emit("edits",o),o}const r={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,s.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,r.historicMoment)&&this.emit("edits",r),r})).then((e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:c})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:n,moment:i}=e,r=t===this.url,s=f(this),o=f(this)&&p(t,n,this.gdbVersion),d=f(this)&&!p(t,this.gdbVersion,null);r&&s&&o&&d&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then((()=>{this.addHandles(function(e){return l.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return l.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}_shouldUpdateHistoricMoment(e,t,n){return"historicMoment"in this&&this.historicMoment!==n&&(0,u.w5)(e,t)}};return t=h,(0,i._)([(0,d.MZ)()],n.prototype,"lastEditsEventDate",void 0),n=(0,i._)([(0,a.$)("esri.layers.mixins.EditBusLayer")],n),n}},20557:(e,t,n)=>{n.d(t,{Fm:()=>a,Hz:()=>m,JQ:()=>h,JZ:()=>w,ND:()=>p,R_:()=>o,U9:()=>c,fu:()=>r,nr:()=>f,oF:()=>s,rq:()=>u,z$:()=>l});const i=[["binary","application/octet-stream","bin",""]];function r(e,t){return null!=b(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const n=u(t,e.supportedFormats??[]);return null!=n&&e.editFormats.includes(n)}function o(e,t){return g(function(e,t){const n=e.toLowerCase();return F(t).find((e=>M(e)===n))}(e,t))}function d(e,t){return g(b(e,t))}function a(e,t){return M(function(e,t){return F(t).find((t=>g(t)===e))}(e,t))}function u(e,t){return d(e.name,t)??o(e.type,t)}function l(e,t,n){return o(e,n)??d(t,n)}function c({supportedFormats:e}){return l("model/gltf-binary","glb",e)}function h(e){const t=c(e);return null!=t&&e.editFormats.includes(t)}function m(e){if(!e)return null;const t=c(e),n=function({supportedFormats:e}){return l("model/gltf+json","gltf",e)}(e);let i=null;for(const r of e.queryFormats){if(r===t)return r;r===n&&(i=r)}return i}function f({supportedFormats:e}){return l("application/esri3do-SR_world","wld",e)}function p({supportedFormats:e}){return l("application/esri3do-SR_prj","prj",e)}function F(e){return[...i,...e]}function b(e,t){const n=e.toLowerCase();return F(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>n.endsWith(e)))))}function g(e){return e?.[0]}function M(e){return e?.[1].toLowerCase()}function w(e){return e.tables?.find((e=>"assetMaps"===e.role))}},20816:(e,t,n)=>{n.d(t,{TA:()=>r,We:()=>d,Z3:()=>s,ZJ:()=>a,w5:()=>u});var i=n(78888);const r=(0,n(13069).vD)(),s=new Map,o=new Map;async function d(e,t,n){if(!e||!n)return!1;if(!t)return!0;const r=new URL(e).host;let o=s.get(r);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function a(e,t,i=!1){if(!e||!t)return!0;const s=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),d=o.get(s)?.entries();if(d)for(const[e,o]of d)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([n.e(2186).then(n.bind(n,32186)),n.e(2558).then(n.bind(n,32558))]),d=await t(s,e,new i({sessionId:r,moment:o.moment}));return d.success&&o.stack?.clearForwardEdits(),d.success}return t}return!0}function u(e,t){if(!e)return!1;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(n)?.entries();if(i)for(const[e,n]of i)if(n.name===t)return"edit"===n.lockType;return!1}new Map}}]);