@arcgis/core 4.22.0-next.20211021 → 4.22.0-next.20211025

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 (440) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/00ac1ce56f9885a8be83.js +1 -0
  3. package/assets/esri/core/workers/chunks/01c9afe41ab4ccc597c9.js +1 -0
  4. package/assets/esri/core/workers/chunks/02a3d14adc504a51fa24.js +1 -0
  5. package/assets/esri/core/workers/chunks/035a9ab0202d5386b782.js +1 -0
  6. package/assets/esri/core/workers/chunks/062bace5505f13689c7d.js +1 -0
  7. package/assets/esri/core/workers/chunks/06c7745d813bcb540ce8.js +1 -0
  8. package/assets/esri/core/workers/chunks/0950b488a60b2abc21fc.js +1 -0
  9. package/assets/esri/core/workers/chunks/0af396f2e0de681113ef.js +1 -0
  10. package/assets/esri/core/workers/chunks/131838059f0f81d8eaee.js +1 -0
  11. package/assets/esri/core/workers/chunks/146cba0d172ec2f4eba2.js +1 -0
  12. package/assets/esri/core/workers/chunks/17e49c0dfa5a5a6213e2.js +1 -0
  13. package/assets/esri/core/workers/chunks/1a0b08190274725dc956.js +1 -0
  14. package/assets/esri/core/workers/chunks/1add7f0779accdf8d204.js +1 -0
  15. package/assets/esri/core/workers/chunks/20b81d11e6286d347bfc.js +1 -0
  16. package/assets/esri/core/workers/chunks/{e596bd3de960d1dc1c57.js → 2207580a78ee292ed9b8.js} +1 -1
  17. package/assets/esri/core/workers/chunks/2d3646a83465c75986f9.js +1 -0
  18. package/assets/esri/core/workers/chunks/2d38ee3ef3ebe32a1194.js +1 -0
  19. package/assets/esri/core/workers/chunks/3737dcc3c0dea3ca05d5.js +1 -0
  20. package/assets/esri/core/workers/chunks/3e2042e70647c1afa6aa.js +1 -0
  21. package/assets/esri/core/workers/chunks/3ebfaab2855a2236a95d.js +1 -0
  22. package/assets/esri/core/workers/chunks/{d6fe616192a8efbfbc3e.js → 440f8101402a4c0d7019.js} +1 -1
  23. package/assets/esri/core/workers/chunks/4587d770767966985e22.js +1 -0
  24. package/assets/esri/core/workers/chunks/487b8892fae85810a8c0.js +1 -0
  25. package/assets/esri/core/workers/chunks/4901a78f32c3ea6b823b.js +1 -0
  26. package/assets/esri/core/workers/chunks/496fe47fc4d28e1a716d.js +1 -0
  27. package/assets/esri/core/workers/chunks/{9f22f47d4b2e72d7bdcf.js → 4c010119c24510ea31bb.js} +2 -2
  28. package/assets/esri/core/workers/chunks/{9f22f47d4b2e72d7bdcf.js.LICENSE.txt → 4c010119c24510ea31bb.js.LICENSE.txt} +0 -0
  29. package/assets/esri/core/workers/chunks/4f5076e1f2b18ce8156d.js +1 -0
  30. package/assets/esri/core/workers/chunks/{f291ebc4b089bd1f0a3f.js → 50e86a6bb13042b1dbac.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{64d9a062c1f1ac08a3ac.js → 565020b1c02a8cb33c2b.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{d78c60a22f76df7c48c7.js → 59640d78295e2e363f18.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{a0356f320a1b2fbd03f0.js → 5ac2b2598245aa17cdbd.js} +1 -1
  34. package/assets/esri/core/workers/chunks/5b4a8cce5601cc92c8a3.js +1 -0
  35. package/assets/esri/core/workers/chunks/5b92d5d4049622531109.js +1 -0
  36. package/assets/esri/core/workers/chunks/{751c1a2838b54a74a9a6.js → 5f3caa0ddb215342c728.js} +2 -2
  37. package/assets/esri/core/workers/chunks/615e995d5ce8fa044b09.js +1 -0
  38. package/assets/esri/core/workers/chunks/62a2453699e0dd2393b9.js +1 -0
  39. package/assets/esri/core/workers/chunks/67013547be1a7ae1670a.js +1 -0
  40. package/assets/esri/core/workers/chunks/67eddf4808f8888faeb4.js +1 -0
  41. package/assets/esri/core/workers/chunks/695dbedff2340aa019ba.js +1 -0
  42. package/assets/esri/core/workers/chunks/6a7e388c94206d2f61ff.js +1 -0
  43. package/assets/esri/core/workers/chunks/6e22b69d55e791ab3d9a.js +1 -0
  44. package/assets/esri/core/workers/chunks/71e6c0c5ef0aa7eb1703.js +1 -0
  45. package/assets/esri/core/workers/chunks/7a74e230439c5111f852.js +1 -0
  46. package/assets/esri/core/workers/chunks/7e76a8e6fa67e607d09e.js +1 -0
  47. package/assets/esri/core/workers/chunks/7fe4985ca0cb3e6d35c6.js +1 -0
  48. package/assets/esri/core/workers/chunks/8027330714ff5ffb020e.js +1 -0
  49. package/assets/esri/core/workers/chunks/844b564d1a422a17f6ac.js +1 -0
  50. package/assets/esri/core/workers/chunks/856f9281a08cb032238e.js +1 -0
  51. package/assets/esri/core/workers/chunks/89b4983de872780e9aa1.js +1 -0
  52. package/assets/esri/core/workers/chunks/8f3bc0cd2c2b01ab80cd.js +1 -0
  53. package/assets/esri/core/workers/chunks/8fd912e325ccd48b98a9.js +1 -0
  54. package/assets/esri/core/workers/chunks/901907a5c01f0fd1478f.js +1 -0
  55. package/assets/esri/core/workers/chunks/92a0b88a14c92239df8a.js +1 -0
  56. package/assets/esri/core/workers/chunks/972e9aeb3c29c9bf441a.js +1 -0
  57. package/assets/esri/core/workers/chunks/9758c34ce61c3714515a.js +1 -0
  58. package/assets/esri/core/workers/chunks/{457ea4feaa006d60c6b1.js → 9a04d087a29f0f3937a3.js} +1 -1
  59. package/assets/esri/core/workers/chunks/9b0bb171224b35ce2031.js +1 -0
  60. package/assets/esri/core/workers/chunks/9cbe7afdaef8720dfc8d.js +1 -0
  61. package/assets/esri/core/workers/chunks/9ccde5b6562f0007fe45.js +1 -0
  62. package/assets/esri/core/workers/chunks/9d320bbeedeea15522ab.js +1 -0
  63. package/assets/esri/core/workers/chunks/a001b3b4527817548094.js +1 -0
  64. package/assets/esri/core/workers/chunks/{197b72bca45065e0eb4a.js → a0c580d4a1915ddd3fe4.js} +1 -1
  65. package/assets/esri/core/workers/chunks/a4a9c15929b43d83701f.js +1 -0
  66. package/assets/esri/core/workers/chunks/a54d11f44721f808b82f.js +1 -0
  67. package/assets/esri/core/workers/chunks/a646a11673d513c00e7a.js +1 -0
  68. package/assets/esri/core/workers/chunks/a792e2bc7cafdc29f05e.js +1 -0
  69. package/assets/esri/core/workers/chunks/acae1771697034f265b1.js +1 -0
  70. package/assets/esri/core/workers/chunks/af2ee804a9c63eea610c.js +1 -0
  71. package/assets/esri/core/workers/chunks/b28b487047da3aeef3fd.js +1 -0
  72. package/assets/esri/core/workers/chunks/b3e57824a5855cb37a96.js +1 -0
  73. package/assets/esri/core/workers/chunks/b89449ead32e4cd21edd.js +1 -0
  74. package/assets/esri/core/workers/chunks/b99891ed5a02cab02173.js +1 -0
  75. package/assets/esri/core/workers/chunks/bac84bc621be73a7a4bc.js +1 -0
  76. package/assets/esri/core/workers/chunks/{25037dcf8a0c72b7b647.js → bbe068388167e9dd0c11.js} +1 -1
  77. package/assets/esri/core/workers/chunks/c271a1857bcc4e9a36dd.js +1 -0
  78. package/assets/esri/core/workers/chunks/{eb3035e49a45ecc82575.js → c5030664720fcdc6d85e.js} +1 -1
  79. package/assets/esri/core/workers/chunks/c534ed122f8a1202d3a3.js +1 -0
  80. package/assets/esri/core/workers/chunks/c5ef2e28b0c539ddb6a7.js +1 -0
  81. package/assets/esri/core/workers/chunks/c65e5ccfae03d148d82b.js +1 -0
  82. package/assets/esri/core/workers/chunks/c91660f3982be4e03705.js +1 -0
  83. package/assets/esri/core/workers/chunks/ce93113b99bdbeddd07b.js +1 -0
  84. package/assets/esri/core/workers/chunks/cf2d408e669cfa2c65be.js +1 -0
  85. package/assets/esri/core/workers/chunks/d08f63ffeecefa02ad91.js +1 -0
  86. package/assets/esri/core/workers/chunks/{8d33644192c01e5416b4.js → d1a71b58ef62e71979c5.js} +1 -1
  87. package/assets/esri/core/workers/chunks/d30eade5afecd334f6cb.js +1 -0
  88. package/assets/esri/core/workers/chunks/d8782d0856b9d815cb6c.js +1 -0
  89. package/assets/esri/core/workers/chunks/db16c21b650001502e6c.js +1 -0
  90. package/assets/esri/core/workers/chunks/db18110c57253a31ac96.js +1 -0
  91. package/assets/esri/core/workers/chunks/dbaa5fb466d6c0214f24.js +1 -0
  92. package/assets/esri/core/workers/chunks/deae370788a7aacf4dd5.js +1 -0
  93. package/assets/esri/core/workers/chunks/e6ca132e1eeea3aa174e.js +1 -0
  94. package/assets/esri/core/workers/chunks/e878ccc431729ef3360f.js +1 -0
  95. package/assets/esri/core/workers/chunks/eb124f15ad4b9193f00a.js +1 -0
  96. package/assets/esri/core/workers/chunks/ebc71c06c1c22aaef54e.js +1 -0
  97. package/assets/esri/core/workers/chunks/f183da283af0836421ab.js +1 -0
  98. package/assets/esri/core/workers/chunks/f42bdc2a134833d33b4e.js +1 -0
  99. package/assets/esri/core/workers/chunks/{736d628cda4e02d40337.js → f8612c2fc5739e98be58.js} +1 -1
  100. package/assets/esri/core/workers/chunks/f965e3e5f6f4f9ba54ac.js +1 -0
  101. package/assets/esri/core/workers/chunks/fa4089640f480b69962e.js +1 -0
  102. package/assets/esri/core/workers/chunks/fb219563e5169ea67d68.js +1 -0
  103. package/assets/esri/libs/i3s/i3s.wasm +0 -0
  104. package/chunks/ChapmanAtmosphere.glsl.js +56 -77
  105. package/chunks/Clouds.glsl.js +1 -1
  106. package/chunks/Pattern.glsl.js +9 -11
  107. package/chunks/RibbonLine.glsl.js +60 -68
  108. package/chunks/i3s.js +1 -1
  109. package/chunks/mat4.js +1 -1
  110. package/chunks/vec3.js +1 -1
  111. package/core/Collection.js +1 -1
  112. package/core/Loadable.js +1 -1
  113. package/core/accessorSupport/ensureType.js +1 -1
  114. package/core/promiseUtils.js +1 -1
  115. package/core/support/OwningCollection.js +1 -1
  116. package/core/workers/RemoteClient.js +1 -1
  117. package/core/workers/WorkerOwner.js +1 -1
  118. package/core/workers/workers.js +2 -2
  119. package/geometry/projection.js +1 -1
  120. package/identity/IdentityManagerBase.js +1 -1
  121. package/interfaces.d.ts +205 -497
  122. package/layers/ElevationLayer.js +1 -1
  123. package/layers/GeoJSONLayer.js +1 -1
  124. package/layers/ImageryTileLayer.js +1 -1
  125. package/layers/VectorTileLayer.js +1 -1
  126. package/layers/VoxelWasmPerScene.js +1 -1
  127. package/layers/WCSLayer.js +1 -1
  128. package/layers/analyses/AreaMeasurement3D.js +1 -1
  129. package/layers/analyses/DirectLineMeasurement3D.js +1 -1
  130. package/layers/analyses/Slice.js +1 -1
  131. package/layers/effects/EffectList.js +1 -1
  132. package/layers/effects/effects.js +1 -1
  133. package/layers/effects/jsonUtils.js +1 -1
  134. package/layers/effects/parser.js +1 -1
  135. package/layers/effects/utils.js +5 -0
  136. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  137. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  138. package/layers/graphics/data/QueryEngine.js +1 -1
  139. package/layers/graphics/data/QueryEngineResult.js +1 -1
  140. package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
  141. package/layers/mixins/ImageryTileMixin.js +1 -1
  142. package/layers/support/RasterWorker.js +1 -1
  143. package/layers/support/TilemapCache.js +1 -1
  144. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  145. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  146. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  147. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  148. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  149. package/package.json +2 -2
  150. package/portal/support/portalLayers.js +1 -1
  151. package/request.js +1 -1
  152. package/smartMapping/renderers/support/utils.js +1 -1
  153. package/smartMapping/statistics/support/WorkerClient.js +1 -1
  154. package/smartMapping/statistics/support/statsWorker.js +1 -1
  155. package/smartMapping/statistics/support/utils.js +1 -1
  156. package/smartMapping/support/adapters/CSVLayerAdapter.js +1 -1
  157. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  158. package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
  159. package/smartMapping/support/adapters/support/utils.js +1 -1
  160. package/statistics/utils.js +1 -1
  161. package/support/GraphicsCollection.js +1 -1
  162. package/support/revision.js +1 -1
  163. package/symbols/FillSymbol3DLayer.js +1 -1
  164. package/symbols/IconSymbol3DLayer.js +1 -1
  165. package/symbols/LineSymbol3DLayer.js +1 -1
  166. package/symbols/patterns/LinePattern3D.js +5 -0
  167. package/symbols/patterns/LineStylePattern3D.d.ts +4 -0
  168. package/symbols/patterns/LineStylePattern3D.js +5 -0
  169. package/symbols/patterns/StylePattern3D.js +1 -1
  170. package/symbols/patterns/lineStyles.js +5 -0
  171. package/symbols/patterns/utils.js +1 -1
  172. package/symbols/support/Symbol3DFillMaterial.js +1 -1
  173. package/symbols/support/Symbol3DIconOutline.js +5 -0
  174. package/symbols/support/Symbol3DMaterial.js +1 -1
  175. package/symbols/support/Symbol3DOutline.js +1 -1
  176. package/symbols/support/defaults3D.js +1 -1
  177. package/symbols/support/previewSymbol3D.js +1 -1
  178. package/symbols/support/symbolLayerUtils3D.js +1 -1
  179. package/views/2d/engine/vectorTiles/TileParser.js +1 -1
  180. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  181. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  182. package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
  183. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  184. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  185. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  186. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  187. package/views/2d/layers/features/controllers/EditsQueue.js +1 -1
  188. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  189. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  190. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  191. package/views/2d/layers/support/FeatureLayerProxy.js +1 -1
  192. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  193. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  194. package/views/3d/environment/CloudsGenerator.js +1 -1
  195. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  196. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  197. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  198. package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
  199. package/views/3d/externalRenderers.js +1 -1
  200. package/views/3d/interactive/Manipulator3D.js +1 -1
  201. package/views/3d/interactive/analysisTools/slice/SliceTool.js +1 -1
  202. package/views/3d/interactive/analysisTools/slice/images/Factory.js +5 -0
  203. package/views/3d/interactive/analysisTools/slice/sliceToolConfig.js +1 -1
  204. package/views/3d/interactive/analysisTools/slice/sliceToolUtils.js +1 -1
  205. package/views/3d/interactive/editingTools/settings.js +1 -1
  206. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  207. package/views/3d/interactive/graphics/Slice/SliceController.js +1 -1
  208. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  209. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  210. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  211. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  212. package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
  213. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  214. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  215. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  216. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  217. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  218. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  219. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  220. package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
  221. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  222. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  223. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  224. package/views/3d/layers/I3SMeshView3D.js +1 -1
  225. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  226. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  227. package/views/3d/layers/analyses/AreaMeasurement3D/AreaMeasurementView3D.js +1 -1
  228. package/views/3d/layers/analyses/AreaMeasurement3D/support/AreaMeasurementPathHelper.js +1 -1
  229. package/views/3d/layers/analyses/AreaMeasurement3D/support/AreaMeasurementVisualization.js +1 -1
  230. package/views/3d/layers/analyses/DirectLineMeasurement3D/DirectLineMeasurementView3D.js +1 -1
  231. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  232. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  233. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  234. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  235. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  236. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  237. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  238. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  239. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  240. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  241. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  242. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  243. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  244. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  245. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  246. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  247. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  248. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  249. package/views/3d/layers/graphics/Labeler.js +1 -1
  250. package/views/3d/layers/graphics/Loadable.js +1 -1
  251. package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
  252. package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
  253. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  254. package/views/3d/layers/graphics/labelPlacement.js +1 -1
  255. package/views/3d/layers/graphics/pointUtils.js +1 -1
  256. package/views/3d/layers/i3s/I3SAttributeOverrides.js +1 -1
  257. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  258. package/views/3d/layers/i3s/I3SStreamDataController.js +1 -1
  259. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  260. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  261. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  262. package/views/3d/layers/support/patternUtils.js +1 -1
  263. package/views/3d/state/GoToOperation.js +1 -1
  264. package/views/3d/state/ViewStateManager.js +1 -1
  265. package/views/3d/support/LaserLineRenderer.js +1 -1
  266. package/views/3d/support/SharedSymbolResources.js +1 -1
  267. package/views/3d/support/StreamDataLoader.js +1 -1
  268. package/views/3d/support/StreamTextureCollection.js +5 -0
  269. package/views/3d/support/TextureCollection.js +1 -1
  270. package/views/3d/support/debugFlags.js +1 -1
  271. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  272. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  273. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  274. package/views/3d/terrain/OverlayManager.js +1 -1
  275. package/views/3d/terrain/OverlayRenderTarget.js +1 -1
  276. package/views/3d/terrain/OverlayRenderer.js +1 -1
  277. package/views/3d/terrain/Tile.js +1 -1
  278. package/views/3d/webgl-engine/Stage.js +1 -1
  279. package/views/3d/webgl-engine/core/material/RenderTexture.js +1 -1
  280. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +13 -12
  281. package/views/3d/webgl-engine/core/shaderLibrary/shading/Reprojection.glsl.js +1 -1
  282. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +10 -3
  283. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  284. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  285. package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
  286. package/views/3d/webgl-engine/lib/GLMaterialTexture.js +1 -1
  287. package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
  288. package/views/3d/webgl-engine/lib/Material.js +1 -1
  289. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  290. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  291. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  292. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  293. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  294. package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
  295. package/views/3d/webgl-engine/lib/TextTexture.js +1 -1
  296. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  297. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  298. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  299. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  300. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  301. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  302. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  303. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  304. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  305. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  306. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  307. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  308. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  309. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  310. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  311. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  312. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  313. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  314. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  315. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  316. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  317. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  318. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  319. package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
  320. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  321. package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
  322. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  323. package/views/3d/webgl-engine/parts/Model.js +1 -1
  324. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  325. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  326. package/views/LayerViewManager.js +1 -1
  327. package/views/SceneView.js +1 -1
  328. package/views/ToolViewManager.js +1 -1
  329. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  330. package/views/support/AllocationTracer.js +1 -1
  331. package/views/support/DefaultsFromMap.js +1 -1
  332. package/views/support/QueueProcessor.js +1 -1
  333. package/views/webgl/capabilities/load.js +1 -1
  334. package/webscene/Slide.js +1 -1
  335. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  336. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  337. package/widgets/BuildingExplorer/support/layerUtils.js +1 -1
  338. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  339. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  340. package/widgets/Editor/UpdateWorkflow.js +1 -1
  341. package/widgets/Feature/FeatureViewModel.js +1 -1
  342. package/widgets/Home/HomeViewModel.js +1 -1
  343. package/widgets/Locate/LocateViewModel.js +1 -1
  344. package/widgets/Popup/PopupViewModel.js +1 -1
  345. package/widgets/Search/SearchViewModel.js +1 -1
  346. package/widgets/Search.js +1 -1
  347. package/widgets/Sketch/SketchViewModel.js +1 -1
  348. package/widgets/Slice/SliceViewModel.js +1 -1
  349. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  350. package/assets/esri/core/workers/chunks/0283801d442984997abe.js +0 -1
  351. package/assets/esri/core/workers/chunks/0419e14a520b8fcf3e7a.js +0 -1
  352. package/assets/esri/core/workers/chunks/05318446b6a40caea361.js +0 -1
  353. package/assets/esri/core/workers/chunks/09e714d4381649348ac9.js +0 -1
  354. package/assets/esri/core/workers/chunks/0cecd668b9d5d3f83293.js +0 -1
  355. package/assets/esri/core/workers/chunks/13a73a88efd4f464173e.js +0 -1
  356. package/assets/esri/core/workers/chunks/1576727e8174d672555b.js +0 -1
  357. package/assets/esri/core/workers/chunks/1a3cbeb0a53d03a51dad.js +0 -1
  358. package/assets/esri/core/workers/chunks/1b8524b617bfc6fe422c.js +0 -1
  359. package/assets/esri/core/workers/chunks/1dc1d750046912ff6cef.js +0 -1
  360. package/assets/esri/core/workers/chunks/21fa174c114640be5e40.js +0 -1
  361. package/assets/esri/core/workers/chunks/2a3f6e56079620421a02.js +0 -1
  362. package/assets/esri/core/workers/chunks/2a5bcc73e55986ad93fe.js +0 -1
  363. package/assets/esri/core/workers/chunks/2a6f2e3d639aae491171.js +0 -1
  364. package/assets/esri/core/workers/chunks/2c17d1bad17bcee53f7d.js +0 -1
  365. package/assets/esri/core/workers/chunks/2cea27a0d07aa9a88ad4.js +0 -1
  366. package/assets/esri/core/workers/chunks/2e193d97d199b29b00c2.js +0 -1
  367. package/assets/esri/core/workers/chunks/2eb41fdf0d0a3b0c3232.js +0 -1
  368. package/assets/esri/core/workers/chunks/2f09ea639ca5d1d6ca7e.js +0 -1
  369. package/assets/esri/core/workers/chunks/2fb847ab1440bd1bdf15.js +0 -1
  370. package/assets/esri/core/workers/chunks/402d22ebbae608760b4f.js +0 -1
  371. package/assets/esri/core/workers/chunks/44daef7f0cbc6f6af09f.js +0 -1
  372. package/assets/esri/core/workers/chunks/46899156159e398c693f.js +0 -1
  373. package/assets/esri/core/workers/chunks/46bf8921db25845c63c0.js +0 -1
  374. package/assets/esri/core/workers/chunks/4eb23554e375350f73b5.js +0 -1
  375. package/assets/esri/core/workers/chunks/551917be63a513dfa4de.js +0 -1
  376. package/assets/esri/core/workers/chunks/564f6f5484bcb13ebb2b.js +0 -1
  377. package/assets/esri/core/workers/chunks/61df67ae47b7fb5875d9.js +0 -1
  378. package/assets/esri/core/workers/chunks/62642a8fc7bafe339984.js +0 -1
  379. package/assets/esri/core/workers/chunks/6304f4e53027df04eb8f.js +0 -1
  380. package/assets/esri/core/workers/chunks/6331987617ad166ea098.js +0 -1
  381. package/assets/esri/core/workers/chunks/6b13fcbc71c0088d317e.js +0 -1
  382. package/assets/esri/core/workers/chunks/6f7a6841e7269d2764ad.js +0 -1
  383. package/assets/esri/core/workers/chunks/70110efd2de23d9a5263.js +0 -1
  384. package/assets/esri/core/workers/chunks/7eae3f0588cde44fce39.js +0 -1
  385. package/assets/esri/core/workers/chunks/80d3c7a429c6412f1a8d.js +0 -1
  386. package/assets/esri/core/workers/chunks/80deebdf54bea04a0889.js +0 -1
  387. package/assets/esri/core/workers/chunks/81aa5fe7dcb4fdeb0974.js +0 -1
  388. package/assets/esri/core/workers/chunks/840d08b41913cad4df89.js +0 -1
  389. package/assets/esri/core/workers/chunks/85d154aeb511c5d70bb1.js +0 -1
  390. package/assets/esri/core/workers/chunks/8681e99e2bc9ece61c43.js +0 -1
  391. package/assets/esri/core/workers/chunks/8e5ef967f6518f4c93b1.js +0 -1
  392. package/assets/esri/core/workers/chunks/8edd7f70c8b95c34125c.js +0 -1
  393. package/assets/esri/core/workers/chunks/9044a7b90a53312b6392.js +0 -1
  394. package/assets/esri/core/workers/chunks/905b4dfc1ce57a225fa4.js +0 -1
  395. package/assets/esri/core/workers/chunks/945f90b31ebfae623ea0.js +0 -1
  396. package/assets/esri/core/workers/chunks/9943fd69b67cd1871d68.js +0 -1
  397. package/assets/esri/core/workers/chunks/9ad91c23480ffb656030.js +0 -1
  398. package/assets/esri/core/workers/chunks/9d103681372ab01a4147.js +0 -1
  399. package/assets/esri/core/workers/chunks/9d3230f59b4c4d1b2713.js +0 -1
  400. package/assets/esri/core/workers/chunks/9db75bc0980d16b730a1.js +0 -1
  401. package/assets/esri/core/workers/chunks/a0659b8bdc067da7badd.js +0 -1
  402. package/assets/esri/core/workers/chunks/a480ee9a994410177961.js +0 -1
  403. package/assets/esri/core/workers/chunks/a9b279975d7df0f295d7.js +0 -1
  404. package/assets/esri/core/workers/chunks/aa3abaa5ad4a5a3bcb84.js +0 -1
  405. package/assets/esri/core/workers/chunks/aa8e607f908297786675.js +0 -1
  406. package/assets/esri/core/workers/chunks/ab5a302b5f62d38293f9.js +0 -1
  407. package/assets/esri/core/workers/chunks/abd6a84396e0eb3f01ad.js +0 -1
  408. package/assets/esri/core/workers/chunks/abe9f8516b03a3fb0477.js +0 -1
  409. package/assets/esri/core/workers/chunks/aff6aa5c7f75f8e052d9.js +0 -1
  410. package/assets/esri/core/workers/chunks/b601cc5304b132536239.js +0 -1
  411. package/assets/esri/core/workers/chunks/b85f614ddbddd3c3007e.js +0 -1
  412. package/assets/esri/core/workers/chunks/b944f4ab25a691b3e611.js +0 -1
  413. package/assets/esri/core/workers/chunks/bbdacddb61e651ca0098.js +0 -1
  414. package/assets/esri/core/workers/chunks/c2fa728e805637a1783e.js +0 -1
  415. package/assets/esri/core/workers/chunks/c901f5f85d962254fc2c.js +0 -1
  416. package/assets/esri/core/workers/chunks/ca173b908d89a4e334f6.js +0 -1
  417. package/assets/esri/core/workers/chunks/cc2ef3bfa1f614d7452c.js +0 -1
  418. package/assets/esri/core/workers/chunks/cdb32a9ac9f5804c4212.js +0 -1
  419. package/assets/esri/core/workers/chunks/ce9a4997973da80141a5.js +0 -1
  420. package/assets/esri/core/workers/chunks/d0674b50a358d3bb9db2.js +0 -1
  421. package/assets/esri/core/workers/chunks/d18b7b4b3b9bea7204b0.js +0 -1
  422. package/assets/esri/core/workers/chunks/d2ce983f7babdf18a0ed.js +0 -1
  423. package/assets/esri/core/workers/chunks/d38a0d867dc6cecdc551.js +0 -1
  424. package/assets/esri/core/workers/chunks/e39ca33e9e463c1d6060.js +0 -1
  425. package/assets/esri/core/workers/chunks/e471d103205018a5cf7f.js +0 -1
  426. package/assets/esri/core/workers/chunks/e542fb044fc96f7e8af2.js +0 -1
  427. package/assets/esri/core/workers/chunks/e94e00a28591337b2def.js +0 -1
  428. package/assets/esri/core/workers/chunks/eb2709ccbc001f42ac1b.js +0 -1
  429. package/assets/esri/core/workers/chunks/f905511ca5f9b59fc17f.js +0 -1
  430. package/assets/esri/core/workers/chunks/f910e80dd87727af5184.js +0 -1
  431. package/assets/esri/core/workers/chunks/f9300a24305b0af1d227.js +0 -1
  432. package/assets/esri/core/workers/chunks/fa1e1ac5b3ef7bdf8a78.js +0 -1
  433. package/assets/esri/core/workers/chunks/fce76a84c7d25d8d47e8.js +0 -1
  434. package/assets/esri/core/workers/chunks/fef4f97fbe861a1b60e8.js +0 -1
  435. package/layers/AreaMeasurementLayer.d.ts +0 -4
  436. package/layers/DirectLineMeasurementLayer.d.ts +0 -4
  437. package/symbols/support/symbolPreview.d.ts +0 -4
  438. package/symbols/support/symbolPreview.js +0 -5
  439. package/views/3d/layers/AreaMeasurementLayerView3D.d.ts +0 -4
  440. package/views/3d/layers/DirectLineMeasurementLayerView3D.d.ts +0 -4
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5877,5235,2515,999],{28924:(e,t,r)=>{r.d(t,{Z:()=>s});var i=r(95330);class s{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,r){this._layerById[t]=r,this._layerByName[e]=r}featureSetByName(e,t=!0,r=["*"]){return void 0===this._layerByName[e]?this.resolvePromise(null):this.resolvePromise(this._layerByName[e])}featureSetById(e,t=!0,r=["*"]){return void 0===this._layerById[e]?this.resolvePromise(null):this.resolvePromise(this._layerById[e])}castToText(){return"object, FeatureSetCollection"}resolvePromise(e){return(0,i.DB)(e)}}},50954:(e,t,r)=>{r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>H,constructFeatureSet:()=>z,constructFeatureSetFromPortalItem:()=>ae,constructFeatureSetFromRelationship:()=>X,constructFeatureSetFromUrl:()=>J,convertToFeatureSet:()=>ne,createFeatureSetCollectionFromMap:()=>te,createFeatureSetCollectionFromService:()=>re,getPortal:()=>ie,initialiseMetaDataCache:()=>Q,lookupUser:()=>se});var i=r(40330),s=r(3172),n=r(28924),a=r(84328),l=r(38171),o=r(61363),u=r(70409),d=r(85065),h=r(91136),c=r(90961),p=r(3823),f=r(90658),y=r(36515),g=r(95002),_=r(41534);class m{clone(){const e=new m;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,r){const i=new m;i.field=e;const s=_.WhereClause.create(t,r),n=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new Error("Statistic does not have 1 or 0 Parameters");const t=_.WhereClause.create((0,y.XF)(e.parseTree.args.value[0],f.Bj.Standardised,e.parameters),e.fieldsIndex);return{name:e.parseTree.name,expr:t}}return null}(s);if(null===n)throw new Error("Invalid Statistic Function");const a=n.name.toUpperCase().trim();if("MIN"===a){if(i.typeofstat="MIN",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("MAX"===a){if(i.typeofstat="MAX",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("COUNT"===a)i.typeofstat="COUNT",i.workingexpr=n.expr;else if("STDEV"===a){if(i.typeofstat="STDDEV",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("SUM"===a){if(i.typeofstat="SUM",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("MEAN"===a){if(i.typeofstat="AVG",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("AVG"===a){if(i.typeofstat="AVG",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else{if("VAR"!==a)throw new Error("Invalid Statistic Function");if(i.typeofstat="VAR",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}return i}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var w=r(44543),b=r(95330),S=r(82971),F=r(1231),v=r(99514);function I(e){if(!e)return"COUNT";switch(e.toLowerCase()){case"max":return"MAX";case"var":case"variance":return"VAR";case"avg":case"average":case"mean":return"AVG";case"min":return"MIN";case"sum":return"SUM";case"stdev":case"stddev":return"STDDEV";case"count":return"COUNT"}return"COUNT"}class C extends h.Z{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}_getSet(e){return null===this._wset?this._getFilteredSet("",null,null,null,e).then((e=>(this._wset=e,this._wset))):(0,b.DB)(this._wset)}_isInFeatureSet(){return f.dj.InFeatureSet}nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,r=1;const i=this._parent?this._parent.getFieldsIndex():new v.Z([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+r.toString(),r++)}for(const e of this._config.statsfields){const t=new m;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof _.WhereClause?e.expression:_.WhereClause.create(e.expression,i),t.typeofstat=I(e.statistic),this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof _.WhereClause?e.expression:_.WhereClause.create(e.expression,i)};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null}else this.geometryType=f.Qk.point,this.typeIdField="",this.types=null,this.spatialReference=new S.Z({wkid:4326});this.fields=[];const s=new m;s.field=this.nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=_.WhereClause.create(this._parent.objectIdField,this._parent.getFieldsIndex()),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const r=new F.Z;if(t.name=this.nextUniqueName(e),r.name=t.tofieldname,r.alias=r.name,(0,y.y5)(t.expression)){const e=this._parent.getField((0,y.zR)(t.expression,f.Bj.Standardised));if(!e)throw new Error("Field is not present for Aggregation");t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),r.type=e.type}else{r.type=this.convertToEsriFieldType((0,y.DT)(t.expression,this._parent.fields));const e=new F.Z;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new u.yN(e,t.expression)),this._candosimplegroupby=!1}this.fields.push(r)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new u.$X(e));for(let t=0;t<this._decodedStatsfield.length;t++){const r=new F.Z;let i=null;const s=this._decodedStatsfield[t];s.field=this.nextUniqueName(e),s.tofieldname===this.objectIdField&&(this._internalObjectIdField=s.field),r.name=s.tofieldname,r.alias=r.name;const n=null!==s.workingexpr&&(0,y.y5)(s.workingexpr)?(0,y.zR)(s.workingexpr,f.Bj.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(i=this._parent.getField(n),!i)throw new Error("Field is not present for Aggregation");r.type=i.type}else r.type="double";break;case"MIN":case"MAX":if(""!==n){if(i=this._parent.getField(n),!i)throw new Error("Field is not present for Aggregation");r.type=i.type}else r.type="double";break;case"COUNT":r.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(i=this._parent.getField(n),!i))throw new Error("Field is not present for Aggregation");r.type="double"}this.fields.push(r)}}_canDoAggregates(){return(0,b.DB)(!1)}_getFeatures(e,t,r,i){-1!==t&&this._featureCache[t];const s=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,s)?this._expandPagedSet(e,s,0,0,i).then((()=>this._getFeatures(e,t,r,i))):(0,b.DB)("success")}_getFilteredSet(e,t,r,i,s){if(""!==e)return(0,b.DB)(new c.Z([],[],!0,null));let n=null;const l={ordered:!1,nowhereclause:!1};return this._ensureLoaded().then((()=>{if(null!==r)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,y.hq)(r,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,r=null;break}if(null!==i){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===i.scanForField(this._decodedStatsfield[e].tofieldname)){i=null,l.ordered=!1;break}if(null!==i)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===i.scanForField(e.tofieldname)){i=null,l.ordered=!1;break}}return!1===this._candosimplegroupby?(0,b.DB)(!1):this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)})).then((e=>{if(e){let e=null;r&&(e=this._reformulateWhereClauseWithoutGroupByFields(r));let t=null;return i&&(t=this._reformulateOrderClauseWithoutGroupByFields(i)),this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField).then((e=>(this._checkCancelled(s),n=!0===l.nowhereclause?new c.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!0===l.ordered&&e._ordered,this._clonePageDefinition(e.pagesDefinition)):new c.Z(e._candidates.slice(0),e._known.slice(0),!0===l.ordered&&e._ordered,this._clonePageDefinition(e.pagesDefinition)),n)))}let t=this._parent;if(this._adaptedFields.length>0&&(t=new u.Xx({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new d.Z({parentfeatureset:t,orderbyclause:new p.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=t;if(null!==r){let t=null;r&&(t=this._reformulateWhereClauseWithoutGroupByFields(r)),e=new a.Z({parentfeatureset:e,whereclause:t})}n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new d.Z({parentfeatureset:e,orderbyclause:new p.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}))}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,y.bB)(e,t.tofieldname,(0,y.zR)(t.workingexpr,f.Bj.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,y.bB)(e,t.tofieldname,(0,y.zR)(t.expression,f.Bj.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}_refineSetBlock(e,t,r){try{return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?this._expandPagedSet(e,this._maxQuery,0,0,r).then((()=>this._refineSetBlock(e,t,r))):(this._checkCancelled(r),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,(0,b.DB)(e))}catch(e){return(0,b.d1)(e)}}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}_getPhysicalPage(e,t,r){return!0===e.pagesDefinition.aggregatefeaturesetpagedefinition?(0,b.Ue)(((t,i)=>{this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,r,[]).then((e=>{t(e)}),i)})):this._getAgregagtePhysicalPage(e,t,r).then((e=>{for(const t of e){const e={geometry:t.geometry,attributes:{}};for(const r of this._decodedGroupbyfield)e.attributes[r.tofieldname]=t.attributes[r.name];for(const r of this._decodedStatsfield)e.attributes[r.tofieldname]=t.attributes[r.field];this._featureCache[e.attributes[this.objectIdField]]=new l.Z(e)}return e.length}))}_sequentialGetPhysicalItem(e,t,r,i){return(0,b.Ue)(((s,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(r)),!0===e.pagesDefinition.internal.fullyResolved||0===t?s(i.length):this._nextAggregateItem(e,t,r,i,(n=>{null===n?s(i.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,r,i)))}),n)}))}_nextAggregateItem(e,t,r,i,s,n){try{(0,o.Q)(e.pagesDefinition.internal.iterator.next()).then((a=>{if(null===a)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);i.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,s(null)}else e.pagesDefinition.internal.fullyResolved=!0,s(null);else{const l=this._generateAggregateHash(a);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[a],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const r=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return i.push(r),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(r.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[a],id:l},void s(r)}e.pagesDefinition.internal.workingItem.features.push(a)}this._nextAggregateItem(e,t,r,i,s,n)}}),n)}catch(e){n(e)}}_calculateFieldStat(e,t,r){const i=[];for(let r=0;r<e.features.length;r++)if(null!==t.workingexpr){const s=t.workingexpr.calculateValue(e.features[r]);null!==s&&i.push(s)}else i.push(null);switch(t.typeofstat){case"MIN":r.attributes[t.tofieldname]=(0,g.tj)("min",i,-1);break;case"MAX":r.attributes[t.tofieldname]=(0,g.tj)("max",i,-1);break;case"SUM":r.attributes[t.tofieldname]=(0,g.tj)("sum",i,-1);break;case"COUNT":r.attributes[t.tofieldname]=i.length;break;case"VAR":r.attributes[t.tofieldname]=(0,g.tj)("var",i,-1);break;case"STDDEV":r.attributes[t.tofieldname]=(0,g.tj)("stddev",i,-1);break;case"AVG":r.attributes[t.tofieldname]=(0,g.tj)("avg",i,-1)}return!0}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const r of this._decodedGroupbyfield){const i=r.singlefield?e.features[0].attributes[r.singlefield]:r.expression.calculateValue(e.features[0]);t.attributes[r.tofieldname]=i}for(const r of this._decodedStatsfield)this._calculateFieldStat(e,r,t);const r=[];for(let i=0;i<this._decodedStatsfield.length;i++)r.push(this._calculateFieldStat(e,this._decodedStatsfield[i],t));return this._featureCache[t.attributes[this.objectIdField]]=new l.Z({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const r of this._decodedGroupbyfield){const i=r.singlefield?e.attributes[r.singlefield]:r.expression.calculateValue(e);t+=null==i?":":":"+i.toString()}return(0,w.F)(t,w.M.String)}_stat(){return(0,b.DB)({calculated:!1})}getFeatureByObjectId(){return(0,b.DB)(null)}static registerAction(){h.Z._featuresetFunctions.groupby=function(e,t){return new C({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var x=r(53073),D=r(63991),k=r(80692),R=r(33955),T=r(37593),O=r(98732),P=r(78760),N=r(74889),E=r(57444),A=r(58539),j=r(27091),L=r(34599),B=r(33586);class Z extends h.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}convertQueryToLruCacheKey(e){const t=(0,f.hd)(e.toJSON());return(0,w.F)(t,w.M.String)}load(){return null===this._loadPromise&&(this._loadPromise=(0,b.Ue)(((e,t)=>{try{if(!0===this._layer.loaded)return this._initialiseFeatureSet(),void e(this);this._layer.when().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t),this._layer.load()}catch(e){t(e)}}))),this._loadPromise}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._layer.outFields)if(1===this._layer.outFields.length&&"*"===this._layer.outFields[0]);else{const e=[];for(const t of this.fields)if("oid"===t.type)e.push(t);else for(const r of this._layer.outFields)if(r.toLowerCase()===t.name.toLowerCase()){e.push(t);break}this.fields=e}if(null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=f.Bj.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=f.Bj.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=f.Bj.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=f.Bj.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.hasM=this._layer.supportsM,this.hasZ=this._layer.supportsZ,this.typeIdField=this._layer.typeIdField,this.types=this._layer.types}_isInFeatureSet(){return f.dj.InFeatureSet}_refineSetBlock(e){return(0,b.DB)(e)}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,b.DB)(this._wset)}_runDatabaseProbe(e){return(0,b.Ue)(((t,r)=>{try{this._ensureLoaded().then((()=>{try{const i=new E.Z;i.where=e.replace("OBJECTID",this._layer.objectIdField),this._layer.queryObjectIds(i).then((()=>{t(!0)}),(()=>{try{t(!1)}catch(e){r(e)}}))}catch(e){r(e)}}))}catch(e){r(e)}}))}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}pbfSupportedForQuery(e){return!e.outStatistics&&this._layer&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsFormatPBF&&!0===this._layer.capabilities.query.supportsQuantizationEditMode}queryPBF(e){return e.quantizationParameters={mode:"edit"},(0,L.executeQueryPBF)(this._layer.parsedUrl,e,new P.J({})).then((e=>N.default.fromJSON((0,O.cn)(e.data)).unquantize()))}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion?this._layer.gdbVersion:"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title,source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}executeQuery(e,t){const r=new j.Z({url:this._layer.parsedUrl.path}),i="execute"===t&&this.pbfSupportedForQuery(e);let s=null;if(this.recentlyUsedQueries){const n=this.convertQueryToLruCacheKey(e);s=this.recentlyUsedQueries.getFromCache(n),null===s&&(s=!0!==i?r[t](e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(n,s),s=s.catch((e=>{throw this.recentlyUsedQueries.removeFromCache(n),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===s&&(s=!0!==i?r[t](e):this.queryPBF(e)),s}_getFilteredSet(e,t,r,i,s){return this.databaseType().then((n=>{if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,r,i,s);let a="",l=!1;null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=i.constructClause(),l=!0);const o=new E.Z;return o.where=null===r?null===t?"1=1":"":(0,y.zR)(r,n),this._requestStandardised&&(o.sqlFormat="standard"),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e),this.executeQuery(o,"executeForIds").then((e=>(null===e&&(e=[]),this._checkCancelled(s),new c.Z([],e,l,null))))}))}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}_getFilteredSetUsingPaging(e,t,r,i,s){try{let n="",a=!1;return null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=i.constructClause(),a=!0),this.databaseType().then((i=>{let l=null===r?null===t?"1=1":"":(0,y.zR)(r,i);this._layer.definitionExpression&&this._useDefinitionExpression&&(l=""!==l?"(("+this._layer.definitionExpression+") AND ("+l+"))":this._layer.definitionExpression);let o=this._maxQueryRate();const u=this._layer.capabilities.query.maxRecordCount;void 0!==u&&u<o&&(o=u);let d=null;if(!0===this._pageJustIds)d=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:o,resultOffset:0,geometry:null===t?null:t,where:l,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let r=!0;!0===this._removeGeometry&&(r=!1);const i=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]);d=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:i.join(","),resultRecordCount:o,resultOffset:0,geometry:null===t?null:t,where:l,orderByFields:n,returnGeometry:r,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return this._expandPagedSet(d,o,0,1,s).then((()=>d))}))}catch(e){return(0,b.d1)(e)}}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}_getPhysicalPage(e,t,r){try{const t=e.pagesDefinition.internal.lastRetrieved,i=t,s=e.pagesDefinition.internal.lastPage,n=new E.Z;return this._requestStandardised&&(n.sqlFormat="standard"),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,this.executeQuery(n,"execute").then((n=>{if(this._checkCancelled(r),e.pagesDefinition.internal.lastPage!==s)return"done";for(let t=0;t<n.features.length;t++)e.pagesDefinition.internal.set[i+t]=n.features[t].attributes[this._layer.objectIdField];if(!1===this._pageJustIds)for(let e=0;e<n.features.length;e++)this._featureCache[n.features[e].attributes[this._layer.objectIdField]]=n.features[e];return(void 0===n.exceededTransferLimit&&n.features.length!==e.pagesDefinition.resultRecordCount||!1===n.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=t+n.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}))}catch(e){return(0,b.d1)(e)}}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.indexOf("*")>-1)return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}_getFeatures(e,t,r,i){const s=[];try{if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return this._expandPagedSet(e,this._maxProcessingRate(),0,0,i).then((()=>this._getFeatures(e,t,r,i)));let n=0;for(let i=e._lastFetchedIndex;i<e._known.length;i++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[i]]){let r=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[i]]){const s=t._featureMap[e._known[i]];null!==s&&(r=!0,this._featureCache[e._known[i]]=s)}}if(!1===r&&(e._known[i]!==t&&s.push(e._known[i]),s.length>=this._maxProcessingRate()-1))break}if(n>=r&&0===s.length)break}if(0===s.length)return(0,b.DB)("success");try{const e=new E.Z;return this._requestStandardised&&(e.sqlFormat="standard"),e.objectIds=s,e.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]),e.returnGeometry=!0,!0===this._removeGeometry&&(e.returnGeometry=!1),e.outSpatialReference=this.spatialReference,this.executeQuery(e,"execute").then((e=>{if(this._checkCancelled(i),void 0!==e.error)return(0,b.d1)(new Error(e.error));for(let t=0;t<e.features.length;t++)this._featureCache[e.features[t].attributes[this._layer.objectIdField]]=e.features[t];return"success"}))}catch(e){return(0,b.d1)(e)}}catch(e){return(0,b.d1)(e)}}_getDistinctPages(e,t,r,i,s,n,a,l,o){return this._ensureLoaded().then((()=>this.databaseType())).then((u=>{let d=r.parseTree.column;for(let e=0;e<this._layer.fields.length;e++)if(this._layer.fields[e].name.toLowerCase()===d.toLowerCase()){d=this._layer.fields[e].name;break}const h=new E.Z;this._requestStandardised&&(h.sqlFormat="standard");let c=null===n?null===s?"1=1":"":(0,y.zR)(n,u);return this._layer.definitionExpression&&this._useDefinitionExpression&&(c=""!==c?"(("+this._layer.definitionExpression+") AND ("+c+"))":this._layer.definitionExpression),h.where=c,h.spatialRelationship=this._makeRelationshipEnum(i),h.relationParameter=this._makeRelationshipParam(i),h.geometry=null===s?null:s,h.returnDistinctValues=!0,h.returnGeometry=!1,h.outFields=[d],this.executeQuery(h,"execute").then((u=>{if(this._checkCancelled(o),!u.hasOwnProperty("features"))return(0,b.d1)(new Error("Unnexected Result querying statistics from layer"));let h=!1;for(let e=0;e<this._layer.fields.length;e++)if(this._layer.fields[e].name===d){"date"===this._layer.fields[e].type&&(h=!0);break}for(let e=0;e<u.features.length;e++){if(h){const t=u.features[e].attributes[d];null!==t?l.push(new Date(t)):l.push(t)}else l.push(u.features[e].attributes[d]);if(l.length>=a)break}return 0===u.features.length?l:u.features.length===this._layer.capabilities.query.maxRecordCount&&l.length<a?this._getDistinctPages(e+u.features.length,t,r,i,s,n,a,l,o).then((e=>({calculated:!0,result:e}))):l}))}))}_distinctStat(e,t,r,i,s,n,a){return this._getDistinctPages(0,e,t,r,i,s,n,[],a).then((e=>({calculated:!0,result:e})))}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType}_countstat(e,t,r,i){return this.databaseType().then((e=>{const s=new E.Z;if(this._requestStandardised&&(s.sqlFormat="standard"),this.isTable()&&r&&null!==t&&""!==t)return{calculated:!0,result:0};let n=null===i?null===r?"1=1":"":(0,y.zR)(i,e);return this._layer.definitionExpression&&this._useDefinitionExpression&&(n=""!==n?"(("+this._layer.definitionExpression+") AND ("+n+"))":this._layer.definitionExpression),s.where=n,s.where=n,s.spatialRelationship=this._makeRelationshipEnum(t),s.relationParameter=this._makeRelationshipParam(t),s.geometry=null===r?null:r,s.returnGeometry=!1,this.executeQuery(s,"executeForCount").then((e=>({calculated:!0,result:e})))}))}_stats(e,t,r,i,s,n,a){return this._ensureLoaded().then((()=>{const l=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression,o=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics,u=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsDistinct;return"count"===e?u?this._countstat(e,r,i,s):{calculated:!1}:!1===o||!1===(0,y.y5)(t)&&!1===l||!1===t.isStandardized?""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):"distinct"===e?!1===u?""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,r,i,s,n,a):this.databaseType().then((n=>{if(this.isTable()&&i&&null!==r&&""!==r)return{calculated:!0,result:null};const a=new E.Z;this._requestStandardised&&(a.sqlFormat="standard");let l=null===s?null===i?"1=1":"":(0,y.zR)(s,n);this._layer.definitionExpression&&this._useDefinitionExpression&&(l=""!==l?"(("+this._layer.definitionExpression+") AND ("+l+"))":this._layer.definitionExpression),a.where=l,a.spatialRelationship=this._makeRelationshipEnum(r),a.relationParameter=this._makeRelationshipParam(r),a.geometry=null===i?null:i;const o=new A.Z;o.statisticType=(0,g.g3)(e),o.onStatisticField=(0,y.zR)(t,n),o.outStatisticFieldName="ARCADE_STAT_RESULT",a.returnGeometry=!1;let u="ARCADE_STAT_RESULT";return a.outStatistics=[o],this.executeQuery(a,"execute").then((e=>{if(!e.hasOwnProperty("features")||0===e.features.length)return(0,b.d1)(new Error("Unnexected Result querying statistics from layer"));let t=!1;for(let r=0;r<e.fields.length;r++)if("ARCADE_STAT_RESULT"===e.fields[r].name.toUpperCase()){u=e.fields[r].name,"date"===e.fields[r].type&&(t=!0);break}if(t){let t=e.features[0].attributes[u];return null!==t&&(t=new Date(e.features[0].attributes[u])),{calculated:!0,result:t}}return{calculated:!0,result:e.features[0].attributes[u]}}))}))}))}_stat(e,t,r,i,s,n,a){return this._stats(e,t,r,i,s,n,a)}_canDoAggregates(e,t){return this._ensureLoaded().then((()=>{let e=!1;const r=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression;if(void 0!==this._layer.capabilities&&null!==this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics&&!0===this._layer.capabilities.query.supportsOrderBy&&(e=!0),e)for(let i=0;i<t.length-1;i++)null!==t[i].workingexpr&&(!1===t[i].workingexpr.isStandardized||!1===(0,y.y5)(t[i].workingexpr)&&!1===r)&&(e=!1);return!1!==e}))}_makeRelationshipEnum(e){if(e.indexOf("esriSpatialRelRelation")>=0)return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.indexOf("esriSpatialRelRelation")>=0?e.split(":")[1]:""}_getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,a){return this._ensureLoaded().then((()=>this.databaseType())).then((l=>{let o="",u=!1,d=!1;null!==n&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(o=n.constructClause(),d=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(d=!1,u=!0,o=this._layer.objectIdField);const h=[];for(let e=0;e<t.length;e++){const r=new A.Z;r.onStatisticField=null!==t[e].workingexpr?(0,y.zR)(t[e].workingexpr,l):"",r.outStatisticFieldName=t[e].field,r.statisticType=t[e].toStatisticsName(),h.push(r)}""===o&&(o=e.join(","));let p=this._maxQueryRate();const f=this._layer.capabilities.query.maxRecordCount;void 0!==f&&f<p&&(p=f);let g=null===s?null===i?"1=1":"":(0,y.zR)(s,l);return this._layer.definitionExpression&&this._useDefinitionExpression&&(g=""!==g?"(("+this._layer.definitionExpression+") AND ("+g+"))":this._layer.definitionExpression),new c.Z([],["GETPAGES"],d,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(r),relationParam:this._makeRelationshipParam(r),outFields:["*"],useOIDpagination:u,generatedOid:a,resultRecordCount:p,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:h,geometry:null===i?null:i,where:g,orderByFields:o,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}))}_getAgregagtePhysicalPage(e,t,r){try{let t=e.pagesDefinition.where;!0===e.pagesDefinition.useOIDpagination&&(t=""!==t?"("+t+") AND ("+e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString()+")":e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString());const i=e.pagesDefinition.internal.lastRetrieved,s=i,n=e.pagesDefinition.internal.lastPage,a=new E.Z;return this._requestStandardised&&(a.sqlFormat="standard"),a.where=t,a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields,a.outStatistics=e.pagesDefinition.outStatistics,a.geometry=e.pagesDefinition.geometry,a.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.returnGeometry=e.pagesDefinition.returnGeometry,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&a.geometry&&a.spatialRelationship?(0,b.DB)([]):this.executeQuery(a,"execute").then((t=>{if(this._checkCancelled(r),!t.hasOwnProperty("features"))return(0,b.d1)(new Error("Unnexected Result querying aggregates from layer"));const a=[];if(e.pagesDefinition.internal.lastPage!==n)return[];for(let r=0;r<t.features.length;r++)e.pagesDefinition.internal.set[s+r]=t.features[r].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<t.features.length;e++)a.push(new l.Z({attributes:t.features[e].attributes,geometry:null}));return!0===e.pagesDefinition.useOIDpagination?0===t.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=t.features[t.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===t.exceededTransferLimit&&t.features.length!==e.pagesDefinition.resultRecordCount||!1===t.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=i+t.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,a}))}catch(e){return(0,b.d1)(e)}}static create(e,t,r,i,s){const n=new T.default({url:e,outFields:null===t?["*"]:t});return new Z({layer:n,spatialReference:r,lrucache:i,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON&&this._layer.source.sourceJSON.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,f.US)(this._layer.parsedUrl.path)}queryAttachments(e,t,r,i,s){if(this._layer.capabilities.data.supportsAttachment&&this._layer.capabilities.operations.supportsQueryAttachments){const n={objectIds:[e],returnMetadata:s};return(t&&t>0||r&&r>0)&&(n.size=[t&&t>0?t:0,r&&r>0?r:t+1]),i&&i.length>0&&(n.attachmentTypes=i),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:n,method:"attachments"}),this._layer.queryAttachments(n).then((t=>{const r=[];return t&&t[e]&&t[e].forEach((t=>{const i=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let n=null;s&&t.exifInfo&&(n=B.Z.convertJsonToArcade(t.exifInfo,!0)),r.push(new k.Z(t.id,t.name,t.contentType,t.size,i,n))})),r}))}return(0,b.DB)([])}queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields.join(","),returnGeometry:e.returnGeometry.toString()};return void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=JSON.stringify(e.outSpatialReference.toJSON())),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"}),(0,s.default)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t}).then((e=>{if(e.data){const t={},r=e.data;if(r&&r.relatedRecordGroups){const e=r.spatialReference;for(const i of r.relatedRecordGroups){const s=i.objectId,n=[];for(const t of i.relatedRecords){t.geometry&&(t.geometry.spatialReference=e);const r=new l.Z({geometry:t.geometry?(0,R.im)(t.geometry):null,attributes:t.attributes});n.push(r)}t[s]={features:n,exceededTransferLimit:!0===r.exceededTransferLimit}}}return t}return(0,b.d1)("Invalid Request")}))}getFeatureByObjectId(e,t){const r=new j.Z({url:this._layer.parsedUrl.path}),i=new E.Z;return i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=this.objectIdField+"="+e.toString(),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"}),r.execute(i).then((e=>1===e.features.length?e.features[0]:null))}getIdentityUser(){return this.load().then((()=>{var e;const t=null==(e=i.id)?void 0:e.findCredential(this._layer.url);return t?t.userId:null}))}getOwningSystemUrl(){return this.load().then((()=>{var e;const t=null==(e=i.id)?void 0:e.findServerInfo(this._layer.url);if(t)return(0,b.DB)(t.owningSystemUrl);let r=this._layer.url;const n=r.toLowerCase().indexOf("/rest/services");return r=n>-1?r.substring(0,n):r,r?(r+="/rest/info",(0,b.Ue)(((e,t)=>{(0,s.default)(r,{query:{f:"json"}}).then((t=>{let r="";t.data&&t.data.owningSystemUrl&&(r=t.data.owningSystemUrl),e(r)}),(t=>{e("")}))}))):(0,b.DB)("")}))}getDataSourceFeatureSet(){const e=new Z({layer:this._layer,spatialReference:this.spatialReference,outFields:this._overrideFields,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries,interceptor:this.featureSetQueryInterceptor});return e._useDefinitionExpression=!1,e}}var q=r(17805),U=r(75935);class G extends h.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,this.relatedLayer=null,this.relationship=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this.relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(){}load(){return null===this._loadPromise&&(this._loadPromise=(0,b.Ue)(((e,t)=>{(0,b.$6)([this._layer.load(),this.relatedLayer.load()]).then((()=>{this._initialiseFeatureSet(),e(this)}),t)}))),this._loadPromise}nativeCapabilities(){return this.relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this.relatedLayer.geometryType,this.fields=this.relatedLayer.fields.slice(0),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this.relatedLayer.objectIdField,this.globalIdField=this.relatedLayer.globalIdField,this.hasM=this.relatedLayer.supportsM,this.hasZ=this.relatedLayer.supportsZ,this.typeIdField=this.relatedLayer.typeIdField,this.types=this.relatedLayer.types}databaseType(){return this.relatedLayer.databaseType().then((()=>(this._databaseType=this.relatedLayer._databaseType,this._databaseType)))}isTable(){return this.relatedLayer.isTable()}_isInFeatureSet(){return f.dj.InFeatureSet}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,b.DB)(this._wset)}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new l.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_getFilteredSet(e,t,r,i,s){return this.databaseType().then((()=>{if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new c.Z([],[],!0,null);if(n.capabilities.queryRelated&&n.capabilities.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,r,i,s);let a="",l=!1;null!==i&&n.capabilities&&n.capabilities.queryRelated&&!0===n.capabilities.queryRelated.supportsOrderBy&&(a=i.constructClause(),l=!0);const o=new U.Z;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this.relatedLayer.fields?this.relatedLayer.fields.map((e=>e.name)):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let d=!0;return!0===this._removeGeometry&&(d=!1),o.returnGeometry=d,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,n.source.queryRelatedFeatures(o).then((i=>{this._checkCancelled(s);const n=i[this._findObjectId]?i[this._findObjectId].features:[],a=[];for(let e=0;e<n.length;e++)this._featureCache[n[e].attributes[this._layer.objectIdField]]=n[e],a.push(n[e].attributes[this._layer.objectIdField]);const o=t&&null!==e&&""!==e,u=null!=r;return new c.Z(o||u?a:[],o||u?[]:a,l,null)}))}))}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.indexOf("*")>-1)return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}_getFilteredSetUsingPaging(e,t,r,i,s){try{let n="",a=!1;const l=this._layer.nativeCapabilities();return null!==i&&l&&l.capabilities.queryRelated&&!0===l.capabilities.queryRelated.supportsOrderBy&&(n=i.constructClause(),a=!0),this.databaseType().then((()=>{let i=this._maxQueryRate();const o=l.capabilities.query.maxRecordCount;void 0!==o&&o<i&&(i=o);const u=t&&null!==e&&""!==e,d=null!=r;let h=null,p=!0;!0===this._removeGeometry&&(p=!1);const f=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this.relatedLayer.fields?this.relatedLayer.fields.map((e=>e.name)):["*"]);return h=new c.Z(u||d?["GETPAGES"]:[],u||d?[]:["GETPAGES"],a,{outFields:f.join(","),resultRecordCount:i,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),this._expandPagedSet(h,i,0,0,s).then((()=>h))}))}catch(e){return(0,b.d1)(e)}}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}_getPhysicalPage(e,t,r){try{const t=e.pagesDefinition.internal.lastRetrieved,i=t,s=e.pagesDefinition.internal.lastPage,n=this._layer.nativeCapabilities(),a=new U.Z;return!0===this._requestStandardised&&(a.sqlFormat="standard"),a.relationshipId=this.relationship.id,a.objectIds=e.pagesDefinition.objectIds,a.resultOffset=e.pagesDefinition.internal.lastPage,a.resultRecordCount=e.pagesDefinition.resultRecordCount,a.outFields=e.pagesDefinition.outFields.split(","),a.where=e.pagesDefinition.where,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference,n.source.queryRelatedFeatures(a).then((n=>{if(this._checkCancelled(r),e.pagesDefinition.internal.lastPage!==s)return 0;const a=n[this._findObjectId]?n[this._findObjectId].features:[];for(let t=0;t<a.length;t++)e.pagesDefinition.internal.set[i+t]=a[t].attributes[this._layer.objectIdField];for(let e=0;e<a.length;e++)this._featureCache[a[e].attributes[this._layer.objectIdField]]=a[e];const l=!n[this._findObjectId]||!1===n[this._findObjectId].exceededTransferLimit;return a.length!==e.pagesDefinition.resultRecordCount&&l&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=t+a.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,a.length}))}catch(e){return(0,b.d1)(e)}}_getFeatures(e,t,r,i){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return this._expandPagedSet(e,n,0,0,i).then((()=>this._getFeatures(e,t,r,i)));let a=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(a++,a<=r&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[i]&&void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&s.push(e._known[i]),s.length>r)))&&!(a>=r&&0===s.length);i++);return 0===s.length?(0,b.DB)("success"):(0,b.d1)(new Error("Unaccounted for Features. Not in Feature Collection"))}_refineSetBlock(e,t,r){return(0,b.DB)(e)}_stat(e,t,r,i,s,n,a){return(0,b.DB)({calculated:!1})}get gdbVersion(){return this.relatedLayer.gdbVersion}_canDoAggregates(e,t,r,i,s){return(0,b.DB)(!1)}relationshipMetaData(){return this.relatedLayer.relationshipMetaData()}serviceUrl(){return this.relatedLayer.serviceUrl()}queryAttachments(e,t,r,i,s){return this.relatedLayer.queryAttachments(e,t,r,i,s)}getFeatureByObjectId(e,t){return this.relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this.relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this.relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this.relatedLayer}}var W=r(48039),M=r(65587),V=r(15235);function Q(){null===W.Z.applicationCache&&(W.Z.applicationCache=new W.Z)}function K(e,t){if(W.Z.applicationCache){const r=W.Z.applicationCache.getLayerInfo(e);if(r)return r.then((r=>(0,b.DB)(new T.default({url:e,outFields:t,sourceJSON:r}))));const i=new T.default({url:e,outFields:t});let s=(0,b.Ue)(((e,t)=>{i.load().then((()=>{e(i.sourceJSON)}),(e=>{t(e)}))}));return W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(e,s),s=s.catch((t=>{throw W.Z.applicationCache.clearLayerInfo(e),t}))),s.then((()=>(0,b.DB)(i)))}return(0,b.DB)(new T.default({url:e,outFields:t}))}function J(e,t,r,i,s,n=null){return K(e,["*"]).then((e=>(0,b.DB)(z(e,t,r,i,s,n))))}function z(e,t=null,r=null,i=!0,s=null,n=null){return!0===e._hasMemorySource()?new q.Z({layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:s,interceptor:n}):new Z({layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:s,interceptor:n})}function $(e){if(null!==W.Z.applicationCache){const t=W.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}let t=(0,s.default)(e,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return t.layers||(t.layers=[]),t.tables||(t.tables=[]),(0,b.DB)(t)}return(0,b.DB)({layers:[],tables:[]})}));return null!==W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(e,t),t=t.catch((t=>{throw W.Z.applicationCache.clearLayerInfo(e),t}))),t}function H(e,t){const r={metadata:null,networkId:-1,unVersion:3,terminals:[],queryelem:null,layerNameLkp:{},lkp:null};return $(e).then((i=>{if(r.metadata=i,i.controllerDatasetLayers&&void 0!==i.controllerDatasetLayers.utilityNetworkLayerId&&null!==i.controllerDatasetLayers.utilityNetworkLayerId){if(i.layers)for(const e of i.layers)r.layerNameLkp[e.id]=e.name;if(i.tables)for(const e of i.tables)r.layerNameLkp[e.id]=e.name;const n=i.controllerDatasetLayers.utilityNetworkLayerId;return r.networkId=n,function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==W.Z.applicationCache){const e=W.Z.applicationCache.getLayerInfo(r);if(null!==e)return e}let i=(0,s.default)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}}).then((e=>{if(e.data){const t=e.data;if(t.layerDataElements&&t.layerDataElements[0])return t.layerDataElements[0]}throw new Error("Not Found")}));return null!==W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(r,i),i=i.catch((e=>{throw W.Z.applicationCache.clearLayerInfo(r),e}))),i}(e,n).then((i=>{if(i){r.queryelem=i,r.queryelem&&r.queryelem.dataElement&&void 0!==r.queryelem.dataElement.schemaGeneration&&(r.unVersion=r.queryelem.dataElement.schemaGeneration),r.lkp={},r.queryelem.dataElement.domainNetworks||(r.queryelem.dataElement.domainNetworks=[]);for(const e of r.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources?e.edgeSources:[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]?r.layerNameLkp[t.layerId]:null};e.className&&(r.lkp[e.className]=e)}for(const t of e.junctionSources?e.junctionSources:[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]?r.layerNameLkp[t.layerId]:null};e.className&&(r.lkp[e.className]=e)}}if(r.queryelem.dataElement.terminalConfigurations)for(const e of r.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)r.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});return function(e){if(null!==W.Z.applicationCache){const t=W.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}let t=(0,s.default)(e,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return(0,b.DB)(t)}return(0,b.DB)(null)}));return null!==W.Z.applicationCache&&(W.Z.applicationCache.setLayerInfo(e,t),t=t.catch((t=>{throw W.Z.applicationCache.clearLayerInfo(e),t}))),t}(e+"/"+n).then((i=>{if(i.systemLayers&&void 0!==i.systemLayers.associationsTableId&&null!==i.systemLayers.associationsTableId){const s=[];return r.unVersion>=4&&(s.push("STATUS"),s.push("PERCENTALONG")),J(e+"/"+i.systemLayers.associationsTableId.toString(),t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...s],!1,null,null).then((e=>e.load())).then((e=>r.unVersion>=4?(e=e.filter(_.WhereClause.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62,63)",e.getFieldsIndex()))).load():e)).then((e=>({lkp:r.lkp,associations:e,unVersion:r.unVersion,terminals:r.terminals})))}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[]}}))}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[]}}))}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[]}}))}function X(e,t,r,i=null,s=null,n=!0,a=null,l=null){let o=e.serviceUrl();return o?(o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString(),J(o,i,s,n,a,l).then((o=>new G({layer:e,relatedLayer:o,relationship:t,objectId:r,spatialReference:i,outFields:s,includeGeometry:n,lrucache:a,interceptor:l})))):null}a.Z.registerAction(),C.registerAction(),d.Z.registerAction(),x.Z.registerAction(),D.Z.registerAction();class Y extends n.Z{constructor(e,t=null,r=null,i=null){super(),this._map=e,this._overridespref=t,this.lrucache=r,this.interceptor=i,this._instantLayers=[]}makeAndAddFeatureSet(e,t=!0,r=null){const i=z(e,this._overridespref,null===r?["*"]:r,t,this.lrucache,this.interceptor);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}featureSetByName(e,t=!0,r=null){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return this._map.load().then((()=>{try{return this.featureSetByName(e,t,r)}catch(e){return(0,b.d1)(e)}}));null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===i)return this.resolvePromise(this._instantLayers[r].featureset)}const s=this._map.layers.find((t=>t instanceof T.default&&t.title===e));if(s)return this.resolvePromise(this.makeAndAddFeatureSet(s,t,r));if(this._map.tables){const i=this._map.tables.find((t=>!!(t.title&&t.title===e||t.title&&t.title===e)));if(i){if(i instanceof T.default)return this.resolvePromise(this.makeAndAddFeatureSet(i,t,r));if(i._materializedTable);else{const e=i.outFields?i:{...i,outFields:["*"]};i._materializedTable=new T.default(e)}return i._materializedTable.load().then((()=>this.resolvePromise(this.makeAndAddFeatureSet(i._materializedTable,t,r))))}}return this.resolvePromise(null)}featureSetById(e,t=!0,r=["*"]){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return this._map.load().then((()=>{try{return this.featureSetById(e,t,r)}catch(e){return(0,b.d1)(e)}}));null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===i)return this.resolvePromise(this._instantLayers[r].featureset)}const s=this._map.layers.find((t=>t instanceof T.default&&t.id===e));if(s)return this.resolvePromise(this.makeAndAddFeatureSet(s,t,r));if(this._map.tables){const i=this._map.tables.find((t=>t.id===e));if(i){if(i instanceof T.default)return this.resolvePromise(this.makeAndAddFeatureSet(i,t,r));if(i._materializedTable);else{const e={...i,outFields:["*"]};i._materializedTable=new T.default(e)}return i._materializedTable.load().then((()=>this.resolvePromise(this.makeAndAddFeatureSet(i._materializedTable,t,r))))}}return this.resolvePromise(null)}}class ee extends n.Z{constructor(e,t=null,r=null,i=null){super(),this._url=e,this._overridespref=t,this.lrucache=r,this.interceptor=i,this.metadata=null,this._instantLayers=[]}get url(){return this._url}makeAndAddFeatureSet(e,t=!0,r=null){const i=z(e,this._overridespref,null===r?["*"]:r,t,this.lrucache);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}_loadMetaData(){return $(this._url).then((e=>(this.metadata=e,e)))}load(){return this._loadMetaData()}clone(){return new ee(this._url,this._overridespref,this.lrucache,this.interceptor)}featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===i)return this.resolvePromise(this._instantLayers[r].featureset)}return this._loadMetaData().then((i=>{let s=null;for(const t of i.layers?i.layers:[])t.name===e&&(s=t);if(!s)for(const t of i.tables?i.tables:[])t.name===e&&(s=t);return s?K(this._url+"/"+s.id,["*"]).then((e=>this.makeAndAddFeatureSet(e,t,r))):this.resolvePromise(null)}))}featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===i)return this.resolvePromise(this._instantLayers[r].featureset)}return this._loadMetaData().then((i=>{let s=null;for(const t of i.layers?i.layers:[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of i.tables?i.tables:[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);return s?K(this._url+"/"+s.id,["*"]).then((e=>this.makeAndAddFeatureSet(e,t,r))):this.resolvePromise(null)}))}}function te(e,t,r=null,i=null){return new Y(e,t,r,i)}function re(e,t,r=null,i=null){return new ee(e,t,r,i)}function ie(e,t){return null===e?t:new M.Z({url:e.field("url")})}function se(e,t,r){return i.id.findCredential(e.restUrl)?"loaded"===e.loadStatus&&""===t&&e.user&&e.user.sourceJSON&&!1===r?(0,b.DB)(e.user.sourceJSON):""===t?(0,s.default)(e.restUrl+"/community/self",{responseType:"json",query:{f:"json",...!1===r?{}:{returnUserLicenseTypeExtensions:!0}}}).then((e=>{if(e.data){const t=e.data;if(t&&t.username)return(0,b.DB)(t)}return(0,b.DB)(null)})):(0,s.default)(e.restUrl+"/community/users/"+t,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return t.error?null:(0,b.DB)(t)}return(0,b.DB)(null)})):(0,b.DB)(null)}function ne(e,t,r,i,s){if(null===e)return null;if(e instanceof T.default){switch(t){case"datasource":return z(e,s,e.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return z(e,s,e.outFields,!0,r,i)}return null}if(e instanceof h.Z)switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}function ae(e,t,r,i,s,n,a,l=null){if(W.Z.applicationCache){const o=W.Z.applicationCache.getLayerInfo(e+":"+n.url);if(o)return o.then((e=>{try{const n=new T.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]});return(0,b.DB)(z(n,r,i,s,a,l))}catch(e){return(0,b.d1)(e)}}),(e=>(0,b.d1)(e)))}return(0,b.Ue)(((o,u)=>{const d=new V.default({id:e,portal:n}).load();W.Z.applicationCache&&W.Z.applicationCache.setLayerInfo(e+":"+n.url,d),d.then((e=>{try{const n=new T.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]});o(z(n,r,i,s,a,l))}catch(e){u(e)}}),(t=>{W.Z.applicationCache&&W.Z.applicationCache.clearLayerInfo(e+":"+n.url),u(t)}))}))}},70409:(e,t,r)=>{r.d(t,{Xx:()=>_,QP:()=>f,$X:()=>p,yN:()=>g,TO:()=>y});var i=r(38171),s=r(77286),n=r(91136),a=r(90961),l=r(90658),o=r(36515),u=r(95330),d=r(41534),h=r(82971);class c{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class p extends c{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class f extends c{constructor(e,t,r){super((0,l.JW)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=r}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,o.bB)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class y extends c{constructor(e,t,r){super(e),this.codefield=t,this.lkp=r,this.reverseLkp={};for(const e in r)this.reverseLkp[r[e]]=e;this.sqlRewritable=!0}rewriteSql(e,t){const r=this.evaluateNodeToWhereClause(e.parseTree,l.Bj.Standardised,this.field.name,this.codefield instanceof d.WhereClause?(0,o.zR)(this.codefield,l.Bj.Standardised):this.codefield,e.parameters);return r.indexOf(y.BADNESS)>=0?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:d.WhereClause.create(r,t._parent.getFieldsIndex())}}evaluateNodeToWhereClause(e,t,r=null,i=null,s){let n,a,l,u;switch(e.type){case"interval":return(0,o.TE)(this.evaluateNodeToWhereClause(e.value,t,r,i,s),e.qualifier,e.op);case"case_expression":{let i=" CASE ";"simple"===e.format&&(i+=this.evaluateNodeToWhereClause(e.operand,t,r,y.BADNESS,s));for(let n=0;n<e.clauses.length;n++)i+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[n].operand,t,r,y.BADNESS,s)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[n].value,t,r,y.BADNESS,s);return null!==e.else&&(i+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,r,y.BADNESS,s)),i+=" END ",i}case"param":{const r=s[e.value.toLowerCase()];if("string"==typeof r)return"'"+s[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(r instanceof Date)return(0,o.oX)(r,t);if(r instanceof Array){const e=[];for(let i=0;i<r.length;i++)"string"==typeof r[i]?e.push("'"+r[i].toString().replace(/'/g,"''")+"'"):r[i]instanceof Date?e.push((0,o.oX)(r[i],t)):e.push(r[i].toString());return e}return r.toString()}case"expr_list":a=[];for(const n of e.value)a.push(this.evaluateNodeToWhereClause(n,t,r,i,s));return a;case"unary_expr":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,r,y.BADNESS,s)+" ) ";case"binary_expr":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" AND "+this.evaluateNodeToWhereClause(e.right,t,r,i,s)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" OR "+this.evaluateNodeToWhereClause(e.right,t,r,i,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IS NOT NULL )";case"IN":if(n=[],"expr_list"===e.right.type){if("column_ref"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,r,i,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+n.join(",")+")) "}return u=this.evaluateNodeToWhereClause(e.right,t,r,i,s),u instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+u.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+u+")) ";case"NOT IN":if(n=[],"expr_list"===e.right.type){if("column_ref"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,r,i,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+n.join(",")+")) "}return u=this.evaluateNodeToWhereClause(e.right,t,r,i,s),u instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+u.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+u+")) ";case"BETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+") ";case"<>":case"=":if("column_ref"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+i+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column_ref"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+i+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"bool":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return(0,o.oX)(e.value,t);case"number":return e.value.toString();case"current_time":return(0,o.vR)("date"===e.mode,t);case"column_ref":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+i+")":e.column;case"function":{const i=this.evaluateNodeToWhereClause(e.args,t,r,y.BADNESS,s);return(0,o.fz)(e.name,i,t)}}throw new Error("Unsupported sql syntax "+e.type)}extractValue(e){return this.codefield instanceof d.WhereClause?this.reverseLkp[this.codefield.calculateValueCompiled(e)]:this.reverseLkp[e.attributes[this.codefield]]}}y.BADNESS="_!!!_BAD_LKP_!!!!";class g extends c{constructor(e,t){super(e),this.sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,o.bB)(e,this.field.name,(0,o.zR)(this.sql,l.Bj.Standardised),t.getFieldsIndex())}}extractValue(e){return this.sql.calculateValueCompiled(e)}}class _ extends n.Z{constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=null,this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}static findField(e,t){for(const r of e)if(r.name.toLowerCase()===t.toString().toLowerCase())return r;return null}_initialiseFeatureSet(){null!==this._parent?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new h.Z({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=l.Qk.point,this.typeIdField="",this.types=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._extraFilter?this._getFilteredSet("",null,null,null,e):this._parent._getSet(e))).then((t=>(this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,u.DB)(this._wset)}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,r,n){const l=[];-1!==t&&void 0===this._featureCache[t]&&l.push(t);const o=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,o))return this._expandPagedSet(e,o,0,0,n).then((()=>this._getFeatures(e,t,r,n)));let d=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(d++,d<=r&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&l.push(e._known[i]),l.length>=o)));i++);if(0===l.length)return(0,u.DB)("success");e=new a.Z([],l,e._ordered,null);const h=Math.min(l.length,r);return this._parent._getFeatures(e,-1,h,n).then((()=>{this._checkCancelled(n);const e=[];for(let t=0;t<h;t++){const r=this._parent._featureFromCache(l[t]);void 0!==r&&e.push({geometry:r.geometry,attributes:r.attributes,id:l[t]})}for(const t of e){const e=[];for(const r of this.adaptedFields)e[r.field.name]=r.extractValue(t);this._featureCache[t.id]=new i.Z({attributes:e,geometry:(0,s.r1)(t.geometry)})}return"success"}))}_fetchAndRefineFeatures(){return(0,u.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(e,t,r,i,s){let n=!1;const l=this.reformulateWithoutAdaptions(r);n=l.cannot,r=l.where;let u=!1;if(null!==i){u=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof p)&&!0===i.scanForField(t.field.name)){if(!(t instanceof f)){i=null,u=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}i&&e.length>0&&(i=i.replaceFields(e))}return null!==r?null!==this._extraFilter&&(r=(0,o.$e)(this._extraFilter,r)):r=this._extraFilter,this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,r,i,s))).then((e=>{let t;return this._checkCancelled(s),t=!0===n?new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!0===u&&e._ordered,this._clonePageDefinition(e.pagesDefinition)):new a.Z(e._candidates.slice(0),e._known.slice(0),!0===u&&e._ordered,this._clonePageDefinition(e.pagesDefinition)),t}))}reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const r of this.adaptedFields)if(!0===(0,o.hq)(e,r.field.name)){const i=r.rewriteSql(e,this);if(!0!==i.rewritten){t.cannot=!0,t.where=null;break}t.where=i.where}return t}_stat(e,t,r,i,s,n,a){let l=!1,d=this.reformulateWithoutAdaptions(t);return l=d.cannot,t=d.where,d=this.reformulateWithoutAdaptions(s),l=l||d.cannot,null!==(s=d.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,!0===l?null===s&&""===r&&null===i?this._manualStat(e,t,n,a):(0,u.DB)({calculated:!1}):this._parent._stat(e,t,r,i,s,n,a).then((l=>!1===l.calculated?null===s&&""===r&&null===i?this._manualStat(e,t,n,a):{calculated:!1}:l))}_canDoAggregates(e,t,r,i,s){if(null===this._parent)return(0,u.DB)(!1);for(let t=0;t<e.length;t++)for(const r of this.adaptedFields)if(e[t].toLowerCase()===r.field.name.toLowerCase()&&!(r instanceof p))return(0,u.DB)(!1);const n=[];for(let e=0;e<t.length;e++){const r=t[e];if(null!==r.workingexpr){const e=this.reformulateWithoutAdaptions(r.workingexpr);if(e.cannot)return(0,u.DB)(!1);const t=r.clone();t.workingexpr=e.where,n.push(t)}else n.push(r)}const a=this.reformulateWithoutAdaptions(s);return a.cannot?(0,u.DB)(!1):(null!==(s=a.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,n,r,i,s))}_getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,a){if(null===this._parent)return(0,u.d1)(new Error("Should never be called"));const l=[];for(let e=0;e<t.length;e++){const r=t[e];if(null!==r.workingexpr){const e=this.reformulateWithoutAdaptions(r.workingexpr);if(e.cannot)return(0,u.d1)(new Error("Should never be called"));const t=r.clone();t.workingexpr=e.where,l.push(t)}else l.push(r)}const d=this.reformulateWithoutAdaptions(s);return d.cannot?(0,u.d1)(new Error("Should never be called")):(null!==(s=d.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,l,r,i,s,n,a))}}},84328:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(91136),s=r(90961),n=r(90658),a=r(36515),l=r(95330),o=r(41534),u=r(82971);class d extends i.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof o.WhereClause?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new u.Z({wkid:4326}),this.geometryType=n.Qk.point)}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getFilteredSet("",null,this._whereclause,null,e))).then((t=>(this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new s.Z(t._candidates.slice(0).concat(t._known.slice(0)),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new s.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,l.DB)(this._wset)}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===n.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?n.dj.Unknown:t)}_getFeature(e,t,r){return this._parent._getFeature(e,t,r)}_getFeatures(e,t,r,i){return this._parent._getFeatures(e,t,r,i)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause.testFeature(e)}executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction)try{const t=this._whereClauseFunction(e);return(0,l.y8)(t)?t:(0,l.DB)(t)}catch(e){return(0,l.d1)(e)}return(0,l.DB)(this.executeWhereClause(e))}_fetchAndRefineFeatures(e,t,r){const i=new s.Z([],e,!1,null),a=Math.min(t,e.length);return this._parent._getFeatures(i,-1,a,r).then((()=>{if(this._checkCancelled(r),null==this._whereClauseFunction){for(let t=0;t<a;t++){const r=this._parent._featureFromCache(e[t]);!0===this.executeWhereClause(r)?this._idstates[e[t]]=n.dj.InFeatureSet:this._idstates[e[t]]=n.dj.NotInFeatureSet}return"success"}const i=[];for(let t=0;t<a;t++){const r=this._parent._featureFromCache(e[t]);i.push(this.executeWhereClauseDeferred(r))}return(0,l.$6)(i).then((r=>{for(let i=0;i<t;i++)!0===r[i]?this._idstates[e[i]]=n.dj.InFeatureSet:this._idstates[e[i]]=n.dj.NotInFeatureSet;return"success"}))}))}_getFilteredSet(e,t,r,i,n){return null!==this._whereClauseFunction||(null!==r?null!==this._whereclause&&(r=(0,a.$e)(this._whereclause,r)):r=this._whereclause),this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,r,i,n))).then((e=>{let t;return this._checkCancelled(n),t=null!==this._whereClauseFunction?new s.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)):new s.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition)),t}))}_stat(e,t,r,i,s,n,o){if(null!==this._whereClauseFunction)return null===s&&""===r&&null===i?this._manualStat(e,t,n,o):(0,l.DB)({calculated:!1});let u=this._whereclause;return null!==s&&null!==this._whereclause&&(u=(0,a.$e)(this._whereclause,s)),this._parent._stat(e,t,r,i,u,n,o).then((a=>!1===a.calculated?null===s&&""===r&&null===i?this._manualStat(e,t,n,o):{calculated:!1}:a))}_canDoAggregates(e,t,r,i,s){return null!==this._whereClauseFunction?(0,l.DB)(!1):(null!==s?null!==this._whereclause&&(s=(0,a.$e)(this._whereclause,s)):s=this._whereclause,null===this._parent?(0,l.DB)(!1):this._parent._canDoAggregates(e,t,r,i,s))}_getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,o){return null===this._parent?(0,l.d1)(new Error("Should never be called")):(null!==s?null!==this._whereclause&&(s=(0,a.$e)(this._whereclause,s)):s=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,o))}static registerAction(){i.Z._featuresetFunctions.filter=function(e){if("function"==typeof e)return new d({parentfeatureset:this,whereclause:e});let t=null;return e instanceof o.WhereClause&&(t=e),new d({parentfeatureset:this,whereclause:t})}}}},85065:(e,t,r)=>{r.d(t,{Z:()=>o});var i=r(61363),s=r(91136),n=r(90961),a=r(3823),l=r(95330);class o extends s.Z{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,this._orderbyclause,e))).then((t=>(this._checkCancelled(e),this._wset=t,this._wset))):(0,l.DB)(this._wset)}manualOrderSet(e,t){return this.getIdColumnDictionary(e,[],-1,t).then((e=>{this._orderbyclause.order(e);const t=new n.Z([],[],!0,null);for(let r=0;r<e.length;r++)t._known.push(e[r].id);return t}))}getIdColumnDictionary(e,t,r,s){if(r<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[r+1])return(0,i.Q)(this._parent._expandPagedSet(e,n,0,0,s)).then((()=>this.getIdColumnDictionary(e,t,r,s)));let a=r+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;return r+=l.length,(0,i.Q)(this._parent._getFeatureBatch(l,s)).then((i=>{this._checkCancelled(s);for(const e of i)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,r,s)}))}return e._candidates.length>0?(0,i.Q)(this._refineSetBlock(e,this._maxProcessingRate(),s)).then((()=>(this._checkCancelled(s),this.getIdColumnDictionary(e,t,r,s)))):(0,l.DB)(t)}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,r,i){return this._parent._getFeatures(e,t,r,i)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}_fetchAndRefineFeatures(){return(0,l.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(e,t,r,i,s){return this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,r,null===i?this._orderbyclause:i,s))).then((e=>{this._checkCancelled(s);const i=new n.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition));let a=!0;return e._candidates.length>0&&(a=!1),!1===i._ordered?this.manualOrderSet(i,s).then((e=>(!1===a&&(null===t&&null===r||(e=new n.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e))):i}))}static registerAction(){s.Z._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new a.Z(e)})}}}},63991:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(91136),s=r(90961),n=r(90658),a=r(95330);class l extends i.Z{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getSet(e))).then((e=>(this._wset=new s.Z(e._candidates.slice(0),e._known.slice(0),!1,this._clonePageDefinition(e.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))):(0,a.DB)(this._wset)}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===n.dj.NotInFeatureSet)return t;const r=this._idstates[e];return r===n.dj.InFeatureSet||r===n.dj.NotInFeatureSet?r:t===n.dj.InFeatureSet&&void 0===r?this._countedin<this._topnum?(this._idstates[e]=n.dj.InFeatureSet,this._countedin++,n.dj.InFeatureSet):(this._idstates[e]=n.dj.NotInFeatureSet,n.dj.NotInFeatureSet):n.dj.Unknown}_expandPagedSet(e,t,r,i,s){if(null===this._parent)return(0,a.d1)(new Error("Parent Paging not implemented"));if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),(0,a.DB)("success")}return this._parent._expandPagedSet(e,t,r,i,s).then((t=>(this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),t)))}_getFeatures(e,t,r,i){const n=[],l=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,l))return this._expandPagedSet(e,l,0,0,i).then((()=>this._getFeatures(e,t,r,i)));-1!==t&&void 0===this._featureCache[t]&&n.push(t);let o=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(o++,o<=r&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&n.push(e._known[i]),n.length>l)));i++);if(0===n.length)return(0,a.DB)("success");const u=new s.Z([],n,!1,null),d=Math.min(n.length,r);return this._parent._getFeatures(u,-1,d,i).then((()=>{for(let e=0;e<d;e++){const t=this._parent._featureFromCache(n[e]);void 0!==t&&(this._featureCache[n[e]]=t)}return"success"}))}_getFilteredSet(e,t,r,i,n){return this._ensureLoaded().then((()=>this._getSet(n))).then((e=>new s.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!1,this._clonePageDefinition(e.pagesDefinition))))}_refineKnowns(e,t){let r=0,i=null;const s=[];for(let a=0;a<e._candidates.length;a++){const l=this._isInFeatureSet(e._candidates[a]);if(l===n.dj.InFeatureSet){if(e._known.push(e._candidates[a]),r+=1,null===i?i={start:a,end:a}:i.end===a-1?i.end=a:(s.push(i),i={start:a,end:a}),e._known.length>=this._topnum)break}else if(l===n.dj.NotInFeatureSet)null===i?i={start:a,end:a}:i.end===a-1?i.end=a:(s.push(i),i={start:a,end:a}),r+=1;else if(l===n.dj.Unknown)break;if(r>=t)break}null!==i&&s.push(i);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}_stat(){return(0,a.DB)({calculated:!1})}_canDoAggregates(){return(0,a.DB)(!1)}static registerAction(){i.Z._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}}},17805:(e,t,r)=>{r.d(t,{Z:()=>f});var i=r(38171),s=r(91136),n=r(90961),a=r(90658),l=r(36515),o=r(95330),u=r(9361),d=r(37593),h=r(16451),c=r(1231),p=r(57444);class f extends s.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return a.tI}end(){return this._layer}optimisePagingFeatureQueries(){}load(){return null===this._loadPromise&&(this._loadPromise=(0,o.Ue)(((e,t)=>{if(!0===this._layer.loaded)return this._initialiseFeatureSet(),void e(this);this._layer.when().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t),this._layer.load()}))),this._loadPromise}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._layer.outFields)if(1===this._layer.outFields.length&&"*"===this._layer.outFields[0]);else{const e=[];for(const t of this.fields)if("oid"===t.type)e.push(t);else for(const r of this._layer.outFields)if(r.toLowerCase()===t.name.toLowerCase()){e.push(t);break}this.fields=e}if(null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.hasM=this._layer.supportsM,this.hasZ=this._layer.supportsZ,this._databaseType=a.Bj.Standardised,this.typeIdField=this._layer.typeIdField,this.types=this._layer.types}isTable(){return this._forceIsTable||this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return a.dj.InFeatureSet}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,o.DB)(this._wset)}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new i.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_getFilteredSet(e,t,r,i,s){let u="",d=!1;if(null!==i&&(u=i.constructClause(),d=!0),this.isTable()&&t&&null!==e&&""!==e){const e=new n.Z([],[],!0,null);return(0,o.DB)(e)}const h=new p.Z;return h.where=null===r?null===t?"1=1":"":(0,l.zR)(r,a.Bj.Standardised),h.spatialRelationship=this._makeRelationshipEnum(e),h.outSpatialReference=this.spatialReference,h.orderByFields=""!==u?u.split(","):null,h.geometry=null===t?null:t,h.returnGeometry=!0,h.relationParameter=this._makeRelationshipParam(e),this._layer.queryFeatures(h).then((e=>{if(null===e)return new n.Z([],[],d,null);this._checkCancelled(s);const t=[];return e.features.forEach((e=>{const r=e.attributes[this._layer.objectIdField];t.push(r),this._featureCache[r]=this._changeFeature(e)})),new n.Z([],t,d,null)}))}_makeRelationshipEnum(e){if(e.indexOf("esriSpatialRelRelation")>=0)return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.indexOf("esriSpatialRelRelation")>=0?e.split(":")[1]:""}_queryAllFeatures(){if(this._wset)return(0,o.DB)(this._wset);const e=new p.Z;return e.where="1=1",this._ensureLoaded().then((()=>{if(this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach((t=>{const r=t.attributes[this._layer.objectIdField];e.push(r),this._featureCache[r]=this._changeFeature(t)})),this._wset=new n.Z([],e,!1,null),this._wset}return this._layer.queryFeatures(e).then((e=>{const t=[];return e.features.forEach((e=>{const r=e.attributes[this._layer.objectIdField];t.push(r),this._featureCache[r]=this._changeFeature(e)})),this._wset=new n.Z([],t,!1,null),this._wset}))}))}_getFeatures(e,t,r){const i=[];-1!==t&&void 0===this._featureCache[t]&&i.push(t);for(let s=e._lastFetchedIndex;s<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&i.push(e._known[s]),i.length>r)));s++);return 0===i.length?(0,o.DB)("success"):(0,o.d1)(new Error("Unaccounted for Features. Not in Feature Collection"))}_refineSetBlock(e){return(0,o.DB)(e)}_stat(){return(0,o.DB)({calculated:!1})}_canDoAggregates(){return(0,o.DB)(!1)}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const r in e)t[r]=e[r];return t}nativeCapabilities(){return{title:this._layer.title,canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const i=e.layerDefinition.typeIdField?e.layerDefinition.typeIdField:"",s=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)s.push(h.Z.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(""===r||void 0===r){let t=!1;for(const i of e.layerDefinition.fields)if("oid"===i.type||"esriFieldTypeOID"===i.type){r=i.name,t=!0;break}if(!1===t){let t="FID",i=!0,s=0;for(;i;){let r=!0;for(const i of e.layerDefinition.fields)if(i.name===t){r=!1;break}!0===r?i=!1:(s++,t="FID"+s.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let r=0;r<a.length;r++)n.push({geometry:e.featureSet.features[r].geometry,attributes:e.featureSet.features[r].attributes?this._cloneAttr(e.featureSet.features[r].attributes):{}}),n[r].attributes[t]=r;a=n,r=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof c.Z?o.push(t):o.push(c.Z.fromJSON(t));let p=n;switch(p){case"esriGeometryPoint":p="point";break;case"esriGeometryPolyline":p="polyline";break;case"esriGeometryPolygon":p="polygon";break;case"esriGeometryExtent":p="extent";break;case"esriGeometryMultipoint":p="multipoint"}for(const e of a)e.geometry&&e.geometry instanceof u.Z==0&&(e.geometry.type=p,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));const y={outFields:["*"],source:a,fields:o,types:s,typeIdField:i,objectIdField:r,spatialReference:t};y.geometryType=p||"point";const g=new d.default(y);return new f({layer:g,spatialReference:t,isTable:null===p||""===p})}queryAttachments(){return(0,o.DB)([])}getFeatureByObjectId(e){const t=new p.Z;return t.where=this.objectIdField+"="+e.toString(),this._layer.queryFeatures(t).then((e=>1===e.features.length?e.features[0]:null))}getOwningSystemUrl(){return(0,o.DB)("")}getIdentityUser(){return(0,o.DB)("")}}},3823:(e,t,r)=>{function i(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}r.d(t,{Z:()=>s});class s{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const r=t[e].match(/\S+/g);this._fields.push(r[0]),2===r.length?"asc"===r[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort(((e,t)=>{for(let r=0;r<this._fields.length;r++){const s=this.featureValue(e.feature,this._fields[r],r),n=this.featureValue(t.feature,this._fields[r],r);let a=0;if(a=1===this._directions[r]?i(s,n):-1*i(s,n),0!==a)return a}return 0}))}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let r=0;r<this._fields.length;r++){0!==r&&(t+=",");let i=this._fields[r];for(const t of e)if(i.toLowerCase()===t.field.toLowerCase()){i=t.newfield;break}t+=i,1===this._directions[r]?t+=" ASC":t+=" DESC"}return new s(t)}featureValue(e,t,r){const i=e.attributes[t];if(void 0!==i)return i;for(const i in e.attributes)if(t.toLowerCase()===i.toLowerCase())return this._fields[r]=i,e.attributes[i];return null}}},25929:(e,t,r)=>{r.d(t,{f:()=>n,i:()=>h,p:()=>p,r:()=>l,t:()=>a,w:()=>o});var i=r(70586),s=r(17452);function n(e,t){const r=t&&t.url&&t.url.path;if(e&&r&&(e=(0,s.hF)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,s.PF)(e,t.portalItem.itemUrl);d.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return c(e,t&&t.portal)}function a(e,t,r=0){if(!e)return e;!(0,s.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let i=(0,s.hF)(e);if(t){const r=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(r){const n=c(r,t.portal);i=(0,s.PF)(c(i,t.portal),n,n),i!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(i)}}return i=function(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,s.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}(i,t&&t.portal),(0,s.YP)(i)&&(i=(0,s.Fv)(i)),null!=t&&t.resources&&null!=t&&t.portalItem&&!(0,s.YP)(i)&&!(0,s.HK)(i)&&0===r&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(i)}),i}function l(e,t,r){return n(e,r)}function o(e,t,r,i){const s=a(e,i);void 0!==s&&(t[r]=s)}const u=/\/items\/([^\/]+)\/resources\//,d=/^\.\/resources\//;function h(e){const t=(0,i.pC)(e)?e.match(u):null;return(0,i.pC)(t)?t[1]:null}function c(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`;return(0,s.D6)(s.Gd,`${s.Gd.scheme}://${r}`)?(0,s.Ie)(e,t.portalHostname,r):(0,s.Ie)(e,r,t.portalHostname)}const p=Object.freeze({__proto__:null,fromJSON:n,toJSON:a,read:l,write:o,itemIdFromResourceUrl:h})},3920:(e,t,r)=>{r.d(t,{r:()=>d,p:()=>u});var i=r(43697),s=r(15923),n=r(61247),a=r(5600),l=r(52011),o=r(89749);const u=e=>{let t=class extends e{destroy(){this.destroyed||(this.handles.destroy(),this.updatingHandles.destroy())}get handles(){return this._get("handles")||new n.Z}get updatingHandles(){return this._get("updatingHandles")||new o.t}};return(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,i._)([(0,l.j)("esri.core.HandleOwner")],t),t};let d=class extends(u(s.Z)){};d=(0,i._)([(0,l.j)("esri.core.HandleOwner")],d)},61247:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(15923),n=r(81049),a=r(70586),l=r(5600),o=r(52011);let u=class extends s.Z{constructor(e){super(e),this._groups=new Map}destroy(){this.removeAll()}get size(){let e=0;return this._groups.forEach((t=>{e+=t.length})),e}add(e,t){if(!this._isHandle(e)&&!Array.isArray(e)&&!n.Z.isCollection(e))return this;const r=this._getOrCreateGroup(t);return Array.isArray(e)||n.Z.isCollection(e)?e.forEach((e=>this._isHandle(e)&&r.push(e))):r.push(e),this.notifyChange("size"),this}forEach(e,t){if("function"==typeof e)this._groups.forEach((t=>t.forEach(e)));else{const r=this._getGroup(e);r&&t&&r.forEach(t)}}has(e){return this._groups.has(this._ensureGroupKey(e))}remove(e){if(Array.isArray(e)||n.Z.isCollection(e))return e.forEach(this.remove,this),this;if(!this.has(e))return this;const t=this._getGroup(e);for(let e=0;e<t.length;e++)t[e].remove();return this._deleteGroup(e),this.notifyChange("size"),this}removeAll(){return this._groups.forEach((e=>{for(let t=0;t<e.length;t++)e[t].remove()})),this._groups.clear(),this.notifyChange("size"),this}_isHandle(e){return e&&!!e.remove}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(this._ensureGroupKey(e),t),t}_getGroup(e){return(0,a.j0)(this._groups.get(this._ensureGroupKey(e)))}_deleteGroup(e){return this._groups.delete(this._ensureGroupKey(e))}_ensureGroupKey(e){return e||"_default_"}};(0,i._)([(0,l.Cb)({readOnly:!0})],u.prototype,"size",null),u=(0,i._)([(0,o.j)("esri.core.Handles")],u);const d=u},44543:(e,t,r)=>{r.d(t,{F:()=>h,M:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function n(e,t,r,i,n,a){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,a)),n),r)}function a(e,t,r,i,s,a,l){return n(t&r|~t&i,e,t,s,a,l)}function l(e,t,r,i,s,a,l){return n(t&i|r&~i,e,t,s,a,l)}function o(e,t,r,i,s,a,l){return n(t^r^i,e,t,s,a,l)}function u(e,t,r,i,s,a,l){return n(r^(t|~i),e,t,s,a,l)}function d(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){const h=r,c=i,p=n,f=d;r=a(r,i,n,d,e[t+0],7,-680876936),d=a(d,r,i,n,e[t+1],12,-389564586),n=a(n,d,r,i,e[t+2],17,606105819),i=a(i,n,d,r,e[t+3],22,-1044525330),r=a(r,i,n,d,e[t+4],7,-176418897),d=a(d,r,i,n,e[t+5],12,1200080426),n=a(n,d,r,i,e[t+6],17,-1473231341),i=a(i,n,d,r,e[t+7],22,-45705983),r=a(r,i,n,d,e[t+8],7,1770035416),d=a(d,r,i,n,e[t+9],12,-1958414417),n=a(n,d,r,i,e[t+10],17,-42063),i=a(i,n,d,r,e[t+11],22,-1990404162),r=a(r,i,n,d,e[t+12],7,1804603682),d=a(d,r,i,n,e[t+13],12,-40341101),n=a(n,d,r,i,e[t+14],17,-1502002290),i=a(i,n,d,r,e[t+15],22,1236535329),r=l(r,i,n,d,e[t+1],5,-165796510),d=l(d,r,i,n,e[t+6],9,-1069501632),n=l(n,d,r,i,e[t+11],14,643717713),i=l(i,n,d,r,e[t+0],20,-373897302),r=l(r,i,n,d,e[t+5],5,-701558691),d=l(d,r,i,n,e[t+10],9,38016083),n=l(n,d,r,i,e[t+15],14,-660478335),i=l(i,n,d,r,e[t+4],20,-405537848),r=l(r,i,n,d,e[t+9],5,568446438),d=l(d,r,i,n,e[t+14],9,-1019803690),n=l(n,d,r,i,e[t+3],14,-187363961),i=l(i,n,d,r,e[t+8],20,1163531501),r=l(r,i,n,d,e[t+13],5,-1444681467),d=l(d,r,i,n,e[t+2],9,-51403784),n=l(n,d,r,i,e[t+7],14,1735328473),i=l(i,n,d,r,e[t+12],20,-1926607734),r=o(r,i,n,d,e[t+5],4,-378558),d=o(d,r,i,n,e[t+8],11,-2022574463),n=o(n,d,r,i,e[t+11],16,1839030562),i=o(i,n,d,r,e[t+14],23,-35309556),r=o(r,i,n,d,e[t+1],4,-1530992060),d=o(d,r,i,n,e[t+4],11,1272893353),n=o(n,d,r,i,e[t+7],16,-155497632),i=o(i,n,d,r,e[t+10],23,-1094730640),r=o(r,i,n,d,e[t+13],4,681279174),d=o(d,r,i,n,e[t+0],11,-358537222),n=o(n,d,r,i,e[t+3],16,-722521979),i=o(i,n,d,r,e[t+6],23,76029189),r=o(r,i,n,d,e[t+9],4,-640364487),d=o(d,r,i,n,e[t+12],11,-421815835),n=o(n,d,r,i,e[t+15],16,530742520),i=o(i,n,d,r,e[t+2],23,-995338651),r=u(r,i,n,d,e[t+0],6,-198630844),d=u(d,r,i,n,e[t+7],10,1126891415),n=u(n,d,r,i,e[t+14],15,-1416354905),i=u(i,n,d,r,e[t+5],21,-57434055),r=u(r,i,n,d,e[t+12],6,1700485571),d=u(d,r,i,n,e[t+3],10,-1894986606),n=u(n,d,r,i,e[t+10],15,-1051523),i=u(i,n,d,r,e[t+1],21,-2054922799),r=u(r,i,n,d,e[t+8],6,1873313359),d=u(d,r,i,n,e[t+15],10,-30611744),n=u(n,d,r,i,e[t+6],15,-1560198380),i=u(i,n,d,r,e[t+13],21,1309151649),r=u(r,i,n,d,e[t+4],6,-145523070),d=u(d,r,i,n,e[t+11],10,-1120210379),n=u(n,d,r,i,e[t+2],15,718787259),i=u(i,n,d,r,e[t+9],21,-343485551),r=s(r,h),i=s(i,c),n=s(n,p),d=s(d,f)}return[r,i,n,d]}function h(e,t=i.Hex){const r=t||i.Base64,s=d(function(e){const t=[];for(let r=0,i=8*e.length;r<i;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<r%32;return t}(e),8*e.length);switch(r){case i.Raw:return s;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(s);case i.String:return function(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=8)t.push(String.fromCharCode(e[r>>5]>>>r%32&255));return t.join("")}(s);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(s)}}},22862:(e,t,r)=>{r.d(t,{Hg:()=>y,uD:()=>p,V7:()=>f});var i=r(15923),s=r(81049),n=r(70586),a=r(1153);const l=["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"];function o(e){return e instanceof i.Z}function u(e){return e instanceof s.Z?Object.keys(e.items):o(e)?(0,a.vw)(e).keys():e?Object.keys(e):[]}function d(e,t){return e instanceof s.Z?e.items[t]:e[t]}function h(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=u(e),s=u(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const a=s.filter((e=>-1===i.indexOf(e))),p=i.filter((e=>-1===s.indexOf(e))),f=i.filter((r=>s.indexOf(r)>-1&&d(e,r)!==d(t,r))).concat(a,p).sort(),y=h(e);if(y&&l.indexOf(y)>-1&&f.length)return{type:"complete",oldValue:e,newValue:t};let g;const _=o(e)&&o(t);for(const i of f){const s=d(e,i),a=d(t,i);let l;(_||"function"!=typeof s&&"function"!=typeof a)&&s!==a&&(null==s&&null==a||(l=r&&r[i]&&"function"==typeof r[i]?r[i](s,a):"object"==typeof s&&"object"==typeof a&&h(s)===h(a)?c(s,a):{type:"complete",oldValue:s,newValue:a},(0,n.pC)(l)&&((0,n.pC)(g)?g.diff[i]=l:g={type:"partial",diff:{[i]:l}})))}return g}function p(e,t){if((0,n.Wi)(e))return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}function f(e,t){for(const r of t)if(p(e,r))return!0;return!1}function y(e,t){if(!("function"==typeof e||"function"==typeof t||(0,n.Wi)(e)&&(0,n.Wi)(t)))return(0,n.Wi)(e)||(0,n.Wi)(t)||"object"==typeof e&&"object"==typeof t&&h(e)!==h(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},66643:(e,t,r)=>{r.d(t,{Ed:()=>n,UI:()=>a,q6:()=>l,mt:()=>o});var i=r(70586),s=r(95330);function n(e,t,r){return(0,s.as)(e.map(((e,i)=>t.apply(r,[e,i]))))}function a(e,t,r){return(0,s.as)(e.map(((e,i)=>t.apply(r,[e,i])))).then((e=>e.map((e=>e.value))))}function l(e){return(0,i.Wi)(e)?(0,s.DB)():e.then((e=>({ok:!0,value:e}))).catch((e=>({ok:!1,error:e})))}function o(e){return e.then((e=>({ok:!0,value:e}))).catch((e=>((0,s.r9)(e),{ok:!1,error:e})))}},17445:(e,t,r)=>{r.d(t,{Ym:()=>n}),r(91460);var i=r(70586),s=r(26258);function n(e,t,r={}){return function(e,t,r={},n){let a=null;const l=r.once?(e,r)=>{n(e)&&((0,i.hw)(a),t(e,r))}:(e,r)=>{n(e)&&t(e,r)};if(a=(0,s.aQ)(e,l,r.sync,r.equals),r.initial){const t=e();l(t,t)}return a}(e,t,r,a)}function a(e){return!0}r(87538)},43050:(e,t,r)=>{r.d(t,{S1:()=>a,on:()=>h,OY:()=>d,cm:()=>o,N1:()=>l,LR:()=>u,tH:()=>c});var i=r(91460),s=(r(22974),r(95330));const n=/\?(\.|$)/g;function a(e,t,r,i){const s=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],a=function(e,t,r,i){return e.watch(t,r,i)}(e,t,r,i);for(const t of s){const i=t.trim().replace(n,"$1"),s=e.get(i);r.call(e,s,s,i,e)}return a}function l(e,t,r,i){return c(e,t,p,r,i)}function o(e,t,r,i){return c(e,t,f,r,i)}function u(e,t,r,i){return c(e,t,y,r,i)}function d(e,t,r,i){return c(e,t,g,r,i)}function h(e,t,r,s,n,l,o){const u={};function d(t){const i=u[t];i&&(l&&l(i.target,t,e,r),i.handle.remove(),delete u[t])}const h=a(e,t,((t,a,l)=>{d(l),(0,i.vT)(t)&&(u[l]={handle:(0,i.on)(t,r,s),target:t},n&&n(t,l,e,r))}),o);return{remove(){h.remove();for(const e in u)d(e)}}}function c(e,t,r,i,n){const a="function"==typeof i?i:null,l="object"==typeof i?i:null;"boolean"==typeof i&&(n=i);let o,u=!1;function d(){o&&(o.remove(),o=null)}const h=(0,s.dD)();(0,s.fu)(l,(()=>{d(),h.reject((0,s.zE)())}));const c={then:h.promise.then.bind(h.promise),catch:h.promise.catch.bind(h.promise),remove:d};return Object.freeze(c),o=function(e,t,r,i,s){const n=e.watch(t,((t,s,n,a)=>{r&&!r(t)||null==i||i.call(e,t,s,n,a)}),s);if(Array.isArray(t))for(const s of t){const n=e.get(s);r&&r(n)&&(null==i||i.call(e,n,n,t,e))}else{const s=e.get(t);r&&r(s)&&(null==i||i.call(e,s,s,t,e))}return n}(e,t,r,((t,r,i,s)=>{u=!0,d(),a&&a.call(e,t,r,i,s),h.resolve({value:t,oldValue:r,propertyName:i,target:s})}),n),u&&d(),c}function p(e){return!!e}function f(e){return!e}function y(e){return!0===e}function g(e){return!1===e}},60437:(e,t,r)=>{r.d(t,{Gv:()=>g,Ue:()=>s,cS:()=>c,fS:()=>y,TC:()=>a,pp:()=>l,JR:()=>p,al:()=>n,t8:()=>h,Tn:()=>d,op:()=>u,dp:()=>o});var i=r(70586);function s(e=_){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,i,n,a,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=n,l[5]=a,l}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function o(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function c(e){return e?h(e,g):s(g)}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e){return 6===e.length}function y(e,t,r){if((0,i.Wi)(e)||(0,i.Wi)(t))return e===t;if(!f(e)||!f(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(6570),r(24470);const g=[1/0,1/0,1/0,-1/0,-1/0,-1/0],_=[0,0,0,0,0,0];s()},24470:(e,t,r)=>{r.d(t,{Gv:()=>c,SO:()=>u,r3:()=>h,Ue:()=>n,oJ:()=>l,al:()=>a,kK:()=>d,HH:()=>o}),r(80442),r(22021);var i=r(70586),s=r(6570);function n(e=p){return[e[0],e[1],e[2],e[3]]}function a(e,t,r,i,s=n()){return s[0]=e,s[1]=t,s[2]=r,s[3]=i,s}function l(e,t=n()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function o(e,t){return new s.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function u(e){return function(e){return(0,i.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function d(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function h(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}const c=[1/0,1/0,-1/0,-1/0],p=[0,0,0,0]},54295:(e,t,r)=>{r.d(t,{V:()=>a});var i=r(43697),s=r(5600),n=(r(67676),r(80442),r(75215),r(52011));const a=e=>{let t=class extends e{get apiKey(){var e;return this._isOverridden("apiKey")?this._get("apiKey"):function(e){return"portalItem"in e}(this)?null==(e=this.portalItem)?void 0:e.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>u});var i=r(43697),s=r(92604),n=r(70586),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011)),o=r(66677);const u=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,a.Cb)()],t.prototype,"title",null),(0,i._)([(0,a.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>b});var i=r(43697),s=r(40330),n=r(3172),a=r(66643),l=r(20102),o=r(92604),u=r(70586),d=r(95330),h=r(17452),c=r(5600),p=(r(67676),r(80442),r(75215),r(71715)),f=r(52011),y=r(30556),g=r(65587),_=r(15235),m=r(86082);const w=o.Z.getLogger("esri.layers.mixins.PortalLayer"),b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await r.e(8062).then(r.bind(r,18062));return(0,d.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,d.D_)(e)||w.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this.fetchUserHasEditingPrivileges(e).catch((e=>((0,d.r9)(e),!0))))}async fetchUserHasEditingPrivileges(e){const t=this.url?null==s.id?void 0:s.id.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this.fetchEditingUser(e);return S.credential=t,S.user=r,(0,u.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async fetchEditingUser(e){var t,r;const i=null==(t=this.portalItem)||null==(r=t.portal)?void 0:r.user;if(i)return i;const l=s.id.findServerInfo(this.url);if(null==l||!l.owningSystemUrl)return null;const o=`${l.owningSystemUrl}/sharing/rest`,d=g.Z.getDefault();if(d&&d.loaded&&(0,h.Fv)(d.restUrl)===(0,h.Fv)(o))return d.user;const c=`${o}/community/self`,p=(0,u.pC)(e)?e.signal:null,f=await(0,a.q6)((0,n.default)(c,{authMode:"no-prompt",query:{f:"json"},signal:p}));return f.ok?m.default.fromJSON(f.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||g.Z.getDefault());return r&&i&&!(0,h.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,c.Cb)({type:_.default})],t.prototype,"portalItem",null),(0,i._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.Cb)()],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(35454),n=r(10736),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011));const o=new s.Xn({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends n.wq{constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,a.Cb)({json:{read:o.read,write:o.write}})],u.prototype,"drawingTool",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const d=u},16451:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(43697),s=r(10736),n=r(5600),a=(r(67676),r(80442),r(75215),r(71715)),l=r(52011),o=r(30556),u=r(72729),d=r(70082);let h=class extends s.wq{constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e)){var i;e[t]&&(r[t]=null==(i=e[t])?void 0:i.toJSON())}t.domains=r}};(0,i._)([(0,n.Cb)({json:{write:!0}})],h.prototype,"id",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],h.prototype,"name",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],h.prototype,"domains",void 0),(0,i._)([(0,a.r)("domains")],h.prototype,"readDomains",null),(0,i._)([(0,o.c)("domains")],h.prototype,"writeDomains",null),(0,i._)([(0,n.Cb)({type:[d.Z],json:{write:!0}})],h.prototype,"templates",void 0),h=(0,i._)([(0,l.j)("esri.layers.support.FeatureType")],h);const c=h},56765:(e,t,r)=>{r.d(t,{Z:()=>d});var i,s=r(43697),n=r(81049),a=r(10736),l=r(5600),o=(r(67676),r(80442),r(75215),r(52011));let u=i=class extends a.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,s._)([(0,o.j)("esri.layers.support.LayerFloorInfo")],u);const d=u},66677:(e,t,r)=>{r.d(t,{ld:()=>f,B5:()=>h,M8:()=>g,G:()=>b,Qc:()=>c,DR:()=>p,Nm:()=>_,XG:()=>m,a7:()=>y,wH:()=>w});var i=r(70586),s=r(17452),n=r(25929);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},l=Object.values(a),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),d=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(e){return!!o.test(e)}function c(e){const t=(0,s.mN)(e),r=t.path.match(o)||t.path.match(u);if(!r)return null;const[,i,n,l,d]=r,h=n.indexOf("/");return{title:f(-1!==h?n.slice(h+1):n),serverType:a[l.toLowerCase()],sublayer:null!=d&&""!==d?parseInt(d,10):null,url:{path:i}}}function p(e){const t=(0,s.mN)(e).path.match(d);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function y(e,t){const r=[];if(e){const t=c(e);(0,i.pC)(t)&&t.title&&r.push(t.title)}if(t){const e=f(t);r.push(e)}if(2===r.length){if(-1!==r[0].toLowerCase().indexOf(r[1].toLowerCase()))return r[0];if(-1!==r[1].toLowerCase().indexOf(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function g(e){if(!e)return!1;const t=-1!==(e=e.toLowerCase()).indexOf(".arcgis.com/"),r=-1!==e.indexOf("//services")||-1!==e.indexOf("//tiles")||-1!==e.indexOf("//features");return t&&r}function _(e,t){return e?(0,s.Qj)((0,s.Hu)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,s.Hu)(t,e.logger);const r=(0,s.mN)(t),n=c(r.path);let a;if((0,i.pC)(n))null!=n.sublayer&&null==e.layer.layerId&&(a=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=p(r.path);(0,i.pC)(e)&&(t=e.serviceUrl,a=e.sublayerId)}return{url:(0,s.Qj)(t),layerId:a}}function w(e,t,r,i,a){(0,n.w)(t,i,"url",a),i.url&&null!=e.layerId&&(i.url=(0,s.v_)(i.url,r,e.layerId.toString()))}function b(e){if(!e)return!1;const t=e.toLowerCase(),r=-1!==t.indexOf("/services/"),i=-1!==t.indexOf("/mapserver/wmsserver"),s=-1!==t.indexOf("/imageserver/wmsserver"),n=-1!==t.indexOf("/wmsserver");return r&&(i||s||n)}},15235:(e,t,r)=>{r.r(t),r.d(t,{default:()=>D});var i=r(43697),s=r(99880),n=r(20102),a=r(10736),l=r(22974),o=r(83379),u=r(70586),d=r(17452),h=r(5600),c=r(75215),p=r(71715),f=r(52011),y=r(6570),g=r(65587),_=r(15923),m=r(92604),w=(r(67676),r(80442),r(90578));const b=m.Z.getLogger("esri.portal.PortalItemResource");let S=class extends _.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this.normalizePath(e.path,e.portalItem)}:e}set path(e){(0,u.pC)(e)&&(0,d.YP)(e)?b.error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this.normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const r=this.url;if((0,u.Wi)(r))throw new n.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal._request(r,{responseType:e,query:{token:this.portalItem.apiKey},signal:(0,u.U2)(t,"signal")})}async update(e,t){return(await r.e(7873).then(r.bind(r,97873))).addOrUpdateResource(this,"update",e,t)}hasPath(){return(0,u.pC)(this.path)}normalizePath(e,t){return(0,u.Wi)(e)?e:(e=e.replace(/^\/+/,""),(0,u.pC)(t)&&(0,d.YP)(e)&&(e=(0,d.PF)(e,t.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,i._)([(0,h.Cb)()],S.prototype,"portalItem",void 0),(0,i._)([(0,h.Cb)({type:String,value:null})],S.prototype,"path",null),(0,i._)([(0,w.p)("path")],S.prototype,"_castPath",null),(0,i._)([(0,h.Cb)({type:String,readOnly:!0})],S.prototype,"url",null),(0,i._)([(0,h.Cb)({type:String,readOnly:!0})],S.prototype,"itemRelativeUrl",null),S=(0,i._)([(0,f.j)("esri.portal.PortalItemResource")],S);const F=S;let v=class extends _.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,i._)([(0,h.Cb)()],v.prototype,"created",void 0),(0,i._)([(0,h.Cb)()],v.prototype,"rating",void 0),v=(0,i._)([(0,f.j)("esri.portal.PortalRating")],v);const I=v;var C;let x=C=class extends((0,a.eC)(o.Z)){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return(0,c.TJ)(C,e)}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let r=e;return"Feature Service"===e||"Feature Collection"===e?r=t.indexOf("Table")>-1?"Table":t.indexOf("Route Layer")>-1?"Route Layer":t.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?r=t.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":t.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?r="Scene Layer":"Scene Package"===e?r="Scene Layer Package":"Stream Service"===e?r="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?r=t.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?r="Locator":"Geoenrichment Service"===e?r="GeoEnrichment Service":"Microsoft Powerpoint"===e?r="Microsoft PowerPoint":"GeoJson"===e?r="GeoJSON":"Globe Service"===e?r="Globe Layer":"Vector Tile Service"===e?r="Tile Layer":"netCDF"===e?r="NetCDF":"Map Service"===e?r=-1===t.indexOf("Spatiotemporal")&&(t.indexOf("Hosted Service")>-1||t.indexOf("Tiled")>-1)&&-1===t.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?r=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?r="Big Data File Share":"Compact Tile Package"===e?r="Tile Package (tpkx)":"OGCFeatureServer"===e&&(r="OGC Feature Layer"),r}readExtent(e){return e&&e.length?new y.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",t=this.typeKeywords||[];let r,i=!1,n=!1,a=!1,l=!1,o=!1,u=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(i=t.indexOf("Hosted Service")>-1,"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=t.indexOf("Table")>-1,a=t.indexOf("Route Layer")>-1,l=t.indexOf("Markup")>-1,o=-1!==t.indexOf("Spatiotemporal"),u=-1!==t.indexOf("UtilityNetwork"),r=o&&n?"spatiotemporaltable":n?"table":a?"routelayer":l?"markup":o?"spatiotemporal":i?"featureshosted":u?"utilitynetwork":"features"):r="map service"===e||"wms"===e||"wmts"===e?i||t.indexOf("Tiled")>-1||"wmts"===e?"maptiles":"mapimages":"scene service"===e?t.indexOf("Line")>-1?"sceneweblayerline":t.indexOf("3DObject")>-1?"sceneweblayermultipatch":t.indexOf("Point")>-1?"sceneweblayerpoint":t.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":t.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":t.indexOf("Polygon")>-1?"sceneweblayerpolygon":t.indexOf("Building")>-1?"sceneweblayerbuilding":t.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.indexOf("Elevation 3D Layer")>-1?"elevationlayer":t.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e&&t.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):r="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?t.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.indexOf("ArcGIS Pro")>-1||"explorer map"===e&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&t.indexOf("Explorer Mapping Application")>-1||t.indexOf("Document")>-1?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"maps",r?(0,s.V)("esri/images/portal/"+r+"16.png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}get itemUrl(){const e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){this.portal||(this.portal=g.Z.getDefault());const t=this.portal.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:(0,u.pC)(e)?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}addRating(e){const t={method:"post",query:{}};return e instanceof I&&(e=e.rating),isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal._request(this.itemUrl+"/addRating",t).then((()=>new I({rating:e,created:new Date})))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,l.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,l.d9)(this.categories),created:(0,l.d9)(this.created),culture:this.culture,description:this.description,extent:(0,l.d9)(this.extent),groupCategories:(0,l.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,l.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,l.d9)(this.screenshots),size:this.size,snippet:this.snippet,tags:(0,l.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,l.d9)(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new C({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((()=>{}))}fetchData(e="json",t){return this.portal._request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then((e=>null!=e.rating?(e.created=new Date(e.created),new I(e)):null))}fetchRelatedItems(e,t){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},C)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e&&e.data,r={method:"post"};r.query=this.createPostQuery();for(const e in r.query)null===r.query[e]&&(r.query[e]="");return r.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?r.query.text=t:"object"==typeof t&&(r.query.text=JSON.stringify(t))),this.portal._request(`${this.userItemUrl}/update`,r).then((()=>this.reload()))})):Promise.reject(new n.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e.thumbnail,r=e.filename,i={method:"post"};if("string"==typeof t)(0,d.HK)(t)?i.query={data:t}:i.query={url:(0,d.hF)(t)},(0,u.pC)(r)&&(i.query.filename=r);else{const e=new FormData;(0,u.pC)(r)?e.append("file",t,r):e.append("file",t),i.body=e}return this.portal._request(`${this.userItemUrl}/updateThumbnail`,i).then((()=>this.reload()))})):Promise.reject(new n.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){return(await r.e(7873).then(r.bind(r,97873))).fetchResources(this,e,t)}async addResource(e,t,i){const s=await r.e(7873).then(r.bind(r,97873));return e.portalItem=this,s.addOrUpdateResource(e,"add",t,i)}async removeResource(e,t){const i=await r.e(7873).then(r.bind(r,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new n.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return i.removeResource(this,e,t)}async removeAllResources(e){return(await r.e(7873).then(r.bind(r,97873))).removeAllResources(this,e)}resourceFromPath(e){return new F({portalItem:this,path:e})}toJSON(){const e=this.extent,t={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return(0,l.yd)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new C({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,i._)([(0,h.Cb)({type:["private","shared","org","public"]})],x.prototype,"access",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"accessInformation",void 0),(0,i._)([(0,h.Cb)({type:String})],x.prototype,"apiKey",void 0),(0,i._)([(0,h.Cb)({json:{read:{source:"appProxies"}}})],x.prototype,"applicationProxies",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"avgRating",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"categories",void 0),(0,i._)([(0,h.Cb)({type:Date})],x.prototype,"created",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"culture",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"description",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],x.prototype,"displayName",null),(0,i._)([(0,h.Cb)({type:y.Z})],x.prototype,"extent",void 0),(0,i._)([(0,p.r)("extent")],x.prototype,"readExtent",null),(0,i._)([(0,h.Cb)()],x.prototype,"groupCategories",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],x.prototype,"iconUrl",null),(0,i._)([(0,h.Cb)()],x.prototype,"id",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],x.prototype,"isLayer",null),(0,i._)([(0,h.Cb)()],x.prototype,"itemControl",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],x.prototype,"itemUrl",null),(0,i._)([(0,h.Cb)()],x.prototype,"licenseInfo",void 0),(0,i._)([(0,h.Cb)({type:Date})],x.prototype,"modified",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"name",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"numComments",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"numRatings",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"numViews",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"owner",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"ownerFolder",void 0),(0,i._)([(0,h.Cb)({type:g.Z})],x.prototype,"portal",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"screenshots",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"size",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"snippet",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"sourceJSON",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"tags",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"thumbnail",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],x.prototype,"thumbnailUrl",null),(0,i._)([(0,h.Cb)()],x.prototype,"title",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"type",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"typeKeywords",void 0),(0,i._)([(0,h.Cb)()],x.prototype,"url",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],x.prototype,"userItemUrl",null),x=C=(0,i._)([(0,f.j)("esri.portal.PortalItem")],x);const D=x},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(50459);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}},50459:(e,t,r)=>{r.d(t,{k:()=>a,P:()=>o});var i=r(70586),s=r(67900),n=r(8744);function a(e,t,r){if((0,i.Wi)(t)||(0,i.Wi)(r)||r.vcsWkid||(0,n.fS)(t,r))return null;const a=(0,s._R)(t)/(0,s._R)(r);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,a);default:return null}}function l(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function o(e,t,r){if(!e&&!t||!r)return;const i=(0,s._R)(r);u(e,r,i),u(t,r,i)}function u(e,t,r){if(e)for(const i of e)d(i.geometry,t,r)}function d(e,t,r){if((0,i.Wi)(e)||!e.spatialReference||(0,n.fS)(e.spatialReference,t))return;const a=(0,s._R)(e.spatialReference)/r;if(1!==a)if("x"in e)null!=e.z&&(e.z*=a);else if("rings"in e)l(e,e.rings,a);else if("paths"in e)l(e,e.paths,a);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=a)}},89749:(e,t,r)=>{r.d(t,{t:()=>p});var i=r(43697),s=r(15923),n=r(61247),a=r(70586),l=r(17445),o=r(90584),u=r(43050),d=r(67723),h=r(5600),c=r(52011);let p=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new n.Z,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,t,r,i=0){const s=0!=(1&i),n=++this.handleId;s||this.installSyncUpdatingWatch(e,t,n);const a=0!=(2&i)?(0,u.S1)(e,t,r,s):e.watch(t,r,s);return this.handles.add(a,n),{remove:()=>this.handles.remove(n)}}addOnCollectionPropertyChange(e,t,r,i=0){const s=0!=(2&i),n=++this.handleId;return this.handles.add([(0,u.on)(e,t,"after-changes",this.createSyncUpdatingCallback()),(0,u.on)(e,t,"change",r,s?e=>{r({added:e.items,removed:[],moved:[],target:e})}:void 0)],n),{remove:()=>{this.handles.remove(n)}}}addOnCollectionChange(e,t,r=0){const i=0!=(2&r),s=++this.handleId;return this.handles.add([e.on("after-changes",this.createSyncUpdatingCallback()),e.on("change",t)],s),i&&t({added:e.items,removed:[],moved:[],target:e}),{remove:()=>{this.handles.remove(s)}}}addPromise(e){if((0,a.Wi)(e))return e;const t=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(f)||this._set("updating",!1))}},t),this.pendingPromises.add(e),this._set("updating",!0);const r=()=>this.handles.remove(t);return e.then(r,r),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}installSyncUpdatingWatch(e,t,r){const i=this.createSyncUpdatingCallback(),s=(0,l.Ym)((()=>(0,d.$z)(e,t)),i,{sync:!0,equals:()=>!1});return this.handles.add(s,r),s}createSyncUpdatingCallback(){return()=>{this.handles.remove(f),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add((0,o.Os)((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(f))})),f)}}};(0,i._)([(0,h.Cb)({readOnly:!0})],p.prototype,"updating",void 0),p=(0,i._)([(0,c.j)("esri.views.support.WatchUpdatingTracking")],p);const f=-42}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1762],{93860:(e,t,r)=>{function n(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let n=0;n<r;n++)t[n]=e.get(n);return t}r.d(t,{m:()=>n}),Object.freeze({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,i=t.typedBufferStride,a=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*s,c=(r&&r.srcIndex?r.srcIndex:0)*i;for(let e=0;e<a;++e)n[u]=o[c],u+=s,c+=i},makeDense:n})},10816:(e,t,r)=>{r.d(t,{f:()=>i,n:()=>o});var n=r(79583);function s(e,t,r){const n=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,i=t.typedBufferStride,a=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*s,c=(r&&r.srcIndex?r.srcIndex:0)*i;for(let e=0;e<a;++e)n[u]=o[c],n[u+1]=o[c+1],u+=s,c+=i}function o(e,t,r){const o=e.typedBuffer,i=e.typedBufferStride,a=t.typedBuffer,u=t.typedBufferStride,c=r?r.count:t.count;let f=(r&&r.dstIndex?r.dstIndex:0)*i,l=(r&&r.srcIndex?r.srcIndex:0)*u;if((0,n.U)(t.elementType)){const e=(0,n.Op)(t.elementType);if((0,n.B3)(t.elementType))for(let t=0;t<c;++t)o[f]=Math.max(a[l]/e,-1),o[f+1]=Math.max(a[l+1]/e,-1),f+=i,l+=u;else for(let t=0;t<c;++t)o[f]=a[l]/e,o[f+1]=a[l+1]/e,f+=i,l+=u}else s(e,t,r);return e}function i(e,t,r,n){var s,o;const i=e.typedBuffer,a=e.typedBufferStride,u=null!=(s=null==n?void 0:n.count)?s:e.count;let c=(null!=(o=null==n?void 0:n.dstIndex)?o:0)*a;for(let e=0;e<u;++e)i[c]=t,i[c+1]=r,c+=a}Object.freeze({__proto__:null,copy:s,normalizeIntegerBuffer:o,fill:i})},97323:(e,t,r)=>{function n(e,t){return[e,t]}function s(e,t){return new Float64Array(e,t,2)}function o(){return n(1,1)}function i(){return n(1,0)}function a(){return n(0,1)}r.d(t,{c:()=>s});const u=o(),c=i(),f=a();Object.freeze({__proto__:null,create:function(){return[0,0]},clone:function(e){return[e[0],e[1]]},fromValues:n,fromArray:function(e){const t=[0,0],r=Math.min(2,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t},createView:s,zeros:function(){return[0,0]},ones:o,unitX:i,unitY:a,ZEROS:[0,0],ONES:u,UNIT_X:c,UNIT_Y:f})},11077:(e,t,r)=>{r.d(t,{a:()=>i,s:()=>o,t:()=>s});var n=r(72220);function s(e,t,r){if(e.count!==t.count)return void n.k.error("source and destination buffers need to have the same number of elements");const s=e.count,o=r[0],i=r[1],a=r[2],u=r[3],c=r[4],f=r[5],l=r[6],d=r[7],p=r[8],h=e.typedBuffer,m=e.typedBufferStride,y=t.typedBuffer,b=t.typedBufferStride;for(let e=0;e<s;e++){const t=e*m,r=e*b,n=y[r],s=y[r+1],w=y[r+2],x=y[r+3];h[t]=o*n+u*s+l*w,h[t+1]=i*n+c*s+d*w,h[t+2]=a*n+f*s+p*w,h[t+3]=x}}function o(e,t,r){const n=Math.min(e.count,t.count),s=e.typedBuffer,o=e.typedBufferStride,i=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*o,n=e*a;s[t]=r*i[n],s[t+1]=r*i[n+1],s[t+2]=r*i[n+2],s[t+3]=r*i[n+3]}}function i(e,t,r){const n=Math.min(e.count,t.count),s=e.typedBuffer,o=e.typedBufferStride,i=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*o,n=e*a;s[t]=i[n]>>r,s[t+1]=i[n+1]>>r,s[t+2]=i[n+2]>>r,s[t+3]=i[n+3]>>r}}Object.freeze({__proto__:null,transformMat4:function(e,t,r){if(e.count!==t.count)return void n.k.error("source and destination buffers need to have the same number of elements");const s=e.count,o=r[0],i=r[1],a=r[2],u=r[3],c=r[4],f=r[5],l=r[6],d=r[7],p=r[8],h=r[9],m=r[10],y=r[11],b=r[12],w=r[13],x=r[14],g=r[15],T=e.typedBuffer,S=e.typedBufferStride,v=t.typedBuffer,I=t.typedBufferStride;for(let e=0;e<s;e++){const t=e*S,r=e*I,n=v[r],s=v[r+1],O=v[r+2],B=v[r+3];T[t]=o*n+c*s+p*O+b*B,T[t+1]=i*n+f*s+h*O+w*B,T[t+2]=a*n+l*s+m*O+x*B,T[t+3]=u*n+d*s+y*O+g*B}},transformMat3:s,scale:o,shiftRight:i})},75488:(e,t,r)=>{function n(e,t,r){const n=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,i=t.typedBufferStride,a=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*s,c=(r&&r.srcIndex?r.srcIndex:0)*i;for(let e=0;e<a;++e)n[u]=o[c],n[u+1]=o[c+1],n[u+2]=o[c+2],n[u+3]=o[c+3],u+=s,c+=i}function s(e,t,r,n,s,o){var i,a;const u=e.typedBuffer,c=e.typedBufferStride,f=null!=(i=null==o?void 0:o.count)?i:e.count;let l=(null!=(a=null==o?void 0:o.dstIndex)?a:0)*c;for(let e=0;e<f;++e)u[l]=t,u[l+1]=r,u[l+2]=n,u[l+3]=s,l+=c}r.d(t,{c:()=>n,f:()=>s}),Object.freeze({__proto__:null,copy:n,fill:s})},88669:(e,t,r)=>{function n(){return[0,0,0,0]}function s(e,t,r,n){return[e,t,r,n]}function o(e,t){return new Float64Array(e,t,4)}function i(){return s(1,1,1,1)}function a(){return s(1,0,0,0)}function u(){return s(0,1,0,0)}function c(){return s(0,0,1,0)}function f(){return s(0,0,0,1)}r.d(t,{a:()=>o,c:()=>n,f:()=>s});const l=i(),d=a(),p=u(),h=c(),m=f();Object.freeze({__proto__:null,create:n,clone:function(e){return[e[0],e[1],e[2],e[3]]},fromValues:s,fromArray:function(e){const t=[0,0,0,0],r=Math.min(4,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t},createView:o,zeros:function(){return[0,0,0,0]},ones:i,unitX:a,unitY:u,unitZ:c,unitW:f,ZEROS:[0,0,0,0],ONES:l,UNIT_X:d,UNIT_Y:p,UNIT_Z:h,UNIT_W:m})},30175:(e,t,r)=>{function n(e,t,r){const n=e.get(t);if(void 0!==n)return n;const s=r();return e.set(t,s),s}r.d(t,{s1:()=>n})},22807:(e,t,r)=>{r.d(t,{x:()=>o});var n=r(70586),s=r(41213);class o{constructor(e){this.allocator=e,this.items=[],this.itemsPtr=0,this.tickHandle=s.Z.before((()=>this.reset())),this.grow()}destroy(){this.tickHandle&&(this.tickHandle.remove(),this.tickHandle=(0,n.Bd)(this.tickHandle)),this.items=(0,n.Bd)(this.items)}get(){return 0===this.itemsPtr&&(0,s.Z)((()=>{})),this.itemsPtr===this.items.length&&this.grow(),this.items[this.itemsPtr++]}reset(){const e=Math.min(3*Math.max(8,this.itemsPtr),this.itemsPtr+3*i);this.items.length=Math.min(e,this.items.length),this.itemsPtr=0}grow(){for(let e=0;e<Math.max(8,Math.min(this.items.length,i));e++)this.items.push(this.allocator())}}const i=1024},23670:(e,t,r)=>{r.d(t,{G:()=>s});var n=r(20102);class s{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.Z(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new s(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),i=/^\s*\d+\s*$/;if(!r||!r.match||!r.match(i))throw new n.Z((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o||!o.match||!o.match(i))throw new n.Z((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),u=parseInt(o,10);return new s(a,u,t)}}},79583:(e,t,r)=>{function n(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8;default:return}}function s(e){switch(e){case"u8":case"u16":case"u32":return!1;case"i8":case"i16":case"i32":case"f32":case"f64":return!0;default:return}}function o(e){switch(e){case"u8":case"u16":case"u32":case"i8":case"i16":case"i32":return!0;case"f32":case"f64":return!1;default:return}}function i(e){switch(e){case"u8":return 255;case"u16":return 65535;case"u32":return 4294967295;case"i8":return 127;case"i16":return 32767;case"i32":return 2147483647;case"f32":return 3402823e32;case"f64":return 179769e303;default:return}}r.d(t,{n1:()=>n,U:()=>o,B3:()=>s,Op:()=>i}),r(80442)},8323:(e,t,r)=>{r.d(t,{gS:()=>s});var n=r(79583);function s(e,t){return new e(new ArrayBuffer(t*e.ElementCount*(0,n.n1)(e.ElementType)))}Object.freeze({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,i=t.typedBufferStride,a=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*s,c=(r&&r.srcIndex?r.srcIndex:0)*i;for(let e=0;e<a;++e){for(let e=0;e<9;++e)n[u+e]=o[c+e];u+=s,c+=i}}}),Object.freeze({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,i=t.typedBufferStride,a=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*s,c=(r&&r.srcIndex?r.srcIndex:0)*i;for(let e=0;e<a;++e){for(let e=0;e<16;++e)n[u+e]=o[c+e];u+=s,c+=i}}}),r(93860),r(10816),r(56067),r(75488)},16996:(e,t,r)=>{r.d(t,{Ue:()=>u,Jk:()=>c,ct:()=>f});var n=r(22021),s=r(22807),o=r(17896),i=r(65617),a=r(12981);function u(e){return e?{origin:(0,i.a)(e.origin),vector:(0,i.a)(e.vector)}:{origin:(0,i.c)(),vector:(0,i.c)()}}function c(e,t){const r=(0,o.f)(a.WM.get(),t,e.origin),s=(0,o.d)(e.vector,r),i=(0,o.d)(e.vector,e.vector),u=(0,n.uZ)(s/i,0,1),c=(0,o.f)(a.WM.get(),(0,o.a)(a.WM.get(),e.vector,u),r);return(0,o.d)(c,c)}function f(e,t,r,s,i){const{vector:u,origin:c}=e,f=(0,o.f)(a.WM.get(),t,c),l=(0,o.d)(u,f)/(0,o.p)(u);return(0,o.a)(i,u,(0,n.uZ)(l,r,s)),(0,o.b)(i,i,e.origin)}(0,i.c)(),(0,i.c)(),new s.x((()=>({origin:null,vector:null})))},12981:(e,t,r)=>{r.d(t,{MP:()=>m,WM:()=>p,o6:()=>h});var n=r(70586),s=r(41213),o=r(46521),i=r(13598),a=r(94961),u=r(97323),c=r(65617),f=r(88669);class l{constructor(e,t,r){this.itemByteSize=e,this.itemCreate=t,this.buffers=[],this.items=[],this.itemsPerBuffer=0,this.itemsPtr=0,this.itemsPerBuffer=Math.ceil(r/this.itemByteSize),this.tickHandle=s.Z.before((()=>this.reset()))}destroy(){this.tickHandle&&(this.tickHandle.remove(),this.tickHandle=(0,n.Bd)(this.tickHandle)),this.itemsPtr=0,this.items=(0,n.Bd)(this.items),this.buffers=(0,n.Bd)(this.buffers)}get(){0===this.itemsPtr&&(0,s.Z)((()=>{}));const e=Math.floor(this.itemsPtr/this.itemsPerBuffer);for(;this.buffers.length<=e;){const e=new ArrayBuffer(this.itemsPerBuffer*this.itemByteSize);for(let t=0;t<this.itemsPerBuffer;++t)this.items.push(this.itemCreate(e,t*this.itemByteSize));this.buffers.push(e)}return this.items[this.itemsPtr++]}reset(){const e=2*(Math.floor(this.itemsPtr/this.itemsPerBuffer)+1);for(;this.buffers.length>e;)this.buffers.pop(),this.items.length=this.buffers.length*this.itemsPerBuffer;this.itemsPtr=0}static createVec2f64(e=d){return new l(16,u.c,e)}static createVec3f64(e=d){return new l(24,c.b,e)}static createVec4f64(e=d){return new l(32,f.a,e)}static createMat3f64(e=d){return new l(72,o.a,e)}static createMat4f64(e=d){return new l(128,i.a,e)}static createQuatf64(e=d){return new l(32,a.c,e)}get test(){return{size:this.buffers.length*this.itemsPerBuffer*this.itemByteSize}}}const d=4096,p=(l.createVec2f64(),l.createVec3f64()),h=l.createVec4f64(),m=(l.createMat3f64(),l.createMat4f64());l.createQuatf64()},40270:(e,t,r)=>{r.d(t,{C:()=>c});var n=r(3172),s=r(66643),o=r(20102),i=r(70586),a=r(95330),u=r(17452);class c{constructor(e){this.streamDataRequester=e}async loadJSON(e,t){return this.load("json",e,t)}async loadBinary(e,t){return(0,u.HK)(e)?((0,a.k_)(t),(0,u.AH)(e)):this.load("binary",e,t)}async loadImage(e,t){return this.load("image",e,t)}async load(e,t,r){if((0,i.Wi)(this.streamDataRequester))return(await(0,n.default)(t,{responseType:f[e]})).data;const u=await(0,s.q6)(this.streamDataRequester.request(t,e,r));if(!0===u.ok)return u.value;throw(0,a.r9)(u.error),new o.Z("",`Request for resource failed: ${u.error}`)}}const f={image:"image",binary:"array-buffer",json:"json"}},91911:(e,t,r)=>{r.d(t,{jX:()=>a,DA:()=>i,nh:()=>o});var n=r(1533),s=r(17753);function o(e,t=s.p){return"number"==typeof e?t(e):(0,n.Uc)(e)||(0,n.lq)(e)?new Uint32Array(e):e}function i(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let s=0;s<r;s+=1)if(s%2==0){const r=e[s],o=e[s+1],i=e[s+2];n[t++]=r,n[t++]=o,n[t++]=i}else{const r=e[s+1],o=e[s],i=e[s+2];n[t++]=r,n[t++]=o,n[t++]=i}}return n}function a(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}{const t=e[0];let s=e[1],o=0;for(let i=0;i<r;++i){const r=e[i+2];n[o++]=t,n[o++]=s,n[o++]=r,s=r}return n}}},24952:(e,t,r)=>{r.d(t,{z:()=>R});var n=r(70586),s=r(13598),o=r(20102);const i=r(92604).Z.getLogger("esri.views.3d.glTF");var a=r(74085),u=r(30175),c=r(17452),f=r(23670),l=r(52138),d=r(51305),p=r(94961),h=r(56481),m=r(93860);class y{constructor(e){this.data=e,this.offset4=0,this.dataUint32=new Uint32Array(this.data,0,Math.floor(this.data.byteLength/4))}readUint32(){const e=this.offset4;return this.offset4+=1,this.dataUint32[e]}readUint8Array(e){const t=4*this.offset4;return this.offset4+=e/4,new Uint8Array(this.data,t,e)}remainingBytes(){return this.data.byteLength-4*this.offset4}}const b={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},w={pbrMetallicRoughness:b,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},x={ESRI_externalColorMixMode:"tint"},g=(e={})=>{const t={...b,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,a.Bg)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({...x,...e.extras});return{...w,...e,pbrMetallicRoughness:t,extras:r}},T={magFilter:9729,minFilter:9987,wrapS:10497,wrapT:10497},S=e=>({...T,...e}),v=1179937895;class I{constructor(e,t,r,n,s){this.context=e,this.errorContext=t,this.uri=r,this.json=n,this.glbBuffer=s,this.bufferLoaders=new Map,this.textureLoaders=new Map,this.textureCache=new Map,this.materialCache=new Map,this.nodeParentMap=new Map,this.nodeTransformCache=new Map,this.baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,((e,n,s)=>(t=n||"",r=s||"",""))),{dirPart:t,filePart:r}}(this.uri).dirPart,this.checkVersionSupported(),this.checkRequiredExtensionsSupported(),t.errorUnsupportedIf(null==n.scenes,"Scenes must be defined."),t.errorUnsupportedIf(null==n.meshes,"Meshes must be defined"),t.errorUnsupportedIf(null==n.nodes,"Nodes must be defined."),this.computeNodeParents()}static async load(e,t,r,n){if((0,c.HK)(r)){const n=(0,c.sJ)(r);if("model/gltf-binary"!==n.mediaType)try{const s=JSON.parse(n.isBase64?atob(n.data):n.data);return new I(e,t,r,s)}catch{}const s=(0,c.AH)(r);if(I.isGLBData(s))return this.fromGLBData(e,t,r,s)}if(r.endsWith(".gltf")){const s=await e.loadJSON(r,n);return new I(e,t,r,s)}const s=await e.loadBinary(r,n);if(I.isGLBData(s))return this.fromGLBData(e,t,r,s);const o=await e.loadJSON(r,n);return new I(e,t,r,o)}static isGLBData(e){const t=new y(e);return t.remainingBytes()>=4&&t.readUint32()===v}static async fromGLBData(e,t,r,n){const s=await I.parseGLBData(t,n);return new I(e,t,r,s.json,s.binaryData)}static async parseGLBData(e,t){const r=new y(t);e.assert(r.remainingBytes()>=12,"GLB binary data is insufficiently large.");const n=r.readUint32(),s=r.readUint32(),o=r.readUint32();e.assert(n===v,"Magic first 4 bytes do not fit to expected GLB value."),e.assert(t.byteLength>=o,"GLB binary data is smaller than header specifies."),e.errorUnsupportedIf(2!==s,"An unsupported GLB container version was detected. Only version 2 is supported.");let i,a,u=0;for(;r.remainingBytes()>=8;){const t=r.readUint32(),n=r.readUint32();0===u?(e.assert(1313821514===n,"First GLB chunk must be JSON."),e.assert(t>=0,"No JSON data found."),i=await M(r.readUint8Array(t))):1===u?(e.errorUnsupportedIf(5130562!==n,"Second GLB chunk expected to be BIN."),a=r.readUint8Array(t)):e.warnUnsupported("More than 2 GLB chunks detected. Skipping."),u+=1}return i||e.error("No GLB JSON chunk detected."),{json:i,binaryData:a}}async getBuffer(e,t){const r=this.json.buffers[e],n=this.errorContext;if(null==r.uri)return n.assert(null!=this.glbBuffer,"GLB buffer not present"),this.glbBuffer;const s=await this.getBufferLoader(e,t);return n.assert(s.byteLength===r.byteLength,"Buffer byte lengths should match."),s}async getBufferLoader(e,t){const r=this.bufferLoaders.get(e);if(r)return r;const n=this.json.buffers[e],s=this.context.loadBinary(this.resolveUri(n.uri),t).then((e=>new Uint8Array(e)));return this.bufferLoaders.set(e,s),s}async getAccessor(e,t){const r=this.errorContext;r.errorUnsupportedIf(!this.json.accessors,"Accessors missing.");const n=this.json.accessors[e];r.errorUnsupportedIf(null==(null==n?void 0:n.bufferView),"Some accessor does not specify a bufferView."),r.errorUnsupportedIf(n.type in["MAT2","MAT3","MAT4"],`AttributeType ${n.type} is not supported`);const s=this.json.bufferViews[n.bufferView],o=await this.getBuffer(s.buffer,t),i=U[n.type],a=A[n.componentType],u=i*a,c=s.byteStride||u;return{raw:o.buffer,byteStride:c,byteOffset:o.byteOffset+(s.byteOffset||0)+(n.byteOffset||0),entryCount:n.count,isDenselyPacked:c===u,componentCount:i,componentByteSize:a,componentType:n.componentType,min:n.min,max:n.max,normalized:!!n.normalized}}async getIndexData(e,t){if(null==e.indices)return null;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case 5121:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case 5123:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case 5125:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case 5121:return(0,m.m)(this.wrapAccessor(h.D_,r));case 5123:return(0,m.m)(this.wrapAccessor(h.av,r));case 5125:return(0,m.m)(this.wrapAccessor(h.Nu,r))}}async getPositionData(e,t){const r=this.errorContext;r.errorUnsupportedIf(null==e.attributes.POSITION,"No POSITION vertex data found.");const n=await this.getAccessor(e.attributes.POSITION,t);return r.errorUnsupportedIf(5126!==n.componentType,"Expected type FLOAT for POSITION vertex attribute, but found "+_[n.componentType]),r.errorUnsupportedIf(3!==n.componentCount,"POSITION vertex attribute must have 3 components, but found "+n.componentCount.toFixed()),this.wrapAccessor(h.ct,n)}async getNormalData(e,t){const r=this.errorContext;r.assert(null!=e.attributes.NORMAL,"No NORMAL vertex data found.");const n=await this.getAccessor(e.attributes.NORMAL,t);return r.errorUnsupportedIf(5126!==n.componentType,"Expected type FLOAT for NORMAL vertex attribute, but found "+_[n.componentType]),r.errorUnsupportedIf(3!==n.componentCount,"NORMAL vertex attribute must have 3 components, but found "+n.componentCount.toFixed()),this.wrapAccessor(h.ct,n)}async getTangentData(e,t){const r=this.errorContext;r.assert(null!=e.attributes.TANGENT,"No TANGENT vertex data found.");const n=await this.getAccessor(e.attributes.TANGENT,t);return r.errorUnsupportedIf(5126!==n.componentType,"Expected type FLOAT for TANGENT vertex attribute, but found "+_[n.componentType]),r.errorUnsupportedIf(4!==n.componentCount,"TANGENT vertex attribute must have 4 components, but found "+n.componentCount.toFixed()),new h.ek(n.raw,n.byteOffset,n.byteStride,n.byteOffset+n.byteStride*n.entryCount)}async getTextureCoordinates(e,t){const r=this.errorContext;r.assert(null!=e.attributes.TEXCOORD_0,"No TEXCOORD_0 vertex data found.");const n=await this.getAccessor(e.attributes.TEXCOORD_0,t);return r.errorUnsupportedIf(2!==n.componentCount,"TEXCOORD_0 vertex attribute must have 2 components, but found "+n.componentCount.toFixed()),5126===n.componentType?this.wrapAccessor(h.Eu,n):(r.errorUnsupportedIf(!n.normalized,"Integer component types are only supported for a normalized accessor for TEXCOORD_0."),function(e){switch(e.componentType){case 5120:return new h.Vs(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case 5121:return new h.xA(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case 5122:return new h.or(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case 5123:return new h.TS(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case 5125:return new h.qt(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case 5126:return new h.Eu(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);default:return void(0,a.Bg)(e.componentType)}}(n))}async getVertexColors(e,t){const r=this.errorContext;r.assert(null!=e.attributes.COLOR_0,"No COLOR_0 vertex data found.");const n=await this.getAccessor(e.attributes.COLOR_0,t);if(r.errorUnsupportedIf(4!==n.componentCount&&3!==n.componentCount,"COLOR_0 attribute must have 3 or 4 components, but found "+n.componentCount.toFixed()),4===n.componentCount){if(5126===n.componentType)return this.wrapAccessor(h.ek,n);if(5121===n.componentType)return this.wrapAccessor(h.mc,n);if(5123===n.componentType)return this.wrapAccessor(h.v6,n)}else if(3===n.componentCount){if(5126===n.componentType)return this.wrapAccessor(h.ct,n);if(5121===n.componentType)return this.wrapAccessor(h.ne,n);if(5123===n.componentType)return this.wrapAccessor(h.mw,n)}r.errorUnsupported("Unsupported component type for COLOR_0 attribute: "+_[n.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let n=this.materialCache.get(e.material);if(!n){const s=null!=e.material?g(this.json.materials[e.material]):g(),o=s.pbrMetallicRoughness,i=this.hasVertexColors(e),a=this.getTexture(o.baseColorTexture,t),u=this.getTexture(s.normalTexture,t),c=r?this.getTexture(s.occlusionTexture,t):null,f=r?this.getTexture(s.emissiveTexture,t):null,l=r?this.getTexture(o.metallicRoughnessTexture,t):null,d=null!=e.material?e.material:-1;n={alphaMode:s.alphaMode,alphaCutoff:s.alphaCutoff,color:o.baseColorFactor,doubleSided:!!s.doubleSided,colorTexture:await a,normalTexture:await u,name:s.name,id:d,occlusionTexture:await c,emissiveTexture:await f,emissiveFactor:s.emissiveFactor,metallicFactor:o.metallicFactor,roughnessFactor:o.roughnessFactor,metallicRoughnessTexture:await l,vertexColors:i,ESRI_externalColorMixMode:s.extras.ESRI_externalColorMixMode}}return n}async getTexture(e,t){if(!e)return null;this.errorContext.errorUnsupportedIf(0!==(e.texCoord||0),"Only TEXCOORD with index 0 is supported.");const r=e.index,n=this.errorContext,s=this.json.textures[r],o=S(null!=s.sampler?this.json.samplers[s.sampler]:{});n.errorUnsupportedIf(null==s.source,"Source is expected to be defined for a texture.");const i=this.json.images[s.source],a=await this.loadTextureImageData(r,s,t);return(0,u.s1)(this.textureCache,r,(()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>(n.error(`Unexpected TextureSampler WrapMode: ${e}. Using default REPEAT(10497).`),10497);return{data:a,wrapS:e(o.wrapS)?o.wrapS:t(o.wrapS),wrapT:e(o.wrapT)?o.wrapT:t(o.wrapT),minFilter:o.minFilter,name:i.name,id:r}}))}getNodeTransform(e){if(void 0===e)return B;let t=this.nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this.getNodeParent(e)),n=this.json.nodes[e];n.matrix?t=(0,l.m)((0,s.c)(),r,n.matrix):n.translation||n.rotation||n.scale?(t=(0,s.b)(r),n.translation&&(0,l.t)(t,t,n.translation),n.rotation&&(C[3]=(0,d.g)(C,n.rotation),(0,l.d)(t,t,C[3],C)),n.scale&&(0,l.f)(t,t,n.scale)):t=r,this.nodeTransformCache.set(e,t)}return t}wrapAccessor(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}resolveUri(e){return(0,c.hF)(e,this.baseUri)}getNodeParent(e){return this.nodeParentMap.get(e)}checkVersionSupported(){const e=f.G.parse(this.json.asset.version,"glTF");O.validate(e)}checkRequiredExtensionsSupported(){const e=this.json,t=this.errorContext;e.extensionsRequired&&0!==e.extensionsRequired.length&&t.errorUnsupported("gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}computeNodeParents(){this.json.nodes.forEach(((e,t)=>{e.children&&e.children.forEach((e=>{this.nodeParentMap.set(e,t)}))}))}async loadTextureImageData(e,t,r){const n=this.textureLoaders.get(e);if(n)return n;const s=this.createTextureLoader(t,r);return this.textureLoaders.set(e,s),s}async createTextureLoader(e,t){const r=this.json.images[e.source];if(r.uri)return this.context.loadImage(this.resolveUri(r.uri),t);const n=this.errorContext;n.errorUnsupportedIf(null==r.bufferView,"Image bufferView must be defined."),n.errorUnsupportedIf(null==r.mimeType,"Image mimeType must be defined.");const s=this.json.bufferViews[r.bufferView],o=await this.getBuffer(s.buffer,t);return n.errorUnsupportedIf(null!=s.byteStride,"byteStride not supported for image buffer"),async function(e,t){return new Promise(((r,n)=>{const s=new Blob([e],{type:t}),o=URL.createObjectURL(s),i=new Image;i.addEventListener("load",(()=>{URL.revokeObjectURL(o),"decode"in i?i.decode().then((()=>r(i)),(()=>r(i))):r(i)})),i.addEventListener("error",(e=>{URL.revokeObjectURL(o),n(e)})),i.src=o}))}(new Uint8Array(o.buffer,o.byteOffset+(s.byteOffset||0),s.byteLength),r.mimeType)}}const O=new f.G(2,0,"glTF"),B=(0,l.o)((0,s.c)(),Math.PI/2),C=(0,p.a)(),U={SCALAR:1,VEC2:2,VEC3:3,VEC4:4},A={5120:1,5121:1,5122:2,5123:2,5126:4,5125:4};async function M(e){return new Promise(((t,r)=>{const n=new Blob([e]),s=new FileReader;s.onload=()=>{const e=s.result;t(JSON.parse(e))},s.onerror=e=>{r(e)},s.readAsText(n)}))}const _={5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5125:"UNSIGNED_INT",5126:"FLOAT"};let N=0;async function R(e,t,r={},o=!0){const i=await I.load(e,j,t,r),a="gltf_"+N++,u={lods:[],materials:new Map,textures:new Map,meta:E(i)},c=!(!i.json.asset.extras||"symbolResource"!==i.json.asset.extras.ESRI_type),f=new Map;await L(i,(async(e,t,c,l)=>{var d;const p=null!=(d=f.get(c))?d:0;f.set(c,p+1);const h=void 0!==e.mode?e.mode:4,m=4===h||5===h||6===h?h:null;if((0,n.Wi)(m))return void j.warnUnsupported("Unsupported primitive mode ("+D[h]+"). Skipping primitive.");if(!i.hasPositions(e))return void j.warn("Skipping primitive without POSITION vertex attribute.");const y=i.getPositionData(e,r),b=i.getMaterial(e,r,o),w=i.hasNormals(e)?i.getNormalData(e,r):null,x=i.hasTangents(e)?i.getTangentData(e,r):null,g=i.hasTextureCoordinates(e)?i.getTextureCoordinates(e,r):null,T=i.hasVertexColors(e)?i.getVertexColors(e,r):null,S=i.getIndexData(e,r),v={transform:(0,s.b)(t),attributes:{position:await y,normal:w?await w:null,texCoord0:g?await g:null,color:T?await T:null,tangent:x?await x:null},indices:await S,primitiveType:m,material:F(u,await b,a)};let I=null;(0,n.pC)(u.meta)&&(0,n.pC)(u.meta.ESRI_lod)&&"screenSpaceRadius"===u.meta.ESRI_lod.metric&&(I=u.meta.ESRI_lod.thresholds[c]),u.lods[c]=u.lods[c]||{parts:[],name:l,lodThreshold:I},u.lods[c].parts[p]=v}));for(const e of u.lods)e.parts=e.parts.filter((e=>!!e));return{model:u,meta:{isEsriSymbolResource:c,uri:i.uri},customMeta:{}}}function E(e){const t=e.json;let r=null;return t.nodes.forEach((e=>{const t=e.extras;(0,n.pC)(t)&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)})),r}async function L(e,t){const r=e.json,n=r.scenes[r.scene||0].nodes,s=n.length>1,o=[];for(const e of n){const t=r.nodes[e];o.push(i(e,0)),P(t)&&!s&&t.extensions.MSFT_lod.ids.forEach(((e,t)=>i(e,t+1)))}async function i(n,s){const a=r.nodes[n],u=e.getNodeTransform(n);if(j.warnUnsupportedIf(null!=a.weights,"Morph targets are not supported."),null!=a.mesh){const e=r.meshes[a.mesh];for(const r of e.primitives)o.push(t(r,u,s,e.name))}for(const e of a.children||[])o.push(i(e,s))}await Promise.all(o)}function P(e){return e.extensions&&e.extensions.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function F(e,t,r){const n=t=>{const n=`${r}_tex_${t&&t.id}${t&&t.name?"_"+t.name:""}`;if(t&&!e.textures.has(n)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:10497,t:10497,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:k.some((e=>e===t.minFilter)),noUnpackFlip:!0});e.textures.set(n,r)}return n},s=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(s)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclustion:!0,textureColor:null,textureNormal:null,textureOcclusion:null,textureEmissive:null,textureMetallicRoughness:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,textureColor:t.colorTexture?n(t.colorTexture):void 0,textureNormal:t.normalTexture?n(t.normalTexture):void 0,textureOcclusion:t.occlusionTexture?n(t.occlusionTexture):void 0,textureEmissive:t.emissiveTexture?n(t.emissiveTexture):void 0,textureMetallicRoughness:t.metallicRoughnessTexture?n(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor});e.materials.set(s,r)}return s}const j=new class{error(e){throw new o.Z("gltf-loader-error",e)}errorUnsupported(e){throw new o.Z("gltf-loader-unsupported-feature",e)}errorUnsupportedIf(e,t){e&&this.errorUnsupported(t)}assert(e,t){e||this.error(t)}warn(e){i.warn(e)}warnUnsupported(e){this.warn("[Unsupported Feature] "+e)}warnUnsupportedIf(e,t){e&&this.warnUnsupported(t)}},k=[9987,9985],D=["POINTS","LINES","LINE_LOOP","LINE_STRIP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN"]},17753:(e,t,r)=>{r.d(t,{NO:()=>m,cM:()=>h,p:()=>d,DX:()=>p});var n=r(17896),s=r(65617),o=r(22807),i=(r(4307),r(16996));r(12981),new o.x(i.Ue),new o.x((()=>({p0:null,p1:null,p2:null})));const a=(0,s.c)(),u=(0,s.c)();let c=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const f=new Uint16Array([0]),l=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function d(e){if(1===e)return f;if(e<l.length)return new Uint16Array(l.buffer,0,e);if(e>c.length){const t=Math.max(2*c.length,e);c=new Uint32Array(t);for(let e=0;e<c.length;e++)c[e]=e}return new Uint32Array(c.buffer,0,e)}function p(e){if(1===e)return new Uint16Array(f);if(e<l.length)return new Uint16Array(l.slice(0,e));if(e>c.length){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}return new Uint32Array(c.slice(0,e))}function h(e,t,r){if(!e)return!1;const{size:s,data:o}=e;(0,n.s)(r,0,0,0),(0,n.s)(x,0,0,0);let i=0,c=0;for(let e=0;e<t.length-2;e+=3){const p=t[e+0]*s,h=t[e+1]*s,m=t[e+2]*s;(0,n.s)(y,o[p+0],o[p+1],o[p+2]),(0,n.s)(b,o[h+0],o[h+1],o[h+2]),(0,n.s)(w,o[m+0],o[m+1],o[m+2]);const g=(f=y,l=b,d=w,(0,n.f)(a,l,f),(0,n.f)(u,d,f),(0,n.l)((0,n.c)(a,a,u))/2);g?((0,n.b)(y,y,b),(0,n.b)(y,y,w),(0,n.a)(y,y,1/3*g),(0,n.b)(r,r,y),i+=g):((0,n.b)(x,x,y),(0,n.b)(x,x,b),(0,n.b)(x,x,w),c+=3)}var f,l,d;return!(0===c&&0===i||(0!==i?((0,n.a)(r,r,1/i),0):0===c||((0,n.a)(r,x,1/c),0)))}function m(e,t,r){if(!e||!t)return!1;const{size:s,data:o}=e;(0,n.s)(r,0,0,0);let i=-1,a=0;for(let e=0;e<t.length;e++){const n=t[e]*s;i!==n&&(r[0]+=o[n+0],r[1]+=o[n+1],r[2]+=o[n+2],a++),i=n}return a>1&&(0,n.a)(r,r,1/a),a>0}const y=(0,s.c)(),b=(0,s.c)(),w=(0,s.c)(),x=(0,s.c)()},57758:(e,t,r)=>{r.d(t,{K:()=>n});const n=2.1}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5235],{15235:(e,t,i)=>{i.r(t),i.d(t,{default:()=>I});var r=i(43697),o=i(99880),a=i(20102),s=i(10736),n=i(22974),l=i(83379),p=i(70586),c=i(17452),d=i(5600),u=i(75215),h=i(71715),m=i(52011),y=i(6570),g=i(65587),b=i(15923),v=i(92604),f=(i(67676),i(80442),i(90578));const w=v.Z.getLogger("esri.portal.PortalItemResource");let k=class extends b.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this.normalizePath(e.path,e.portalItem)}:e}set path(e){(0,p.pC)(e)&&(0,c.YP)(e)?w.error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this.normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const i=this.url;if((0,p.Wi)(i))throw new a.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal._request(i,{responseType:e,query:{token:this.portalItem.apiKey},signal:(0,p.U2)(t,"signal")})}async update(e,t){return(await i.e(7873).then(i.bind(i,97873))).addOrUpdateResource(this,"update",e,t)}hasPath(){return(0,p.pC)(this.path)}normalizePath(e,t){return(0,p.Wi)(e)?e:(e=e.replace(/^\/+/,""),(0,p.pC)(t)&&(0,c.YP)(e)&&(e=(0,c.PF)(e,t.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,r._)([(0,d.Cb)()],k.prototype,"portalItem",void 0),(0,r._)([(0,d.Cb)({type:String,value:null})],k.prototype,"path",null),(0,r._)([(0,f.p)("path")],k.prototype,"_castPath",null),(0,r._)([(0,d.Cb)({type:String,readOnly:!0})],k.prototype,"url",null),(0,r._)([(0,d.Cb)({type:String,readOnly:!0})],k.prototype,"itemRelativeUrl",null),k=(0,r._)([(0,m.j)("esri.portal.PortalItemResource")],k);const x=k;let C=class extends b.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,r._)([(0,d.Cb)()],C.prototype,"created",void 0),(0,r._)([(0,d.Cb)()],C.prototype,"rating",void 0),C=(0,r._)([(0,m.j)("esri.portal.PortalRating")],C);const O=C;var _;let S=_=class extends((0,s.eC)(l.Z)){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return(0,u.TJ)(_,e)}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.indexOf("Table")>-1?"Table":t.indexOf("Route Layer")>-1?"Route Layer":t.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?i=t.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":t.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?i=t.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?i="Locator":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=-1===t.indexOf("Spatiotemporal")&&(t.indexOf("Hosted Service")>-1||t.indexOf("Tiled")>-1)&&-1===t.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?i=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"OGCFeatureServer"===e&&(i="OGC Feature Layer"),i}readExtent(e){return e&&e.length?new y.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",t=this.typeKeywords||[];let i,r=!1,a=!1,s=!1,n=!1,l=!1,p=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(r=t.indexOf("Hosted Service")>-1,"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(a=t.indexOf("Table")>-1,s=t.indexOf("Route Layer")>-1,n=t.indexOf("Markup")>-1,l=-1!==t.indexOf("Spatiotemporal"),p=-1!==t.indexOf("UtilityNetwork"),i=l&&a?"spatiotemporaltable":a?"table":s?"routelayer":n?"markup":l?"spatiotemporal":r?"featureshosted":p?"utilitynetwork":"features"):i="map service"===e||"wms"===e||"wmts"===e?r||t.indexOf("Tiled")>-1||"wmts"===e?"maptiles":"mapimages":"scene service"===e?t.indexOf("Line")>-1?"sceneweblayerline":t.indexOf("3DObject")>-1?"sceneweblayermultipatch":t.indexOf("Point")>-1?"sceneweblayerpoint":t.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":t.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":t.indexOf("Polygon")>-1?"sceneweblayerpolygon":t.indexOf("Building")>-1?"sceneweblayerbuilding":t.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.indexOf("Elevation 3D Layer")>-1?"elevationlayer":t.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e&&t.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):i="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?t.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.indexOf("ArcGIS Pro")>-1||"explorer map"===e&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&t.indexOf("Explorer Mapping Application")>-1||t.indexOf("Document")>-1?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"maps",i?(0,o.V)("esri/images/portal/"+i+"16.png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}get itemUrl(){const e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){this.portal||(this.portal=g.Z.getDefault());const t=this.portal.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:(0,p.pC)(e)?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}addRating(e){const t={method:"post",query:{}};return e instanceof O&&(e=e.rating),isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal._request(this.itemUrl+"/addRating",t).then((()=>new O({rating:e,created:new Date})))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,n.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,n.d9)(this.categories),created:(0,n.d9)(this.created),culture:this.culture,description:this.description,extent:(0,n.d9)(this.extent),groupCategories:(0,n.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,n.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,n.d9)(this.screenshots),size:this.size,snippet:this.snippet,tags:(0,n.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,n.d9)(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new _({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((()=>{}))}fetchData(e="json",t){return this.portal._request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then((e=>null!=e.rating?(e.created=new Date(e.created),new O(e)):null))}fetchRelatedItems(e,t){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},_)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e&&e.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal._request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new a.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)(0,c.HK)(t)?r.query={data:t}:r.query={url:(0,c.hF)(t)},(0,p.pC)(i)&&(r.query.filename=i);else{const e=new FormData;(0,p.pC)(i)?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal._request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new a.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){return(await i.e(7873).then(i.bind(i,97873))).fetchResources(this,e,t)}async addResource(e,t,r){const o=await i.e(7873).then(i.bind(i,97873));return e.portalItem=this,o.addOrUpdateResource(e,"add",t,r)}async removeResource(e,t){const r=await i.e(7873).then(i.bind(i,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new a.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r.removeResource(this,e,t)}async removeAllResources(e){return(await i.e(7873).then(i.bind(i,97873))).removeAllResources(this,e)}resourceFromPath(e){return new x({portalItem:this,path:e})}toJSON(){const e=this.extent,t={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return(0,n.yd)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new _({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,r._)([(0,d.Cb)({type:["private","shared","org","public"]})],S.prototype,"access",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"accessInformation",void 0),(0,r._)([(0,d.Cb)({type:String})],S.prototype,"apiKey",void 0),(0,r._)([(0,d.Cb)({json:{read:{source:"appProxies"}}})],S.prototype,"applicationProxies",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"avgRating",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"categories",void 0),(0,r._)([(0,d.Cb)({type:Date})],S.prototype,"created",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"culture",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"description",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],S.prototype,"displayName",null),(0,r._)([(0,d.Cb)({type:y.Z})],S.prototype,"extent",void 0),(0,r._)([(0,h.r)("extent")],S.prototype,"readExtent",null),(0,r._)([(0,d.Cb)()],S.prototype,"groupCategories",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],S.prototype,"iconUrl",null),(0,r._)([(0,d.Cb)()],S.prototype,"id",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],S.prototype,"isLayer",null),(0,r._)([(0,d.Cb)()],S.prototype,"itemControl",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],S.prototype,"itemUrl",null),(0,r._)([(0,d.Cb)()],S.prototype,"licenseInfo",void 0),(0,r._)([(0,d.Cb)({type:Date})],S.prototype,"modified",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"name",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"numComments",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"numRatings",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"numViews",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"owner",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"ownerFolder",void 0),(0,r._)([(0,d.Cb)({type:g.Z})],S.prototype,"portal",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"screenshots",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"size",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"snippet",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"sourceJSON",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"tags",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"thumbnail",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],S.prototype,"thumbnailUrl",null),(0,r._)([(0,d.Cb)()],S.prototype,"title",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"type",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"typeKeywords",void 0),(0,r._)([(0,d.Cb)()],S.prototype,"url",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],S.prototype,"userItemUrl",null),S=_=(0,r._)([(0,m.j)("esri.portal.PortalItem")],S);const I=S}}]);
@@ -1,4 +0,0 @@
1
- import "../interfaces";
2
-
3
- import AreaMeasurementLayer = __esri.AreaMeasurementLayer;
4
- export default AreaMeasurementLayer;
@@ -1,4 +0,0 @@
1
- import "../interfaces";
2
-
3
- import DirectLineMeasurementLayer = __esri.DirectLineMeasurementLayer;
4
- export default DirectLineMeasurementLayer;
@@ -1,4 +0,0 @@
1
- import "../../interfaces";
2
-
3
- import symbolPreview = __esri.symbolPreview;
4
- export = symbolPreview;
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.22/esri/copyright.txt for details.
4
- */
5
- import{renderPreviewHTML as r}from"./symbolUtils.js";function e(e,o){return r(e,o)}export{e as renderPreviewHTML};
@@ -1,4 +0,0 @@
1
- import "../../../interfaces";
2
-
3
- import AreaMeasurementLayerView3D = __esri.AreaMeasurementLayerView3D;
4
- export default AreaMeasurementLayerView3D;
@@ -1,4 +0,0 @@
1
- import "../../../interfaces";
2
-
3
- import DirectLineMeasurementLayerView3D = __esri.DirectLineMeasurementLayerView3D;
4
- export default DirectLineMeasurementLayerView3D;