@agrotools1/at-components 0.2.3 → 0.2.4

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 (894) hide show
  1. package/dist/AGraphicContainer-75e55bb8.js +109 -0
  2. package/dist/APIKeyMixin-688c6ac6.js +19 -0
  3. package/dist/Analysis-53f71911.js +31 -0
  4. package/dist/ArcGISCachedService-ea7559f0.js +47 -0
  5. package/dist/ArcGISService-a447176d.js +25 -0
  6. package/dist/AreaMeasurement2D-4d0db109.js +405 -0
  7. package/dist/AreaMeasurement3D-a2a10ea8.js +488 -0
  8. package/dist/AttachmentInfo-a2849bf0.js +34 -0
  9. package/dist/AttachmentQuery-e743e06f.js +18 -0
  10. package/dist/AttributeStore-6a3291d4.js +1707 -0
  11. package/dist/BaseDynamicLayerView2D-b3ff0eae.js +63 -0
  12. package/dist/BingMapsLayer-689d8e88.js +112 -0
  13. package/dist/Bitmap-e2b1f93c.js +128 -0
  14. package/dist/BitmapContainer-4dcc4a14.js +23 -0
  15. package/dist/BlendLayer-113fd3b8.js +13 -0
  16. package/dist/BoundsStore-3598604e.js +63 -0
  17. package/dist/BufferObject-59880a47.js +100 -0
  18. package/dist/BufferView-2cfe8c7d.js +683 -0
  19. package/dist/BuildingSceneLayer-a3e4a869.js +535 -0
  20. package/dist/Button-5e85250d.js +36 -0
  21. package/dist/CSVLayer-a68a64b8.js +208 -0
  22. package/dist/CSVSourceWorker-cf1fee99.js +367 -0
  23. package/dist/CardWithInsights/CardWithInsights.d.ts +2 -1
  24. package/dist/CatalogDynamicGroupLayerView2D-a4ae390f.js +66 -0
  25. package/dist/CatalogFootprintLayerView2D-145014a4.js +76 -0
  26. package/dist/CatalogLayer-48e7048b.js +262 -0
  27. package/dist/CatalogLayerView2D-8b4a4d47.js +52 -0
  28. package/dist/ClassBreaksDefinition-e2d8b3cc.js +18 -0
  29. package/dist/ColorMaterial.glsl-a7c70d21.js +64 -0
  30. package/dist/ColorSet-f4b34654.js +45 -0
  31. package/dist/ColorStop-1111f0fd.js +29 -0
  32. package/dist/Container-4a2d8bcd.js +521 -0
  33. package/dist/CustomParametersMixin-601866cc.js +12 -0
  34. package/dist/DefaultMaterial.glsl-9243ba6c.js +42 -0
  35. package/dist/DefaultMaterial_COLOR_GAMMA-bf0d97c7.js +653 -0
  36. package/dist/DefaultTheme-e96ad45b.js +130 -0
  37. package/dist/DeleteForwardEditsParameters-bd5164e3.js +18 -0
  38. package/dist/DimensionLayer-d51dcf5e.js +129 -0
  39. package/dist/DirectLineMeasurement3D-7b426a46.js +449 -0
  40. package/dist/DistanceMeasurement2D-1f05b105.js +303 -0
  41. package/dist/DoubleArray-4f276822.js +25 -0
  42. package/dist/Dropdown/Dropdown.core.d.ts +31 -0
  43. package/dist/Dropdown/Filter/test.mocks.d.ts +6 -0
  44. package/dist/Dropdown/List/Dropdown.List.d.ts +84 -0
  45. package/dist/Dropdown/List/test.mocks.d.ts +6 -0
  46. package/dist/EdgeProcessingWorker-317b2f9a.js +63 -0
  47. package/dist/EditBusLayer-55763028.js +107 -0
  48. package/dist/ElevationInfo-5be88917.js +56 -0
  49. package/dist/ElevationLayer-754634d4.js +129 -0
  50. package/dist/ElevationQuery-1e84df59.js +598 -0
  51. package/dist/ElevationSamplerWorker-1c01b3d8.js +62 -0
  52. package/dist/ExportImageParameters-e00a1031.js +66 -0
  53. package/dist/ExportStrategy-ba992e25.js +93 -0
  54. package/dist/ExportWMSImageParameters-395804ac.js +33 -0
  55. package/dist/External-77e767f4.js +110 -0
  56. package/dist/Faq/Faq.d.ts +1 -1
  57. package/dist/Faq/index.d.ts +1 -1
  58. package/dist/FeatureCollectionSnappingSource-d1435805.js +130 -0
  59. package/dist/FeatureCommandQueue-4db7f162.js +1244 -0
  60. package/dist/FeatureEffect-5b570804.js +39 -0
  61. package/dist/FeatureEffectLayer-171a9749.js +13 -0
  62. package/dist/FeatureFilter-db89ec09.js +27 -0
  63. package/dist/FeatureLayer-881827c7.js +693 -0
  64. package/dist/FeatureLayerBase-b410d8eb.js +148 -0
  65. package/dist/FeatureLayerSource-e5eba81e.js +444 -0
  66. package/dist/FeatureLayerView2D-107b4ed6.js +1967 -0
  67. package/dist/FeaturePipelineWorker-2b42d98d.js +3633 -0
  68. package/dist/FeatureReductionLayer-1f3f6a98.js +225 -0
  69. package/dist/FeatureReductionSelection-b0c4bcaf.js +22 -0
  70. package/dist/FeatureServiceSnappingSource-fde9a8da.js +481 -0
  71. package/dist/FeatureServiceSnappingSourceWorker-d4113c50.js +747 -0
  72. package/dist/FeatureSet-595ae550.js +188 -0
  73. package/dist/FeatureStore-87fbe804.js +131 -0
  74. package/dist/FeatureTemplate-c810cba6.js +12 -0
  75. package/dist/FeatureType-22de76b9.js +25 -0
  76. package/dist/FieldsIndex-390b005f.js +109 -0
  77. package/dist/FormTemplate-728de82d.js +350 -0
  78. package/dist/GeoJSONLayer-fbf5ee27.js +236 -0
  79. package/dist/GeoJSONSourceWorker-30cd4133.js +247 -0
  80. package/dist/GeoRSSLayer-2addf639.js +73 -0
  81. package/dist/GeoRSSLayerView2D-29c15edb.js +140 -0
  82. package/dist/GeometryUtils-80d3036a.js +403 -0
  83. package/dist/GraphicContainer-2b112072.js +26 -0
  84. package/dist/GraphicManipulator-84ac0573.js +1499 -0
  85. package/dist/GraphicsLayer-ee9f874e.js +38 -0
  86. package/dist/GraphicsLayerView2D-c5eda7d2.js +114 -0
  87. package/dist/GraphicsSnappingSource-3dd1e9b3.js +273 -0
  88. package/dist/GraphicsView2D-40686b59.js +620 -0
  89. package/dist/GroupLayer-fd168a3e.js +147 -0
  90. package/dist/GroupLayerView2D-f4078b54.js +98 -0
  91. package/dist/HUDMaterial.glsl-bea5cb7c.js +65 -0
  92. package/dist/HighlightCounter-b3b4b206.js +41 -0
  93. package/dist/HighlightGraphicContainer-c00c331b.js +18 -0
  94. package/dist/I3SBinaryReader-d3a26893.js +310 -0
  95. package/dist/I3SLayerDefinitions-2bea64c8.js +55 -0
  96. package/dist/I3SUtil-ab1a91f5.js +59 -0
  97. package/dist/IdentityManager-8e14d109.js +899 -0
  98. package/dist/ImageHistogramParameters-711f313f.js +905 -0
  99. package/dist/ImageryLayer-fbaf4d8c.js +1799 -0
  100. package/dist/ImageryLayerView2D-199eb1fd.js +352 -0
  101. package/dist/ImageryTileLayer-48671dc9.js +2157 -0
  102. package/dist/ImageryTileLayerView2D-8ac1ee64.js +1110 -0
  103. package/dist/Indices-2f9cf62d.js +67 -0
  104. package/dist/Input/Input.core.d.ts +4553 -3
  105. package/dist/Input/index.d.ts +4547 -3
  106. package/dist/IntegratedMesh3DTilesLayer-89d862a2.js +112 -0
  107. package/dist/IntegratedMeshLayer-53f792e4.js +141 -0
  108. package/dist/InteractiveAnalysisViewModel-d7dd665d.js +7397 -0
  109. package/dist/InterleavedLayout-ff67e161.js +163 -0
  110. package/dist/KMLLayer-7a4cfa2a.js +162 -0
  111. package/dist/KMLLayerView2D-d0874e8d.js +253 -0
  112. package/dist/KnowledgeGraphLayerView2D-70d956b2.js +43 -0
  113. package/dist/LRUCache-5bebd9a8.js +32 -0
  114. package/dist/LabelClass-63459c37.js +135 -0
  115. package/dist/LabelMetric-09a9cd38.js +400 -0
  116. package/dist/LaserlinePath.glsl-731dbba1.js +64 -0
  117. package/dist/Laserlines.glsl-26d42447.js +65 -0
  118. package/dist/LayerFloorInfo-5c67a822.js +15 -0
  119. package/dist/LayerView-405cecd2.js +206 -0
  120. package/dist/LercWorker-a7892aa0.js +157 -0
  121. package/dist/LineOfSightLayer-abad68f7.js +147 -0
  122. package/dist/LinkChartLayer-c36d2a81.js +1027 -0
  123. package/dist/Lyr3DWorker-8f4c6c50.js +82 -0
  124. package/dist/MagnifierPrograms-ddc85113.js +806 -0
  125. package/dist/MapImageLayer-04f4cdcb.js +169 -0
  126. package/dist/MapImageLayerView2D-712dd60f.js +146 -0
  127. package/dist/MapNotesLayer-83fcba8e.js +283 -0
  128. package/dist/MapNotesLayerView2D-f0ad0a82.js +161 -0
  129. package/dist/MapServiceLayerViewHelper-6c746a26.js +288 -0
  130. package/dist/MeasurementWidgetContent-fc0c1569.js +2642 -0
  131. package/dist/MediaLayer-05162eaf.js +523 -0
  132. package/dist/MediaLayerView2D-474c563b.js +332 -0
  133. package/dist/MemCache-8f96824a.js +227 -0
  134. package/dist/MemorySourceWorker-08562524.js +222 -0
  135. package/dist/Mesh-3208420e.js +980 -0
  136. package/dist/MeshLocalVertexSpace-59268d9e.js +19 -0
  137. package/dist/MultiOriginJSONSupport-365740bb.js +158 -0
  138. package/dist/OGCFeatureLayer-7201d1ee.js +211 -0
  139. package/dist/OGCFeatureLayerView2D-d242f130.js +82 -0
  140. package/dist/ObjectStack-bad354ab.js +21 -0
  141. package/dist/Octree-cbaefa65.js +495 -0
  142. package/dist/OpenStreetMapLayer-b3c8020b.js +30 -0
  143. package/dist/OperationalLayer-30f48d16.js +44 -0
  144. package/dist/OrderByInfo-9bd0a8fe.js +16 -0
  145. package/dist/OrderedLayer-2962d196.js +26 -0
  146. package/dist/OrientedImageryLayer-5d599e15.js +216 -0
  147. package/dist/OverlayCompositing.glsl-334c68d5.js +65 -0
  148. package/dist/OverrideHelper-7981ecc2.js +242 -0
  149. package/dist/PBFDecoderWorker-48f7e620.js +213 -0
  150. package/dist/PointCloudLayer-5b804571.js +197 -0
  151. package/dist/PointCloudUniqueValueRenderer-9ef1db42.js +115 -0
  152. package/dist/PointCloudWorker-9e88daea.js +212 -0
  153. package/dist/PooledRBush-afceba5f.js +272 -0
  154. package/dist/Popup-89e3fd56.js +3990 -0
  155. package/dist/PortalLayer-21d22eb9.js +126 -0
  156. package/dist/Program-09ee8c67.js +694 -0
  157. package/dist/ProgramTemplate-be811b23.js +35 -0
  158. package/dist/ProgressBar/ProgressBar.d.ts +13 -1
  159. package/dist/QueryEngine-810a7f24.js +896 -0
  160. package/dist/QueryTask-013cc810.js +119 -0
  161. package/dist/RasterSymbolizer-ae063ee7.js +3024 -0
  162. package/dist/RasterVFDisplayObject-fe2f7ea2.js +581 -0
  163. package/dist/RasterWorker-7efcbd4d.js +78 -0
  164. package/dist/RawBlockCache-5a644219.js +185 -0
  165. package/dist/RealisticTree.glsl-4e33ae57.js +42 -0
  166. package/dist/RefreshableLayer-e64dd0ee.js +80 -0
  167. package/dist/RefreshableLayerView-61f7dd9a.js +16 -0
  168. package/dist/Relationship-adcdce15.js +64 -0
  169. package/dist/RelationshipQuery-0c20b8ed.js +22 -0
  170. package/dist/RenderingContext-29b578ca.js +889 -0
  171. package/dist/RibbonLine.glsl-038f5cac.js +65 -0
  172. package/dist/RouteLayer-479e0ccc.js +786 -0
  173. package/dist/RouteLayerView2D-1a646f54.js +195 -0
  174. package/dist/SDFHelper-9abcbcca.js +140 -0
  175. package/dist/SSAO.glsl-5d41f99f.js +43 -0
  176. package/dist/SSAOBlur.glsl-7ebf8f5c.js +42 -0
  177. package/dist/ScaleRangeLayer-3bbd6ead.js +21 -0
  178. package/dist/SceneLayer-b19fa11e.js +542 -0
  179. package/dist/SceneLayerSnappingSource-f53ddd8a.js +218 -0
  180. package/dist/SceneLayerSnappingSourceWorker-80f48214.js +112 -0
  181. package/dist/SceneLayerWorker-bab8aeb0.js +164 -0
  182. package/dist/SceneService-0c4fac79.js +215 -0
  183. package/dist/Scheduler-9db9a8cf.js +373 -0
  184. package/dist/Search/Search.d.ts +99 -0
  185. package/dist/Search/index.d.ts +1 -0
  186. package/dist/Search/test.mocks.d.ts +3 -0
  187. package/dist/Search/utils.d.ts +3 -0
  188. package/dist/Select/Item/Item.d.ts +1 -1
  189. package/dist/Select/Multiple/Select.multiple.d.ts +3 -3
  190. package/dist/Select/Select.core.d.ts +1 -1
  191. package/dist/Select/index.d.ts +3 -3
  192. package/dist/ShadedColorMaterial.glsl-a2dd0bb3.js +64 -0
  193. package/dist/SnappingOperation-25ff52da.js +48 -0
  194. package/dist/SourceLayerData-ec301fa4.js +116 -0
  195. package/dist/SpatialFilter-351a1d5e.js +1701 -0
  196. package/dist/Stop-595501a7.js +281 -0
  197. package/dist/StreamLayer-d5ebd4d3.js +188 -0
  198. package/dist/StreamLayerView2D-8a39daaa.js +164 -0
  199. package/dist/StyleRepository-dd283243.js +2212 -0
  200. package/dist/SublayersOwner-0be88fd0.js +545 -0
  201. package/dist/SubtypeGroupLayer-8386c037.js +514 -0
  202. package/dist/SubtypeGroupLayerView2D-97b63aa1.js +84 -0
  203. package/dist/Tabs/Tab/Tab.d.ts +3 -3
  204. package/dist/Tag/Tag.d.ts +52 -0
  205. package/dist/TechniqueInstance-87f77cd3.js +233 -0
  206. package/dist/TemporalLayer-7c15b8a6.js +23 -0
  207. package/dist/Texture-c1f5f21b.js +501 -0
  208. package/dist/TextureOnly.glsl-acae1d94.js +65 -0
  209. package/dist/Theme-72a69427.js +3426 -0
  210. package/dist/Tick-d7f9b999.js +723 -0
  211. package/dist/TileContainer-20f11bc5.js +31 -0
  212. package/dist/TileInfoTilemapCache-a50aaed0.js +38 -0
  213. package/dist/TileLayer-ce04649f.js +194 -0
  214. package/dist/TileLayerView2D-0f45ff75.js +187 -0
  215. package/dist/TilemapCache-95b53d5a.js +189 -0
  216. package/dist/TimeInfo-f17e0ff9.js +42 -0
  217. package/dist/TimeOnly-63922f1a.js +706 -0
  218. package/dist/Tooltip-a21a6650.js +138 -0
  219. package/dist/TopFeaturesQuery-9e4228e7.js +32 -0
  220. package/dist/TurboLine-aeb14d6e.js +565 -0
  221. package/dist/UniqueValueRenderer-7532473e.js +1039 -0
  222. package/dist/UnknownLayer-99d4832b.js +30 -0
  223. package/dist/UnknownTimeZone-4c0a5184.js +15 -0
  224. package/dist/UnsupportedLayer-f439265c.js +31 -0
  225. package/dist/UpdateTracking2D-a1164b3d.js +8566 -0
  226. package/dist/Upload/Upload.d.ts +91 -14
  227. package/dist/Upload/index.d.ts +1 -1
  228. package/dist/Util-26f81cc4.js +57 -0
  229. package/dist/VectorTileLayer-8b5289d2.js +544 -0
  230. package/dist/VectorTileLayerView2D-00d98337.js +2108 -0
  231. package/dist/Version-2556ea28.js +33 -0
  232. package/dist/VertexArrayObject-5595c535.js +73 -0
  233. package/dist/VertexColor.glsl-01eb58bb.js +2683 -0
  234. package/dist/VertexSnappingCandidate-c1e2992a.js +13 -0
  235. package/dist/VideoLayerView2D-e92c8bab.js +124 -0
  236. package/dist/VoxelLayer-e57c2b7b.js +631 -0
  237. package/dist/WFSLayer-486fff2e.js +221 -0
  238. package/dist/WFSSourceWorker-3d8ac573.js +157 -0
  239. package/dist/WGLContainer-1441483b.js +5426 -0
  240. package/dist/WMSLayer-07ea95cc.js +536 -0
  241. package/dist/WMSLayerView2D-8b67d5da.js +117 -0
  242. package/dist/WMTSLayer-b52fbe0c.js +531 -0
  243. package/dist/WMTSLayerView2D-8ca1d522.js +142 -0
  244. package/dist/WebTileLayer-dd24dee2.js +110 -0
  245. package/dist/WhereClause-2eefa48c.js +2766 -0
  246. package/dist/WorkerHandle-f6b5ac7b.js +47 -0
  247. package/dist/WorkerTileHandler-e060fab5.js +1539 -0
  248. package/dist/action-a2d13907.js +198 -0
  249. package/dist/action-group-af071314.js +145 -0
  250. package/dist/action-menu-c759068f.js +1759 -0
  251. package/dist/apng-b33ce902.js +392 -0
  252. package/dist/arcade-b05c8c22.js +229 -0
  253. package/dist/arcadeAsyncRuntime-9b4a7891.js +943 -0
  254. package/dist/arcadeUtils-41691d12.js +8741 -0
  255. package/dist/arcgis-knowledge-client-core-2217ce57.js +1218 -0
  256. package/dist/arcgis-knowledge-client-core-simd-ab44590a.js +1218 -0
  257. package/dist/arcgisLayers-0ea0be85.js +152 -0
  258. package/dist/associatedFeatureServiceUtils-09077513.js +92 -0
  259. package/dist/axisAngleDegrees-1c3d7520.js +49 -0
  260. package/dist/basis_transcoder-292f1aaf.js +1248 -0
  261. package/dist/calcite-action-ad0d1e23.js +22 -0
  262. package/dist/calcite-action-bar-1b2de6d0.js +303 -0
  263. package/dist/calcite-action-group-aacf8ec4.js +28 -0
  264. package/dist/calcite-button-125cbd95.js +228 -0
  265. package/dist/calcite-flow-c9a6e8fa.js +128 -0
  266. package/dist/calcite-flow-item-eb314bb8.js +499 -0
  267. package/dist/calcite-icon-07f22bc6.js +16 -0
  268. package/dist/calcite-input-167be799.js +24 -0
  269. package/dist/calcite-label-7de34a6b.js +79 -0
  270. package/dist/calcite-list-2087f9ca.js +2135 -0
  271. package/dist/calcite-list-item-3419fb5f.js +576 -0
  272. package/dist/calcite-list-item-group-3a6545e3.js +71 -0
  273. package/dist/calcite-loader-16bcfb95.js +14 -0
  274. package/dist/calcite-modal-f608731f.js +333 -0
  275. package/dist/calcite-notice-88ee1edf.js +181 -0
  276. package/dist/calcite-option-375585a2.js +94 -0
  277. package/dist/calcite-scrim-751cf767.js +18 -0
  278. package/dist/calcite-select-62db97da.js +231 -0
  279. package/dist/capabilities-359df394.js +50 -0
  280. package/dist/chartCommon-cceb2530.js +256 -0
  281. package/dist/chartUtilsAm5-08a29408.js +2954 -0
  282. package/dist/clientSideDefaults-b5450c9b.js +39 -0
  283. package/dist/colorRamps-314c4b5a.js +38 -0
  284. package/dist/colorUtils-6e9b620c.js +164 -0
  285. package/dist/commonProperties-3399f319.js +60 -0
  286. package/dist/computeTranslationToOriginAndRotation-0b0f32ad.js +60 -0
  287. package/dist/conditionalSlot-012fd5da.js +27 -0
  288. package/dist/createConnection-f1189f51.js +299 -0
  289. package/dist/dataUtils-950a0ae9.js +1421 -0
  290. package/dist/deduplicate-eabb5f9e.js +89 -0
  291. package/dist/defaults-e5c5ee75.js +31 -0
  292. package/dist/deleteForwardEdits-ea9258ea.js +13 -0
  293. package/dist/diffUtils-04a71a59.js +90 -0
  294. package/dist/drapedUtils-2515520d.js +75 -0
  295. package/dist/earcut-192842ab.js +292 -0
  296. package/dist/edgeProcessing-da003f69.js +252 -0
  297. package/dist/editingSupport-9f04ba1b.js +203 -0
  298. package/dist/editsZScale-97938687.js +37 -0
  299. package/dist/elevationInfoUtils-e1edd62e.js +126 -0
  300. package/dist/executeForIds-3b8a1698.js +14 -0
  301. package/dist/executeForTopCount-6c6cd2f2.js +17 -0
  302. package/dist/executeForTopExtents-86851593.js +17 -0
  303. package/dist/executeForTopIds-24bc9dea.js +17 -0
  304. package/dist/executeQueryJSON-cf7d748b.js +15 -0
  305. package/dist/executeQueryPBF-ad416846.js +152 -0
  306. package/dist/executeRelationshipQuery-9b6666bf.js +53 -0
  307. package/dist/executeTopFeaturesQuery-4ac72bd2.js +18 -0
  308. package/dist/featureConversionUtils-67a121da.js +479 -0
  309. package/dist/featureLayerUtils-a4002773.js +142 -0
  310. package/dist/featureLayerUtils-a7e985d2.js +250 -0
  311. package/dist/featureSetUtils-11fcb3c4.js +2530 -0
  312. package/dist/featuresetbase-47894167.js +707 -0
  313. package/dist/featuresetgeom-bff2aa07.js +99 -0
  314. package/dist/featuresetstats-14a3fe2b.js +81 -0
  315. package/dist/featuresetstring-de2b64db.js +95 -0
  316. package/dist/fetchService-b6d76f5e.js +33 -0
  317. package/dist/fieldProperties-a9fbe289.js +33 -0
  318. package/dist/floatRGBA-2bc6800c.js +20 -0
  319. package/dist/form-e210eee8.js +138 -0
  320. package/dist/geohashUtils-085312a3.js +85 -0
  321. package/dist/geojson-f0bc401a.js +208 -0
  322. package/dist/geomasync-3c3b5e8d.js +567 -0
  323. package/dist/geometryEngine-2772790a.js +192 -0
  324. package/dist/geometryEngineAsync-db2e5674.js +217 -0
  325. package/dist/geometryEngineBase-8b327072.js +18463 -0
  326. package/dist/geometryEngineJSON-95268e88.js +171 -0
  327. package/dist/geometryEngineJSON-fc48a48b.js +46 -0
  328. package/dist/geometryEngineWorker-2fbc65f7.js +11 -0
  329. package/dist/geometryServiceUtils-ed9cb722.js +28 -0
  330. package/dist/georeference-f6f67e9b.js +291 -0
  331. package/dist/gif-a4043534.js +323 -0
  332. package/dist/gltfexport-d028c5c9.js +705 -0
  333. package/dist/groupLayerUtils-22dde377.js +39 -0
  334. package/dist/heatmapUtils-8e578a0a.js +45 -0
  335. package/dist/highlightReasons-ab23926f.js +19 -0
  336. package/dist/hydrated-219f2b0c.js +40 -0
  337. package/dist/i3s-b5ed4851.js +809 -0
  338. package/dist/icon-8711ff33.js +127 -0
  339. package/dist/imageBitmapUtils-dc97b3de.js +23 -0
  340. package/dist/imageUtils-0a71062a.js +69 -0
  341. package/dist/imageUtils-a4c7c9bf.js +89 -0
  342. package/dist/imageryUtils-d21fd540.js +43 -0
  343. package/dist/index-f28919b2.js +43440 -0
  344. package/dist/index.d.ts +3 -0
  345. package/dist/index.js +15 -12
  346. package/dist/input-message-3df877b9.js +92 -0
  347. package/dist/input2-32e36924.js +575 -0
  348. package/dist/interactive-c1e1aeaf.js +80 -0
  349. package/dist/jsonContext-4622e179.js +15 -0
  350. package/dist/jsonUtils-9f58b7bb.js +476 -0
  351. package/dist/jsonUtils-d9bb6102.js +86 -0
  352. package/dist/jsonUtils-e40213c1.js +59 -0
  353. package/dist/kmlUtils-5f8f6cf6.js +112 -0
  354. package/dist/knowledgeGraphService-a34bf3b0.js +739 -0
  355. package/dist/knowledgegraph-68124c78.js +149 -0
  356. package/dist/labelUtils-3a1386e4.js +61 -0
  357. package/dist/labelingInfo-69c9f8f4.js +46 -0
  358. package/dist/layersCreator-5e6fe7f2.js +151 -0
  359. package/dist/layersLoader-f96735c7.js +197 -0
  360. package/dist/lazyLayerLoader-142515c4.js +10 -0
  361. package/dist/lclayout-639ec791.js +773 -0
  362. package/dist/lengthUtils-8796ccf3.js +5 -0
  363. package/dist/lerc-wasm-acb341bd.js +325 -0
  364. package/dist/libtess-a9e7192e.js +269 -0
  365. package/dist/libtess-asm-8de2fb72.js +3673 -0
  366. package/dist/lineSegment-2790f546.js +76 -0
  367. package/dist/loadGLTFMesh-33064e6d.js +181 -0
  368. package/dist/loadable-4558719f.js +24 -0
  369. package/dist/loader-4dbc522d.js +79 -0
  370. package/dist/lyr3DWorker-3365d66f.js +2108 -0
  371. package/dist/mapViewDeps-67ec1d27.js +3052 -0
  372. package/dist/mediaLayerUtils-612838fb.js +35 -0
  373. package/dist/meshFeatureSet-07b96756.js +126 -0
  374. package/dist/meshVertexSpaceUtils-673c2055.js +58 -0
  375. package/dist/multidimensionalUtils-79cc2536.js +290 -0
  376. package/dist/normalizeUtilsSync-9fd98ab4.js +181 -0
  377. package/dist/number-110986f5.js +128 -0
  378. package/dist/objectResourceUtils-1b8d1c03.js +1455 -0
  379. package/dist/observers-507c19a0.js +30 -0
  380. package/dist/ogcFeatureUtils-3c65f06a.js +206 -0
  381. package/dist/openCloseComponent-89dc4d35.js +37 -0
  382. package/dist/orientedBoundingBox-46d44acf.js +447 -0
  383. package/dist/parser-8f715684.js +488 -0
  384. package/dist/pbf-4ce99129.js +215 -0
  385. package/dist/pbfQueryUtils-23cca540.js +422 -0
  386. package/dist/pe-wasm-d186391a.js +887 -0
  387. package/dist/persistable-09062510.js +89 -0
  388. package/dist/perspectiveUtils-9da629d6.js +42 -0
  389. package/dist/pieChart-92709a5c.js +555 -0
  390. package/dist/plane-2b39f8eb.js +160 -0
  391. package/dist/popupUtils-dc099446.js +22 -0
  392. package/dist/popupUtils-e53c5c04.js +50 -0
  393. package/dist/portalItemUtils-39079445.js +57 -0
  394. package/dist/portalLayers-efcd5403.js +312 -0
  395. package/dist/portalUtils-44b1ac04.js +7 -0
  396. package/dist/programUtils-c22a40e2.js +59 -0
  397. package/dist/project-4759dc23.js +21 -0
  398. package/dist/projectPointToVector-1d9098bc.js +14 -0
  399. package/dist/projectVectorToVector-add01592.js +13 -0
  400. package/dist/quantityUtils-afe6e5b7.js +33 -0
  401. package/dist/quantizationUtils-51d3a038.js +68 -0
  402. package/dist/quat-22f56b72.js +104 -0
  403. package/dist/query-8cf3e12b.js +89 -0
  404. package/dist/queryAttachments-0a63ea2f.js +39 -0
  405. package/dist/queryEngineUtils-a1db57f0.js +21 -0
  406. package/dist/queryTopFeatures-b4fb05ad.js +50 -0
  407. package/dist/queryZScale-112cd8e3.js +12 -0
  408. package/dist/rasterProjectionHelper-3ae0fcfd.js +577 -0
  409. package/dist/rasterUtils-6868b6b6.js +122 -0
  410. package/dist/rasterizingUtils-922f43e7.js +46 -0
  411. package/dist/request-fd620c13.js +46 -0
  412. package/dist/requestImageUtils-f8f50ad7.js +8 -0
  413. package/dist/resourceExtension-f0327971.js +17 -0
  414. package/dist/resourceUtils-2e33090d.js +69 -0
  415. package/dist/resourceUtils-db0d7e83.js +42 -0
  416. package/dist/resourceUtils-ff5eafc3.js +62 -0
  417. package/dist/saveAPIKeyUtils-32bb955d.js +8 -0
  418. package/dist/saveUtils-d4ad8f94.js +24 -0
  419. package/dist/scaleUtils-a3ce8cc6.js +23 -0
  420. package/dist/scrim-7ef1cdf5.js +114 -0
  421. package/dist/serviceCapabilitiesUtils-cafdd4bc.js +64 -0
  422. package/dist/sourceUtils-1a30f8aa.js +71 -0
  423. package/dist/sphere-84d1e36b.js +199 -0
  424. package/dist/statsWorker-efb7a41b.js +37 -0
  425. package/dist/streamLayerUtils-4c5b417e.js +31 -0
  426. package/dist/style.css +1 -1
  427. package/dist/styleUtils-8f0e3848.js +75 -0
  428. package/dist/styleUtils-a61894cc.js +14 -0
  429. package/dist/sublayerUtils-aaa67481.js +37 -0
  430. package/dist/substitute-7b4a925f.js +52 -0
  431. package/dist/symbolColorUtils-45615b74.js +8 -0
  432. package/dist/symbolLayerUtils-6ee325f3.js +31 -0
  433. package/dist/symbologySnappingCandidates-a56c7bbb.js +221 -0
  434. package/dist/t9n-b5ab99e4.js +349 -0
  435. package/dist/testSVGPremultipliedAlpha-a89a8569.js +94 -0
  436. package/dist/timeSupport-76d5ec0e.js +410 -0
  437. package/dist/triangle-95e355d3.js +98 -0
  438. package/dist/unitConversionUtils-b0c2c156.js +17 -0
  439. package/dist/unitFormatUtils-b79fea5c.js +40 -0
  440. package/dist/uploadAssetErrors-7ef907ce.js +70 -0
  441. package/dist/uploadAssets-99a2ec95.js +330 -0
  442. package/dist/utils-0da4a164.js +419 -0
  443. package/dist/utils-0e163cdb.js +433 -0
  444. package/dist/utils-421c60f9.js +73 -0
  445. package/dist/utils-6e4fc34d.js +91 -0
  446. package/dist/utils-9612bce6.js +34 -0
  447. package/dist/utils-99bb2971.js +2746 -0
  448. package/dist/utils-d1f92cf8.js +79 -0
  449. package/dist/utils-e30b7de3.js +232 -0
  450. package/dist/utils3-41d8e55d.js +75 -0
  451. package/dist/vec3-ab2339d6.js +81 -0
  452. package/dist/vec42-1a7bd7a6.js +125 -0
  453. package/dist/versionUtils-b6c13869.js +161 -0
  454. package/dist/visualVariableUtils-1a38c540.js +267 -0
  455. package/dist/webStyleSymbolUtils-6f89a405.js +48 -0
  456. package/dist/webglDeps-dcb6738a.js +23 -0
  457. package/dist/wfsUtils-d679c9b9.js +343 -0
  458. package/dist/workerHelper-8fb7376f.js +11 -0
  459. package/dist/xyChart-b3c4e27e.js +3335 -0
  460. package/package.json +1 -1
  461. package/dist/AGraphicContainer-98a4c8a4.js +0 -109
  462. package/dist/APIKeyMixin-9511e0a5.js +0 -19
  463. package/dist/Analysis-4b1d1fb5.js +0 -31
  464. package/dist/ArcGISCachedService-93e2cb27.js +0 -47
  465. package/dist/ArcGISService-3f8d89c1.js +0 -25
  466. package/dist/AreaMeasurement2D-e0bb230c.js +0 -405
  467. package/dist/AreaMeasurement3D-a9959ecf.js +0 -488
  468. package/dist/AttachmentInfo-601c56e2.js +0 -34
  469. package/dist/AttachmentQuery-3504d550.js +0 -18
  470. package/dist/AttributeStore-b90878e3.js +0 -1707
  471. package/dist/BaseDynamicLayerView2D-b2faf028.js +0 -63
  472. package/dist/BingMapsLayer-5d79fe2b.js +0 -112
  473. package/dist/Bitmap-f775c851.js +0 -128
  474. package/dist/BitmapContainer-af5942b8.js +0 -23
  475. package/dist/BlendLayer-a792edf6.js +0 -13
  476. package/dist/BoundsStore-789624df.js +0 -63
  477. package/dist/BufferObject-cbd0168e.js +0 -100
  478. package/dist/BufferView-004ad517.js +0 -683
  479. package/dist/BuildingSceneLayer-25bc760b.js +0 -535
  480. package/dist/Button-70963624.js +0 -36
  481. package/dist/CSVLayer-fd3b6750.js +0 -208
  482. package/dist/CSVSourceWorker-eb24cd85.js +0 -367
  483. package/dist/CatalogDynamicGroupLayerView2D-dfc700a4.js +0 -66
  484. package/dist/CatalogFootprintLayerView2D-6eb16597.js +0 -76
  485. package/dist/CatalogLayer-1cc632fe.js +0 -262
  486. package/dist/CatalogLayerView2D-d143aa34.js +0 -52
  487. package/dist/ClassBreaksDefinition-07ba0c64.js +0 -18
  488. package/dist/ColorMaterial.glsl-e7801766.js +0 -64
  489. package/dist/ColorSet-df5696b5.js +0 -45
  490. package/dist/ColorStop-7187f368.js +0 -29
  491. package/dist/Container-ac97765a.js +0 -521
  492. package/dist/CustomParametersMixin-b3432b3e.js +0 -12
  493. package/dist/DefaultMaterial.glsl-3cc4efe7.js +0 -42
  494. package/dist/DefaultMaterial_COLOR_GAMMA-337c63aa.js +0 -653
  495. package/dist/DefaultTheme-12dffc66.js +0 -130
  496. package/dist/DeleteForwardEditsParameters-ae76d898.js +0 -18
  497. package/dist/DimensionLayer-9eb47c76.js +0 -129
  498. package/dist/DirectLineMeasurement3D-e9903136.js +0 -449
  499. package/dist/DistanceMeasurement2D-a4853462.js +0 -303
  500. package/dist/DoubleArray-5076283e.js +0 -25
  501. package/dist/EdgeProcessingWorker-c1783ddd.js +0 -63
  502. package/dist/EditBusLayer-e812f4c9.js +0 -107
  503. package/dist/ElevationInfo-fad03d5e.js +0 -56
  504. package/dist/ElevationLayer-397792d5.js +0 -129
  505. package/dist/ElevationQuery-beceb62f.js +0 -598
  506. package/dist/ElevationSamplerWorker-0048a204.js +0 -62
  507. package/dist/ExportImageParameters-c6c4bc61.js +0 -66
  508. package/dist/ExportStrategy-908f5b8d.js +0 -93
  509. package/dist/ExportWMSImageParameters-34da6b46.js +0 -33
  510. package/dist/External-14daf0c1.js +0 -110
  511. package/dist/FeatureCollectionSnappingSource-f97a1829.js +0 -130
  512. package/dist/FeatureCommandQueue-d4817eac.js +0 -1244
  513. package/dist/FeatureEffect-08976bbd.js +0 -39
  514. package/dist/FeatureEffectLayer-05c258f4.js +0 -13
  515. package/dist/FeatureFilter-8c5e44b1.js +0 -27
  516. package/dist/FeatureLayer-d3659466.js +0 -693
  517. package/dist/FeatureLayerBase-9b63f732.js +0 -148
  518. package/dist/FeatureLayerSource-960f1c01.js +0 -444
  519. package/dist/FeatureLayerView2D-7503e1ed.js +0 -1967
  520. package/dist/FeaturePipelineWorker-d4301d2a.js +0 -3633
  521. package/dist/FeatureReductionLayer-e6cf73ac.js +0 -225
  522. package/dist/FeatureReductionSelection-d90249a7.js +0 -22
  523. package/dist/FeatureServiceSnappingSource-9e49ca72.js +0 -481
  524. package/dist/FeatureServiceSnappingSourceWorker-39b093b3.js +0 -747
  525. package/dist/FeatureSet-d79f0e48.js +0 -188
  526. package/dist/FeatureStore-eb4b87c0.js +0 -131
  527. package/dist/FeatureTemplate-edb1b782.js +0 -12
  528. package/dist/FeatureType-bba29adb.js +0 -25
  529. package/dist/FieldsIndex-75cca4d0.js +0 -109
  530. package/dist/FormTemplate-22911c47.js +0 -350
  531. package/dist/GeoJSONLayer-b33c96b8.js +0 -236
  532. package/dist/GeoJSONSourceWorker-b04ff552.js +0 -247
  533. package/dist/GeoRSSLayer-6e5fcd0e.js +0 -73
  534. package/dist/GeoRSSLayerView2D-21b6b12e.js +0 -140
  535. package/dist/GeometryUtils-fa897cbd.js +0 -403
  536. package/dist/GraphicContainer-1fd6bfce.js +0 -26
  537. package/dist/GraphicManipulator-f3b7dc9b.js +0 -1499
  538. package/dist/GraphicsLayer-e0686779.js +0 -38
  539. package/dist/GraphicsLayerView2D-a7eba2fe.js +0 -114
  540. package/dist/GraphicsSnappingSource-594f402a.js +0 -273
  541. package/dist/GraphicsView2D-347562b8.js +0 -620
  542. package/dist/GroupLayer-7ae0a916.js +0 -147
  543. package/dist/GroupLayerView2D-ffcde606.js +0 -98
  544. package/dist/HUDMaterial.glsl-b0a3e0ce.js +0 -65
  545. package/dist/HighlightCounter-e18f0179.js +0 -41
  546. package/dist/HighlightGraphicContainer-fd774cea.js +0 -18
  547. package/dist/I3SBinaryReader-190e99de.js +0 -310
  548. package/dist/I3SLayerDefinitions-6ddaca60.js +0 -55
  549. package/dist/I3SUtil-44b83dc0.js +0 -59
  550. package/dist/IdentityManager-fbe91c13.js +0 -899
  551. package/dist/ImageHistogramParameters-d64fd9c8.js +0 -905
  552. package/dist/ImageryLayer-67878a78.js +0 -1799
  553. package/dist/ImageryLayerView2D-ae45faba.js +0 -352
  554. package/dist/ImageryTileLayer-9dca8b93.js +0 -2157
  555. package/dist/ImageryTileLayerView2D-977f66aa.js +0 -1110
  556. package/dist/Indices-e6dc3b15.js +0 -67
  557. package/dist/IntegratedMesh3DTilesLayer-8811e7bf.js +0 -112
  558. package/dist/IntegratedMeshLayer-9162c0b5.js +0 -141
  559. package/dist/InteractiveAnalysisViewModel-b046fcb9.js +0 -7397
  560. package/dist/InterleavedLayout-32973c8a.js +0 -163
  561. package/dist/KMLLayer-80f81df7.js +0 -162
  562. package/dist/KMLLayerView2D-b6ba3b80.js +0 -253
  563. package/dist/KnowledgeGraphLayerView2D-ae91bd81.js +0 -43
  564. package/dist/LRUCache-27e8c401.js +0 -32
  565. package/dist/LabelClass-d9a476d6.js +0 -135
  566. package/dist/LabelMetric-e2728bbf.js +0 -400
  567. package/dist/LaserlinePath.glsl-60d00e61.js +0 -64
  568. package/dist/Laserlines.glsl-499a6cbf.js +0 -65
  569. package/dist/LayerFloorInfo-d05cf9dd.js +0 -15
  570. package/dist/LayerView-036988a9.js +0 -206
  571. package/dist/LercWorker-b1b4bb47.js +0 -157
  572. package/dist/LineOfSightLayer-9a9a60b7.js +0 -147
  573. package/dist/LinkChartLayer-d61803bb.js +0 -1027
  574. package/dist/Lyr3DWorker-87be14e0.js +0 -82
  575. package/dist/MagnifierPrograms-da7a27ab.js +0 -806
  576. package/dist/MapImageLayer-f07adf1a.js +0 -169
  577. package/dist/MapImageLayerView2D-d1b140c3.js +0 -146
  578. package/dist/MapNotesLayer-c662d147.js +0 -283
  579. package/dist/MapNotesLayerView2D-bf9ac698.js +0 -161
  580. package/dist/MapServiceLayerViewHelper-fb724de9.js +0 -288
  581. package/dist/MeasurementWidgetContent-e4888ef2.js +0 -2642
  582. package/dist/MediaLayer-36d873a3.js +0 -523
  583. package/dist/MediaLayerView2D-e58b8ec0.js +0 -332
  584. package/dist/MemCache-a9232ec2.js +0 -227
  585. package/dist/MemorySourceWorker-20ff27d6.js +0 -222
  586. package/dist/Mesh-3839826a.js +0 -980
  587. package/dist/MeshLocalVertexSpace-00151564.js +0 -19
  588. package/dist/MultiOriginJSONSupport-bb258670.js +0 -158
  589. package/dist/OGCFeatureLayer-2a8b7ecc.js +0 -211
  590. package/dist/OGCFeatureLayerView2D-185f9649.js +0 -82
  591. package/dist/ObjectStack-10d91171.js +0 -21
  592. package/dist/Octree-78797046.js +0 -495
  593. package/dist/OpenStreetMapLayer-b0a17790.js +0 -30
  594. package/dist/OperationalLayer-55af27d6.js +0 -44
  595. package/dist/OrderByInfo-22e3c805.js +0 -16
  596. package/dist/OrderedLayer-1403a591.js +0 -26
  597. package/dist/OrientedImageryLayer-8ec8d7d1.js +0 -216
  598. package/dist/OverlayCompositing.glsl-ba3bd81d.js +0 -65
  599. package/dist/OverrideHelper-82325a2c.js +0 -242
  600. package/dist/PBFDecoderWorker-f6517afc.js +0 -213
  601. package/dist/PointCloudLayer-cff43a10.js +0 -197
  602. package/dist/PointCloudUniqueValueRenderer-f337a895.js +0 -115
  603. package/dist/PointCloudWorker-cdb28dc1.js +0 -212
  604. package/dist/PooledRBush-ee4e60af.js +0 -272
  605. package/dist/Popup-c7f55588.js +0 -3990
  606. package/dist/PortalLayer-07b3c53e.js +0 -126
  607. package/dist/Program-ba2f18b2.js +0 -694
  608. package/dist/ProgramTemplate-eee4f097.js +0 -35
  609. package/dist/QueryEngine-10c97624.js +0 -896
  610. package/dist/QueryTask-115430b6.js +0 -119
  611. package/dist/RasterSymbolizer-fbf433fe.js +0 -3024
  612. package/dist/RasterVFDisplayObject-20b0dd86.js +0 -581
  613. package/dist/RasterWorker-44c37e20.js +0 -78
  614. package/dist/RawBlockCache-25203dbd.js +0 -185
  615. package/dist/RealisticTree.glsl-bc07c4dc.js +0 -42
  616. package/dist/RefreshableLayer-9550b85a.js +0 -80
  617. package/dist/RefreshableLayerView-601f7038.js +0 -16
  618. package/dist/Relationship-c662830e.js +0 -64
  619. package/dist/RelationshipQuery-765f068e.js +0 -22
  620. package/dist/RenderingContext-3db74548.js +0 -889
  621. package/dist/RibbonLine.glsl-c6a715b7.js +0 -65
  622. package/dist/RouteLayer-3f5411f3.js +0 -786
  623. package/dist/RouteLayerView2D-a5fd4cbf.js +0 -195
  624. package/dist/SDFHelper-a34e90ee.js +0 -140
  625. package/dist/SSAO.glsl-5491a708.js +0 -43
  626. package/dist/SSAOBlur.glsl-f3068b8e.js +0 -42
  627. package/dist/ScaleRangeLayer-7ddf00b4.js +0 -21
  628. package/dist/SceneLayer-c594bfc3.js +0 -542
  629. package/dist/SceneLayerSnappingSource-a0504ac7.js +0 -218
  630. package/dist/SceneLayerSnappingSourceWorker-a04d6692.js +0 -112
  631. package/dist/SceneLayerWorker-1865768e.js +0 -164
  632. package/dist/SceneService-fb9f0142.js +0 -215
  633. package/dist/Scheduler-eacc84bb.js +0 -373
  634. package/dist/ShadedColorMaterial.glsl-db97956b.js +0 -64
  635. package/dist/SnappingOperation-9622a00d.js +0 -48
  636. package/dist/SourceLayerData-7016f1a5.js +0 -116
  637. package/dist/SpatialFilter-d20d4f50.js +0 -1701
  638. package/dist/Stop-68022e32.js +0 -281
  639. package/dist/StreamLayer-7c837e3d.js +0 -188
  640. package/dist/StreamLayerView2D-586f5a6a.js +0 -164
  641. package/dist/StyleRepository-fba75e70.js +0 -2212
  642. package/dist/SublayersOwner-3dc574cd.js +0 -545
  643. package/dist/SubtypeGroupLayer-1f9c5398.js +0 -514
  644. package/dist/SubtypeGroupLayerView2D-0f108d9d.js +0 -84
  645. package/dist/TechniqueInstance-0481dbff.js +0 -233
  646. package/dist/TemporalLayer-8116b4a4.js +0 -23
  647. package/dist/Texture-22a8cca5.js +0 -501
  648. package/dist/TextureOnly.glsl-458f8148.js +0 -65
  649. package/dist/Theme-f05b8eb0.js +0 -3426
  650. package/dist/Tick-aef93b48.js +0 -723
  651. package/dist/TileContainer-0bf0ea1b.js +0 -31
  652. package/dist/TileInfoTilemapCache-d78858c0.js +0 -38
  653. package/dist/TileLayer-0edee064.js +0 -194
  654. package/dist/TileLayerView2D-78d5801b.js +0 -187
  655. package/dist/TilemapCache-79699d61.js +0 -189
  656. package/dist/TimeInfo-40c96ade.js +0 -42
  657. package/dist/TimeOnly-9ee66ca6.js +0 -706
  658. package/dist/Tooltip-e7498dc9.js +0 -138
  659. package/dist/TopFeaturesQuery-ad224e01.js +0 -32
  660. package/dist/TurboLine-6ab04aef.js +0 -565
  661. package/dist/UniqueValueRenderer-eaa5f8a6.js +0 -1039
  662. package/dist/UnknownLayer-e280ddd4.js +0 -30
  663. package/dist/UnknownTimeZone-220952b5.js +0 -15
  664. package/dist/UnsupportedLayer-447f7676.js +0 -31
  665. package/dist/UpdateTracking2D-e9adad8f.js +0 -8566
  666. package/dist/Util-002f5109.js +0 -57
  667. package/dist/VectorTileLayer-3210be81.js +0 -544
  668. package/dist/VectorTileLayerView2D-6a51e3b8.js +0 -2108
  669. package/dist/Version-3de8cbca.js +0 -33
  670. package/dist/VertexArrayObject-07998745.js +0 -73
  671. package/dist/VertexColor.glsl-e415cf02.js +0 -2683
  672. package/dist/VertexSnappingCandidate-b676241f.js +0 -13
  673. package/dist/VideoLayerView2D-f659dd0d.js +0 -124
  674. package/dist/VoxelLayer-003f82ff.js +0 -631
  675. package/dist/WFSLayer-3da6c5f7.js +0 -221
  676. package/dist/WFSSourceWorker-9a11693a.js +0 -157
  677. package/dist/WGLContainer-3d159b63.js +0 -5426
  678. package/dist/WMSLayer-fc0632f8.js +0 -536
  679. package/dist/WMSLayerView2D-54e80e1b.js +0 -117
  680. package/dist/WMTSLayer-9324b12b.js +0 -531
  681. package/dist/WMTSLayerView2D-3ef936db.js +0 -142
  682. package/dist/WebTileLayer-45c563ff.js +0 -110
  683. package/dist/WhereClause-7a28b740.js +0 -2766
  684. package/dist/WorkerHandle-0d54a6c7.js +0 -47
  685. package/dist/WorkerTileHandler-786c2b24.js +0 -1539
  686. package/dist/action-163397e3.js +0 -198
  687. package/dist/action-group-4859fb97.js +0 -145
  688. package/dist/action-menu-2d70b2fc.js +0 -1759
  689. package/dist/apng-9b71d52c.js +0 -392
  690. package/dist/arcade-fa309282.js +0 -229
  691. package/dist/arcadeAsyncRuntime-738498fd.js +0 -943
  692. package/dist/arcadeUtils-f71d80fa.js +0 -8741
  693. package/dist/arcgis-knowledge-client-core-6056bcea.js +0 -1218
  694. package/dist/arcgis-knowledge-client-core-simd-9bc1f83e.js +0 -1218
  695. package/dist/arcgisLayers-b2b878bd.js +0 -152
  696. package/dist/associatedFeatureServiceUtils-df5b5187.js +0 -92
  697. package/dist/axisAngleDegrees-32643b7c.js +0 -49
  698. package/dist/basis_transcoder-3187cc92.js +0 -1248
  699. package/dist/calcite-action-bar-5a87c23c.js +0 -303
  700. package/dist/calcite-action-ee2ca847.js +0 -22
  701. package/dist/calcite-action-group-19aa86ee.js +0 -28
  702. package/dist/calcite-button-8e9175c0.js +0 -228
  703. package/dist/calcite-flow-57d26d2d.js +0 -128
  704. package/dist/calcite-flow-item-4a3e3fc0.js +0 -499
  705. package/dist/calcite-icon-d99e280a.js +0 -16
  706. package/dist/calcite-input-28b20785.js +0 -24
  707. package/dist/calcite-label-4f30e08d.js +0 -79
  708. package/dist/calcite-list-0cee7628.js +0 -2135
  709. package/dist/calcite-list-item-0a19efa8.js +0 -576
  710. package/dist/calcite-list-item-group-0706662f.js +0 -71
  711. package/dist/calcite-loader-865045b1.js +0 -14
  712. package/dist/calcite-modal-3e4da6fd.js +0 -333
  713. package/dist/calcite-notice-50b74ab7.js +0 -181
  714. package/dist/calcite-option-713c1d40.js +0 -94
  715. package/dist/calcite-scrim-809fbd0b.js +0 -18
  716. package/dist/calcite-select-28d8edfc.js +0 -231
  717. package/dist/capabilities-c8f838be.js +0 -50
  718. package/dist/chartCommon-13718cda.js +0 -256
  719. package/dist/chartUtilsAm5-6be145fb.js +0 -2954
  720. package/dist/clientSideDefaults-5c1f97c9.js +0 -39
  721. package/dist/colorRamps-8792655e.js +0 -38
  722. package/dist/colorUtils-54f4b662.js +0 -164
  723. package/dist/commonProperties-f9559903.js +0 -60
  724. package/dist/computeTranslationToOriginAndRotation-4876cb93.js +0 -60
  725. package/dist/conditionalSlot-87175989.js +0 -27
  726. package/dist/createConnection-f974a00a.js +0 -299
  727. package/dist/dataUtils-7c276b73.js +0 -1421
  728. package/dist/deduplicate-59fb9cac.js +0 -89
  729. package/dist/defaults-2bfa4a36.js +0 -31
  730. package/dist/deleteForwardEdits-f653b513.js +0 -13
  731. package/dist/diffUtils-e71a6152.js +0 -90
  732. package/dist/drapedUtils-b42fcbc6.js +0 -75
  733. package/dist/earcut-6fa1a128.js +0 -292
  734. package/dist/edgeProcessing-2ff1f201.js +0 -252
  735. package/dist/editingSupport-68545668.js +0 -203
  736. package/dist/editsZScale-c7cdd215.js +0 -37
  737. package/dist/elevationInfoUtils-5456a079.js +0 -126
  738. package/dist/executeForIds-4ab75c0d.js +0 -14
  739. package/dist/executeForTopCount-7e095ec1.js +0 -17
  740. package/dist/executeForTopExtents-19daf9d0.js +0 -17
  741. package/dist/executeForTopIds-1ba3a4af.js +0 -17
  742. package/dist/executeQueryJSON-46168866.js +0 -15
  743. package/dist/executeQueryPBF-d8623daf.js +0 -152
  744. package/dist/executeRelationshipQuery-011dfb45.js +0 -53
  745. package/dist/executeTopFeaturesQuery-02166801.js +0 -18
  746. package/dist/featureConversionUtils-650d7601.js +0 -479
  747. package/dist/featureLayerUtils-64e09283.js +0 -142
  748. package/dist/featureLayerUtils-b07f9c11.js +0 -250
  749. package/dist/featureSetUtils-9d37d6f8.js +0 -2530
  750. package/dist/featuresetbase-62aeb079.js +0 -707
  751. package/dist/featuresetgeom-51f9fc4e.js +0 -99
  752. package/dist/featuresetstats-4db32894.js +0 -81
  753. package/dist/featuresetstring-990c3287.js +0 -95
  754. package/dist/fetchService-5198dd4a.js +0 -33
  755. package/dist/fieldProperties-edfa24cb.js +0 -33
  756. package/dist/floatRGBA-516d7961.js +0 -20
  757. package/dist/form-99719d52.js +0 -138
  758. package/dist/geohashUtils-2bc76440.js +0 -85
  759. package/dist/geojson-603231df.js +0 -208
  760. package/dist/geomasync-e9063b4c.js +0 -567
  761. package/dist/geometryEngine-d3bb2fd6.js +0 -192
  762. package/dist/geometryEngineAsync-55aa6170.js +0 -217
  763. package/dist/geometryEngineBase-527e8b63.js +0 -18463
  764. package/dist/geometryEngineJSON-28087174.js +0 -46
  765. package/dist/geometryEngineJSON-d54949f9.js +0 -171
  766. package/dist/geometryEngineWorker-dc2c7127.js +0 -11
  767. package/dist/geometryServiceUtils-6a3e1e93.js +0 -28
  768. package/dist/georeference-ed8b2c30.js +0 -291
  769. package/dist/gif-204e82dd.js +0 -323
  770. package/dist/gltfexport-b2566542.js +0 -705
  771. package/dist/groupLayerUtils-ea9e6359.js +0 -39
  772. package/dist/heatmapUtils-56758920.js +0 -45
  773. package/dist/highlightReasons-de432106.js +0 -19
  774. package/dist/hydrated-0e1c7565.js +0 -40
  775. package/dist/i3s-bb0b5b67.js +0 -809
  776. package/dist/icon-c6e3bd23.js +0 -127
  777. package/dist/imageBitmapUtils-881d8c64.js +0 -23
  778. package/dist/imageUtils-57eeedc5.js +0 -69
  779. package/dist/imageUtils-ef69c578.js +0 -89
  780. package/dist/imageryUtils-23f51cb1.js +0 -43
  781. package/dist/index-01c737ed.js +0 -42563
  782. package/dist/input-message-673a9baa.js +0 -92
  783. package/dist/input2-bbf6454e.js +0 -575
  784. package/dist/interactive-aeb2cb9f.js +0 -80
  785. package/dist/jsonContext-2dc288b1.js +0 -15
  786. package/dist/jsonUtils-1abd4bfc.js +0 -59
  787. package/dist/jsonUtils-913fa1bd.js +0 -86
  788. package/dist/jsonUtils-f6a5e63b.js +0 -476
  789. package/dist/kmlUtils-7c2744fe.js +0 -112
  790. package/dist/knowledgeGraphService-6a349e04.js +0 -739
  791. package/dist/knowledgegraph-c91b0bb2.js +0 -149
  792. package/dist/labelUtils-a3634e8f.js +0 -61
  793. package/dist/labelingInfo-568c9210.js +0 -46
  794. package/dist/layersCreator-4a5366ea.js +0 -151
  795. package/dist/layersLoader-b87d4857.js +0 -197
  796. package/dist/lazyLayerLoader-8817000c.js +0 -10
  797. package/dist/lclayout-64c67b4e.js +0 -773
  798. package/dist/lengthUtils-695e744c.js +0 -5
  799. package/dist/lerc-wasm-13192bf3.js +0 -325
  800. package/dist/libtess-asm-4883179d.js +0 -3673
  801. package/dist/libtess-fc70d1ce.js +0 -269
  802. package/dist/lineSegment-3aa941f5.js +0 -76
  803. package/dist/loadGLTFMesh-db6645f5.js +0 -181
  804. package/dist/loadable-266f324b.js +0 -24
  805. package/dist/loader-d1ce1bc1.js +0 -79
  806. package/dist/lyr3DWorker-dd48e619.js +0 -2108
  807. package/dist/mapViewDeps-226d9da3.js +0 -3052
  808. package/dist/mediaLayerUtils-ae485c27.js +0 -35
  809. package/dist/meshFeatureSet-8a2ad011.js +0 -126
  810. package/dist/meshVertexSpaceUtils-6efe3dcc.js +0 -58
  811. package/dist/multidimensionalUtils-508a3f3f.js +0 -290
  812. package/dist/normalizeUtilsSync-1dae280b.js +0 -181
  813. package/dist/number-5aa3a81b.js +0 -128
  814. package/dist/objectResourceUtils-642ab03e.js +0 -1455
  815. package/dist/observers-f646a6a4.js +0 -30
  816. package/dist/ogcFeatureUtils-46ac1c44.js +0 -206
  817. package/dist/openCloseComponent-47eb52c6.js +0 -37
  818. package/dist/orientedBoundingBox-554ccdc6.js +0 -447
  819. package/dist/parser-0701286c.js +0 -488
  820. package/dist/pbf-5dd791f5.js +0 -215
  821. package/dist/pbfQueryUtils-a6ca7e23.js +0 -422
  822. package/dist/pe-wasm-6c16b121.js +0 -887
  823. package/dist/persistable-9eb0e8df.js +0 -89
  824. package/dist/perspectiveUtils-b194621d.js +0 -42
  825. package/dist/pieChart-b97433d0.js +0 -555
  826. package/dist/plane-3398eec1.js +0 -160
  827. package/dist/popupUtils-c444b896.js +0 -22
  828. package/dist/popupUtils-d871563b.js +0 -50
  829. package/dist/portalItemUtils-4c4caad0.js +0 -57
  830. package/dist/portalLayers-cb07742f.js +0 -312
  831. package/dist/portalUtils-effd590f.js +0 -7
  832. package/dist/programUtils-65af7b7c.js +0 -59
  833. package/dist/project-ee9c2947.js +0 -21
  834. package/dist/projectPointToVector-7dc831a9.js +0 -14
  835. package/dist/projectVectorToVector-5163db7a.js +0 -13
  836. package/dist/quantityUtils-5cd4cf90.js +0 -33
  837. package/dist/quantizationUtils-0a8f74c6.js +0 -68
  838. package/dist/quat-a508aed3.js +0 -104
  839. package/dist/query-b6e1fd14.js +0 -89
  840. package/dist/queryAttachments-7b39ebdc.js +0 -39
  841. package/dist/queryEngineUtils-cb8e309e.js +0 -21
  842. package/dist/queryTopFeatures-2e0e3941.js +0 -50
  843. package/dist/queryZScale-c5733d0a.js +0 -12
  844. package/dist/rasterProjectionHelper-213afa27.js +0 -577
  845. package/dist/rasterUtils-f2e44e8b.js +0 -122
  846. package/dist/rasterizingUtils-25cc0190.js +0 -46
  847. package/dist/request-e0c679b3.js +0 -46
  848. package/dist/requestImageUtils-37d79281.js +0 -8
  849. package/dist/resourceExtension-5f3f1c80.js +0 -17
  850. package/dist/resourceUtils-0d68cbc2.js +0 -69
  851. package/dist/resourceUtils-374db840.js +0 -62
  852. package/dist/resourceUtils-43ce192b.js +0 -42
  853. package/dist/saveAPIKeyUtils-1a3d4a8a.js +0 -8
  854. package/dist/saveUtils-43fdc547.js +0 -24
  855. package/dist/scaleUtils-bdf8b6cb.js +0 -23
  856. package/dist/scrim-44eb4dc0.js +0 -114
  857. package/dist/serviceCapabilitiesUtils-823612b8.js +0 -64
  858. package/dist/sourceUtils-01d115c6.js +0 -71
  859. package/dist/sphere-908cd9aa.js +0 -199
  860. package/dist/statsWorker-49f9befe.js +0 -37
  861. package/dist/streamLayerUtils-29324e05.js +0 -31
  862. package/dist/styleUtils-82e8da52.js +0 -75
  863. package/dist/styleUtils-8541d60d.js +0 -14
  864. package/dist/sublayerUtils-eaac2486.js +0 -37
  865. package/dist/substitute-1f578d70.js +0 -52
  866. package/dist/symbolColorUtils-18fd6b3d.js +0 -8
  867. package/dist/symbolLayerUtils-4c58b291.js +0 -31
  868. package/dist/symbologySnappingCandidates-14d94b6b.js +0 -221
  869. package/dist/t9n-c1c2b6c8.js +0 -349
  870. package/dist/testSVGPremultipliedAlpha-159dac90.js +0 -94
  871. package/dist/timeSupport-3f529cdb.js +0 -410
  872. package/dist/triangle-8a3a2ba8.js +0 -98
  873. package/dist/unitConversionUtils-f0ebaf75.js +0 -17
  874. package/dist/unitFormatUtils-555e2d94.js +0 -40
  875. package/dist/uploadAssetErrors-d1389781.js +0 -70
  876. package/dist/uploadAssets-5e85f09d.js +0 -330
  877. package/dist/utils-3a10b10c.js +0 -34
  878. package/dist/utils-505c54e9.js +0 -91
  879. package/dist/utils-5432e258.js +0 -433
  880. package/dist/utils-7a88ec6a.js +0 -419
  881. package/dist/utils-7fa9cdf9.js +0 -2746
  882. package/dist/utils-d252c575.js +0 -73
  883. package/dist/utils-f07e00b3.js +0 -232
  884. package/dist/utils-fda10b4b.js +0 -79
  885. package/dist/utils3-c34ab97c.js +0 -75
  886. package/dist/vec3-f79c600d.js +0 -81
  887. package/dist/vec42-36edeb73.js +0 -125
  888. package/dist/versionUtils-6935648b.js +0 -161
  889. package/dist/visualVariableUtils-c425461a.js +0 -267
  890. package/dist/webStyleSymbolUtils-4f42a29f.js +0 -48
  891. package/dist/webglDeps-5f18210d.js +0 -23
  892. package/dist/wfsUtils-6f7f1e3e.js +0 -343
  893. package/dist/workerHelper-9dc9a790.js +0 -11
  894. package/dist/xyChart-e5648fee.js +0 -3335
@@ -0,0 +1,2530 @@
1
+ import { bR as ae, ez as Ue, ap as Be, z as G, c6 as M, aO as Me, dE as We, by as N, c1 as $e, W as Ve, iS as fe, e7 as Qe, U as B, c7 as Ze, bP as pe, ey as ze, bM as Je } from "./index-f28919b2.js";
2
+ import { aw as re, ax as I, K as Ke, an as x, ao as _e, ap as ye, aq as ge, ar as me, as as we, aD as $, aE as ne, aF as Xe, aG as Y, N as Ye, aH as He, aI as V, aJ as et } from "./arcadeUtils-41691d12.js";
3
+ import { x as R, s as D, a as T, n as L, t as A, r as tt } from "./WhereClause-2eefa48c.js";
4
+ import { x as E, t as _, g as j, m as Q, a as k, y as it, L as st, w as X, E as Fe, T as Se, S as be, F as at, v as ve, p as rt, D as Z, I as nt, d as U, b as lt, f as ot, c as m } from "./SpatialFilter-351a1d5e.js";
5
+ import { c as ut, a as dt, n as ht } from "./TimeOnly-63922f1a.js";
6
+ import { x as xe, n as Ne } from "./MD5-1b5ec1c3.js";
7
+ import { Z as ct } from "./FieldsIndex-390b005f.js";
8
+ import v from "./FeatureLayer-881827c7.js";
9
+ import Le from "./SubtypeGroupLayer-8386c037.js";
10
+ import { u as Ie, i as Ce } from "./infoFor3D-bf4e6c95.js";
11
+ import { a as ft, s as De } from "./executeQueryJSON-cf7d748b.js";
12
+ import { n as pt } from "./executeQueryPBF-ad416846.js";
13
+ import { d as _t } from "./FeatureSet-595ae550.js";
14
+ import "./AttachmentInfo-a2849bf0.js";
15
+ import "./AttachmentQuery-e743e06f.js";
16
+ import { n as yt, s as gt } from "./executeForIds-3b8a1698.js";
17
+ import "./pbf-4ce99129.js";
18
+ import Te from "./RelationshipQuery-0c20b8ed.js";
19
+ import "./TopFeaturesQuery-9e4228e7.js";
20
+ import { n as mt } from "./FeatureType-22de76b9.js";
21
+ let Ae = class {
22
+ constructor() {
23
+ this.declaredRootClass = "esri.arcade.featureSetCollection", this._layerById = {}, this._layerByName = {};
24
+ }
25
+ add(e, t, i) {
26
+ this._layerById[t] = i, this._layerByName[e] = i;
27
+ }
28
+ async featureSetByName(e, t = !0, i = ["*"]) {
29
+ return this._layerByName[e] === void 0 ? null : this._layerByName[e];
30
+ }
31
+ async featureSetById(e, t = !0, i = ["*"]) {
32
+ return this._layerById[e] === void 0 ? null : this._layerById[e];
33
+ }
34
+ castToText(e = !1) {
35
+ return "object, FeatureSetCollection";
36
+ }
37
+ }, Oe = class H extends E {
38
+ constructor(e) {
39
+ super(e), this.declaredClass = "esri.arcade.featureset.actions.AttributeFilter", this._maxProcessing = 1e3, this._parent = e.parentfeatureset, e.whereclause instanceof R ? (this._whereclause = e.whereclause, this._whereClauseFunction = null) : (this._whereClauseFunction = e.whereclause, this._whereclause = null);
40
+ }
41
+ _initialiseFeatureSet() {
42
+ this._parent !== null ? (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.subtypeField = this._parent.subtypeField, this.subtypes = this._parent.subtypes) : (this.fields = [], this.typeIdField = "", this.subtypeField = "", this.objectIdField = "", this.globalIdField = "", this.spatialReference = new ae({ wkid: 4326 }), this.geometryType = re.point);
43
+ }
44
+ async _getSet(e) {
45
+ if (this._wset === null) {
46
+ await this._ensureLoaded();
47
+ const t = await this._parent._getFilteredSet("", null, this._whereclause, null, e);
48
+ return this._checkCancelled(e), this._whereClauseFunction !== null ? this._wset = new _(t._candidates.slice(0).concat(t._known.slice(0)), [], t._ordered, this._clonePageDefinition(t.pagesDefinition)) : this._wset = new _(t._candidates.slice(0), t._known.slice(0), t._ordered, this._clonePageDefinition(t.pagesDefinition)), this._wset;
49
+ }
50
+ return this._wset;
51
+ }
52
+ _isInFeatureSet(e) {
53
+ var i;
54
+ let t = (i = this._parent) == null ? void 0 : i._isInFeatureSet(e);
55
+ return t === I.NotInFeatureSet ? t : (t = this._idstates[e], t === void 0 ? I.Unknown : t);
56
+ }
57
+ _getFeature(e, t, i) {
58
+ return this._parent._getFeature(e, t, i);
59
+ }
60
+ _getFeatures(e, t, i, s) {
61
+ return this._parent._getFeatures(e, t, i, s);
62
+ }
63
+ _featureFromCache(e) {
64
+ return this._parent._featureFromCache(e);
65
+ }
66
+ executeWhereClause(e) {
67
+ var t;
68
+ return ((t = this._whereclause) == null ? void 0 : t.testFeature(e)) ?? !1;
69
+ }
70
+ async executeWhereClauseDeferred(e) {
71
+ if (this._whereClauseFunction !== null) {
72
+ const t = this._whereClauseFunction(e);
73
+ return Ue(t), t;
74
+ }
75
+ return this.executeWhereClause(e);
76
+ }
77
+ async _fetchAndRefineFeatures(e, t, i) {
78
+ var n, l, u;
79
+ const s = new _([], e, !1, null), a = Math.min(t, e.length);
80
+ if (await ((n = this._parent) == null ? void 0 : n._getFeatures(s, -1, a, i)), this._checkCancelled(i), this._whereClauseFunction == null) {
81
+ for (let o = 0; o < a; o++) {
82
+ const d = (l = this._parent) == null ? void 0 : l._featureFromCache(e[o]);
83
+ this.executeWhereClause(d) === !0 ? this._idstates[e[o]] = I.InFeatureSet : this._idstates[e[o]] = I.NotInFeatureSet;
84
+ }
85
+ return "success";
86
+ }
87
+ const r = [];
88
+ for (let o = 0; o < a; o++) {
89
+ const d = (u = this._parent) == null ? void 0 : u._featureFromCache(e[o]);
90
+ r.push(await this.executeWhereClauseDeferred(d));
91
+ }
92
+ for (let o = 0; o < t; o++)
93
+ r[o] === !0 ? this._idstates[e[o]] = I.InFeatureSet : this._idstates[e[o]] = I.NotInFeatureSet;
94
+ return "success";
95
+ }
96
+ async _getFilteredSet(e, t, i, s, a) {
97
+ this._whereClauseFunction !== null || (i !== null ? this._whereclause !== null && (i = j(this._whereclause, i)) : i = this._whereclause), await this._ensureLoaded();
98
+ const r = await this._parent._getFilteredSet(e, t, i, s, a);
99
+ let n;
100
+ return this._checkCancelled(a), n = this._whereClauseFunction !== null ? new _(r._candidates.slice(0).concat(r._known.slice(0)), [], r._ordered, this._clonePageDefinition(r.pagesDefinition)) : new _(r._candidates.slice(0), r._known.slice(0), r._ordered, this._clonePageDefinition(r.pagesDefinition)), n;
101
+ }
102
+ async _stat(e, t, i, s, a, r, n) {
103
+ if (this._whereClauseFunction !== null)
104
+ return a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 };
105
+ let l = this._whereclause;
106
+ a !== null && this._whereclause !== null && (l = j(this._whereclause, a));
107
+ const u = await this._parent._stat(e, t, i, s, l, r, n);
108
+ return u.calculated === !1 ? a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 } : u;
109
+ }
110
+ async _canDoAggregates(e, t, i, s, a) {
111
+ return this._whereClauseFunction === null && (a !== null ? this._whereclause !== null && (a = j(this._whereclause, a)) : a = this._whereclause, this._parent !== null && this._parent._canDoAggregates(e, t, i, s, a));
112
+ }
113
+ async _getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n) {
114
+ if (this._parent === null)
115
+ throw new D(T.NeverReach);
116
+ return a !== null ? this._whereclause !== null && (a = j(this._whereclause, a)) : a = this._whereclause, this._parent._getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n);
117
+ }
118
+ static registerAction() {
119
+ E._featuresetFunctions.filter = function(e) {
120
+ if (typeof e == "function")
121
+ return new H({ parentfeatureset: this, whereclause: e });
122
+ let t = null;
123
+ return e instanceof R && (t = e), new H({ parentfeatureset: this, whereclause: t });
124
+ };
125
+ }
126
+ getFieldsIndex() {
127
+ return this._parent.getFieldsIndex();
128
+ }
129
+ }, J = class {
130
+ constructor(e) {
131
+ this.field = e, this.sqlRewritable = !1;
132
+ }
133
+ postInitialization(e, t) {
134
+ }
135
+ }, ee = class extends J {
136
+ constructor(e) {
137
+ super(e), this.sqlRewritable = !0;
138
+ }
139
+ extractValue(e) {
140
+ return e.attributes[this.field.name];
141
+ }
142
+ rewriteSql(e) {
143
+ return { rewritten: this.sqlRewritable, where: e };
144
+ }
145
+ }, wt = class extends J {
146
+ constructor(e, t, i) {
147
+ super(Ke(e)), this.originalField = e, this.sqlRewritable = !0, this.field.name = t, this.field.alias = i;
148
+ }
149
+ rewriteSql(e, t) {
150
+ return { rewritten: this.sqlRewritable, where: Q(e, this.field.name, this.originalField.name, t.getFieldsIndex()) };
151
+ }
152
+ extractValue(e) {
153
+ return e.attributes[this.originalField.name];
154
+ }
155
+ }, Ft = class F extends J {
156
+ constructor(e, t, i) {
157
+ super(e), this.codefield = t, this.lkp = i, this.reverseLkp = {};
158
+ for (const s in i)
159
+ this.reverseLkp[i[s]] = s;
160
+ this.sqlRewritable = !0;
161
+ }
162
+ rewriteSql(e, t) {
163
+ const i = this.evaluateNodeToWhereClause(e.parseTree, x.Standardised, this.field.name, this.codefield instanceof R ? k(this.codefield, x.Standardised) : this.codefield, e.parameters);
164
+ return i.includes(F.BADNESS) ? { rewritten: !1, where: e } : { rewritten: this.sqlRewritable, where: R.create(i, t._parent.getFieldsIndex(), t.dateFieldsTimeZoneDefaultUTC) };
165
+ }
166
+ evaluateNodeToWhereClause(e, t, i = null, s = null, a) {
167
+ let r, n, l, u;
168
+ switch (e.type) {
169
+ case "interval":
170
+ return at(this.evaluateNodeToWhereClause(e.value, t, i, s, a), e.qualifier, e.op);
171
+ case "case-expression": {
172
+ let o = " CASE ";
173
+ e.format === "simple" && (o += this.evaluateNodeToWhereClause(e.operand, t, i, F.BADNESS, a));
174
+ for (let d = 0; d < e.clauses.length; d++)
175
+ o += " WHEN " + this.evaluateNodeToWhereClause(e.clauses[d].operand, t, i, F.BADNESS, a) + " THEN " + this.evaluateNodeToWhereClause(e.clauses[d].value, t, i, F.BADNESS, a);
176
+ return e.else !== null && (o += " ELSE " + this.evaluateNodeToWhereClause(e.else, t, i, F.BADNESS, a)), o += " END ", o;
177
+ }
178
+ case "parameter": {
179
+ const o = a[e.value.toLowerCase()];
180
+ if (typeof o == "string")
181
+ return "'" + o.toString().replaceAll("'", "''") + "'";
182
+ if (_e(o))
183
+ return X(o, t);
184
+ if (ye(o))
185
+ return X(o, t);
186
+ if (ge(o))
187
+ return Fe(o, t);
188
+ if (me(o))
189
+ return Se(o, t);
190
+ if (we(o))
191
+ return be(o, t);
192
+ if (o instanceof Array) {
193
+ const d = [];
194
+ for (let c = 0; c < o.length; c++)
195
+ typeof o[c] == "string" ? d.push("'" + o[c].toString().replaceAll("'", "''") + "'") : _e(o[c]) || ye(o[c]) ? d.push(X(o[c], t)) : ge(o[c]) ? d.push(Fe(o[c], t)) : me(o[c]) ? d.push(Se(o[c], t)) : we(o[c]) ? d.push(be(o[c], t)) : d.push(o[c].toString());
196
+ return d;
197
+ }
198
+ return o.toString();
199
+ }
200
+ case "expression-list":
201
+ n = [];
202
+ for (const o of e.value)
203
+ n.push(this.evaluateNodeToWhereClause(o, t, i, s, a));
204
+ return n;
205
+ case "unary-expression":
206
+ return " ( NOT " + this.evaluateNodeToWhereClause(e.expr, t, i, F.BADNESS, a) + " ) ";
207
+ case "binary-expression":
208
+ switch (e.operator) {
209
+ case "AND":
210
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " AND " + this.evaluateNodeToWhereClause(e.right, t, i, s, a) + ") ";
211
+ case "OR":
212
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " OR " + this.evaluateNodeToWhereClause(e.right, t, i, s, a) + ") ";
213
+ case "IS":
214
+ if (e.right.type !== "null")
215
+ throw new L(A.UnsupportedIsRhs);
216
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IS NULL )";
217
+ case "ISNOT":
218
+ if (e.right.type !== "null")
219
+ throw new L(A.UnsupportedIsRhs);
220
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IS NOT NULL )";
221
+ case "IN":
222
+ if (r = [], e.right.type === "expression-list") {
223
+ if (e.left.type === "column-reference" && e.left.column.toUpperCase() === this.field.name.toUpperCase()) {
224
+ const o = [];
225
+ let d = !0;
226
+ for (const c of e.right.value) {
227
+ if (c.type !== "string") {
228
+ d = !1;
229
+ break;
230
+ }
231
+ if (this.lkp[c.value] === void 0) {
232
+ d = !1;
233
+ break;
234
+ }
235
+ o.push(this.lkp[c.value].toString());
236
+ }
237
+ if (d)
238
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + o.join(",") + ")) ";
239
+ }
240
+ return r = this.evaluateNodeToWhereClause(e.right, t, i, s, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + r.join(",") + ")) ";
241
+ }
242
+ return u = this.evaluateNodeToWhereClause(e.right, t, i, s, a), u instanceof Array ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + u.join(",") + ")) " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + u + ")) ";
243
+ case "NOT IN":
244
+ if (r = [], e.right.type === "expression-list") {
245
+ if (e.left.type === "column-reference" && e.left.column.toUpperCase() === this.field.name.toUpperCase()) {
246
+ const o = [];
247
+ let d = !0;
248
+ for (const c of e.right.value) {
249
+ if (c.type !== "string") {
250
+ d = !1;
251
+ break;
252
+ }
253
+ if (this.lkp[c.value] === void 0) {
254
+ d = !1;
255
+ break;
256
+ }
257
+ o.push(this.lkp[c.value].toString());
258
+ }
259
+ if (d)
260
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + o.join(",") + ")) ";
261
+ }
262
+ return r = this.evaluateNodeToWhereClause(e.right, t, i, s, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + r.join(",") + ")) ";
263
+ }
264
+ return u = this.evaluateNodeToWhereClause(e.right, t, i, s, a), u instanceof Array ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + u.join(",") + ")) " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + u + ")) ";
265
+ case "BETWEEN":
266
+ return l = this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " BETWEEN " + l[0] + " AND " + l[1] + " ) ";
267
+ case "NOTBETWEEN":
268
+ return l = this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " NOT BETWEEN " + l[0] + " AND " + l[1] + " ) ";
269
+ case "LIKE":
270
+ return e.escape !== "" ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + " ESCAPE '" + e.escape + "') " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
271
+ case "NOT LIKE":
272
+ return e.escape !== "" ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " NOT LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + " ESCAPE '" + e.escape + "') " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " NOT LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
273
+ case "<>":
274
+ case "=":
275
+ if (e.left.type === "column-reference" && e.right.type === "string") {
276
+ if (e.left.column.toUpperCase() === this.field.name.toUpperCase() && this.lkp[e.right.value.toString()] !== void 0)
277
+ return " (" + s + " " + e.operator + " " + this.lkp[e.right.value.toString()].toString() + ") ";
278
+ } else if (e.right.type === "column-reference" && e.left.type === "string" && e.right.column.toUpperCase() === this.field.name.toUpperCase())
279
+ return " (" + this.lkp[e.right.value.toString()].toString() + " " + e.operator + " " + s + ") ";
280
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " " + e.operator + " " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
281
+ case "<":
282
+ case ">":
283
+ case ">=":
284
+ case "<=":
285
+ case "*":
286
+ case "-":
287
+ case "+":
288
+ case "/":
289
+ case "||":
290
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " " + e.operator + " " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
291
+ }
292
+ case "null":
293
+ return "null";
294
+ case "boolean":
295
+ return e.value === !0 ? "1" : "0";
296
+ case "string":
297
+ return "'" + e.value.toString().replaceAll("'", "''") + "'";
298
+ case "timestamp":
299
+ return `timestamp '${e.value}'`;
300
+ case "date":
301
+ return `date '${e.value}'`;
302
+ case "time":
303
+ return `time '${e.value}'`;
304
+ case "number":
305
+ return e.value.toString();
306
+ case "current-time":
307
+ return st(e.mode === "date", t);
308
+ case "column-reference":
309
+ return i && i.toLowerCase() === e.column.toLowerCase() ? "(" + s + ")" : e.column;
310
+ case "data-type":
311
+ return e.value;
312
+ case "function": {
313
+ const o = this.evaluateNodeToWhereClause(e.args, t, i, F.BADNESS, a);
314
+ return it(e.name, o, t);
315
+ }
316
+ }
317
+ throw new L(A.UnsupportedSyntax, { node: e.type });
318
+ }
319
+ extractValue(e) {
320
+ return this.codefield instanceof R ? this.reverseLkp[R.convertValueToStorageFormat(this.codefield.calculateValueCompiled(e))] : this.reverseLkp[e.attributes[this.codefield]];
321
+ }
322
+ };
323
+ Ft.BADNESS = "_!!!_BAD_LKP_!!!!";
324
+ class St extends J {
325
+ constructor(e, t) {
326
+ super(e), this._sql = t;
327
+ }
328
+ rewriteSql(e, t) {
329
+ return { rewritten: !0, where: Q(e, this.field.name, k(this._sql, x.Standardised), t.getFieldsIndex()) };
330
+ }
331
+ extractValue(e) {
332
+ return R.convertValueToStorageFormat(this._sql.calculateValueCompiled(e), this.field.type);
333
+ }
334
+ }
335
+ class bt extends E {
336
+ static findField(e, t) {
337
+ for (const i of e)
338
+ if (i.name.toLowerCase() === t.toString().toLowerCase())
339
+ return i;
340
+ return null;
341
+ }
342
+ constructor(e) {
343
+ 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;
344
+ }
345
+ _initialiseFeatureSet() {
346
+ this._parent !== null ? (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 ae({ wkid: 4326 }), this.objectIdField = "", this.globalIdField = "", this.geometryType = re.point, this.typeIdField = "", this.types = null, this.subtypeField = null, this.subtypes = null), this.fields = [];
347
+ for (const e of this.adaptedFields)
348
+ e.postInitialization(this, this._parent), this.fields.push(e.field);
349
+ }
350
+ async _getSet(e) {
351
+ var t;
352
+ if (this._wset === null) {
353
+ await this._ensureLoaded();
354
+ let i = null;
355
+ return i = this._extraFilter ? await this._getFilteredSet("", null, null, null, e) : await ((t = this._parent) == null ? void 0 : t._getSet(e)), this._checkCancelled(e), Be(i), this._wset = new _(i._candidates.slice(0), i._known.slice(0), i._ordered, this._clonePageDefinition(i.pagesDefinition)), this._wset;
356
+ }
357
+ return this._wset;
358
+ }
359
+ _isInFeatureSet(e) {
360
+ return this._parent._isInFeatureSet(e);
361
+ }
362
+ async _getFeatures(e, t, i, s) {
363
+ var o, d;
364
+ const a = [];
365
+ t !== -1 && this._featureCache[t] === void 0 && a.push(t);
366
+ const r = this._maxQueryRate();
367
+ if (this._checkIfNeedToExpandKnownPage(e, r) === !0)
368
+ return await this._expandPagedSet(e, r, 0, 0, s), this._getFeatures(e, t, i, s);
369
+ let n = 0;
370
+ for (let c = e._lastFetchedIndex; c < e._known.length && (n++, n <= i && (e._lastFetchedIndex += 1), !(this._featureCache[e._known[c]] === void 0 && (e._known[c] !== t && a.push(e._known[c]), a.length >= r))); c++)
371
+ ;
372
+ if (a.length === 0)
373
+ return "success";
374
+ e = new _([], a, e._ordered, null);
375
+ const l = Math.min(a.length, i);
376
+ await ((o = this._parent) == null ? void 0 : o._getFeatures(e, -1, l, s)), this._checkCancelled(s);
377
+ const u = [];
378
+ for (let c = 0; c < l; c++) {
379
+ const f = (d = this._parent) == null ? void 0 : d._featureFromCache(a[c]);
380
+ f !== void 0 && u.push({ geometry: f.geometry, attributes: f.attributes, id: a[c] });
381
+ }
382
+ for (const c of u) {
383
+ const f = [];
384
+ for (const y of this.adaptedFields)
385
+ f[y.field.name] = y.extractValue(c);
386
+ this._featureCache[c.id] = new G({ attributes: f, geometry: ut(c.geometry) });
387
+ }
388
+ return "success";
389
+ }
390
+ async _fetchAndRefineFeatures() {
391
+ throw new D(T.NeverReach);
392
+ }
393
+ async _getFilteredSet(e, t, i, s, a) {
394
+ let r = !1;
395
+ const n = this._reformulateWithoutAdaptions(i);
396
+ r = n.cannot, i = n.where;
397
+ let l = !1;
398
+ if (s !== null) {
399
+ l = !0;
400
+ const d = [];
401
+ for (const c of this.adaptedFields)
402
+ if (!(c instanceof ee) && s.scanForField(c.field.name) === !0) {
403
+ if (!(c instanceof wt)) {
404
+ s = null, l = !1;
405
+ break;
406
+ }
407
+ d.push({ field: c.field.name, newfield: c.originalField.name });
408
+ }
409
+ s && d.length > 0 && (s = s.replaceFields(d));
410
+ }
411
+ i !== null ? this._extraFilter !== null && (i = j(this._extraFilter, i)) : i = this._extraFilter, await this._ensureLoaded();
412
+ const u = await this._parent._getFilteredSet(e, t, i, s, a);
413
+ let o;
414
+ return this._checkCancelled(a), o = r === !0 ? new _(u._candidates.slice(0).concat(u._known.slice(0)), [], l === !0 && u._ordered, this._clonePageDefinition(u.pagesDefinition)) : new _(u._candidates.slice(0), u._known.slice(0), l === !0 && u._ordered, this._clonePageDefinition(u.pagesDefinition)), o;
415
+ }
416
+ _reformulateWithoutAdaptions(e) {
417
+ const t = { cannot: !1, where: e };
418
+ if (e !== null) {
419
+ for (const i of this.adaptedFields)
420
+ if (ve(e, i.field.name) === !0) {
421
+ const s = i.rewriteSql(e, this);
422
+ if (s.rewritten !== !0) {
423
+ t.cannot = !0, t.where = null;
424
+ break;
425
+ }
426
+ t.where = s.where;
427
+ }
428
+ }
429
+ return t;
430
+ }
431
+ async _stat(e, t, i, s, a, r, n) {
432
+ let l = !1, u = this._reformulateWithoutAdaptions(t);
433
+ if (l = u.cannot, t = u.where, u = this._reformulateWithoutAdaptions(a), l = l || u.cannot, (a = u.where) !== null ? this._extraFilter !== null && (a = j(this._extraFilter, a)) : a = this._extraFilter, l === !0)
434
+ return a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 };
435
+ const o = await this._parent._stat(e, t, i, s, a, r, n);
436
+ return o.calculated === !1 ? a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 } : o;
437
+ }
438
+ async _canDoAggregates(e, t, i, s, a) {
439
+ if (this._parent === null)
440
+ return !1;
441
+ for (let l = 0; l < e.length; l++)
442
+ for (const u of this.adaptedFields)
443
+ if (e[l].toLowerCase() === u.field.name.toLowerCase() && !(u instanceof ee))
444
+ return !1;
445
+ const r = [];
446
+ for (let l = 0; l < t.length; l++) {
447
+ const u = t[l];
448
+ if (u.workingexpr !== null) {
449
+ const o = this._reformulateWithoutAdaptions(u.workingexpr);
450
+ if (o.cannot)
451
+ return !1;
452
+ const d = u.clone();
453
+ d.workingexpr = o.where, r.push(d);
454
+ } else
455
+ r.push(u);
456
+ }
457
+ const n = this._reformulateWithoutAdaptions(a);
458
+ return !n.cannot && ((a = n.where) !== null ? this._extraFilter !== null && (a = j(this._extraFilter, a)) : a = this._extraFilter, this._parent._canDoAggregates(e, r, i, s, a));
459
+ }
460
+ async _getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n) {
461
+ if (this._parent === null)
462
+ throw new D(T.NeverReach);
463
+ const l = [];
464
+ for (let o = 0; o < t.length; o++) {
465
+ const d = t[o];
466
+ if (d.workingexpr !== null) {
467
+ const c = this._reformulateWithoutAdaptions(d.workingexpr);
468
+ if (c.cannot)
469
+ throw new D(T.NeverReach);
470
+ const f = d.clone();
471
+ f.workingexpr = c.where, l.push(f);
472
+ } else
473
+ l.push(d);
474
+ }
475
+ const u = this._reformulateWithoutAdaptions(a);
476
+ if (u.cannot)
477
+ throw new D(T.NeverReach);
478
+ return (a = u.where) !== null ? this._extraFilter !== null && (a = j(this._extraFilter, a)) : a = this._extraFilter, this._parent._getAggregatePagesDataSourceDefinition(e, l, i, s, a, r, n);
479
+ }
480
+ }
481
+ function Re(h, e) {
482
+ return h === e ? 0 : h === null ? -1 : e === null ? 1 : h < e ? -1 : 1;
483
+ }
484
+ class W {
485
+ constructor(e) {
486
+ const t = e.split(",");
487
+ this._fields = [], this._directions = [];
488
+ for (let i = 0; i < t.length; i++) {
489
+ const s = t[i].match(/\S+/g);
490
+ this._fields.push(s[0]), s.length === 2 ? s[1].toLowerCase() === "asc" ? this._directions.push(1) : this._directions.push(0) : this._directions.push(1);
491
+ }
492
+ }
493
+ constructClause() {
494
+ let e = "";
495
+ for (let t = 0; t < this._fields.length; t++)
496
+ t !== 0 && (e += ","), e += this._fields[t], this._directions[t] === 1 ? e += " ASC" : e += " DESC";
497
+ return e;
498
+ }
499
+ order(e) {
500
+ e.sort((t, i) => {
501
+ for (let s = 0; s < this._fields.length; s++) {
502
+ const a = this.featureValue(t.feature, this._fields[s], s), r = this.featureValue(i.feature, this._fields[s], s);
503
+ let n = 0;
504
+ if (n = this._directions[s] === 1 ? Re(a, r) : -1 * Re(a, r), n !== 0)
505
+ return n;
506
+ }
507
+ return 0;
508
+ });
509
+ }
510
+ scanForField(e) {
511
+ for (let t = 0; t < this._fields.length; t++)
512
+ if (this._fields[t].toLowerCase().trim() === e.toLowerCase().trim())
513
+ return !0;
514
+ return !1;
515
+ }
516
+ replaceFields(e) {
517
+ let t = "";
518
+ for (let i = 0; i < this._fields.length; i++) {
519
+ i !== 0 && (t += ",");
520
+ let s = this._fields[i];
521
+ for (const a of e)
522
+ if (s.toLowerCase() === a.field.toLowerCase()) {
523
+ s = a.newfield;
524
+ break;
525
+ }
526
+ t += s, this._directions[i] === 1 ? t += " ASC" : t += " DESC";
527
+ }
528
+ return new W(t);
529
+ }
530
+ featureValue(e, t, i) {
531
+ const s = e.attributes[t];
532
+ if (s !== void 0)
533
+ return s;
534
+ for (const a in e.attributes)
535
+ if (t.toLowerCase() === a.toLowerCase())
536
+ return this._fields[i] = a, e.attributes[a];
537
+ return null;
538
+ }
539
+ }
540
+ let te = class Ee extends E {
541
+ constructor(e) {
542
+ super(e), this._orderbyclause = null, this.declaredClass = "esri.arcade.featureset.actions.OrderBy", this._maxProcessing = 100, this._orderbyclause = e.orderbyclause, this._parent = e.parentfeatureset;
543
+ }
544
+ async _getSet(e) {
545
+ if (this._wset === null) {
546
+ await this._ensureLoaded();
547
+ const t = await this._getFilteredSet("", null, null, this._orderbyclause, e);
548
+ return this._checkCancelled(e), this._wset = t, this._wset;
549
+ }
550
+ return this._wset;
551
+ }
552
+ async manualOrderSet(e, t) {
553
+ var a;
554
+ const i = await this.getIdColumnDictionary(e, [], -1, t);
555
+ (a = this._orderbyclause) == null || a.order(i);
556
+ const s = new _([], [], !0, null);
557
+ for (let r = 0; r < i.length; r++)
558
+ s._known.push(i[r].id);
559
+ return s;
560
+ }
561
+ async getIdColumnDictionary(e, t, i, s) {
562
+ if (i < e._known.length - 1) {
563
+ const a = this._maxQueryRate();
564
+ if (e._known[i + 1] === "GETPAGES")
565
+ return await $(this._parent._expandPagedSet(e, a, 0, 0, s)), this.getIdColumnDictionary(e, t, i, s);
566
+ let r = i + 1;
567
+ const n = [];
568
+ for (; r < e._known.length && e._known[r] !== "GETPAGES"; )
569
+ n.push(e._known[r]), r++;
570
+ i += n.length;
571
+ const l = await $(this._parent._getFeatureBatch(n, s));
572
+ this._checkCancelled(s);
573
+ for (const u of l)
574
+ t.push({ id: u.attributes[this.objectIdField], feature: u });
575
+ return this.getIdColumnDictionary(e, t, i, s);
576
+ }
577
+ return e._candidates.length > 0 ? (await $(this._refineSetBlock(e, this._maxProcessingRate(), s)), this._checkCancelled(s), this.getIdColumnDictionary(e, t, i, s)) : t;
578
+ }
579
+ _isInFeatureSet(e) {
580
+ return this._parent._isInFeatureSet(e);
581
+ }
582
+ _getFeatures(e, t, i, s) {
583
+ return this._parent._getFeatures(e, t, i, s);
584
+ }
585
+ _featureFromCache(e) {
586
+ if (this._featureCache[e] === void 0) {
587
+ const t = this._parent._featureFromCache(e);
588
+ return t === void 0 ? void 0 : t === null ? null : (this._featureCache[e] = t, t);
589
+ }
590
+ return this._featureCache[e];
591
+ }
592
+ async _fetchAndRefineFeatures() {
593
+ throw new D(T.NeverReach);
594
+ }
595
+ async _getFilteredSet(e, t, i, s, a) {
596
+ await this._ensureLoaded();
597
+ const r = await this._parent._getFilteredSet(e, t, i, s === null ? this._orderbyclause : s, a);
598
+ this._checkCancelled(a);
599
+ const n = new _(r._candidates.slice(0), r._known.slice(0), r._ordered, this._clonePageDefinition(r.pagesDefinition));
600
+ let l = !0;
601
+ if (r._candidates.length > 0 && (l = !1), n._ordered === !1) {
602
+ let u = await this.manualOrderSet(n, a);
603
+ return l === !1 && (t === null && i === null || (u = new _(u._candidates.slice(0).concat(u._known.slice(0)), [], u._ordered, this._clonePageDefinition(u.pagesDefinition)))), u;
604
+ }
605
+ return n;
606
+ }
607
+ static registerAction() {
608
+ E._featuresetFunctions.orderBy = function(e) {
609
+ return e === "" ? this : new Ee({ parentfeatureset: this, orderbyclause: new W(e) });
610
+ };
611
+ }
612
+ getFieldsIndex() {
613
+ return this._parent.getFieldsIndex();
614
+ }
615
+ };
616
+ function It(h) {
617
+ if (h.parseTree.type === "function") {
618
+ if (h.parseTree.args.value.length === 0)
619
+ return { name: h.parseTree.name, expr: null };
620
+ if (h.parseTree.args.value.length > 1)
621
+ throw new L(A.MissingStatisticParameters);
622
+ const e = R.create(rt(h.parseTree.args.value[0], x.Standardised, h.parameters), h.fieldsIndex, h.timeZone);
623
+ return { name: h.parseTree.name, expr: e };
624
+ }
625
+ return null;
626
+ }
627
+ let ke = class ie {
628
+ constructor() {
629
+ this.field = "", this.tofieldname = "", this.typeofstat = "MIN", this.workingexpr = null;
630
+ }
631
+ clone() {
632
+ const e = new ie();
633
+ return e.field = this.field, e.tofieldname = this.tofieldname, e.typeofstat = this.typeofstat, e.workingexpr = this.workingexpr, e;
634
+ }
635
+ static parseStatField(e, t, i, s) {
636
+ const a = new ie();
637
+ a.field = e;
638
+ const r = R.create(t, i, s), n = It(r);
639
+ if (n === null)
640
+ throw new L(A.UnsupportedSqlFunction, { function: "" });
641
+ const l = n.name.toUpperCase().trim();
642
+ if (l === "MIN") {
643
+ if (a.typeofstat = "MIN", a.workingexpr = n.expr, r === null)
644
+ throw new L(A.InvalidFunctionParameters, { function: "min" });
645
+ } else if (l === "MAX") {
646
+ if (a.typeofstat = "MAX", a.workingexpr = n.expr, r === null)
647
+ throw new L(A.InvalidFunctionParameters, { function: "max" });
648
+ } else if (l === "COUNT")
649
+ a.typeofstat = "COUNT", a.workingexpr = n.expr;
650
+ else if (l === "STDEV") {
651
+ if (a.typeofstat = "STDDEV", a.workingexpr = n.expr, r === null)
652
+ throw new L(A.InvalidFunctionParameters, { function: "stdev" });
653
+ } else if (l === "SUM") {
654
+ if (a.typeofstat = "SUM", a.workingexpr = n.expr, r === null)
655
+ throw new L(A.InvalidFunctionParameters, { function: "sum" });
656
+ } else if (l === "MEAN") {
657
+ if (a.typeofstat = "AVG", a.workingexpr = n.expr, r === null)
658
+ throw new L(A.InvalidFunctionParameters, { function: l });
659
+ } else if (l === "AVG") {
660
+ if (a.typeofstat = "AVG", a.workingexpr = n.expr, r === null)
661
+ throw new L(A.InvalidFunctionParameters, { function: "avg" });
662
+ } else {
663
+ if (l !== "VAR")
664
+ throw new L(A.UnsupportedSqlFunction, { function: l });
665
+ if (a.typeofstat = "VAR", a.workingexpr = n.expr, r === null)
666
+ throw new L(A.InvalidFunctionParameters, { function: "var" });
667
+ }
668
+ return a;
669
+ }
670
+ toStatisticsName() {
671
+ switch (this.typeofstat.toUpperCase()) {
672
+ case "MIN":
673
+ return "min";
674
+ case "MAX":
675
+ return "max";
676
+ case "SUM":
677
+ return "sum";
678
+ case "COUNT":
679
+ default:
680
+ return "count";
681
+ case "VAR":
682
+ return "var";
683
+ case "STDDEV":
684
+ return "stddev";
685
+ case "AVG":
686
+ return "avg";
687
+ }
688
+ }
689
+ };
690
+ function Ct(h) {
691
+ if (!h)
692
+ return "COUNT";
693
+ switch (h.toLowerCase()) {
694
+ case "max":
695
+ return "MAX";
696
+ case "var":
697
+ case "variance":
698
+ return "VAR";
699
+ case "avg":
700
+ case "average":
701
+ case "mean":
702
+ return "AVG";
703
+ case "min":
704
+ return "MIN";
705
+ case "sum":
706
+ return "SUM";
707
+ case "stdev":
708
+ case "stddev":
709
+ return "STDDEV";
710
+ case "count":
711
+ return "COUNT";
712
+ }
713
+ return "COUNT";
714
+ }
715
+ let Dt = class Pe extends E {
716
+ constructor(e) {
717
+ 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;
718
+ }
719
+ isTable() {
720
+ return !0;
721
+ }
722
+ async _getSet(e) {
723
+ if (this._wset === null) {
724
+ const t = await this._getFilteredSet("", null, null, null, e);
725
+ return this._wset = t, this._wset;
726
+ }
727
+ return this._wset;
728
+ }
729
+ _isInFeatureSet() {
730
+ return I.InFeatureSet;
731
+ }
732
+ _nextUniqueName(e) {
733
+ for (; e["T" + this._uniqueIds.toString()] === 1; )
734
+ this._uniqueIds++;
735
+ const t = "T" + this._uniqueIds.toString();
736
+ return e[t] = 1, t;
737
+ }
738
+ _convertToEsriFieldType(e) {
739
+ return e;
740
+ }
741
+ _initialiseFeatureSet() {
742
+ const e = {};
743
+ let t = !1, i = 1;
744
+ const s = this._parent ? this._parent.getFieldsIndex() : new ct([]);
745
+ for (this.objectIdField = "ROW__ID", this.globalIdField = ""; t === !1; ) {
746
+ let r = !1;
747
+ for (let n = 0; n < this._config.groupbyfields.length; n++)
748
+ if (this._config.groupbyfields[n].name.toLowerCase() === this.objectIdField.toLowerCase()) {
749
+ r = !0;
750
+ break;
751
+ }
752
+ if (r === !1) {
753
+ for (let n = 0; n < this._config.statsfields.length; n++)
754
+ if (this._config.statsfields[n].name.toLowerCase() === this.objectIdField.toLowerCase()) {
755
+ r = !0;
756
+ break;
757
+ }
758
+ }
759
+ r === !1 ? t = !0 : (this.objectIdField = "ROW__ID" + i.toString(), i++);
760
+ }
761
+ for (const r of this._config.statsfields) {
762
+ const n = new ke();
763
+ n.field = r.name, n.tofieldname = r.name, n.workingexpr = r.expression instanceof R ? r.expression : R.create(r.expression, s, this.dateFieldsTimeZoneDefaultUTC), n.typeofstat = Ct(r.statistic), this._decodedStatsfield.push(n);
764
+ }
765
+ this._decodedGroupbyfield = [];
766
+ for (const r of this._config.groupbyfields) {
767
+ const n = { name: r.name, singlefield: null, tofieldname: r.name, expression: r.expression instanceof R ? r.expression : R.create(r.expression, s, this.dateFieldsTimeZoneDefaultUTC), sqlType: null };
768
+ this._decodedGroupbyfield.push(n);
769
+ }
770
+ if (this._parent !== null) {
771
+ this.geometryType = this._parent.geometryType, this.spatialReference = this._parent.spatialReference, this.hasM = this._parent.hasM, this.hasZ = this._parent.hasZ, this.typeIdField = "";
772
+ for (const r of this._parent.fields)
773
+ e[r.name.toUpperCase()] = 1;
774
+ this.types = null, this.subtypes = null, this.subtypeField = "";
775
+ } else
776
+ this.geometryType = re.point, this.typeIdField = "", this.types = null, this.subtypes = null, this.subtypeField = "", this.spatialReference = new ae({ wkid: 4326 });
777
+ this.fields = [];
778
+ const a = new ke();
779
+ a.field = this._nextUniqueName(e), a.tofieldname = this.objectIdField, a.workingexpr = R.create(this._parent.objectIdField, this._parent.getFieldsIndex(), this.dateFieldsTimeZoneDefaultUTC), a.typeofstat = "MIN", this._decodedStatsfield.push(a);
780
+ for (const r of this._decodedGroupbyfield) {
781
+ const n = new M();
782
+ if (r.name = this._nextUniqueName(e), n.name = r.tofieldname, n.alias = n.name, Z(r.expression)) {
783
+ const l = this._parent.getField(k(r.expression, x.Standardised));
784
+ if (!l)
785
+ throw new D(T.AggregationFieldNotFound);
786
+ r.name = l.name, r.singlefield = l.name, this.phsyicalgroupbyfields.push(l.name), n.type = l.type, r.sqlType = l.type;
787
+ } else {
788
+ n.type = this._convertToEsriFieldType(nt(r.expression, this._parent.fields));
789
+ const l = new M();
790
+ l.name = r.name, l.alias = l.name, this.phsyicalgroupbyfields.push(r.name), this._adaptedFields.push(new St(l, r.expression)), this._candosimplegroupby = !1, r.sqlType = n.type;
791
+ }
792
+ this.fields.push(n);
793
+ }
794
+ if (this._adaptedFields.length > 0)
795
+ for (const r of this._parent.fields)
796
+ this._adaptedFields.push(new ee(r));
797
+ for (let r = 0; r < this._decodedStatsfield.length; r++) {
798
+ const n = new M();
799
+ let l = null;
800
+ const u = this._decodedStatsfield[r];
801
+ u.field = this._nextUniqueName(e), u.tofieldname === this.objectIdField && (this._internalObjectIdField = u.field), n.name = u.tofieldname, n.alias = n.name;
802
+ const o = u.workingexpr !== null && Z(u.workingexpr) ? k(u.workingexpr, x.Standardised) : "";
803
+ switch (this._decodedStatsfield[r].typeofstat) {
804
+ case "SUM":
805
+ if (o !== "") {
806
+ if (l = this._parent.getField(o), !l)
807
+ throw new D(T.AggregationFieldNotFound);
808
+ n.type = l.type;
809
+ } else
810
+ n.type = "double";
811
+ break;
812
+ case "MIN":
813
+ case "MAX":
814
+ if (o !== "") {
815
+ if (l = this._parent.getField(o), !l)
816
+ throw new D(T.AggregationFieldNotFound);
817
+ n.type = l.type;
818
+ } else
819
+ n.type = "double";
820
+ break;
821
+ case "COUNT":
822
+ n.type = "integer";
823
+ break;
824
+ case "STDDEV":
825
+ case "VAR":
826
+ case "AVG":
827
+ if (o !== "" && (l = this._parent.getField(o), !l))
828
+ throw new D(T.AggregationFieldNotFound);
829
+ n.type = "double";
830
+ }
831
+ this.fields.push(n);
832
+ }
833
+ }
834
+ async _canDoAggregates() {
835
+ return !1;
836
+ }
837
+ async _getFeatures(e, t, i, s) {
838
+ t !== -1 && this._featureCache[t];
839
+ const a = this._maxQuery;
840
+ return this._checkIfNeedToExpandKnownPage(e, a) === !0 ? (await this._expandPagedSet(e, a, 0, 0, s), this._getFeatures(e, t, i, s)) : "success";
841
+ }
842
+ async _getFilteredSet(e, t, i, s, a) {
843
+ if (e !== "")
844
+ return new _([], [], !0, null);
845
+ let r = null;
846
+ const n = { ordered: !1, nowhereclause: !1 };
847
+ if (await this._ensureLoaded(), i !== null) {
848
+ for (let u = 0; u < this._decodedStatsfield.length; u++)
849
+ if (ve(i, this._decodedStatsfield[u].tofieldname) === !0) {
850
+ n.nowhereclause = !0, i = null;
851
+ break;
852
+ }
853
+ }
854
+ if (s !== null) {
855
+ n.ordered = !0;
856
+ for (let u = 0; u < this._decodedStatsfield.length; u++)
857
+ if (s.scanForField(this._decodedStatsfield[u].tofieldname) === !0) {
858
+ s = null, n.ordered = !1;
859
+ break;
860
+ }
861
+ if (s !== null) {
862
+ for (const u of this._decodedGroupbyfield)
863
+ if (u.singlefield === null && s.scanForField(u.tofieldname) === !0) {
864
+ s = null, n.ordered = !1;
865
+ break;
866
+ }
867
+ }
868
+ }
869
+ if (this._candosimplegroupby !== !1 && await this._parent._canDoAggregates(this.phsyicalgroupbyfields, this._decodedStatsfield, "", null, null)) {
870
+ let u = null;
871
+ i && (u = this._reformulateWhereClauseWithoutGroupByFields(i));
872
+ let o = null;
873
+ s && (o = this._reformulateOrderClauseWithoutGroupByFields(s));
874
+ const d = await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields, this._decodedStatsfield, "", null, u, o, this._internalObjectIdField);
875
+ return this._checkCancelled(a), r = n.nowhereclause === !0 ? new _(d._candidates.slice(0).concat(d._known.slice(0)), [], n.ordered === !0 && d._ordered, this._clonePageDefinition(d.pagesDefinition)) : new _(d._candidates.slice(0), d._known.slice(0), n.ordered === !0 && d._ordered, this._clonePageDefinition(d.pagesDefinition)), r;
876
+ }
877
+ let l = this._parent;
878
+ if (this._adaptedFields.length > 0 && (l = new bt({ parentfeatureset: this._parent, adaptedFields: this._adaptedFields, extraFilter: null })), n.nowhereclause === !0)
879
+ r = new _(["GETPAGES"], [], !1, { aggregatefeaturesetpagedefinition: !0, resultOffset: 0, resultRecordCount: this._maxQuery, internal: { fullyResolved: !1, workingItem: null, type: "manual", iterator: null, set: [], subfeatureset: new te({ parentfeatureset: l, orderbyclause: new W(this.phsyicalgroupbyfields.join(",") + "," + this._parent.objectIdField + " ASC") }) } });
880
+ else {
881
+ let u = l;
882
+ if (i !== null) {
883
+ let o = null;
884
+ i && (o = this._reformulateWhereClauseWithoutGroupByFields(i)), u = new Oe({ parentfeatureset: u, whereclause: o });
885
+ }
886
+ r = new _(["GETPAGES"], [], !1, { aggregatefeaturesetpagedefinition: !0, resultOffset: 0, resultRecordCount: this._maxQuery, internal: { fullyResolved: !1, workingItem: null, type: "manual", iterator: null, set: [], subfeatureset: new te({ parentfeatureset: u, orderbyclause: new W(this.phsyicalgroupbyfields.join(",") + "," + this._parent.objectIdField + " ASC") }) } });
887
+ }
888
+ return r;
889
+ }
890
+ _reformulateWhereClauseWithoutStatsFields(e) {
891
+ for (const t of this._decodedStatsfield)
892
+ e = Q(e, t.tofieldname, k(t.workingexpr, x.Standardised), this._parent.getFieldsIndex());
893
+ return e;
894
+ }
895
+ _reformulateWhereClauseWithoutGroupByFields(e) {
896
+ for (const t of this._decodedGroupbyfield)
897
+ t.tofieldname !== t.name && (e = Q(e, t.tofieldname, k(t.expression, x.Standardised), this._parent.getFieldsIndex()));
898
+ return e;
899
+ }
900
+ _reformulateOrderClauseWithoutGroupByFields(e) {
901
+ const t = [];
902
+ for (const i of this._decodedGroupbyfield)
903
+ i.tofieldname !== i.name && t.push({ field: i.tofieldname, newfield: i.name });
904
+ return t.length > 0 ? e.replaceFields(t) : e;
905
+ }
906
+ _clonePageDefinition(e) {
907
+ return e === null ? null : e.aggregatefeaturesetpagedefinition === !0 ? { aggregatefeaturesetpagedefinition: !0, resultRecordCount: e.resultRecordCount, resultOffset: e.resultOffset, internal: e.internal } : this._parent._clonePageDefinition(e);
908
+ }
909
+ async _refineSetBlock(e, t, i) {
910
+ return this._checkIfNeedToExpandCandidatePage(e, this._maxQuery) === !0 ? (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);
911
+ }
912
+ _expandPagedSet(e, t, i, s, a) {
913
+ return this._expandPagedSetFeatureSet(e, t, i, s, a);
914
+ }
915
+ async _getPhysicalPage(e, t, i) {
916
+ if (e.pagesDefinition.aggregatefeaturesetpagedefinition === !0)
917
+ return this._sequentialGetPhysicalItem(e, e.pagesDefinition.resultRecordCount, i, []);
918
+ const s = await this._getAgregagtePhysicalPage(e, t, i);
919
+ for (const a of s) {
920
+ const r = { geometry: a.geometry, attributes: {} }, n = {};
921
+ for (const l in a.attributes)
922
+ n[l.toLowerCase()] = a.attributes[l];
923
+ for (const l of this._decodedGroupbyfield)
924
+ r.attributes[l.tofieldname] = n[l.name.toLowerCase()];
925
+ for (const l of this._decodedStatsfield)
926
+ r.attributes[l.tofieldname] = n[l.field.toLowerCase()];
927
+ this._featureCache[r.attributes[this.objectIdField]] = new G(r);
928
+ }
929
+ return s.length;
930
+ }
931
+ _sequentialGetPhysicalItem(e, t, i, s) {
932
+ return new Promise((a, r) => {
933
+ e.pagesDefinition.internal.iterator === null && (e.pagesDefinition.internal.iterator = e.pagesDefinition.internal.subfeatureset.iterator(i)), e.pagesDefinition.internal.fullyResolved === !0 || t === 0 ? a(s.length) : this._nextAggregateItem(e, t, i, s, (n) => {
934
+ n === null ? a(s.length) : (t -= 1, a(this._sequentialGetPhysicalItem(e, t, i, s)));
935
+ }, r);
936
+ });
937
+ }
938
+ _nextAggregateItem(e, t, i, s, a, r) {
939
+ try {
940
+ $(e.pagesDefinition.internal.iterator.next()).then((n) => {
941
+ if (n === null)
942
+ if (e.pagesDefinition.internal.workingItem !== null) {
943
+ const l = this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);
944
+ s.push(l), e.pagesDefinition.internal.workingItem = null, e.pagesDefinition.internal.set.push(l.attributes[this.objectIdField]), e.pagesDefinition.internal.fullyResolved = !0, a(null);
945
+ } else
946
+ e.pagesDefinition.internal.fullyResolved = !0, a(null);
947
+ else {
948
+ const l = this._generateAggregateHash(n);
949
+ if (e.pagesDefinition.internal.workingItem === null)
950
+ e.pagesDefinition.internal.workingItem = { features: [n], id: l };
951
+ else {
952
+ if (l !== e.pagesDefinition.internal.workingItem.id) {
953
+ const u = this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);
954
+ return s.push(u), e.pagesDefinition.internal.workingItem = null, e.pagesDefinition.internal.set.push(u.attributes[this.objectIdField]), t -= 1, e.pagesDefinition.internal.workingItem = { features: [n], id: l }, void a(u);
955
+ }
956
+ e.pagesDefinition.internal.workingItem.features.push(n);
957
+ }
958
+ this._nextAggregateItem(e, t, i, s, a, r);
959
+ }
960
+ }, r);
961
+ } catch (n) {
962
+ r(n);
963
+ }
964
+ }
965
+ _calculateFieldStat(e, t, i) {
966
+ const s = [];
967
+ for (let a = 0; a < e.features.length; a++)
968
+ if (t.workingexpr !== null) {
969
+ const r = t.workingexpr.calculateValue(e.features[a]);
970
+ r !== null && (r instanceof dt || r instanceof ht ? s.push(r.toNumber()) : r instanceof tt ? s.push(r.toMilliseconds()) : s.push(r));
971
+ } else
972
+ s.push(null);
973
+ switch (t.typeofstat) {
974
+ case "MIN":
975
+ i.attributes[t.tofieldname] = U("min", s, -1);
976
+ break;
977
+ case "MAX":
978
+ i.attributes[t.tofieldname] = U("max", s, -1);
979
+ break;
980
+ case "SUM":
981
+ i.attributes[t.tofieldname] = U("sum", s, -1);
982
+ break;
983
+ case "COUNT":
984
+ i.attributes[t.tofieldname] = s.length;
985
+ break;
986
+ case "VAR":
987
+ i.attributes[t.tofieldname] = U("var", s, -1);
988
+ break;
989
+ case "STDDEV":
990
+ i.attributes[t.tofieldname] = U("stddev", s, -1);
991
+ break;
992
+ case "AVG":
993
+ i.attributes[t.tofieldname] = U("avg", s, -1);
994
+ }
995
+ return !0;
996
+ }
997
+ _calculateAndAppendAggregateItem(e) {
998
+ const t = { attributes: {}, geometry: null };
999
+ for (const s of this._decodedGroupbyfield) {
1000
+ const a = s.singlefield ? e.features[0].attributes[s.singlefield] : R.convertValueToStorageFormat(s.expression.calculateValue(e.features[0]), s.sqlType);
1001
+ t.attributes[s.tofieldname] = a;
1002
+ }
1003
+ for (const s of this._decodedStatsfield)
1004
+ this._calculateFieldStat(e, s, t);
1005
+ const i = [];
1006
+ for (let s = 0; s < this._decodedStatsfield.length; s++)
1007
+ i.push(this._calculateFieldStat(e, this._decodedStatsfield[s], t));
1008
+ return this._featureCache[t.attributes[this.objectIdField]] = new G({ attributes: t.attributes, geometry: t.geometry }), t;
1009
+ }
1010
+ _generateAggregateHash(e) {
1011
+ let t = "";
1012
+ for (const i of this._decodedGroupbyfield) {
1013
+ const s = i.singlefield ? e.attributes[i.singlefield] : i.expression.calculateValue(e);
1014
+ t += s == null ? ":" : ":" + s.toString();
1015
+ }
1016
+ return xe(t, Ne.String);
1017
+ }
1018
+ async _stat() {
1019
+ return { calculated: !1 };
1020
+ }
1021
+ async getFeatureByObjectId() {
1022
+ return null;
1023
+ }
1024
+ static registerAction() {
1025
+ E._featuresetFunctions.groupby = function(e, t) {
1026
+ return new Pe({ parentfeatureset: this, groupbyfields: e, statsfields: t });
1027
+ };
1028
+ }
1029
+ };
1030
+ class le extends E {
1031
+ constructor(e) {
1032
+ 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;
1033
+ }
1034
+ async _getSet(e) {
1035
+ if (this._wset === null) {
1036
+ await this._ensureLoaded();
1037
+ const t = await this._parent._getSet(e);
1038
+ return this._wset = new _(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;
1039
+ }
1040
+ return this._wset;
1041
+ }
1042
+ _setKnownLength(e) {
1043
+ return e._known.length > 0 && e._known[e._known.length - 1] === "GETPAGES" ? e._known.length - 1 : e._known.length;
1044
+ }
1045
+ _isInFeatureSet(e) {
1046
+ const t = this._parent._isInFeatureSet(e);
1047
+ if (t === I.NotInFeatureSet)
1048
+ return t;
1049
+ const i = this._idstates[e];
1050
+ return i === I.InFeatureSet || i === I.NotInFeatureSet ? i : t === I.InFeatureSet && i === void 0 ? this._countedin < this._topnum ? (this._idstates[e] = I.InFeatureSet, this._countedin++, I.InFeatureSet) : (this._idstates[e] = I.NotInFeatureSet, I.NotInFeatureSet) : I.Unknown;
1051
+ }
1052
+ async _expandPagedSet(e, t, i, s, a) {
1053
+ if (this._parent === null)
1054
+ throw new D(T.NotImplemented);
1055
+ if (t > this._topnum && (t = this._topnum), this._countedin >= this._topnum && e.pagesDefinition.internal.set.length <= e.pagesDefinition.resultOffset) {
1056
+ let n = e._known.length;
1057
+ return n > 0 && e._known[n - 1] === "GETPAGES" && (e._known.length = n - 1), n = e._candidates.length, n > 0 && e._candidates[n - 1] === "GETPAGES" && (e._candidates.length = n - 1), "success";
1058
+ }
1059
+ const r = await this._parent._expandPagedSet(e, t, i, s, a);
1060
+ return this._setKnownLength(e) > this._topnum && (e._known.length = this._topnum), this._setKnownLength(e) >= this._topnum && (e._candidates.length = 0), r;
1061
+ }
1062
+ async _getFeatures(e, t, i, s) {
1063
+ const a = [], r = this._maxQueryRate();
1064
+ if (this._checkIfNeedToExpandKnownPage(e, r) === !0)
1065
+ return await this._expandPagedSet(e, r, 0, 0, s), this._getFeatures(e, t, i, s);
1066
+ t !== -1 && this._featureCache[t] === void 0 && a.push(t);
1067
+ let n = 0;
1068
+ for (let o = e._lastFetchedIndex; o < e._known.length && (n++, n <= i && (e._lastFetchedIndex += 1), !(this._featureCache[e._known[o]] === void 0 && (e._known[o] !== t && a.push(e._known[o]), a.length > r))); o++)
1069
+ ;
1070
+ if (a.length === 0)
1071
+ return "success";
1072
+ const l = new _([], a, !1, null), u = Math.min(a.length, i);
1073
+ await this._parent._getFeatures(l, -1, u, s);
1074
+ for (let o = 0; o < u; o++) {
1075
+ const d = this._parent._featureFromCache(a[o]);
1076
+ d !== void 0 && (this._featureCache[a[o]] = d);
1077
+ }
1078
+ return "success";
1079
+ }
1080
+ async _getFilteredSet(e, t, i, s, a) {
1081
+ await this._ensureLoaded();
1082
+ const r = await this._getSet(a);
1083
+ return new _(r._candidates.slice(0).concat(r._known.slice(0)), [], !1, this._clonePageDefinition(r.pagesDefinition));
1084
+ }
1085
+ _refineKnowns(e, t) {
1086
+ let i = 0, s = null;
1087
+ const a = [];
1088
+ for (let r = 0; r < e._candidates.length; r++) {
1089
+ const n = this._isInFeatureSet(e._candidates[r]);
1090
+ if (n === I.InFeatureSet) {
1091
+ if (e._known.push(e._candidates[r]), i += 1, s === null ? s = { start: r, end: r } : s.end === r - 1 ? s.end = r : (a.push(s), s = { start: r, end: r }), e._known.length >= this._topnum)
1092
+ break;
1093
+ } else if (n === I.NotInFeatureSet)
1094
+ s === null ? s = { start: r, end: r } : s.end === r - 1 ? s.end = r : (a.push(s), s = { start: r, end: r }), i += 1;
1095
+ else if (n === I.Unknown)
1096
+ break;
1097
+ if (i >= t)
1098
+ break;
1099
+ }
1100
+ s !== null && a.push(s);
1101
+ for (let r = a.length - 1; r >= 0; r--)
1102
+ e._candidates.splice(a[r].start, a[r].end - a[r].start + 1);
1103
+ this._setKnownLength(e) > this._topnum && (e._known = e._known.slice(0, this._topnum)), this._setKnownLength(e) >= this._topnum && (e._candidates = []);
1104
+ }
1105
+ async _stat() {
1106
+ return { calculated: !1 };
1107
+ }
1108
+ async _canDoAggregates() {
1109
+ return !1;
1110
+ }
1111
+ static registerAction() {
1112
+ E._featuresetFunctions.top = function(e) {
1113
+ return new le({ parentfeatureset: this, topnum: e });
1114
+ };
1115
+ }
1116
+ getFieldsIndex() {
1117
+ return this._parent.getFieldsIndex();
1118
+ }
1119
+ }
1120
+ async function Tt(h, e, t, i) {
1121
+ return vt(e, await Rt(h, e, t, i), t, i);
1122
+ }
1123
+ async function Rt(h, e, t, i) {
1124
+ var o;
1125
+ const s = { ...i }, a = xt(e, t), r = ((o = e.outStatistics) == null ? void 0 : o[0]) != null, n = Me("featurelayer-pbf-statistics"), l = !r || n;
1126
+ let u;
1127
+ if ((t == null ? void 0 : t.format) === "pbf" && l)
1128
+ try {
1129
+ u = await pt(h, a, s);
1130
+ } catch (d) {
1131
+ if (d.name !== "query:parsing-pbf")
1132
+ throw d;
1133
+ t.format = "json";
1134
+ }
1135
+ return (t == null ? void 0 : t.format) !== "json" && l || (u = await ft(h, a, s)), kt(t == null ? void 0 : t.fieldsIndex, u.fields), u;
1136
+ }
1137
+ function kt(h, e) {
1138
+ if (h != null && e != null)
1139
+ for (const t of e) {
1140
+ const i = h.get(t.name);
1141
+ i && Object.assign(t, i.toJSON());
1142
+ }
1143
+ }
1144
+ async function vt(h, e, t, i) {
1145
+ var r;
1146
+ const s = t == null ? void 0 : t.infoFor3D;
1147
+ if (!qe(h, s) || s == null || !e.assetMaps || !((r = e.features) != null && r.length))
1148
+ return _t.fromJSON(e);
1149
+ const { meshFeatureSetFromJSON: a } = await We(import("./meshFeatureSet-07b96756.js"), i);
1150
+ return a(h, s, e);
1151
+ }
1152
+ function xt(h, e) {
1153
+ let t = N.from(h);
1154
+ t.sourceSpatialReference = t.sourceSpatialReference ?? (e == null ? void 0 : e.sourceSpatialReference) ?? null, (e != null && e.gdbVersion || e != null && e.dynamicDataSource) && (t = t === h ? t.clone() : t, t.gdbVersion = h.gdbVersion || e.gdbVersion, t.dynamicDataSource = h.dynamicDataSource ? $e.from(h.dynamicDataSource) : e.dynamicDataSource);
1155
+ const i = e == null ? void 0 : e.infoFor3D;
1156
+ if (i != null && qe(h, i)) {
1157
+ t = t === h ? t.clone() : t, t.formatOf3DObjects = null;
1158
+ const { supportedFormats: s, queryFormats: a } = i, r = Ie("model/gltf-binary", s) ?? Ce("glb", s), n = Ie("model/gltf+json", s) ?? Ce("gtlf", s);
1159
+ for (const l of a) {
1160
+ if (l === r) {
1161
+ t.formatOf3DObjects = l;
1162
+ break;
1163
+ }
1164
+ l !== n || t.formatOf3DObjects || (t.formatOf3DObjects = l);
1165
+ }
1166
+ if (!t.formatOf3DObjects)
1167
+ throw new Ve("query:unsupported-3d-query-formats", "Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");
1168
+ if (t.outFields == null || !t.outFields.includes("*")) {
1169
+ t = t === h ? t.clone() : t, t.outFields == null && (t.outFields = []);
1170
+ const { originX: l, originY: u, originZ: o, translationX: d, translationY: c, translationZ: f, scaleX: y, scaleY: g, scaleZ: b, rotationX: S, rotationY: p, rotationZ: w, rotationDeg: C } = i.transformFieldRoles;
1171
+ t.outFields.push(l, u, o, d, c, f, y, g, b, S, p, w, C);
1172
+ }
1173
+ }
1174
+ return t;
1175
+ }
1176
+ function qe(h, e) {
1177
+ return e != null && h.returnGeometry === !0 && h.multipatchOption !== "xyFootprint" && !h.outStatistics;
1178
+ }
1179
+ class z extends E {
1180
+ constructor(e) {
1181
+ 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, e.spatialReference && (this.spatialReference = e.spatialReference), this._transparent = !0, this._maxProcessing = 1e3, this._layer = e.layer, this._wset = null, e.outFields !== void 0 && (this._overrideFields = e.outFields), e.includeGeometry !== void 0 && (this._removeGeometry = e.includeGeometry === !1);
1182
+ }
1183
+ _maxQueryRate() {
1184
+ return ne;
1185
+ }
1186
+ end() {
1187
+ return this._layer;
1188
+ }
1189
+ optimisePagingFeatureQueries(e) {
1190
+ this._pageJustIds = e;
1191
+ }
1192
+ get urlQueryPath() {
1193
+ return this._layer.parsedUrl.path || "";
1194
+ }
1195
+ convertQueryToLruCacheKey(e) {
1196
+ const t = this.urlQueryPath + "," + Xe(e.toJSON());
1197
+ return xe(t, Ne.String);
1198
+ }
1199
+ async loadImpl() {
1200
+ return this._layer.loaded === !0 ? (this._initialiseFeatureSet(), this) : (await this._layer.load(), this._initialiseFeatureSet(), this);
1201
+ }
1202
+ _initialiseFeatureSet() {
1203
+ var e, t, i, s, a, r;
1204
+ if (this.spatialReference == null && (this.spatialReference = this._layer.spatialReference), this.geometryType = this._layer.geometryType, this.fields = this._layer.fields.slice(0), this.hasZ = ((i = (t = (e = this._layer) == null ? void 0 : e.capabilities) == null ? void 0 : t.data) == null ? void 0 : i.supportsZ) === !0, this.hasM = ((r = (a = (s = this._layer) == null ? void 0 : s.capabilities) == null ? void 0 : a.data) == null ? void 0 : r.supportsM) === !0, this._overrideFields !== null)
1205
+ if (this._overrideFields.length === 1 && this._overrideFields[0] === "*")
1206
+ this._overrideFields = null;
1207
+ else {
1208
+ const n = [], l = [];
1209
+ for (const u of this.fields)
1210
+ if (u.type === "oid")
1211
+ n.push(u), l.push(u.name);
1212
+ else
1213
+ for (const o of this._overrideFields)
1214
+ if (o.toLowerCase() === u.name.toLowerCase()) {
1215
+ n.push(u), l.push(u.name);
1216
+ break;
1217
+ }
1218
+ this.fields = n, this._overrideFields = l;
1219
+ }
1220
+ if (this._layer.source && this._layer.source.sourceJSON) {
1221
+ const n = this._layer.source.sourceJSON.currentVersion;
1222
+ this._layer.source.sourceJSON.useStandardizedQueries === !0 ? (this._databaseType = x.StandardisedNoInterval, n != null && n >= 10.61 && (this._databaseType = x.Standardised)) : n != null && (n >= 10.5 && (this._databaseType = x.StandardisedNoInterval, this._requestStandardised = !0), n >= 10.61 && (this._databaseType = x.Standardised));
1223
+ }
1224
+ this.objectIdField = this._layer.objectIdField;
1225
+ for (const n of this.fields)
1226
+ n.type === "global-id" && (this.globalIdField = n.name);
1227
+ this._layer instanceof Le ? (this.subtypeField = this._layer.subtypeField ?? "", this.subtypes = this._layer.subtypes, this.types = null, this.typeIdField = null) : (this.typeIdField = this._layer.typeIdField ?? "", this.types = this._layer.types, this.subtypeField = this._layer.subtypeField, this.subtypes = this._layer.subtypes);
1228
+ }
1229
+ _isInFeatureSet() {
1230
+ return I.InFeatureSet;
1231
+ }
1232
+ async _refineSetBlock(e) {
1233
+ return e;
1234
+ }
1235
+ _candidateIdTransform(e) {
1236
+ return e;
1237
+ }
1238
+ async _getSet(e) {
1239
+ if (this._wset === null) {
1240
+ await this._ensureLoaded();
1241
+ const t = await this._getFilteredSet("", null, null, null, e);
1242
+ return this._wset = t, t;
1243
+ }
1244
+ return this._wset;
1245
+ }
1246
+ async _runDatabaseProbe(e) {
1247
+ await this._ensureLoaded();
1248
+ const t = new N();
1249
+ this.datesInUnknownTimezone && (t.timeReferenceUnknownClient = !0), t.where = e.replace("OBJECTID", this._layer.objectIdField);
1250
+ try {
1251
+ return await this._layer.queryObjectIds(t), !0;
1252
+ } catch {
1253
+ return !1;
1254
+ }
1255
+ }
1256
+ _canUsePagination() {
1257
+ return !(!this._layer.capabilities || !this._layer.capabilities.query || this._layer.capabilities.query.supportsPagination !== !0);
1258
+ }
1259
+ _cacheableFeatureSetSourceKey() {
1260
+ return this._layer.url;
1261
+ }
1262
+ pbfSupportedForQuery(e) {
1263
+ var i, s;
1264
+ const t = (s = (i = this._layer) == null ? void 0 : i.capabilities) == null ? void 0 : s.query;
1265
+ return !e.outStatistics && (t == null ? void 0 : t.supportsFormatPBF) === !0 && (t == null ? void 0 : t.supportsQuantizationEditMode) === !0;
1266
+ }
1267
+ async queryPBF(e) {
1268
+ return e.quantizationParameters = { mode: "edit" }, (await Tt(this._layer.parsedUrl, e, { format: "pbf" }, {})).unquantize();
1269
+ }
1270
+ get gdbVersion() {
1271
+ return this._layer && this._layer.capabilities && this._layer.capabilities.data && this._layer.capabilities.data.isVersioned ? this._layer.gdbVersion || "SDE.DEFAULT" : "";
1272
+ }
1273
+ nativeCapabilities() {
1274
+ return { title: this._layer.title ?? "", source: this, canQueryRelated: !0, capabilities: this._layer.capabilities, databaseType: this._databaseType, requestStandardised: this._requestStandardised };
1275
+ }
1276
+ executeQuery(e, t) {
1277
+ e.returnZ = this.hasZ, e.returnM = this.hasM;
1278
+ const i = t === "execute" ? De : t === "executeForCount" ? yt : gt, s = t === "execute" && this.pbfSupportedForQuery(e);
1279
+ let a = null;
1280
+ if (this.recentlyUsedQueries) {
1281
+ const r = this.convertQueryToLruCacheKey(e);
1282
+ a = this.recentlyUsedQueries.getFromCache(r), a === null && (a = s !== !0 ? i(this._layer.parsedUrl.path, e) : this.queryPBF(e), this.recentlyUsedQueries.addToCache(r, a), a = a.catch((n) => {
1283
+ var l;
1284
+ throw (l = this.recentlyUsedQueries) == null || l.removeFromCache(r), n;
1285
+ }));
1286
+ }
1287
+ return this.featureSetQueryInterceptor && this.featureSetQueryInterceptor.preLayerQueryCallback({ layer: this._layer, query: e, method: t }), a === null && (a = s !== !0 ? i(this._layer.parsedUrl.path, e) : this.queryPBF(e)), a;
1288
+ }
1289
+ async _getFilteredSet(e, t, i, s, a) {
1290
+ const r = await this.databaseType();
1291
+ if (this.isTable() && t && e !== null && e !== "")
1292
+ return new _([], [], !0, null);
1293
+ if (this._canUsePagination())
1294
+ return this._getFilteredSetUsingPaging(e, t, i, s, a);
1295
+ let n = "", l = !1;
1296
+ s !== null && this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsOrderBy === !0 && (n = s.constructClause(), l = !0);
1297
+ const u = new N();
1298
+ this.datesInUnknownTimezone && (u.timeReferenceUnknownClient = !0), u.where = i === null ? t === null ? "1=1" : "" : k(i, r), this._requestStandardised && (u.sqlFormat = "standard"), u.spatialRelationship = this._makeRelationshipEnum(e), u.outSpatialReference = this.spatialReference, u.orderByFields = n !== "" ? n.split(",") : null, u.geometry = t === null ? null : t, u.relationParameter = this._makeRelationshipParam(e);
1299
+ let o = await this.executeQuery(u, "executeForIds");
1300
+ return o === null && (o = []), this._checkCancelled(a), new _([], o, l, null);
1301
+ }
1302
+ _expandPagedSet(e, t, i, s, a) {
1303
+ return this._expandPagedSetFeatureSet(e, t, i, s, a);
1304
+ }
1305
+ async _getFilteredSetUsingPaging(e, t, i, s, a) {
1306
+ var f;
1307
+ let r = "", n = !1;
1308
+ s !== null && this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsOrderBy === !0 && (r = s.constructClause(), n = !0);
1309
+ const l = await this.databaseType();
1310
+ let u = i === null ? t === null ? "1=1" : "" : k(i, l);
1311
+ this._layer.definitionExpression && this._useDefinitionExpression && (u = u !== "" ? "((" + this._layer.definitionExpression + ") AND (" + u + "))" : this._layer.definitionExpression);
1312
+ let o = this._maxQueryRate();
1313
+ const d = (f = this._layer.capabilities) == null ? void 0 : f.query.maxRecordCount;
1314
+ d != null && d < o && (o = d);
1315
+ let c = null;
1316
+ if (this._pageJustIds === !0)
1317
+ c = new _([], ["GETPAGES"], n, { spatialRel: this._makeRelationshipEnum(e), relationParam: this._makeRelationshipParam(e), outFields: this._layer.objectIdField, resultRecordCount: o, resultOffset: 0, geometry: t === null ? null : t, where: u, orderByFields: r, returnGeometry: !1, returnIdsOnly: "false", internal: { set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } });
1318
+ else {
1319
+ let y = !0;
1320
+ this._removeGeometry === !0 && (y = !1);
1321
+ const g = this._overrideFields ?? this._fieldsIncludingObjectId(["*"]);
1322
+ c = new _([], ["GETPAGES"], n, { spatialRel: this._makeRelationshipEnum(e), relationParam: this._makeRelationshipParam(e), outFields: g.join(","), resultRecordCount: o, resultOffset: 0, geometry: t === null ? null : t, where: u, orderByFields: r, returnGeometry: y, returnIdsOnly: "false", internal: { set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } });
1323
+ }
1324
+ return await this._expandPagedSet(c, o, 0, 1, a), c;
1325
+ }
1326
+ _clonePageDefinition(e) {
1327
+ return e === null ? null : e.groupbypage !== !0 ? { 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 };
1328
+ }
1329
+ async _getPhysicalPage(e, t, i) {
1330
+ const s = e.pagesDefinition.internal.lastRetrieved, a = s, r = e.pagesDefinition.internal.lastPage, n = new N();
1331
+ this._requestStandardised && (n.sqlFormat = "standard"), this.datesInUnknownTimezone && (n.timeReferenceUnknownClient = !0), n.spatialRelationship = e.pagesDefinition.spatialRel, n.relationParameter = e.pagesDefinition.relationParam, n.outFields = e.pagesDefinition.outFields.split(","), n.num = e.pagesDefinition.resultRecordCount, n.start = e.pagesDefinition.internal.lastPage, n.geometry = e.pagesDefinition.geometry, n.where = e.pagesDefinition.where, n.orderByFields = e.pagesDefinition.orderByFields !== "" ? e.pagesDefinition.orderByFields.split(",") : null, n.returnGeometry = e.pagesDefinition.returnGeometry, n.outSpatialReference = this.spatialReference;
1332
+ const l = await this.executeQuery(n, "execute");
1333
+ if (this._checkCancelled(i), e.pagesDefinition.internal.lastPage !== r)
1334
+ return "done";
1335
+ const u = this._layer.objectIdField;
1336
+ for (let o = 0; o < l.features.length; o++)
1337
+ e.pagesDefinition.internal.set[a + o] = l.features[o].attributes[u];
1338
+ if (this._pageJustIds === !1)
1339
+ for (let o = 0; o < l.features.length; o++)
1340
+ this._featureCache[l.features[o].attributes[u]] = l.features[o];
1341
+ return (l.exceededTransferLimit === void 0 && l.features.length !== e.pagesDefinition.resultRecordCount || l.exceededTransferLimit === !1) && (e.pagesDefinition.internal.fullyResolved = !0), e.pagesDefinition.internal.lastRetrieved = s + l.features.length, e.pagesDefinition.internal.lastPage += e.pagesDefinition.resultRecordCount, "done";
1342
+ }
1343
+ _fieldsIncludingObjectId(e) {
1344
+ if (e === null)
1345
+ return [this.objectIdField];
1346
+ const t = e.slice(0);
1347
+ if (t.includes("*"))
1348
+ return t;
1349
+ let i = !1;
1350
+ for (const s of t)
1351
+ if (s.toUpperCase() === this.objectIdField.toUpperCase()) {
1352
+ i = !0;
1353
+ break;
1354
+ }
1355
+ return i === !1 && t.push(this.objectIdField), t;
1356
+ }
1357
+ async _getFeatures(e, t, i, s) {
1358
+ const a = [];
1359
+ if (t !== -1 && this._featureCache[t] === void 0 && a.push(t), this._checkIfNeedToExpandKnownPage(e, this._maxProcessingRate()) === !0)
1360
+ return await this._expandPagedSet(e, this._maxProcessingRate(), 0, 0, s), this._getFeatures(e, t, i, s);
1361
+ let r = 0;
1362
+ for (let o = e._lastFetchedIndex; o < e._known.length; o++) {
1363
+ if (e._lastFetchedIndex += 1, r++, this._featureCache[e._known[o]] === void 0) {
1364
+ let d = !1;
1365
+ if (this._layer._mode !== null && this._layer._mode !== void 0) {
1366
+ const c = this._layer._mode;
1367
+ if (c._featureMap[e._known[o]] !== void 0) {
1368
+ const f = c._featureMap[e._known[o]];
1369
+ f !== null && (d = !0, this._featureCache[e._known[o]] = f);
1370
+ }
1371
+ }
1372
+ if (d === !1 && (e._known[o] !== t && a.push(e._known[o]), a.length >= this._maxProcessingRate() - 1))
1373
+ break;
1374
+ }
1375
+ if (r >= i && a.length === 0)
1376
+ break;
1377
+ }
1378
+ if (a.length === 0)
1379
+ return "success";
1380
+ const n = new N();
1381
+ this._requestStandardised && (n.sqlFormat = "standard"), this.datesInUnknownTimezone && (n.timeReferenceUnknownClient = !0), n.objectIds = a, n.outFields = this._overrideFields ?? this._fieldsIncludingObjectId(["*"]), n.returnGeometry = !0, this._removeGeometry === !0 && (n.returnGeometry = !1), n.outSpatialReference = this.spatialReference;
1382
+ const l = await this.executeQuery(n, "execute");
1383
+ if (this._checkCancelled(s), l.error !== void 0)
1384
+ throw new D(T.RequestFailed, { reason: l.error });
1385
+ const u = this._layer.objectIdField;
1386
+ for (let o = 0; o < l.features.length; o++)
1387
+ this._featureCache[l.features[o].attributes[u]] = l.features[o];
1388
+ return "success";
1389
+ }
1390
+ async _getDistinctPages(e, t, i, s, a, r, n, l, u) {
1391
+ var S;
1392
+ await this._ensureLoaded();
1393
+ const o = await this.databaseType();
1394
+ let d = i.parseTree.column;
1395
+ const c = this._layer.fields ?? [];
1396
+ for (let p = 0; p < c.length; p++)
1397
+ if (c[p].name.toLowerCase() === d.toLowerCase()) {
1398
+ d = c[p].name;
1399
+ break;
1400
+ }
1401
+ const f = new N();
1402
+ this._requestStandardised && (f.sqlFormat = "standard"), this.datesInUnknownTimezone && (f.timeReferenceUnknownClient = !0);
1403
+ let y = r === null ? a === null ? "1=1" : "" : k(r, o);
1404
+ this._layer.definitionExpression && this._useDefinitionExpression && (y = y !== "" ? "((" + this._layer.definitionExpression + ") AND (" + y + "))" : this._layer.definitionExpression), f.where = y, f.spatialRelationship = this._makeRelationshipEnum(s), f.relationParameter = this._makeRelationshipParam(s), f.geometry = a === null ? null : a, f.returnDistinctValues = !0, f.returnGeometry = !1, f.outFields = [d];
1405
+ const g = await this.executeQuery(f, "execute");
1406
+ if (this._checkCancelled(u), !g.hasOwnProperty("features"))
1407
+ throw new D(T.InvalidStatResponse);
1408
+ let b = !1;
1409
+ for (let p = 0; p < c.length; p++)
1410
+ if (c[p].name === d) {
1411
+ c[p].type === "date" && (b = !0);
1412
+ break;
1413
+ }
1414
+ for (let p = 0; p < g.features.length; p++) {
1415
+ if (b) {
1416
+ const w = g.features[p].attributes[d];
1417
+ w !== null ? l.push(new Date(w)) : l.push(w);
1418
+ } else
1419
+ l.push(g.features[p].attributes[d]);
1420
+ if (l.length >= n)
1421
+ break;
1422
+ }
1423
+ return g.features.length === 0 ? l : g.features.length === ((S = this._layer.capabilities) == null ? void 0 : S.query.maxRecordCount) && l.length < n ? { calculated: !0, result: await this._getDistinctPages(e + g.features.length, t, i, s, a, r, n, l, u) } : l;
1424
+ }
1425
+ async _distinctStat(e, t, i, s, a, r, n) {
1426
+ return { calculated: !0, result: await this._getDistinctPages(0, e, t, i, s, a, r, [], n) };
1427
+ }
1428
+ isTable() {
1429
+ return this._layer.isTable || this._layer.geometryType === null || this._layer.type === "table" || this._layer.geometryType === "" || this._layer.geometryType === "esriGeometryNull";
1430
+ }
1431
+ async _countstat(e, t, i, s) {
1432
+ const a = await this.databaseType(), r = new N();
1433
+ if (this._requestStandardised && (r.sqlFormat = "standard"), this.isTable() && i && t !== null && t !== "")
1434
+ return { calculated: !0, result: 0 };
1435
+ let n = s === null ? i === null ? "1=1" : "" : k(s, a);
1436
+ return this._layer.definitionExpression && this._useDefinitionExpression && (n = n !== "" ? "((" + this._layer.definitionExpression + ") AND (" + n + "))" : this._layer.definitionExpression), r.where = n, this.datesInUnknownTimezone && (r.timeReferenceUnknownClient = !0), r.where = n, r.spatialRelationship = this._makeRelationshipEnum(t), r.relationParameter = this._makeRelationshipParam(t), r.geometry = i === null ? null : i, r.returnGeometry = !1, { calculated: !0, result: await this.executeQuery(r, "executeForCount") };
1437
+ }
1438
+ async _stats(e, t, i, s, a, r, n) {
1439
+ await this._ensureLoaded();
1440
+ const l = this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsSqlExpression === !0, u = this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsStatistics === !0, o = this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsDistinct === !0;
1441
+ if (e === "count")
1442
+ return o ? this._countstat(e, i, s, a) : { calculated: !1 };
1443
+ if (u === !1 || Z(t) === !1 && l === !1 || t.isStandardized === !1)
1444
+ return i !== "" || a !== null ? { calculated: !1 } : this._manualStat(e, t, r, n);
1445
+ if (e === "distinct")
1446
+ return o === !1 ? i !== "" || a !== null ? { calculated: !1 } : this._manualStat(e, t, r, n) : this._distinctStat(e, t, i, s, a, r, n);
1447
+ const d = await this.databaseType();
1448
+ if (this.isTable() && s && i !== null && i !== "")
1449
+ return { calculated: !0, result: null };
1450
+ const c = new N();
1451
+ this._requestStandardised && (c.sqlFormat = "standard");
1452
+ let f = a === null ? s === null ? "1=1" : "" : k(a, d);
1453
+ this._layer.definitionExpression && this._useDefinitionExpression && (f = f !== "" ? "((" + this._layer.definitionExpression + ") AND (" + f + "))" : this._layer.definitionExpression), c.where = f, c.spatialRelationship = this._makeRelationshipEnum(i), c.relationParameter = this._makeRelationshipParam(i), c.geometry = s === null ? null : s, this.datesInUnknownTimezone && (c.timeReferenceUnknownClient = !0);
1454
+ const y = new fe();
1455
+ y.statisticType = lt(e), y.onStatisticField = k(t, d), y.outStatisticFieldName = "ARCADE_STAT_RESULT", c.returnGeometry = !1;
1456
+ let g = "ARCADE_STAT_RESULT";
1457
+ c.outStatistics = [y];
1458
+ const b = await this.executeQuery(c, "execute");
1459
+ if (!b.hasOwnProperty("features") || b.features.length === 0)
1460
+ throw new D(T.InvalidStatResponse);
1461
+ let S = !1;
1462
+ const p = b.fields ?? [];
1463
+ for (let w = 0; w < p.length; w++)
1464
+ if (p[w].name.toUpperCase() === "ARCADE_STAT_RESULT") {
1465
+ g = p[w].name, p[w].type === "date" && (S = !0);
1466
+ break;
1467
+ }
1468
+ if (S) {
1469
+ let w = b.features[0].attributes[g];
1470
+ return w !== null && (w = new Date(b.features[0].attributes[g])), { calculated: !0, result: w };
1471
+ }
1472
+ return { calculated: !0, result: b.features[0].attributes[g] };
1473
+ }
1474
+ _stat(e, t, i, s, a, r, n) {
1475
+ return this._stats(e, t, i, s, a, r, n);
1476
+ }
1477
+ async _canDoAggregates(e, t) {
1478
+ var r, n;
1479
+ await this._ensureLoaded();
1480
+ let i = !1;
1481
+ const s = (r = this._layer.capabilities) == null ? void 0 : r.query, a = (s == null ? void 0 : s.supportsSqlExpression) === !0;
1482
+ if (s != null && s.supportsStatistics === !0 && s.supportsOrderBy === !0 && (i = !0), i)
1483
+ for (let l = 0; l < t.length - 1; l++)
1484
+ (((n = t[l].workingexpr) == null ? void 0 : n.isStandardized) === !1 || Z(t[l].workingexpr) === !1 && a === !1) && (i = !1);
1485
+ return i !== !1;
1486
+ }
1487
+ _makeRelationshipEnum(e) {
1488
+ if (e.includes("esriSpatialRelRelation"))
1489
+ return "relation";
1490
+ switch (e) {
1491
+ case "esriSpatialRelRelation":
1492
+ return "relation";
1493
+ case "esriSpatialRelIntersects":
1494
+ return "intersects";
1495
+ case "esriSpatialRelContains":
1496
+ return "contains";
1497
+ case "esriSpatialRelOverlaps":
1498
+ return "overlaps";
1499
+ case "esriSpatialRelWithin":
1500
+ return "within";
1501
+ case "esriSpatialRelTouches":
1502
+ return "touches";
1503
+ case "esriSpatialRelCrosses":
1504
+ return "crosses";
1505
+ case "esriSpatialRelEnvelopeIntersects":
1506
+ return "envelope-intersects";
1507
+ }
1508
+ return e;
1509
+ }
1510
+ _makeRelationshipParam(e) {
1511
+ return e.includes("esriSpatialRelRelation") ? e.split(":")[1] : "";
1512
+ }
1513
+ async _getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n) {
1514
+ var b;
1515
+ await this._ensureLoaded();
1516
+ const l = await this.databaseType();
1517
+ let u = "", o = !1, d = !1;
1518
+ r !== null && this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsOrderBy === !0 && (u = r.constructClause(), d = !0), this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsPagination === !1 && (d = !1, o = !0, u = this._layer.objectIdField);
1519
+ const c = [];
1520
+ for (let S = 0; S < t.length; S++) {
1521
+ const p = new fe();
1522
+ p.onStatisticField = t[S].workingexpr !== null ? k(t[S].workingexpr, l) : "", p.outStatisticFieldName = t[S].field, p.statisticType = t[S].toStatisticsName(), c.push(p);
1523
+ }
1524
+ u === "" && (u = e.join(","));
1525
+ let f = this._maxQueryRate();
1526
+ const y = (b = this._layer.capabilities) == null ? void 0 : b.query.maxRecordCount;
1527
+ y != null && y < f && (f = y);
1528
+ let g = a === null ? s === null ? "1=1" : "" : k(a, l);
1529
+ return this._layer.definitionExpression && this._useDefinitionExpression && (g = g !== "" ? "((" + this._layer.definitionExpression + ") AND (" + g + "))" : this._layer.definitionExpression), new _([], ["GETPAGES"], d, { groupbypage: !0, spatialRel: this._makeRelationshipEnum(i), relationParam: this._makeRelationshipParam(i), outFields: ["*"], useOIDpagination: o, generatedOid: n, resultRecordCount: f, resultOffset: 0, groupByFieldsForStatistics: e, outStatistics: c, geometry: s === null ? null : s, where: g, orderByFields: u, returnGeometry: !1, returnIdsOnly: !1, internal: { lastMaxId: -1, set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } });
1530
+ }
1531
+ async _getAgregagtePhysicalPage(e, t, i) {
1532
+ let s = e.pagesDefinition.where;
1533
+ e.pagesDefinition.useOIDpagination === !0 && (s = s !== "" ? "(" + s + ") AND (" + e.pagesDefinition.generatedOid + ">" + e.pagesDefinition.internal.lastMaxId.toString() + ")" : e.pagesDefinition.generatedOid + ">" + e.pagesDefinition.internal.lastMaxId.toString());
1534
+ const a = e.pagesDefinition.internal.lastRetrieved, r = a, n = e.pagesDefinition.internal.lastPage, l = new N();
1535
+ if (this._requestStandardised && (l.sqlFormat = "standard"), l.where = s, l.spatialRelationship = e.pagesDefinition.spatialRel, l.relationParameter = e.pagesDefinition.relationParam, l.outFields = e.pagesDefinition.outFields, l.outStatistics = e.pagesDefinition.outStatistics, l.geometry = e.pagesDefinition.geometry, l.groupByFieldsForStatistics = e.pagesDefinition.groupByFieldsForStatistics, l.num = e.pagesDefinition.resultRecordCount, l.start = e.pagesDefinition.internal.lastPage, l.returnGeometry = e.pagesDefinition.returnGeometry, this.datesInUnknownTimezone && (l.timeReferenceUnknownClient = !0), l.orderByFields = e.pagesDefinition.orderByFields !== "" ? e.pagesDefinition.orderByFields.split(",") : null, this.isTable() && l.geometry && l.spatialRelationship)
1536
+ return [];
1537
+ const u = await this.executeQuery(l, "execute");
1538
+ if (this._checkCancelled(i), !u.hasOwnProperty("features"))
1539
+ throw new D(T.InvalidStatResponse);
1540
+ const o = [];
1541
+ if (e.pagesDefinition.internal.lastPage !== n)
1542
+ return [];
1543
+ u.features.length > 0 && u.features[0].attributes[e.pagesDefinition.generatedOid] === void 0 && (e.pagesDefinition.generatedOid = e.pagesDefinition.generatedOid.toLowerCase());
1544
+ for (let d = 0; d < u.features.length; d++)
1545
+ e.pagesDefinition.internal.set[r + d] = u.features[d].attributes[e.pagesDefinition.generatedOid];
1546
+ for (let d = 0; d < u.features.length; d++)
1547
+ o.push(new G({ attributes: u.features[d].attributes, geometry: null }));
1548
+ return e.pagesDefinition.useOIDpagination === !0 ? u.features.length === 0 ? e.pagesDefinition.internal.fullyResolved = !0 : e.pagesDefinition.internal.lastMaxId = u.features[u.features.length - 1].attributes[e.pagesDefinition.generatedOid] : (u.exceededTransferLimit === void 0 && u.features.length !== e.pagesDefinition.resultRecordCount || u.exceededTransferLimit === !1) && (e.pagesDefinition.internal.fullyResolved = !0), e.pagesDefinition.internal.lastRetrieved = a + u.features.length, e.pagesDefinition.internal.lastPage += e.pagesDefinition.resultRecordCount, o;
1549
+ }
1550
+ static create(e, t, i, s, a) {
1551
+ const r = new v({ url: e, outFields: t === null ? ["*"] : t });
1552
+ return new z({ layer: r, spatialReference: i, lrucache: s, interceptor: a });
1553
+ }
1554
+ relationshipMetaData() {
1555
+ var e;
1556
+ return this._layer && this._layer.source && ((e = this._layer.source.sourceJSON) != null && e.relationships) ? this._layer.source.sourceJSON.relationships : [];
1557
+ }
1558
+ serviceUrl() {
1559
+ return Y(this._layer.parsedUrl.path);
1560
+ }
1561
+ async queryAttachments(e, t, i, s, a) {
1562
+ const r = this._layer.capabilities;
1563
+ if (r != null && r.data.supportsAttachment && (r != null && r.operations.supportsQueryAttachments)) {
1564
+ const n = { objectIds: [e], returnMetadata: a };
1565
+ (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" });
1566
+ const l = await this._layer.queryAttachments(n), u = [];
1567
+ return l && l[e] && l[e].forEach((o) => {
1568
+ const d = this._layer.parsedUrl.path + "/" + e.toString() + "/attachments/" + o.id.toString();
1569
+ let c = null;
1570
+ a && o.exifInfo && (c = Ye.convertJsonToArcade(o.exifInfo, "system", !0)), u.push(new He(o.id, o.name, o.contentType, o.size, d, c, o.keywords ?? null));
1571
+ }), u;
1572
+ }
1573
+ return [];
1574
+ }
1575
+ async queryRelatedFeatures(e) {
1576
+ var s;
1577
+ const t = { f: "json", relationshipId: e.relationshipId.toString(), definitionExpression: e.where, outFields: (s = e.outFields) == null ? void 0 : s.join(","), returnGeometry: e.returnGeometry.toString() };
1578
+ e.resultOffset !== void 0 && e.resultOffset !== null && (t.resultOffset = e.resultOffset.toString()), e.resultRecordCount !== void 0 && e.resultRecordCount !== null && (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 = Qe(e.outSpatialReference)), this.featureSetQueryInterceptor && this.featureSetQueryInterceptor.preRequestCallback({ layer: this._layer, queryPayload: t, method: "relatedrecords", url: this._layer.parsedUrl.path + "/queryRelatedRecords" });
1579
+ const i = await B(this._layer.parsedUrl.path + "/queryRelatedRecords", { responseType: "json", query: t });
1580
+ if (i.data) {
1581
+ const a = {}, r = i.data;
1582
+ if (r != null && r.relatedRecordGroups) {
1583
+ const n = r.spatialReference;
1584
+ for (const l of r.relatedRecordGroups) {
1585
+ const u = l.objectId, o = [];
1586
+ for (const d of l.relatedRecords) {
1587
+ d.geometry && (d.geometry.spatialReference = n);
1588
+ const c = new G({ geometry: d.geometry ? Ze(d.geometry) : null, attributes: d.attributes });
1589
+ o.push(c);
1590
+ }
1591
+ a[u] = { features: o, exceededTransferLimit: r.exceededTransferLimit === !0 };
1592
+ }
1593
+ }
1594
+ return a;
1595
+ }
1596
+ throw new D(T.InvalidRequest);
1597
+ }
1598
+ async getFeatureByObjectId(e, t) {
1599
+ const i = new N();
1600
+ 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" });
1601
+ const s = await De(this._layer.parsedUrl.path, i);
1602
+ return s.features.length === 1 ? s.features[0] : null;
1603
+ }
1604
+ async getIdentityUser() {
1605
+ var t;
1606
+ await this.load();
1607
+ const e = (t = pe) == null ? void 0 : t.findCredential(this._layer.url);
1608
+ return e ? e.userId : null;
1609
+ }
1610
+ async getOwningSystemUrl() {
1611
+ var s, a;
1612
+ await this.load();
1613
+ const e = (s = pe) == null ? void 0 : s.findServerInfo(this._layer.url);
1614
+ if (e)
1615
+ return e.owningSystemUrl;
1616
+ let t = this._layer.url;
1617
+ const i = t.toLowerCase().indexOf("/rest/services");
1618
+ if (t = i > -1 ? t.substring(0, i) : t, t) {
1619
+ t += "/rest/info";
1620
+ try {
1621
+ const r = await B(t, { query: { f: "json" } });
1622
+ let n = "";
1623
+ return (a = r.data) != null && a.owningSystemUrl && (n = r.data.owningSystemUrl), n;
1624
+ } catch {
1625
+ return "";
1626
+ }
1627
+ }
1628
+ return "";
1629
+ }
1630
+ getDataSourceFeatureSet() {
1631
+ const e = new z({ 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 });
1632
+ return e._useDefinitionExpression = !1, e;
1633
+ }
1634
+ get preferredTimeZone() {
1635
+ return this._layer.preferredTimeZone ?? null;
1636
+ }
1637
+ get dateFieldsTimeZone() {
1638
+ return this._layer.dateFieldsTimeZone ?? null;
1639
+ }
1640
+ get datesInUnknownTimezone() {
1641
+ return this._layer.datesInUnknownTimezone;
1642
+ }
1643
+ get editFieldsInfo() {
1644
+ return this._layer.editFieldsInfo ?? null;
1645
+ }
1646
+ get timeInfo() {
1647
+ return this._layer.timeInfo ?? null;
1648
+ }
1649
+ async getFeatureSetInfo() {
1650
+ var a, r;
1651
+ if (this.fsetInfo)
1652
+ return this.fsetInfo;
1653
+ let e = null, { parsedUrl: { path: t }, serviceItemId: i = null } = this._layer;
1654
+ if (t) {
1655
+ const n = await B(t, { responseType: "json", query: { f: "json" } });
1656
+ e = ((a = n == null ? void 0 : n.data) == null ? void 0 : a.name) ?? null, i = ((r = n == null ? void 0 : n.data) == null ? void 0 : r.serviceItemId) ?? null;
1657
+ }
1658
+ const s = this._layer.title && (this._layer.parent ?? null) !== null;
1659
+ return this.featureSetInfo = { layerId: this._layer.layerId, layerName: e === "" ? null : e, itemId: i === "" ? null : i, serviceLayerUrl: t === "" ? null : t, webMapLayerId: s ? this._layer.id ?? null : null, webMapLayerTitle: s ? this._layer.title ?? null : null, className: null, objectClassId: null }, this.fsetInfo;
1660
+ }
1661
+ }
1662
+ class oe extends E {
1663
+ constructor(e) {
1664
+ 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, e.isTable === !0 && (this._forceIsTable = !0), e.outFields !== void 0 && (this._overrideFields = e.outFields), e.includeGeometry !== void 0 && (this._removeGeometry = e.includeGeometry === !1);
1665
+ }
1666
+ _maxQueryRate() {
1667
+ return ne;
1668
+ }
1669
+ end() {
1670
+ return this._layer;
1671
+ }
1672
+ optimisePagingFeatureQueries() {
1673
+ }
1674
+ async loadImpl() {
1675
+ return this._layer.loaded === !0 ? (this._initialiseFeatureSet(), this) : (await this._layer.load(), this._initialiseFeatureSet(), this);
1676
+ }
1677
+ get gdbVersion() {
1678
+ return "";
1679
+ }
1680
+ _initialiseFeatureSet() {
1681
+ var e, t, i, s, a, r;
1682
+ if (this.spatialReference == null && (this.spatialReference = this._layer.spatialReference), this.geometryType = this._layer.geometryType, this.fields = this._layer.fields.slice(0), this._overrideFields !== null)
1683
+ if (this._overrideFields.length === 1 && this._overrideFields[0] === "*")
1684
+ this._overrideFields = null;
1685
+ else {
1686
+ const n = [], l = [];
1687
+ for (const u of this.fields)
1688
+ if (u.type === "oid")
1689
+ n.push(u), l.push(u.name);
1690
+ else
1691
+ for (const o of this._overrideFields)
1692
+ if (o.toLowerCase() === u.name.toLowerCase()) {
1693
+ n.push(u), l.push(u.name);
1694
+ break;
1695
+ }
1696
+ this.fields = n, this._overrideFields = l;
1697
+ }
1698
+ this.objectIdField = this._layer.objectIdField;
1699
+ for (const n of this.fields)
1700
+ n.type === "global-id" && (this.globalIdField = n.name);
1701
+ this._databaseType = x.Standardised, this.hasZ = ((i = (t = (e = this._layer) == null ? void 0 : e.capabilities) == null ? void 0 : t.data) == null ? void 0 : i.supportsZ) === !0, this.hasM = ((r = (a = (s = this._layer) == null ? void 0 : s.capabilities) == null ? void 0 : a.data) == null ? void 0 : r.supportsM) === !0, this._layer instanceof Le ? (this.subtypeField = this._layer.subtypeField ?? "", this.subtypes = this._layer.subtypes, this.types = null, this.typeIdField = null) : (this.typeIdField = this._layer.typeIdField ?? "", this.types = this._layer.types, this.subtypeField = this._layer.subtypeField, this.subtypes = this._layer.subtypes);
1702
+ }
1703
+ isTable() {
1704
+ return this._forceIsTable || this._layer.isTable || this._layer.type === "table" || !this._layer.geometryType;
1705
+ }
1706
+ _isInFeatureSet() {
1707
+ return I.InFeatureSet;
1708
+ }
1709
+ _candidateIdTransform(e) {
1710
+ return e;
1711
+ }
1712
+ async _getSet(e) {
1713
+ if (this._wset === null) {
1714
+ await this._ensureLoaded();
1715
+ const t = await this._getFilteredSet("", null, null, null, e);
1716
+ return this._wset = t, t;
1717
+ }
1718
+ return this._wset;
1719
+ }
1720
+ _changeFeature(e) {
1721
+ const t = {};
1722
+ for (const i of this.fields)
1723
+ t[i.name] = e.attributes[i.name];
1724
+ return new G({ geometry: this._removeGeometry === !0 ? null : e.geometry, attributes: t });
1725
+ }
1726
+ async _getFilteredSet(e, t, i, s, a) {
1727
+ let r = "", n = !1;
1728
+ if (s !== null && (r = s.constructClause(), n = !0), this.isTable() && t && e !== null && e !== "")
1729
+ return new _([], [], !0, null);
1730
+ const l = new N();
1731
+ l.returnZ = this.hasZ, l.returnM = this.hasM, l.where = i === null ? t === null ? "1=1" : "" : k(i, x.Standardised), l.spatialRelationship = this._makeRelationshipEnum(e), l.outSpatialReference = this.spatialReference, l.orderByFields = r !== "" ? r.split(",") : null, l.geometry = t === null ? null : t, l.returnGeometry = !0, l.relationParameter = this._makeRelationshipParam(e);
1732
+ const u = await this._layer.queryFeatures(l);
1733
+ if (u === null)
1734
+ return new _([], [], n, null);
1735
+ this._checkCancelled(a);
1736
+ const o = [];
1737
+ return u.features.forEach((d) => {
1738
+ const c = d.attributes[this._layer.objectIdField];
1739
+ o.push(c), this._featureCache[c] = this._changeFeature(d);
1740
+ }), new _([], o, n, null);
1741
+ }
1742
+ _makeRelationshipEnum(e) {
1743
+ if (e.includes("esriSpatialRelRelation"))
1744
+ return "relation";
1745
+ switch (e) {
1746
+ case "esriSpatialRelRelation":
1747
+ return "relation";
1748
+ case "esriSpatialRelIntersects":
1749
+ return "intersects";
1750
+ case "esriSpatialRelContains":
1751
+ return "contains";
1752
+ case "esriSpatialRelOverlaps":
1753
+ return "overlaps";
1754
+ case "esriSpatialRelWithin":
1755
+ return "within";
1756
+ case "esriSpatialRelTouches":
1757
+ return "touches";
1758
+ case "esriSpatialRelCrosses":
1759
+ return "crosses";
1760
+ case "esriSpatialRelEnvelopeIntersects":
1761
+ return "envelope-intersects";
1762
+ }
1763
+ return e;
1764
+ }
1765
+ _makeRelationshipParam(e) {
1766
+ return e.includes("esriSpatialRelRelation") ? e.split(":")[1] : "";
1767
+ }
1768
+ async _queryAllFeatures() {
1769
+ if (this._wset)
1770
+ return this._wset;
1771
+ const e = new N();
1772
+ if (e.where = "1=1", await this._ensureLoaded(), this._layer.source && this._layer.source.items) {
1773
+ const s = [];
1774
+ return this._layer.source.items.forEach((a) => {
1775
+ const r = a.attributes[this._layer.objectIdField];
1776
+ s.push(r), this._featureCache[r] = this._changeFeature(a);
1777
+ }), this._wset = new _([], s, !1, null), this._wset;
1778
+ }
1779
+ e.returnZ = this.hasZ, e.returnM = this.hasM;
1780
+ const t = await this._layer.queryFeatures(e), i = [];
1781
+ return t.features.forEach((s) => {
1782
+ const a = s.attributes[this._layer.objectIdField];
1783
+ i.push(a), this._featureCache[a] = this._changeFeature(s);
1784
+ }), this._wset = new _([], i, !1, null), this._wset;
1785
+ }
1786
+ async _getFeatures(e, t, i) {
1787
+ const s = [];
1788
+ t !== -1 && this._featureCache[t] === void 0 && s.push(t);
1789
+ for (let a = e._lastFetchedIndex; a < e._known.length && (e._lastFetchedIndex += 1, !(this._featureCache[e._known[a]] === void 0 && (e._known[a] !== t && s.push(e._known[a]), s.length > i))); a++)
1790
+ ;
1791
+ if (s.length === 0)
1792
+ return "success";
1793
+ throw new D(T.MissingFeatures);
1794
+ }
1795
+ async _refineSetBlock(e) {
1796
+ return e;
1797
+ }
1798
+ async _stat() {
1799
+ return { calculated: !1 };
1800
+ }
1801
+ async _canDoAggregates() {
1802
+ return !1;
1803
+ }
1804
+ relationshipMetaData() {
1805
+ return [];
1806
+ }
1807
+ static _cloneAttr(e) {
1808
+ const t = {};
1809
+ for (const i in e)
1810
+ t[i] = e[i];
1811
+ return t;
1812
+ }
1813
+ nativeCapabilities() {
1814
+ return { title: this._layer.title ?? "", canQueryRelated: !1, source: this, capabilities: this._layer.capabilities, databaseType: this._databaseType, requestStandardised: !0 };
1815
+ }
1816
+ static create(e, t) {
1817
+ var y, g, b, S, p, w;
1818
+ let i = e.layerDefinition.objectIdField;
1819
+ const s = e.layerDefinition.typeIdField ?? "", a = [];
1820
+ if (e.layerDefinition.types)
1821
+ for (const C of e.layerDefinition.types)
1822
+ a.push(mt.fromJSON(C));
1823
+ let r = e.layerDefinition.geometryType;
1824
+ r === void 0 && (r = e.featureSet.geometryType || "");
1825
+ let n = e.featureSet.features;
1826
+ const l = t.toJSON();
1827
+ if (!i) {
1828
+ let C = !1;
1829
+ for (const P of e.layerDefinition.fields)
1830
+ if (P.type === "oid" || P.type === "esriFieldTypeOID") {
1831
+ i = P.name, C = !0;
1832
+ break;
1833
+ }
1834
+ if (C === !1) {
1835
+ let P = "FID", he = !0, ce = 0;
1836
+ for (; he; ) {
1837
+ let q = !0;
1838
+ for (const Ge of e.layerDefinition.fields)
1839
+ if (Ge.name === P) {
1840
+ q = !1;
1841
+ break;
1842
+ }
1843
+ q === !0 ? he = !1 : (ce++, P = "FID" + ce.toString());
1844
+ }
1845
+ e.layerDefinition.fields.push({ type: "esriFieldTypeOID", name: P, alias: P });
1846
+ const K = [];
1847
+ for (let q = 0; q < n.length; q++)
1848
+ K.push({ geometry: e.featureSet.features[q].geometry, attributes: e.featureSet.features[q].attributes ? this._cloneAttr(e.featureSet.features[q].attributes) : {} }), K[q].attributes[P] = q;
1849
+ n = K, i = P;
1850
+ }
1851
+ }
1852
+ const u = [];
1853
+ for (const C of e.layerDefinition.fields)
1854
+ C instanceof M ? u.push(C) : u.push(M.fromJSON(C));
1855
+ let o = r;
1856
+ switch (o || (o = ""), o) {
1857
+ case "esriGeometryPoint":
1858
+ o = "point";
1859
+ break;
1860
+ case "esriGeometryPolyline":
1861
+ o = "polyline";
1862
+ break;
1863
+ case "esriGeometryPolygon":
1864
+ o = "polygon";
1865
+ break;
1866
+ case "esriGeometryEnvelope":
1867
+ o = "extent";
1868
+ break;
1869
+ case "esriGeometryMultipoint":
1870
+ o = "multipoint";
1871
+ break;
1872
+ case "":
1873
+ case "esriGeometryNull":
1874
+ o = "esriGeometryNull";
1875
+ }
1876
+ if (o !== "esriGeometryNull")
1877
+ for (const C of n)
1878
+ C.geometry && !(C.geometry instanceof ze) && (C.geometry.type = o, C.geometry.spatialReference === void 0 && (C.geometry.spatialReference = l));
1879
+ else
1880
+ for (const C of n)
1881
+ C.geometry && (C.geometry = null);
1882
+ const d = { outFields: ["*"], source: n, fields: u, hasZ: ((y = e == null ? void 0 : e.layerDefinition) == null ? void 0 : y.hasZ) === !0 || ((g = e == null ? void 0 : e.featureSet) == null ? void 0 : g.hasZ) === !0, hasM: ((b = e == null ? void 0 : e.layerDefinition) == null ? void 0 : b.hasM) === !0 || ((S = e == null ? void 0 : e.featureSet) == null ? void 0 : S.hasM) === !0, types: a, typeIdField: s, objectIdField: i, spatialReference: t }, c = o === "esriGeometryNull" || o === null;
1883
+ c || (d.geometryType = o);
1884
+ const f = new v(d);
1885
+ return (p = e == null ? void 0 : e.layerDefinition) != null && p.subtypeField && ((w = e == null ? void 0 : e.layerDefinition) != null && w.subtypes) && f.read({ subtypes: e.layerDefinition.subtypes, subtypeField: e.layerDefinition.subtypeField }), new oe({ layer: f, spatialReference: t, isTable: c });
1886
+ }
1887
+ async queryAttachments() {
1888
+ return [];
1889
+ }
1890
+ async getFeatureByObjectId(e) {
1891
+ const t = new N();
1892
+ t.where = this.objectIdField + "=" + e.toString(), t.returnZ = this.hasZ, t.returnM = this.hasM;
1893
+ const i = await this._layer.queryFeatures(t);
1894
+ return i.features.length === 1 ? i.features[0] : null;
1895
+ }
1896
+ async getOwningSystemUrl() {
1897
+ return "";
1898
+ }
1899
+ async getIdentityUser() {
1900
+ return "";
1901
+ }
1902
+ get preferredTimeZone() {
1903
+ return this._layer.preferredTimeZone ?? null;
1904
+ }
1905
+ get dateFieldsTimeZone() {
1906
+ return this._layer.dateFieldsTimeZone ?? null;
1907
+ }
1908
+ get datesInUnknownTimezone() {
1909
+ var e;
1910
+ return (e = this._layer) == null ? void 0 : e.datesInUnknownTimezone;
1911
+ }
1912
+ get editFieldsInfo() {
1913
+ var e;
1914
+ return (e = this._layer) == null ? void 0 : e.editFieldsInfo;
1915
+ }
1916
+ get timeInfo() {
1917
+ var e;
1918
+ return (e = this._layer) == null ? void 0 : e.timeInfo;
1919
+ }
1920
+ async getFeatureSetInfo() {
1921
+ const e = this._layer.title && this._layer.parent;
1922
+ return this.fsetInfo ?? { layerId: null, layerName: null, itemId: null, serviceLayerUrl: null, webMapLayerId: e ? this._layer.id ?? null : null, webMapLayerTitle: e ? this._layer.title ?? null : null, className: null, objectClassId: null };
1923
+ }
1924
+ }
1925
+ class Nt extends E {
1926
+ constructor(e) {
1927
+ 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, e.outFields !== void 0 && (this._overrideFields = e.outFields), e.includeGeometry !== void 0 && (this._removeGeometry = e.includeGeometry === !1);
1928
+ }
1929
+ _maxQueryRate() {
1930
+ return ne;
1931
+ }
1932
+ end() {
1933
+ return this._layer;
1934
+ }
1935
+ optimisePagingFeatureQueries() {
1936
+ }
1937
+ async loadImpl() {
1938
+ var e;
1939
+ return await Promise.all([this._layer.load(), (e = this._relatedLayer) == null ? void 0 : e.load()]), this._initialiseFeatureSet(), this;
1940
+ }
1941
+ nativeCapabilities() {
1942
+ return this._relatedLayer.nativeCapabilities();
1943
+ }
1944
+ _initialiseFeatureSet() {
1945
+ if (this.spatialReference == null && (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, this._overrideFields !== null)
1946
+ if (this._overrideFields.length === 1 && this._overrideFields[0] === "*")
1947
+ this._overrideFields = null;
1948
+ else {
1949
+ const t = [], i = [];
1950
+ for (const s of this.fields)
1951
+ if (s.type === "oid")
1952
+ t.push(s), i.push(s.name);
1953
+ else
1954
+ for (const a of this._overrideFields)
1955
+ if (a.toLowerCase() === s.name.toLowerCase()) {
1956
+ t.push(s), i.push(s.name);
1957
+ break;
1958
+ }
1959
+ this.fields = t, this._overrideFields = i;
1960
+ }
1961
+ const e = this._layer.nativeCapabilities();
1962
+ 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, this.subtypeField = this._relatedLayer.subtypeField, this.subtypes = this._relatedLayer.subtypes;
1963
+ }
1964
+ async databaseType() {
1965
+ return await this._relatedLayer.databaseType(), this._databaseType = this._relatedLayer._databaseType, this._databaseType;
1966
+ }
1967
+ isTable() {
1968
+ return this._relatedLayer.isTable();
1969
+ }
1970
+ _isInFeatureSet() {
1971
+ return I.InFeatureSet;
1972
+ }
1973
+ _candidateIdTransform(e) {
1974
+ return e;
1975
+ }
1976
+ async _getSet(e) {
1977
+ if (this._wset === null) {
1978
+ await this._ensureLoaded();
1979
+ const t = await this._getFilteredSet("", null, null, null, e);
1980
+ return this._wset = t, t;
1981
+ }
1982
+ return this._wset;
1983
+ }
1984
+ _changeFeature(e) {
1985
+ const t = {};
1986
+ for (const i of this.fields)
1987
+ t[i.name] = e.attributes[i.name];
1988
+ return new G({ geometry: this._removeGeometry === !0 ? null : e.geometry, attributes: t });
1989
+ }
1990
+ async _getFilteredSet(e, t, i, s, a) {
1991
+ var S, p;
1992
+ if (await this.databaseType(), this.isTable() && t && e !== null && e !== "")
1993
+ return new _([], [], !0, null);
1994
+ const r = this._layer.nativeCapabilities();
1995
+ if (r.canQueryRelated === !1)
1996
+ return new _([], [], !0, null);
1997
+ if ((S = r.capabilities) != null && S.queryRelated && r.capabilities.queryRelated.supportsPagination)
1998
+ return this._getFilteredSetUsingPaging(e, t, i, s, a);
1999
+ let n = "", l = !1;
2000
+ s !== null && ((p = r.capabilities) != null && p.queryRelated) && r.capabilities.queryRelated.supportsOrderBy === !0 && (n = s.constructClause(), l = !0);
2001
+ const u = new Te();
2002
+ u.objectIds = [this._findObjectId];
2003
+ const o = this._overrideFields !== null ? this._overrideFields : this._fieldsIncludingObjectId(this._relatedLayer.fields ? this._relatedLayer.fields.map((w) => w.name) : ["*"]);
2004
+ u.outFields = o, u.relationshipId = this.relationship.id, u.where = "1=1";
2005
+ let d = !0;
2006
+ this._removeGeometry === !0 && (d = !1), u.returnGeometry = d, this._requestStandardised && (u.sqlFormat = "standard"), u.outSpatialReference = this.spatialReference, u.orderByFields = n !== "" ? n.split(",") : null;
2007
+ const c = await r.source.queryRelatedFeatures(u);
2008
+ this._checkCancelled(a);
2009
+ const f = c[this._findObjectId] ? c[this._findObjectId].features : [], y = [];
2010
+ for (let w = 0; w < f.length; w++)
2011
+ this._featureCache[f[w].attributes[this._relatedLayer.objectIdField]] = f[w], y.push(f[w].attributes[this._relatedLayer.objectIdField]);
2012
+ const g = t && e !== null && e !== "", b = i != null;
2013
+ return new _(g || b ? y : [], g || b ? [] : y, l, null);
2014
+ }
2015
+ _fieldsIncludingObjectId(e) {
2016
+ if (e === null)
2017
+ return [this.objectIdField];
2018
+ const t = e.slice(0);
2019
+ if (t.includes("*"))
2020
+ return t;
2021
+ let i = !1;
2022
+ for (const s of t)
2023
+ if (s.toUpperCase() === this.objectIdField.toUpperCase()) {
2024
+ i = !0;
2025
+ break;
2026
+ }
2027
+ return i === !1 && t.push(this.objectIdField), t;
2028
+ }
2029
+ async _getFilteredSetUsingPaging(e, t, i, s, a) {
2030
+ var S, p;
2031
+ let r = "", n = !1;
2032
+ const l = this._layer.nativeCapabilities();
2033
+ s !== null && ((S = l == null ? void 0 : l.capabilities) != null && S.queryRelated) && l.capabilities.queryRelated.supportsOrderBy === !0 && (r = s.constructClause(), n = !0), await this.databaseType();
2034
+ const u = "1=1";
2035
+ let o = this._maxQueryRate();
2036
+ const d = (p = l.capabilities) == null ? void 0 : p.query.maxRecordCount;
2037
+ d != null && d < o && (o = d);
2038
+ const c = t && e !== null && e !== "", f = i != null;
2039
+ let y = null, g = !0;
2040
+ this._removeGeometry === !0 && (g = !1);
2041
+ const b = this._overrideFields !== null ? this._overrideFields : this._fieldsIncludingObjectId(this._relatedLayer.fields ? this._relatedLayer.fields.map((w) => w.name) : ["*"]);
2042
+ return y = new _(c || f ? ["GETPAGES"] : [], c || f ? [] : ["GETPAGES"], n, { outFields: b.join(","), resultRecordCount: o, resultOffset: 0, objectIds: [this._findObjectId], where: u, orderByFields: r, returnGeometry: g, returnIdsOnly: "false", internal: { set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } }), await this._expandPagedSet(y, o, 0, 0, a), y;
2043
+ }
2044
+ _expandPagedSet(e, t, i, s, a) {
2045
+ return this._expandPagedSetFeatureSet(e, t, i, s, a);
2046
+ }
2047
+ _clonePageDefinition(e) {
2048
+ return e === null ? null : e.groupbypage !== !0 ? { 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 };
2049
+ }
2050
+ async _getPhysicalPage(e, t, i) {
2051
+ const s = e.pagesDefinition.internal.lastRetrieved, a = s, r = e.pagesDefinition.internal.lastPage, n = this._layer.nativeCapabilities(), l = new Te();
2052
+ this._requestStandardised === !0 && (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;
2053
+ const u = await n.source.queryRelatedFeatures(l);
2054
+ if (this._checkCancelled(i), e.pagesDefinition.internal.lastPage !== r)
2055
+ return 0;
2056
+ const o = u[this._findObjectId] ? u[this._findObjectId].features : [];
2057
+ for (let c = 0; c < o.length; c++)
2058
+ e.pagesDefinition.internal.set[a + c] = o[c].attributes[this._relatedLayer.objectIdField];
2059
+ for (let c = 0; c < o.length; c++)
2060
+ this._featureCache[o[c].attributes[this._relatedLayer.objectIdField]] = o[c];
2061
+ const d = !u[this._findObjectId] || u[this._findObjectId].exceededTransferLimit === !1;
2062
+ return o.length !== e.pagesDefinition.resultRecordCount && d && (e.pagesDefinition.internal.fullyResolved = !0), e.pagesDefinition.internal.lastRetrieved = s + o.length, e.pagesDefinition.internal.lastPage += e.pagesDefinition.resultRecordCount, o.length;
2063
+ }
2064
+ async _getFeatures(e, t, i, s) {
2065
+ const a = [];
2066
+ t !== -1 && this._featureCache[t] === void 0 && a.push(t);
2067
+ const r = this._maxQueryRate();
2068
+ if (this._checkIfNeedToExpandKnownPage(e, r) === !0)
2069
+ return await this._expandPagedSet(e, r, 0, 0, s), this._getFeatures(e, t, i, s);
2070
+ let n = 0;
2071
+ for (let l = e._lastFetchedIndex; l < e._known.length && (n++, n <= i && (e._lastFetchedIndex += 1), !(e._known[l] !== "GETPAGES" && this._featureCache[e._known[l]] === void 0 && (e._known[l] !== t && a.push(e._known[l]), a.length > i))) && !(n >= i && a.length === 0); l++)
2072
+ ;
2073
+ if (a.length === 0)
2074
+ return "success";
2075
+ throw new D(T.MissingFeatures);
2076
+ }
2077
+ async _refineSetBlock(e, t, i) {
2078
+ return e;
2079
+ }
2080
+ async _stat(e, t, i, s, a, r, n) {
2081
+ return { calculated: !1 };
2082
+ }
2083
+ get gdbVersion() {
2084
+ return this._relatedLayer.gdbVersion;
2085
+ }
2086
+ async _canDoAggregates(e, t, i, s, a) {
2087
+ return !1;
2088
+ }
2089
+ relationshipMetaData() {
2090
+ return this._relatedLayer.relationshipMetaData();
2091
+ }
2092
+ serviceUrl() {
2093
+ return this._relatedLayer.serviceUrl();
2094
+ }
2095
+ queryAttachments(e, t, i, s, a) {
2096
+ return this._relatedLayer.queryAttachments(e, t, i, s, a);
2097
+ }
2098
+ getFeatureByObjectId(e, t) {
2099
+ return this._relatedLayer.getFeatureByObjectId(e, t);
2100
+ }
2101
+ getOwningSystemUrl() {
2102
+ return this._relatedLayer.getOwningSystemUrl();
2103
+ }
2104
+ getIdentityUser() {
2105
+ return this._relatedLayer.getIdentityUser();
2106
+ }
2107
+ getDataSourceFeatureSet() {
2108
+ return this._relatedLayer;
2109
+ }
2110
+ get preferredTimeZone() {
2111
+ var e;
2112
+ return ((e = this._relatedLayer) == null ? void 0 : e.preferredTimeZone) ?? null;
2113
+ }
2114
+ get dateFieldsTimeZone() {
2115
+ var e;
2116
+ return ((e = this._relatedLayer) == null ? void 0 : e.dateFieldsTimeZone) ?? null;
2117
+ }
2118
+ get datesInUnknownTimezone() {
2119
+ var e;
2120
+ return (e = this._relatedLayer) == null ? void 0 : e.datesInUnknownTimezone;
2121
+ }
2122
+ get editFieldsInfo() {
2123
+ var e;
2124
+ return ((e = this._relatedLayer) == null ? void 0 : e.editFieldsInfo) ?? null;
2125
+ }
2126
+ get timeInfo() {
2127
+ var e;
2128
+ return ((e = this._relatedLayer) == null ? void 0 : e.timeInfo) ?? null;
2129
+ }
2130
+ async getFeatureSetInfo() {
2131
+ return this.fsetInfo ?? this._layer.featureSetInfo;
2132
+ }
2133
+ }
2134
+ function Lt() {
2135
+ m.applicationCache === null && (m.applicationCache = new m());
2136
+ }
2137
+ async function se(h, e) {
2138
+ if (m.applicationCache) {
2139
+ const t = m.applicationCache.getLayerInfo(h);
2140
+ if (t) {
2141
+ const a = await t;
2142
+ return new v({ url: h, outFields: e, sourceJSON: a });
2143
+ }
2144
+ const i = new v({ url: h, outFields: e }), s = (async () => (await i.load(), i.sourceJSON))();
2145
+ if (m.applicationCache) {
2146
+ m.applicationCache.setLayerInfo(h, s);
2147
+ try {
2148
+ return await s, i;
2149
+ } catch (a) {
2150
+ throw m.applicationCache.clearLayerInfo(h), a;
2151
+ }
2152
+ }
2153
+ return await s, i;
2154
+ }
2155
+ return new v({ url: h, outFields: e });
2156
+ }
2157
+ async function ue(h, e, t, i, s, a = null) {
2158
+ return O(await se(h, ["*"]), e, t, i, s, a);
2159
+ }
2160
+ function O(h, e = null, t = null, i = !0, s = null, a = null) {
2161
+ if (h instanceof v || V(h)) {
2162
+ const n = { layer: h, spatialReference: e, outFields: t, includeGeometry: i, lrucache: s, interceptor: a };
2163
+ return h.url || !h.source ? new z(n) : new oe(n);
2164
+ }
2165
+ const r = O(h.parent, e, t, i, s, a);
2166
+ return r.filter(R.create(h.parent.subtypeField + "=" + h.subtypeCode.toString(), h.parent.fieldsIndex, r.dateFieldsTimeZoneDefaultUTC));
2167
+ }
2168
+ async function At(h) {
2169
+ if (m.applicationCache !== null) {
2170
+ const t = m.applicationCache.getLayerInfo(h);
2171
+ if (t !== null)
2172
+ return t;
2173
+ }
2174
+ const e = (async () => {
2175
+ const t = await B(h, { responseType: "json", query: { f: "json" } });
2176
+ return t.data ? t.data : null;
2177
+ })();
2178
+ if (m.applicationCache !== null) {
2179
+ m.applicationCache.setLayerInfo(h, e);
2180
+ try {
2181
+ return await e;
2182
+ } catch (t) {
2183
+ throw m.applicationCache.clearLayerInfo(h), t;
2184
+ }
2185
+ }
2186
+ return e;
2187
+ }
2188
+ async function Ot(h, e) {
2189
+ const t = "QUERYDATAELEMTS:" + e.toString() + ":" + h;
2190
+ if (m.applicationCache !== null) {
2191
+ const s = m.applicationCache.getLayerInfo(t);
2192
+ if (s !== null)
2193
+ return s;
2194
+ }
2195
+ const i = (async () => {
2196
+ var a;
2197
+ const s = await B(h + "/queryDataElements", { method: "post", responseType: "json", query: { layers: JSON.stringify([e.toString()]), f: "json" } });
2198
+ if (s.data) {
2199
+ const r = s.data;
2200
+ if ((a = r.layerDataElements) != null && a[0])
2201
+ return r.layerDataElements[0];
2202
+ }
2203
+ throw new D(T.DataElementsNotFound);
2204
+ })();
2205
+ if (m.applicationCache !== null) {
2206
+ m.applicationCache.setLayerInfo(t, i);
2207
+ try {
2208
+ return await i;
2209
+ } catch (s) {
2210
+ throw m.applicationCache.clearLayerInfo(t), s;
2211
+ }
2212
+ }
2213
+ return i;
2214
+ }
2215
+ async function je(h) {
2216
+ if (m.applicationCache !== null) {
2217
+ const t = m.applicationCache.getLayerInfo(h);
2218
+ if (t !== null)
2219
+ return t;
2220
+ }
2221
+ const e = (async () => {
2222
+ const t = await B(h, { responseType: "json", query: { f: "json" } });
2223
+ if (t.data) {
2224
+ const i = t.data;
2225
+ return i.layers || (i.layers = []), i.tables || (i.tables = []), i;
2226
+ }
2227
+ return { layers: [], tables: [] };
2228
+ })();
2229
+ if (m.applicationCache !== null) {
2230
+ m.applicationCache.setLayerInfo(h, e);
2231
+ try {
2232
+ return await e;
2233
+ } catch (t) {
2234
+ throw m.applicationCache.clearLayerInfo(h), t;
2235
+ }
2236
+ }
2237
+ return e;
2238
+ }
2239
+ async function Et(h, e) {
2240
+ var s, a, r;
2241
+ const t = { metadata: null, networkId: -1, unVersion: 3, terminals: [], queryelem: null, layerNameLkp: {}, lkp: null }, i = await je(h);
2242
+ if (t.metadata = i, ((s = i.controllerDatasetLayers) == null ? void 0 : s.utilityNetworkLayerId) !== void 0 && i.controllerDatasetLayers.utilityNetworkLayerId !== null) {
2243
+ if (i.layers)
2244
+ for (const u of i.layers)
2245
+ t.layerNameLkp[u.id] = u.name;
2246
+ if (i.tables)
2247
+ for (const u of i.tables)
2248
+ t.layerNameLkp[u.id] = u.name;
2249
+ const n = i.controllerDatasetLayers.utilityNetworkLayerId;
2250
+ t.networkId = n;
2251
+ const l = await Ot(h, n);
2252
+ if (l) {
2253
+ t.queryelem = l, (a = t.queryelem) != null && a.dataElement && t.queryelem.dataElement.schemaGeneration !== void 0 && (t.unVersion = t.queryelem.dataElement.schemaGeneration), t.lkp = {}, t.queryelem.dataElement.domainNetworks || (t.queryelem.dataElement.domainNetworks = []);
2254
+ for (const o of t.queryelem.dataElement.domainNetworks) {
2255
+ for (const d of o.edgeSources ?? []) {
2256
+ const c = { layerId: d.layerId, sourceId: d.sourceId, className: t.layerNameLkp[d.layerId] ?? null };
2257
+ c.className && (t.lkp[c.className] = c);
2258
+ }
2259
+ for (const d of o.junctionSources ?? []) {
2260
+ const c = { layerId: d.layerId, sourceId: d.sourceId, className: t.layerNameLkp[d.layerId] ?? null };
2261
+ c.className && (t.lkp[c.className] = c);
2262
+ }
2263
+ }
2264
+ if (t.queryelem.dataElement.terminalConfigurations)
2265
+ for (const o of t.queryelem.dataElement.terminalConfigurations)
2266
+ for (const d of o.terminals)
2267
+ t.terminals.push({ terminalId: d.terminalId, terminalName: d.terminalName });
2268
+ const u = await At(h + "/" + n);
2269
+ if (((r = u.systemLayers) == null ? void 0 : r.associationsTableId) !== void 0 && u.systemLayers.associationsTableId !== null) {
2270
+ const o = [];
2271
+ t.unVersion >= 4 && (o.push("STATUS"), o.push("PERCENTALONG"));
2272
+ let d = await ue(h + "/" + u.systemLayers.associationsTableId.toString(), e, ["OBJECTID", "FROMNETWORKSOURCEID", "TONETWORKSOURCEID", "FROMGLOBALID", "TOGLOBALID", "TOTERMINALID", "FROMTERMINALID", "ASSOCIATIONTYPE", "ISCONTENTVISIBLE", "GLOBALID", ...o], !1, null, null);
2273
+ return await d.load(), t.unVersion >= 4 && (d = d.filter(R.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)", d.getFieldsIndex(), d.dateFieldsTimeZoneDefaultUTC)), await d.load()), { lkp: t.lkp, associations: d, unVersion: t.unVersion, terminals: t.terminals };
2274
+ }
2275
+ return { associations: null, unVersion: t.unVersion, lkp: null, terminals: [] };
2276
+ }
2277
+ return { associations: null, unVersion: t.unVersion, lkp: null, terminals: [] };
2278
+ }
2279
+ return { associations: null, unVersion: t.unVersion, lkp: null, terminals: [] };
2280
+ }
2281
+ async function Pt(h, e, t, i = null, s = null, a = !0, r = null, n = null) {
2282
+ let l = h.serviceUrl();
2283
+ if (!l)
2284
+ return null;
2285
+ l = l.charAt(l.length - 1) === "/" ? l + e.relatedTableId.toString() : l + "/" + e.relatedTableId.toString();
2286
+ const u = await ue(l, i, s, a, r, n);
2287
+ return new Nt({ layer: h, relatedLayer: u, relationship: e, objectId: t, spatialReference: i, outFields: s, includeGeometry: a, lrucache: r, interceptor: n });
2288
+ }
2289
+ Oe.registerAction(), Dt.registerAction(), te.registerAction(), ot.registerAction(), le.registerAction();
2290
+ class qt extends Ae {
2291
+ constructor(e, t = null, i = null, s = null) {
2292
+ super(), this._map = e, this._overridespref = t, this._lrucache = i, this._interceptor = s, this._instantLayers = [];
2293
+ }
2294
+ _makeAndAddFeatureSet(e, t = !0, i = null) {
2295
+ const s = O(e, this._overridespref, i === null ? ["*"] : i, t, this._lrucache, this._interceptor);
2296
+ return this._instantLayers.push({ featureset: s, opitem: e, includeGeometry: t, outFields: JSON.stringify(i) }), s;
2297
+ }
2298
+ async featureSetByName(e, t = !0, i = null) {
2299
+ if (this._map.loaded !== void 0 && this._map.load !== void 0 && this._map.loaded === !1)
2300
+ return await this._map.load(), this.featureSetByName(e, t, i);
2301
+ i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2302
+ const s = JSON.stringify(i);
2303
+ for (let r = 0; r < this._instantLayers.length; r++) {
2304
+ const n = this._instantLayers[r];
2305
+ if (n.opitem.title === e && n.includeGeometry === t && n.outFields === s)
2306
+ return this._instantLayers[r].featureset;
2307
+ }
2308
+ const a = this._map.allLayers.find((r) => {
2309
+ if (r instanceof v) {
2310
+ if (r.title === e)
2311
+ return !0;
2312
+ } else if (V(r) && r.title === e)
2313
+ return !0;
2314
+ return !1;
2315
+ });
2316
+ if (a)
2317
+ return this._makeAndAddFeatureSet(a, t, i);
2318
+ if (this._map.tables) {
2319
+ const r = this._map.tables.find((n) => !!(n.title && n.title === e || n.title && n.title === e));
2320
+ if (r) {
2321
+ if (r instanceof v)
2322
+ return this._makeAndAddFeatureSet(r, t, i);
2323
+ if (!r._materializedTable) {
2324
+ const n = r.outFields ? r : { ...r, outFields: ["*"] };
2325
+ r._materializedTable = new v(n);
2326
+ }
2327
+ return await r._materializedTable.load(), this._makeAndAddFeatureSet(r._materializedTable, t, i);
2328
+ }
2329
+ }
2330
+ return null;
2331
+ }
2332
+ async featureSetById(e, t = !0, i = ["*"]) {
2333
+ if (this._map.loaded !== void 0 && this._map.load !== void 0 && this._map.loaded === !1)
2334
+ return await this._map.load(), this.featureSetById(e, t, i);
2335
+ i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2336
+ const s = JSON.stringify(i);
2337
+ for (let r = 0; r < this._instantLayers.length; r++) {
2338
+ const n = this._instantLayers[r];
2339
+ if (n.opitem.id === e && n.includeGeometry === t && n.outFields === s)
2340
+ return this._instantLayers[r].featureset;
2341
+ }
2342
+ const a = this._map.allLayers.find((r) => {
2343
+ if (r instanceof v) {
2344
+ if (r.id === e)
2345
+ return !0;
2346
+ } else if (V(r) && r.id === e)
2347
+ return !0;
2348
+ return !1;
2349
+ });
2350
+ if (a)
2351
+ return this._makeAndAddFeatureSet(a, t, i);
2352
+ if (this._map.tables) {
2353
+ const r = this._map.tables.find((n) => n.id === e);
2354
+ if (r) {
2355
+ if (r instanceof v)
2356
+ return this._makeAndAddFeatureSet(r, t, i);
2357
+ if (!r._materializedTable) {
2358
+ const n = { ...r, outFields: ["*"] };
2359
+ r._materializedTable = new v(n);
2360
+ }
2361
+ return await r._materializedTable.load(), this._makeAndAddFeatureSet(r._materializedTable, t, i);
2362
+ }
2363
+ }
2364
+ return null;
2365
+ }
2366
+ }
2367
+ class de extends Ae {
2368
+ constructor(e, t = null, i = null, s = null) {
2369
+ super(), this._url = e, this._overridespref = t, this._lrucache = i, this._interceptor = s, this.metadata = null, this._instantLayers = [];
2370
+ }
2371
+ get url() {
2372
+ return this._url;
2373
+ }
2374
+ _makeAndAddFeatureSet(e, t = !0, i = null) {
2375
+ const s = O(e, this._overridespref, i === null ? ["*"] : i, t, this._lrucache);
2376
+ return this._instantLayers.push({ featureset: s, opitem: e, includeGeometry: t, outFields: JSON.stringify(i) }), s;
2377
+ }
2378
+ async _loadMetaData() {
2379
+ const e = await je(this._url);
2380
+ return this.metadata = e, e;
2381
+ }
2382
+ load() {
2383
+ return this._loadMetaData();
2384
+ }
2385
+ clone() {
2386
+ return new de(this._url, this._overridespref, this._lrucache, this._interceptor);
2387
+ }
2388
+ async featureSetByName(e, t = !0, i = null) {
2389
+ i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2390
+ const s = JSON.stringify(i);
2391
+ for (let n = 0; n < this._instantLayers.length; n++) {
2392
+ const l = this._instantLayers[n];
2393
+ if (l.opitem.title === e && l.includeGeometry === t && l.outFields === s)
2394
+ return this._instantLayers[n].featureset;
2395
+ }
2396
+ const a = await this._loadMetaData();
2397
+ let r = null;
2398
+ for (const n of a.layers ?? [])
2399
+ n.name === e && (r = n);
2400
+ if (!r)
2401
+ for (const n of a.tables ?? [])
2402
+ n.name === e && (r = n);
2403
+ if (r) {
2404
+ const n = await se(this._url + "/" + r.id, ["*"]);
2405
+ return this._makeAndAddFeatureSet(n, t, i);
2406
+ }
2407
+ return null;
2408
+ }
2409
+ async featureSetById(e, t = !0, i = ["*"]) {
2410
+ i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2411
+ const s = JSON.stringify(i);
2412
+ e = e != null ? e.toString() : "";
2413
+ for (let n = 0; n < this._instantLayers.length; n++) {
2414
+ const l = this._instantLayers[n];
2415
+ if (l.opitem.id === e && l.includeGeometry === t && l.outFields === s)
2416
+ return this._instantLayers[n].featureset;
2417
+ }
2418
+ const a = await this._loadMetaData();
2419
+ let r = null;
2420
+ for (const n of a.layers ?? [])
2421
+ n.id !== null && n.id !== void 0 && n.id.toString() === e && (r = n);
2422
+ if (!r)
2423
+ for (const n of a.tables ?? [])
2424
+ n.id !== null && n.id !== void 0 && n.id.toString() === e && (r = n);
2425
+ if (r) {
2426
+ const n = await se(this._url + "/" + r.id, ["*"]);
2427
+ return this._makeAndAddFeatureSet(n, t, i);
2428
+ }
2429
+ return null;
2430
+ }
2431
+ }
2432
+ function jt(h, e, t = null, i = null) {
2433
+ return new qt(h, e, t, i);
2434
+ }
2435
+ function Gt(h, e, t = null, i = null) {
2436
+ return new de(h, e, t, i);
2437
+ }
2438
+ function Ut(h, e, t, i, s) {
2439
+ if (h === null)
2440
+ return null;
2441
+ if (h instanceof v) {
2442
+ switch (e) {
2443
+ case "datasource":
2444
+ return O(h, s, h.outFields, !0, t, i).getDataSourceFeatureSet();
2445
+ case "parent":
2446
+ case "root":
2447
+ return O(h, s, h.outFields, !0, t, i);
2448
+ }
2449
+ return null;
2450
+ }
2451
+ if (V(h)) {
2452
+ switch (e) {
2453
+ case "datasource":
2454
+ return O(h, s, h.outFields, !0, t, i).getDataSourceFeatureSet();
2455
+ case "parent":
2456
+ case "root":
2457
+ return O(h, s, h.outFields, !0, t, i);
2458
+ }
2459
+ return null;
2460
+ }
2461
+ if (et(h)) {
2462
+ switch (e) {
2463
+ case "datasource":
2464
+ return O(h.parent, s, h.parent.outFields, !0, t, i).getDataSourceFeatureSet();
2465
+ case "parent":
2466
+ case "root":
2467
+ return O(h, s, h.parent.outFields, !0, t, i);
2468
+ }
2469
+ return null;
2470
+ }
2471
+ if (h instanceof E)
2472
+ switch (e) {
2473
+ case "datasource":
2474
+ return h.getDataSourceFeatureSet();
2475
+ case "parent":
2476
+ return h;
2477
+ case "root":
2478
+ return h.getRootFeatureSet();
2479
+ }
2480
+ return null;
2481
+ }
2482
+ async function Bt(h, e, t, i, s, a, r, n = null) {
2483
+ if (m.applicationCache) {
2484
+ const u = m.applicationCache.getLayerInfo(h + ":" + a.url);
2485
+ if (u) {
2486
+ const o = await u;
2487
+ return O(new v({ url: Y(o.url) + "/" + e, outFields: ["*"] }), t, i, s, r, n);
2488
+ }
2489
+ }
2490
+ const l = new Je({ id: h, portal: a }).load();
2491
+ m.applicationCache && m.applicationCache.setLayerInfo(h + ":" + a.url, l);
2492
+ try {
2493
+ const u = await l;
2494
+ return O(new v({ url: Y(u.url ?? "") + "/" + e, outFields: ["*"] }), t, i, s, r, n);
2495
+ } catch (u) {
2496
+ throw m.applicationCache && m.applicationCache.clearLayerInfo(h + ":" + a.url), u;
2497
+ }
2498
+ }
2499
+ const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2500
+ __proto__: null,
2501
+ constructAssociationMetaDataFeatureSetFromUrl: Et,
2502
+ constructFeatureSet: O,
2503
+ constructFeatureSetFromPortalItem: Bt,
2504
+ constructFeatureSetFromRelationship: Pt,
2505
+ constructFeatureSetFromUrl: ue,
2506
+ convertToFeatureSet: Ut,
2507
+ createFeatureSetCollectionFromMap: jt,
2508
+ createFeatureSetCollectionFromService: Gt,
2509
+ initialiseMetaDataCache: Lt
2510
+ }, Symbol.toStringTag, { value: "Module" }));
2511
+ export {
2512
+ Et as A,
2513
+ St as B,
2514
+ ue as F,
2515
+ ee as I,
2516
+ bt as L,
2517
+ W as a,
2518
+ te as b,
2519
+ Oe as c,
2520
+ le as d,
2521
+ Ae as e,
2522
+ oe as f,
2523
+ O as g,
2524
+ Ft as h,
2525
+ wt as i,
2526
+ Ut as j,
2527
+ Pt as k,
2528
+ ci as l,
2529
+ Bt as q
2530
+ };