@arcgis/core 4.28.0-next.20230921 → 4.28.0-next.20230923

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 (415) hide show
  1. package/Graphic.js +1 -1
  2. package/PopupTemplate.js +1 -1
  3. package/TimeExtent.js +1 -1
  4. package/arcade/ArcadeDate.js +1 -1
  5. package/arcade/Feature.js +1 -1
  6. package/arcade/featureSetUtils.js +1 -1
  7. package/arcade/featureset/actions/Adapted.js +1 -1
  8. package/arcade/featureset/actions/GroupBy.js +1 -1
  9. package/arcade/featureset/support/FeatureSet.js +1 -1
  10. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  11. package/arcade/featureset/support/StatsField.js +1 -1
  12. package/arcade/featureset/support/sqlUtils.js +1 -1
  13. package/arcade/functions/convertdirection.js +1 -1
  14. package/arcade/functions/date.js +1 -1
  15. package/arcade/functions/featuresetbase.js +1 -1
  16. package/arcade/functions/featuresetstats.js +1 -1
  17. package/arcade/treeAnalysis.js +1 -1
  18. package/arcade.js +1 -1
  19. package/assets/esri/core/workers/RemoteClient.js +1 -1
  20. package/assets/esri/core/workers/chunks/02156fd04279f4d0fd3f.js +1 -0
  21. package/assets/esri/core/workers/chunks/07f6175b52366b2c28bd.js +1 -0
  22. package/assets/esri/core/workers/chunks/098073c3b2849f56dad8.js +1 -0
  23. package/assets/esri/core/workers/chunks/1186ba1947bd0c32f148.js +1 -0
  24. package/assets/esri/core/workers/chunks/186445b9fbedd261f684.js +1 -0
  25. package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 250bb6ae6f1992b5b4f9.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
  29. package/assets/esri/core/workers/chunks/2a0b3b52ecd787a613bc.js +1 -0
  30. package/assets/esri/core/workers/chunks/2bc9b55e655968229ef4.js +1 -0
  31. package/assets/esri/core/workers/chunks/2f0924e7aa89e689da4a.js +1 -0
  32. package/assets/esri/core/workers/chunks/3f218d65ec451b2a1027.js +1 -0
  33. package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
  34. package/assets/esri/core/workers/chunks/45d6b942cdccca2ce44a.js +1 -0
  35. package/assets/esri/core/workers/chunks/4bf1a7e82a68ccee0ee1.js +1 -0
  36. package/assets/esri/core/workers/chunks/4c110c7f4f940ec58010.js +1 -0
  37. package/assets/esri/core/workers/chunks/{bde89b2684b6185992ef.js → 4ed77097e69fa3096ce4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/4fe5bac782a742d5b1c0.js +1 -0
  39. package/assets/esri/core/workers/chunks/{1cbaba30f55f00f7498b.js → 51324d042f469f3b8914.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{3f4e9b1663ec521bfe00.js → 542ce10e1872399790b4.js} +1 -1
  41. package/assets/esri/core/workers/chunks/54d2b7e2ac4ba883bee8.js +1 -0
  42. package/assets/esri/core/workers/chunks/54ecb6cae310818d1aa2.js +1 -0
  43. package/assets/esri/core/workers/chunks/57c932e289d89d97da4b.js +1 -0
  44. package/assets/esri/core/workers/chunks/{6403de6fc067cf8f7436.js → 592c1fb531f2be928e8a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/59a807220d6f0dd18776.js +1 -0
  46. package/assets/esri/core/workers/chunks/59dff10d7ad2b1bf469e.js +1 -0
  47. package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
  48. package/assets/esri/core/workers/chunks/612c485c5aad1548d708.js +1 -0
  49. package/assets/esri/core/workers/chunks/{2bb69d76a13564e8e455.js → 645ba2d5c10184632d23.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{332689bf60d246485993.js → 65186e168dd112ac6221.js} +1 -1
  51. package/assets/esri/core/workers/chunks/6b9248fb2d6aadbce7bb.js +1 -0
  52. package/assets/esri/core/workers/chunks/709465832d306e02df52.js +1 -0
  53. package/assets/esri/core/workers/chunks/72c5bd6f7b8541b8d69e.js +1 -0
  54. package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{94188fe381239d48a975.js → 76483c9a8848f3106126.js} +1 -1
  56. package/assets/esri/core/workers/chunks/7aa58c96798447ce5907.js +1 -0
  57. package/assets/esri/core/workers/chunks/7d078b8b9997b5300c0a.js +1 -0
  58. package/assets/esri/core/workers/chunks/7fe641cf1467496e670a.js +1 -0
  59. package/assets/esri/core/workers/chunks/{df8f62beb36fb9d2ac81.js → 810c8d6ff19976fd1366.js} +1 -1
  60. package/assets/esri/core/workers/chunks/8458ed96f3e72814cef2.js +1 -0
  61. package/assets/esri/core/workers/chunks/{243a4eed107d363dfad8.js → 887652bbdb3b71d0a089.js} +1 -1
  62. package/assets/esri/core/workers/chunks/896bfda379cf620b63ec.js +1 -0
  63. package/assets/esri/core/workers/chunks/91c9f0d59eaed7a735ce.js +1 -0
  64. package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
  65. package/assets/esri/core/workers/chunks/97658ac749664a07c92d.js +1 -0
  66. package/assets/esri/core/workers/chunks/{1da74a306aa5b4eacaae.js → 9866bbaeaf885c2dcca9.js} +1 -1
  67. package/assets/esri/core/workers/chunks/a39ae87298ac674f129d.js +1 -0
  68. package/assets/esri/core/workers/chunks/a7b3048c19348540e004.js +1 -0
  69. package/assets/esri/core/workers/chunks/a8ca4b116909e47722f9.js +1 -0
  70. package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
  71. package/assets/esri/core/workers/chunks/ab145d13932d87dd7bf9.js +1 -0
  72. package/assets/esri/core/workers/chunks/{77c15b1c2729c780f75a.js → aeeeb386134b341d7ad2.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → af54b233f6d6ad70b4a3.js} +2 -2
  74. package/assets/esri/core/workers/chunks/b9146daae8457224fd08.js +1 -0
  75. package/assets/esri/core/workers/chunks/bcdd2e8841abcb4df6da.js +1 -0
  76. package/assets/esri/core/workers/chunks/be05cc0cdabd5e051045.js +1 -0
  77. package/assets/esri/core/workers/chunks/c5f5f37bef11c6fbdc40.js +1 -0
  78. package/assets/esri/core/workers/chunks/d414dba3179bcf75bc6b.js +1 -0
  79. package/assets/esri/core/workers/chunks/{b449d6bd5851187d419f.js → d6e5408f9fa6b4bcd118.js} +1 -1
  80. package/assets/esri/core/workers/chunks/d9fb500cbd0f04d219a3.js +1 -0
  81. package/assets/esri/core/workers/chunks/e0dd6789fb797e9b7206.js +1 -0
  82. package/assets/esri/core/workers/chunks/{6f271249e042086d5a16.js → e4e49deae8da74f629db.js} +1 -1
  83. package/assets/esri/core/workers/chunks/e5dcff7a4fa84ba09670.js +1 -0
  84. package/assets/esri/core/workers/chunks/{f508ccfde6425dabe9ac.js → ee0bf611d191103a7046.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{ed1fbc1bc8d50453e2f5.js → f793cd41fcd022baeea2.js} +1 -1
  86. package/assets/esri/core/workers/chunks/fad6a7bb82a0a2df726f.js +1 -0
  87. package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -84
  88. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -0
  89. package/assets/esri/themes/dark/main.css +1 -1
  90. package/assets/esri/themes/light/main.css +1 -1
  91. package/assets/esri/themes/light/view.css +1 -1
  92. package/chunks/arcade.js +1 -1
  93. package/config.js +1 -1
  94. package/core/Accessor.js +1 -1
  95. package/core/accessorSupport/diffUtils.js +1 -1
  96. package/core/has.js +1 -1
  97. package/core/number.js +1 -1
  98. package/core/reactiveUtils.js +1 -1
  99. package/core/sql/DateOnly.js +1 -1
  100. package/core/sql/WhereClause.js +1 -1
  101. package/core/sql.js +1 -1
  102. package/core/timeUtils.js +1 -1
  103. package/identity/IdentityForm.js +1 -1
  104. package/identity/IdentityModal.js +1 -1
  105. package/interfaces.d.ts +48 -203
  106. package/layers/LinkChartLayer.js +1 -1
  107. package/layers/OrientedImageryLayer.js +1 -1
  108. package/layers/SceneLayer.js +1 -1
  109. package/layers/graphics/applyEditsUtils.js +5 -0
  110. package/layers/graphics/editingSupport.js +1 -1
  111. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  112. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  113. package/layers/mixins/ArcGISImageService.js +1 -1
  114. package/layers/mixins/EditBusLayer.js +1 -1
  115. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  116. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +5 -0
  117. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  118. package/layers/orientedImagery/core/cameraOrientationFactory.js +1 -1
  119. package/layers/orientedImagery/core/utils.js +5 -0
  120. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  121. package/layers/support/fieldProperties.js +1 -1
  122. package/layers/support/fieldUtils.js +1 -1
  123. package/layers/support/imageryRendererUtils.js +1 -1
  124. package/layers/support/kmlUtils.js +1 -1
  125. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  126. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
  127. package/networks/Network.js +1 -1
  128. package/package.json +1 -1
  129. package/request.js +1 -1
  130. package/rest/featureService/FeatureService.js +1 -1
  131. package/rest/support/DirectionsFeatureSet.js +1 -1
  132. package/smartMapping/renderers/pieChart.js +1 -1
  133. package/smartMapping/renderers/relationship.js +1 -1
  134. package/smartMapping/renderers/support/utils.js +1 -1
  135. package/smartMapping/statistics/support/ageUtils.js +1 -1
  136. package/smartMapping/support/adapters/support/utils.js +1 -1
  137. package/smartMapping/support/utils.js +1 -1
  138. package/support/apiKeyUtils.js +1 -1
  139. package/support/arcadeUtils.js +1 -1
  140. package/support/revision.js +1 -1
  141. package/symbols/cim/cimAnalyzer.js +1 -1
  142. package/symbols/support/svgUtils.js +1 -1
  143. package/time/TimeReference.js +1 -1
  144. package/time/timeReferenceUtils.js +1 -1
  145. package/versionManagement/VersionManagementService.js +1 -1
  146. package/versionManagement/support/EditMomentStack.js +5 -0
  147. package/versionManagement/support/versionManagementUtils.js +1 -1
  148. package/views/2d/engine/Container.js +1 -1
  149. package/views/2d/engine/DisplayObject.js +1 -1
  150. package/views/2d/engine/ManagedCanvas.js +5 -0
  151. package/views/2d/engine/Stage.js +1 -1
  152. package/views/2d/engine/webgl/GroupContainer.js +1 -1
  153. package/views/2d/engine/webgl/Painter.js +1 -1
  154. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  155. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  156. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  157. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  158. package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
  159. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  160. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  161. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  162. package/views/2d/layers/MediaLayerView2D.js +1 -1
  163. package/views/2d/layers/TileLayerView2D.js +1 -1
  164. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  165. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  166. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  167. package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
  168. package/views/2d/layers/graphics/GraphicContainer.js +1 -1
  169. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  170. package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
  171. package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
  172. package/views/2d/layers/support/DisplayGL.js +1 -1
  173. package/views/2d/webglDeps.js +1 -1
  174. package/views/3d/glTF/loader.js +1 -1
  175. package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
  176. package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.js +1 -1
  177. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  178. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  179. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  180. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  181. package/views/3d/layers/SceneLayerView3D.js +1 -1
  182. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  184. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  185. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  186. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  187. package/views/3d/layers/graphics/Labeler.js +1 -1
  188. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  189. package/views/3d/layers/i3s/featureEditing.js +1 -1
  190. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  191. package/views/3d/state/ViewStateManager.js +1 -1
  192. package/views/3d/support/buffer/glUtil.js +1 -1
  193. package/views/3d/support/engineContent/line.js +1 -1
  194. package/views/3d/support/viewpointUtils.js +1 -1
  195. package/views/3d/webgl-engine/Stage.js +1 -1
  196. package/views/3d/webgl-engine/effects/RenderPluginInput.js +1 -1
  197. package/views/3d/webgl-engine/effects/blit/Blit.js +5 -0
  198. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  199. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  200. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  201. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  202. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  203. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  204. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  205. package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
  206. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  207. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  208. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  209. package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
  210. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  211. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  212. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  213. package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
  214. package/views/View.js +1 -1
  215. package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
  216. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  217. package/views/interactive/tooltip/constraintUtils.js +1 -1
  218. package/views/interactive/tooltip/content/Fields.js +1 -1
  219. package/views/interactive/tooltip/content/TooltipContentDrawCircle.js +1 -1
  220. package/views/interactive/tooltip/content/TooltipContentDrawMesh.js +1 -1
  221. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  222. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  223. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  224. package/views/interactive/tooltip/content/TooltipContentDrawRectangle.js +1 -1
  225. package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
  226. package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
  227. package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
  228. package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
  229. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  230. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  231. package/views/interactive/tooltip/content/TooltipContentTranslateGraphic.js +1 -1
  232. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicXY.js +1 -1
  233. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicZ.js +1 -1
  234. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  235. package/views/interactive/tooltip/content/TooltipContentTranslateVertexXY.js +1 -1
  236. package/views/interactive/tooltip/content/TooltipContentTranslateVertexZ.js +1 -1
  237. package/views/support/angularMeasurementUtils.js +1 -1
  238. package/views/ui/UI.js +1 -1
  239. package/views/webgl/ShaderTranspiler.js +1 -1
  240. package/views/webgl/Texture.js +1 -1
  241. package/views/webgl/contextUtils.js +1 -1
  242. package/webmap/InitialViewProperties.js +1 -1
  243. package/widgets/AreaMeasurement2D.js +1 -1
  244. package/widgets/AreaMeasurement3D.js +1 -1
  245. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  246. package/widgets/Attachments.js +1 -1
  247. package/widgets/Attribution.js +1 -1
  248. package/widgets/BasemapGallery.js +1 -1
  249. package/widgets/BasemapLayerList.js +1 -1
  250. package/widgets/BasemapToggle.js +1 -1
  251. package/widgets/Bookmarks.js +1 -1
  252. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  253. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  254. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  255. package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
  256. package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
  257. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  258. package/widgets/BuildingExplorer.js +1 -1
  259. package/widgets/Compass.js +1 -1
  260. package/widgets/CoordinateConversion.js +1 -1
  261. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  262. package/widgets/Daylight.js +1 -1
  263. package/widgets/DirectLineMeasurement3D.js +1 -1
  264. package/widgets/DirectionalPad.js +1 -1
  265. package/widgets/Directions/components/SaveLayer.js +1 -1
  266. package/widgets/Directions.js +1 -1
  267. package/widgets/DistanceMeasurement2D.js +1 -1
  268. package/widgets/Editor/components/FooterActions.js +1 -1
  269. package/widgets/Editor/components/Notices.js +1 -1
  270. package/widgets/Editor/components/PanelContent.js +1 -1
  271. package/widgets/Editor/components/PanelToolbar.js +1 -1
  272. package/widgets/Editor/components/Prompt.js +1 -1
  273. package/widgets/Editor/components/Settings.js +1 -1
  274. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  275. package/widgets/Editor/components/UploadDetails.js +1 -1
  276. package/widgets/Editor.js +1 -1
  277. package/widgets/ElevationProfile/components/LegendItem.js +1 -1
  278. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  279. package/widgets/ElevationProfile/components/Statistics.js +1 -1
  280. package/widgets/ElevationProfile.js +1 -1
  281. package/widgets/Expand.js +1 -1
  282. package/widgets/Feature/FeatureContent.js +1 -1
  283. package/widgets/Feature/FeatureExpression.js +1 -1
  284. package/widgets/Feature/FeatureFields.js +1 -1
  285. package/widgets/Feature/FeatureMedia.js +1 -1
  286. package/widgets/Feature/FeatureRelationship.js +1 -1
  287. package/widgets/Feature/FeatureViewModel.js +1 -1
  288. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  289. package/widgets/Feature/support/FeatureElementInfo.js +1 -1
  290. package/widgets/Feature.js +1 -1
  291. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  292. package/widgets/FeatureForm/GroupInput.js +1 -1
  293. package/widgets/FeatureForm/css.js +1 -1
  294. package/widgets/FeatureForm.js +1 -1
  295. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  296. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  297. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  298. package/widgets/FeatureTable.js +1 -1
  299. package/widgets/FeatureTemplates/ItemList.js +1 -1
  300. package/widgets/FeatureTemplates.js +1 -1
  301. package/widgets/Features/FeaturesRelatedRecords.js +1 -1
  302. package/widgets/Features.js +1 -1
  303. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  304. package/widgets/FloorFilter.js +1 -1
  305. package/widgets/Fullscreen.js +1 -1
  306. package/widgets/Histogram.js +1 -1
  307. package/widgets/HistogramRangeSlider.js +1 -1
  308. package/widgets/Home.js +1 -1
  309. package/widgets/LayerList/ListItemPanel.js +1 -1
  310. package/widgets/LayerList.js +1 -1
  311. package/widgets/Legend/LegendViewModel.js +1 -1
  312. package/widgets/Legend/styles/Card.js +1 -1
  313. package/widgets/Legend/styles/Classic.js +1 -1
  314. package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
  315. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  316. package/widgets/LineOfSight.js +1 -1
  317. package/widgets/Locate.js +1 -1
  318. package/widgets/NavigationToggle.js +1 -1
  319. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  320. package/widgets/OrientedImageryViewer.js +1 -1
  321. package/widgets/Popup.js +1 -1
  322. package/widgets/Print.js +1 -1
  323. package/widgets/ScaleRangeSlider/scalePreviewUtils.js +1 -1
  324. package/widgets/ScaleRangeSlider.js +1 -1
  325. package/widgets/Search/SearchResultRenderer.js +1 -1
  326. package/widgets/Search.js +1 -1
  327. package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
  328. package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
  329. package/widgets/ShadowCast/components/ShadowTooltipContent.js +1 -1
  330. package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
  331. package/widgets/ShadowCast.js +1 -1
  332. package/widgets/Sketch.js +1 -1
  333. package/widgets/Slice.js +1 -1
  334. package/widgets/Slider.js +1 -1
  335. package/widgets/Swipe.js +1 -1
  336. package/widgets/TableList.js +1 -1
  337. package/widgets/TimeSlider.js +1 -1
  338. package/widgets/Track.js +1 -1
  339. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
  340. package/widgets/UtilityNetworkAssociations.js +1 -1
  341. package/widgets/UtilityNetworkTrace.js +1 -1
  342. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  343. package/widgets/ValuePicker.js +1 -1
  344. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  345. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  346. package/widgets/VideoPlayer.js +1 -1
  347. package/widgets/Weather/LabeledSlider.js +1 -1
  348. package/widgets/Weather.js +1 -1
  349. package/widgets/Zoom/IconButton.js +1 -1
  350. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  351. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  352. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  353. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  354. package/widgets/smartMapping/ColorSlider.js +1 -1
  355. package/widgets/smartMapping/HeatmapSlider.js +1 -1
  356. package/widgets/smartMapping/OpacitySlider.js +1 -1
  357. package/widgets/smartMapping/SizeSlider.js +1 -1
  358. package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
  359. package/widgets/support/ColorPicker.js +1 -1
  360. package/widgets/support/DatePicker.js +1 -1
  361. package/widgets/support/Heading.js +1 -1
  362. package/widgets/support/LabeledSwitch.js +1 -1
  363. package/widgets/support/MeasurementWidgetContent.js +1 -1
  364. package/widgets/support/Popover.js +1 -1
  365. package/widgets/support/SelectionToolbar.js +1 -1
  366. package/widgets/support/SketchTooltipControls.js +1 -1
  367. package/widgets/support/SnappingControls.js +1 -1
  368. package/widgets/support/TimePicker.js +1 -1
  369. package/widgets/support/TimezonePicker.js +1 -1
  370. package/widgets/support/UnitSelect.js +1 -1
  371. package/widgets/support/dateUtils.js +1 -1
  372. package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +0 -1
  373. package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
  374. package/assets/esri/core/workers/chunks/114269dda1d296893908.js +0 -1
  375. package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +0 -1
  376. package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
  377. package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +0 -1
  378. package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
  379. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +0 -1
  380. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
  381. package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +0 -1
  382. package/assets/esri/core/workers/chunks/2cb36f9686693234991a.js +0 -1
  383. package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +0 -1
  384. package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +0 -1
  385. package/assets/esri/core/workers/chunks/3619e04cbb6691549014.js +0 -1
  386. package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +0 -1
  387. package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.js +0 -1
  388. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +0 -1
  389. package/assets/esri/core/workers/chunks/4f4a424d1747d04501df.js +0 -1
  390. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +0 -1
  391. package/assets/esri/core/workers/chunks/5a5720caa64a46daadf9.js +0 -1
  392. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +0 -1
  393. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +0 -1
  394. package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +0 -1
  395. package/assets/esri/core/workers/chunks/7a358b1fd0c0cce59e9b.js +0 -1
  396. package/assets/esri/core/workers/chunks/83d1a1b3d371c991cc4c.js +0 -1
  397. package/assets/esri/core/workers/chunks/846b7a81b870c8b238a1.js +0 -1
  398. package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +0 -1
  399. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +0 -1
  400. package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.js +0 -1
  401. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +0 -1
  402. package/assets/esri/core/workers/chunks/c60cf62f374e71e562fc.js +0 -1
  403. package/assets/esri/core/workers/chunks/c6ea5aac232d1eca04dd.js +0 -1
  404. package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.js +0 -1
  405. package/assets/esri/core/workers/chunks/c8f239c25fe864f0e47a.js +0 -1
  406. package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +0 -1
  407. package/assets/esri/core/workers/chunks/d824f4b405a72cd2fa74.js +0 -1
  408. package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.js +0 -1
  409. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +0 -1
  410. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +0 -1
  411. package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +0 -1
  412. package/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +0 -1
  413. package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +0 -1
  414. package/core/watchUtils.d.ts +0 -4
  415. package/core/watchUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3608],{28924:(e,t,i)=>{i.d(t,{Z:()=>s});class s{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,i){this._layerById[t]=i,this._layerByName[e]=i}async featureSetByName(e,t=!0,i=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,i=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}},67651:(e,t,i)=>{i.r(t),i.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>le,constructFeatureSet:()=>ne,constructFeatureSetFromPortalItem:()=>pe,constructFeatureSetFromRelationship:()=>oe,constructFeatureSetFromUrl:()=>re,convertToFeatureSet:()=>fe,createFeatureSetCollectionFromMap:()=>ce,createFeatureSetCollectionFromService:()=>de,initialiseMetaDataCache:()=>ie});var s=i(3172),r=i(28924),n=i(61363),a=i(84328),l=i(38171),o=i(70409),u=i(85065),h=i(59987),c=i(91136),d=i(90961),f=i(3823),p=i(90658),_=i(36515),y=i(95002),g=i(8968);class m{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new m;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i,s){const r=new m;r.field=e;const n=g.WhereClause.create(t,i,s),a=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new h.eS(h.f.MissingStatisticParameters);const t=g.WhereClause.create((0,_.XF)(e.parseTree.args.value[0],p.Bj.Standardised,e.parameters),e.fieldsIndex,e.timeZone);return{name:e.parseTree.name,expr:t}}return null}(n);if(null===a)throw new h.eS(h.f.UnsupportedSqlFunction,{function:""});const l=a.name.toUpperCase().trim();if("MIN"===l){if(r.typeofstat="MIN",r.workingexpr=a.expr,null===n)throw new h.eS(h.f.InvalidFunctionParameters,{function:"min"})}else if("MAX"===l){if(r.typeofstat="MAX",r.workingexpr=a.expr,null===n)throw new h.eS(h.f.InvalidFunctionParameters,{function:"max"})}else if("COUNT"===l)r.typeofstat="COUNT",r.workingexpr=a.expr;else if("STDEV"===l){if(r.typeofstat="STDDEV",r.workingexpr=a.expr,null===n)throw new h.eS(h.f.InvalidFunctionParameters,{function:"stdev"})}else if("SUM"===l){if(r.typeofstat="SUM",r.workingexpr=a.expr,null===n)throw new h.eS(h.f.InvalidFunctionParameters,{function:"sum"})}else if("MEAN"===l){if(r.typeofstat="AVG",r.workingexpr=a.expr,null===n)throw new h.eS(h.f.InvalidFunctionParameters,{function:l})}else if("AVG"===l){if(r.typeofstat="AVG",r.workingexpr=a.expr,null===n)throw new h.eS(h.f.InvalidFunctionParameters,{function:"avg"})}else{if("VAR"!==l)throw new h.eS(h.f.UnsupportedSqlFunction,{function:l});if(r.typeofstat="VAR",r.workingexpr=a.expr,null===n)throw new h.eS(h.f.InvalidFunctionParameters,{function:"var"})}return r}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var w=i(44543),b=i(22641),F=i(41555),S=i(53970),v=i(82971),I=i(1231),C=i(99514);function R(e){if(!e)return"COUNT";switch(e.toLowerCase()){case"max":return"MAX";case"var":case"variance":return"VAR";case"avg":case"average":case"mean":return"AVG";case"min":return"MIN";case"sum":return"SUM";case"stdev":case"stddev":return"STDDEV";case"count":return"COUNT"}return"COUNT"}class D extends c.Z{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return p.dj.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const s=this._parent?this._parent.getFieldsIndex():new C.Z([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const e of this._config.statsfields){const t=new m;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,s,this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC),t.typeofstat=R(e.statistic),this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,s,this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC),sqlType:null};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null}else this.geometryType=p.Qk.point,this.typeIdField="",this.types=null,this.spatialReference=new v.Z({wkid:4326});this.fields=[];const r=new m;r.field=this._nextUniqueName(e),r.tofieldname=this.objectIdField,r.workingexpr=g.WhereClause.create(this._parent.objectIdField,this._parent.getFieldsIndex(),this.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC),r.typeofstat="MIN",this._decodedStatsfield.push(r);for(const t of this._decodedGroupbyfield){const i=new I.Z;if(t.name=this._nextUniqueName(e),i.name=t.tofieldname,i.alias=i.name,(0,_.y5)(t.expression)){const e=this._parent.getField((0,_.zR)(t.expression,p.Bj.Standardised));if(!e)throw new h.EN(h.H9.AggregationFieldNotFound);t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),i.type=e.type,t.sqlType=e.type}else{i.type=this._convertToEsriFieldType((0,_.DT)(t.expression,this._parent.fields));const e=new I.Z;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new o.yN(e,t.expression)),this._candosimplegroupby=!1,t.sqlType=i.type}this.fields.push(i)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new o.$X(e));for(let t=0;t<this._decodedStatsfield.length;t++){const i=new I.Z;let s=null;const r=this._decodedStatsfield[t];r.field=this._nextUniqueName(e),r.tofieldname===this.objectIdField&&(this._internalObjectIdField=r.field),i.name=r.tofieldname,i.alias=i.name;const n=null!==r.workingexpr&&(0,_.y5)(r.workingexpr)?(0,_.zR)(r.workingexpr,p.Bj.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(s=this._parent.getField(n),!s)throw new h.EN(h.H9.AggregationFieldNotFound);i.type=s.type}else i.type="double";break;case"MIN":case"MAX":if(""!==n){if(s=this._parent.getField(n),!s)throw new h.EN(h.H9.AggregationFieldNotFound);i.type=s.type}else i.type="double";break;case"COUNT":i.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(s=this._parent.getField(n),!s))throw new h.EN(h.H9.AggregationFieldNotFound);i.type="double"}this.fields.push(i)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,i,s){-1!==t&&this._featureCache[t];const r=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,r)?(await this._expandPagedSet(e,r,0,0,s),this._getFeatures(e,t,i,s)):"success"}async _getFilteredSet(e,t,i,s,r){if(""!==e)return new d.Z([],[],!0,null);let n=null;const l={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==i)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,_.hq)(i,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,i=null;break}if(null!==s){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===s.scanForField(this._decodedStatsfield[e].tofieldname)){s=null,l.ordered=!1;break}if(null!==s)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===s.scanForField(e.tofieldname)){s=null,l.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;s&&(t=this._reformulateOrderClauseWithoutGroupByFields(s));const a=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(r),n=!0===l.nowhereclause?new d.Z(a._candidates.slice(0).concat(a._known.slice(0)),[],!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)):new d.Z(a._candidates.slice(0),a._known.slice(0),!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)),n}let h=this._parent;if(this._adaptedFields.length>0&&(h=new o.Xx({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new d.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new u.Z({parentfeatureset:h,orderbyclause:new f.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=h;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a.Z({parentfeatureset:e,whereclause:t})}n=new d.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new u.Z({parentfeatureset:e,orderbyclause:new f.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,_.bB)(e,t.tofieldname,(0,_.zR)(t.workingexpr,p.Bj.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,_.bB)(e,t.tofieldname,(0,_.zR)(t.expression,p.Bj.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,i){return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?(await this._expandPagedSet(e,this._maxQuery,0,0,i),this._refineSetBlock(e,t,i)):(this._checkCancelled(i),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,e)}_expandPagedSet(e,t,i,s,r){return this._expandPagedSetFeatureSet(e,t,i,s,r)}async _getPhysicalPage(e,t,i){if(!0===e.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,i,[]);const s=await this._getAgregagtePhysicalPage(e,t,i);for(const e of s){const t={geometry:e.geometry,attributes:{}},i={};for(const t in e.attributes)i[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=i[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=i[e.field.toLowerCase()];this._featureCache[t.attributes[this.objectIdField]]=new l.Z(t)}return s.length}_sequentialGetPhysicalItem(e,t,i,s){return new Promise(((r,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?r(s.length):this._nextAggregateItem(e,t,i,s,(n=>{null===n?r(s.length):(t-=1,r(this._sequentialGetPhysicalItem(e,t,i,s)))}),n)}))}_nextAggregateItem(e,t,i,s,r,a){try{(0,n.a1)(e.pagesDefinition.internal.iterator.next()).then((n=>{if(null===n)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);s.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,r(null)}else e.pagesDefinition.internal.fullyResolved=!0,r(null);else{const l=this._generateAggregateHash(n);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[n],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const i=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return s.push(i),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(i.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[n],id:l},void r(i)}e.pagesDefinition.internal.workingItem.features.push(n)}this._nextAggregateItem(e,t,i,s,r,a)}}),a)}catch(e){a(e)}}_calculateFieldStat(e,t,i){const s=[];for(let i=0;i<e.features.length;i++)if(null!==t.workingexpr){const r=t.workingexpr.calculateValue(e.features[i]);null!==r&&(r instanceof b.u||r instanceof S.n?s.push(r.toNumber()):r instanceof F.H?s.push(r.toMilliseconds()):s.push(r))}else s.push(null);switch(t.typeofstat){case"MIN":i.attributes[t.tofieldname]=(0,y.tj)("min",s,-1);break;case"MAX":i.attributes[t.tofieldname]=(0,y.tj)("max",s,-1);break;case"SUM":i.attributes[t.tofieldname]=(0,y.tj)("sum",s,-1);break;case"COUNT":i.attributes[t.tofieldname]=s.length;break;case"VAR":i.attributes[t.tofieldname]=(0,y.tj)("var",s,-1);break;case"STDDEV":i.attributes[t.tofieldname]=(0,y.tj)("stddev",s,-1);break;case"AVG":i.attributes[t.tofieldname]=(0,y.tj)("avg",s,-1)}return!0}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const i of this._decodedGroupbyfield){const s=i.singlefield?e.features[0].attributes[i.singlefield]:g.WhereClause.convertValueToStorageFormat(i.expression.calculateValue(e.features[0]),i.sqlType);t.attributes[i.tofieldname]=s}for(const i of this._decodedStatsfield)this._calculateFieldStat(e,i,t);const i=[];for(let s=0;s<this._decodedStatsfield.length;s++)i.push(this._calculateFieldStat(e,this._decodedStatsfield[s],t));return this._featureCache[t.attributes[this.objectIdField]]=new l.Z({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const s=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==s?":":":"+s.toString()}return(0,w.F)(t,w.M.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){c.Z._featuresetFunctions.groupby=function(e,t){return new D({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var T=i(53073),x=i(63991),k=i(40330),E=i(80692),N=i(33586),A=i(33955),O=i(8744),L=i(19238),P=i(20697),j=i(20102),Z=i(80442),G=i(95330),M=i(2981),B=i(10158),q=i(4967),U=i(53261),W=i(74889),V=i(14165);function z(e,t){return null!=t&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}i(68773),i(67676),i(17452),i(98326),i(56545);var Q=i(41818),J=(i(66577),i(16306),i(45091),i(67900),i(2109),i(5396)),H=(i(98732),i(75935)),K=(i(28141),i(58539));class $ extends c.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._cachedDateMetaData={},e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return p.tI}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,p.hd)(e.toJSON());return(0,w.F)(t,w.M.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const s of this._overrideFields)if(s.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=p.Bj.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=p.Bj.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=p.Bj.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=p.Bj.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._layer instanceof P.default?(this.typeIdField=this._layer.subtypeField??"",this.types=this._layer.subtypes):(this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types)}_isInFeatureSet(){return p.dj.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new V.Z;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}pbfSupportedForQuery(e){const t=this._layer?.capabilities?.query;return!e.outStatistics&&!0===t?.supportsFormatPBF&&!0===t?.supportsQuantizationEditMode}async queryPBF(e){return e.quantizationParameters={mode:"edit"},(await async function(e,t,s,r){return async function(e,t,s,r){const n=s?.infoFor3D;if(!(z(e,n)&&null!=n&&t.assetMaps&&t.features&&t.features.length))return W.Z.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,G.Hl)(Promise.all([i.e(6481),i.e(6170),i.e(6459),i.e(5613)]).then(i.bind(i,25158)),r);return a(e,n,t)}(t,await async function(e,t,i,s){const r={...s},n=function(e,t){let i=V.Z.from(e);i.sourceSpatialReference=i.sourceSpatialReference??t?.sourceSpatialReference??null,(t?.gdbVersion||t?.dynamicDataSource)&&(i=i===e?i.clone():i,i.gdbVersion=e.gdbVersion||t.gdbVersion,i.dynamicDataSource=e.dynamicDataSource?B.n.from(e.dynamicDataSource):t.dynamicDataSource);const s=t?.infoFor3D;if(null!=s&&z(e,s)){i=i===e?i.clone():i,i.formatOf3DObjects=null;const{supportedFormats:t,queryFormats:r}=s,n=(0,M.S0)("model/gltf-binary",t)??(0,M.Ow)("glb",t),a=(0,M.S0)("model/gltf+json",t)??(0,M.Ow)("gtlf",t);for(const e of r){if(e===n){i.formatOf3DObjects=e;break}e!==a||i.formatOf3DObjects||(i.formatOf3DObjects=e)}if(!i.formatOf3DObjects)throw new j.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==i.outFields||!i.outFields.includes("*")){i=i===e?i.clone():i,null==i.outFields&&(i.outFields=[]);const{originX:t,originY:r,originZ:n,translationX:a,translationY:l,translationZ:o,scaleX:u,scaleY:h,scaleZ:c,rotationX:d,rotationY:f,rotationZ:p,rotationDeg:_}=s.transformFieldRoles;i.outFields.push(t,r,n,a,l,o,u,h,c,d,f,p,_)}}return i}(t,i),a=null!=t.outStatistics?.[0],l=(0,Z.Z)("featurelayer-pbf-statistics"),o=!a||l;let u;if("pbf"===i?.format&&o)try{u=await(0,U.t)(e,n,r)}catch(e){if("query:parsing-pbf"!==e.name)throw e;i.format="json"}return"json"!==i?.format&&o||(u=await(0,q.F)(e,n,r)),function(e,t){if(null!=e&&null!=t)for(const i of t){const t=e.get(i.name);t&&Object.assign(i,t.toJSON())}}(i?.fieldsIndex,u.fields),u}(e,t,s,r),s,r)}(this._layer.parsedUrl,e,{format:"pbf"},{})).unquantize()}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}executeQuery(e,t){e.returnZ=this.hasZ,e.returnM=this.hasM;const i="execute"===t?q.e:"executeForCount"===t?Q.P:J.G,s="execute"===t&&this.pbfSupportedForQuery(e);let r=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);r=this.recentlyUsedQueries.getFromCache(t),null===r&&(r=!0!==s?i(this._layer.parsedUrl.path,e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(t,r),r=r.catch((e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===r&&(r=!0!==s?i(this._layer.parsedUrl.path,e):this.queryPBF(e)),r}async _getFilteredSet(e,t,i,s,r){const n=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e)return new d.Z([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,s,r);let a="",l=!1;null!==s&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=s.constructClause(),l=!0);const o=new V.Z;this.datesInUnknownTimezone&&(o.timeReferenceUnknownClient=!0),o.where=null===i?null===t?"1=1":"":(0,_.zR)(i,n),this._requestStandardised&&(o.sqlFormat="standard"),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e);let u=await this.executeQuery(o,"executeForIds");return null===u&&(u=[]),this._checkCancelled(r),new d.Z([],u,l,null)}_expandPagedSet(e,t,i,s,r){return this._expandPagedSetFeatureSet(e,t,i,s,r)}async _getFilteredSetUsingPaging(e,t,i,s,r){let n="",a=!1;null!==s&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=s.constructClause(),a=!0);const l=await this.databaseType();let o=null===i?null===t?"1=1":"":(0,_.zR)(i,l);this._layer.definitionExpression&&this._useDefinitionExpression&&(o=""!==o?"(("+this._layer.definitionExpression+") AND ("+o+"))":this._layer.definitionExpression);let u=this._maxQueryRate();const h=this._layer.capabilities?.query.maxRecordCount;null!=h&&h<u&&(u=h);let c=null;if(!0===this._pageJustIds)c=new d.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const s=this._overrideFields??this._fieldsIncludingObjectId(["*"]);c=new d.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:s.join(","),resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(c,u,0,1,r),c}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const s=e.pagesDefinition.internal.lastRetrieved,r=s,n=e.pagesDefinition.internal.lastPage,a=new V.Z;this._requestStandardised&&(a.sqlFormat="standard"),this.datesInUnknownTimezone&&(a.timeReferenceUnknownClient=!0),a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields.split(","),a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.geometry=e.pagesDefinition.geometry,a.where=e.pagesDefinition.where,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==n)return"done";const o=this._layer.objectIdField;for(let t=0;t<l.features.length;t++)e.pagesDefinition.internal.set[r+t]=l.features[t].attributes[o];if(!1===this._pageJustIds)for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=s+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFeatures(e,t,i,s){const r=[];if(-1!==t&&void 0===this._featureCache[t]&&r.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,s),this._getFeatures(e,t,i,s);let n=0;for(let s=e._lastFetchedIndex;s<e._known.length;s++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[s]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[s]]){const r=t._featureMap[e._known[s]];null!==r&&(i=!0,this._featureCache[e._known[s]]=r)}}if(!1===i&&(e._known[s]!==t&&r.push(e._known[s]),r.length>=this._maxProcessingRate()-1))break}if(n>=i&&0===r.length)break}if(0===r.length)return"success";const a=new V.Z;this._requestStandardised&&(a.sqlFormat="standard"),this.datesInUnknownTimezone&&(a.timeReferenceUnknownClient=!0),a.objectIds=r,a.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),a.returnGeometry=!0,!0===this._removeGeometry&&(a.returnGeometry=!1),a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(s),void 0!==l.error)throw new h.EN(h.H9.RequestFailed,{reason:l.error});const o=this._layer.objectIdField;for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return"success"}async _getDistinctPages(e,t,i,s,r,n,a,l,o){await this._ensureLoaded();const u=await this.databaseType();let c=i.parseTree.column;const d=this._layer.fields??[];for(let e=0;e<d.length;e++)if(d[e].name.toLowerCase()===c.toLowerCase()){c=d[e].name;break}const f=new V.Z;this._requestStandardised&&(f.sqlFormat="standard"),this.datesInUnknownTimezone&&(f.timeReferenceUnknownClient=!0);let p=null===n?null===r?"1=1":"":(0,_.zR)(n,u);this._layer.definitionExpression&&this._useDefinitionExpression&&(p=""!==p?"(("+this._layer.definitionExpression+") AND ("+p+"))":this._layer.definitionExpression),f.where=p,f.spatialRelationship=this._makeRelationshipEnum(s),f.relationParameter=this._makeRelationshipParam(s),f.geometry=null===r?null:r,f.returnDistinctValues=!0,f.returnGeometry=!1,f.outFields=[c];const y=await this.executeQuery(f,"execute");if(this._checkCancelled(o),!y.hasOwnProperty("features"))throw new h.EN(h.H9.InvalidStatResponse);let g=!1;for(let e=0;e<d.length;e++)if(d[e].name===c){"date"===d[e].type&&(g=!0);break}for(let e=0;e<y.features.length;e++){if(g){const t=y.features[e].attributes[c];null!==t?l.push(new Date(t)):l.push(t)}else l.push(y.features[e].attributes[c]);if(l.length>=a)break}return 0===y.features.length?l:y.features.length===this._layer.capabilities?.query.maxRecordCount&&l.length<a?{calculated:!0,result:await this._getDistinctPages(e+y.features.length,t,i,s,r,n,a,l,o)}:l}async _distinctStat(e,t,i,s,r,n,a){return{calculated:!0,result:await this._getDistinctPages(0,e,t,i,s,r,n,[],a)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,i,s){const r=await this.databaseType(),n=new V.Z;if(this._requestStandardised&&(n.sqlFormat="standard"),this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};let a=null===s?null===i?"1=1":"":(0,_.zR)(s,r);return this._layer.definitionExpression&&this._useDefinitionExpression&&(a=""!==a?"(("+this._layer.definitionExpression+") AND ("+a+"))":this._layer.definitionExpression),n.where=a,this.datesInUnknownTimezone&&(n.timeReferenceUnknownClient=!0),n.where=a,n.spatialRelationship=this._makeRelationshipEnum(t),n.relationParameter=this._makeRelationshipParam(t),n.geometry=null===i?null:i,n.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(n,"executeForCount")}}async _stats(e,t,i,s,r,n,a){await this._ensureLoaded();const l=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression,o=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics,u=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsDistinct;if("count"===e)return u?this._countstat(e,i,s,r):{calculated:!1};if(!1===o||!1===(0,_.y5)(t)&&!1===l||!1===t.isStandardized)return""!==i||null!==r?{calculated:!1}:this._manualStat(e,t,n,a);if("distinct"===e)return!1===u?""!==i||null!==r?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,i,s,r,n,a);const c=await this.databaseType();if(this.isTable()&&s&&null!==i&&""!==i)return{calculated:!0,result:null};const d=new V.Z;this._requestStandardised&&(d.sqlFormat="standard");let f=null===r?null===s?"1=1":"":(0,_.zR)(r,c);this._layer.definitionExpression&&this._useDefinitionExpression&&(f=""!==f?"(("+this._layer.definitionExpression+") AND ("+f+"))":this._layer.definitionExpression),d.where=f,d.spatialRelationship=this._makeRelationshipEnum(i),d.relationParameter=this._makeRelationshipParam(i),d.geometry=null===s?null:s,this.datesInUnknownTimezone&&(d.timeReferenceUnknownClient=!0);const p=new K.Z;p.statisticType=(0,y.g3)(e),p.onStatisticField=(0,_.zR)(t,c),p.outStatisticFieldName="ARCADE_STAT_RESULT",d.returnGeometry=!1;let g="ARCADE_STAT_RESULT";d.outStatistics=[p];const m=await this.executeQuery(d,"execute");if(!m.hasOwnProperty("features")||0===m.features.length)throw new h.EN(h.H9.InvalidStatResponse);let w=!1;const b=m.fields??[];for(let e=0;e<b.length;e++)if("ARCADE_STAT_RESULT"===b[e].name.toUpperCase()){g=b[e].name,"date"===b[e].type&&(w=!0);break}if(w){let e=m.features[0].attributes[g];return null!==e&&(e=new Date(m.features[0].attributes[g])),{calculated:!0,result:e}}return{calculated:!0,result:m.features[0].attributes[g]}}_stat(e,t,i,s,r,n,a){return this._stats(e,t,i,s,r,n,a)}async _canDoAggregates(e,t){await this._ensureLoaded();let i=!1;const s=this._layer.capabilities?.query,r=!0===s?.supportsSqlExpression;if(null!=s&&!0===s.supportsStatistics&&!0===s.supportsOrderBy&&(i=!0),i)for(let e=0;e<t.length-1;e++)(!1===t[e].workingexpr?.isStandardized||!1===(0,_.y5)(t[e].workingexpr)&&!1===r)&&(i=!1);return!1!==i}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,i,s,r,n,a){await this._ensureLoaded();const l=await this.databaseType();let o="",u=!1,h=!1;null!==n&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(o=n.constructClause(),h=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(h=!1,u=!0,o=this._layer.objectIdField);const c=[];for(let e=0;e<t.length;e++){const i=new K.Z;i.onStatisticField=null!==t[e].workingexpr?(0,_.zR)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),c.push(i)}""===o&&(o=e.join(","));let f=this._maxQueryRate();const p=this._layer.capabilities?.query.maxRecordCount;null!=p&&p<f&&(f=p);let y=null===r?null===s?"1=1":"":(0,_.zR)(r,l);return this._layer.definitionExpression&&this._useDefinitionExpression&&(y=""!==y?"(("+this._layer.definitionExpression+") AND ("+y+"))":this._layer.definitionExpression),new d.Z([],["GETPAGES"],h,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:u,generatedOid:a,resultRecordCount:f,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:c,geometry:null===s?null:s,where:y,orderByFields:o,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}async _getAgregagtePhysicalPage(e,t,i){let s=e.pagesDefinition.where;!0===e.pagesDefinition.useOIDpagination&&(s=""!==s?"("+s+") AND ("+e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString()+")":e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString());const r=e.pagesDefinition.internal.lastRetrieved,n=r,a=e.pagesDefinition.internal.lastPage,o=new V.Z;if(this._requestStandardised&&(o.sqlFormat="standard"),o.where=s,o.spatialRelationship=e.pagesDefinition.spatialRel,o.relationParameter=e.pagesDefinition.relationParam,o.outFields=e.pagesDefinition.outFields,o.outStatistics=e.pagesDefinition.outStatistics,o.geometry=e.pagesDefinition.geometry,o.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,o.num=e.pagesDefinition.resultRecordCount,o.start=e.pagesDefinition.internal.lastPage,o.returnGeometry=e.pagesDefinition.returnGeometry,this.datesInUnknownTimezone&&(o.timeReferenceUnknownClient=!0),o.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(i),!u.hasOwnProperty("features"))throw new h.EN(h.H9.InvalidStatResponse);const c=[];if(e.pagesDefinition.internal.lastPage!==a)return[];u.features.length>0&&void 0===u.features[0].attributes[e.pagesDefinition.generatedOid]&&(e.pagesDefinition.generatedOid=e.pagesDefinition.generatedOid.toLowerCase());for(let t=0;t<u.features.length;t++)e.pagesDefinition.internal.set[n+t]=u.features[t].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<u.features.length;e++)c.push(new l.Z({attributes:u.features[e].attributes,geometry:null}));return!0===e.pagesDefinition.useOIDpagination?0===u.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==e.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+u.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,c}static create(e,t,i,s,r){const n=new L.default({url:e,outFields:null===t?["*"]:t});return new $({layer:n,spatialReference:i,lrucache:s,interceptor:r})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON&&this._layer.source.sourceJSON.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,p.US)(this._layer.parsedUrl.path)}async queryAttachments(e,t,i,s,r){const n=this._layer.capabilities;if(n?.data.supportsAttachment&&n?.operations.supportsQueryAttachments){const n={objectIds:[e],returnMetadata:r};(t&&t>0||i&&i>0)&&(n.size=[t&&t>0?t:0,i&&i>0?i:t+1]),s&&s.length>0&&(n.attachmentTypes=s),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:n,method:"attachments"});const a=await this._layer.queryAttachments(n),l=[];return a&&a[e]&&a[e].forEach((t=>{const i=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let s=null;r&&t.exifInfo&&(s=N.Z.convertJsonToArcade(t.exifInfo,"system",!0)),l.push(new E.Z(t.id,t.name,t.contentType,t.size,i,s,t.keywords??null))})),l}return[]}async queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields?.join(","),returnGeometry:e.returnGeometry.toString()};void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds&&e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=(0,O.B9)(e.outSpatialReference)),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const i=await(0,s.Z)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(i.data){const e={},t=i.data;if(t&&t.relatedRecordGroups){const i=t.spatialReference;for(const s of t.relatedRecordGroups){const r=s.objectId,n=[];for(const e of s.relatedRecords){e.geometry&&(e.geometry.spatialReference=i);const t=new l.Z({geometry:e.geometry?(0,A.im)(e.geometry):null,attributes:e.attributes});n.push(t)}e[r]={features:n,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new h.EN(h.H9.InvalidRequest)}async getFeatureByObjectId(e,t){const i=new V.Z;i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=this.objectIdField+"="+e.toString(),this.datesInUnknownTimezone&&(i.timeReferenceUnknownClient=!0),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const s=await(0,q.e)(this._layer.parsedUrl.path,i);return 1===s.features.length?s.features[0]:null}async getIdentityUser(){await this.load();const e=k.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=k.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const i=t.toLowerCase().indexOf("/rest/services");if(t=i>-1?t.substring(0,i):t,t){t+="/rest/info";try{const e=await(0,s.Z)(t,{query:{f:"json"}});let i="";return e.data&&e.data.owningSystemUrl&&(i=e.data.owningSystemUrl),i}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new $({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeReference(){return void 0===this._cachedDateMetaData.preferredTimeReference&&(this._cachedDateMetaData.preferredTimeReference=this._layer?.preferredTimeReference?.toJSON()??null),this._cachedDateMetaData.preferredTimeReference}get dateFieldsTimeReference(){return void 0===this._cachedDateMetaData.dateFieldsTimeReference&&(this._cachedDateMetaData.dateFieldsTimeReference=this._layer?.dateFieldsTimeReference?.toJSON()??null),this._cachedDateMetaData.dateFieldsTimeReference}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone}get editFieldsInfo(){return void 0===this._cachedDateMetaData.editFieldsInfo&&(this._cachedDateMetaData.editFieldsInfo=this._layer?.editFieldsInfo?.toJSON()??null),this._cachedDateMetaData.editFieldsInfo}get timeInfo(){return void 0===this._cachedDateMetaData.timeInfo&&(this._cachedDateMetaData.timeInfo=this._layer?.timeInfo?.toJSON()??null),this._cachedDateMetaData.timeInfo}}var X=i(17805);class Y extends c.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return p.tI}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(0),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const s of this._overrideFields)if(s.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}_isInFeatureSet(){return p.dj.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new l.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,s,r){if(await this.databaseType(),this.isTable()&&t&&null!==e&&""!==e)return new d.Z([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new d.Z([],[],!0,null);if(n.capabilities?.queryRelated&&n.capabilities.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,s,r);let a="",l=!1;null!==s&&n.capabilities&&n.capabilities.queryRelated&&!0===n.capabilities.queryRelated.supportsOrderBy&&(a=s.constructClause(),l=!0);const o=new H.default;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let h=!0;!0===this._removeGeometry&&(h=!1),o.returnGeometry=h,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null;const c=await n.source.queryRelatedFeatures(o);this._checkCancelled(r);const f=c[this._findObjectId]?c[this._findObjectId].features:[],p=[];for(let e=0;e<f.length;e++)this._featureCache[f[e].attributes[this._relatedLayer.objectIdField]]=f[e],p.push(f[e].attributes[this._relatedLayer.objectIdField]);const _=t&&null!==e&&""!==e,y=null!=i;return new d.Z(_||y?p:[],_||y?[]:p,l,null)}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFilteredSetUsingPaging(e,t,i,s,r){let n="",a=!1;const l=this._layer.nativeCapabilities();null!==s&&l&&l.capabilities?.queryRelated&&!0===l.capabilities.queryRelated.supportsOrderBy&&(n=s.constructClause(),a=!0),await this.databaseType();let o=this._maxQueryRate();const u=l.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const h=t&&null!==e&&""!==e,c=null!=i;let f=null,p=!0;!0===this._removeGeometry&&(p=!1);const _=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);return f=new d.Z(h||c?["GETPAGES"]:[],h||c?[]:["GETPAGES"],a,{outFields:_.join(","),resultRecordCount:o,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(f,o,0,0,r),f}_expandPagedSet(e,t,i,s,r){return this._expandPagedSetFeatureSet(e,t,i,s,r)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const s=e.pagesDefinition.internal.lastRetrieved,r=s,n=e.pagesDefinition.internal.lastPage,a=this._layer.nativeCapabilities(),l=new H.default;!0===this._requestStandardised&&(l.sqlFormat="standard"),l.relationshipId=this.relationship.id,l.objectIds=e.pagesDefinition.objectIds,l.resultOffset=e.pagesDefinition.internal.lastPage,l.resultRecordCount=e.pagesDefinition.resultRecordCount,l.outFields=e.pagesDefinition.outFields.split(","),l.where=e.pagesDefinition.where,l.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,l.returnGeometry=e.pagesDefinition.returnGeometry,l.outSpatialReference=this.spatialReference;const o=await a.source.queryRelatedFeatures(l);if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==n)return 0;const u=o[this._findObjectId]?o[this._findObjectId].features:[];for(let t=0;t<u.length;t++)e.pagesDefinition.internal.set[r+t]=u[t].attributes[this._relatedLayer.objectIdField];for(let e=0;e<u.length;e++)this._featureCache[u[e].attributes[this._relatedLayer.objectIdField]]=u[e];const h=!o[this._findObjectId]||!1===o[this._findObjectId].exceededTransferLimit;return u.length!==e.pagesDefinition.resultRecordCount&&h&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=s+u.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,u.length}async _getFeatures(e,t,i,s){const r=[];-1!==t&&void 0===this._featureCache[t]&&r.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return await this._expandPagedSet(e,n,0,0,s),this._getFeatures(e,t,i,s);let a=0;for(let s=e._lastFetchedIndex;s<e._known.length&&(a++,a<=i&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[s]&&void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&r.push(e._known[s]),r.length>i)))&&!(a>=i&&0===r.length);s++);if(0===r.length)return"success";throw new h.EN(h.H9.MissingFeatures)}async _refineSetBlock(e,t,i){return e}async _stat(e,t,i,s,r,n,a){return{calculated:!1}}get gdbVersion(){return this._relatedLayer.gdbVersion}async _canDoAggregates(e,t,i,s,r){return!1}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,i,s,r){return this._relatedLayer.queryAttachments(e,t,i,s,r)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeReference(){return this._relatedLayer?.preferredTimeReference??null}get dateFieldsTimeReference(){return this._relatedLayer?.dateFieldsTimeReference??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}}var ee=i(48039),te=i(15235);function ie(){null===ee.Z.applicationCache&&(ee.Z.applicationCache=new ee.Z)}async function se(e,t){if(ee.Z.applicationCache){const i=ee.Z.applicationCache.getLayerInfo(e);if(i){const s=await i;return new L.default({url:e,outFields:t,sourceJSON:s})}const s=new L.default({url:e,outFields:t}),r=(async()=>(await s.load(),s.sourceJSON))();if(ee.Z.applicationCache){ee.Z.applicationCache.setLayerInfo(e,r);try{return await r,s}catch(t){throw ee.Z.applicationCache.clearLayerInfo(e),t}}return await r,s}return new L.default({url:e,outFields:t})}async function re(e,t,i,s,r,n=null){return ne(await se(e,["*"]),t,i,s,r,n)}function ne(e,t=null,i=null,s=!0,r=null,a=null){if(e instanceof L.default||(0,n.$)(e)){const n={layer:e,spatialReference:t,outFields:i,includeGeometry:s,lrucache:r,interceptor:a};return 1==!(e.url||!e.source)?new X.Z(n):new $(n)}const l=ne(e.parent,t,i,s,r,a);return l.filter(g.WhereClause.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),e.parent?.fieldsIndex,l.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC))}async function ae(e){if(null!==ee.Z.applicationCache){const t=ee.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,s.Z)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==ee.Z.applicationCache){ee.Z.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw ee.Z.applicationCache.clearLayerInfo(e),t}}return t}async function le(e,t){const i={metadata:null,networkId:-1,unVersion:3,terminals:[],queryelem:null,layerNameLkp:{},lkp:null},r=await ae(e);if(i.metadata=r,r.controllerDatasetLayers&&void 0!==r.controllerDatasetLayers.utilityNetworkLayerId&&null!==r.controllerDatasetLayers.utilityNetworkLayerId){if(r.layers)for(const e of r.layers)i.layerNameLkp[e.id]=e.name;if(r.tables)for(const e of r.tables)i.layerNameLkp[e.id]=e.name;const n=r.controllerDatasetLayers.utilityNetworkLayerId;i.networkId=n;const a=await async function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==ee.Z.applicationCache){const e=ee.Z.applicationCache.getLayerInfo(i);if(null!==e)return e}const r=(async()=>{const i=await(0,s.Z)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(i.data){const e=i.data;if(e.layerDataElements&&e.layerDataElements[0])return e.layerDataElements[0]}throw new h.EN(h.H9.DataElementsNotFound)})();if(null!==ee.Z.applicationCache){ee.Z.applicationCache.setLayerInfo(i,r);try{return await r}catch(e){throw ee.Z.applicationCache.clearLayerInfo(i),e}}return r}(e,n);if(a){i.queryelem=a,i.queryelem&&i.queryelem.dataElement&&void 0!==i.queryelem.dataElement.schemaGeneration&&(i.unVersion=i.queryelem.dataElement.schemaGeneration),i.lkp={},i.queryelem.dataElement.domainNetworks||(i.queryelem.dataElement.domainNetworks=[]);for(const e of i.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};e.className&&(i.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};e.className&&(i.lkp[e.className]=e)}}if(i.queryelem.dataElement.terminalConfigurations)for(const e of i.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)i.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const r=await async function(e){if(null!==ee.Z.applicationCache){const t=ee.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,s.Z)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==ee.Z.applicationCache){ee.Z.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw ee.Z.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+n);if(r.systemLayers&&void 0!==r.systemLayers.associationsTableId&&null!==r.systemLayers.associationsTableId){const s=[];i.unVersion>=4&&(s.push("STATUS"),s.push("PERCENTALONG"));let n=await re(e+"/"+r.systemLayers.associationsTableId.toString(),t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...s],!1,null,null);return await n.load(),i.unVersion>=4&&(n=n.filter(g.WhereClause.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",n.getFieldsIndex(),n.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC)),await n.load()),{lkp:i.lkp,associations:n,unVersion:i.unVersion,terminals:i.terminals}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}async function oe(e,t,i,s=null,r=null,n=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await re(o,s,r,n,a,l);return new Y({layer:e,relatedLayer:u,relationship:t,objectId:i,spatialReference:s,outFields:r,includeGeometry:n,lrucache:a,interceptor:l})}a.Z.registerAction(),D.registerAction(),u.Z.registerAction(),T.Z.registerAction(),x.Z.registerAction();class ue extends r.Z{constructor(e,t=null,i=null,s=null){super(),this._map=e,this._overridespref=t,this._lrucache=i,this._interceptor=s,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const s=ne(e,this._overridespref,null===i?["*"]:i,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:s,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),s}async featureSetByName(e,t=!0,i=null){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,i);null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const s=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const r=this._instantLayers[i];if(r.opitem.title===e&&r.includeGeometry===t&&r.outFields===s)return this._instantLayers[i].featureset}const r=[],a=this._map.allLayers.find((t=>{if(t instanceof L.default){if(t.title===e)return!0}else if((0,n.$)(t)){if(t.title===e)return!0;r.push(t)}return!1}));if(a)return this._makeAndAddFeatureSet(a,t,i);if(this._map.tables){const s=this._map.tables.find((t=>!!(t.title&&t.title===e||t.title&&t.title===e)));if(s){if(s instanceof L.default)return this._makeAndAddFeatureSet(s,t,i);if(s._materializedTable);else{const e=s.outFields?s:{...s,outFields:["*"]};s._materializedTable=new L.default(e)}return await s._materializedTable.load(),this._makeAndAddFeatureSet(s._materializedTable,t,i)}}for(const s of r){if("not-loaded"===s.loadStatus||"loading"===s.loadStatus)try{await s.load()}catch(e){}const r=s.sublayers.find((t=>t.title===e));if(r)return this._makeAndAddFeatureSet(r,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return await this._map.load(),this.featureSetById(e,t,i);null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const s=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const r=this._instantLayers[i];if(r.opitem.id===e&&r.includeGeometry===t&&r.outFields===s)return this._instantLayers[i].featureset}const r=[],a=this._map.allLayers.find((t=>{if(t instanceof L.default){if(t.id===e)return!0}else if((0,n.$)(t)){if(t.id===e)return!0;r.push(t)}return!1}));if(a)return this._makeAndAddFeatureSet(a,t,i);if(this._map.tables){const s=this._map.tables.find((t=>t.id===e));if(s){if(s instanceof L.default)return this._makeAndAddFeatureSet(s,t,i);if(s._materializedTable);else{const e={...s,outFields:["*"]};s._materializedTable=new L.default(e)}return await s._materializedTable.load(),this._makeAndAddFeatureSet(s._materializedTable,t,i)}}for(const s of r){if("not-loaded"===s.loadStatus||"loading"===s.loadStatus)try{await s.load()}catch(e){}const r=s.sublayers.find((t=>t.id===e));if(r)return this._makeAndAddFeatureSet(r,t,i)}return null}}class he extends r.Z{constructor(e,t=null,i=null,s=null){super(),this._url=e,this._overridespref=t,this._lrucache=i,this._interceptor=s,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,i=null){const s=ne(e,this._overridespref,null===i?["*"]:i,t,this._lrucache);return this._instantLayers.push({featureset:s,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),s}async _loadMetaData(){const e=await ae(this._url);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new he(this._url,this._overridespref,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,i=null){null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const s=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const r=this._instantLayers[i];if(r.opitem.title===e&&r.includeGeometry===t&&r.outFields===s)return this._instantLayers[i].featureset}const r=await this._loadMetaData();let n=null;for(const t of r.layers??[])t.name===e&&(n=t);if(!n)for(const t of r.tables??[])t.name===e&&(n=t);if(n){const e=await se(this._url+"/"+n.id,["*"]);return this._makeAndAddFeatureSet(e,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const s=JSON.stringify(i);e=null!=e?e.toString():"";for(let i=0;i<this._instantLayers.length;i++){const r=this._instantLayers[i];if(r.opitem.id===e&&r.includeGeometry===t&&r.outFields===s)return this._instantLayers[i].featureset}const r=await this._loadMetaData();let n=null;for(const t of r.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(!n)for(const t of r.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(n){const e=await se(this._url+"/"+n.id,["*"]);return this._makeAndAddFeatureSet(e,t,i)}return null}}function ce(e,t,i=null,s=null){return new ue(e,t,i,s)}function de(e,t,i=null,s=null){return new he(e,t,i,s)}function fe(e,t,i,s,r){if(null===e)return null;if(e instanceof L.default){switch(t){case"datasource":return ne(e,r,e.outFields,!0,i,s).getDataSourceFeatureSet();case"parent":case"root":return ne(e,r,e.outFields,!0,i,s)}return null}if((0,n.$)(e)){switch(t){case"datasource":return ne(e,r,e.outFields,!0,i,s).getDataSourceFeatureSet();case"parent":case"root":return ne(e,r,e.outFields,!0,i,s)}return null}if((0,n.a0)(e)){switch(t){case"datasource":return ne(e.parent,r,e.parent.outFields,!0,i,s).getDataSourceFeatureSet();case"parent":case"root":return ne(e,r,e.parent.outFields,!0,i,s)}return null}if(e instanceof c.Z)switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}async function pe(e,t,i,s,r,n,a,l=null){if(ee.Z.applicationCache){const o=ee.Z.applicationCache.getLayerInfo(e+":"+n.url);if(o){const e=await o;return ne(new L.default({url:(0,p.US)(e.url)+"/"+t,outFields:["*"]}),i,s,r,a,l)}}const o=new te.default({id:e,portal:n}).load();ee.Z.applicationCache&&ee.Z.applicationCache.setLayerInfo(e+":"+n.url,o);try{const e=await o;return ne(new L.default({url:(0,p.US)(e.url??"")+"/"+t,outFields:["*"]}),i,s,r,a,l)}catch(t){throw ee.Z.applicationCache&&ee.Z.applicationCache.clearLayerInfo(e+":"+n.url),t}}},70409:(e,t,i)=>{i.d(t,{$X:()=>_,QP:()=>y,TO:()=>g,Xx:()=>w,yN:()=>m});var s=i(38171),r=i(48853),n=i(77286),a=i(59987),l=i(91136),o=i(90961),u=i(90658),h=i(36515),c=i(70586),d=i(8968),f=i(82971);class p{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class _ extends p{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class y extends p{constructor(e,t,i){super((0,u.JW)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=i}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,h.bB)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class g extends p{constructor(e,t,i){super(e),this.codefield=t,this.lkp=i,this.reverseLkp={};for(const e in i)this.reverseLkp[i[e]]=e;this.sqlRewritable=!0}rewriteSql(e,t){const i=this.evaluateNodeToWhereClause(e.parseTree,u.Bj.Standardised,this.field.name,this.codefield instanceof d.WhereClause?(0,h.zR)(this.codefield,u.Bj.Standardised):this.codefield,e.parameters);return i.includes(g.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:d.WhereClause.create(i,t._parent.getFieldsIndex(),t.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC)}}evaluateNodeToWhereClause(e,t,i=null,s=null,n){let l,o,u,c;switch(e.type){case"interval":return(0,h.TE)(this.evaluateNodeToWhereClause(e.value,t,i,s,n),e.qualifier,e.op);case"case-expression":{let s=" CASE ";"simple"===e.format&&(s+=this.evaluateNodeToWhereClause(e.operand,t,i,g.BADNESS,n));for(let r=0;r<e.clauses.length;r++)s+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[r].operand,t,i,g.BADNESS,n)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[r].value,t,i,g.BADNESS,n);return null!==e.else&&(s+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,i,g.BADNESS,n)),s+=" END ",s}case"parameter":{const i=n[e.value.toLowerCase()];if("string"==typeof i)return"'"+i.toString().replaceAll("'","''")+"'";if(i instanceof Date)return(0,h.oX)(i,t,null);if(i instanceof r.iG)return(0,h.mA)(i,t,null);if(i instanceof Array){const e=[];for(let s=0;s<i.length;s++)"string"==typeof i[s]?e.push("'"+i[s].toString().replaceAll("'","''")+"'"):i[s]instanceof Date?e.push((0,h.oX)(i[s],t,null)):i[s]instanceof r.iG?e.push((0,h.mA)(i[s],t,null)):e.push(i[s].toString());return e}return i.toString()}case"expression-list":o=[];for(const r of e.value)o.push(this.evaluateNodeToWhereClause(r,t,i,s,n));return o;case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,i,g.BADNESS,n)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" AND "+this.evaluateNodeToWhereClause(e.right,t,i,s,n)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" OR "+this.evaluateNodeToWhereClause(e.right,t,i,s,n)+") ";case"IS":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" IS NOT NULL )";case"IN":if(l=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const r=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}r.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" IN ("+r.join(",")+")) "}return l=this.evaluateNodeToWhereClause(e.right,t,i,s,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" IN ("+l.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,s,n),c instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" IN ("+c+")) ";case"NOT IN":if(l=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const r=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}r.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" NOT IN ("+r.join(",")+")) "}return l=this.evaluateNodeToWhereClause(e.right,t,i,s,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" NOT IN ("+l.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,s,n),c instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" NOT IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,s,n)+" NOT IN ("+c+")) ";case"BETWEEN":return u=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" BETWEEN "+u[0]+" AND "+u[1]+" ) ";case"NOTBETWEEN":return u=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" NOT BETWEEN "+u[0]+" AND "+u[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+s+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+s+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":case"date":return(0,h.oX)(e.value,t,null);case"number":return e.value.toString();case"current-time":return(0,h.vR)("date"===e.mode,t);case"column-reference":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"data-type":return e.value;case"function":{const s=this.evaluateNodeToWhereClause(e.args,t,i,g.BADNESS,n);return(0,h.fz)(e.name,s,t)}}throw new a.eS(a.f.UnsupportedSyntax,{node:e.type})}extractValue(e){return this.codefield instanceof d.WhereClause?this.reverseLkp[d.WhereClause.convertValueToStorageFormat(this.codefield.calculateValueCompiled(e))]:this.reverseLkp[e.attributes[this.codefield]]}}g.BADNESS="_!!!_BAD_LKP_!!!!";class m extends p{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,h.bB)(e,this.field.name,(0,h.zR)(this._sql,u.Bj.Standardised),t.getFieldsIndex())}}extractValue(e){return d.WhereClause.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class w extends l.Z{static findField(e,t){for(const i of e)if(i.name.toLowerCase()===t.toString().toLowerCase())return i;return null}constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=[],this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}_initialiseFeatureSet(){null!==this._parent?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new f.Z({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=u.Qk.point,this.typeIdField="",this.types=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();let t=null;return t=this._extraFilter?await this._getFilteredSet("",null,null,null,e):await(this._parent?._getSet(e)),this._checkCancelled(e),(0,c.O3)(t),this._wset=new o.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}async _getFeatures(e,t,i,r){const a=[];-1!==t&&void 0===this._featureCache[t]&&a.push(t);const l=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,l))return await this._expandPagedSet(e,l,0,0,r),this._getFeatures(e,t,i,r);let u=0;for(let s=e._lastFetchedIndex;s<e._known.length&&(u++,u<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&a.push(e._known[s]),a.length>=l)));s++);if(0===a.length)return"success";e=new o.Z([],a,e._ordered,null);const h=Math.min(a.length,i);await(this._parent?._getFeatures(e,-1,h,r)),this._checkCancelled(r);const c=[];for(let e=0;e<h;e++){const t=this._parent?._featureFromCache(a[e]);void 0!==t&&c.push({geometry:t.geometry,attributes:t.attributes,id:a[e]})}for(const e of c){const t=[];for(const i of this.adaptedFields)t[i.field.name]=i.extractValue(e);this._featureCache[e.id]=new s.Z({attributes:t,geometry:(0,n.r1)(e.geometry)})}return"success"}async _fetchAndRefineFeatures(){throw new a.EN(a.H9.NeverReach)}async _getFilteredSet(e,t,i,s,r){let n=!1;const a=this._reformulateWithoutAdaptions(i);n=a.cannot,i=a.where;let l=!1;if(null!==s){l=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof _)&&!0===s.scanForField(t.field.name)){if(!(t instanceof y)){s=null,l=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}s&&e.length>0&&(s=s.replaceFields(e))}null!==i?null!==this._extraFilter&&(i=(0,h.$e)(this._extraFilter,i)):i=this._extraFilter,await this._ensureLoaded();const u=await this._parent._getFilteredSet(e,t,i,s,r);let c;return this._checkCancelled(r),c=!0===n?new o.Z(u._candidates.slice(0).concat(u._known.slice(0)),[],!0===l&&u._ordered,this._clonePageDefinition(u.pagesDefinition)):new o.Z(u._candidates.slice(0),u._known.slice(0),!0===l&&u._ordered,this._clonePageDefinition(u.pagesDefinition)),c}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const i of this.adaptedFields)if(!0===(0,h.hq)(e,i.field.name)){const s=i.rewriteSql(e,this);if(!0!==s.rewritten){t.cannot=!0,t.where=null;break}t.where=s.where}return t}async _stat(e,t,i,s,r,n,a){let l=!1,o=this._reformulateWithoutAdaptions(t);if(l=o.cannot,t=o.where,o=this._reformulateWithoutAdaptions(r),l=l||o.cannot,null!==(r=o.where)?null!==this._extraFilter&&(r=(0,h.$e)(this._extraFilter,r)):r=this._extraFilter,!0===l)return null===r&&""===i&&null===s?this._manualStat(e,t,n,a):{calculated:!1};const u=await this._parent._stat(e,t,i,s,r,n,a);return!1===u.calculated?null===r&&""===i&&null===s?this._manualStat(e,t,n,a):{calculated:!1}:u}async _canDoAggregates(e,t,i,s,r){if(null===this._parent)return!1;for(let t=0;t<e.length;t++)for(const i of this.adaptedFields)if(e[t].toLowerCase()===i.field.name.toLowerCase()&&!(i instanceof _))return!1;const n=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return!1;const t=i.clone();t.workingexpr=e.where,n.push(t)}else n.push(i)}const a=this._reformulateWithoutAdaptions(r);return!a.cannot&&(null!==(r=a.where)?null!==this._extraFilter&&(r=(0,h.$e)(this._extraFilter,r)):r=this._extraFilter,this._parent._canDoAggregates(e,n,i,s,r))}async _getAggregatePagesDataSourceDefinition(e,t,i,s,r,n,l){if(null===this._parent)throw new a.EN(a.H9.NeverReach);const o=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)throw new a.EN(a.H9.NeverReach);const t=i.clone();t.workingexpr=e.where,o.push(t)}else o.push(i)}const u=this._reformulateWithoutAdaptions(r);if(u.cannot)throw new a.EN(a.H9.NeverReach);return null!==(r=u.where)?null!==this._extraFilter&&(r=(0,h.$e)(this._extraFilter,r)):r=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,o,i,s,r,n,l)}}},84328:(e,t,i)=>{i.d(t,{Z:()=>c});var s=i(59987),r=i(91136),n=i(90961),a=i(90658),l=i(36515),o=i(95330),u=i(8968),h=i(82971);class c extends r.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof u.WhereClause?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new h.Z({wkid:4326}),this.geometryType=a.Qk.point)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("",null,this._whereclause,null,e);return this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new n.Z(t._candidates.slice(0).concat(t._known.slice(0)),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new n.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent?._isInFeatureSet(e);return t===a.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?a.dj.Unknown:t)}_getFeature(e,t,i){return this._parent._getFeature(e,t,i)}_getFeatures(e,t,i,s){return this._parent._getFeatures(e,t,i,s)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction){const t=this._whereClauseFunction(e);return(0,o.y8)(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,i){const s=new n.Z([],e,!1,null),r=Math.min(t,e.length);if(await(this._parent?._getFeatures(s,-1,r,i)),this._checkCancelled(i),null==this._whereClauseFunction){for(let t=0;t<r;t++){const i=this._parent?._featureFromCache(e[t]);!0===this.executeWhereClause(i)?this._idstates[e[t]]=a.dj.InFeatureSet:this._idstates[e[t]]=a.dj.NotInFeatureSet}return"success"}const l=[];for(let t=0;t<r;t++){const i=this._parent?._featureFromCache(e[t]);l.push(await this.executeWhereClauseDeferred(i))}for(let i=0;i<t;i++)!0===l[i]?this._idstates[e[i]]=a.dj.InFeatureSet:this._idstates[e[i]]=a.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,i,s,r){null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,l.$e)(this._whereclause,i)):i=this._whereclause),await this._ensureLoaded();const a=await this._parent._getFilteredSet(e,t,i,s,r);let o;return this._checkCancelled(r),o=null!==this._whereClauseFunction?new n.Z(a._candidates.slice(0).concat(a._known.slice(0)),[],a._ordered,this._clonePageDefinition(a.pagesDefinition)):new n.Z(a._candidates.slice(0),a._known.slice(0),a._ordered,this._clonePageDefinition(a.pagesDefinition)),o}async _stat(e,t,i,s,r,n,a){if(null!==this._whereClauseFunction)return null===r&&""===i&&null===s?this._manualStat(e,t,n,a):{calculated:!1};let o=this._whereclause;null!==r&&null!==this._whereclause&&(o=(0,l.$e)(this._whereclause,r));const u=await this._parent._stat(e,t,i,s,o,n,a);return!1===u.calculated?null===r&&""===i&&null===s?this._manualStat(e,t,n,a):{calculated:!1}:u}async _canDoAggregates(e,t,i,s,r){return null===this._whereClauseFunction&&(null!==r?null!==this._whereclause&&(r=(0,l.$e)(this._whereclause,r)):r=this._whereclause,null!==this._parent&&this._parent._canDoAggregates(e,t,i,s,r))}async _getAggregatePagesDataSourceDefinition(e,t,i,r,n,a,o){if(null===this._parent)throw new s.EN(s.H9.NeverReach);return null!==n?null!==this._whereclause&&(n=(0,l.$e)(this._whereclause,n)):n=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,r,n,a,o)}static registerAction(){r.Z._featuresetFunctions.filter=function(e){if("function"==typeof e)return new c({parentfeatureset:this,whereclause:e});let t=null;return e instanceof u.WhereClause&&(t=e),new c({parentfeatureset:this,whereclause:t})}}}},85065:(e,t,i)=>{i.d(t,{Z:()=>o});var s=i(61363),r=i(59987),n=i(91136),a=i(90961),l=i(3823);class o extends n.Z{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,this._orderbyclause,e);return this._checkCancelled(e),this._wset=t,this._wset}return this._wset}async manualOrderSet(e,t){const i=await this.getIdColumnDictionary(e,[],-1,t);this._orderbyclause?.order(i);const s=new a.Z([],[],!0,null);for(let e=0;e<i.length;e++)s._known.push(i[e].id);return s}async getIdColumnDictionary(e,t,i,r){if(i<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return await(0,s.a1)(this._parent._expandPagedSet(e,n,0,0,r)),this.getIdColumnDictionary(e,t,i,r);let a=i+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;i+=l.length;const o=await(0,s.a1)(this._parent._getFeatureBatch(l,r));this._checkCancelled(r);for(const e of o)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,i,r)}return e._candidates.length>0?(await(0,s.a1)(this._refineSetBlock(e,this._maxProcessingRate(),r)),this._checkCancelled(r),this.getIdColumnDictionary(e,t,i,r)):t}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,s){return this._parent._getFeatures(e,t,i,s)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}async _fetchAndRefineFeatures(){throw new r.EN(r.H9.NeverReach)}async _getFilteredSet(e,t,i,s,r){await this._ensureLoaded();const n=await this._parent._getFilteredSet(e,t,i,null===s?this._orderbyclause:s,r);this._checkCancelled(r);const l=new a.Z(n._candidates.slice(0),n._known.slice(0),n._ordered,this._clonePageDefinition(n.pagesDefinition));let o=!0;if(n._candidates.length>0&&(o=!1),!1===l._ordered){let e=await this.manualOrderSet(l,r);return!1===o&&(null===t&&null===i||(e=new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e}return l}static registerAction(){n.Z._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new l.Z(e)})}}}},63991:(e,t,i)=>{i.d(t,{Z:()=>l});var s=i(59987),r=i(91136),n=i(90961),a=i(90658);class l extends r.Z{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getSet(e);return this._wset=new n.Z(t._candidates.slice(0),t._known.slice(0),!1,this._clonePageDefinition(t.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset}return this._wset}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===a.dj.NotInFeatureSet)return t;const i=this._idstates[e];return i===a.dj.InFeatureSet||i===a.dj.NotInFeatureSet?i:t===a.dj.InFeatureSet&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=a.dj.InFeatureSet,this._countedin++,a.dj.InFeatureSet):(this._idstates[e]=a.dj.NotInFeatureSet,a.dj.NotInFeatureSet):a.dj.Unknown}async _expandPagedSet(e,t,i,r,n){if(null===this._parent)throw new s.EN(s.H9.NotImplemented);if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),"success"}const a=await this._parent._expandPagedSet(e,t,i,r,n);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),a}async _getFeatures(e,t,i,s){const r=[],a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return await this._expandPagedSet(e,a,0,0,s),this._getFeatures(e,t,i,s);-1!==t&&void 0===this._featureCache[t]&&r.push(t);let l=0;for(let s=e._lastFetchedIndex;s<e._known.length&&(l++,l<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&r.push(e._known[s]),r.length>a)));s++);if(0===r.length)return"success";const o=new n.Z([],r,!1,null),u=Math.min(r.length,i);await this._parent._getFeatures(o,-1,u,s);for(let e=0;e<u;e++){const t=this._parent._featureFromCache(r[e]);void 0!==t&&(this._featureCache[r[e]]=t)}return"success"}async _getFilteredSet(e,t,i,s,r){await this._ensureLoaded();const a=await this._getSet(r);return new n.Z(a._candidates.slice(0).concat(a._known.slice(0)),[],!1,this._clonePageDefinition(a.pagesDefinition))}_refineKnowns(e,t){let i=0,s=null;const r=[];for(let n=0;n<e._candidates.length;n++){const l=this._isInFeatureSet(e._candidates[n]);if(l===a.dj.InFeatureSet){if(e._known.push(e._candidates[n]),i+=1,null===s?s={start:n,end:n}:s.end===n-1?s.end=n:(r.push(s),s={start:n,end:n}),e._known.length>=this._topnum)break}else if(l===a.dj.NotInFeatureSet)null===s?s={start:n,end:n}:s.end===n-1?s.end=n:(r.push(s),s={start:n,end:n}),i+=1;else if(l===a.dj.Unknown)break;if(i>=t)break}null!==s&&r.push(s);for(let t=r.length-1;t>=0;t--)e._candidates.splice(r[t].start,r[t].end-r[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}static registerAction(){r.Z._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}}},17805:(e,t,i)=>{i.d(t,{Z:()=>_});var s=i(38171),r=i(59987),n=i(91136),a=i(90961),l=i(90658),o=i(36515),u=i(9361),h=i(19238),c=i(20697),d=i(16451),f=i(1231),p=i(14165);class _ extends n.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.tI}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const s of this._overrideFields)if(s.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=l.Bj.Standardised,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this._layer instanceof c.default?(this.typeIdField=this._layer.subtypeField??"",this.types=this._layer.subtypes):(this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types)}isTable(){return this._forceIsTable||this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return l.dj.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new s.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,s,r){let n="",u=!1;if(null!==s&&(n=s.constructClause(),u=!0),this.isTable()&&t&&null!==e&&""!==e)return new a.Z([],[],!0,null);const h=new p.Z;h.returnZ=this.hasZ,h.returnM=this.hasM,h.where=null===i?null===t?"1=1":"":(0,o.zR)(i,l.Bj.Standardised),h.spatialRelationship=this._makeRelationshipEnum(e),h.outSpatialReference=this.spatialReference,h.orderByFields=""!==n?n.split(","):null,h.geometry=null===t?null:t,h.returnGeometry=!0,h.relationParameter=this._makeRelationshipParam(e);const c=await this._layer.queryFeatures(h);if(null===c)return new a.Z([],[],u,null);this._checkCancelled(r);const d=[];return c.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];d.push(t),this._featureCache[t]=this._changeFeature(e)})),new a.Z([],d,u,null)}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _queryAllFeatures(){if(this._wset)return this._wset;const e=new p.Z;if(e.where="1=1",await this._ensureLoaded(),this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach((t=>{const i=t.attributes[this._layer.objectIdField];e.push(i),this._featureCache[i]=this._changeFeature(t)})),this._wset=new a.Z([],e,!1,null),this._wset}e.returnZ=this.hasZ,e.returnM=this.hasM;const t=await this._layer.queryFeatures(e),i=[];return t.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];i.push(t),this._featureCache[t]=this._changeFeature(e)})),this._wset=new a.Z([],i,!1,null),this._wset}async _getFeatures(e,t,i){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);for(let r=e._lastFetchedIndex;r<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>i)));r++);if(0===s.length)return"success";throw new r.EN(r.H9.MissingFeatures)}async _refineSetBlock(e){return e}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const i in e)t[i]=e[i];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let i=e.layerDefinition.objectIdField;const s=e.layerDefinition.typeIdField??"",r=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)r.push(d.Z.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!i){let t=!1;for(const s of e.layerDefinition.fields)if("oid"===s.type||"esriFieldTypeOID"===s.type){i=s.name,t=!0;break}if(!1===t){let t="FID",s=!0,r=0;for(;s;){let i=!0;for(const s of e.layerDefinition.fields)if(s.name===t){i=!1;break}!0===i?s=!1:(r++,t="FID"+r.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let i=0;i<a.length;i++)n.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),n[i].attributes[t]=i;a=n,i=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof f.Z?o.push(t):o.push(f.Z.fromJSON(t));let c=n;switch(c||(c=""),c){case"esriGeometryPoint":c="point";break;case"esriGeometryPolyline":c="polyline";break;case"esriGeometryPolygon":c="polygon";break;case"esriGeometryEnvelope":c="extent";break;case"esriGeometryMultipoint":c="multipoint";break;case"":case"esriGeometryNull":c="esriGeometryNull"}if("esriGeometryNull"!==c)for(const e of a)e.geometry&&e.geometry instanceof u.Z==0&&(e.geometry.type=c,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const p={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:r,typeIdField:s,objectIdField:i,spatialReference:t},y="esriGeometryNull"===c||null===c;y||(p.geometryType=c);const g=new h.default(p);return new _({layer:g,spatialReference:t,isTable:y})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=new p.Z;t.where=this.objectIdField+"="+e.toString(),t.returnZ=this.hasZ,t.returnM=this.hasM;const i=await this._layer.queryFeatures(t);return 1===i.features.length?i.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeReference(){return this._layer?.preferredTimeReference?.toJSON()??null}get dateFieldsTimeReference(){return this._layer?.dateFieldsTimeReference?.toJSON()??null}get datesInUnknownTimezone(){return this._layer?.datesInUnknownTimezone}get editFieldsInfo(){return this._layer?.editFieldsInfo?.toJSON()??null}get timeInfo(){return this._layer?.timeInfo?.toJSON()??null}}},3823:(e,t,i)=>{function s(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}i.d(t,{Z:()=>r});class r{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const i=t[e].match(/\S+/g);this._fields.push(i[0]),2===i.length?"asc"===i[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort(((e,t)=>{for(let i=0;i<this._fields.length;i++){const r=this.featureValue(e.feature,this._fields[i],i),n=this.featureValue(t.feature,this._fields[i],i);let a=0;if(a=1===this._directions[i]?s(r,n):-1*s(r,n),0!==a)return a}return 0}))}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let i=0;i<this._fields.length;i++){0!==i&&(t+=",");let s=this._fields[i];for(const t of e)if(s.toLowerCase()===t.field.toLowerCase()){s=t.newfield;break}t+=s,1===this._directions[i]?t+=" ASC":t+=" DESC"}return new r(t)}featureValue(e,t,i){const s=e.attributes[t];if(void 0!==s)return s;for(const s in e.attributes)if(t.toLowerCase()===s.toLowerCase())return this._fields[i]=s,e.attributes[s];return null}}},25929:(e,t,i)=>{i.d(t,{M:()=>p,a:()=>y,e:()=>d,f:()=>r,i:()=>h,p:()=>c,r:()=>a,t:()=>n,w:()=>l});var s=i(17452);function r(e,t){const i=t&&t.url&&t.url.path;if(e&&i&&(e=(0,s.hF)(e,i,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const i=(0,s.PF)(e,t.portalItem.itemUrl);null!=i&&u.test(i)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(i).path)}return f(e,t&&t.portal)}function n(e,t,i=p.YES){if(null==e)return e;!(0,s.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let r=(0,s.hF)(e);if(t){const i=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(i){const n=f(i,t.portal),a=f(r,t.portal);r=(0,s.PF)(a,n,n),null!=r&&r!==a&&r!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(r)}}return r=d(r,t?.portal),(0,s.YP)(r)&&(r=(0,s.Fv)(r)),t?.resources&&t?.portalItem&&!(0,s.YP)(r)&&!(0,s.HK)(r)&&i===p.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(r),compress:!1}),r}function a(e,t,i){return r(e,i)}function l(e,t,i,s){const r=n(e,s);void 0!==r&&(t[i]=r)}const o=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function h(e){const t=e?.match(o)??null;return t?.[1]??null}function c(e){const t=e?.match(o)??null;if(null==t)return null;const i=t[2],r=i.lastIndexOf("/");if(-1===r){const{path:e,extension:t}=(0,s.fZ)(i);return{prefix:null,filename:e,extension:t}}const{path:n,extension:a}=(0,s.fZ)(i.slice(r+1));return{prefix:i.slice(0,r),filename:n,extension:a}}function d(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,s.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function f(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const i=`${t.urlKey}.${t.customBaseUrl}`,r=(0,s.TI)();return(0,s.D6)(r,`${r.scheme}://${i}`)?(0,s.Ie)(e,t.portalHostname,i):(0,s.Ie)(e,i,t.portalHostname)}var p,_;(_=p||(p={}))[_.YES=0]="YES",_[_.NO=1]="NO";const y=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return p},ensureMainOnlineDomain:d,fromJSON:r,itemIdFromResourceUrl:h,prefixAndFilenameFromResourceUrl:c,read:a,toJSON:n,write:l},Symbol.toStringTag,{value:"Module"}))},46791:(e,t,i)=>{i.d(t,{Z:()=>k});var s,r=i(43697),n=i(3894),a=i(32448),l=i(50758),o=i(22974),u=i(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(s||(s={}));var h,c=i(1654),d=i(75215),f=i(58971),p=i(5600),_=i(52421),y=i(52011),g=i(10661);class m{constructor(e,t,i,s,r){this.target=e,this.added=t,this.removed=i,this.start=s,this.deleteCount=r}}const w=new u.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function b(e){return e?e instanceof x?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function F(e){if(e&&e.length)return e[0]}function S(e,t,i,s){const r=Math.min(e.length-i,t.length-s);let n=0;for(;n<r&&e[i+n]===t[s+n];)n++;return n}function v(e,t,i,s){t&&t.forEach(((t,r,n)=>{e.push(t),v(e,i.call(s,t,r,n),i,s)}))}const I=new Set,C=new Set,R=new Set,D=new Map;let T=0,x=h=class extends a.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof h}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:T++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof h?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,b(e)),this._emitAfterChanges(s.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,l.kB)((()=>{i.removed=!0,e.splice(e.indexOf(i),1)}))}return this._emitter.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,s=this.on(e,(e=>{i()?.call(null,e),s.remove()}));return s}add(e,t){if((0,f.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(s.ADD),this}addMany(e,t=this._items.length){if((0,f.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const i=this.getNextIndex(t);return this._splice(i,0,b(e)),this._emitAfterChanges(s.ADD),this}at(e){if((0,f.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(s.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.map(o.d9)})}concat(...e){(0,f.it)(this._observable);const t=e.map(b);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const i=this._splice(0,this.length),r=i.length;for(let s=0;s<r;s++)e.call(t,i[s],s,i);this._emitAfterChanges(s.REMOVE)}every(e,t){return(0,f.it)(this._observable),this._items.every(e,t)}filter(e,t){let i;return(0,f.it)(this._observable),i=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:i})}find(e,t){return(0,f.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.it)(this._observable);const i=[];return v(i,this,e,t),new h(i)}forEach(e,t){return(0,f.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.it)(this._observable),this._items[e]}getNextIndex(e){(0,f.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.it)(this._observable);const i=this._items.map(e,t);return new h({items:i})}reorder(e,t=this.length-1){(0,f.it)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(s.MOVE))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(s.MOVE)}return e}}pop(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=F(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),e}push(...e){return(0,f.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(s.ADD)),this.length}reduce(e,t){(0,f.it)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.it)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(s.REMOVE))return;const t=F(this._splice(e,1));return this._emitAfterChanges(s.REMOVE),t}removeMany(e){if((0,f.it)(this._observable),!e||!e.length||this._emitBeforeChanges(s.REMOVE))return[];const t=e instanceof h?e.toArray():e,i=this._items,r=[],n=t.length;for(let e=0;e<n;e++){const s=t[e],n=i.indexOf(s);if(n>-1){const s=1+S(t,i,e+1,n+1),a=this._splice(n,s);a&&a.length>0&&r.push.apply(r,a),e+=s-1}}return this._emitAfterChanges(s.REMOVE),r}reverse(){if((0,f.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=F(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),e}slice(e=0,t=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.it)(this._observable),this._items.some(e,t)}sort(e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(s.MOVE),this}splice(e,t,...i){(0,f.it)(this._observable);const r=(t?s.REMOVE:0)|(i.length?s.ADD:0);if(this._emitBeforeChanges(r))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(r),n}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...e){return(0,f.it)(this._observable),!e.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,e),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const s=this._items,r=this.itemType;let n,a;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(a=s.splice(e,t),this.hasEventListener("before-remove")){const t=w.acquire();t.target=this,t.cancellable=!0;for(let i=0,r=a.length;i<r;i++)n=a[i],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(a.splice(i,1),s.splice(e,0,n),e+=1,i-=1,r-=1);w.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=w.acquire();e.target=this,e.cancellable=!1;const t=a.length;for(let i=0;i<t;i++)e.reset(a[i]),this.emit("after-remove",e);w.release(e)}}if(i&&i.length){if(r){const e=[];for(const t of i){const i=r.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),a=e===this.length;if(t||n){const r=w.acquire();r.target=this,r.cancellable=!0;const l=w.acquire();l.target=this,l.cancellable=!1;for(const o of i)t?(r.reset(o),this.emit("before-add",r),r.defaultPrevented||(a?s.push(o):s.splice(e++,0,o),this._set("length",s.length),n&&(l.reset(o),this.emit("after-add",l)))):(a?s.push(o):s.splice(e++,0,o),this._set("length",s.length),l.reset(o),this.emit("after-add",l));w.release(l),w.release(r)}else{if(a)for(const e of i)s.push(e);else s.splice(e,0,...i);this._set("length",s.length)}}if((i&&i.length||a&&a.length)&&this._notifyChangeEvent(i,a),this.hasEventListener("after-splice")){const s=new m(this,i,a,e,t);this.emit("after-splice",s)}return a}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=w.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,w.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=w.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),w.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;I.clear(),C.clear(),R.clear();for(const{added:t,removed:i}of e){if(t)if(0===R.size&&0===C.size)for(const e of t)I.add(e);else for(const e of t)C.has(e)?(R.add(e),C.delete(e)):R.has(e)||I.add(e);if(i)if(0===R.size&&0===I.size)for(const e of i)C.add(e);else for(const e of i)I.has(e)?I.delete(e):(R.delete(e),C.add(e))}const i=n.Z.acquire();I.forEach((e=>{i.push(e)}));const s=n.Z.acquire();C.forEach((e=>{s.push(e)}));const r=this._items,a=t.items,l=n.Z.acquire();if(R.forEach((e=>{a.indexOf(e)!==r.indexOf(e)&&l.push(e)})),t.listeners&&(i.length||s.length||l.length)){const e={target:this,added:i,removed:s,moved:l},r=t.listeners.length;for(let i=0;i<r;i++){const s=t.listeners[i];s.removed||s.callback.call(this,e)}}n.Z.release(i),n.Z.release(s),n.Z.release(l)}I.clear(),C.clear(),R.clear()}};x.ofType=e=>{if(!e)return h;if(D.has(e))return D.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const s=e.typeMap[i].prototype.declaredClass;t?t+=` | ${s}`:t=s}let i=class extends h{};return(0,r._)([(0,_.c)({Type:e,ensureType:"function"==typeof e?(0,d.se)(e):(0,d.N7)(e)})],i.prototype,"itemType",void 0),i=(0,r._)([(0,y.j)(`esri.core.Collection<${t}>`)],i),D.set(e,i),i},(0,r._)([(0,p.Cb)()],x.prototype,"length",void 0),(0,r._)([(0,p.Cb)()],x.prototype,"items",null),x=h=(0,r._)([(0,y.j)("esri.core.Collection")],x);const k=x},32448:(e,t,i)=>{i.d(t,{Z:()=>o});var s=i(43697),r=i(92036),n=i(50758),a=i(52011);class l{constructor(){this._emitter=new l.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){let i=this._listenersMap?.get(e);if(!i)return!1;const s=this._target||this;let r=!1;for(const e of i.slice()){const i="deref"in e?e.deref():e;i?i?.call(s,t):r=!0}return r&&(i=i.filter((e=>!("deref"in e)||null!=e.deref())),this._listenersMap.set(e,i)),i.length>0}on(e,t){if(Array.isArray(e)){const i=e.map((e=>this.on(e,t)));return(0,n.AL)(i)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??=new Map;const i=this._listenersMap.get(e)||[];return i.push(t),this._listenersMap.set(e,i),(0,n.kB)((()=>{const i=this._listenersMap?.get(e),s=i?.indexOf(t)??-1;s>=0&&i.splice(s,1)}))}once(e,t){const i=this.on(e,(e=>{i.remove();const s="deref"in t?t.deref():t;s?.call(null,e)}));return i}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let i=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return i=(0,s._)([(0,a.j)("esri.core.Evented")],i),i};let i=class extends r.Z{constructor(){super(...arguments),this._emitter=new l.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};i=(0,s._)([(0,a.j)("esri.core.Evented")],i),e.EventedAccessor=i}(l||(l={}));const o=l},52421:(e,t,i)=>{function s(e){return(t,i)=>{t[i]=e}}i.d(t,{c:()=>s})},66643:(e,t,i)=>{i.d(t,{Ed:()=>u,UI:()=>h,mt:()=>p,q6:()=>f,vr:()=>_});var s=i(43697),r=i(92036),n=i(70586),a=i(95330),l=i(5600),o=i(52011);function u(e,t,i){return(0,a.as)(e.map(((e,s)=>t.apply(i,[e,s]))))}async function h(e,t,i){return(await(0,a.as)(e.map(((e,s)=>t.apply(i,[e,s]))))).map((e=>e.value))}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function p(e){try{return c(await e)}catch(e){return(0,a.r9)(e),d(e)}}function _(e,t){return new y(e,t)}let y=class extends r.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then((e=>{this._result=c(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,a.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.hw)(this._abortHandle),this._abortController=null}};(0,s._)([(0,l.Cb)()],y.prototype,"value",null),(0,s._)([(0,l.Cb)()],y.prototype,"error",null),(0,s._)([(0,l.Cb)()],y.prototype,"finished",null),(0,s._)([(0,l.Cb)()],y.prototype,"promise",void 0),(0,s._)([(0,l.Cb)()],y.prototype,"_result",void 0),y=(0,s._)([(0,o.j)("esri.core.asyncUtils.ReactiveTask")],y)},16451:(e,t,i)=>{i.d(t,{Z:()=>f});var s=i(43697),r=i(2368),n=i(96674),a=i(5600),l=(i(75215),i(67676),i(80442),i(71715)),o=i(52011),u=i(30556),h=i(72729),c=i(70082);let d=class extends((0,r.J)(n.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,h.im)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,s._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,s._)([(0,l.r)("domains")],d.prototype,"readDomains",null),(0,s._)([(0,u.c)("domains")],d.prototype,"writeDomains",null),(0,s._)([(0,a.Cb)({type:[c.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,s._)([(0,o.j)("esri.layers.support.FeatureType")],d);const f=d},66677:(e,t,i)=>{i.d(t,{B5:()=>h,DR:()=>d,G:()=>w,M8:()=>_,Nm:()=>y,Qc:()=>c,XG:()=>g,a7:()=>p,ld:()=>f,wH:()=>m});var s=i(17452),r=i(25929);const n={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},a=Object.values(n),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(e){return!!l.test(e)}function c(e){if(null==e)return null;const t=(0,s.mN)(e),i=t?.path.match(l)||t?.path.match(o);if(!i)return null;const[,r,a,u,h]=i,c=a.indexOf("/");return{title:f(-1!==c?a.slice(c+1):a),serverType:n[u.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:r}}}function d(e){const t=(0,s.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function p(e,t){const i=[];if(e){const t=c(e);null!=t&&t.title&&i.push(t.title)}if(t){const e=f(t);i.push(e)}if(2===i.length){if(i[0].toLowerCase().includes(i[1].toLowerCase()))return i[0];if(i[1].toLowerCase().includes(i[0].toLowerCase()))return i[1]}return i.join(" - ")}function _(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),i=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&i}function y(e,t){return e?(0,s.Qj)((0,s.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,s.Hu)(t,e.logger);const i=(0,s.mN)(t),r=c(i.path);let n;if(null!=r)null!=r.sublayer&&null==e.layer.layerId&&(n=r.sublayer),t=r.url.path;else if(e.nonStandardUrlAllowed){const e=d(i.path);null!=e&&(t=e.serviceUrl,n=e.sublayerId)}return{url:(0,s.Qj)(t),layerId:n}}function m(e,t,i,n,a){(0,r.w)(t,n,"url",a),n.url&&null!=e.layerId&&(n.url=(0,s.v_)(n.url,i,e.layerId.toString()))}function w(e){if(!e)return!1;const t=e.toLowerCase(),i=t.includes("/services/"),s=t.includes("/mapserver/wmsserver"),r=t.includes("/imageserver/wmsserver"),n=t.includes("/wmsserver");return i&&(s||r||n)}},2981:(e,t,i)=>{i.d(t,{$6:()=>p,$z:()=>n,F7:()=>r,Ow:()=>l,S0:()=>a,d1:()=>o,dm:()=>u});const s=[["binary","application/octet-stream","bin",""]];function r(e,t){return null!=c(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const i=u(t,e.supportedFormats??[]);return null!=i&&e.editFormats.includes(i)}function a(e,t){return d(function(e,t){const i=e.toLowerCase();return h(t).find((e=>f(e)===i))}(e,t))}function l(e,t){return d(c(e,t))}function o(e,t){return f(function(e,t){return h(t).find((t=>d(t)===e))}(e,t))}function u(e,t){return l(e.name,t)??a(e.type,t)}function h(e){return[...s,...e]}function c(e,t){const i=e.toLowerCase();return h(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>i.endsWith(e)))))}function d(e){return e?.[0]}function f(e){return e?.[1].toLowerCase()}function p(e){return e.tables?.find((e=>"assetMaps"===e.role))}},84230:(e,t,i)=>{i.d(t,{A2:()=>a,S1:()=>h,fP:()=>o,fb:()=>n,ln:()=>c,oP:()=>u,rQ:()=>l});var s=i(40330),r=i(3172);const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(e){return("feature"===e?.type||"subtype-group"===e?.type)&&"feature-layer"===e.source?.type}async function u(e,t){const i=s.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const a=`${e.substring(0,n)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,r.Z)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function h(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function c(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},14661:(e,t,i)=>{i.d(t,{$o:()=>h,Fj:()=>o,Kz:()=>c,Ss:()=>d,_$:()=>l,ck:()=>u,qj:()=>a});var s=i(73615),r=i(82971),n=i(40488);function a(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,c.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}async function h(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.Sx)(e);const i=r.Z.WGS84;return await(0,s.initializeProjection)(t,i),(0,s.project)(e,i)}(i)}const c={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service",LOCAL_SCENE:"ViewingMode-Local",TILED_IMAGERY:"Tiled Imagery"};function d(e){const{portal:t,isOrgItem:i,itemControl:s}=e,r=t.user?.privileges;let n=!r||r.includes("features:user:edit"),a=!!i&&!!r?.includes("features:user:fullEdit");const l="update"===s||"admin"===s;return l?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:l}}}},41818:(e,t,i)=>{i.d(t,{P:()=>a});var s=i(11282),r=i(34599),n=i(14165);async function a(e,t,i){const a=(0,s.en)(e);return(0,r.hH)(a,n.Z.from(t),{...i}).then((e=>e.data.count))}},5396:(e,t,i)=>{i.d(t,{G:()=>a});var s=i(11282),r=i(34599),n=i(14165);async function a(e,t,i){const a=(0,s.en)(e);return(0,r.Ev)(a,n.Z.from(t),{...i}).then((e=>e.data.objectIds))}},4967:(e,t,i)=>{i.d(t,{F:()=>o,e:()=>l});var s=i(11282),r=i(34599),n=i(74889),a=i(14165);async function l(e,t,i){const s=await o(e,t,i);return n.Z.fromJSON(s)}async function o(e,t,i){const n=(0,s.en)(e),l={...i},o=a.Z.from(t),{data:u}=await(0,r.JT)(n,o,o.sourceSpatialReference,l);return u}},53261:(e,t,i)=>{i.d(t,{t:()=>y});var s=i(11282),r=i(70586),n=i(69285),a=i(98732);function l(e,t){return t}function o(e,t,i,s){switch(i){case 0:return d(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?d(e,t+s,1):function({translate:e,scale:t},i,s){return e[s]-i*t[s]}(e,t+s,1)}}function u(e,t,i,s){return 2===i?d(e,t,2):o(e,t,i,s)}function h(e,t,i,s){return 2===i?d(e,t,3):o(e,t,i,s)}function c(e,t,i,s){return 3===i?d(e,t,3):u(e,t,i,s)}function d({translate:e,scale:t},i,s){return e[s]+i*t[s]}class f{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=l,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,n.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const i of e.features)t(i.geometry)}createSpatialReference(){return{}}addField(e,t){const i=e.fields;(0,r.O3)(i),i.push(t);const s=i.map((e=>e.name));this._attributesConstructor=function(){for(const e of s)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,i)=>this.addCoordinatePoint(e,t,i),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,i)=>this._addCoordinatePolygon(e,t,i),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,i)=>this._addCoordinatePolyline(e,t,i),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,i)=>this._addCoordinateMultipoint(e,t,i),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,i){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:i,queryGeometryType:s}=t,r=(0,a.$g)(i.clone(),i,!1,!1,this._transform),n=(0,a.di)(r,s,!1,!1);e.queryGeometryType=s,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,i){const s=this._transform;switch(t=this._applyTransform(s,t,i,0),i){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let i=0;t<=1&&(i=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=this._transform;return this._applyTransform(s,e,t,i)}_addCoordinatePolyline(e,t,i){this._dehydratedAddPointsCoordinate(e.paths,t,i)}_addCoordinatePolygon(e,t,i){this._dehydratedAddPointsCoordinate(e.rings,t,i)}_addCoordinateMultipoint(e,t,i){0===i&&e.points.push([]);const s=this._transformPathLikeValue(t,i);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,i){0===i&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,i),r=e[e.length-1];0===i&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),r.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:i}=e;return t&&i?c:t?u:i?h:o}}var p=i(34599),_=(i(74889),i(14165));async function y(e,t,i){const r=(0,s.en)(e),n={...i},a=_.Z.from(t),l=!a.quantizationParameters,{data:o}=await(0,p.qp)(r,a,new f({sourceSpatialReference:a.sourceSpatialReference,applyTransform:l}),n);return o}},28694:(e,t,i)=>{i.d(t,{p:()=>r});var s=i(69285);function r(e,t,i){if(!i||!i.features||!i.hasZ)return;const r=(0,s.k)(i.geometryType,t,e.outSpatialReference);if(null!=r)for(const e of i.features)r(e.geometry)}},98326:(e,t,i)=>{i.d(t,{Z:()=>c});var s,r=i(43697),n=i(96674),a=i(5600),l=i(75215),o=(i(67676),i(80442),i(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let h=s=class extends n.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:s}=e;if(!t||!i||!s)return null;const r=t.find((e=>e.name===i));return r?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const s=i.find((e=>e.name===t));return s&&s.value||null}({tagName:s,tags:r.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new s({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,r._)([(0,a.Cb)({type:String})],h.prototype,"contentType",void 0),(0,r._)([(0,a.Cb)()],h.prototype,"exifInfo",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],h.prototype,"orientationInfo",null),(0,r._)([(0,a.Cb)({type:l.z8})],h.prototype,"id",void 0),(0,r._)([(0,a.Cb)({type:String})],h.prototype,"globalId",void 0),(0,r._)([(0,a.Cb)({type:String})],h.prototype,"keywords",void 0),(0,r._)([(0,a.Cb)({type:String})],h.prototype,"name",void 0),(0,r._)([(0,a.Cb)({json:{read:!1}})],h.prototype,"parentGlobalId",void 0),(0,r._)([(0,a.Cb)({json:{read:!1}})],h.prototype,"parentObjectId",void 0),(0,r._)([(0,a.Cb)({type:l.z8})],h.prototype,"size",void 0),(0,r._)([(0,a.Cb)({json:{read:!1}})],h.prototype,"url",void 0),h=s=(0,r._)([(0,o.j)("esri.layers.support.AttachmentInfo")],h);const c=h},74889:(e,t,i)=>{i.d(t,{Z:()=>w});var s,r=i(43697),n=i(66577),a=i(38171),l=i(35454),o=i(96674),u=i(22974),h=i(5600),c=(i(75215),i(71715)),d=i(52011),f=i(30556),p=i(82971),_=i(33955),y=i(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let m=s=class extends o.wq{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){const i=p.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const r=e[t],n=a.Z.fromJSON(r),l=r.geometry&&r.geometry.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const o=r.aggregateGeometries,u=n.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],s=o[e],r=s?.spatialReference;null==t||r||(t.spatialReference=i)}s.push(n)}return s}writeGeometryType(e,t,i,s){if(e)return void g.write(e,t,i,s);const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,i,s)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,s=(0,_.im)(e);return s&&!i&&t.spatialReference&&(s.spatialReference=p.Z.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const s=t.features[i];if(s.geometry){const t=e&&e[i];s.geometry=t&&t.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,i],translate:[s,r]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((r-e)/i)));for(let e=0,t=n.length;e<t;e++)a?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[s,r],scale:[n,a]}=i;let l=null,o=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;o=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*n+s),(e=>r-e*a),l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let s,r;const n=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===s&&a===r||(n.push([e-s,a-r]),s=e,r=a)}else s=t(l[0]),r=i(l[1]),n.push([s,r])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,_.oU)(e)?e.rings:e.paths,r=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],a=this._quantizePoints(n,t,i);a&&r.push(a)}return r.length>0?((0,_.oU)(e)?e.rings=r:e.paths=r,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,i);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,s,r){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,_.oU)(e)?e.rings:e.paths;let a,l;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(a+=r[0],l+=r[1]):(a=r[0],l=r[1]),r[0]=t(a),r[1]=i(l)}}if(s&&r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=s(i[2]),i[3]=r(i[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=s(i[2])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),r&&null!=e.mmax&&null!=e.mmin&&(e.mmax=r(e.mmax),e.mmin=r(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let a,l;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(a+=s[0],l+=s[1]):(a=s[0],l=s[1]),s[0]=t(a),s[1]=i(l)}if(s&&r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=r(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}}:null}};(0,r._)([(0,h.Cb)({type:String,json:{write:!0}})],m.prototype,"displayFieldName",void 0),(0,r._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"exceededTransferLimit",void 0),(0,r._)([(0,h.Cb)({type:[a.Z],json:{write:!0}})],m.prototype,"features",void 0),(0,r._)([(0,c.r)("features")],m.prototype,"readFeatures",null),(0,r._)([(0,h.Cb)({type:[y.Z],json:{write:!0}})],m.prototype,"fields",void 0),(0,r._)([(0,h.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],m.prototype,"geometryType",void 0),(0,r._)([(0,f.c)("geometryType")],m.prototype,"writeGeometryType",null),(0,r._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasM",void 0),(0,r._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasZ",void 0),(0,r._)([(0,h.Cb)({types:n.qM,json:{write:!0}})],m.prototype,"queryGeometry",void 0),(0,r._)([(0,c.r)("queryGeometry")],m.prototype,"readQueryGeometry",null),(0,r._)([(0,h.Cb)({type:p.Z,json:{write:!0}})],m.prototype,"spatialReference",void 0),(0,r._)([(0,f.c)("spatialReference")],m.prototype,"writeSpatialReference",null),(0,r._)([(0,h.Cb)({json:{write:!0}})],m.prototype,"transform",void 0),m=s=(0,r._)([(0,d.j)("esri.rest.support.FeatureSet")],m),m.prototype.toJSON.isDefaultToJSON=!0;const w=m}}]);