@agrotools1/at-components 0.3.2-5 → 0.3.2

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 (889) hide show
  1. package/dist/AGraphicContainer-232b465f.js +109 -0
  2. package/dist/APIKeyMixin-6c797b4c.js +19 -0
  3. package/dist/Analysis-fb0fc04a.js +31 -0
  4. package/dist/ArcGISCachedService-e0930844.js +47 -0
  5. package/dist/ArcGISService-81baed4d.js +25 -0
  6. package/dist/AreaMeasurement2D-1dbe17c7.js +405 -0
  7. package/dist/AreaMeasurement3D-3b80654b.js +488 -0
  8. package/dist/AttachmentInfo-e02ca554.js +34 -0
  9. package/dist/AttachmentQuery-1667a134.js +18 -0
  10. package/dist/AttributeStore-2f8bce1a.js +1707 -0
  11. package/dist/BaseDynamicLayerView2D-6ed632c7.js +63 -0
  12. package/dist/BingMapsLayer-1b540400.js +112 -0
  13. package/dist/Bitmap-625c3ae1.js +128 -0
  14. package/dist/BitmapContainer-ac2e261c.js +23 -0
  15. package/dist/BlendLayer-38d68343.js +13 -0
  16. package/dist/BoundsStore-f1942e67.js +63 -0
  17. package/dist/BufferObject-faafd842.js +100 -0
  18. package/dist/BufferView-c2f86567.js +683 -0
  19. package/dist/BuildingSceneLayer-95da2010.js +535 -0
  20. package/dist/Button-312c8286.js +36 -0
  21. package/dist/CSVLayer-68bdf977.js +208 -0
  22. package/dist/CSVSourceWorker-df47e4b9.js +367 -0
  23. package/dist/CatalogDynamicGroupLayerView2D-5ff99579.js +66 -0
  24. package/dist/CatalogFootprintLayerView2D-9f09a894.js +76 -0
  25. package/dist/CatalogLayer-6b5e756d.js +262 -0
  26. package/dist/CatalogLayerView2D-4f9ea89a.js +52 -0
  27. package/dist/ClassBreaksDefinition-d32b0ea5.js +18 -0
  28. package/dist/ColorMaterial.glsl-5fa4dda6.js +64 -0
  29. package/dist/ColorSet-59641c11.js +45 -0
  30. package/dist/ColorStop-d5b563ab.js +29 -0
  31. package/dist/Container-879e59ef.js +521 -0
  32. package/dist/CustomParametersMixin-c281d5e7.js +12 -0
  33. package/dist/DefaultMaterial.glsl-6cc65bf3.js +42 -0
  34. package/dist/DefaultMaterial_COLOR_GAMMA-14d3794c.js +653 -0
  35. package/dist/DefaultTheme-6f3c03ba.js +130 -0
  36. package/dist/DeleteForwardEditsParameters-127d0833.js +18 -0
  37. package/dist/DimensionLayer-031be560.js +129 -0
  38. package/dist/DirectLineMeasurement3D-342dea70.js +449 -0
  39. package/dist/DistanceMeasurement2D-a628b12a.js +303 -0
  40. package/dist/DoubleArray-61325dbc.js +25 -0
  41. package/dist/Dropdown/Checklist/Dropdown.Checklist.d.ts +10 -59
  42. package/dist/Dropdown/Checklist/draggable.d.ts +4 -5
  43. package/dist/Dropdown/Dropdown.core.d.ts +13 -0
  44. package/dist/Dropdown/Filter/test.mocks.d.ts +2 -2
  45. package/dist/Dropdown/List/Dropdown.List.d.ts +21 -6
  46. package/dist/Dropdown/List/test.mocks.d.ts +1 -1
  47. package/dist/EdgeProcessingWorker-9baa9f38.js +63 -0
  48. package/dist/EditBusLayer-b7db2f6c.js +107 -0
  49. package/dist/ElevationInfo-016cc1c4.js +56 -0
  50. package/dist/ElevationLayer-ae7cbbb9.js +129 -0
  51. package/dist/ElevationQuery-96db182d.js +598 -0
  52. package/dist/ElevationSamplerWorker-ab27b576.js +62 -0
  53. package/dist/ExportImageParameters-d1792a7e.js +66 -0
  54. package/dist/ExportStrategy-a42be397.js +93 -0
  55. package/dist/ExportWMSImageParameters-853db12a.js +33 -0
  56. package/dist/External-a5c4899d.js +110 -0
  57. package/dist/FeatureCollectionSnappingSource-40da43c0.js +130 -0
  58. package/dist/FeatureCommandQueue-68735fa7.js +1244 -0
  59. package/dist/FeatureEffect-20b68d20.js +39 -0
  60. package/dist/FeatureEffectLayer-65d674f5.js +13 -0
  61. package/dist/FeatureFilter-0babb1a1.js +27 -0
  62. package/dist/FeatureLayer-bb266fef.js +693 -0
  63. package/dist/FeatureLayerBase-583207e8.js +148 -0
  64. package/dist/FeatureLayerSource-daea2938.js +444 -0
  65. package/dist/FeatureLayerView2D-a93360fa.js +1967 -0
  66. package/dist/FeaturePipelineWorker-f8bb9d01.js +3633 -0
  67. package/dist/FeatureReductionLayer-b540e503.js +225 -0
  68. package/dist/FeatureReductionSelection-75ac9c66.js +22 -0
  69. package/dist/FeatureServiceSnappingSource-8d342703.js +481 -0
  70. package/dist/FeatureServiceSnappingSourceWorker-97c5a3e7.js +747 -0
  71. package/dist/FeatureSet-769d2f68.js +188 -0
  72. package/dist/FeatureStore-cfee3322.js +131 -0
  73. package/dist/FeatureTemplate-1be6448a.js +12 -0
  74. package/dist/FeatureType-69365546.js +25 -0
  75. package/dist/FieldsIndex-fd635f39.js +109 -0
  76. package/dist/FormTemplate-8a69784e.js +350 -0
  77. package/dist/GeoJSONLayer-288dc230.js +236 -0
  78. package/dist/GeoJSONSourceWorker-2a406166.js +247 -0
  79. package/dist/GeoRSSLayer-b6cf0b9a.js +73 -0
  80. package/dist/GeoRSSLayerView2D-a2d897cc.js +140 -0
  81. package/dist/GeometryUtils-42ae242b.js +403 -0
  82. package/dist/GraphicContainer-f39e4cce.js +26 -0
  83. package/dist/GraphicManipulator-d94e3db2.js +1499 -0
  84. package/dist/GraphicsLayer-06f54c2b.js +38 -0
  85. package/dist/GraphicsLayerView2D-6b0c439f.js +114 -0
  86. package/dist/GraphicsSnappingSource-cdbd5c58.js +273 -0
  87. package/dist/GraphicsView2D-5c69cd54.js +620 -0
  88. package/dist/GroupLayer-d90d1469.js +147 -0
  89. package/dist/GroupLayerView2D-47ee20d3.js +98 -0
  90. package/dist/HUDMaterial.glsl-1f7c8dc7.js +65 -0
  91. package/dist/HighlightCounter-82aefa16.js +41 -0
  92. package/dist/HighlightGraphicContainer-5887470a.js +18 -0
  93. package/dist/I3SBinaryReader-bc4c80ba.js +310 -0
  94. package/dist/I3SLayerDefinitions-dcda247e.js +55 -0
  95. package/dist/I3SUtil-f0366135.js +59 -0
  96. package/dist/IdentityManager-488a6f1a.js +899 -0
  97. package/dist/ImageHistogramParameters-4dc64f39.js +905 -0
  98. package/dist/ImageryLayer-b486249a.js +1799 -0
  99. package/dist/ImageryLayerView2D-f1c342ad.js +352 -0
  100. package/dist/ImageryTileLayer-12ada40b.js +2157 -0
  101. package/dist/ImageryTileLayerView2D-f35352b1.js +1110 -0
  102. package/dist/Indices-d59209a8.js +67 -0
  103. package/dist/IntegratedMesh3DTilesLayer-be58f806.js +112 -0
  104. package/dist/IntegratedMeshLayer-7b709481.js +141 -0
  105. package/dist/InteractiveAnalysisViewModel-cc8c864a.js +7397 -0
  106. package/dist/InterleavedLayout-31a7340e.js +163 -0
  107. package/dist/KMLLayer-599771d7.js +162 -0
  108. package/dist/KMLLayerView2D-017f9a86.js +253 -0
  109. package/dist/KnowledgeGraphLayerView2D-2578f250.js +43 -0
  110. package/dist/LRUCache-d9e4b57a.js +32 -0
  111. package/dist/LabelClass-909af0e5.js +135 -0
  112. package/dist/LabelMetric-a3f892e4.js +400 -0
  113. package/dist/LaserlinePath.glsl-763a0501.js +64 -0
  114. package/dist/Laserlines.glsl-75db5218.js +65 -0
  115. package/dist/LayerFloorInfo-8abaffaa.js +15 -0
  116. package/dist/LayerView-2a8c8edc.js +206 -0
  117. package/dist/LercWorker-06fcacbd.js +157 -0
  118. package/dist/LineOfSightLayer-019d46c8.js +147 -0
  119. package/dist/LinkChartLayer-332a03e2.js +1027 -0
  120. package/dist/Lyr3DWorker-5d6064e5.js +82 -0
  121. package/dist/MagnifierPrograms-4170fe79.js +806 -0
  122. package/dist/MapImageLayer-d86788de.js +169 -0
  123. package/dist/MapImageLayerView2D-0b2dddf2.js +146 -0
  124. package/dist/MapNotesLayer-07a5011d.js +283 -0
  125. package/dist/MapNotesLayerView2D-37f2c3b3.js +161 -0
  126. package/dist/MapServiceLayerViewHelper-f4014bfb.js +288 -0
  127. package/dist/MeasurementWidgetContent-31e1b266.js +2642 -0
  128. package/dist/MediaLayer-cd8e19fe.js +523 -0
  129. package/dist/MediaLayerView2D-bd3bc699.js +332 -0
  130. package/dist/MemCache-6249a3f0.js +227 -0
  131. package/dist/MemorySourceWorker-074a99da.js +222 -0
  132. package/dist/Mesh-17dfbf3e.js +980 -0
  133. package/dist/MeshLocalVertexSpace-a0c9365a.js +19 -0
  134. package/dist/MultiOriginJSONSupport-677c0e5f.js +158 -0
  135. package/dist/OGCFeatureLayer-1db569c4.js +211 -0
  136. package/dist/OGCFeatureLayerView2D-3dacad79.js +82 -0
  137. package/dist/ObjectStack-5e8cdae7.js +21 -0
  138. package/dist/Octree-0cab1591.js +495 -0
  139. package/dist/OpenStreetMapLayer-4b9e6867.js +30 -0
  140. package/dist/OperationalLayer-96cb1405.js +44 -0
  141. package/dist/OrderByInfo-4cb60db9.js +16 -0
  142. package/dist/OrderedLayer-cbff4a31.js +26 -0
  143. package/dist/OrientedImageryLayer-301c702b.js +216 -0
  144. package/dist/OverlayCompositing.glsl-cdda5153.js +65 -0
  145. package/dist/OverrideHelper-f9ba3c94.js +242 -0
  146. package/dist/PBFDecoderWorker-eac75de9.js +213 -0
  147. package/dist/PointCloudLayer-ce8e5fd6.js +197 -0
  148. package/dist/PointCloudUniqueValueRenderer-ca506fdf.js +115 -0
  149. package/dist/PointCloudWorker-49b24336.js +212 -0
  150. package/dist/PooledRBush-af918d48.js +272 -0
  151. package/dist/Popup-e996c502.js +3990 -0
  152. package/dist/PortalLayer-60c1c36d.js +126 -0
  153. package/dist/Program-5b5c8288.js +694 -0
  154. package/dist/ProgramTemplate-62d54e1b.js +35 -0
  155. package/dist/QueryEngine-1b2a6d7d.js +896 -0
  156. package/dist/QueryTask-07de3621.js +119 -0
  157. package/dist/RasterSymbolizer-c6f76134.js +3024 -0
  158. package/dist/RasterVFDisplayObject-573f0530.js +581 -0
  159. package/dist/RasterWorker-f428c6b4.js +78 -0
  160. package/dist/RawBlockCache-0803fdd7.js +185 -0
  161. package/dist/RealisticTree.glsl-abb5883e.js +42 -0
  162. package/dist/RefreshableLayer-0d1a28eb.js +80 -0
  163. package/dist/RefreshableLayerView-19c8ff47.js +16 -0
  164. package/dist/Relationship-35bb85fc.js +64 -0
  165. package/dist/RelationshipQuery-1cb86efa.js +22 -0
  166. package/dist/RenderingContext-34f41421.js +889 -0
  167. package/dist/RibbonLine.glsl-88da820b.js +65 -0
  168. package/dist/RouteLayer-b6a064d9.js +786 -0
  169. package/dist/RouteLayerView2D-b14b84ae.js +195 -0
  170. package/dist/SDFHelper-49b28369.js +140 -0
  171. package/dist/SSAO.glsl-b5eba45c.js +43 -0
  172. package/dist/SSAOBlur.glsl-7377bef6.js +42 -0
  173. package/dist/ScaleRangeLayer-d06647e5.js +21 -0
  174. package/dist/SceneLayer-34617ffa.js +542 -0
  175. package/dist/SceneLayerSnappingSource-2115fd1b.js +218 -0
  176. package/dist/SceneLayerSnappingSourceWorker-5051ed2a.js +112 -0
  177. package/dist/SceneLayerWorker-416bda11.js +164 -0
  178. package/dist/SceneService-337f7bcd.js +215 -0
  179. package/dist/Scheduler-b0e8df04.js +373 -0
  180. package/dist/Search/Search.d.ts +1 -1
  181. package/dist/Search/test.mocks.d.ts +1 -1
  182. package/dist/Search/utils.d.ts +1 -1
  183. package/dist/Select/Select.core.d.ts +1 -1
  184. package/dist/Select/Single/Select.single.d.ts +0 -1
  185. package/dist/Select/index.d.ts +0 -1
  186. package/dist/ShadedColorMaterial.glsl-8dd39e79.js +64 -0
  187. package/dist/SnappingOperation-726320a3.js +48 -0
  188. package/dist/SourceLayerData-b2da5f90.js +116 -0
  189. package/dist/SpatialFilter-0839066d.js +1701 -0
  190. package/dist/Stop-16e18837.js +281 -0
  191. package/dist/StreamLayer-a2c5ad69.js +188 -0
  192. package/dist/StreamLayerView2D-b1cb419c.js +164 -0
  193. package/dist/StyleRepository-55975dc1.js +2212 -0
  194. package/dist/SublayersOwner-dfd52113.js +545 -0
  195. package/dist/SubtypeGroupLayer-19990fdc.js +514 -0
  196. package/dist/SubtypeGroupLayerView2D-039eecec.js +84 -0
  197. package/dist/TableConfig/TableConfig.d.ts +6 -14
  198. package/dist/TableConfig/test/mocks.d.ts +1 -1
  199. package/dist/TechniqueInstance-f272ce92.js +233 -0
  200. package/dist/TemporalLayer-960c7904.js +23 -0
  201. package/dist/Texture-08e8abdd.js +501 -0
  202. package/dist/TextureOnly.glsl-adbd8e1e.js +65 -0
  203. package/dist/Theme-a0c472c9.js +3426 -0
  204. package/dist/Tick-ad80492f.js +723 -0
  205. package/dist/TileContainer-6b12d8e1.js +31 -0
  206. package/dist/TileInfoTilemapCache-b78dac78.js +38 -0
  207. package/dist/TileLayer-4db1b607.js +194 -0
  208. package/dist/TileLayerView2D-1f2d0b4c.js +187 -0
  209. package/dist/TilemapCache-671945d2.js +189 -0
  210. package/dist/TimeInfo-48493242.js +42 -0
  211. package/dist/TimeOnly-40ea9bb9.js +706 -0
  212. package/dist/Toggle/Toggle.d.ts +0 -9
  213. package/dist/Tooltip-9ecc3c9d.js +138 -0
  214. package/dist/TopFeaturesQuery-c0fd4e83.js +32 -0
  215. package/dist/TurboLine-cb0c9eaa.js +565 -0
  216. package/dist/UniqueValueRenderer-e4a27dfc.js +1039 -0
  217. package/dist/UnknownLayer-c3ba50b7.js +30 -0
  218. package/dist/UnknownTimeZone-832b690f.js +15 -0
  219. package/dist/UnsupportedLayer-0a89352f.js +31 -0
  220. package/dist/UpdateTracking2D-881e1d79.js +8566 -0
  221. package/dist/Util-b8d78341.js +57 -0
  222. package/dist/VectorTileLayer-43223ebe.js +544 -0
  223. package/dist/VectorTileLayerView2D-3d5f0721.js +2108 -0
  224. package/dist/Version-014efc62.js +33 -0
  225. package/dist/VertexArrayObject-4c6a6897.js +73 -0
  226. package/dist/VertexColor.glsl-e1468339.js +2683 -0
  227. package/dist/VertexSnappingCandidate-b3a3d14d.js +13 -0
  228. package/dist/VideoLayerView2D-f24c6919.js +124 -0
  229. package/dist/VoxelLayer-5ab46878.js +631 -0
  230. package/dist/WFSLayer-e8a081ca.js +221 -0
  231. package/dist/WFSSourceWorker-55c872f8.js +157 -0
  232. package/dist/WGLContainer-f4c4a8dc.js +5426 -0
  233. package/dist/WMSLayer-e9d5e4a6.js +536 -0
  234. package/dist/WMSLayerView2D-56144a1d.js +117 -0
  235. package/dist/WMTSLayer-c571ae0f.js +531 -0
  236. package/dist/WMTSLayerView2D-81b561e0.js +142 -0
  237. package/dist/WebTileLayer-cd295f56.js +110 -0
  238. package/dist/WhereClause-8bc4aa58.js +2766 -0
  239. package/dist/WorkerHandle-f8e580f2.js +47 -0
  240. package/dist/WorkerTileHandler-0f73a7f2.js +1539 -0
  241. package/dist/action-53058ddb.js +198 -0
  242. package/dist/action-group-ff2ef7e7.js +145 -0
  243. package/dist/action-menu-fefff035.js +1759 -0
  244. package/dist/apng-ac31a3d2.js +392 -0
  245. package/dist/arcade-ce9e8356.js +229 -0
  246. package/dist/arcadeAsyncRuntime-068150f3.js +943 -0
  247. package/dist/arcadeUtils-38c2028a.js +8741 -0
  248. package/dist/arcgis-knowledge-client-core-418d2890.js +1218 -0
  249. package/dist/arcgis-knowledge-client-core-simd-bf207cbd.js +1218 -0
  250. package/dist/arcgisLayers-f9b73e96.js +152 -0
  251. package/dist/associatedFeatureServiceUtils-f1895302.js +92 -0
  252. package/dist/axisAngleDegrees-abd6e971.js +49 -0
  253. package/dist/basis_transcoder-ba9d02db.js +1248 -0
  254. package/dist/calcite-action-07342a33.js +22 -0
  255. package/dist/calcite-action-bar-b8b194bf.js +303 -0
  256. package/dist/calcite-action-group-f93a5b76.js +28 -0
  257. package/dist/calcite-button-13172f9c.js +228 -0
  258. package/dist/calcite-flow-959098df.js +128 -0
  259. package/dist/calcite-flow-item-9141ea0e.js +499 -0
  260. package/dist/calcite-icon-1f1f741d.js +16 -0
  261. package/dist/calcite-input-99b0c89d.js +24 -0
  262. package/dist/calcite-label-5daa57c6.js +79 -0
  263. package/dist/calcite-list-543efc4b.js +2135 -0
  264. package/dist/calcite-list-item-a148ac57.js +576 -0
  265. package/dist/calcite-list-item-group-4da974f3.js +71 -0
  266. package/dist/calcite-loader-8b29a4cd.js +14 -0
  267. package/dist/calcite-modal-b64d2a9b.js +333 -0
  268. package/dist/calcite-notice-1527bc00.js +181 -0
  269. package/dist/calcite-option-5ea94a2a.js +94 -0
  270. package/dist/calcite-scrim-35fd270f.js +18 -0
  271. package/dist/calcite-select-a936a6d4.js +231 -0
  272. package/dist/capabilities-eb05cd14.js +50 -0
  273. package/dist/chartCommon-af447b81.js +256 -0
  274. package/dist/chartUtilsAm5-21243f3e.js +2954 -0
  275. package/dist/clientSideDefaults-0197b13d.js +39 -0
  276. package/dist/colorRamps-100595ab.js +38 -0
  277. package/dist/colorUtils-1a8cc2f8.js +164 -0
  278. package/dist/commonProperties-7d8f6b56.js +60 -0
  279. package/dist/computeTranslationToOriginAndRotation-466bc2c5.js +60 -0
  280. package/dist/conditionalSlot-55a86124.js +27 -0
  281. package/dist/createConnection-37afc89c.js +299 -0
  282. package/dist/dataUtils-efd5edf8.js +1421 -0
  283. package/dist/deduplicate-be0453c1.js +89 -0
  284. package/dist/defaults-3495cefd.js +31 -0
  285. package/dist/deleteForwardEdits-8ffa4b4e.js +13 -0
  286. package/dist/diffUtils-cccaeaa2.js +90 -0
  287. package/dist/drapedUtils-dfe3325a.js +75 -0
  288. package/dist/earcut-1a1bdd2c.js +292 -0
  289. package/dist/edgeProcessing-b0f5f4f0.js +252 -0
  290. package/dist/editingSupport-93603f8d.js +203 -0
  291. package/dist/editsZScale-8a2a7226.js +37 -0
  292. package/dist/elevationInfoUtils-96b1ac38.js +126 -0
  293. package/dist/executeForIds-48f5ccd3.js +14 -0
  294. package/dist/executeForTopCount-6ba38c5f.js +17 -0
  295. package/dist/executeForTopExtents-570aeb4a.js +17 -0
  296. package/dist/executeForTopIds-066c5e05.js +17 -0
  297. package/dist/executeQueryJSON-f5d65f6d.js +15 -0
  298. package/dist/executeQueryPBF-4ff20838.js +152 -0
  299. package/dist/executeRelationshipQuery-60c2686f.js +53 -0
  300. package/dist/executeTopFeaturesQuery-029eb564.js +18 -0
  301. package/dist/featureConversionUtils-8635d4bd.js +479 -0
  302. package/dist/featureLayerUtils-883379f8.js +250 -0
  303. package/dist/featureLayerUtils-89be3008.js +142 -0
  304. package/dist/featureSetUtils-3ba52dc3.js +2530 -0
  305. package/dist/featuresetbase-360521bb.js +707 -0
  306. package/dist/featuresetgeom-1c40fbf0.js +99 -0
  307. package/dist/featuresetstats-8b7ee0fc.js +81 -0
  308. package/dist/featuresetstring-502232ab.js +95 -0
  309. package/dist/fetchService-81224f29.js +33 -0
  310. package/dist/fieldProperties-1d23cc31.js +33 -0
  311. package/dist/floatRGBA-8dd8f77f.js +20 -0
  312. package/dist/form-81637afc.js +138 -0
  313. package/dist/geohashUtils-7a5a8250.js +85 -0
  314. package/dist/geojson-b271f3fc.js +208 -0
  315. package/dist/geomasync-4182a04e.js +567 -0
  316. package/dist/geometryEngine-170fd2fc.js +192 -0
  317. package/dist/geometryEngineAsync-ff5386c8.js +217 -0
  318. package/dist/geometryEngineBase-292b6d6f.js +18463 -0
  319. package/dist/geometryEngineJSON-15d3dac3.js +46 -0
  320. package/dist/geometryEngineJSON-c8044348.js +171 -0
  321. package/dist/geometryEngineWorker-19511bd8.js +11 -0
  322. package/dist/geometryServiceUtils-a348e7af.js +28 -0
  323. package/dist/georeference-72e12165.js +291 -0
  324. package/dist/gif-48b9a7df.js +323 -0
  325. package/dist/gltfexport-45261c80.js +705 -0
  326. package/dist/groupLayerUtils-f400995e.js +39 -0
  327. package/dist/heatmapUtils-81245e4b.js +45 -0
  328. package/dist/highlightReasons-23d6c956.js +19 -0
  329. package/dist/hydrated-e88a116e.js +40 -0
  330. package/dist/i3s-8b6deab9.js +809 -0
  331. package/dist/icon-422742c4.js +127 -0
  332. package/dist/imageBitmapUtils-12016538.js +23 -0
  333. package/dist/imageUtils-b38618d9.js +89 -0
  334. package/dist/imageUtils-c550215a.js +69 -0
  335. package/dist/imageryUtils-ac0e6068.js +43 -0
  336. package/dist/index-a450f76b.js +45553 -0
  337. package/dist/index.js +1 -1
  338. package/dist/input-message-c606a089.js +92 -0
  339. package/dist/input2-8de5385e.js +575 -0
  340. package/dist/interactive-1bfa32d8.js +80 -0
  341. package/dist/jsonContext-70d89bc5.js +15 -0
  342. package/dist/jsonUtils-599f89fd.js +86 -0
  343. package/dist/jsonUtils-59cbda09.js +476 -0
  344. package/dist/jsonUtils-dbeb4b10.js +59 -0
  345. package/dist/kmlUtils-acfd0be5.js +112 -0
  346. package/dist/knowledgeGraphService-d0de6015.js +739 -0
  347. package/dist/knowledgegraph-1d25377f.js +149 -0
  348. package/dist/labelUtils-17e6e19c.js +61 -0
  349. package/dist/labelingInfo-7583b96a.js +46 -0
  350. package/dist/layersCreator-a7588c85.js +151 -0
  351. package/dist/layersLoader-503fa253.js +197 -0
  352. package/dist/lazyLayerLoader-14780aaf.js +10 -0
  353. package/dist/lclayout-b5aeb13b.js +773 -0
  354. package/dist/lengthUtils-15c44621.js +5 -0
  355. package/dist/lerc-wasm-57456401.js +325 -0
  356. package/dist/libtess-asm-08a80cbf.js +3673 -0
  357. package/dist/libtess-bcb513a0.js +269 -0
  358. package/dist/lineSegment-53f5f3d5.js +76 -0
  359. package/dist/loadGLTFMesh-561cd76a.js +181 -0
  360. package/dist/loadable-11e952cf.js +24 -0
  361. package/dist/loader-aafdf7c3.js +79 -0
  362. package/dist/lyr3DWorker-1876a7b0.js +2108 -0
  363. package/dist/mapViewDeps-c8de4ef9.js +3052 -0
  364. package/dist/mediaLayerUtils-236fdb9c.js +35 -0
  365. package/dist/meshFeatureSet-cf240f51.js +126 -0
  366. package/dist/meshVertexSpaceUtils-3647b869.js +58 -0
  367. package/dist/multidimensionalUtils-611e5cda.js +290 -0
  368. package/dist/normalizeUtilsSync-90304e5d.js +181 -0
  369. package/dist/number-d1e69c5f.js +128 -0
  370. package/dist/objectResourceUtils-237c5dab.js +1455 -0
  371. package/dist/observers-7ebedc04.js +30 -0
  372. package/dist/ogcFeatureUtils-f14754d3.js +206 -0
  373. package/dist/openCloseComponent-f7f72e31.js +37 -0
  374. package/dist/orientedBoundingBox-75e679bc.js +447 -0
  375. package/dist/parser-54b64f9a.js +488 -0
  376. package/dist/pbf-4b5a905e.js +215 -0
  377. package/dist/pbfQueryUtils-780daa49.js +422 -0
  378. package/dist/pe-wasm-7eeff6bc.js +887 -0
  379. package/dist/persistable-2afd8b64.js +89 -0
  380. package/dist/perspectiveUtils-78d50b08.js +42 -0
  381. package/dist/pieChart-f5575f34.js +555 -0
  382. package/dist/plane-ee1849b4.js +160 -0
  383. package/dist/popupUtils-5d826c7a.js +50 -0
  384. package/dist/popupUtils-8f261298.js +22 -0
  385. package/dist/portalItemUtils-07c1c29f.js +57 -0
  386. package/dist/portalLayers-199d1cb1.js +312 -0
  387. package/dist/portalUtils-f3c544f6.js +7 -0
  388. package/dist/programUtils-cd0377dc.js +59 -0
  389. package/dist/project-6d7a2904.js +21 -0
  390. package/dist/projectPointToVector-5800baf2.js +14 -0
  391. package/dist/projectVectorToVector-fdcb00cb.js +13 -0
  392. package/dist/quantityUtils-ab7a657b.js +33 -0
  393. package/dist/quantizationUtils-dde8a0c2.js +68 -0
  394. package/dist/quat-48b188ff.js +104 -0
  395. package/dist/query-581e35c7.js +89 -0
  396. package/dist/queryAttachments-191977a0.js +39 -0
  397. package/dist/queryEngineUtils-15b0748f.js +21 -0
  398. package/dist/queryTopFeatures-e6b8517a.js +50 -0
  399. package/dist/queryZScale-b9c83898.js +12 -0
  400. package/dist/rasterProjectionHelper-9e69c84d.js +577 -0
  401. package/dist/rasterUtils-76d2db45.js +122 -0
  402. package/dist/rasterizingUtils-730137a6.js +46 -0
  403. package/dist/request-3c238dd9.js +46 -0
  404. package/dist/requestImageUtils-6a0b710a.js +8 -0
  405. package/dist/resourceExtension-8e2ef6d4.js +17 -0
  406. package/dist/resourceUtils-49ebeb9f.js +42 -0
  407. package/dist/resourceUtils-b3c85655.js +62 -0
  408. package/dist/resourceUtils-b45c0ef9.js +69 -0
  409. package/dist/saveAPIKeyUtils-1146065e.js +8 -0
  410. package/dist/saveUtils-196e791e.js +24 -0
  411. package/dist/scaleUtils-7e908168.js +23 -0
  412. package/dist/scrim-56f6fa37.js +114 -0
  413. package/dist/serviceCapabilitiesUtils-266d7001.js +64 -0
  414. package/dist/sourceUtils-0d21eace.js +71 -0
  415. package/dist/sphere-8103ac36.js +199 -0
  416. package/dist/statsWorker-04df4d99.js +37 -0
  417. package/dist/streamLayerUtils-6b66a73a.js +31 -0
  418. package/dist/style.css +1 -1
  419. package/dist/styleUtils-31e64784.js +75 -0
  420. package/dist/styleUtils-3951c967.js +14 -0
  421. package/dist/sublayerUtils-d60d357a.js +37 -0
  422. package/dist/substitute-77b7b80a.js +52 -0
  423. package/dist/symbolColorUtils-d97fe12d.js +8 -0
  424. package/dist/symbolLayerUtils-5f73a9b9.js +31 -0
  425. package/dist/symbologySnappingCandidates-bd284687.js +221 -0
  426. package/dist/t9n-2012740c.js +349 -0
  427. package/dist/testSVGPremultipliedAlpha-bb386a75.js +94 -0
  428. package/dist/timeSupport-2eb266be.js +410 -0
  429. package/dist/triangle-cac8dd7a.js +98 -0
  430. package/dist/unitConversionUtils-ad9151e0.js +17 -0
  431. package/dist/unitFormatUtils-3096fcbf.js +40 -0
  432. package/dist/uploadAssetErrors-b8ec890d.js +70 -0
  433. package/dist/uploadAssets-42d5e368.js +330 -0
  434. package/dist/utils-0ec1deff.js +232 -0
  435. package/dist/utils-25ac5b7c.js +73 -0
  436. package/dist/utils-3fc8cef0.js +79 -0
  437. package/dist/utils-59c058ba.js +2746 -0
  438. package/dist/utils-5a4ac69c.js +419 -0
  439. package/dist/utils-93ae7d8a.js +34 -0
  440. package/dist/utils-bba64d46.js +91 -0
  441. package/dist/utils-ce8900dc.js +433 -0
  442. package/dist/utils3-72b32be5.js +75 -0
  443. package/dist/vec3-0abe1464.js +81 -0
  444. package/dist/vec42-1641eab7.js +125 -0
  445. package/dist/versionUtils-6a805b25.js +161 -0
  446. package/dist/visualVariableUtils-7ae62b11.js +267 -0
  447. package/dist/webStyleSymbolUtils-038dca4c.js +48 -0
  448. package/dist/webglDeps-c2957fe0.js +23 -0
  449. package/dist/wfsUtils-a332128b.js +343 -0
  450. package/dist/workerHelper-2a48e790.js +11 -0
  451. package/dist/xyChart-131284db.js +3335 -0
  452. package/package.json +1 -1
  453. package/dist/AGraphicContainer-0a4e0426.js +0 -109
  454. package/dist/APIKeyMixin-83e85532.js +0 -19
  455. package/dist/Analysis-c4011253.js +0 -31
  456. package/dist/ArcGISCachedService-1c6af1c1.js +0 -47
  457. package/dist/ArcGISService-1d880889.js +0 -25
  458. package/dist/AreaMeasurement2D-86006a71.js +0 -405
  459. package/dist/AreaMeasurement3D-1825243c.js +0 -488
  460. package/dist/AttachmentInfo-fa04c641.js +0 -34
  461. package/dist/AttachmentQuery-1450c2f7.js +0 -18
  462. package/dist/AttributeStore-02f947ea.js +0 -1707
  463. package/dist/BaseDynamicLayerView2D-eb11c757.js +0 -63
  464. package/dist/BingMapsLayer-7ad7d511.js +0 -112
  465. package/dist/Bitmap-14a020d8.js +0 -128
  466. package/dist/BitmapContainer-cc71fd24.js +0 -23
  467. package/dist/BlendLayer-e2f97659.js +0 -13
  468. package/dist/BoundsStore-8612892f.js +0 -63
  469. package/dist/BufferObject-bd932c2c.js +0 -100
  470. package/dist/BufferView-97ed14c7.js +0 -683
  471. package/dist/BuildingSceneLayer-3f5380c8.js +0 -535
  472. package/dist/Button-15031955.js +0 -36
  473. package/dist/CSVLayer-a76db6f4.js +0 -208
  474. package/dist/CSVSourceWorker-afe160ed.js +0 -367
  475. package/dist/CatalogDynamicGroupLayerView2D-be946494.js +0 -66
  476. package/dist/CatalogFootprintLayerView2D-14763204.js +0 -76
  477. package/dist/CatalogLayer-7d6228dd.js +0 -262
  478. package/dist/CatalogLayerView2D-13e32a42.js +0 -52
  479. package/dist/ClassBreaksDefinition-7040a7fc.js +0 -18
  480. package/dist/ColorMaterial.glsl-e56765f1.js +0 -64
  481. package/dist/ColorSet-4ff0a7b7.js +0 -45
  482. package/dist/ColorStop-1e154045.js +0 -29
  483. package/dist/Container-6e3b610b.js +0 -521
  484. package/dist/CustomParametersMixin-c01280c0.js +0 -12
  485. package/dist/DefaultMaterial.glsl-e7e23b90.js +0 -42
  486. package/dist/DefaultMaterial_COLOR_GAMMA-7fd21704.js +0 -653
  487. package/dist/DefaultTheme-3c5b433f.js +0 -130
  488. package/dist/DeleteForwardEditsParameters-7073c5e5.js +0 -18
  489. package/dist/DimensionLayer-f921dd3d.js +0 -129
  490. package/dist/DirectLineMeasurement3D-61d14af2.js +0 -449
  491. package/dist/DistanceMeasurement2D-b023b35c.js +0 -303
  492. package/dist/DoubleArray-1186b8b8.js +0 -25
  493. package/dist/Dropdown/Dropdown.types.d.ts +0 -16
  494. package/dist/Dropdown/Filter/Filter.types.d.ts +0 -17
  495. package/dist/Dropdown/List/List.types.d.ts +0 -11
  496. package/dist/EdgeProcessingWorker-cb6277ad.js +0 -63
  497. package/dist/EditBusLayer-9d740f8f.js +0 -107
  498. package/dist/ElevationInfo-581ff99d.js +0 -56
  499. package/dist/ElevationLayer-42b57d9b.js +0 -129
  500. package/dist/ElevationQuery-f6d0cf9f.js +0 -598
  501. package/dist/ElevationSamplerWorker-50d805bb.js +0 -62
  502. package/dist/ExportImageParameters-5b047f92.js +0 -66
  503. package/dist/ExportStrategy-b6c54d77.js +0 -93
  504. package/dist/ExportWMSImageParameters-ff5a3ac8.js +0 -33
  505. package/dist/External-695a389a.js +0 -110
  506. package/dist/FeatureCollectionSnappingSource-fdaed9e0.js +0 -130
  507. package/dist/FeatureCommandQueue-c2bd1a39.js +0 -1244
  508. package/dist/FeatureEffect-9ea1b3da.js +0 -39
  509. package/dist/FeatureEffectLayer-0fa169c4.js +0 -13
  510. package/dist/FeatureFilter-638c4cae.js +0 -27
  511. package/dist/FeatureLayer-2a419d3e.js +0 -693
  512. package/dist/FeatureLayerBase-7331e738.js +0 -148
  513. package/dist/FeatureLayerSource-733186fb.js +0 -444
  514. package/dist/FeatureLayerView2D-bc4994b6.js +0 -1967
  515. package/dist/FeaturePipelineWorker-5f68488c.js +0 -3633
  516. package/dist/FeatureReductionLayer-0c152478.js +0 -225
  517. package/dist/FeatureReductionSelection-f952512d.js +0 -22
  518. package/dist/FeatureServiceSnappingSource-4c02d5a3.js +0 -481
  519. package/dist/FeatureServiceSnappingSourceWorker-c2a1dc50.js +0 -747
  520. package/dist/FeatureSet-2c6b8e00.js +0 -188
  521. package/dist/FeatureStore-a26846c0.js +0 -131
  522. package/dist/FeatureTemplate-1b6b7e2d.js +0 -12
  523. package/dist/FeatureType-9e1f1a7d.js +0 -25
  524. package/dist/FieldsIndex-91711836.js +0 -109
  525. package/dist/FormTemplate-ae0cfb6e.js +0 -350
  526. package/dist/GeoJSONLayer-b2070c34.js +0 -236
  527. package/dist/GeoJSONSourceWorker-aecb5f9b.js +0 -247
  528. package/dist/GeoRSSLayer-3743b41f.js +0 -73
  529. package/dist/GeoRSSLayerView2D-098c24bc.js +0 -140
  530. package/dist/GeometryUtils-036c7f22.js +0 -403
  531. package/dist/GraphicContainer-ece3945e.js +0 -26
  532. package/dist/GraphicManipulator-bc92899f.js +0 -1499
  533. package/dist/GraphicsLayer-764f0324.js +0 -38
  534. package/dist/GraphicsLayerView2D-36908d0c.js +0 -114
  535. package/dist/GraphicsSnappingSource-2bb681c0.js +0 -273
  536. package/dist/GraphicsView2D-e9cf5cd6.js +0 -620
  537. package/dist/GroupLayer-5ea5b71b.js +0 -147
  538. package/dist/GroupLayerView2D-22ec9eaa.js +0 -98
  539. package/dist/HUDMaterial.glsl-80ab7d22.js +0 -65
  540. package/dist/HighlightCounter-36842e52.js +0 -41
  541. package/dist/HighlightGraphicContainer-10cb9671.js +0 -18
  542. package/dist/I3SBinaryReader-9dbdc661.js +0 -310
  543. package/dist/I3SLayerDefinitions-b56e2c87.js +0 -55
  544. package/dist/I3SUtil-5461dc89.js +0 -59
  545. package/dist/IdentityManager-bb063156.js +0 -899
  546. package/dist/ImageHistogramParameters-1f8e5179.js +0 -905
  547. package/dist/ImageryLayer-a807d3b3.js +0 -1799
  548. package/dist/ImageryLayerView2D-358a3267.js +0 -352
  549. package/dist/ImageryTileLayer-0f67f262.js +0 -2157
  550. package/dist/ImageryTileLayerView2D-2bc2bb67.js +0 -1110
  551. package/dist/Indices-0c5304f2.js +0 -67
  552. package/dist/IntegratedMesh3DTilesLayer-be69dca8.js +0 -112
  553. package/dist/IntegratedMeshLayer-3c070523.js +0 -141
  554. package/dist/InteractiveAnalysisViewModel-3005a4a6.js +0 -7397
  555. package/dist/InterleavedLayout-d37b99a2.js +0 -163
  556. package/dist/KMLLayer-2011c3c6.js +0 -162
  557. package/dist/KMLLayerView2D-5d17145f.js +0 -253
  558. package/dist/KnowledgeGraphLayerView2D-7172b91b.js +0 -43
  559. package/dist/LRUCache-39211cf9.js +0 -32
  560. package/dist/LabelClass-d1080628.js +0 -135
  561. package/dist/LabelMetric-ab56c6b3.js +0 -400
  562. package/dist/LaserlinePath.glsl-df8f92cc.js +0 -64
  563. package/dist/Laserlines.glsl-f7d93e3f.js +0 -65
  564. package/dist/LayerFloorInfo-3edeb9a2.js +0 -15
  565. package/dist/LayerView-1c58c8c6.js +0 -206
  566. package/dist/LercWorker-c7a2aca1.js +0 -157
  567. package/dist/LineOfSightLayer-3028e21f.js +0 -147
  568. package/dist/LinkChartLayer-988ae660.js +0 -1027
  569. package/dist/Lyr3DWorker-4c8c758f.js +0 -82
  570. package/dist/MagnifierPrograms-123961a3.js +0 -806
  571. package/dist/MapImageLayer-9241ad63.js +0 -169
  572. package/dist/MapImageLayerView2D-726e5c66.js +0 -146
  573. package/dist/MapNotesLayer-2d2db99b.js +0 -283
  574. package/dist/MapNotesLayerView2D-41f5790c.js +0 -161
  575. package/dist/MapServiceLayerViewHelper-8f5228ec.js +0 -288
  576. package/dist/MeasurementWidgetContent-504fd868.js +0 -2642
  577. package/dist/MediaLayer-e71ce661.js +0 -523
  578. package/dist/MediaLayerView2D-33c67404.js +0 -332
  579. package/dist/MemCache-413327b3.js +0 -227
  580. package/dist/MemorySourceWorker-b0e70dd0.js +0 -222
  581. package/dist/Mesh-98c4e050.js +0 -980
  582. package/dist/MeshLocalVertexSpace-7a7e4d4e.js +0 -19
  583. package/dist/MultiOriginJSONSupport-2fca3cc5.js +0 -158
  584. package/dist/OGCFeatureLayer-451fbd45.js +0 -211
  585. package/dist/OGCFeatureLayerView2D-d23b08d2.js +0 -82
  586. package/dist/ObjectStack-742b2ff3.js +0 -21
  587. package/dist/Octree-a3c8e90e.js +0 -495
  588. package/dist/OpenStreetMapLayer-9bb91f97.js +0 -30
  589. package/dist/OperationalLayer-fbfada66.js +0 -44
  590. package/dist/OrderByInfo-335eb561.js +0 -16
  591. package/dist/OrderedLayer-29b4ac64.js +0 -26
  592. package/dist/OrientedImageryLayer-aa2498e2.js +0 -216
  593. package/dist/OverlayCompositing.glsl-4b1e83c2.js +0 -65
  594. package/dist/OverrideHelper-74cc3959.js +0 -242
  595. package/dist/PBFDecoderWorker-fd40e0f9.js +0 -213
  596. package/dist/PointCloudLayer-64cdbbb2.js +0 -197
  597. package/dist/PointCloudUniqueValueRenderer-db9b3a98.js +0 -115
  598. package/dist/PointCloudWorker-a5eb5224.js +0 -212
  599. package/dist/PooledRBush-be6fe17a.js +0 -272
  600. package/dist/Popup-db250fe6.js +0 -3990
  601. package/dist/PortalLayer-a6ce110e.js +0 -126
  602. package/dist/Program-ecabc523.js +0 -694
  603. package/dist/ProgramTemplate-e5ce3b0f.js +0 -35
  604. package/dist/QueryEngine-87b2546b.js +0 -896
  605. package/dist/QueryTask-36400ec7.js +0 -119
  606. package/dist/RasterSymbolizer-cfd47847.js +0 -3024
  607. package/dist/RasterVFDisplayObject-d4c967ea.js +0 -581
  608. package/dist/RasterWorker-068ae23a.js +0 -78
  609. package/dist/RawBlockCache-9e8d4c35.js +0 -185
  610. package/dist/RealisticTree.glsl-adab8e44.js +0 -42
  611. package/dist/RefreshableLayer-eec34ca2.js +0 -80
  612. package/dist/RefreshableLayerView-ee06f08c.js +0 -16
  613. package/dist/Relationship-a7eb5489.js +0 -64
  614. package/dist/RelationshipQuery-4551bb04.js +0 -22
  615. package/dist/RenderingContext-9e8fac0d.js +0 -889
  616. package/dist/RibbonLine.glsl-5990bf5f.js +0 -65
  617. package/dist/RouteLayer-858bc482.js +0 -786
  618. package/dist/RouteLayerView2D-a70d519f.js +0 -195
  619. package/dist/SDFHelper-efca0a53.js +0 -140
  620. package/dist/SSAO.glsl-7670c1fc.js +0 -43
  621. package/dist/SSAOBlur.glsl-3523d6af.js +0 -42
  622. package/dist/ScaleRangeLayer-7f440b85.js +0 -21
  623. package/dist/SceneLayer-999bd23f.js +0 -542
  624. package/dist/SceneLayerSnappingSource-9420aaed.js +0 -218
  625. package/dist/SceneLayerSnappingSourceWorker-be67e552.js +0 -112
  626. package/dist/SceneLayerWorker-201939c2.js +0 -164
  627. package/dist/SceneService-318eff2f.js +0 -215
  628. package/dist/Scheduler-279ea0c3.js +0 -373
  629. package/dist/ShadedColorMaterial.glsl-bd2979d8.js +0 -64
  630. package/dist/SnappingOperation-5100da71.js +0 -48
  631. package/dist/SourceLayerData-50c2b980.js +0 -116
  632. package/dist/SpatialFilter-b6c6b2fc.js +0 -1701
  633. package/dist/Stop-196981da.js +0 -281
  634. package/dist/StreamLayer-37b818b8.js +0 -188
  635. package/dist/StreamLayerView2D-7f0f45bc.js +0 -164
  636. package/dist/StyleRepository-4e8fa398.js +0 -2212
  637. package/dist/SublayersOwner-90d10612.js +0 -545
  638. package/dist/SubtypeGroupLayer-959cabf8.js +0 -514
  639. package/dist/SubtypeGroupLayerView2D-95e63b42.js +0 -84
  640. package/dist/TechniqueInstance-bd190c26.js +0 -233
  641. package/dist/TemporalLayer-aacda167.js +0 -23
  642. package/dist/Texture-3618be49.js +0 -501
  643. package/dist/TextureOnly.glsl-fcca7034.js +0 -65
  644. package/dist/Theme-85608a9a.js +0 -3426
  645. package/dist/Tick-79e96104.js +0 -723
  646. package/dist/TileContainer-f1e7edd8.js +0 -31
  647. package/dist/TileInfoTilemapCache-2f882821.js +0 -38
  648. package/dist/TileLayer-db13a237.js +0 -194
  649. package/dist/TileLayerView2D-15af6be4.js +0 -187
  650. package/dist/TilemapCache-fc4b2c6c.js +0 -189
  651. package/dist/TimeInfo-39a9d4e1.js +0 -42
  652. package/dist/TimeOnly-b759457a.js +0 -706
  653. package/dist/Tooltip-0ba72b27.js +0 -138
  654. package/dist/TopFeaturesQuery-a11ecc39.js +0 -32
  655. package/dist/TurboLine-5e62d290.js +0 -565
  656. package/dist/UniqueValueRenderer-bf2f3234.js +0 -1039
  657. package/dist/UnknownLayer-2cf71578.js +0 -30
  658. package/dist/UnknownTimeZone-aabdcf56.js +0 -15
  659. package/dist/UnsupportedLayer-36650e4a.js +0 -31
  660. package/dist/UpdateTracking2D-b6d16b0c.js +0 -8566
  661. package/dist/Util-8f54c96b.js +0 -57
  662. package/dist/VectorTileLayer-ddcca4ec.js +0 -544
  663. package/dist/VectorTileLayerView2D-8176946a.js +0 -2108
  664. package/dist/Version-9eb299cd.js +0 -33
  665. package/dist/VertexArrayObject-d1a4262b.js +0 -73
  666. package/dist/VertexColor.glsl-fd9f70e0.js +0 -2683
  667. package/dist/VertexSnappingCandidate-70513010.js +0 -13
  668. package/dist/VideoLayerView2D-e08e1d57.js +0 -124
  669. package/dist/VoxelLayer-959702aa.js +0 -631
  670. package/dist/WFSLayer-4a41b206.js +0 -221
  671. package/dist/WFSSourceWorker-53d88982.js +0 -157
  672. package/dist/WGLContainer-e9e8616e.js +0 -5426
  673. package/dist/WMSLayer-8e44f55c.js +0 -536
  674. package/dist/WMSLayerView2D-415a1793.js +0 -117
  675. package/dist/WMTSLayer-804f4bed.js +0 -531
  676. package/dist/WMTSLayerView2D-96186a90.js +0 -142
  677. package/dist/WebTileLayer-7391ea01.js +0 -110
  678. package/dist/WhereClause-1816217e.js +0 -2766
  679. package/dist/WorkerHandle-25f67c67.js +0 -47
  680. package/dist/WorkerTileHandler-a7e508bc.js +0 -1539
  681. package/dist/action-3ce81e45.js +0 -198
  682. package/dist/action-group-f2d26c2b.js +0 -145
  683. package/dist/action-menu-015d91ab.js +0 -1759
  684. package/dist/apng-e5532475.js +0 -392
  685. package/dist/arcade-dbe2ca4a.js +0 -229
  686. package/dist/arcadeAsyncRuntime-78b83b41.js +0 -943
  687. package/dist/arcadeUtils-cb1066a6.js +0 -8741
  688. package/dist/arcgis-knowledge-client-core-7379d99e.js +0 -1218
  689. package/dist/arcgis-knowledge-client-core-simd-ea8b4d20.js +0 -1218
  690. package/dist/arcgisLayers-cd3494fd.js +0 -152
  691. package/dist/associatedFeatureServiceUtils-da8d377d.js +0 -92
  692. package/dist/axisAngleDegrees-19922758.js +0 -49
  693. package/dist/basis_transcoder-bf0490cc.js +0 -1248
  694. package/dist/calcite-action-0db4f61c.js +0 -22
  695. package/dist/calcite-action-bar-1b4c89cb.js +0 -303
  696. package/dist/calcite-action-group-3c8a934c.js +0 -28
  697. package/dist/calcite-button-1079a10c.js +0 -228
  698. package/dist/calcite-flow-c1e71a12.js +0 -128
  699. package/dist/calcite-flow-item-1097b48f.js +0 -499
  700. package/dist/calcite-icon-c88b4a67.js +0 -16
  701. package/dist/calcite-input-8c33ee84.js +0 -24
  702. package/dist/calcite-label-7fbfbe36.js +0 -79
  703. package/dist/calcite-list-93af4ae2.js +0 -2135
  704. package/dist/calcite-list-item-f0a6cda3.js +0 -576
  705. package/dist/calcite-list-item-group-107a313e.js +0 -71
  706. package/dist/calcite-loader-5194bf83.js +0 -14
  707. package/dist/calcite-modal-486280cc.js +0 -333
  708. package/dist/calcite-notice-a81274a8.js +0 -181
  709. package/dist/calcite-option-0020a955.js +0 -94
  710. package/dist/calcite-scrim-27d65e7f.js +0 -18
  711. package/dist/calcite-select-05f25c2a.js +0 -231
  712. package/dist/capabilities-238bde7d.js +0 -50
  713. package/dist/chartCommon-7eda170a.js +0 -256
  714. package/dist/chartUtilsAm5-fd8aeac2.js +0 -2954
  715. package/dist/clientSideDefaults-b91506af.js +0 -39
  716. package/dist/colorRamps-6027ea73.js +0 -38
  717. package/dist/colorUtils-3dd4b884.js +0 -164
  718. package/dist/commonProperties-bf4d305f.js +0 -60
  719. package/dist/computeTranslationToOriginAndRotation-ca5a9439.js +0 -60
  720. package/dist/conditionalSlot-80a4c6ff.js +0 -27
  721. package/dist/createConnection-70dd787a.js +0 -299
  722. package/dist/dataUtils-b632d3a2.js +0 -1421
  723. package/dist/deduplicate-e13aa9e2.js +0 -89
  724. package/dist/defaults-40a1a995.js +0 -31
  725. package/dist/deleteForwardEdits-b0182a08.js +0 -13
  726. package/dist/diffUtils-5f43e52a.js +0 -90
  727. package/dist/drapedUtils-416e5304.js +0 -75
  728. package/dist/earcut-235aa57d.js +0 -292
  729. package/dist/edgeProcessing-43d45a32.js +0 -252
  730. package/dist/editingSupport-7706f838.js +0 -203
  731. package/dist/editsZScale-49d8a8cd.js +0 -37
  732. package/dist/elevationInfoUtils-3fbfcf1f.js +0 -126
  733. package/dist/executeForIds-419ba6a3.js +0 -14
  734. package/dist/executeForTopCount-8a8ba5c7.js +0 -17
  735. package/dist/executeForTopExtents-9f24d5d0.js +0 -17
  736. package/dist/executeForTopIds-0bfdb55f.js +0 -17
  737. package/dist/executeQueryJSON-2a2e9e1b.js +0 -15
  738. package/dist/executeQueryPBF-f10de9ec.js +0 -152
  739. package/dist/executeRelationshipQuery-0680cb30.js +0 -53
  740. package/dist/executeTopFeaturesQuery-c553d696.js +0 -18
  741. package/dist/featureConversionUtils-83783887.js +0 -479
  742. package/dist/featureLayerUtils-545d260a.js +0 -250
  743. package/dist/featureLayerUtils-b18e6016.js +0 -142
  744. package/dist/featureSetUtils-0c7ba073.js +0 -2530
  745. package/dist/featuresetbase-aadfabb3.js +0 -707
  746. package/dist/featuresetgeom-a405018e.js +0 -99
  747. package/dist/featuresetstats-f6602402.js +0 -81
  748. package/dist/featuresetstring-834ea865.js +0 -95
  749. package/dist/fetchService-dac740ef.js +0 -33
  750. package/dist/fieldProperties-b024e721.js +0 -33
  751. package/dist/floatRGBA-46ee3e38.js +0 -20
  752. package/dist/form-0b2f0ac9.js +0 -138
  753. package/dist/geohashUtils-418d1ca6.js +0 -85
  754. package/dist/geojson-96d3353d.js +0 -208
  755. package/dist/geomasync-ff5b3734.js +0 -567
  756. package/dist/geometryEngine-8fcb3d59.js +0 -192
  757. package/dist/geometryEngineAsync-212f4b0f.js +0 -217
  758. package/dist/geometryEngineBase-4c2ff8b9.js +0 -18463
  759. package/dist/geometryEngineJSON-131b461e.js +0 -171
  760. package/dist/geometryEngineJSON-b43cf67f.js +0 -46
  761. package/dist/geometryEngineWorker-707ca480.js +0 -11
  762. package/dist/geometryServiceUtils-af23d0b5.js +0 -28
  763. package/dist/georeference-02bc532d.js +0 -291
  764. package/dist/gif-b072aa1c.js +0 -323
  765. package/dist/gltfexport-3362ea71.js +0 -705
  766. package/dist/groupLayerUtils-81545911.js +0 -39
  767. package/dist/heatmapUtils-b25824e4.js +0 -45
  768. package/dist/highlightReasons-5b8b2665.js +0 -19
  769. package/dist/hydrated-b0c62926.js +0 -40
  770. package/dist/i3s-32edc725.js +0 -809
  771. package/dist/icon-453c7f62.js +0 -127
  772. package/dist/imageBitmapUtils-51497e26.js +0 -23
  773. package/dist/imageUtils-1d1da6e6.js +0 -89
  774. package/dist/imageUtils-8c40eba6.js +0 -69
  775. package/dist/imageryUtils-0c00fbf3.js +0 -43
  776. package/dist/index-3b4c2147.js +0 -45568
  777. package/dist/input-message-32600f49.js +0 -92
  778. package/dist/input2-1c0831ed.js +0 -575
  779. package/dist/interactive-5824e097.js +0 -80
  780. package/dist/jsonContext-ec21ce85.js +0 -15
  781. package/dist/jsonUtils-012feb40.js +0 -476
  782. package/dist/jsonUtils-3979baa3.js +0 -59
  783. package/dist/jsonUtils-3eb7c689.js +0 -86
  784. package/dist/kmlUtils-4c198ea5.js +0 -112
  785. package/dist/knowledgeGraphService-a159d815.js +0 -739
  786. package/dist/knowledgegraph-eb0d44d4.js +0 -149
  787. package/dist/labelUtils-01b646c7.js +0 -61
  788. package/dist/labelingInfo-148dcd26.js +0 -46
  789. package/dist/layersCreator-4e94f616.js +0 -151
  790. package/dist/layersLoader-f4e3ab33.js +0 -197
  791. package/dist/lazyLayerLoader-eb51910e.js +0 -10
  792. package/dist/lclayout-4d303c41.js +0 -773
  793. package/dist/lengthUtils-6abaf27a.js +0 -5
  794. package/dist/lerc-wasm-0ae912df.js +0 -325
  795. package/dist/libtess-asm-91c97dcd.js +0 -3673
  796. package/dist/libtess-cba14731.js +0 -269
  797. package/dist/lineSegment-8f04aab4.js +0 -76
  798. package/dist/loadGLTFMesh-71542570.js +0 -181
  799. package/dist/loadable-e7c40a8a.js +0 -24
  800. package/dist/loader-6272e4b3.js +0 -79
  801. package/dist/lyr3DWorker-9ee4ee8b.js +0 -2108
  802. package/dist/mapViewDeps-b17a2e04.js +0 -3052
  803. package/dist/mediaLayerUtils-f0ccfd82.js +0 -35
  804. package/dist/meshFeatureSet-304dfa08.js +0 -126
  805. package/dist/meshVertexSpaceUtils-e7f774fa.js +0 -58
  806. package/dist/multidimensionalUtils-642f26da.js +0 -290
  807. package/dist/normalizeUtilsSync-b5f617e6.js +0 -181
  808. package/dist/number-3af512e3.js +0 -128
  809. package/dist/objectResourceUtils-d45057aa.js +0 -1455
  810. package/dist/observers-700e505d.js +0 -30
  811. package/dist/ogcFeatureUtils-440ed0bf.js +0 -206
  812. package/dist/openCloseComponent-1501c620.js +0 -37
  813. package/dist/orientedBoundingBox-80988e7f.js +0 -447
  814. package/dist/parser-6e351b85.js +0 -488
  815. package/dist/pbf-a85c52b3.js +0 -215
  816. package/dist/pbfQueryUtils-5f25f81f.js +0 -422
  817. package/dist/pe-wasm-e588110b.js +0 -887
  818. package/dist/persistable-ad01d0ca.js +0 -89
  819. package/dist/perspectiveUtils-ab58ddbb.js +0 -42
  820. package/dist/pieChart-d3793e8b.js +0 -555
  821. package/dist/plane-e103e8ed.js +0 -160
  822. package/dist/popupUtils-5f7c3e79.js +0 -50
  823. package/dist/popupUtils-b95ab60a.js +0 -22
  824. package/dist/portalItemUtils-3d59513a.js +0 -57
  825. package/dist/portalLayers-16b2f807.js +0 -312
  826. package/dist/portalUtils-3789afb0.js +0 -7
  827. package/dist/programUtils-c8d96b39.js +0 -59
  828. package/dist/project-7eaa59a4.js +0 -21
  829. package/dist/projectPointToVector-19151d97.js +0 -14
  830. package/dist/projectVectorToVector-d552535c.js +0 -13
  831. package/dist/quantityUtils-258bfdb4.js +0 -33
  832. package/dist/quantizationUtils-752e4d24.js +0 -68
  833. package/dist/quat-6dc51256.js +0 -104
  834. package/dist/query-da893693.js +0 -89
  835. package/dist/queryAttachments-df86b71d.js +0 -39
  836. package/dist/queryEngineUtils-ffc50ce5.js +0 -21
  837. package/dist/queryTopFeatures-5a58a12d.js +0 -50
  838. package/dist/queryZScale-39ffaf30.js +0 -12
  839. package/dist/rasterProjectionHelper-d13bc46d.js +0 -577
  840. package/dist/rasterUtils-22b15453.js +0 -122
  841. package/dist/rasterizingUtils-3388ddbf.js +0 -46
  842. package/dist/request-82a2415a.js +0 -46
  843. package/dist/requestImageUtils-2fca27f8.js +0 -8
  844. package/dist/resourceExtension-672d03cc.js +0 -17
  845. package/dist/resourceUtils-95b9964a.js +0 -42
  846. package/dist/resourceUtils-b1e50d5e.js +0 -69
  847. package/dist/resourceUtils-e8831103.js +0 -62
  848. package/dist/saveAPIKeyUtils-ee9b0447.js +0 -8
  849. package/dist/saveUtils-1323ad64.js +0 -24
  850. package/dist/scaleUtils-1a70f716.js +0 -23
  851. package/dist/scrim-c0a641cd.js +0 -114
  852. package/dist/serviceCapabilitiesUtils-33d4e1c0.js +0 -64
  853. package/dist/sourceUtils-e8c5db4e.js +0 -71
  854. package/dist/sphere-75cef429.js +0 -199
  855. package/dist/statsWorker-1f1bc582.js +0 -37
  856. package/dist/streamLayerUtils-c85a0eed.js +0 -31
  857. package/dist/styleUtils-05bc85a5.js +0 -75
  858. package/dist/styleUtils-7bd8d0a7.js +0 -14
  859. package/dist/sublayerUtils-feb77591.js +0 -37
  860. package/dist/substitute-c31da60c.js +0 -52
  861. package/dist/symbolColorUtils-3c385668.js +0 -8
  862. package/dist/symbolLayerUtils-2d2753b7.js +0 -31
  863. package/dist/symbologySnappingCandidates-00eeca39.js +0 -221
  864. package/dist/t9n-55800455.js +0 -349
  865. package/dist/testSVGPremultipliedAlpha-ec1f73c4.js +0 -94
  866. package/dist/timeSupport-a7623294.js +0 -410
  867. package/dist/triangle-c799f11b.js +0 -98
  868. package/dist/unitConversionUtils-05050e6d.js +0 -17
  869. package/dist/unitFormatUtils-2a84c371.js +0 -40
  870. package/dist/uploadAssetErrors-601b044e.js +0 -70
  871. package/dist/uploadAssets-5a835c8a.js +0 -330
  872. package/dist/utils-2dc379da.js +0 -79
  873. package/dist/utils-34b1ea70.js +0 -2746
  874. package/dist/utils-45c14202.js +0 -232
  875. package/dist/utils-484969fb.js +0 -91
  876. package/dist/utils-5aaff624.js +0 -433
  877. package/dist/utils-a94dc35d.js +0 -419
  878. package/dist/utils-e68cfebf.js +0 -34
  879. package/dist/utils-fc14cc83.js +0 -73
  880. package/dist/utils3-5745e839.js +0 -75
  881. package/dist/vec3-12b9e1d8.js +0 -81
  882. package/dist/vec42-a1569d60.js +0 -125
  883. package/dist/versionUtils-c4f3617a.js +0 -161
  884. package/dist/visualVariableUtils-bcb95edc.js +0 -267
  885. package/dist/webStyleSymbolUtils-9db5b81c.js +0 -48
  886. package/dist/webglDeps-05e0410a.js +0 -23
  887. package/dist/wfsUtils-7caaa2cc.js +0 -343
  888. package/dist/workerHelper-86e37deb.js +0 -11
  889. package/dist/xyChart-0673158d.js +0 -3335
@@ -1,2530 +0,0 @@
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-3b4c2147.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-cb1066a6.js";
3
- import { x as R, s as D, a as T, n as L, t as A, r as tt } from "./WhereClause-1816217e.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-b6c6b2fc.js";
5
- import { c as ut, a as dt, n as ht } from "./TimeOnly-b759457a.js";
6
- import { x as xe, n as Ne } from "./MD5-1b5ec1c3.js";
7
- import { Z as ct } from "./FieldsIndex-91711836.js";
8
- import v from "./FeatureLayer-2a419d3e.js";
9
- import Le from "./SubtypeGroupLayer-959cabf8.js";
10
- import { u as Ie, i as Ce } from "./infoFor3D-bf4e6c95.js";
11
- import { a as ft, s as De } from "./executeQueryJSON-2a2e9e1b.js";
12
- import { n as pt } from "./executeQueryPBF-f10de9ec.js";
13
- import { d as _t } from "./FeatureSet-2c6b8e00.js";
14
- import "./AttachmentInfo-fa04c641.js";
15
- import "./AttachmentQuery-1450c2f7.js";
16
- import { n as yt, s as gt } from "./executeForIds-419ba6a3.js";
17
- import "./pbf-a85c52b3.js";
18
- import Te from "./RelationshipQuery-4551bb04.js";
19
- import "./TopFeaturesQuery-a11ecc39.js";
20
- import { n as mt } from "./FeatureType-9e1f1a7d.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-304dfa08.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
- };