@arcgis/core 6.0.0-next.8 → 6.0.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. package/arcade/featureSetUtils.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{85908e6e9c50749cee60.js → 037a8cc19debbaaa4e10.js} +1 -1
  4. package/assets/esri/core/workers/chunks/066550852483ab8f77bc.js +1 -0
  5. package/assets/esri/core/workers/chunks/0f725cf79ce00e790a7d.js +1 -0
  6. package/assets/esri/core/workers/chunks/12a7997a40c77f5c9160.js +1 -0
  7. package/assets/esri/core/workers/chunks/1b077c92345ffb5916c2.js +1 -0
  8. package/assets/esri/core/workers/chunks/{6dd0b79fa3a629ab4f27.js → 1bca39e0e651426bdbb5.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{1b35ec54968fbeec17ce.js → 2686fe5b62dd0be699c0.js} +1 -1
  10. package/assets/esri/core/workers/chunks/2a97268000c6d03ef720.js +1 -0
  11. package/assets/esri/core/workers/chunks/2e2e33ec50e97b91b178.js +1 -0
  12. package/assets/esri/core/workers/chunks/{7a05b18f655c1167ce0a.js → 2ef5237e4c876d6a4ee0.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{776ae25a34352d3468bc.js → 3081ee6d8019494fc21e.js} +1 -1
  14. package/assets/esri/core/workers/chunks/37d6a264a3f1d8072aa0.js +1 -0
  15. package/assets/esri/core/workers/chunks/3df5500a85345577480a.js +1 -0
  16. package/assets/esri/core/workers/chunks/{ded8b64a46992c3ae693.js → 40a584cb952e94326e9e.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{1ba0dfbe0958cdbd7c9f.js → 42fd2a7b22b03dacc6a7.js} +1 -1
  18. package/assets/esri/core/workers/chunks/444e5f214abce3d607cd.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d201fbf3ceff946d2bd6.js → 44d5508042cacdfcac47.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{09a63cc1987f8636c5b0.js → 4503b20ca6a80fb63d72.js} +1 -1
  21. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +1 -0
  22. package/assets/esri/core/workers/chunks/45800373650fbc8262e6.js +1 -0
  23. package/assets/esri/core/workers/chunks/{6a7ab1ef9a37e87db5ae.js → 46a7da93a63663878583.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{f43a50d4bd9636e68ae5.js → 46b4fb6a7fe4877b0efc.js} +63 -61
  25. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +1 -0
  26. package/assets/esri/core/workers/chunks/{257910cca66dc5df465e.js → 4911ce62421a6c3320b0.js} +1 -1
  27. package/assets/esri/core/workers/chunks/4a1e23e021bac37a88ab.js +1 -0
  28. package/assets/esri/core/workers/chunks/4debf2d9c3465250ef7a.js +1 -0
  29. package/assets/esri/core/workers/chunks/4e8e322b469657ac22e2.js +1 -0
  30. package/assets/esri/core/workers/chunks/54b18559280a7d2a8d93.js +1 -0
  31. package/assets/esri/core/workers/chunks/567a65f4203f6e81f4b4.js +1 -0
  32. package/assets/esri/core/workers/chunks/5c7780f804d789cb37f5.js +1 -0
  33. package/assets/esri/core/workers/chunks/{ceb680688fe7e570a774.js → 608be1172a908e92b9f1.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{6f358116f79021ff9687.js → 612104dff305ff062dfa.js} +2 -2
  35. package/assets/esri/core/workers/chunks/6299be5e7e26bf3c6859.js +1 -0
  36. package/assets/esri/core/workers/chunks/6400446b7615b97c3521.js +1 -0
  37. package/assets/esri/core/workers/chunks/6431480ba0fa8c8d487f.js +1 -0
  38. package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +1 -0
  39. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +1 -0
  40. package/assets/esri/core/workers/chunks/745a153d0cd34faa124e.js +1 -0
  41. package/assets/esri/core/workers/chunks/7572c2bc5062e66f6330.js +1 -0
  42. package/assets/esri/core/workers/chunks/78472a57c2ba146fec65.js +1 -0
  43. package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +1 -0
  44. package/assets/esri/core/workers/chunks/{56a24061589f4a968818.js → 814751e705c05099f864.js} +1 -1
  45. package/assets/esri/core/workers/chunks/8293600f94553afc8c38.js +1 -0
  46. package/assets/esri/core/workers/chunks/836bb3673ab30fc66f1e.js +1 -0
  47. package/assets/esri/core/workers/chunks/8487727f1197cf7dbf50.js +1 -0
  48. package/assets/esri/core/workers/chunks/{ceb112fe7aef354f8051.js → 88e54449261ef94e390d.js} +1 -1
  49. package/assets/esri/core/workers/chunks/8b0d5551978ab0aac0d1.js +1 -0
  50. package/assets/esri/core/workers/chunks/8d0c2de92770a1567536.js +1 -0
  51. package/assets/esri/core/workers/chunks/{c76c42c74eedd43263d3.js → 9dd1fc56eb1ea6eb705e.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{86a051e9fe71aa356108.js → 9e3e442a9874ed23a043.js} +1 -1
  53. package/assets/esri/core/workers/chunks/a40b6d8b5c73e06e14d4.js +1 -0
  54. package/assets/esri/core/workers/chunks/aaba33611753c6aada68.js +1 -0
  55. package/assets/esri/core/workers/chunks/aeaaff7a4b1a99540f52.js +1 -0
  56. package/assets/esri/core/workers/chunks/{ecaac39dde7ec4213264.js → af75747b06d79446a855.js} +1 -1
  57. package/assets/esri/core/workers/chunks/b564ec4e03478f5659db.js +1 -0
  58. package/assets/esri/core/workers/chunks/bc0f54a2c15502b630ec.js +1 -0
  59. package/assets/esri/core/workers/chunks/c1c534e08fc21842670b.js +1 -0
  60. package/assets/esri/core/workers/chunks/{9ab25ee06041f907b9a2.js → c2c1f51a4668055c2838.js} +1 -1
  61. package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +1 -0
  62. package/assets/esri/core/workers/chunks/{a7985d20fa6e8d4878e7.js → d0f5bee9db1ad51ae687.js} +1 -1
  63. package/assets/esri/core/workers/chunks/dba280c370df13196711.js +1 -0
  64. package/assets/esri/core/workers/chunks/{19b9d393046a780e6c3f.js → de5ecb567bd69c613e9d.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{534186fc921a0ccf58dc.js → e1f5d00878f27e1d413e.js} +1 -1
  66. package/assets/esri/core/workers/chunks/e65dfa19f030ec298437.js +1 -0
  67. package/assets/esri/core/workers/chunks/e932951598499befabf5.js +1 -0
  68. package/assets/esri/core/workers/chunks/f1df76f098a3cc924832.js +1 -0
  69. package/assets/esri/core/workers/chunks/f1f90adae13b04898008.js +1 -0
  70. package/assets/esri/core/workers/chunks/f4f9d08b2df856e3b694.js +1 -0
  71. package/assets/esri/core/workers/chunks/fc44227c1756f65b95df.js +1 -0
  72. package/assets/esri/core/workers/chunks/{3b737dae6efed627406e.js → fc44d45598a7476bc606.js} +1 -1
  73. package/assets/esri/themes/base/_mixins.scss +2 -2
  74. package/assets/esri/themes/base/widgets/_Attribution.scss +1 -1
  75. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +2 -2
  76. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -5
  77. package/assets/esri/themes/base/widgets/_Bookmarks.scss +1 -1
  78. package/assets/esri/themes/base/widgets/_BuildingLevelPicker.scss +2 -2
  79. package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +5 -5
  80. package/assets/esri/themes/base/widgets/_CatalogLayerList.scss +1 -1
  81. package/assets/esri/themes/base/widgets/_Compass.scss +0 -2
  82. package/assets/esri/themes/base/widgets/_DirectionalPad.scss +4 -10
  83. package/assets/esri/themes/base/widgets/_Directions.scss +40 -40
  84. package/assets/esri/themes/base/widgets/_Editor.scss +7 -7
  85. package/assets/esri/themes/base/widgets/_Expand.scss +1 -1
  86. package/assets/esri/themes/base/widgets/_Feature.scss +1 -1
  87. package/assets/esri/themes/base/widgets/_FeatureForm.scss +6 -6
  88. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +1 -1
  89. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationList.scss +1 -1
  90. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +3 -3
  91. package/assets/esri/themes/base/widgets/_FeatureTable.scss +27 -27
  92. package/assets/esri/themes/base/widgets/_FeatureTemplates.scss +1 -1
  93. package/assets/esri/themes/base/widgets/_Features.scss +5 -5
  94. package/assets/esri/themes/base/widgets/_FilterBuilder.scss +1 -1
  95. package/assets/esri/themes/base/widgets/_FilterCondition.scss +1 -1
  96. package/assets/esri/themes/base/widgets/_Grid.scss +18 -18
  97. package/assets/esri/themes/base/widgets/_GridControls.scss +11 -11
  98. package/assets/esri/themes/base/widgets/_LayerList.scss +1 -1
  99. package/assets/esri/themes/base/widgets/_Legend.scss +5 -5
  100. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +4 -1
  101. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +18 -19
  102. package/assets/esri/themes/base/widgets/_ResponsiveToolbar.scss +0 -2
  103. package/assets/esri/themes/base/widgets/_SearchResultRenderer.scss +1 -1
  104. package/assets/esri/themes/base/widgets/_SelectionList.scss +15 -15
  105. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +2 -2
  106. package/assets/esri/themes/base/widgets/_ShadowCast.scss +11 -11
  107. package/assets/esri/themes/base/widgets/_Sketch.scss +1 -1
  108. package/assets/esri/themes/base/widgets/_Slice.scss +3 -3
  109. package/assets/esri/themes/base/widgets/_SnappingControls.scss +1 -1
  110. package/assets/esri/themes/base/widgets/_TimeSlider.scss +5 -5
  111. package/assets/esri/themes/base/widgets/_TimeZoneLabel.scss +5 -4
  112. package/assets/esri/themes/base/widgets/_Tooltip.scss +14 -17
  113. package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +2 -2
  114. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +1 -1
  115. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +2 -2
  116. package/assets/esri/themes/base/widgets/_ValuePicker.scss +2 -2
  117. package/assets/esri/themes/base/widgets/_VideoPlayer.scss +5 -5
  118. package/assets/esri/themes/base/widgets/_Widget.scss +5 -1
  119. package/assets/esri/themes/dark/main.css +1 -1
  120. package/assets/esri/themes/light/main.css +1 -1
  121. package/assets/esri/themes/light/view.css +1 -1
  122. package/chunks/AtmosphereCompositing.glsl.js +1 -1
  123. package/chunks/ChapmanAtmosphere.glsl.js +3 -3
  124. package/chunks/CloudsComposition.glsl.js +1 -1
  125. package/chunks/Component.glsl.js +41 -41
  126. package/chunks/DefaultMaterial.glsl.js +2 -2
  127. package/chunks/EdgeShader.glsl.js +9 -9
  128. package/chunks/Fog.glsl.js +5 -5
  129. package/chunks/GaussianSplat.glsl.js +2 -2
  130. package/chunks/GlobalIllumination.glsl.js +9 -9
  131. package/chunks/HUDMaterial.glsl.js +13 -13
  132. package/chunks/Haze.glsl.js +6 -6
  133. package/chunks/HazeCompositing.glsl.js +1 -1
  134. package/chunks/LaserlinePath.glsl.js +6 -6
  135. package/chunks/LineCallout.glsl.js +1 -1
  136. package/chunks/LineMarker.glsl.js +5 -5
  137. package/chunks/NavigationDepth.glsl.js +2 -2
  138. package/chunks/Path.glsl.js +1 -1
  139. package/chunks/Pattern.glsl.js +26 -26
  140. package/chunks/Precipitation.glsl.js +7 -7
  141. package/chunks/RealisticTree.glsl.js +2 -2
  142. package/chunks/RibbonLine.glsl.js +60 -60
  143. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  144. package/chunks/ShadowHighlight.glsl.js +5 -5
  145. package/chunks/ShadowHighlightBuffer.glsl.js +1 -1
  146. package/chunks/SimpleAtmosphere.glsl.js +4 -4
  147. package/chunks/Terrain.glsl.js +29 -32
  148. package/chunks/Viewshed.glsl.js +2 -2
  149. package/chunks/Water.glsl.js +2 -2
  150. package/config.js +1 -1
  151. package/core/Loadable.js +1 -1
  152. package/geometry/HeightModelInfo.js +1 -1
  153. package/geometry/support/meshUtils.d.ts +1 -1
  154. package/kernel.js +1 -1
  155. package/layers/BaseDynamicLayer.d.ts +1 -0
  156. package/layers/BaseElevationLayer.d.ts +2 -0
  157. package/layers/BaseTileLayer.d.ts +12 -9
  158. package/layers/CSVLayer.d.ts +0 -15
  159. package/layers/FeatureLayer.d.ts +2 -15
  160. package/layers/GeoJSONLayer.d.ts +0 -52
  161. package/layers/GeoRSSLayer.d.ts +0 -44
  162. package/layers/ParquetLayer.d.ts +92 -12
  163. package/layers/ParquetLayer.js +1 -1
  164. package/layers/SketchLayer.d.ts +0 -1
  165. package/layers/VectorTileLayer.d.ts +2 -12
  166. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  167. package/layers/mixins/PortalLayer.js +1 -1
  168. package/layers/mixins/RefreshableLayer.d.ts +1 -3
  169. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  170. package/layers/raster/datasets/TIFFRaster.js +1 -1
  171. package/layers/raster/formats/tiffParser.js +1 -1
  172. package/layers/support/ParquetPortalItemData.d.ts +2 -0
  173. package/layers/support/ParquetPortalItemData.js +1 -1
  174. package/layers/support/PortalItemData.d.ts +21 -0
  175. package/layers/support/PortalItemData.js +1 -1
  176. package/layers/support/layersLoader.js +1 -1
  177. package/layers/support/parquetUtils.d.ts +1 -1
  178. package/layers/support/types.d.ts +1 -1
  179. package/package.json +2 -2
  180. package/popup/FeaturesModel.d.ts +1 -1
  181. package/popup/FeaturesModel.js +1 -1
  182. package/portal/support/layersLoader.js +1 -1
  183. package/portal/support/portalLayers.js +1 -1
  184. package/rest/print.js +1 -1
  185. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  186. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  187. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  188. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  189. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  190. package/views/3d/layers/graphics/Graphics3DBufferGraphicLayer.js +2 -0
  191. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  192. package/views/3d/layers/graphics/Graphics3DDrapedBufferGraphicLayer.js +2 -0
  193. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  194. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayerBase.js +2 -0
  195. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  196. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  197. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  198. package/views/3d/layers/graphics/Graphics3DStageObjectGraphicLayer.js +2 -0
  199. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  200. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  201. package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
  202. package/views/3d/layers/graphics/pointUtils.js +1 -1
  203. package/views/3d/terrain/OverlayManager.js +1 -1
  204. package/views/3d/terrain/OverlayRenderer.js +1 -1
  205. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  206. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +5 -5
  207. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +13 -13
  208. package/views/3d/webgl-engine/core/shaderLibrary/bindUniforms.js +2 -0
  209. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +2 -2
  210. package/views/3d/webgl-engine/core/shaderLibrary/lastFrameUniforms.js +2 -0
  211. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +7 -7
  212. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +29 -27
  213. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +4 -4
  214. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
  215. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +14 -14
  216. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +1 -1
  217. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +5 -5
  218. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +8 -8
  219. package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +1 -1
  220. package/views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js +2 -0
  221. package/views/3d/webgl-engine/core/shaderLibrary/shading/pbrGlobals.glsl.js +1 -1
  222. package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +6 -6
  223. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  224. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +3 -3
  225. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  226. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  227. package/views/3d/webgl-engine/effects/atmosphere/ChapmanApproximation.glsl.js +3 -3
  228. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
  229. package/views/3d/webgl-engine/effects/atmosphere/ChapmanRaymarching.glsl.js +1 -1
  230. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
  231. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +1 -1
  232. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  233. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  234. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +5 -5
  235. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  236. package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
  237. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.glsl.js +1 -1
  238. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.glsl.js +1 -1
  239. package/views/3d/webgl-engine/effects/laserlines/LaserlinePath.glsl.js +1 -1
  240. package/views/3d/webgl-engine/effects/raymarching/DistanceFalloff.glsl.js +1 -1
  241. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +1 -1
  242. package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
  243. package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
  244. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  245. package/views/3d/webgl-engine/lib/affectsGeometry.js +1 -1
  246. package/views/3d/webgl-engine/lib/bufferGeometryUtils.js +2 -0
  247. package/views/3d/webgl-engine/lib/edgeRendering/AdjustProjectedPosition.glsl.js +5 -5
  248. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  249. package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +11 -11
  250. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  251. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  252. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  253. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  254. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  255. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  256. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  257. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  258. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  259. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  260. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  261. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  262. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  263. package/views/3d/webgl-engine/shaders/lineUniforms.js +2 -0
  264. package/views/DOMContainer.d.ts +27 -9
  265. package/views/DOMContainer.js +1 -1
  266. package/views/PopupView.d.ts +6 -0
  267. package/views/VideoView.d.ts +27 -9
  268. package/views/View.d.ts +16 -7
  269. package/views/View.js +1 -1
  270. package/views/View2D.d.ts +1 -1
  271. package/views/interactive/snapping/SnappingManagerPool.js +1 -1
  272. package/views/interactive/snapping/SnappingOptions.d.ts +1 -1
  273. package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
  274. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  275. package/views/layers/FeatureLikeLayerView.d.ts +1 -2
  276. package/views/layers/ParquetLayerView.d.ts +15 -0
  277. package/views/layers/ParquetLayerView.js +1 -1
  278. package/webdoc/support/saveUtils.js +1 -1
  279. package/webdoc/support/unsupportedErrors.js +1 -1
  280. package/widgets/Legend.d.ts +1 -0
  281. package/widgets/support/SnappingControls.d.ts +1 -1
  282. package/assets/esri/core/workers/chunks/05963f57cbe5a5249496.js +0 -1
  283. package/assets/esri/core/workers/chunks/06ab24a083c3229228dd.js +0 -1
  284. package/assets/esri/core/workers/chunks/122111703528381539cc.js +0 -1
  285. package/assets/esri/core/workers/chunks/15cc2c295682f48030f9.js +0 -1
  286. package/assets/esri/core/workers/chunks/17b76e0d401c7e396d10.js +0 -1
  287. package/assets/esri/core/workers/chunks/2164fcaced72b0fda31f.js +0 -1
  288. package/assets/esri/core/workers/chunks/25b0885d3bc190b28c04.js +0 -1
  289. package/assets/esri/core/workers/chunks/27da9ece2afaeec39f59.js +0 -1
  290. package/assets/esri/core/workers/chunks/2b6c74646ff475a6e302.js +0 -1
  291. package/assets/esri/core/workers/chunks/340621182db9e8edbec2.js +0 -1
  292. package/assets/esri/core/workers/chunks/347bf269c2b1583d2dca.js +0 -1
  293. package/assets/esri/core/workers/chunks/384ae10053d35940de73.js +0 -1
  294. package/assets/esri/core/workers/chunks/451d7d456df0f4466563.js +0 -1
  295. package/assets/esri/core/workers/chunks/4cddd217383b9333f32e.js +0 -1
  296. package/assets/esri/core/workers/chunks/4fa59f8ed3b7b6239548.js +0 -1
  297. package/assets/esri/core/workers/chunks/5a5d80c2519aa3ea8878.js +0 -1
  298. package/assets/esri/core/workers/chunks/5b434e8c98e7119d4a3b.js +0 -1
  299. package/assets/esri/core/workers/chunks/5e4d6c283c2fa28db022.js +0 -1
  300. package/assets/esri/core/workers/chunks/5ea8809b6519c05ad9f6.js +0 -1
  301. package/assets/esri/core/workers/chunks/604344e45c0f27497188.js +0 -1
  302. package/assets/esri/core/workers/chunks/64770e2cf41211b63fd2.js +0 -1
  303. package/assets/esri/core/workers/chunks/658b2642ab6880770e4e.js +0 -1
  304. package/assets/esri/core/workers/chunks/6ef647b7769d27529f9c.js +0 -1
  305. package/assets/esri/core/workers/chunks/8313c626596a76c7449d.js +0 -1
  306. package/assets/esri/core/workers/chunks/841f67baf6a1634ada48.js +0 -1
  307. package/assets/esri/core/workers/chunks/84e9258a57d8c365f361.js +0 -1
  308. package/assets/esri/core/workers/chunks/8730e7e6e0296f43f10b.js +0 -1
  309. package/assets/esri/core/workers/chunks/87b4e916b2668203a6b0.js +0 -1
  310. package/assets/esri/core/workers/chunks/8fcfd515ee1b18c902e5.js +0 -1
  311. package/assets/esri/core/workers/chunks/9001e9a1e81bce175ddd.js +0 -1
  312. package/assets/esri/core/workers/chunks/966d0832a3c1f03668a0.js +0 -1
  313. package/assets/esri/core/workers/chunks/97dbbedea9fe03bd1306.js +0 -1
  314. package/assets/esri/core/workers/chunks/9a28a66807a1e3557018.js +0 -1
  315. package/assets/esri/core/workers/chunks/9bf48a907f91ea004648.js +0 -1
  316. package/assets/esri/core/workers/chunks/9c0fd8baa00ee9733ba4.js +0 -1
  317. package/assets/esri/core/workers/chunks/9c7fa9d324fa0bf64d9c.js +0 -1
  318. package/assets/esri/core/workers/chunks/a20526996d01386ec3b7.js +0 -1
  319. package/assets/esri/core/workers/chunks/a7edf7541569fef77cb3.js +0 -1
  320. package/assets/esri/core/workers/chunks/b1008bdfca995ebf98ed.js +0 -1
  321. package/assets/esri/core/workers/chunks/bfd85e8d54062a590f0e.js +0 -1
  322. package/assets/esri/core/workers/chunks/c8ba0673d1b87216e619.js +0 -1
  323. package/assets/esri/core/workers/chunks/d4926545193414cf2f16.js +0 -1
  324. package/assets/esri/core/workers/chunks/da18d96b35af20e73b3b.js +0 -1
  325. package/assets/esri/core/workers/chunks/df0481bcc1613ee4b7af.js +0 -1
  326. package/assets/esri/core/workers/chunks/e1af43e2a8f2ef1059e3.js +0 -1
  327. package/assets/esri/core/workers/chunks/eaf6d587477399a83088.js +0 -1
  328. package/assets/esri/core/workers/chunks/ec28e18275d36e71b438.js +0 -1
  329. package/assets/esri/core/workers/chunks/f05de08e194a3f9b96f2.js +0 -1
  330. package/assets/esri/core/workers/chunks/f31b424a3667686af10c.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,1780],{67482(e,t,r){function i(e){return null!==n(e)}function n(e){return function(e){let t=o.exec(e);if(!t?.groups)return null;let r=t.groups,i=+r.year,n=r.month-1,s=+r.day,l=+(r.hours??"0"),a=+(r.minutes??"0"),u=+(r.seconds??"0");if(l>23||a>59||u>59)return null;let p,d=r.ms??"0",c=d?+d.padEnd(3,"0").slice(0,3):0;if(r.isUTC||!r.offsetSign)p=Date.UTC(i,n,s,l,a,u,c);else{let e=+r.offsetHours,t=+r.offsetMinutes;p=6e4*("+"===r.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,s,l,a,u,c)}return Number.isNaN(p)?null:p}(e)??function(e){let t=new Date(e),r=t.getTime();return Number.isNaN(r)?null:e.toLowerCase()===t.toUTCString().toLowerCase()?r:null}(e)??function(e){if(!s.test(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset()}(e)}r.d(t,{C:()=>i,_:()=>n});const o=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,s=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},18370(e,t,r){r.d(t,{z:()=>n});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function n(e){return new i(e)}},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>o,lM:()=>n});var i=r(34275);function n(e){if(!e)return 0;let t=u;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return a(e,8);let r=p;for(let i=0;i<t;i++)r+=s(e[i]);return r}(e);let t=u;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?o(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?a(t,16):0:0),0)}function a(e,t){return p+e.length*t}const u=32,p=16,d=145},13069(e,t,r){r.d(t,{AG:()=>l,lk:()=>n,vD:()=>s,yS:()=>o});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}function l(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},65977(e,t,r){r.r(t),r.d(t,{default:()=>V});var i=r(32198),n=r(37838),o=r(49186),s=r(25728),l=r(91429),a=r(5443),u=r(16930),p=r(50498),d=r(41910),c=r(55156),f=r(60950),y=r(89808),h=r(99959);const g=Symbol("isOGCFeatureGraphicOrigin");var m;class v extends h.A{get[(m=g,f.ym)](){return this.layer}get[c.e](){return this.layer}get[y.Q](){return this.layer}get[d.e7](){return this.layer}constructor(e){super(),this[m]=!0,this.type="ogc-feature",this.layer=e}get id(){return this.layer.id}}var w=r(4146),C=r(92474),b=r(799),M=r(75321),I=r(4071),T=r(22671);let A=class extends C.x_{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){let{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:n,customParameters:o,effectiveMaxRecordCount:s}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:s,queryParameters:{apiKey:n,customParameters:o},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then(e=>T.A.fromJSON(e))}queryFeaturesJSON(e,t={}){let r=this.getSource();return this.load(t).then(()=>(0,M.bW)(r,e,t))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){let{isWebMercator:t,isWGS84:r,latestWkid:i,wkid:n}=e,{supportedCrs:o}=this.featureDefinition;return r||t||!!n&&!!o[n]||!!i&&!!o[i]}_conformsToType(e,t){let r=RegExp(`^${(0,b.Cj)(t)}$`,"i");return e.conformsTo.some(e=>r.test(e))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,supportsStatisticsAggregatedIds:!1,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsOutDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:I.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){let t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){let t=e.storageCrs??M.QE,r=(0,M.J0)(t);return null==r?u.A.WGS84:new u.A({wkid:r})}_getSupportedSpatialReferences(e,t){let r="#/crs",i=e.crs??[M.QE],n=i.includes(r)?i.filter(e=>e!==r).concat(t.crs??[]):i,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter(e=>!o.test(e))}async _loadOGCServices(e,t){let r=null==t?null:t.signal,{apiKey:i,collectionId:n,customParameters:s,fields:l,geometryType:a,hasZ:u,objectIdField:d,timeInfo:c,url:f}=e,y={fields:l?.map(e=>e.toJSON()),geometryType:p.Ye.toJSON(a),hasZ:u,objectIdField:d,timeInfo:c?.toJSON()},h={apiKey:i,customParameters:s,signal:r},g=await(0,M.Ki)(f,h),[m,v]=await Promise.all([(0,M.Px)(g,h),(0,M.CJ)(g,h)]);if(!this._conformsToType(m,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new o.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");let w=v.collections.find(({id:e})=>e===n);if(!w)throw new o.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");let C=this._conformsToType(m,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,M.GA)(g,h):null,I=await(0,M.GL)(w,y,h),T=this._getMaxRecordCount(C),A=this._getCapabilities(I.hasZ,T),F=this._getStorageSpatialReference(w).toJSON(),P=this._getSupportedSpatialReferences(w,v),x=RegExp(`^${(0,b.Cj)(M.vJ)}`,"i"),S={};for(let e of P){let t=(0,M.J0)(e);null!=t&&(S[t]||(S[t]=e.replace(x,"")))}this.featureDefinition={capabilities:A,collection:w,layerDefinition:I,spatialReference:F,supportedCrs:S}}};(0,i.Cg)([(0,l.MZ)()],A.prototype,"featureDefinition",void 0),(0,i.Cg)([(0,l.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,i.Cg)([(0,l.MZ)()],A.prototype,"type",void 0),A=(0,i.Cg)([(0,l.$K)("esri.layers.graphics.sources.OGCFeatureSource")],A);var F=r(52136),P=r(63074),x=r(69208),S=r(6455),O=r(87718),Z=r(56658),R=r(34287),j=r(32756),G=r(8303),D=r(54310),E=r(25036),k=r(82935),N=r(63396),U=r(10873),q=r(33143),$=r(20437),L=r(17036),B=r(30524),_=r(46499),Q=r(39383),z=r(41214),J=r(97552),W=r(30291);const K=(0,L.p)();let H=class extends((0,S.FJ)((0,F.p)((0,x.d)((0,Z.J)((0,O.F)((0,P.dM)((0,j.fY)((0,k.e)((0,N.d)((0,E.j)((0,R.q)((0,G.A)((0,D.J)((0,s.M)(w.A))))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new v(this),this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new A({layer:this}),this.spatialReference=null,this.timeInfo=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then(()=>this._fetchService(e))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,B.yp)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,W.tn)(this,e)}createQuery(){return new J.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1,n=t?.feature?.attributes,o=this.typeIdField&&n?.[this.typeIdField];return null!=o&&this.types&&(i=this.types.some(t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0))),!i&&!r&&(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(J.A.from(e)||this.createQuery(),t)).then(e=>(e?.features?.forEach(e=>{e.layer=e.sourceLayer=this,e.origin=this.graphicOrigin}),e))}async queryAttributeBins(e,t){throw new o.A("OGCFeatureLayer","Layer source does not support queryAttributeBins capability")}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,B.yp)(this.renderer,this.fieldsIndex),(0,B.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(let t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],H.prototype,"capabilities",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],H.prototype,"collectionId",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],H.prototype,"copyright",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],H.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],H.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],H.prototype,"displayField",void 0),(0,i.Cg)([(0,l.MZ)({type:Number})],H.prototype,"effectiveMaxRecordCount",null),(0,i.Cg)([(0,l.MZ)(U.Yj)],H.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,l.MZ)({type:[$.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],H.prototype,"fields",void 0),(0,i.Cg)([(0,l.MZ)(K.fieldsIndex)],H.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:a.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],H.prototype,"fullExtent",void 0),(0,i.Cg)([(0,l.MZ)({type:p.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:p.gy.read}}}}})],H.prototype,"geometryType",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,clonable:!1})],H.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],H.prototype,"hasZ",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,readOnly:!0})],H.prototype,"isTable",null),(0,i.Cg)([(0,l.MZ)({type:[_.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:Q.w},write:!0}}}})],H.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,l.MZ)(U.kF)],H.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,l.MZ)(U.fV)],H.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,l.MZ)({type:Number})],H.prototype,"maxRecordCount",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],H.prototype,"objectIdField",void 0),(0,i.Cg)([(0,l.MZ)({type:["OGCFeatureLayer"]})],H.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,l.MZ)(U.M6)],H.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,l.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],H.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,l.MZ)({types:z.Hg,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:z.XJ,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],H.prototype,"renderer",null),(0,i.Cg)([(0,l.MZ)(U.PY)],H.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],H.prototype,"source",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:u.A,json:{origins:{service:{read:!0}}}})],H.prototype,"spatialReference",void 0),(0,i.Cg)([(0,l.MZ)((0,U.U$)({name:"layerDefinition.timeInfo"}))],H.prototype,"timeInfo",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],H.prototype,"title",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],H.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0})],H.prototype,"typeIdField",void 0),(0,i.Cg)([(0,l.MZ)({type:[q.A]})],H.prototype,"types",void 0),(0,i.Cg)([(0,l.MZ)(U.OZ)],H.prototype,"url",void 0),H=(0,i.Cg)([(0,l.$K)("esri.layers.OGCFeatureLayer")],H);const V=H},43334(e,t,r){r.d(t,{N3:()=>l,Om:()=>s});var i=r(69397),n=r(27647),o=r(92722);class s{constructor(e,t,r,i,n=0,o=null,s=null){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=n,this.distance=o,this.vertexCount=s}static fromJSON(e){let t=e.geometry?o.A.fromJSON(e.geometry):null,r=e.centroid?o.A.fromJSON(e.centroid):null,i=e.objectId;return new s(t,e.attributes,r,i,void 0,e.distance,e.vertexCount)}weakClone(){return new s(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new s(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(e){return this.centroid??=(0,n.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,i.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(e){return!!e.geometry?.coords?.length}},58512(e,t,r){r.d(t,{A:()=>i});class i{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let e=new i;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722(e,t,r){r.d(t,{A:()=>n});var i=r(69397);class n{constructor(e=[],t=[],r=!1,i=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=i}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:i}){return new n(e,t,r||!1,i||!1)}static fromRect([e,t,r,i]){let o=r-e,s=i-t;return new n([5],[e,t,o,0,0,s,-o,0,0,-s])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,i.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:i}=this,n=this.coords[i*t],o=this.coords[i*t+1];for(let s=1;s<r;s+=1){let r=i*(t+s),l=this.coords[r],a=this.coords[r+1];e+=-.5*(l-n)*(a+o),n=l,o=a}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let i of this.lengths){for(let n=0;n<i;n++){let i=r*(t+n);e(this.coords[i],this.coords[i+1])}t+=i}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,i=0,{stride:n}=this;for(let e of r){for(let r=1;r<e;r++){let e=n*(i+r);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}i+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:i}=this,o=this.coords.slice(0,i*r);return e?(e.set(o),new n(t,e,this.hasZ,this.hasM)):new n(t,Array.from(o),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,i=0;t<r.length;t+=e)r[i++]=this.coords[t],r[i++]=this.coords[t+1];return new n(this.lengths,r,!1,!1)}}},27647(e,t,r){r.d(t,{Q:()=>o});var i=r(92722);function n(e,t){return e?t?4:3:t?3:2}function o(e){if(null==e||!e?.lengths.length)return null;let{lengths:t,coords:r,stride:n,hasZ:o,hasM:a}=e,u=new i.A([],[],o,!1),p=u.coords,d=[],c=o?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],f=0;for(let e of t){let t=s(c,r,f,e,o,a);t&&d.push(t),f+=e*n}if(d.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&o&&(r=e[4]-t[4]),r}),d.length){let e=6*d[0][2];p[0]=d[0][0]/e,p[1]=d[0][1]/e,o&&(e=6*d[0][4],p[2]=0===e?0:d[0][3]/e),(p[0]<c[0]||p[0]>c[1]||p[1]<c[2]||p[1]>c[3]||o&&(p[2]<c[4]||p[2]>c[5]))&&(p.length=0)}if(!p.length){let i=e.lengths[0]?l(r,0,t[0],o,a):null;if(!i)return null;p[0]=i[0],p[1]=i[1],o&&(p[2]=i[2]??0)}return u}function s(e,t,r,i,o,s){let l=n(o,s),a=r,u=r+l,p=0,d=0,c=0,f=0,y=0;for(let r=0,n=i-1;r<n;r++,a+=l,u+=l){let r=t[a],i=t[a+1],n=t[a+2],s=t[u],l=t[u+1],h=t[u+2],g=r*l-s*i;f+=g,p+=(r+s)*g,d+=(i+l)*g,o&&(g=r*h-s*n,c+=(n+h)*g,y+=g),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),o&&(n<e[4]&&(e[4]=n),n>e[5]&&(e[5]=n))}if(f>0&&(f*=-1),y>0&&(y*=-1),!f)return null;let h=[p,d,.5*f];return o&&(h[3]=c,h[4]=.5*y),h}function l(e,t,r,i,o){let s=n(i,o),l=t,c=t+s,f=0,y=0,h=0,g=0;for(let t=0,n=r-1;t<n;t++,l+=s,c+=s){let t=e[l],r=e[l+1],n=e[l+2],o=e[c],s=e[c+1],m=e[c+2],v=i?u(t,r,n,o,s,m):a(t,r,o,s);if(v)if(f+=v,i){let e=d(t,r,n,o,s,m);y+=v*e[0],h+=v*e[1],g+=v*e[2]}else{let e=p(t,r,o,s);y+=v*e[0],h+=v*e[1]}}return f>0?i?[y/f,h/f,g/f]:[y/f,h/f]:r>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function a(e,t,r,i){let n=r-e,o=i-t;return Math.sqrt(n*n+o*o)}function u(e,t,r,i,n,o){let s=i-e,l=n-t,a=o-r;return Math.sqrt(s*s+l*l+a*a)}function p(e,t,r,i){return[e+.5*(r-e),t+.5*(i-t)]}function d(e,t,r,i,n,o){return[e+.5*(i-e),t+.5*(n-t),r+.5*(o-r)]}},99352(e,t,r){r.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},90708(e,t,r){r.d(t,{Ap:()=>P,B2:()=>g,DF:()=>M,Di:()=>j,E2:()=>R,IE:()=>h,Nl:()=>$,PR:()=>A,Rk:()=>W,Ux:()=>D,Ye:()=>S,ZF:()=>N,aQ:()=>z,jH:()=>q,jQ:()=>Q,kz:()=>L,oN:()=>G,q3:()=>U,qN:()=>I,zv:()=>E});var i=r(49186),n=r(53966),o=r(97768),s=r(70328),l=r(19419),a=r(60408),u=r(43334),p=r(58512),d=r(92722),c=r(54339);const f=()=>n.A.getLogger("esri.layers.graphics.featureConversionUtils"),y={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function h({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function g({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function m({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function v({scale:e,translate:t},r){return Math.round((r-t[1])/e[1])}function w({scale:e,translate:t},r,i){return r*e[i]+t[i]}function C(e,t,r){return t&&(e.hasZ=!0),r&&(e.hasM=!0),e}function b(e,t,r,i){if(t&&i&&e!==r)return(t,r,i,n)=>{i[n++]=t[r++],i[n++]=t[r++],e?r++:i[n++]=0,i[n++]=t[r++]??0};let n=+!!r+2+ +!!i,o=n-((!e&&r?1:0)+(!t&&i?1:0));return(e,t,r,i)=>{for(let s=0;s<n;++s)r[i++]=s<o?e[t++]??0:0}}function M(e,t,r){if(!e)return null;let{coords:i,hasZ:n,hasM:o}=e,[s,l]=i,a=n?i[2]:0,u=o?i[+!!n+2]:0;return{x:s,y:l,z:t?a:void 0,m:r?u:void 0}}function I(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{x:i,y:n,z:o,m:s}=e,l=[i,n];return t&&l.push(o??0),r&&l.push(s??0),new d.A([],l,t,r)}function T(e,t,r){if(null==e)return null;let{coords:i,stride:n,hasZ:o,hasM:s}=e,l=b(o,s,t,r),a=[];for(let e=0;e<i.length;e+=n){let t=[];l(i,e,t,0),a.push(t)}return C({points:a},t,r)}function A(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{points:i,hasZ:n,hasM:o}=e,s=new d.A([i.length],[],t,r),{coords:l,stride:u}=s,p=0,c=b(n??!1,o??!1,t,r);for(let e of i)c(e,0,l,p),p+=u;return s}function F(e,t,r){if(!e)return null;let{coords:i,lengths:n,stride:o,hasZ:s,hasM:l}=e,a=0,u=b(s,l,t,r),p=[];for(let e of n){let t=[];for(let r=0;r<e;r++){let e=[];u(i,a,e,0),a+=o,t.push(e)}p.push(t)}return C({paths:p},t,r)}function P(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{paths:i,hasZ:n,hasM:o}=e,s=b(n??!1,o??!1,t,r),l=new d.A([],[],t,r),{lengths:u,coords:p,stride:c}=l,f=0;for(let e of i){for(let t of e)s(t,0,p,f),f+=c;u.push(e.length)}return l}function x(e,t,r){if(!e)return null;let{coords:i,lengths:n,stride:o,hasZ:s,hasM:l}=e,a=0,u=b(s,l,t,r),p=[];for(let e of n){let t=[];for(let r=0;r<e;r++){let e=[];u(i,a,e,0),a+=o,t.push(e)}p.push(t)}return C({rings:p},t,r)}function S(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{rings:i,hasZ:n,hasM:o}=e,s=new d.A([],[],t,r),{lengths:l,coords:u,stride:p}=s,c=0,f=b(n??!1,o??!1,t,r);for(let e of i){for(let t of e)f(t,0,u,c),c+=p;l.push(e.length)}return s}const O=[],Z=[];function R(e,t,r,i,n){O[0]=e;let[o]=j(Z,O,t,r,i,n);return K(O),K(Z),o}function j(e,t,r,n,o,s){if(K(e),!r){for(let r of t){let t=(0,c.W)(r,s);e.push(new u.Om(null,r.attributes,null,t,void 0,r.distance,r.vertexCount))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,i,n){for(let o of t){let{geometry:t,attributes:s,centroid:l}=o,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?I(t,r&&p,i&&d):null,s,l?I(l,!1,!1):null,(0,c.W)(o,n),o.displayId,o.distance,o.vertexCount))}return e}(e,t,n,o,s);case"esriGeometryMultipoint":return function(e,t,r,i,n){for(let o of t){let{geometry:t,attributes:s}=o,l=(0,a.Pv)(t),p=(0,a.W0)(t);e.push(new u.Om(t?A(t,r&&l,i&&p):null,s,null,(0,c.W)(o,n),o.displayId,o.distance,o.vertexCount))}return e}(e,t,n,o,s);case"esriGeometryPolyline":return function(e,t,r,i,n){for(let o of t){let{geometry:t,attributes:s,centroid:l}=o,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?P(t,r&&p,i&&d):null,s,l?I(l,!1,!1):null,(0,c.W)(o,n),o.displayId,o.distance,o.vertexCount))}return e}(e,t,n,o,s);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,r,i,n){for(let o of t){let{geometry:t,attributes:s,centroid:l}=o,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?S(t,r&&p,i&&d):null,s,l?I(l,!1,!1):null,(0,c.W)(o,n),o.displayId,o.distance,o.vertexCount))}return e}(e,t,n,o,s);default:f().error("convertToFeatureSet:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`)),K(e)}return e}function G(e,t,r,i){Z[0]=e,k(O,Z,t,r,i);let n=O[0];return K(O),K(Z),n}function D(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){return null==e?null:(0,a.fT)(e)?I(e,t,r):(0,a.Bi)(e)?S(e,t,r):(0,a.Rg)(e)?P(e,t,r):(0,a.U9)(e)?A(e,t,r):void f().error("convertFromGeometry:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function E(e,t,r,n){if(null==e)return null;let o="coords"in e?e:e.geometry;if(null==o)return null;switch(t){case"esriGeometryPoint":return M(o,r,n);case"esriGeometryMultipoint":return T(o,r,n);case"esriGeometryPolyline":return F(o,r,n);case"esriGeometryPolygon":return x(o,r,n);default:return f().error("convertToGeometry:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`)),null}}function k(e,t,r,n,o){if(K(e),null==r)return function(e,t){for(let r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,i){for(let{geometry:n,attributes:o}of t)e.push({attributes:o,geometry:M(n,r,i)});return e}(e,t,n,o);case"esriGeometryMultipoint":return function(e,t,r,i){for(let{geometry:n,attributes:o}of t)e.push({geometry:n&&T(n,r,i),attributes:o});return e}(e,t,n,o);case"esriGeometryPolyline":return function(e,t,r,i){for(let{geometry:n,attributes:o}of t)e.push({geometry:n&&F(n,r,i),attributes:o});return e}(e,t,n,o);case"esriGeometryPolygon":return function(e,t,r,i){for(let{geometry:n,attributes:o,centroid:s}of t){let t=x(n,r,i),l=M(s,!1,!1);e.push(s?{geometry:t,attributes:o,centroid:l}:{geometry:t,attributes:o})}return e}(e,t,n,o);default:f().error("convertToFeatureSet:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`))}return e}function N(e){let{spatialReference:t,transform:r,fields:i,hasM:n,hasZ:o,features:s,geometryType:l,exceededTransferLimit:a,queryGeometry:u,queryGeometryType:p}=e,d={features:k([],s,l,o,n),fields:i,geometryType:l,spatialReference:t,queryGeometry:E(u,p,o,n)};return r&&(d.transform=r),a&&(d.exceededTransferLimit=a),n&&(d.hasM=n),o&&(d.hasZ=o),d}function U(e,t){let r=new p.A,{hasM:i,hasZ:n,features:o,spatialReference:s,geometryType:l,exceededTransferLimit:a,transform:u,fields:d,globalIdFieldName:c}=e;return d&&(r.fields=d),r.geometryType=l??null,r.spatialReference=s??null,o&&j(r.features,o,l,n,i,t),a&&(r.exceededTransferLimit=a),i&&(r.hasM=i),n&&(r.hasZ=n),u&&(r.transform=u),c&&(r.globalIdFieldName=c),r}function q(e,t){let{geometryType:r,features:i}=t;if(!e)return t;for(let t=0;t<i.length;t++){let n=i[t],o=n.weakClone();o.geometry=$(n.geometry,r,e),o.centroid=$(n.centroid,"esriGeometryPoint",e),i[t]=o}return t.transform=e,t}function $(e,t,r,i,n,o=!1){if(null==e||!e?.coords.length)return null;let s=y[t],{coords:l,lengths:a,stride:u,hasZ:p,hasM:c}=e;i??=p,n??=c;let f=new d.A([],[],i,n),w=f.stride,C=b(p,c,i,n),M=0,I=[0,0,0,0].slice(w),T=o?m:h,A=o?v:g;function F(){C(l,M,I,0),M+=u,I[0]=T(r,I[0]),I[1]=A(r,I[1])}if(e.isPoint)return F(),f.coords.push(...I),f;let P=0;for(let e of a){if(e<s)continue;let t=1;F(),f.coords.push(...I);let[r,i]=I;for(let n=1;n<e;n++){F();let[e,n]=I;(r!==e||i!==n)&&(o||(I[0]-=r,I[1]-=i),f.coords.push(...I),r=e,i=n,t++)}t>=s?(f.lengths.push(t),P=f.coords.length):K(f.coords,P)}return K(f.coords,P),f.coords.length?f:null}function L(e,t,r,i=e.hasZ,n=e.hasM){if(!e.coords.length)return null;let o=y[t],{coords:s,lengths:l,stride:a,hasZ:u,hasM:p}=e,c=new d.A([],[],i,n),f=c.stride,h=b(u,p,i,n);if(e.isPoint)return h(s,0,c.coords,0),c;let g=0,m=r*r;for(let e of l){if(e<o){g+=e*a;continue}let t=c.coords.length/f,r=g,i=g+(e-1)*a;h(s,r,c.coords,c.coords.length),_(c.coords,s,a,m,h,r,i),h(s,i,c.coords,c.coords.length);let n=c.coords.length/f-t;n>=o?c.lengths.push(n):K(c.coords,t*f),g+=e*a}return c.coords.length?c:null}function B(e,t,r,i){let n=e[t],o=e[t+1],s=e[r],l=e[r+1],a=e[i],u=e[i+1],p=s,d=l,c=a-p,f=u-d;if(0!==c||0!==f){let e=((n-p)*c+(o-d)*f)/(c*c+f*f);e>1?(p=a,d=u):e>0&&(p+=c*e,d+=f*e)}return c=n-p,f=o-d,c*c+f*f}function _(e,t,r,i,n,o,s){let l,a=i,u=0;for(let e=o+r;e<s;e+=r)l=B(t,e,o,s),l>a&&(u=e,a=l);a>i&&(u-o>r&&_(e,t,r,i,n,o,u),n(t,u,e,e.length),s-u>r&&_(e,t,r,i,n,u,s))}function Q(e,t){if(!t?.coords?.length)return null;let r=1/0,i=1/0,n=-1/0,o=-1/0,{coords:a,stride:u}=t;for(let e=0;e<a.length;e+=u){let t=a[e],s=a[e+1];r=Math.min(r,t),n=Math.max(n,t),i=Math.min(i,s),o=Math.max(o,s)}return(0,s.is)(e)?(0,s.BI)(e,r,i,n,o):(0,l.fA)(r,i,n,o,e),e}function z(e,t){let{coords:r,lengths:i,stride:n,hasZ:s,hasM:l}=e;if(!r.length)return void(i.length=0);(0,o.Lw)(t);let{originPosition:a,scale:u,translate:p}=t,d=H;d.originPosition=a;let c=d.scale;c[0]=u[0]??1,c[1]=-(u[1]??1),c[2]=u[2]??1,c[3]=u[3]??1;let f=d.translate;if(f[0]=p[0]??0,f[1]=p[1]??0,f[2]=p[2]??0,f[3]=p[3]??0,l&&!s&&(c[2]=c[3],f[2]=f[3]),!i.length){for(let e=0;e<n;++e)r[e]=w(d,r[e],e);return void(i.length=0)}let y=0;for(let e=0;e<i.length;e++){let t=i[e];i[e]=t;for(let e=0;e<n;++e)r[y+e]=w(d,r[y+e],e);let o=r[y],s=r[y+1];y+=n;for(let e=1;e<t;e++,y+=n){o+=r[y]*c[0],s+=r[y+1]*c[1],r[y]=o,r[y+1]=s;for(let e=2;e<n;++e)r[y+e]=w(d,r[y+e],e)}}}function J(e,t,r,i){let n=0,o=e[i*t],s=e[i*(t+1)];for(let l=1;l<r;l++){let r=o+e[i*(t+l)],a=s+e[i*(t+l)+1],u=(r-o)*(a+s);o=r,s=a,n+=u}return.5*n}function W(e,t){let{coords:r,lengths:i}=e,n=0,o=0;for(let e=0;e<i.length;e++){let s=i[e];o+=J(r,n,s,t),n+=s}return Math.abs(o)}function K(e,t=0){e.length!==t&&(e.length=t)}const H={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},85113(e,t,r){r.d(t,{BM:()=>A,bd:()=>F,sO:()=>T,xD:()=>d});var i=r(67482),n=r(49186),o=r(21325),s=r(90708),l=r(43334),a=r(92722),u=r(30524);const p={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function d(e){return p[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(let t of e.features)t&&(yield t)}}function*f(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(let t of e.coordinates)yield*t;break;case"MultiPolygon":for(let t of e.coordinates)for(let e of t)yield*e}}function y(e){for(let t of e)if(t.length>2)return!0;return!1}function h(e){let t=0;for(let r=0;r<e.length;r++){let i=e[r],n=e[(r+1)%e.length];t+=i[0]*n[1]-n[0]*i[1]}return t<=0}function g(e){let t=e[0],r=e[e.length-1];(t[0]!==r[0]||t[1]!==r[1]||t[2]!==r[2])&&e.push(t)}function m(e,t){let{coordinates:r,type:i}=e,n=t.hasZ??!1;switch(i){case"Point":return new a.A([],[...r],n,!1);case"LineString":return(0,s.Ap)({paths:[r],hasZ:!0},n,!1);case"MultiLineString":return(0,s.Ap)({paths:r,hasZ:!0},n,!1);case"MultiPoint":return(0,s.PR)({points:r,hasZ:!0},n,!1);case"Polygon":case"MultiPolygon":{let e=new a.A([],[],n,!1);for(let t of"Polygon"===i?[r]:r){v(e,t[0],n);for(let r=1;r<t.length;r++)w(e,t[r],n)}return e}}}function v(e,t,r){g(t),function(e){return!h(e)}(t)?b(e,t,r):C(e,t,r)}function w(e,t,r){g(t),function(e){return h(e)}(t)?b(e,t,r):C(e,t,r)}function C(e,t,r){for(let i of t)M(e,i,r);e.lengths.push(t.length)}function b(e,t,r){for(let i=t.length-1;i>=0;i--)M(e,t[i],r);e.lengths.push(t.length)}function M(e,[t,r,i],n){e.coords.push(t,r),n&&e.coords.push(i||0)}function I(e){switch(typeof e){case"string":return(0,i.C)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function T(e,t=4326){if(!e)throw new n.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});let{crs:r}=e;if(!r)return;let i="string"==typeof r?r:"name"===r.type?r.properties.name:"EPSG"===r.type?r.properties.code:null,s=(0,o.oT)({wkid:t})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${t})$`,"i");if(!i||!s.test(i))throw new n.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:r})}function A(e,t={}){let r,i=[],n=new Set,o=new Set,s=!1,l=null,a=!1,{geometryType:p=null}=t;for(let t of c(e)){let{geometry:e,properties:c,id:h}=t;if((!e||(p||=d(e.type),d(e.type)===p))&&(s||=y(f(e)),a||(a=null!=h,a&&(r=typeof h,c&&(l=Object.keys(c).filter(e=>c[e]===h)))),c&&l&&a&&null!=h&&(l.length>1?l=l.filter(e=>c[e]===h):1===l.length&&(l=c[l[0]]===h?l:[])),c))for(let e in c){if(n.has(e))continue;let t=I(c[e]);if("unknown"===t){o.add(e);continue}o.delete(e),n.add(e);let r=(0,u.rS)(e);r&&i.push({name:r,alias:e,type:t})}}let h=(0,u.rS)(1===l?.length&&l[0]||null)??void 0;if(h)for(let e of i)if(e.name===h&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:i,geometryType:p,hasZ:s,objectIdFieldName:h,objectIdFieldType:r,unknownFields:Array.from(o)}}function F(e,t){return Array.from(function*(e,t={}){let{geometryType:r,objectIdField:i}=t;for(let n of e){let{geometry:e,properties:o,id:s}=n;if(e&&d(e.type)!==r)continue;let a,u=o||{};i&&(a=u[i],null!=s&&!a&&(u[i]=a=s)),yield new l.Om(e&&m(e,t),u,null,a)}}(c(e),t))}},64714(e,t,r){r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>c,f:()=>f});var i=r(44208),n=r(4718),o=r(99352),s=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${d(t)} = null;`);for(let t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;let i=Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch{return()=>t?{[t]:null,...e}:{...e}}}function d(e){return a.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832(e,t,r){r.d(t,{$1:()=>v,CR:()=>m,MB:()=>y,Yx:()=>p,bP:()=>c});var i=r(67482),n=r(18370),o=r(60408),s=r(21325),l=r(30524);class a{constructor(e){this.description=e,this.code=null}}class u{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new a(e)}}function p(e){return new u(e)}class d{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function c(e){return new d(e)}const f=new Set;function y(e,t,r,i=!1){f.clear();for(let n in r){let o=e.get(n);if(!o)continue;let s=h(o,r[n]);if(f.add(o.name),o&&(i||o.editable)){let e=(0,l.CJ)(o,s);if(e)return p((0,l.uo)(e,o,s));t[o.name]=s}}for(let t of e.requiredFields??[])if(!f.has(t.name))return p(`missing required field "${t.name}"`);return null}function h(e,t){let r=t;return(0,l.WA)(e)&&"string"==typeof t?r=(0,l.XT)(t):(0,l.yM)(e)&&null!=t&&"string"!=typeof t?r=String(t):(0,l.vE)(e)&&"string"==typeof t&&(r=(0,i._)(t)),(0,l.WX)(r)}const g=(0,n.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(3456)]).then(()=>r(3637)));function m(e,t){if(!(0,o.Bi)(e)&&!(0,o.Rg)(e)||!(0,s.fn)(t))return e;let r=g.module;if(null==r)throw TypeError("simplify operator not loaded");return r.simplifyExecute({...e,spatialReference:t})??e}async function v(e,t){(0,s.fn)(e)&&("esriGeometryPolygon"===t||"esriGeometryPolyline"===t)&&await g.getImportPromise()}r.d(t,["PC",0,{supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}])},52136(e,t,r){var i=r(32198),n=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},69208(e,t,r){var i=r(32198),n=r(91429);r.d(t,["d",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},32756(e,t,r){r.d(t,{Rr:()=>l});var i=r(32198),n=r(93637),o=r(91429),s=r(91880);function l(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let n=new s.A;return n.read(i,r),[n]}const a={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){let o=e.find(e=>!!e.field);o&&(0,n.sM)(r,[o.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,o.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,a])},8303(e,t,r){var i=r(32198),n=r(92602),o=r(70333),s=r(56507),l=r(60999),a=r(49186),u=r(36563),p=r(53966),d=r(97768),c=r(17676),f=r(84952),y=r(91429),h=r(77548),g=r(20655),m=r(80812),v=r(41318),w=r(10407),C=r(26121),b=r(36005),M=r(43937);const I={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,T=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,d.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:n}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,n,s=!o.id?.findCredential(this.url),l=e===r.id;if(l&&r.portal.user)return this._getUserPrivileges(r,s);if(l)i=r.portal.url;else try{i=await(0,h.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,f.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;n=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await r.reload():(r=new m.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;let r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,n=g.A.getDefault();if(n&&n.loaded&&(0,f.S8)(n.restUrl)===(0,f.S8)(i))return n.user;let a=`${i}/community/self`,u=null==e?null:e.signal,p=await(0,l.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,C.wN)(this.portalItem,t)?(t?.messages?.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,y.MZ)({type:m.default})],T.prototype,"portalItem",null),(0,i.Cg)([(0,b.w)("web-document","portalItem",["itemId"])],T.prototype,"readPortalItem",null),(0,i.Cg)([(0,M.K)("web-document","portalItem",{itemId:{type:String}})],T.prototype,"writePortalItem",null),(0,i.Cg)([(0,y.MZ)({clonable:!1})],T.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasUpdateItemPrivileges",void 0),T=(0,i.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],T),T}])},82935(e,t,r){var i=r(32198),n=r(91429),o=r(30524),s=r(96184),l=r(73133),a=r(79677),u=r(10184),p=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"}}};r.d(t,["B",0,d,"e",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){let r=t.timeInfo.exportOptions;if(!r)return null;let i=r.timeOffset,n=l.j.fromJSON(r.timeOffsetUnits);return i&&n?new u.A({value:i,unit:n}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,n.MZ)({type:a.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,n.MZ)({type:u.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,p.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,n.MZ)({value:null,type:s.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,n.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},63396(e,t,r){r.d(t,{d:()=>I});var i=r(32198),n=r(91429),o=r(41910),s=r(60950),l=r(99959);class a extends l.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[s.ym](){return this.trackInfoProvider.trackInfo}get[o.e7](){return this.trackInfoProvider}}var u=r(37838),p=r(69540),d=r(25482),c=r(93637),f=r(50820),y=r(10873),h=r(46499),g=r(41214);let m=class extends((0,p.OU)(d.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,i.Cg)([(0,n.MZ)({type:[h.A],json:{write:!0}})],m.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,n.MZ)(y.kF)],m.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,n.MZ)({types:g.Hg,json:{write:!0}})],m.prototype,"renderer",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"visible",void 0),m=(0,i.Cg)([(0,n.$K)("esri.layers.support.TrackPartInfo")],m);var v=r(96576),w=r(59868),C=r(10184),b=r(43937);let M=class extends((0,p.OU)(d.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new m({renderer:new v.A({symbol:w.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new m({renderer:new v.A({symbol:w.UK.clone()})}),this.trackLines=new m({renderer:new v.A({symbol:w.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){let i=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,c.sM)(r,i,t)}};(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],M.prototype,"enabled",void 0),(0,i.Cg)([(0,n.MZ)({type:[f.A],json:{write:!0}})],M.prototype,"fields",void 0),(0,i.Cg)([(0,b.K)("fields")],M.prototype,"writeFields",null),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],M.prototype,"latestObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:C.A,json:{write:!0}})],M.prototype,"maxDisplayDuration",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],M.prototype,"maxDisplayObservationsPerTrack",void 0),(0,i.Cg)([(0,n.MZ)(y.M6)],M.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,n.MZ)({type:u.A,json:{name:"popupInfo",write:!0}})],M.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],M.prototype,"previousObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],M.prototype,"trackLines",void 0),(0,i.Cg)([(0,n.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],M.prototype,"timeField",void 0),M=(0,i.Cg)([(0,n.$K)("esri.layers.support.TrackInfo")],M);const I=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new a(this),this.trackInfo=null}};return(0,i.Cg)([(0,n.MZ)({readOnly:!0,clonable:!1})],r.prototype,"trackGraphicOrigin",void 0),(0,i.Cg)([(0,n.MZ)({type:M})],r.prototype,"trackInfo",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.TrackableLayer")],r),r}},75321(e,t,r){r.d(t,{CJ:()=>I,GA:()=>F,GL:()=>M,I:()=>S,J0:()=>P,Ki:()=>A,Px:()=>T,bW:()=>x});var i=r(56507),n=r(49186),o=r(53966),s=r(84952),l=r(16930),a=r(21325),u=r(28735),p=r(90708),d=r(58512),c=r(85113),f=r(64714),y=r(82832),h=r(95466),g=r(98453);r(98623);const m=()=>o.A.getLogger("esri.layers.ogc.ogcFeatureUtils"),v="startindex",w=new Set([v,"offset"]),C="http://www.opengis.net/def/crs/",b=`${C}OGC/1.3/CRS84`;async function M(e,t,r={},o=5){let{links:l}=e,a=G(l);if(!a)throw new n.A("ogc-feature-layer:missing-items-page","Missing items url");let{apiKey:u,customParameters:p,signal:d}=r,y=(0,s.s2)(a.href,e.landingPage.url),w={limit:o,...p,token:u},C=(0,s.a6)(y,w),{data:b}=await(0,i.A)(C,{signal:d,headers:{accept:"application/geo+json"}}),M=k(C,o,b.links)??v;(0,c.sO)(b);let I=b.numberMatched,T=(0,c.BM)(b,{geometryType:t.geometryType}),A=t.fields||T.fields||[],F=null==t.hasZ?T.hasZ:t.hasZ,P=T.geometryType,x=t.objectIdField||T.objectIdFieldName||"OBJECTID",S=t.timeInfo,O=A.find(({name:e})=>e===x);if(O)O.editable=!1,O.nullable=!1;else{if(!T.objectIdFieldType)throw new n.A("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");A.unshift({name:x,alias:x,type:"number"===T.objectIdFieldType?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if(x!==T.objectIdFieldName){let e=A.find(({name:e})=>e===T.objectIdFieldName);e&&(e.type="esriFieldTypeInteger")}A===T.fields&&T.unknownFields.length>0&&m().warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:T.unknownFields}});for(let e of A){if(e.name??=e.alias,e.alias??=e.name,"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable??=!0,e.nullable??=!0),!e.name)throw new n.A("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!g.m.jsonValues.includes(e.type))throw new n.A("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(S){let e=new h.A(A);if(S.startTimeField){let t=e.get(S.startTimeField);t?(S.startTimeField=t.name,t.type="esriFieldTypeDate"):S.startTimeField=null}if(S.endTimeField){let t=e.get(S.endTimeField);t?(S.endTimeField=t.name,t.type="esriFieldTypeDate"):S.endTimeField=null}if(S.trackIdField){let t=e.get(S.trackIdField);t?S.trackIdField=t.name:(S.trackIdField=null,m().warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:S}}))}S.timeReference||={timeZoneIANA:"UTC"},!S.startTimeField&&!S.endTimeField&&(m().warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:S}}),S=void 0)}return{drawingInfo:P?(0,f.F0)(P):null,extent:j(e),geometryType:P,fields:A,hasZ:!!F,objectIdField:x,paginationParameter:M,timeInfo:S,featureCount:I}}async function I(e,t={}){let{links:r,url:o}=e,l=D(a=r,"data","application/json")??D(a,"http://www.opengis.net/def/rel/ogc/1.0/data","application/json");var a;if(!l)throw new n.A("ogc-feature-layer:missing-collections-page","Missing collections url");let{apiKey:u,customParameters:p,signal:d}=t,c=(0,s.s2)(l.href,o),{data:f}=await(0,i.A)(c,{signal:d,headers:{accept:"application/json"},query:{...p,token:u}});for(let t of f.collections)t.landingPage=e;return f}async function T(e,t={}){let{links:r,url:o}=e,l=D(a=r,"conformance","application/json")??D(a,"http://www.opengis.net/def/rel/ogc/1.0/conformance","application/json");var a;if(!l)throw new n.A("ogc-feature-layer:missing-conformance-page","Missing conformance url");let{apiKey:u,customParameters:p,signal:d}=t,c=(0,s.s2)(l.href,o),{data:f}=await(0,i.A)(c,{signal:d,headers:{accept:"application/json"},query:{...p,token:u}});return f}async function A(e,t={}){let{apiKey:r,customParameters:n,signal:o}=t,{data:s}=await(0,i.A)(e,{signal:o,headers:{accept:"application/json"},query:{...n,token:r}});return s.url=e,s}async function F(e,t={}){let{links:r,url:n}=e,o=D(r,"service-desc","application/vnd.oai.openapi+json;version=3.0");if(!o)return m().warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;let{apiKey:l,customParameters:a,signal:u}=t,p=(0,s.s2)(o.href,n),{data:d}=await(0,i.A)(p,{signal:u,headers:{accept:"application/vnd.oai.openapi+json;version=3.0"},query:{...a,token:l}});return d}function P(e){let t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e)?.groups;if(!t)return null;let{authority:r,code:i}=t;switch(r.toLowerCase()){case"ogc":switch(i.toLowerCase()){case"crs27":return l.A.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return l.A.WGS84.wkid;default:return null}case"esri":case"epsg":{let e=Number.parseInt(i,10);return Number.isNaN(e)?null:e}default:return null}}async function x(e,t,r){let i=await S(e,t,r);return(0,p.ZF)(i)}async function S(e,t,r){let{collection:{links:o,landingPage:{url:f}},layerDefinition:g,maxRecordCount:m,queryParameters:{apiKey:v,customParameters:w},spatialReference:C,supportedCrs:b}=e,M=G(o);if(!M)throw new n.A("ogc-feature-layer:missing-items-page","Missing items url");let{geometry:I,num:T,start:A,timeExtent:F,where:P}=t;if(t.objectIds)throw new n.A("ogc-feature-layer:query-by-objectids-not-supported","Queries with object ids are not supported");let x=l.A.fromJSON(C),S=t.outSpatialReference??x,Z=S.isWGS84?null:O(S,b),j=R(I,b),D=function(e){if(!e)return null;let{start:t,end:r}=e;return`${null==t?"..":t.toISOString()}/${null==r?"..":r.toISOString()}`}(F),k=(H=P)&&"1=1"!==H?H:null,N=T??(null==A?m:10),U=0===A?void 0:A,{fields:q,geometryType:$,hasZ:L,objectIdField:B,paginationParameter:_}=g,Q=(0,s.s2)(M.href,f),{data:z}=await(0,i.A)(Q,{...r,query:{...w,...j,crs:Z,datetime:D,query:k,limit:N,[_]:U,token:v},headers:{accept:"application/geo+json"}}),J=(0,c.bd)(z,{geometryType:$,hasZ:L,objectIdField:B}),W=J.length===N&&!!E(z.links??[]),K=new h.A(q);var H;for(let e of J){let t={};(0,y.MB)(K,t,e.attributes,!0);for(let e of K.fields)e.nullable&&!(e.name in t)&&(t[e.name]=null);t[B]=e.attributes[B],e.attributes=t}if(!Z&&S.isWebMercator)for(let e of J)if(null!=e.geometry&&null!=$){let t=(0,p.zv)(e.geometry,$,L,!1);t.spatialReference=l.A.WGS84,e.geometry=(0,p.Ux)((0,u.Cv)(t,S))}for(let e of J)e.objectId=e.attributes[B];let V=Z||!Z&&S.isWebMercator?S.toJSON():a.KK,Y=new d.A;return Y.exceededTransferLimit=W,Y.features=J,Y.fields=q,Y.geometryType=$,Y.hasZ=L,Y.spatialReference=V,Y}function O(e,t){let{isWebMercator:r,wkid:i,latestWkid:n}=e;if(!i&&!n)return null;let o=r?t[3857]??t[102100]??t[102113]??t[900913]:i&&t[i]||n&&t[n];return o?`${C}${o}`:null}function Z(e){if(!e)return"";let{xmin:t,ymin:r,xmax:i,ymax:n}=e;return`${t},${r},${i},${n}`}function R(e,t){if(!function(e){return null!=e&&"extent"===e.type}(e))return null;let{spatialReference:r}=e;if(!r||r.isWGS84)return{bbox:Z(e)};let i=O(r,t);return null==i?r.isWebMercator?{bbox:Z((0,u.Cv)(e,l.A.WGS84))}:null:{bbox:Z(e),"bbox-crs":i}}function j(e){let t=e.extent?.spatial;if(!t)return null;let r=t.bbox[0],i=4===r.length,[n,o]=r,s=i?void 0:r[2];return{xmin:n,ymin:o,xmax:i?r[2]:r[3],ymax:i?r[3]:r[4],zmin:s,zmax:i?void 0:r[5],spatialReference:l.A.WGS84.toJSON()}}function G(e){return D(e,"items","application/geo+json","http://www.opengis.net/def/profile/ogc/0/rfc7946")??D(e,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json","http://www.opengis.net/def/profile/ogc/0/rfc7946")}function D(e,t,r,i){return i?e.find(({rel:e,type:n,profile:o})=>e===t&&n===r&&o?.includes(i))??e.find(({rel:e,type:i,profile:n})=>e===t&&i===r&&!n):e.find(({rel:e,type:i})=>e===t&&i===r)??e.find(({rel:e,type:r})=>e===t&&!r)}function E(e){return D(e,"next","application/geo+json")}function k(e,t,r){if(!r)return;let i=E(r),n=(0,s.An)(i?.href)?.query;if(!n)return;let o=(0,s.An)(e).query,l=Object.keys(o??{});return Object.entries(n).filter(([e])=>!l.includes(e)).find(([e,r])=>w.has(e.toLowerCase())&&Number.parseInt(r,10)===t)?.[0]}r.d(t,["QE",0,b,"vJ",0,C])},29005(e,t,r){r.d(t,{A:()=>u});var i=r(32198),n=r(69540),o=r(66552),s=r(25482),l=r(91429);const a=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>d});var i=r(32198),n=r(69540),o=r(25482),s=r(91429),l=r(8631),a=r(29005),u=r(36005),p=r(43937);let d=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,s.MZ)({type:[a.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],d)},91880(e,t,r){r.d(t,{A:()=>u});var i,n=r(32198),o=r(66552),s=r(25482),l=r(91429);const a=new o.J({asc:"ascending",desc:"descending"});let u=class extends s.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],u.prototype,"order",void 0),u=i=(0,n.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>o});var i=r(34727),n=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){let o=function(e){if("manual"===u(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(o&&((0,i.gg)(t,o[0])||(0,i.ZH)(r,o[1])))return"";let s=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;let n=p(e.at(0)?.minScale),o=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],n=e[t+1];if((0,i.ZH)(p(n.minScale),d(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===u(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,n){return e=p(e),r=p(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||1/0}function d(e){return e||0}},17036(e,t,r){r.d(t,{p:()=>a});var i=r(44208),n=r(53966),o=r(20437),s=r(95466),l=r(30524);function a(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,l.DB)(this.fieldsIndex,e)}}}}},22671(e,t,r){r.d(t,{A:()=>v});var i,n=r(32198),o=r(52106),s=r(66552),l=r(25482),a=r(4718),u=r(91429),p=r(16930),d=r(60408),c=r(65864),f=r(50498),y=r(20437),h=r(36005),g=r(43937);const m=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);let{features:n}=this;if(n)for(let e of n)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=p.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,n],scale:[o,s]}=r,l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*o+i,e=>n-e*s,l,a);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=p.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){let o=e[t],s=r.fromJSON(o),l=o.geometry?.spatialReference;null!=s.geometry&&!l&&(s.geometry.spatialReference=i);let a=o.aggregateGeometries,u=s.aggregateGeometries;if(a&&null!=u)for(let e in u){let t=u[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}n.push(s)}return n}_quantizePoints(e,t,r){let i,n,o=[];for(let s=0,l=e.length;s<l;s++){let l=e[s];if(s>0){let e=t(l[0]),s=r(l[1]);(e!==i||s!==n)&&(o.push([e-i,s-n]),i=e,n=s)}else i=t(l[0]),n=r(l[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,d.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){let o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,d.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let o,s,l=(0,d.Bi)(e)?e.rings:e.paths;for(let e=0,i=l.length;e<i;e++){let i=l[e];for(let e=0,n=i.length;e<n;e++){let n=i[e];e>0?(o+=n[0],s+=n[1]):(o=n[0],s=n[1]),n[0]=t(o),n[1]=r(s)}}if(i&&n)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{let o,s,l=e.points;for(let e=0,i=l.length;e<i;e++){let i=l[e];e>0?(o+=i[0],s+=i[1]):(o=i[0],s=i[1]),i[0]=t(o),i[1]=r(s)}if(i&&n)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2])}else if(n)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],v.prototype,"features",void 0),(0,n.Cg)([(0,h.w)("features")],v.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,n.Cg)([(0,g.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,h.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,g.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,n.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},26121(e,t,r){r.d(t,{I6:()=>p,ci:()=>u,dL:()=>a,wN:()=>d});var i=r(49186),n=r(84952),o=r(77548),s=r(20655),l=r(59923);async function a(e){let t=[];for(let r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,r){let n=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map(e=>(0,l.GL)("url",`Relative url '${e}' is not supported`)))),r){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(n=n.filter(({name:e})=>!(l.MG.has(e)||t.includes(e)))),i&&(n=n.filter(e=>"web-document-write:property-required"!==e.name))}if(n.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}function p(e){return(0,o.qd)(e).some(e=>!!e.charts?.length)}function d(e,t){let r=t?.portal,i=e?.id&&(e.portal||s.A.getDefault());return!!r&&!!i&&!(0,n.ut)(i.restUrl,r.restUrl)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4708],{69052(e,t,r){r.d(t,{hr:()=>i});var n=r(34727);class i{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return s(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+o(this.range,e-t,r)}minimalMonotonic(e,t,r){return s(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function s(e,t,r,n,i=0,s=!1){return(n-=i)<t?n+=o(e,t-n):n>r&&(n-=o(e,n-r)),s&&n===r&&(n=t),n+i}function o(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new i(0,2*Math.PI),l=(new i(-Math.PI,Math.PI),new i(0,360));r.d(t,["ie",0,l,"uC",0,a])},18370(e,t,r){r.d(t,{z:()=>i});class n{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function i(e){return new n(e)}},52039(e,t,r){r.d(t,{O7:()=>f,el:()=>c});var n=r(69052),i=(r(49186),r(18370)),s=r(17676),o=(r(5443),r(39829)),a=(r(82799),r(16930)),l=(r(80754),r(21325));async function c(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let n=null;for(let t of e)n??=t?.spatialReference;if(!n)return e;let i=(0,l.Vp)(n);if(!i)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(i);return["xmin"in t?t:new o.A(t)]}let[a,c]=i.valid,f=!1;for(let t of e){if(!t)continue;if("point"===t.type){f||=t.x>=c,f||=t.x<=a;continue}let{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=c,f||=e.xmin<=a,f||=e.xmax>=c,f||=e.xmax<=a}if(!f)return e;let[{foldInto360Range:d},g]=await(0,s.qr)(Promise.all([u.getImportPromise(),h.getImportPromise()]),r),m=g.fromSpatialReference(n);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=g.fromGeometry(e),r=g.toGeometry(d(t,m),n);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const u=(0,i.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),h=(0,i.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function f(e,t,r){let n=(0,l.Vp)(r);if(null==n)return e;let[i,s]=n.valid,o=2*s,a=0,c=0;t>s?a=Math.ceil(Math.abs(t-s)/o):t<i&&(a=-Math.ceil(Math.abs(t-i)/o)),e>s?c=Math.ceil(Math.abs(e-s)/o):e<i&&(c=-Math.ceil(Math.abs(e-i)/o));let u=e+(a-c)*o,h=u-t;return h>s?u-=o:h<i&&(u+=o),u}function d(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,i]=t.valid;return new n.hr(r,i)}const g=d(a.A.WGS84);d(a.A.WebMercator),r.d(t,["Y_",0,g])},80754(e,t,r){r.d(t,{kS:()=>c,kd:()=>l});var n=r(82799),i=r(16930),s=r(60408),o=r(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,o.Ed)(e))for(let r of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,o.aO)(e)){let[r,n]=e.c;r[0]+=t,n[0]+=t}else if((0,o.FG)(e)){let[r,n]=e.a;r[0]+=t,n[0]+=t}else if((0,o.n1)(e)){let[r,n,i]=e.b;r[0]+=t,n[0]+=t,i[0]+=t}else e[0]+=t;for(let r of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,a])},31464(e,t,r){r.d(t,{Cv:()=>d,Nk:()=>f,lK:()=>m});var n=r(4576),i=r(99917),s=r(60408),o=r(21325),a=r(28735);const l=[0,0];function c(e,t){let r=(0,o.K8)(e)?a.je:a.tD;if((0,s.fT)(t)){let e={x:0,y:0};return[e.x,e.y]=r(t.x,t.y,l),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,s.ZC)(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=r(t.xmin,t.ymin,l),[e.xmax,e.ymax]=r(t.xmax,t.ymax,l),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if((0,s.Bi)(t))return{rings:u(t.rings,r),hasM:t.hasM,hasZ:t.hasZ};if((0,s.Rg)(t))return{paths:u(t.paths,r),hasM:t.hasM,hasZ:t.hasZ};if((0,s.U9)(t))return{points:h(t.points,r),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function u(e,t){let r=[];for(let n of e)r.push(h(n,t));return r}function h(e,t){let r=[];for(let n of e){let e=t(n[0],n[1],[0,0]);r.push(e),n.length>2&&e.push(n[2]),n.length>3&&e.push(n[3])}return r}async function f(e,t){if(!e||!t)return;let r=Array.isArray(e)?e.map(e=>null==e.geometry?null:e.geometry.spatialReference).filter(n.Ru):[e];await(0,i.initializeProjection)(r.map(e=>({source:e,dest:t})))}function d(e,t,r,n){if(!e)return null;if(r||(r=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(r)||(0,o.aI)(t,r))return e;if((0,a.y7)(t,r)){let t=c(r,e);return t.spatialReference=r,t}let[s]=(0,i.projectMany)([e],t,r,n);return s}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,r,n){if(!e?.length||!t||!r||(0,o.aI)(t,r))return e;let i={geometries:e,inSpatialReference:t,outSpatialReference:r,options:n,resolve:Promise.withResolvers()};return this._jobs.push(i),this._timer??=setTimeout(this._process,10),i.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let t,{geometries:r,inSpatialReference:n,outSpatialReference:s,resolve:o,options:l}=e,u=r.filter(e=>null!=e);t=(0,a.y7)(n,s)&&null==l?.extendedParams?u.map(e=>c(s,e)):(0,i.projectMany)(u,n,s,l);let h=0,f=r.map(e=>null==e?null:t[h++]);o.resolve(f),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(e,t,r,n){return g.push(e,t,r,n)}},60986(e,t,r){r.r(t),r.d(t,{createConnection:()=>C});var n=r(56507),i=r(49186),s=r(31464),o=r(9916),a=r(32198),l=r(65529),c=r(91429);let u=class extends l.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new i.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,a.Cg)([(0,c.MZ)({readOnly:!0})],u.prototype,"connectionError",null),u=(0,a.Cg)([(0,c.$K)("esri.layers.support.StreamConnection")],u);class h extends u{constructor(e,t){super(),this._config=e,this._outSpatialReference=t,this.connectionStatus="connected",this.errorString=null,this._isPolling=!1,this._lastIngestedAt=null,this._pollTimer=null,this._pollRecentData=async()=>{if(!this.destroyed&&!this._isPolling){this._isPolling=!0;try{let e=await this._queryChanges(this._lastIngestedAt);if(this.destroyed)return;this._handleResult(e)}catch(e){this.errorString=e instanceof Error?e.message:"Failed to fetch"}finally{this._isPolling=!1}}},this._initialize()}destroy(){super.destroy(),this._pollTimer&&=(clearInterval(this._pollTimer),null)}sendMessageToSocket(e){throw new i.A("kusto:unsupported","sendMessageToSocket not supported for Kusto connections")}sendMessageToClient(e){throw new i.A("kusto:unsupported","sendMessageToClient not supported for Kusto connections")}updateCustomParameters(e){throw new i.A("kusto:unsupported","updateCustomParameters not supported for Kusto connections")}async _initialize(){await(0,s.Nk)(this._config.sourceSpatialReference,this._outSpatialReference);try{let e=await this._queryInitial();this._handleResult(e),this._pollTimer=setInterval(this._pollRecentData,6e4*this._config.refreshInterval)}catch{throw new i.A("kusto:connection","Failed to query KQL database")}}async _queryInitial(){let{trackIdField:e}=this._config,t=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | summarize arg_max(IngestedAt, *) by ${(0,o.xw)(e)}`));if(!t)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(t),table:t}}async _queryChanges(e=null){let t=e??"1970-01-01T00:00:00Z",r=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | where IngestedAt > todatetime('${(0,o.iD)(t)}') | order by IngestedAt asc`));if(!r)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(r),table:r}}async _executeQuery(e){let t=this._config.database,r=t.properties.queryServiceUri,{data:i}=await(0,n.A)(`${r}/v2/rest/query`,{responseType:"json",method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({db:t.displayName,csl:e})});return i}_handleResult(e){this._lastIngestedAt=e.ingestedAt;let t=this._createFeatures(e.table);if(null!=t){this.onMessage(t);for(let e of t)this.onFeature(e)}}_createFeatures(e){if(null==e||0===e.Rows.length)return null;let{xField:t,yField:r}=this._config.geometryEncoding,n=e.Columns.findIndex(e=>e.ColumnName===t),i=e.Columns.findIndex(e=>e.ColumnName===r);return e.Rows.map(t=>this._createFeature(e.Columns,n,i,t))}_createFeature(e,t,r,n){let{xField:i,yField:o}=this._config.geometryEncoding,a={};for(let t=0;t<e.length;t++){let r=e[t],s=n[t]??null;r.ColumnName!==o&&r.ColumnName!==i&&(a[r.ColumnName]=s)}let l=null,c=n[t],u=n[r];return null!=u&&null!=c&&(l=(0,s.Cv)({x:c,y:u},this._config.sourceSpatialReference,this._outSpatialReference)),{attributes:a,geometry:l}}}function f(e){return e.find(e=>"DataTable"===e.FrameType&&"PrimaryResult"===e.TableKind)??null}function d(e){let t=e.Columns.findIndex(e=>"IngestedAt"===e.ColumnName);if(t<0)return null;let r=null;for(let n of e.Rows){let e=n[t];"string"==typeof e&&(null==r||e>r)&&(r=e)}return r}var g=r(53966),m=r(84952),p=r(16930),y=r(65864),_=r(17676),w=r(62815);function b(e,t){if(null==e&&null==t)return null;let r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}let S=class extends u{constructor(e,t){super({}),this._outSpatialReference=t,this._outstandingMessages=[],this.errorString=null;let{geometryType:r,sourceSpatialReference:n}=e;this._config=e,this._featureZScaler=(0,w.N)(r,n,this._outSpatialReference),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null==this._websocket?this._outstandingMessages.push(e):this._websocket.send(JSON.stringify(e))}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.url.path,t=1e3,r=0){try{if(this.destroyed)return;let t=(0,m.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(n){let s=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(g.A.getLogger(this).error(new i.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(g.A.getLogger(this).error(new i.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${s}s`,n)),await(0,_.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{let t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void g.A.getLogger(this).error(new i.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{let n=new WebSocket(e);n.onopen=()=>{n.onopen=null,this.destroyed?(n.onclose=null,n.close()):(n.onclose=e=>this._onClose(e),n.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(n),t(n))},n.onclose=e=>{n.onopen=n.onclose=null,r(e)}})}async _handshake(e=1e4){let t=this._websocket;if(null==t)return;let r=Promise.withResolvers(),n=t.onmessage,s=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:o}=this._config,a=setTimeout(()=>r.reject(),e),l=()=>{clearTimeout(a),r.reject()};return t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch{}(!c||"object"!=typeof c)&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),l(),this.destroy()),c.spatialReference?.wkid!==this._outSpatialReference?.wkid&&(g.A.getLogger(this).error(new i.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${this._outSpatialReference.wkid}`,e.data)),l(),this.destroy()),"json"!==c.format&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),l(),this.destroy()),s&&c.filter!==s&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set filter, but server doesn't support it")),o&&c.outFields!==o&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=n;for(let e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],clearTimeout(a),r.resolve()},t.send(JSON.stringify({filter:s,outFields:o,format:"json",spatialReference:{wkid:this._outSpatialReference.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){let t="Encountered an error over WebSocket connection";this._set("errorString",t),g.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&g.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,a.Cg)([(0,c.MZ)()],S.prototype,"connectionStatus",null),(0,a.Cg)([(0,c.MZ)()],S.prototype,"errorString",void 0),S=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.WebSocketConnection")],S);var k=r(80893),A=r(97552);const x={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends S{constructor(e,t){super({...x,...e},t),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){let e=await this._fetchServiceDefinition(this._config.url);e.timeInfo.trackIdField||g.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");let t=this._fetchWebSocketUrl(e.streamUrls,this._outSpatialReference);this._buddyServicesQuery||=this._queryBuddyServices(),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);let r=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:n}=this._config;this.destroyed||this._setFilter(r,n)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){let t={f:"json",...this._config.customParameters},r=(await(0,n.A)(e.path,{query:t,responseType:"json"})).data;return this._serviceDefinition=r,r}_fetchWebSocketUrl(e,t){let{urls:r,token:n}=e[0],i=this._inferWebSocketBaseUrl(r);return(0,m.a6)(`${i}/subscribe`,{outSR:""+t.wkid,token:n})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(let t of e)if(t.includes("wss"))return t;return g.A.getLogger(this).error(new i.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){let r=this._websocket;if(null==r||null==e&&null==t)return;let n=JSON.stringify({filter:this._serializeFilter(e,t)}),s=!1,o=Promise.withResolvers();return r.onmessage=e=>{let t=JSON.parse(e.data);t.filter&&(t.error&&(g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),o.reject(t.error)),this._setWebSocketJSONParseHandler(r),s=!0,o.resolve())},r.send(n),setTimeout(()=>{s||(!this.destroyed&&this._websocket===r&&g.A.getLogger(this).error(new i.A("geoevent-connection","Server timed out when setting filter")),o.reject())},1e4),o.promise}_serializeFilter(e,t){let r={};if(null==e&&null==t)return r;if(e?.geometry)try{let t=(0,y.rS)(e.geometry);if("extent"!==t.type)throw new i.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;let t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],n=this._relatedFeatures.get(r);if(!n)return g.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;let{attributes:s,geometry:o}=n;for(let t in s)e.attributes[t]=s[t];return o&&(e.geometry=o),!e.geometry&&!e.centroid&&g.A.getLogger(this).error(new i.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{let{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),n=this._queryArchive(t);await r;let i=await n;if(!i)return;for(let e of i.features)this.onFeature(this._enrich(e))}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;let t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){let t=new((await Promise.all([r.e(6361),r.e(6914),r.e(7865),r.e(5732),r.e(2869),r.e(9953),r.e(3910),r.e(564),r.e(1214),r.e(2889),r.e(6263),r.e(8247),r.e(4674),r.e(7283),r.e(8589),r.e(812),r.e(5879),r.e(9279)]).then(()=>r(18589))).default)({url:e}),{capabilities:n}=await t.load(),i=n.query.supportsMaxRecordCountFactor,s=n.query.supportsPagination,o=n.query.supportsCentroid,a=this._config.maxRecordCountFactor,l=t.capabilities.query.maxRecordCount,c=i?l*a:l,u=new A.A;if(u.outFields=this._config.outFields??["*"],u.where=this._config.definitionExpression??"1=1",u.returnGeometry=!0,u.returnExceededLimitFeatures=!0,u.outSpatialReference=p.A.fromJSON(this._outSpatialReference),o&&(u.returnCentroid=!0),i&&(u.maxRecordCountFactor=a),s)return u.num=c,t.destroy(),this._queryPages(e,u);let h=await(0,k.eW)(e,u,this._config.sourceSpatialReference);return t.destroy(),h}async _queryPages(e,t,r=[],n=0){t.start=null==t.num?null:n*t.num;let i=await(0,k.eW)(e,t,this._config.sourceSpatialReference);return i.exceededTransferLimit&&n<(this._config.maxQueryDepth??0)?(i.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,n+1)):(r.forEach(e=>i.features.push(e)),i)}_addRelatedFeatures(e){let t=new Map,r=e.features,n=this._serviceDefinition.relatedFeatures.joinField;for(let e of r){let r=e.attributes[n];t.set(r,e)}this._relatedFeatures=t}};v=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);var R=r(64108);let M=class extends u{constructor(e,t){super({}),this.connectionStatus="connected",this.errorString=null;let{geometryType:r,sourceSpatialReference:n}=e;this._featureZScaler=(0,w.N)(r,n,t)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function C(e,t){let r=t.toJSON();switch(e.type){case"client":return new M(e,r);case"custom":return new S(e,r);case"geoevent":return new v(e,r);case"kusto":return new h(e,r)}}(0,a.Cg)([(0,c.MZ)()],M.prototype,"connectionStatus",void 0),(0,a.Cg)([(0,c.MZ)()],M.prototype,"errorString",void 0),M=(0,a.Cg)([(0,R.$)("esri.layers.support.ClientSideConnection")],M)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4708],{69052(e,t,r){r.d(t,{hr:()=>i});var n=r(34727);class i{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return s(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+o(this.range,e-t,r)}minimalMonotonic(e,t,r){return s(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function s(e,t,r,n,i=0,s=!1){return(n-=i)<t?n+=o(e,t-n):n>r&&(n-=o(e,n-r)),s&&n===r&&(n=t),n+i}function o(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new i(0,2*Math.PI),l=(new i(-Math.PI,Math.PI),new i(0,360));r.d(t,["ie",0,l,"uC",0,a])},18370(e,t,r){r.d(t,{z:()=>i});class n{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function i(e){return new n(e)}},52039(e,t,r){r.d(t,{O7:()=>f,el:()=>c});var n=r(69052),i=(r(49186),r(18370)),s=r(17676),o=(r(5443),r(39829)),a=(r(82799),r(16930)),l=(r(80754),r(21325));async function c(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let n=null;for(let t of e)n??=t?.spatialReference;if(!n)return e;let i=(0,l.Vp)(n);if(!i)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(i);return["xmin"in t?t:new o.A(t)]}let[a,c]=i.valid,f=!1;for(let t of e){if(!t)continue;if("point"===t.type){f||=t.x>=c,f||=t.x<=a;continue}let{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=c,f||=e.xmin<=a,f||=e.xmax>=c,f||=e.xmax<=a}if(!f)return e;let[{foldInto360Range:d},g]=await(0,s.qr)(Promise.all([u.getImportPromise(),h.getImportPromise()]),r),m=g.fromSpatialReference(n);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=g.fromGeometry(e),r=g.toGeometry(d(t,m),n);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const u=(0,i.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),h=(0,i.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function f(e,t,r){let n=(0,l.Vp)(r);if(null==n)return e;let[i,s]=n.valid,o=2*s,a=0,c=0;t>s?a=Math.ceil(Math.abs(t-s)/o):t<i&&(a=-Math.ceil(Math.abs(t-i)/o)),e>s?c=Math.ceil(Math.abs(e-s)/o):e<i&&(c=-Math.ceil(Math.abs(e-i)/o));let u=e+(a-c)*o,h=u-t;return h>s?u-=o:h<i&&(u+=o),u}function d(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,i]=t.valid;return new n.hr(r,i)}const g=d(a.A.WGS84);d(a.A.WebMercator),r.d(t,["Y_",0,g])},80754(e,t,r){r.d(t,{kS:()=>c,kd:()=>l});var n=r(82799),i=r(16930),s=r(60408),o=r(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,o.Ed)(e))for(let r of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,o.aO)(e)){let[r,n]=e.c;r[0]+=t,n[0]+=t}else if((0,o.FG)(e)){let[r,n]=e.a;r[0]+=t,n[0]+=t}else if((0,o.n1)(e)){let[r,n,i]=e.b;r[0]+=t,n[0]+=t,i[0]+=t}else e[0]+=t;for(let r of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,a])},31464(e,t,r){r.d(t,{Cv:()=>d,Nk:()=>f,lK:()=>m});var n=r(4576),i=r(99917),s=r(60408),o=r(21325),a=r(28735);const l=[0,0];function c(e,t){let r=(0,o.K8)(e)?a.je:a.tD;if((0,s.fT)(t)){let e={x:0,y:0};return[e.x,e.y]=r(t.x,t.y,l),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,s.ZC)(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=r(t.xmin,t.ymin,l),[e.xmax,e.ymax]=r(t.xmax,t.ymax,l),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if((0,s.Bi)(t))return{rings:u(t.rings,r),hasM:t.hasM,hasZ:t.hasZ};if((0,s.Rg)(t))return{paths:u(t.paths,r),hasM:t.hasM,hasZ:t.hasZ};if((0,s.U9)(t))return{points:h(t.points,r),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function u(e,t){let r=[];for(let n of e)r.push(h(n,t));return r}function h(e,t){let r=[];for(let n of e){let e=t(n[0],n[1],[0,0]);r.push(e),n.length>2&&e.push(n[2]),n.length>3&&e.push(n[3])}return r}async function f(e,t){if(!e||!t)return;let r=Array.isArray(e)?e.map(e=>null==e.geometry?null:e.geometry.spatialReference).filter(n.Ru):[e];await(0,i.initializeProjection)(r.map(e=>({source:e,dest:t})))}function d(e,t,r,n){if(!e)return null;if(r||(r=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(r)||(0,o.aI)(t,r))return e;if((0,a.y7)(t,r)){let t=c(r,e);return t.spatialReference=r,t}let[s]=(0,i.projectMany)([e],t,r,n);return s}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,r,n){if(!e?.length||!t||!r||(0,o.aI)(t,r))return e;let i={geometries:e,inSpatialReference:t,outSpatialReference:r,options:n,resolve:Promise.withResolvers()};return this._jobs.push(i),this._timer??=setTimeout(this._process,10),i.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let t,{geometries:r,inSpatialReference:n,outSpatialReference:s,resolve:o,options:l}=e,u=r.filter(e=>null!=e);t=(0,a.y7)(n,s)&&null==l?.extendedParams?u.map(e=>c(s,e)):(0,i.projectMany)(u,n,s,l);let h=0,f=r.map(e=>null==e?null:t[h++]);o.resolve(f),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(e,t,r,n){return g.push(e,t,r,n)}},60986(e,t,r){r.r(t),r.d(t,{createConnection:()=>C});var n=r(56507),i=r(49186),s=r(31464),o=r(9916),a=r(32198),l=r(65529),c=r(91429);let u=class extends l.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new i.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,a.Cg)([(0,c.MZ)({readOnly:!0})],u.prototype,"connectionError",null),u=(0,a.Cg)([(0,c.$K)("esri.layers.support.StreamConnection")],u);class h extends u{constructor(e,t){super(),this._config=e,this._outSpatialReference=t,this.connectionStatus="connected",this.errorString=null,this._isPolling=!1,this._lastIngestedAt=null,this._pollTimer=null,this._pollRecentData=async()=>{if(!this.destroyed&&!this._isPolling){this._isPolling=!0;try{let e=await this._queryChanges(this._lastIngestedAt);if(this.destroyed)return;this._handleResult(e)}catch(e){this.errorString=e instanceof Error?e.message:"Failed to fetch"}finally{this._isPolling=!1}}},this._initialize()}destroy(){super.destroy(),this._pollTimer&&=(clearInterval(this._pollTimer),null)}sendMessageToSocket(e){throw new i.A("kusto:unsupported","sendMessageToSocket not supported for Kusto connections")}sendMessageToClient(e){throw new i.A("kusto:unsupported","sendMessageToClient not supported for Kusto connections")}updateCustomParameters(e){throw new i.A("kusto:unsupported","updateCustomParameters not supported for Kusto connections")}async _initialize(){await(0,s.Nk)(this._config.sourceSpatialReference,this._outSpatialReference);try{let e=await this._queryInitial();this._handleResult(e),this._pollTimer=setInterval(this._pollRecentData,6e4*this._config.refreshInterval)}catch{throw new i.A("kusto:connection","Failed to query KQL database")}}async _queryInitial(){let{trackIdField:e}=this._config,t=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | summarize arg_max(IngestedAt, *) by ${(0,o.xw)(e)}`));if(!t)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(t),table:t}}async _queryChanges(e=null){let t=e??"1970-01-01T00:00:00Z",r=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | where IngestedAt > todatetime('${(0,o.iD)(t)}') | order by IngestedAt asc`));if(!r)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(r),table:r}}async _executeQuery(e){let t=this._config.database,r=t.properties.queryServiceUri,{data:i}=await(0,n.A)(`${r}/v2/rest/query`,{responseType:"json",method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({db:t.displayName,csl:e})});return i}_handleResult(e){this._lastIngestedAt=e.ingestedAt;let t=this._createFeatures(e.table);if(null!=t){this.onMessage(t);for(let e of t)this.onFeature(e)}}_createFeatures(e){if(null==e||0===e.Rows.length)return null;let{xField:t,yField:r}=this._config.geometryEncoding,n=e.Columns.findIndex(e=>e.ColumnName===t),i=e.Columns.findIndex(e=>e.ColumnName===r);return e.Rows.map(t=>this._createFeature(e.Columns,n,i,t))}_createFeature(e,t,r,n){let{xField:i,yField:o}=this._config.geometryEncoding,a={};for(let t=0;t<e.length;t++){let r=e[t],s=n[t]??null;r.ColumnName!==o&&r.ColumnName!==i&&(a[r.ColumnName]=s)}let l=null,c=n[t],u=n[r];return null!=u&&null!=c&&(l=(0,s.Cv)({x:c,y:u},this._config.sourceSpatialReference,this._outSpatialReference)),{attributes:a,geometry:l}}}function f(e){return e.find(e=>"DataTable"===e.FrameType&&"PrimaryResult"===e.TableKind)??null}function d(e){let t=e.Columns.findIndex(e=>"IngestedAt"===e.ColumnName);if(t<0)return null;let r=null;for(let n of e.Rows){let e=n[t];"string"==typeof e&&(null==r||e>r)&&(r=e)}return r}var g=r(53966),m=r(84952),p=r(16930),y=r(65864),_=r(17676),w=r(62815);function b(e,t){if(null==e&&null==t)return null;let r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}let S=class extends u{constructor(e,t){super({}),this._outSpatialReference=t,this._outstandingMessages=[],this.errorString=null;let{geometryType:r,sourceSpatialReference:n}=e;this._config=e,this._featureZScaler=(0,w.N)(r,n,this._outSpatialReference),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null==this._websocket?this._outstandingMessages.push(e):this._websocket.send(JSON.stringify(e))}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.url.path,t=1e3,r=0){try{if(this.destroyed)return;let t=(0,m.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(n){let s=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(g.A.getLogger(this).error(new i.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(g.A.getLogger(this).error(new i.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${s}s`,n)),await(0,_.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{let t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void g.A.getLogger(this).error(new i.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{let n=new WebSocket(e);n.onopen=()=>{n.onopen=null,this.destroyed?(n.onclose=null,n.close()):(n.onclose=e=>this._onClose(e),n.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(n),t(n))},n.onclose=e=>{n.onopen=n.onclose=null,r(e)}})}async _handshake(e=1e4){let t=this._websocket;if(null==t)return;let r=Promise.withResolvers(),n=t.onmessage,s=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:o}=this._config,a=setTimeout(()=>r.reject(),e),l=()=>{clearTimeout(a),r.reject()};return t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch{}(!c||"object"!=typeof c)&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),l(),this.destroy()),c.spatialReference?.wkid!==this._outSpatialReference?.wkid&&(g.A.getLogger(this).error(new i.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${this._outSpatialReference.wkid}`,e.data)),l(),this.destroy()),"json"!==c.format&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),l(),this.destroy()),s&&c.filter!==s&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set filter, but server doesn't support it")),o&&c.outFields!==o&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=n;for(let e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],clearTimeout(a),r.resolve()},t.send(JSON.stringify({filter:s,outFields:o,format:"json",spatialReference:{wkid:this._outSpatialReference.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){let t="Encountered an error over WebSocket connection";this._set("errorString",t),g.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&g.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,a.Cg)([(0,c.MZ)()],S.prototype,"connectionStatus",null),(0,a.Cg)([(0,c.MZ)()],S.prototype,"errorString",void 0),S=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.WebSocketConnection")],S);var k=r(80893),A=r(97552);const x={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends S{constructor(e,t){super({...x,...e},t),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){let e=await this._fetchServiceDefinition(this._config.url);e.timeInfo.trackIdField||g.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");let t=this._fetchWebSocketUrl(e.streamUrls,this._outSpatialReference);this._buddyServicesQuery||=this._queryBuddyServices(),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);let r=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:n}=this._config;this.destroyed||this._setFilter(r,n)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){let t={f:"json",...this._config.customParameters},r=(await(0,n.A)(e.path,{query:t,responseType:"json"})).data;return this._serviceDefinition=r,r}_fetchWebSocketUrl(e,t){let{urls:r,token:n}=e[0],i=this._inferWebSocketBaseUrl(r);return(0,m.a6)(`${i}/subscribe`,{outSR:""+t.wkid,token:n})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(let t of e)if(t.includes("wss"))return t;return g.A.getLogger(this).error(new i.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){let r=this._websocket;if(null==r||null==e&&null==t)return;let n=JSON.stringify({filter:this._serializeFilter(e,t)}),s=!1,o=Promise.withResolvers();return r.onmessage=e=>{let t=JSON.parse(e.data);t.filter&&(t.error&&(g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),o.reject(t.error)),this._setWebSocketJSONParseHandler(r),s=!0,o.resolve())},r.send(n),setTimeout(()=>{s||(!this.destroyed&&this._websocket===r&&g.A.getLogger(this).error(new i.A("geoevent-connection","Server timed out when setting filter")),o.reject())},1e4),o.promise}_serializeFilter(e,t){let r={};if(null==e&&null==t)return r;if(e?.geometry)try{let t=(0,y.rS)(e.geometry);if("extent"!==t.type)throw new i.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;let t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],n=this._relatedFeatures.get(r);if(!n)return g.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;let{attributes:s,geometry:o}=n;for(let t in s)e.attributes[t]=s[t];return o&&(e.geometry=o),!e.geometry&&!e.centroid&&g.A.getLogger(this).error(new i.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{let{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),n=this._queryArchive(t);await r;let i=await n;if(!i)return;for(let e of i.features)this.onFeature(this._enrich(e))}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;let t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){let t=new((await Promise.all([r.e(6361),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5566),r.e(1214),r.e(2889),r.e(6263),r.e(8247),r.e(4674),r.e(7283),r.e(8589),r.e(812),r.e(5879),r.e(9279)]).then(()=>r(18589))).default)({url:e}),{capabilities:n}=await t.load(),i=n.query.supportsMaxRecordCountFactor,s=n.query.supportsPagination,o=n.query.supportsCentroid,a=this._config.maxRecordCountFactor,l=t.capabilities.query.maxRecordCount,c=i?l*a:l,u=new A.A;if(u.outFields=this._config.outFields??["*"],u.where=this._config.definitionExpression??"1=1",u.returnGeometry=!0,u.returnExceededLimitFeatures=!0,u.outSpatialReference=p.A.fromJSON(this._outSpatialReference),o&&(u.returnCentroid=!0),i&&(u.maxRecordCountFactor=a),s)return u.num=c,t.destroy(),this._queryPages(e,u);let h=await(0,k.eW)(e,u,this._config.sourceSpatialReference);return t.destroy(),h}async _queryPages(e,t,r=[],n=0){t.start=null==t.num?null:n*t.num;let i=await(0,k.eW)(e,t,this._config.sourceSpatialReference);return i.exceededTransferLimit&&n<(this._config.maxQueryDepth??0)?(i.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,n+1)):(r.forEach(e=>i.features.push(e)),i)}_addRelatedFeatures(e){let t=new Map,r=e.features,n=this._serviceDefinition.relatedFeatures.joinField;for(let e of r){let r=e.attributes[n];t.set(r,e)}this._relatedFeatures=t}};v=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);var R=r(64108);let M=class extends u{constructor(e,t){super({}),this.connectionStatus="connected",this.errorString=null;let{geometryType:r,sourceSpatialReference:n}=e;this._featureZScaler=(0,w.N)(r,n,t)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function C(e,t){let r=t.toJSON();switch(e.type){case"client":return new M(e,r);case"custom":return new S(e,r);case"geoevent":return new v(e,r);case"kusto":return new h(e,r)}}(0,a.Cg)([(0,c.MZ)()],M.prototype,"connectionStatus",void 0),(0,a.Cg)([(0,c.MZ)()],M.prototype,"errorString",void 0),M=(0,a.Cg)([(0,R.$)("esri.layers.support.ClientSideConnection")],M)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7301],{46130(e,t,r){r.d(t,{v:()=>i});var a=r(76553);function i(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,a.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},76553(e,t,r){function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>a})},87301(e,t,r){r.d(t,{save:()=>u,saveAs:()=>p});var a=r(71530),i=r(10407);const n="Stream Service";function o(e){return{isValid:"stream"===e.type&&!!e.url&&!e.webSocketUrl,errorMessage:"Stream layer should be created using a url to a stream service"}}function l(e){let t=e.layerJSON;return Promise.resolve(t&&Object.keys(t).length?t:null)}async function s(e,t){let{parsedUrl:r,title:a,fullExtent:n}=e;t.url=r.path,t.title||=a,t.extent=null,null!=n&&(t.extent=await(0,i.sQ)(n)),(0,i.OM)(t,i.mm.METADATA),(0,i.LG)(t,i.mm.SINGLE_LAYER)}async function u(e,t){return(0,a.UN)({layer:e,itemType:n,additionalItemType:"Feed",validateLayer:o,createItemData:l,errorNamePrefix:"stream-layer-save"},t)}async function p(e,t,r){return(0,a.Uh)({layer:e,itemType:n,validateLayer:o,createItemData:l,errorNamePrefix:"stream-layer-save-as",newItem:t,setItemProperties:s},r)}},71530(e,t,r){r.d(t,{UN:()=>h,Uh:()=>g});var a=r(49186),i=r(46130),n=r(20655),o=r(80812),l=r(88788),s=r(10407),u=r(26121);async function p(e){let{layer:t,errorNamePrefix:r,validateLayer:i}=e;await t.load(),function(e,t,r){let i=r(e);if(!i.isValid)throw new a.A(`${t}:invalid-parameters`,i.errorMessage,{layer:e})}(t,r,i)}function m(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function d(e){let{item:t,errorNamePrefix:r,layer:i,validateItem:n}=e;if(function(e){let{item:t,itemType:r,additionalItemType:i,errorNamePrefix:n,layer:o}=e,l=[r];if(i&&l.push(i),!l.includes(t.type)){let e=l.map(e=>`'${e}'`).join(", ");throw new a.A(`${n}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:o})}}(e),n){let e=n(t);if(!e.isValid)throw new a.A(`${r}:invalid-parameters`,e.errorMessage,{layer:i})}}function c(e){let{layer:t,errorNamePrefix:r}=e,{portalItem:i}=t;if(!i)throw new a.A(`${r}:portal-item-not-set`,m(t,"requires the portalItem property to be set"));if(!i.loaded)throw new a.A(`${r}:portal-item-not-loaded`,m(t,"cannot be saved to a portal item that does not exist or is inaccessible"));d({...e,item:i})}function f(e){let{newItem:t,itemType:r}=e,a=o.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=n.A.getDefault(),d({...e,item:a}),a}function y(e){return(0,l.m)(e,"portal-item")}async function w(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();let a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,u.ci)(t,{errorName:"layer-write:unsupported"},r),a}function v(e){(0,s.LG)(e,s.mm.JSAPI),e.typeKeywords&&=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t)}async function h(e,t){let{layer:r,createItemData:a,createJSONContext:n,setItemProperties:o,saveResources:l,supplementalUnsupportedErrors:s}=e;await p(e),c(e);let u=r.portalItem,m=n?n(u):y(u),d=await a({layer:r,layerJSON:await w(r,m,{...t,supplementalUnsupportedErrors:s})},u);return await(o?.(r,u,d)),v(u),await u.update({data:d}),(0,i.v)(m),await(l?.(u,m)),u}async function g(e,t){let{layer:r,createItemData:a,createJSONContext:n,setItemProperties:o,saveResources:l,supplementalUnsupportedErrors:s}=e;await p(e);let u=f(e),m=n?n(u):y(u),d=await a({layer:r,layerJSON:await w(r,m,{...t,supplementalUnsupportedErrors:s})},u);return await o(r,u,d),v(u),await async function(e,t,r){let a=e.portal;await a.signIn(),await a.user.addItem({item:e,data:t,folder:r?.folder})}(u,d,t),r.portalItem=u,(0,i.v)(m),await(l?.(u,m)),u}},88788(e,t,r){r.d(t,{m:()=>o,v:()=>n});var a=r(84952),i=r(20655);function n(e,t){return{...l(e,t),readResourcePaths:[]}}function o(e,t,r){let i=(0,a.An)(r?.forceNewItemContext?null:e.itemUrl);return{...l(e,t,r),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:i?{rootPath:i.path,writtenUrls:[]}:null,resources:r?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function l(e,t,r){return{origin:t,url:(0,a.An)(r?.forceNewItemContext?null:e.itemUrl),portal:e.portal||i.A.getDefault(),portalItem:e}}},26121(e,t,r){r.d(t,{I6:()=>s,ci:()=>l,dL:()=>o});var a=r(49186),i=r(77548),n=r(59923);async function o(e){let t=[];for(let r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function l(e,t,r){let i=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new a.A(e,t,r));if(e.blockedRelativeUrls&&(i=i.concat(e.blockedRelativeUrls.map(e=>(0,n.GL)("url",`Relative url '${e}' is not supported`)))),r){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:a}=r;e&&(i=i.filter(({name:e})=>!(n.MG.has(e)||t.includes(e)))),a&&(i=i.filter(e=>"web-document-write:property-required"!==e.name))}if(i.length>0)throw new a.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}function s(e){return(0,i.qd)(e).some(e=>!!e.charts?.length)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7301],{46130(e,t,r){r.d(t,{v:()=>i});var a=r(76553);function i(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,a.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},76553(e,t,r){function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>a})},87301(e,t,r){r.d(t,{save:()=>u,saveAs:()=>p});var a=r(71530),i=r(10407);const n="Stream Service";function o(e){return{isValid:"stream"===e.type&&!!e.url&&!e.webSocketUrl,errorMessage:"Stream layer should be created using a url to a stream service"}}function l(e){let t=e.layerJSON;return Promise.resolve(t&&Object.keys(t).length?t:null)}async function s(e,t){let{parsedUrl:r,title:a,fullExtent:n}=e;t.url=r.path,t.title||=a,t.extent=null,null!=n&&(t.extent=await(0,i.sQ)(n)),(0,i.OM)(t,i.mm.METADATA),(0,i.LG)(t,i.mm.SINGLE_LAYER)}async function u(e,t){return(0,a.UN)({layer:e,itemType:n,additionalItemType:"Feed",validateLayer:o,createItemData:l,errorNamePrefix:"stream-layer-save"},t)}async function p(e,t,r){return(0,a.Uh)({layer:e,itemType:n,validateLayer:o,createItemData:l,errorNamePrefix:"stream-layer-save-as",newItem:t,setItemProperties:s},r)}},71530(e,t,r){r.d(t,{UN:()=>I,Uh:()=>h});var a=r(49186),i=r(46130),n=r(20655),o=r(80812),l=r(88788),s=r(10407),u=r(26121);async function p(e){let{layer:t,errorNamePrefix:r,validateLayer:i}=e;await t.load(),function(e,t,r){let i=r(e);if(!i.isValid)throw new a.A(`${t}:invalid-parameters`,i.errorMessage,{layer:e})}(t,r,i)}function m(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function c(e){let{item:t,errorNamePrefix:r,layer:i,validateItem:n}=e;if(function(e){let{item:t,itemType:r,additionalItemType:i,errorNamePrefix:n,layer:o}=e,l=[r];if(i&&l.push(i),!l.includes(t.type)){let e=l.map(e=>`'${e}'`).join(", ");throw new a.A(`${n}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:o})}}(e),n){let e=n(t);if(!e.isValid)throw new a.A(`${r}:invalid-parameters`,e.errorMessage,{layer:i})}}function d(e){let{layer:t,errorNamePrefix:r}=e,{portalItem:i}=t;if(!i)throw new a.A(`${r}:portal-item-not-set`,m(t,"requires the portalItem property to be set"));if(!i.loaded)throw new a.A(`${r}:portal-item-not-loaded`,m(t,"cannot be saved to a portal item that does not exist or is inaccessible"));c({...e,item:i})}function f(e){let{newItem:t,itemType:r}=e,a=o.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=n.A.getDefault(),c({...e,item:a}),a}function y(e){return(0,l.m)(e,"portal-item")}async function w(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();let a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,u.ci)(t,{errorName:"layer-write:unsupported"},r),a}function v(e){(0,s.LG)(e,s.mm.JSAPI),e.typeKeywords&&=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t)}async function I(e,t){let{layer:r,createItemData:a,createJSONContext:n,setItemProperties:o,saveResources:l,supplementalUnsupportedErrors:s}=e;await p(e),d(e);let u=r.portalItem,m=n?n(u):y(u),c=await a({layer:r,layerJSON:await w(r,m,{...t,supplementalUnsupportedErrors:s})},u);return await(o?.(r,u,c)),v(u),await u.update({data:c}),(0,i.v)(m),await(l?.(u,m)),u}async function h(e,t){let{layer:r,createItemData:a,createJSONContext:n,setItemProperties:o,saveResources:l,supplementalUnsupportedErrors:s}=e;await p(e);let u=f(e),m=n?n(u):y(u),c=await a({layer:r,layerJSON:await w(r,m,{...t,supplementalUnsupportedErrors:s})},u);return await o(r,u,c),v(u),await async function(e,t,r){let a=e.portal;await a.signIn(),await a.user.addItem({item:e,data:t,folder:r?.folder})}(u,c,t),r.portalItem=u,(0,i.v)(m),await(l?.(u,m)),u}},88788(e,t,r){r.d(t,{m:()=>o,v:()=>n});var a=r(84952),i=r(20655);function n(e,t){return{...l(e,t),readResourcePaths:[]}}function o(e,t,r){let i=(0,a.An)(r?.forceNewItemContext?null:e.itemUrl);return{...l(e,t,r),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:i?{rootPath:i.path,writtenUrls:[]}:null,resources:r?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function l(e,t,r){return{origin:t,url:(0,a.An)(r?.forceNewItemContext?null:e.itemUrl),portal:e.portal||i.A.getDefault(),portalItem:e}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[926,5879],{92474(e,t,r){r.d(t,{Zm:()=>c});var s=r(32198),o=r(49186),i=r(97768),l=r(61893),a=r(17676),n=r(67076),u=r(10107),p=r(64108);const d="loaded",h=e=>{let t=e,r=class extends t{constructor(...e){super(...e),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise(e=>{let t=this.load.bind(this);this.load=r=>{let s=new Promise((e,t)=>{let s=(0,a.NY)(r,t);this.destroyed&&t(new o.A("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(e,t).finally(()=>{s&&s.remove()})});if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");let e=this._loadController=new AbortController,r=t({signal:e.signal});(0,a.$X)(r)&&r.catch(()=>{})}return e(),s}})),this.when(()=>{this._set("loadStatus",d),this._loadController=null},e=>{this.destroyed||(this._set("loadStatus","failed"),this._set("loadError",e),this._loadController=null)})}destroy(){this._loadController&&(this._loadController=(0,i.DC)(this._loadController),this._promiseProps.abort()),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}async load(e){return this}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new o.A("load:cancelled","Cancelled")),this._loadController?.abort(),this._promiseProps.abort()),this}};return(0,s.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"loaded",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"loadError",void 0),(0,s.Cg)([(0,u.MZ)({clonable:!1})],r.prototype,"loadStatus",void 0),(0,s.Cg)([(0,u.MZ)({type:[n.A],readOnly:!0})],r.prototype,"loadWarnings",null),r=(0,s.Cg)([(0,p.$)("esri.core.Loadable")],r),r},y=h(l.Z);function c(e){return!(!e||!e.load)}r.d(t,["WV",0,h,"x_",0,y])},61893(e,t,r){var s=r(32198),o=r(69622),i=r(36563),l=r(17676),a=r(64108);class n{constructor(){this._resolver=Promise.withResolvers(),this._status=0,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=1,this._cleanUp()},()=>{this._status=2,this._cleanUp()}),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return 1===this._status}isRejected(){return 2===this._status}isFulfilled(){return 0!==this._status}abort(){this._resolver.reject((0,l.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;let e=Promise.withResolvers(),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,l.zf)(e)||this._resolver.reject(e)}),e.resolve()}}const u=e=>{let t=e,r=class extends t{constructor(...e){super(...e),this._promiseProps=new n,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)}addResolvingTask(e){e&&!this._promiseProps.isFulfilled()&&(this.addHandles((0,i.rE)(e)),this._promiseProps.addResolvingPromise(e.promise))}};return r=(0,s.Cg)([(0,a.$)("esri.core.Promise")],r),r},p=u(o.A);r.d(t,["Z",0,p,"g",0,u])},41910(e,t,r){r.d(t,{WH:()=>o});const s=Symbol("arcadeFeatureSource");function o(e){return null!=(t=e)&&s in t?e[s]:null;var t}r.d(t,["e7",0,s])},5757(e,t,r){r.d(t,{B:()=>o});const s=Symbol("PopupTemplateInstance");function o(e){return"object"==typeof e&&!!e&&s in e}r.d(t,["P",0,s])},20655(e,t,r){r.d(t,{A:()=>A});var s=r(32198),o=r(92602),i=r(70333),l=r(56507),a=r(49186),n=r(25482),u=r(92474),p=r(97768),d=r(17676),h=r(91429),y=r(78888),c=r(5443),m=r(73444);let g;var f=r(96360),C=r(16405),v=r(69622);let M=class extends v.A{constructor(e){super(e),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,s.Cg)([(0,h.MZ)()],M.prototype,"nextQueryParams",void 0),(0,s.Cg)([(0,h.MZ)()],M.prototype,"queryParams",void 0),(0,s.Cg)([(0,h.MZ)()],M.prototype,"results",void 0),(0,s.Cg)([(0,h.MZ)()],M.prototype,"total",void 0),M=(0,s.Cg)([(0,h.$K)("esri.portal.PortalQueryResult")],M);var Z,S=r(41318),P=r(926),w=r(36005);let _;const O={PortalGroup:()=>Promise.resolve({default:f.A}),PortalItem:()=>r.e(812).then(()=>r(80812)),PortalUser:()=>Promise.resolve({default:S.A})};let A=class extends((0,n.T)(u.x_)){static{Z=this}static{this.AUTH_MODE_ANONYMOUS="anonymous"}static{this.AUTH_MODE_AUTO="auto"}static{this.AUTH_MODE_IMMEDIATE="immediate"}static{this.AUTH_MODE_NO_PROMPT="no-prompt"}constructor(e){super(e),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.g3DTilesGalleryGroupQuery=null,this.g3dTilesEnabled=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.default3DBasemapQuery=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.hasClassificationSchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=o.A.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useDefault3dBasemap=!1,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){b.unregister(this),this.defaultBasemap=(0,p.pR)(this.defaultBasemap),this.defaultDevBasemap=(0,p.pR)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.pR)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.xt)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(e){if(e)for(let t of e)o.A.request.trustedServers.includes(t)||o.A.request.trustedServers.push(t);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){let e=!this.user?.orgId||this.canSearchPublic;return this.id&&!e?`orgid:${this.id}`:null}get hasAPIKey(){return(0,P.Jn)(this.restUrl)}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get loaded(){return super.loaded}get restUrl(){let e=this.url;if(e){let t=e.indexOf("/sharing");e=t>0?e.slice(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get thumbnailUrl(){let e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e&&e.toLowerCase()}readUser(e){let t=null;return e&&(t=S.A.fromJSON(e),t.portal=this),t}load(e){let t=Promise.all([r.e(812),r.e(3281),r.e(3116)]).then(()=>r(83116)).then(({default:t})=>{(0,d.Te)(e),_=t}).then(()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,e)).then(e=>{if(!this.hasAPIKey&&i.id){let e=i.id;this.credential=e.findCredential(this.restUrl),!this.credential&&(this.authMode===Z.AUTH_MODE_AUTO||this.authMode===Z.AUTH_MODE_NO_PROMPT)&&(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=e.on("credential-create",function(e){let t=i.id;return()=>{let r=e.deref();r&&t.findCredential(r.restUrl)&&r.signIn().catch(()=>{})}}(new WeakRef(this))),b.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(t),Promise.resolve(this)}async createElevationLayers(){await this.load();let e=this._getHelperService("defaultElevationLayers"),t=(await Promise.all([r.e(9917),r.e(8278),r.e(9953),r.e(812),r.e(8732),r.e(5864)]).then(()=>r(38732))).default;return e?e.map(e=>new t({id:e.id,url:e.url})):[]}async fetchBasemaps(e,t){let r=await this._fetchBasemaps(e,t);if(!0===t?.include3d&&!1!==this.use3dBasemaps){if(this.g3dTilesEnabled&&this.g3DTilesGalleryGroupQuery){let e=await this._fetchBasemaps3D(this.g3DTilesGalleryGroupQuery,t);r.unshift(...e)}let s=await this._fetchBasemaps3D(e,t);r.unshift(...s)}return r}async fetchDefault3DBasemap(e){if(!this.useDefault3dBasemap||!this.default3DBasemapQuery||"none"===this.default3DBasemapQuery)return null;let t=new C.A;t.query=this.default3DBasemapQuery,t.disableExtraQuery=!0;let r=(await this.queryItems(t,e)).results.find(e=>"Web Scene"===e.type);return r?new _({portalItem:r}):null}fetchCategorySchema(e){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",e).then(e=>e.categorySchema):(0,d.G4)(e)?Promise.reject((0,d.NK)()):Promise.resolve([])}async fetchClassificationSchema(e){return this.hasClassificationSchema?this.request(this.restUrl+"/portals/self/classification/classificationSchema",e).then(e=>e.classificationSchema):null}fetchFeaturedGroups(e){let t=this.featuredGroups,r=new C.A({num:100,sortField:"title"});if(t?.length){let s=[];for(let e of t)s.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=s.join(" OR "),this.queryGroups(r,e).then(e=>e.results)}return(0,d.G4)(e)?Promise.reject((0,d.NK)()):Promise.resolve([])}fetchRegions(e){let t=this.user?.culture||this.culture||(0,m.JK)();return this.request(this.restUrl+"/portals/regions",{...e,query:{culture:t}})}fetchSettings(e){let t=this.user?.culture||this.culture||(0,m.JK)();return this.request(this.restUrl+"/portals/self/settings",{...e,query:{culture:t}})}static getDefault(){return(!g||g.destroyed)&&(g=new Z),g}queryGroups(e,t){return this.queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this.queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||="username",this.queryPortal("/community/users",e,"PortalUser",t)}fetchSelf(e=this.authMode,t=!1,r){let s=this.restUrl+"/portals/self",o={authMode:e,query:{culture:(0,m.JK)().toLowerCase()},withCredentials:!0,...r};return"auto"===o.authMode&&(o.authMode="no-prompt"),t&&(o.query.default=!0),this.request(s,o)}queryPortal(e,t,r,s){let o=(0,y.dp)(C.A,t),i=t=>this.request(this.restUrl+e,{...o.toRequestOptions(this),...s}).then(e=>{let r=o.clone();return r.start=e.nextStart,new M({nextQueryParams:r,queryParams:o,total:e.total,results:Z._resultsToTypedArray(t,{portal:this},e,s)})}).then(e=>Promise.all(e.results.map(t=>"function"==typeof t.when?t.when():e)).then(()=>e,t=>((0,d.QP)(t),e)));return r&&O[r]?O[r]().then(({default:e})=>((0,d.Te)(s),i(e))):i()}signIn(){if(this.hasAPIKey)return this.load().then(()=>{if(!this.user)throw new a.A("portal:not-authenticated","Unable to authenticate user. Portal.user is missing")});if(this.authMode===Z.AUTH_MODE_ANONYMOUS||this.authMode===Z.AUTH_MODE_NO_PROMPT&&!i.id)return Promise.reject(new a.A("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);let e=e=>Promise.resolve().then(()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then(()=>null)):"loading"===this.loadStatus?this.load().then(()=>this.credential?null:(this.credential=e,this.fetchSelf("immediate"))):this.user&&this.credential===e?null:(this.credential=e,this.fetchSelf("immediate"))).then(e=>{e&&(this.sourceJSON=e,this.read(e))});return i.id?i.id.getCredential(this.restUrl,{prompt:this.authMode!==Z.AUTH_MODE_NO_PROMPT}).then(t=>e(t)):e(this.credential)}normalizeUrl(e){let t=this.credential?.token;return this._normalizeSSL(t?e+(e.includes("?")?"&":"?")+"token="+t:e)}requestToTypedArray(e,t,r){return this.request(e,t).then(e=>{let t=Z._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map(t=>"function"==typeof t.when?t.when():e)).then(()=>t,()=>t)})}request(e,t={}){let r={f:"json",...t.query},{authMode:s=(this.authMode===Z.AUTH_MODE_ANONYMOUS||this.authMode===Z.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:o=null,cacheBust:i=!1,method:a="auto",responseType:n="json",signal:u}=t,p={authMode:s,body:o,cacheBust:i,method:a,query:r,responseType:n,timeout:0,signal:u};return t.withCredentials&&(p.withCredentials=!0),(0,l.A)(this._normalizeSSL(e),p).then(e=>e.data)}toJSON(){throw new a.A("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw Error("JSON object is already hydrated");return new Z({sourceJSON:e})}_getHelperService(e){let t=this.helperServices?.[e];if(!t)throw new a.A("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}async _fetchBasemaps(e,t){let r=new C.A;r.query=e||((0,P.Dd)()?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;let s=await this.queryGroups(r,t);if(!s.total)return[];let o=s.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=o.sortField||"name",r.sortOrder=o.sortOrder||"desc";let i=await o.queryItems(r,t);return i.total?i.results.filter(e=>"Web Map"===e.type).map(e=>new _({portalItem:e})):[]}async _fetchBasemaps3D(e,t){let r=e||this.basemapGalleryGroupQuery3D;if(!r||(0,P.Dd)())return[];let s=new C.A({query:r,disableExtraQuery:!0}),o=await this.queryGroups(s,t);if(!o.total)return[];let i=o.results[0];s.num=100,s.query='type:"Web Scene"',s.sortField=i.sortField||"name",s.sortOrder=i.sortOrder||"desc";let l=await i.queryItems(s,t);return l.total?l.results.filter(e=>"Web Scene"===e.type).map(e=>new _({portalItem:e})):[]}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(e){if(e){let t=_.fromJSON(e);return t.portalItem={portal:this},t}return null}static _resultsToTypedArray(e,t,r,s){let o;if(r){let i=null==s?null:s.signal;o=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(e||t)&&(o=o.map(r=>{let s=Object.assign(e?e.fromJSON(r):r,t);return"function"==typeof s.load&&s.load(i),s}))}else o=[];return o}};(0,s.Cg)([(0,h.MZ)()],A.prototype,"access",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"allSSL",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"authMode",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"authorizedCrossOriginDomains",void 0),(0,s.Cg)([(0,w.w)("authorizedCrossOriginDomains")],A.prototype,"readAuthorizedCrossOriginDomains",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"basemapGalleryGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)({json:{name:"3DBasemapGalleryGroupQuery"}})],A.prototype,"basemapGalleryGroupQuery3D",void 0),(0,s.Cg)([(0,h.MZ)({json:{name:"g3DTilesGalleryGroupQuery"}})],A.prototype,"g3DTilesGalleryGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)({json:{name:"g3dTilesEnabled"}})],A.prototype,"g3dTilesEnabled",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"bingKey",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"canListApps",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"canListData",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"canListPreProvisionedItems",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"canProvisionDirectPurchase",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"canSearchPublic",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"canShareBingPublic",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"canSharePublic",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"canSignInArcGIS",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"canSignInIDP",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"colorSetsGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"commentsEnabled",void 0),(0,s.Cg)([(0,h.MZ)({type:Date})],A.prototype,"created",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"credential",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"culture",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"currentVersion",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"customBaseUrl",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"default3DBasemapQuery",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"defaultBasemap",void 0),(0,s.Cg)([(0,w.w)("defaultBasemap")],A.prototype,"readDefaultBasemap",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"defaultDevBasemap",void 0),(0,s.Cg)([(0,w.w)("defaultDevBasemap")],A.prototype,"readDefaultDevBasemap",null),(0,s.Cg)([(0,h.MZ)({type:c.A})],A.prototype,"defaultExtent",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"defaultVectorBasemap",void 0),(0,s.Cg)([(0,w.w)("defaultVectorBasemap")],A.prototype,"readDefaultVectorBasemap",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"description",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"devBasemapGalleryGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"eueiEnabled",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],A.prototype,"extraQuery",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"featuredGroups",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"featuredItemsGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"galleryTemplatesGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"layoutGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"livingAtlasGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],A.prototype,"hasAPIKey",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"hasCategorySchema",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"hasClassificationSchema",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"helpBase",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"helperServices",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"helpMap",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"homePageFeaturedContent",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"homePageFeaturedContentCount",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"httpPort",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"httpsPort",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"id",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"ipCntryCode",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],A.prototype,"isOrganization",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"isPortal",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"isReadOnly",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],A.prototype,"itemPageUrl",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"layerTemplatesGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"maxTokenExpirationMinutes",void 0),(0,s.Cg)([(0,h.MZ)({type:Date})],A.prototype,"modified",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"name",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"portalHostname",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"portalMode",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"portalProperties",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"region",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"recycleBinEnabled",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],A.prototype,"restUrl",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"rotatorPanels",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"showHomePageDescription",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"staticImagesUrl",void 0),(0,s.Cg)([(0,h.MZ)({json:{name:"2DStylesGroupQuery"}})],A.prototype,"stylesGroupQuery2d",void 0),(0,s.Cg)([(0,h.MZ)({json:{name:"stylesGroupQuery"}})],A.prototype,"stylesGroupQuery3d",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"supportsHostedServices",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"symbolSetsGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"templatesGroupQuery",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"thumbnail",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],A.prototype,"thumbnailUrl",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"units",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"url",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"urlKey",void 0),(0,s.Cg)([(0,w.w)("urlKey")],A.prototype,"readUrlKey",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"user",void 0),(0,s.Cg)([(0,w.w)("user")],A.prototype,"readUser",null),(0,s.Cg)([(0,h.MZ)()],A.prototype,"use3dBasemaps",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"useDefault3dBasemap",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"useStandardizedQuery",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"useVectorBasemaps",void 0),(0,s.Cg)([(0,h.MZ)()],A.prototype,"vectorBasemapGalleryGroupQuery",void 0),A=Z=(0,s.Cg)([(0,h.$K)("esri.portal.Portal")],A);const b=new FinalizationRegistry(e=>{e.remove()})},96360(e,t,r){r.d(t,{A:()=>p});var s,o=r(32198),i=r(49186),l=r(25482),a=r(91429),n=r(78888),u=r(16405);let p=s=class extends l.o{constructor(e){super(e),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.sourceJSON=null,this.tags=null,this.title=null}get thumbnailUrl(){let e=this.url,t=this.thumbnail;return e&&t&&this.portal?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`):null}get url(){let e=this.portal?.restUrl;return e?e+"/community/groups/"+this.id:null}fetchCategorySchema(e){return this.portal.request(this.url+"/categorySchema",e).then(t=>{let r=t.categorySchema||[];return r.some(e=>"contentCategorySetsGroupQuery.LivingAtlas"===e.source)?this._fetchCategorySchemaSet("LivingAtlas",e):r})}fetchMembers(e){return this.portal.request(this.url+"/users",e)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}toJSON(){throw new i.A("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw Error("JSON object is already hydrated");let t=new s({sourceJSON:e});return t.read(e),t}queryItems(e,t){let r=(0,n.dp)(u.A,e),s=this.portal;return parseFloat(s.currentVersion)>5?(r||=new u.A,s.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",t)):(r=r?r.clone():new u.A,r.query="group:"+this.id+(r.query?" "+r.query:""),s.queryItems(r,t))}_fetchCategorySchemaSet(e,t){let r=this.portal;return r.fetchSelf(r.authMode,!0,t).then(e=>{let s=e.contentCategorySetsGroupQuery;if(s){let e=new u.A({disableExtraQuery:!0,num:1,query:s});return r.queryGroups(e,t)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")}).then(r=>{if(r.total){let s=r.results[0],o=new u.A({num:1,query:`typekeywords:"${e}"`});return s.queryItems(o,t)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")}).then(e=>e.total?e.results[0].fetchData("json",t).then(e=>{let t=e?.categorySchema;return t?.length?t:[]}):[])}};(0,o.Cg)([(0,a.MZ)()],p.prototype,"access",void 0),(0,o.Cg)([(0,a.MZ)({type:Date})],p.prototype,"created",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"description",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"id",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"isInvitationOnly",void 0),(0,o.Cg)([(0,a.MZ)({type:Date})],p.prototype,"modified",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"owner",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"portal",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"snippet",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"sortField",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"sortOrder",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"sourceJSON",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"tags",void 0),(0,o.Cg)([(0,a.MZ)()],p.prototype,"thumbnail",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,o.Cg)([(0,a.MZ)()],p.prototype,"title",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],p.prototype,"url",null),p=s=(0,o.Cg)([(0,a.$K)("esri.portal.PortalGroup")],p)},16405(e,t,r){r.d(t,{A:()=>y});var s,o=r(32198),i=r(69622),l=r(66552),a=r(4718),n=r(91429),u=r(5443),p=r(16930),d=r(28735);const h=new l.J({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let y=s=class extends i.A{constructor(e){super(e),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(e){("asc"===e||"desc"===e)&&this._set("sortOrder",e)}clone(){return new s({categories:this.categories?(0,a.o8)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(e,t){let r=[];this.categories&&(r=this.categories.map(e=>Array.isArray(e)?JSON.stringify(e):e));let s="";if(this.extent){let e=(0,d.Cv)(this.extent,p.A.WGS84);null!=e&&(s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`)}let o=this.query,i=e.extraQuery;!this.disableExtraQuery&&i&&(o=o?"("+o+") AND "+i:i);let l={categories:r,bbox:s,q:o,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(l.sortField=this.sortField.split(",").map(e=>h.toJSON(e.trim())).join(","),l.sortOrder=this.sortOrder),{query:{...t,...l}}}};(0,o.Cg)([(0,n.MZ)()],y.prototype,"categories",void 0),(0,o.Cg)([(0,n.MZ)()],y.prototype,"disableExtraQuery",void 0),(0,o.Cg)([(0,n.MZ)({type:u.A})],y.prototype,"extent",void 0),(0,o.Cg)([(0,n.MZ)()],y.prototype,"filter",void 0),(0,o.Cg)([(0,n.MZ)()],y.prototype,"num",void 0),(0,o.Cg)([(0,n.MZ)()],y.prototype,"query",void 0),(0,o.Cg)([(0,n.MZ)()],y.prototype,"sortField",void 0),(0,o.Cg)([(0,n.MZ)()],y.prototype,"sortOrder",null),(0,o.Cg)([(0,n.MZ)()],y.prototype,"start",void 0),y=s=(0,o.Cg)([(0,n.$K)("esri.portal.PortalQueryParams")],y)},41318(e,t,r){r.d(t,{A:()=>p});var s=r(32198),o=r(49186),i=r(25482),l=r(91429);let a=class extends i.o{constructor(e){super(e),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){let e=this.portal?.restUrl;return e?`${e}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new o.A("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,s.Cg)([(0,l.MZ)({type:Date})],a.prototype,"created",void 0),(0,s.Cg)([(0,l.MZ)()],a.prototype,"id",void 0),(0,s.Cg)([(0,l.MZ)()],a.prototype,"portal",void 0),(0,s.Cg)([(0,l.MZ)()],a.prototype,"title",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],a.prototype,"url",null),(0,s.Cg)([(0,l.MZ)()],a.prototype,"username",void 0),a=(0,s.Cg)([(0,l.$K)("esri.portal.PortalFolder")],a);var n,u=r(96360);let p=n=class extends i.o{constructor(e){super(e),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.id=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userLicenseTypeId=null,this.userType=null}get thumbnailUrl(){let e=this.url,t=this.thumbnail;return e&&t?this.portal.normalizeUrl(`${e}/info/${t}?f=json`):null}get userContentUrl(){let e=this.portal?.restUrl;return e?`${e}/content/users/${this.id}`:null}get url(){let e=this.portal?.restUrl;return e?`${e}/community/users/${this.id}`:null}addItem(e){let t=e&&e.item,r=e?.data,s=e?.folder,o={method:"post"};t&&(o.query=t.createPostQuery(),null!=r&&("string"==typeof r?o.query.text=r:"object"==typeof r&&(o.query.text=JSON.stringify(r))));let i=this.userContentUrl;return s&&(i+="/"+("string"==typeof s?s:s.id)),this.portal.request(i+"/addItem",o).then(e=>(t.id=e.id,t.portal=this.portal,t.loaded?t.reload():t.load()))}async deleteItem(e,t=!1){let r=this.userContentUrl;e.ownerFolder&&(r+="/"+e.ownerFolder);let s=t?{permanentDelete:!0}:{};await this.portal.request(r+`/items/${e.id}/delete`,{method:"post",query:s}),e.id=null,e.portal=null}async deleteItems(e,t=!1){e=e.slice();let r=this.userContentUrl+"/deleteItems",s=[],i=e.map(e=>e.id);if(i.length){let l={method:"post",query:{items:i.join(","),permanentDelete:t}},a=await this.portal.request(r,l);for(let t of a.results){let r=e.find(e=>t.itemId===e.id),i=t.success,l=null;i?(r.id=null,r.portal=null):t.error&&(l=new o.A("portal:delete-item-failed",t.error.message,t.error)),s.push({item:r,success:i,error:l})}}return s}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then(e=>{let t;return t=e&&e.folders?e.folders.map(e=>{let t=a.fromJSON(e);return t.portal=this.portal,t}):[],t})}fetchGroups(){return this.portal.request(this.url??"").then(e=>{let t;return t=e&&e.groups?e.groups.map(e=>{let t=u.A.fromJSON(e);return t.portal=this.portal,t}):[],t})}async fetchItems(e){e??={};let t=this.userContentUrl??"";e.folder&&(t+="/"+e.folder.id);let s,{default:o}=await r.e(812).then(()=>r(80812)),i={folders:!1,inRecycleBin:!!e.inRecycleBin||null,foldersContent:!(e.folder||!e.includeSubfolderItems)||null,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"},l=await this.portal.request(t,{query:i});return l?.items?(s=l.items.map(e=>{let t=o.fromJSON(e);return t.portal=this.portal,t}),await Promise.all(s.map(e=>e.load())),{items:s,nextStart:l.nextStart,total:l.total}):{items:[],nextStart:-1,total:0}}fetchTags(){return this.portal.request(this.url+"/tags").then(e=>e.tags)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}queryFavorites(e){return this.favGroupId?(this._favGroup||=new u.A({id:this.favGroupId,portal:this.portal}),this._favGroup.queryItems(e)):Promise.reject(new o.A("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}async restoreItem(e,t){let r=this.userContentUrl,s=t?{folderID:"string"==typeof t?t:t.id}:null;await this.portal.request(r+`/items/${e.id}/restore`,{method:"post",query:s})}toJSON(){throw new o.A("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw Error("JSON object is already hydrated");let t=new n({sourceJSON:e});return t.read(e),t}};(0,s.Cg)([(0,l.MZ)()],p.prototype,"access",void 0),(0,s.Cg)([(0,l.MZ)({type:Date})],p.prototype,"created",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"culture",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"description",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"email",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"favGroupId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"fullName",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"id",void 0),(0,s.Cg)([(0,l.MZ)({type:Date})],p.prototype,"modified",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"orgId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"portal",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"preferredView",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"privileges",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"region",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"role",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"roleId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"thumbnail",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,s.Cg)([(0,l.MZ)()],p.prototype,"units",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"userContentUrl",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"url",null),(0,s.Cg)([(0,l.MZ)()],p.prototype,"username",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"userLicenseTypeId",void 0),(0,s.Cg)([(0,l.MZ)()],p.prototype,"userType",void 0),p=n=(0,s.Cg)([(0,l.$K)("esri.portal.PortalUser")],p)},98205(e,t,r){r.d(t,{KZ:()=>a,eh:()=>l,gf:()=>i,of:()=>o});const s=Symbol("SizeVariableInstance");function o(e){return"object"==typeof e&&!!e&&s in e}function i(e){return null!=e&&!isNaN(e)&&isFinite(e)}function l(e){return e.valueExpression?"expression":e.field&&"string"==typeof e.field?"field":"unknown"}function a(e,t){let r=t||l(e),s=e.valueUnit||"unknown";return"unknown"===r?"constant":e.stops?"stops":null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?"clamped-linear":"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?"proportional":"additive":"identity":"real-world-size"}r.d(t,["uY",0,s])},926(e,t,r){r.d(t,{Dd:()=>h,Jn:()=>y,Qc:()=>c,getApiKey:()=>p,getSessionToken:()=>d});var s=r(92602),o=r(56507),i=r(84952);const l=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),n=new Map;let u=null;function p(e){if(!c(e))return null;let t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),r=s.A.apiKeys;if(Array.isArray(r.scopes))for(let e of r.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return r.basemapStyles&&l.test(e)?r.basemapStyles:s.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?s.A.apiKey:null}async function d(e){if(!s.A.sessions?.basemap?.enabled||!l.test(e))return null;let t=p(e);if(!t)return null;u&&await u;let r,{styleFamily:i="arcgis",autoRefresh:a,duration:d=43200}=s.A.sessions.basemap,h=`${t}:${i}`,y=n.get(h);if(y&&(!a||y.endTime>Date.now()))return y.sessionToken;u=(0,o.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:d,styleFamily:i,token:t}});try{r=(await u).data,r.endTime-=5e3,n.set(h,r)}finally{u=null}return r.sessionToken}function h(){return null!=s.A.apiKey||null!=s.A.apiKeys.basemapStyles}function y(e,t){return t?c(e):null!=p(e)}function c(e){let t=(0,i.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},94128(e,t,r){r.d(t,{D:()=>o});const s=Symbol("GraphicInstance");function o(e){return"object"==typeof e&&!!e&&s in e}r.d(t,["Z",0,s])}}]);