@arcgis/core 5.0.0-next.69 → 5.0.0-next.70

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 (310) hide show
  1. package/Map.d.ts +3 -1
  2. package/analysis/Analysis.d.ts +1 -0
  3. package/analysis/Dimension/types.d.ts +1 -0
  4. package/analysis/DimensionAnalysis.d.ts +10 -10
  5. package/analysis/DimensionSimpleStyle.d.ts +14 -13
  6. package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
  7. package/analysis/DistanceMeasurementAnalysis.d.ts +2 -1
  8. package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +3 -3
  9. package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +1 -1
  10. package/analysis/ElevationProfile/types.d.ts +2 -0
  11. package/analysis/LengthDimension.d.ts +22 -21
  12. package/analysis/LineOfSightAnalysis.d.ts +2 -2
  13. package/analysis/ShadowCast/MinDurationOptions.d.ts +2 -2
  14. package/analysis/ShadowCast/types.d.ts +6 -2
  15. package/analysis/Slice/types.d.ts +1 -0
  16. package/analysis/Viewshed.d.ts +22 -20
  17. package/analysis/ViewshedAnalysis.d.ts +13 -13
  18. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -2
  19. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +2 -2
  20. package/analysis/VolumeMeasurement/types.d.ts +1 -0
  21. package/analysis/VolumeMeasurementAnalysis.d.ts +1 -0
  22. package/analysis/types.d.ts +5 -0
  23. package/arcade.d.ts +2 -2
  24. package/assets/esri/core/workers/RemoteClient.js +1 -1
  25. package/assets/esri/core/workers/chunks/04364f3dd7578c2acb71.js +1 -0
  26. package/assets/esri/core/workers/chunks/18ed69d563986dc2eb21.js +1 -0
  27. package/assets/esri/core/workers/chunks/{4c04c54330b693892cfc.js → 1a45b4b4803337f4b99f.js} +2 -2
  28. package/assets/esri/core/workers/chunks/{60c7f896f2246a8aa6d7.js → 244006d4b0547d574401.js} +53 -53
  29. package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +1 -0
  30. package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +1 -0
  31. package/assets/esri/core/workers/chunks/{944dfa9309da8f49a616.js → 6a3d66d7c92f90cc2a17.js} +1 -1
  32. package/assets/esri/core/workers/chunks/760a759f9697adde6dd4.js +1 -0
  33. package/assets/esri/core/workers/chunks/798d227205bd958de6a7.js +1 -0
  34. package/assets/esri/core/workers/chunks/{9d88b4ba8e511da64583.js → 98d68b145226e7527c84.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{8ad6595ad44c2d60c1ce.js → a79fad422d41019c8232.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{10e474d664b20adcd917.js → db4661fd82dc61162115.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{1d1e25bb61eeeee8ee94.js → df2ba5f9d57080fca183.js} +1 -1
  38. package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +5 -3
  39. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +15 -11
  40. package/assets/esri/themes/dark/main.css +1 -1
  41. package/assets/esri/themes/light/main.css +1 -1
  42. package/assets/esri/themes/light/view.css +1 -1
  43. package/chunks/ComponentShader.glsl.js +43 -43
  44. package/chunks/DefaultMaterial.glsl.js +1 -1
  45. package/config.js +1 -1
  46. package/form/elements/inputs/attachments/Input.d.ts +6 -6
  47. package/geometry/Mesh.d.ts +20 -21
  48. package/geometry/Polygon.d.ts +1 -8
  49. package/geometry/Polygon.js +1 -1
  50. package/geometry/geometryEngine.d.ts +19 -19
  51. package/geometry/support/MeshComponent.d.ts +3 -3
  52. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +2 -2
  53. package/geometry/support/MeshLocalVertexSpace.d.ts +2 -2
  54. package/geometry/support/MeshMaterial.d.ts +8 -8
  55. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  56. package/geometry/support/MeshTexture.d.ts +3 -3
  57. package/geometry/support/MeshTextureTransform.d.ts +3 -3
  58. package/geometry/support/MeshTransform.d.ts +1 -1
  59. package/geometry/support/MeshVertexAttributes.d.ts +13 -5
  60. package/geometry/support/intersects.js +1 -1
  61. package/geometry/support/intersectsBase.js +1 -1
  62. package/geometry/support/meshUtils/centerAt.js +1 -1
  63. package/geometry/support/meshUtils/geographicUtils.js +1 -1
  64. package/geometry/support/meshUtils/georeference.js +1 -1
  65. package/geometry/support/meshUtils/rotate.js +1 -1
  66. package/geometry/support/meshUtils/scale.js +1 -1
  67. package/geometry/support/meshUtils/types.d.ts +44 -52
  68. package/geometry/support/meshUtils.d.ts +6 -50
  69. package/geometry/support/meshUtils.js +1 -1
  70. package/interfaces.d.ts +5 -151
  71. package/kernel.js +1 -1
  72. package/layers/BaseDynamicLayer.d.ts +2 -2
  73. package/layers/BaseElevationLayer.d.ts +2 -2
  74. package/layers/BuildingSceneLayer.d.ts +2 -2
  75. package/layers/CSVLayer.d.ts +2 -2
  76. package/layers/CatalogLayer.d.ts +2 -2
  77. package/layers/DimensionLayer.d.ts +2 -2
  78. package/layers/ElevationLayer.d.ts +2 -2
  79. package/layers/FeatureLayer.d.ts +2 -2
  80. package/layers/GeoJSONLayer.d.ts +2 -2
  81. package/layers/GeoRSSLayer.d.ts +2 -2
  82. package/layers/GraphicsLayer.d.ts +2 -2
  83. package/layers/GroupLayer.d.ts +2 -2
  84. package/layers/ImageryLayer.d.ts +2 -2
  85. package/layers/ImageryTileLayer.d.ts +2 -2
  86. package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -2
  87. package/layers/IntegratedMeshLayer.d.ts +2 -2
  88. package/layers/KMLLayer.d.ts +2 -2
  89. package/layers/Layer.d.ts +9 -7
  90. package/layers/LineOfSightLayer.d.ts +3 -3
  91. package/layers/MapImageLayer.d.ts +2 -2
  92. package/layers/MapNotesLayer.d.ts +2 -2
  93. package/layers/MediaLayer.d.ts +2 -2
  94. package/layers/OGCFeatureLayer.d.ts +2 -2
  95. package/layers/OrientedImageryLayer.d.ts +2 -2
  96. package/layers/ParquetLayer.d.ts +2 -2
  97. package/layers/PointCloudLayer.d.ts +2 -2
  98. package/layers/RouteLayer.d.ts +2 -2
  99. package/layers/SceneLayer.d.ts +2 -2
  100. package/layers/SubtypeGroupLayer.d.ts +2 -2
  101. package/layers/TileLayer.d.ts +2 -2
  102. package/layers/UnknownLayer.d.ts +2 -2
  103. package/layers/UnsupportedLayer.d.ts +2 -2
  104. package/layers/VectorTileLayer.d.ts +2 -2
  105. package/layers/VideoLayer.d.ts +2 -2
  106. package/layers/ViewshedLayer.d.ts +2 -2
  107. package/layers/VoxelLayer.d.ts +2 -2
  108. package/layers/WCSLayer.d.ts +2 -2
  109. package/layers/WFSLayer.d.ts +2 -2
  110. package/layers/WMSLayer.d.ts +2 -2
  111. package/layers/WMTSLayer.d.ts +2 -2
  112. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -2
  113. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
  114. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  115. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  116. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  117. package/layers/orientedImagery/transformations/utils.js +1 -1
  118. package/layers/raster/types.d.ts +8 -1
  119. package/layers/support/PixelBlock.d.ts +7 -7
  120. package/layers/support/RasterInfo.d.ts +2 -9
  121. package/layers/types.d.ts +77 -2
  122. package/networks/support/CircuitSection.d.ts +20 -2
  123. package/networks/support/CircuitSection.js +1 -1
  124. package/networks/support/Subcircuit.d.ts +12 -10
  125. package/networks/support/Subcircuit.js +1 -1
  126. package/networks/support/typeUtils.d.ts +2 -0
  127. package/networks/support/typeUtils.js +1 -1
  128. package/package.json +2 -2
  129. package/rest/support/AttributeBinsQuery.d.ts +7 -1
  130. package/rest/support/NormalizationBinParametersMixin.d.ts +29 -9
  131. package/support/revision.js +1 -1
  132. package/symbols/patterns/LinePattern3D.d.ts +3 -3
  133. package/symbols/patterns/Pattern3D.d.ts +3 -3
  134. package/unionTypes.d.ts +17 -17
  135. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +6 -5
  136. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +7 -6
  137. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  138. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  139. package/views/2d/types.d.ts +1 -1
  140. package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +2 -2
  141. package/views/3d/analysis/DirectLineMeasurement/types.d.ts +1 -0
  142. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  143. package/views/3d/analysis/VolumeMeasurement/types.d.ts +1 -0
  144. package/views/3d/analysis/types.d.ts +2 -0
  145. package/views/3d/constraints/Constraints.d.ts +2 -2
  146. package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
  147. package/views/3d/environment/CloudsComposition.js +1 -1
  148. package/views/3d/environment/Fog.js +1 -1
  149. package/views/3d/layers/DimensionLayerView3D.js +1 -1
  150. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  151. package/views/3d/layers/I3SMeshView3D.js +1 -1
  152. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  153. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  154. package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
  155. package/views/3d/layers/ViewshedLayerView3D.js +1 -1
  156. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  157. package/views/3d/support/LayerPerformanceInfo.d.ts +1 -1
  158. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  159. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  160. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  161. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  162. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
  163. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  164. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  165. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  166. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +1 -1
  167. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  168. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  169. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +7 -7
  170. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  171. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  172. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  173. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  174. package/views/3d/webgl-engine/materials/ViewingModeConfiguration.js +5 -0
  175. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -2
  176. package/views/BreakpointsOwner.d.ts +9 -10
  177. package/views/MapView.d.ts +18 -17
  178. package/views/SceneView.d.ts +30 -89
  179. package/views/SceneView.js +1 -1
  180. package/views/View2D.d.ts +0 -37
  181. package/views/View2D.js +1 -1
  182. package/views/ViewAnimation.d.ts +2 -3
  183. package/views/analysis/ElevationProfile/types.d.ts +7 -6
  184. package/views/analysis/types.d.ts +1 -0
  185. package/views/animation/types.d.ts +3 -1
  186. package/views/layers/DimensionLayerView.d.ts +97 -4
  187. package/views/layers/DimensionLayerView.js +1 -1
  188. package/views/layers/HighlightLayerViewMixin.d.ts +1 -59
  189. package/views/layers/HighlightLayerViewMixin.js +1 -1
  190. package/views/layers/ImageryLayerViewMixin.d.ts +1 -55
  191. package/views/layers/LineOfSightLayerView.d.ts +77 -4
  192. package/views/layers/LineOfSightLayerView.js +1 -1
  193. package/views/layers/ViewshedLayerView.d.ts +96 -5
  194. package/views/layers/ViewshedLayerView.js +1 -1
  195. package/views/navigation/Navigation.d.ts +1 -22
  196. package/views/navigation/Navigation.js +1 -1
  197. package/views/support/Scheduler.js +1 -1
  198. package/views/types.d.ts +75 -5
  199. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +4 -4
  200. package/widgets/AreaMeasurement3D.d.ts +2 -2
  201. package/widgets/BasemapGallery.d.ts +1 -1
  202. package/widgets/BasemapToggle.d.ts +1 -1
  203. package/widgets/Bookmarks.d.ts +1 -1
  204. package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +2 -2
  205. package/widgets/BuildingExplorer/BuildingLevel.d.ts +2 -2
  206. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +2 -2
  207. package/widgets/BuildingExplorer/BuildingPhase.d.ts +2 -2
  208. package/widgets/BuildingExplorer.d.ts +3 -3
  209. package/widgets/Compass.d.ts +1 -1
  210. package/widgets/CoordinateConversion.d.ts +1 -1
  211. package/widgets/Daylight/DaylightViewModel.d.ts +3 -3
  212. package/widgets/Daylight/VisibleElements.d.ts +2 -2
  213. package/widgets/Daylight/types.d.ts +2 -2
  214. package/widgets/Daylight.d.ts +3 -3
  215. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +4 -4
  216. package/widgets/DirectLineMeasurement3D.d.ts +2 -2
  217. package/widgets/DirectionalPad.d.ts +1 -1
  218. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  219. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
  220. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
  221. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
  222. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +3 -3
  223. package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +2 -2
  224. package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +2 -2
  225. package/widgets/ElevationProfile/types.d.ts +9 -9
  226. package/widgets/ElevationProfile.d.ts +2 -2
  227. package/widgets/Expand/ExpandViewModel.d.ts +1 -1
  228. package/widgets/Expand.d.ts +1 -1
  229. package/widgets/Feature.d.ts +1 -1
  230. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
  231. package/widgets/Features.d.ts +1 -1
  232. package/widgets/Fullscreen/FullscreenViewModel.d.ts +1 -1
  233. package/widgets/Fullscreen.d.ts +1 -1
  234. package/widgets/Home.d.ts +1 -1
  235. package/widgets/LayerList.d.ts +12 -0
  236. package/widgets/Legend.d.ts +1 -1
  237. package/widgets/LineOfSight/LineOfSightTarget.d.ts +2 -2
  238. package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
  239. package/widgets/LineOfSight.d.ts +2 -2
  240. package/widgets/Locate/LocateViewModel.d.ts +1 -1
  241. package/widgets/Locate.d.ts +1 -1
  242. package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
  243. package/widgets/NavigationToggle.d.ts +1 -1
  244. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  245. package/widgets/OrientedImageryViewer/components/Arrow.js +1 -1
  246. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  247. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  248. package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
  249. package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
  250. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
  251. package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
  252. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  253. package/widgets/OrientedImageryViewer/constants.js +1 -1
  254. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  255. package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
  256. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  257. package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +5 -0
  258. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
  259. package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +1 -1
  260. package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +5 -0
  261. package/widgets/OrientedImageryViewer/utils.js +1 -1
  262. package/widgets/OrientedImageryViewer.js +1 -1
  263. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  264. package/widgets/PanoramicViewer.js +1 -1
  265. package/widgets/Print/CustomTemplate.d.ts +1 -1
  266. package/widgets/Print/PrintViewModel.d.ts +1 -1
  267. package/widgets/Print.d.ts +1 -1
  268. package/widgets/ScaleBar.d.ts +1 -1
  269. package/widgets/Search.d.ts +1 -1
  270. package/widgets/ShadowCast/DiscreteOptions.d.ts +2 -2
  271. package/widgets/ShadowCast/DurationOptions.d.ts +2 -2
  272. package/widgets/ShadowCast/ShadowCastViewModel.d.ts +3 -3
  273. package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -2
  274. package/widgets/ShadowCast/ThresholdOptions.d.ts +2 -2
  275. package/widgets/ShadowCast/types.d.ts +2 -2
  276. package/widgets/ShadowCast.d.ts +1 -1
  277. package/widgets/Slice/SliceViewModel.d.ts +2 -2
  278. package/widgets/Slice.d.ts +2 -2
  279. package/widgets/Swipe.d.ts +1 -1
  280. package/widgets/TimeZoneLabel.d.ts +1 -1
  281. package/widgets/Track.d.ts +1 -1
  282. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  283. package/widgets/VideoPlayer.d.ts +1 -1
  284. package/widgets/VideoPlayer.js +1 -1
  285. package/widgets/Weather/VisibleElements.d.ts +2 -2
  286. package/widgets/Weather/WeatherViewModel.d.ts +2 -2
  287. package/widgets/Weather/types.d.ts +1 -1
  288. package/widgets/Weather.d.ts +2 -2
  289. package/widgets/Zoom.d.ts +1 -1
  290. package/widgets/support/GridControls.d.ts +1 -1
  291. package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +0 -1
  292. package/assets/esri/core/workers/chunks/3cce8e894bf37c3e598e.js +0 -1
  293. package/assets/esri/core/workers/chunks/7ee68f67f9cc48a328f0.js +0 -1
  294. package/assets/esri/core/workers/chunks/a931515a2569713e743b.js +0 -1
  295. package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +0 -1
  296. package/assets/esri/core/workers/chunks/c9f868f85d740ee32715.js +0 -1
  297. package/geometry.d.ts +0 -136
  298. package/geometry.js +0 -5
  299. package/pointCloudRenderers.d.ts +0 -112
  300. package/pointCloudRenderers.js +0 -5
  301. package/rasterRenderers.d.ts +0 -151
  302. package/rasterRenderers.js +0 -5
  303. package/renderers.d.ts +0 -166
  304. package/renderers.js +0 -5
  305. package/views/layers/DimensionLayerViewMixin.d.ts +0 -1
  306. package/views/layers/DimensionLayerViewMixin.js +0 -5
  307. package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -1
  308. package/views/layers/LineOfSightLayerViewMixin.js +0 -5
  309. package/views/layers/ViewshedLayerViewMixin.d.ts +0 -98
  310. package/views/layers/ViewshedLayerViewMixin.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9616],{4095:(t,e,n)=>{n.d(e,{CW:()=>c,DE:()=>m,S1:()=>p});var i=n(44208),r=n(53966),s=n(34727),o=n(74887),a=n(87811),l=n(78659);n(5443),n(21325);const h=()=>r.A.getLogger("esri.views.2d.engine.flow.dataUtils"),u=10;async function c(t,e,n,r){const s=performance.now(),l=m(e,n),c=performance.now(),f=p(e,l,n.width,n.height),x=performance.now(),y=function(t){const e=new a.A,n=t.reduce((t,e)=>t+e.vertices.length,0),i=new Float32Array(4*n),r=new Array(t.length);let s=0,o=0;for(const{vertices:n}of t){const t=s;for(const t of n)i[4*s]=t.x,i[4*s+1]=t.y,i[4*s+2]=t.time,i[4*s+3]=t.speed,s++;r[o++]={startVertex:t,numberOfVertices:n.length,totalTime:n[n.length-1].time,timeSeed:e.getFloat()}}return{lineVertices:i,lineDescriptors:r}}(f),d=performance.now(),g="Streamlines"===t?function(t,e){const{lineVertices:n,lineDescriptors:i}=t;let r=0,s=0;for(const t of i)r+=2*t.numberOfVertices,s+=6*(t.numberOfVertices-1);const o=new Float32Array(9*r),a=new Uint32Array(s);let l=0,h=0;function u(){a[h++]=l-2,a[h++]=l,a[h++]=l-1,a[h++]=l,a[h++]=l+1,a[h++]=l-1}function c(t,e,n,i,r,s,a,h){const u=9*l;let c=0;o[u+c++]=t,o[u+c++]=e,o[u+c++]=1,o[u+c++]=n,o[u+c++]=s,o[u+c++]=a,o[u+c++]=i/2,o[u+c++]=r/2,o[u+c++]=h,l++,o[u+c++]=t,o[u+c++]=e,o[u+c++]=-1,o[u+c++]=n,o[u+c++]=s,o[u+c++]=a,o[u+c++]=-i/2,o[u+c++]=-r/2,o[u+c++]=h,l++}for(const t of i){const{totalTime:i,timeSeed:r}=t;let s=null,o=null,a=null,l=null,h=null,m=null;for(let f=0;f<t.numberOfVertices;f++){const x=n[4*(t.startVertex+f)],p=n[4*(t.startVertex+f)+1],y=n[4*(t.startVertex+f)+2],d=n[4*(t.startVertex+f)+3];let g=null,M=null,w=null,v=null;if(f>0){g=x-s,M=p-o;const t=Math.sqrt(g*g+M*M);if(g/=t,M/=t,f>1){let t=g+h,n=M+m;const i=Math.sqrt(t*t+n*n);t/=i,n/=i;const r=Math.min(1/(t*g+n*M),e);t*=r,n*=r,w=-n,v=t}else w=-M,v=g;null!==w&&null!==v&&(c(s,o,a,w,v,i,r,d),u())}s=x,o=p,a=y,h=g,m=M,l=d}c(s,o,a,-m,h,i,r,l)}return{vertexData:o,indexData:a}}(y,u):function(t){const{lineVertices:e,lineDescriptors:n}=t;let i=0,r=0;for(const t of n){const e=t.numberOfVertices-1;i+=4*e*2,r+=6*e*2}const s=new Float32Array(16*i),o=new Uint32Array(r);let a,l,h,u,c,m,f,x,p,y,d,g,M,w,v=0,z=0;function b(){o[z++]=v-8,o[z++]=v-7,o[z++]=v-6,o[z++]=v-7,o[z++]=v-5,o[z++]=v-6,o[z++]=v-4,o[z++]=v-3,o[z++]=v-2,o[z++]=v-3,o[z++]=v-1,o[z++]=v-2}function C(t,e,n,i,r,o,a,l,h,u,c,m,f,x){const p=16*v;let y=0;for(const d of[1,2])for(const g of[1,2,3,4])s[p+y++]=t,s[p+y++]=e,s[p+y++]=n,s[p+y++]=i,s[p+y++]=a,s[p+y++]=l,s[p+y++]=h,s[p+y++]=u,s[p+y++]=d,s[p+y++]=g,s[p+y++]=f,s[p+y++]=x,s[p+y++]=r/2,s[p+y++]=o/2,s[p+y++]=c/2,s[p+y++]=m/2,v++}function R(t,e){let n=p+d,i=y+g;const r=Math.sqrt(n*n+i*i);n/=r,i/=r;const s=p*n+y*i;n/=s,i/=s;let o=d+M,v=g+w;const z=Math.sqrt(o*o+v*v);o/=z,v/=z;const R=d*o+g*v;o/=R,v/=R,C(a,l,h,u,-i,n,c,m,f,x,-v,o,t,e),b()}function A(t,e,n,i,r,s){if(p=d,y=g,d=M,g=w,null==p&&null==y&&(p=d,y=g),null!=c&&null!=m){M=t-c,w=e-m;const n=Math.sqrt(M*M+w*w);M/=n,w/=n}null!=p&&null!=y&&R(r,s),a=c,l=m,h=f,u=x,c=t,m=e,f=n,x=i}function Z(t,e){p=d,y=g,d=M,g=w,null==p&&null==y&&(p=d,y=g),null!=p&&null!=y&&R(t,e)}for(const t of n){a=null,l=null,h=null,u=null,c=null,m=null,f=null,x=null,p=null,y=null,d=null,g=null,M=null,w=null;const{totalTime:n,timeSeed:i}=t;for(let r=0;r<t.numberOfVertices;r++)A(e[4*(t.startVertex+r)],e[4*(t.startVertex+r)+1],e[4*(t.startVertex+r)+2],e[4*(t.startVertex+r)+3],n,i);Z(n,i)}return{vertexData:s,indexData:o}}(y),M=performance.now();return(0,i.A)("esri-2d-profiler")&&(h().info("I.1","_createFlowFieldFromData (ms)",Math.round(c-s)),h().info("I.2","_getStreamlines (ms)",Math.round(x-c)),h().info("I.3","createAnimatedLinesData (ms)",Math.round(d-x)),h().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(M-d)),h().info("I.5","createFlowMesh (ms)",Math.round(M-s)),h().info("I.6","Mesh size (bytes)",g.vertexData.buffer.byteLength+g.indexData.buffer.byteLength)),await Promise.resolve(),(0,o.Te)(r),g}function m(t,e){const n=function(t,e,n,i){if(0===i)return t;const r=Math.round(3*i),s=new Array(2*r+1);let o=0;for(let t=-r;t<=r;t++){const e=Math.exp(-t*t/(i*i));s[t+r]=e,o+=e}for(let t=-r;t<=r;t++)s[t+r]/=o;const a=new Float32Array(t.length);for(let i=0;i<n;i++)for(let n=0;n<e;n++){let o=0,l=0;for(let a=-r;a<=r;a++){if(n+a<0||n+a>=e)continue;const h=s[a+r];o+=h*t[2*(i*e+(n+a))],l+=h*t[2*(i*e+(n+a))+1]}a[2*(i*e+n)]=o,a[2*(i*e+n)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let i=0;i<n;i++){let o=0,h=0;for(let l=-r;l<=r;l++){if(i+l<0||i+l>=n)continue;const u=s[l+r];o+=u*a[2*((i+l)*e+t)],h+=u*a[2*((i+l)*e+t)+1]}l[2*(i*e+t)]=o,l[2*(i*e+t)+1]=h}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,i)=>{const r=Math.floor(t),s=Math.floor(i);if(r<0||r>=e.width)return[0,0];if(s<0||s>=e.height)return[0,0];const o=t-r,a=i-s,l=r,h=s,u=r<e.width-1?r+1:r,c=s<e.height-1?s+1:s,m=n[2*(h*e.width+l)],f=n[2*(h*e.width+u)],x=n[2*(c*e.width+l)],p=n[2*(c*e.width+u)],y=n[2*(h*e.width+l)+1],d=n[2*(h*e.width+u)+1];return[(m*(1-a)+x*a)*(1-o)+(f*(1-a)+p*a)*o,(y*(1-a)+n[2*(c*e.width+l)+1]*a)*(1-o)+(d*(1-a)+n[2*(c*e.width+u)+1]*a)*o]}:(t,i)=>{const r=Math.round(t),s=Math.round(i);return r<0||r>=e.width||s<0||s>=e.height?[0,0]:[n[2*(s*e.width+r)],n[2*(s*e.width+r)+1]]}}function f(t,e,n,i,r,o,a,h){const u=[],{raster:c,width:m,height:f,resolutionFactor:x}=h;let p=i,y=r,d=(0,l.Kp)(0),[g,M]=n(p,y);g*=e.velocityScale,M*=e.velocityScale;const w=Math.sqrt(g*g+M*M);let v,z;u.push({x:p,y,time:d,speed:w});for(let i=0;i<e.verticesPerLine;i++){let[i,r]=n(p,y);i*=e.velocityScale,r*=e.velocityScale;const h=Math.sqrt(i*i+r*r);if(h<e.minSpeedThreshold)return u;const g=t*i/h,M=t*r/h;p+=g*e.segmentLength,y+=M*e.segmentLength,e.wrapAround&&(p=(0,s.OS)(p,o[0]));const w=t*e.segmentLength/h;if(d=(0,l.Kp)(d+w),Math.acos(g*v+M*z)>e.maxTurnAngle)return u;if(e.collisions){let t=Math.round(p*x);const n=Math.round(y*x);if(e.wrapAround&&(t=(0,s.OS)(t,m)),t<0||t>m-1||n<0||n>f-1)return u;const i=c[n*m+t];if(-1!==i&&i!==a)return u;c[n*m+t]=a}u.push({x:p,y,time:d,speed:h}),v=g,z=M}return u}function x(t,e,n,i,r,s,o,a){const l=Math.round((.2+.6*o.getFloat())*t.verticesPerLine),h=t.verticesPerLine-l,u=f(-1,{...t,verticesPerLine:h},e,n,i,r,s,a),c=f(1,{...t,verticesPerLine:l},e,n,i,r,s,a),m=u.reverse();return m.splice(-1,1),m.concat(c)}function p(t,e,n,i,r={positions:[]}){if(t.density<=0)return[];const{positions:s}=r,o=[],l=new a.A,h=1/Math.max(t.lineCollisionWidth,1),u=Math.round(n*h),c=Math.round(i*h),m=new Int32Array(u*c);for(let t=0;t<m.length;t++)m[t]=-1;const p={raster:m,width:u,height:c,resolutionFactor:h},y={},d=t.lineSpacing/Math.sqrt(t.density),g=Math.floor(i/d),M=Math.floor(n/d);for(let t=0;t<g;t++){const e=t*d;for(let n=0;n<M;n++){const i=n*d;y[`${n}-${t}`]={x:i,y:e,positions:[]}}}for(const{x:t,y:e}of s){const n=y[`${Math.floor(t/d)}-${Math.floor(e/d)}`];n&&n.positions.push([t,e])}const w=[];for(const t in y){const e=y[t];if(0===e.positions.length)w.push({x:e.x+d/2,y:e.y+d/2,sort:.66+.33*l.getFloat(),stage:0});else{const[t]=e.positions.splice(0,1);w.push({x:t[0],y:t[1],sort:.33*l.getFloat(),stage:1});for(const[t,n]of e.positions)w.push({x:t,y:n,sort:.33+.33*l.getFloat(),stage:2})}}w.sort((t,e)=>t.sort-e.sort);for(const{x:r,y:s,stage:a}of w){const h=t.onlyForwardTracing?f(1,t,e,r,s,[n,i],o.length,p):x(t,e,r,s,[n,i],o.length,l,p);h.length<2||o.push({stage:a,vertices:h})}return o}},5443:(t,e,n)=>{n.d(e,{A:()=>p});var i,r=n(31635),s=n(799),o=n(91429),a=n(91075),l=n(86738),h=n(16930),u=n(94078),c=n(12176),m=n(21325),f=n(28735);function x(t,e,n){return null==e?n:null==n?e:t(e,n)}let p=i=class extends a.A{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,e,n,i,r){return function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?h.A.WGS84:t.spatialReference,t):{xmin:t,ymin:e,xmax:n,ymax:i,spatialReference:r??h.A.WGS84}}static fromPoint(t){return new i({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new l.A({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const e=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-e.x,t.y-e.y,t.z-e.z):this.offset(t.x-e.x,t.y-e.y)}clone(){const t=new i;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),"point"===t.type?(0,u.qz)(this,t):"extent"===t.type&&(0,u.gH)(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const e=.5*(1-t),n=this.width*e,i=this.height*e;if(this.xmin+=n,this.ymin+=i,this.xmax-=n,this.ymax-=i,this.hasZ){const t=(this.zmax-this.zmin)*e;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*e;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const e=this.spatialReference,n=t.spatialReference;return e&&n&&!(0,m.aI)(e,n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),(0,c.xK)(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,e,n){return this.xmin+=t,this.ymin+=e,this.xmax+=t,this.ymax+=e,null!=n&&(this.zmin+=n,this.zmax+=n),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=x(Math.min,this.zmin,t.zmin),this.zmax=x(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=x(Math.min,this.mmin,t.mmin),this.mmax=x(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=x(Math.max,this.zmin,t.zmin),this.zmax=x(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=x(Math.max,this.mmin,t.mmin),this.mmax=x(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=(0,m.Vp)(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,n=this._getCM(t);if(n){const i=e.isWebMercator?(0,f.ci)(n):n;this.xmin-=n.x,this.xmax-=n.x,e.isWebMercator||(i.x=y(i.x,t).x),this.spatialReference=new h.A((0,s.HC)((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:i.x}))}return this}_getCM(t){let e=null;const[n,i]=t.valid,r=this.xmin,s=this.xmax;return r>=n&&r<=i&&s>=n&&s<=i||(e=this.center),e}_normalize(t,e,n){const i=this.spatialReference;if(!i)return this;const r=n??(0,m.Vp)(i);if(null==r)return this;const s=this._getParts(r).map(t=>t.extent);if(s.length<2)return s[0]||this;if(s.length>2)return t?this._shiftCM(r):this.set({xmin:r.valid[0],xmax:r.valid[1]});if(t)return this._shiftCM(r);if(e)return s;let o=!0,a=!0;return s.forEach(t=>{t.hasZ||(o=!1),t.hasM||(a=!1)}),{rings:s.map(t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(o){const n=(t.zmax-t.zmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}if(a){const n=(t.mmax-t.mmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}return e}),hasZ:o,hasM:a,spatialReference:i}}_getParts(t){let e=this.cache._parts;if(!e){e=[];const{ymin:n,ymax:r,spatialReference:s}=this,o=this.width,a=this.xmin,l=this.xmax;let h;t=t||(0,m.Vp)(s);const[u,c]=t.valid;h=y(this.xmin,t);const f=h.x,x=h.frameId;h=y(this.xmax,t);const p=h.x,d=h.frameId,g=f===p&&o>0;if(o>2*c){const t=new i(a<l?f:p,n,c,r,s),o=new i(u,n,a<l?p:f,r,s),h=new i(0,n,c,r,s),m=new i(u,n,0,r,s),y=[],g=[];t.contains(h)&&y.push(x),t.contains(m)&&g.push(x),o.contains(h)&&y.push(d),o.contains(m)&&g.push(d);for(let t=x+1;t<d;t++)y.push(t),g.push(t);e.push({extent:t,frameIds:[x]},{extent:o,frameIds:[d]},{extent:h,frameIds:y},{extent:m,frameIds:g})}else f>p||g?e.push({extent:new i(f,n,c,r,s),frameIds:[x]},{extent:new i(u,n,p,r,s),frameIds:[d]}):e.push({extent:new i(f,n,p,r,s),frameIds:[x]});this.cache._parts=e}const n=this.hasZ,r=this.hasM;if(n||r){const t={};n&&(t.zmin=this.zmin,t.zmax=this.zmax),r&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let n=0;n<e.length;n++)e[n].extent.set(t)}return e}};function y(t,e){const[n,i]=e.valid,r=2*i;let s,o=0;return t>i?(s=Math.ceil(Math.abs(t-i)/r),t-=s*r,o=s):t<n&&(s=Math.ceil(Math.abs(t-n)/r),t+=s*r,o=-s),{x:t,frameId:o}}(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"center",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasM",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasZ",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"height",null),(0,r.Cg)([(0,o.MZ)({type:h.A,json:{write:!0},value:h.A.WGS84})],p.prototype,"spatialReference",void 0),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"width",null),(0,r.Cg)([(0,o.MZ)({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],p.prototype,"xmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"xmax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmax",void 0),p=i=(0,r.Cg)([(0,o.$K)("esri.geometry.Extent")],p),p.prototype.toJSON.isDefaultToJSON=!0},12176:(t,e,n)=>{n.d(e,{Ql:()=>y,fA:()=>f,xB:()=>s,xK:()=>d});var i=n(94078);function r(t,e){return(0,i.qz)(t,e)}function s(t,e){const n=t.hasZ&&e.hasZ;let i,r,s;if(t.xmin<=e.xmin){if(i=e.xmin,t.xmax<i)return!1}else if(i=t.xmin,e.xmax<i)return!1;if(t.ymin<=e.ymin){if(r=e.ymin,t.ymax<r)return!1}else if(r=t.ymin,e.ymax<r)return!1;if(n&&e.hasZ)if(t.zmin<=e.zmin){if(s=e.zmin,t.zmax<s)return!1}else if(s=t.zmin,e.zmax<s)return!1;return!0}function o(t,e){const{points:n,hasZ:r}=e,s=r?i.F8:i.CW;for(const e of n)if(s(t,e))return!0;return!1}const a=[0,0],l=[0,0],h=[0,0],u=[0,0],c=[a,l,h,u],m=[[h,a],[a,l],[l,u],[u,h]];function f(t,e){return function(t,e){a[0]=t.xmin,a[1]=t.ymax,l[0]=t.xmax,l[1]=t.ymax,h[0]=t.xmin,h[1]=t.ymin,u[0]=t.xmax,u[1]=t.ymin;for(const t of c)if((0,i.t1)(e,t))return!0;for(const n of e){if(!n.length)continue;let e=n[0];if((0,i.CW)(t,e))return!0;for(let r=1;r<n.length;r++){const s=n[r];if((0,i.CW)(t,s)||p(e,s,m))return!0;e=s}}return!1}(t,e.rings)}function x(t,e){a[0]=t.xmin,a[1]=t.ymax,l[0]=t.xmax,l[1]=t.ymax,h[0]=t.xmin,h[1]=t.ymin,u[0]=t.xmax,u[1]=t.ymin;const n=e.paths;for(const e of n){if(!n.length)continue;let r=e[0];if((0,i.CW)(t,r))return!0;for(let n=1;n<e.length;n++){const s=e[n];if((0,i.CW)(t,s)||p(r,s,m))return!0;r=s}}return!1}function p(t,e,n){for(let i=0;i<n.length;i++)if(y(t,e,n[i][0],n[i][1]))return!0;return!1}function y(t,e,n,i,r){const[s,o]=t,[a,l]=e,[h,u]=n,[c,m]=i,f=c-h,x=s-h,p=a-s,y=m-u,d=o-u,g=l-o,M=y*p-f*g;if(0===M)return!1;const w=(f*d-y*x)/M,v=(p*d-g*x)/M;return w>=0&&w<=1&&v>=0&&v<=1&&(r&&(r[0]=s+w*(a-s),r[1]=o+w*(l-o)),!0)}function d(t){switch(t){case"esriGeometryEnvelope":case"extent":return s;case"esriGeometryMultipoint":case"multipoint":return o;case"esriGeometryPoint":case"point":return r;case"esriGeometryMultiPatch":case"multipatch":case"esriGeometryPolygon":case"polygon":return f;case"esriGeometryPolyline":case"polyline":return x}}},19419:(t,e,n)=>{n.d(e,{$9:()=>v,HY:()=>w,IO:()=>c,Ie:()=>b,Rj:()=>M,VL:()=>x,VY:()=>a,Wc:()=>y,aI:()=>R,bx:()=>m,fA:()=>o,fT:()=>f,gR:()=>z,gX:()=>d,ib:()=>g,nw:()=>u,qv:()=>A,tK:()=>h,uJ:()=>p,vt:()=>r,w1:()=>l}),n(34727);var i=n(5443);function r(t=Z){return[t[0],t[1],t[2],t[3]]}function s(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function o(t,e,n,i,s=r()){return s[0]=t,s[1]=e,s[2]=n,s[3]=i,s}function a(t,e=r()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function l(t,e,n=new i.A){return n.xmin=t[0],n.ymin=t[1],n.xmax=t[2],n.ymax=t[3],n.spatialReference=e,n}function h(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function u(t,e){e<t[0]&&(t[0]=e),e>t[2]&&(t[2]=e)}function c(t,e){e<t[1]&&(t[1]=e),e>t[3]&&(t[3]=e)}function m(t,{xmin:e,ymin:n,xmax:i,ymax:r}){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],i),t[3]=Math.max(t[3],r)}function f(t,e,n){if(null!=e)if("length"in e)C(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):2!==e.length&&3!==e.length||(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}else s(n,t)}function x(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function p(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function y(t){return x(t)*p(t)}function d(t,e=[0,0]){return e[0]=(t[0]+t[2])/2,e[1]=(t[1]+t[3])/2,e}function g(t){const e=x(t),n=p(t);return Math.sqrt(e*e+n*n)}function M(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function w(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function v(t,e,n){return Math.max(e[0],t[0])-n<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])-n<=Math.min(e[3],t[3])}function z(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function b(t){return t?s(t,A):r(A)}function C(t){return null!=t&&4===t.length}function R(t,e){return C(t)&&C(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:t===e}const A=[1/0,1/0,-1/0,-1/0],Z=[0,0,0,0]},21276:(t,e,n)=>{n.d(e,{H:()=>s,f:()=>r});var i=n(49186);function r(t){if(t&&"object"==typeof t&&"type"in t&&"mesh"===t.type)throw new i.A("internal:mesh","Mesh geometries are not supported for this operation")}function s(t){t.forEach(r)}},28735:(t,e,n)=>{n.d(e,{Cv:()=>d,Gh:()=>w,ci:()=>v,je:()=>g,jg:()=>m,tD:()=>M,y7:()=>y});var i=n(4718),r=n(21276),s=n(16930),o=n(79258),a=n(21325);const l=57.29577951308232,h=.017453292519943;function u(t){return t*l}function c(t){return t*h}function m(t){return Math.PI/2-2*Math.atan(Math.exp(-t/o.$O.radius))}function f(t){return null!=t.wkid||null!=t.wkt}const x=[0,0];function p(t,e,n,i,r){const s=t,o=r;if(o.spatialReference=n,"x"in s&&"x"in o)[o.x,o.y]=e(s.x,s.y,x,i);else if("xmin"in s&&"xmin"in o)[o.xmin,o.ymin]=e(s.xmin,s.ymin,x,i),[o.xmax,o.ymax]=e(s.xmax,s.ymax,x,i);else if("paths"in s&&"paths"in o||"rings"in s&&"rings"in o){const t="paths"in s?s.paths:s.rings,n=[];let r;for(let s=0;s<t.length;s++){const o=t[s];r=[],n.push(r);for(let t=0;t<o.length;t++)r.push(e(o[t][0],o[t][1],[0,0],i)),o[t].length>2&&r[t].push(o[t][2]),o[t].length>3&&r[t].push(o[t][3])}"paths"in o?o.paths=n:o.rings=n}else if("points"in s&&"points"in o){const t=s.points,n=[];for(let r=0;r<t.length;r++)n[r]=e(t[r][0],t[r][1],[0,0],i),t[r].length>2&&n[r].push(t[r][2]),t[r].length>3&&n[r].push(t[r][3]);o.points=n}return r}function y(t,e){const n=t&&(f(t)?t:t.spatialReference),i=e&&(f(e)?e:e.spatialReference);return!(t&&"type"in t&&"mesh"===t.type||e&&"type"in e&&"mesh"===e.type||!n||!i)&&(!!(0,a.aI)(i,n)||(0,a.K8)(i)&&(0,a.oT)(n)||(0,a.K8)(n)&&(0,a.oT)(i))}function d(t,e){if(null==t)return null;const n=t.spatialReference,r=e&&(f(e)?e:e.spatialReference);return y(n,r)?(0,a.aI)(n,r)?(0,i.o8)(t):(0,a.K8)(r)?p(t,g,s.A.WebMercator,!1,(0,i.o8)(t)):(0,a.oT)(r)?p(t,M,s.A.WGS84,!1,(0,i.o8)(t)):null:null}function g(t,e,n=[0,0]){e>89.99999?e=89.99999:e<-89.99999&&(e=-89.99999);const i=c(e);return n[0]=c(t)*o.$O.radius,n[1]=o.$O.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),n}function M(t,e,n=[0,0],i=!1){if(t===a.Mc[0])n[0]=-180;else if(t===a.Mc[1])n[0]=180;else{const e=u(t/o.$O.radius);n[0]=i?e:e-360*Math.floor((e+180)/360)}return n[1]=u(Math.PI/2-2*Math.atan(Math.exp(-e/o.$O.radius))),n}function w(t,e=!1,n=(0,i.o8)(t)){return(0,r.f)(t),(0,r.f)(n),p(t,g,s.A.WebMercator,e,n)}function v(t,e=!1,n=(0,i.o8)(t)){return(0,r.f)(t),(0,r.f)(n),p(t,M,s.A.WGS84,e,n)}},31635:(t,e,n)=>{function i(t,e,n,i){var r,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,n,o):r(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o}function r(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(r=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");r&&(i=function(){try{r.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>i,hk:()=>o,mS:()=>r}),Object.create,Object.create;var s="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i};function o(t){function e(e){t.error=t.hasError?new s(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,i=0;return function r(){for(;n=t.stack.pop();)try{if(!n.async&&1===i)return i=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(s).then(r,function(t){return e(t),r()})}else i|=1}catch(t){e(t)}if(1===i)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},49616:(t,e,n)=>{n.r(e),n.d(e,{default:()=>h});var i=n(31635),r=n(91429),s=n(4095),o=n(19419),a=n(69052);n(21325);let l=class{constructor(){this._tileData=new Map}async generateStreamlines(t){const{flowData:e,flowExtentInfo:n,needsMagnitude:i,simulationSettings:r,startPositions:o}=t,a=u((0,s.DE)(r,e),r,n.modelSize,i,o);return{result:{streamlines:a},transferList:a?.map(t=>t.vertices.buffer)}}async generateTiledStreamlines(t){const{flowDataTiles:e,flowExtentInfo:n,needsMagnitude:i,reset:r,simulationSettings:l,startPositions:h}=t;this._updateTileData(e,r);const c=u(function(t,e,n){const[i,r]=n.modelSize;let l=null;const h=new Map;e.forEach(e=>{h.set(e.lij,(0,s.DE)(t,e))});const u=(t,e,n)=>(0,o.Rj)(t.extent,e,n);return(s,c)=>{const m=Math.round(s),f=Math.round(c);if(!t.wrapAround&&(m<0||m>=i||f<0||f>=r))return[0,0];const[x,p]=function(t,e,n,i){const{extent:r,modelSize:s,valid:l}=t,[h,u,c]=r,m=function(t,e,n){if(null!=n&&t>e){const[i,r]=n;return r-t+(e-i)}return e-t}(h,c,l);let f=e/s[0]*m+h;return null!=l&&i&&(f=new a.hr(l[0],l[1]).normalize(f)),[f,(s[1]-n)/s[1]*(0,o.uJ)(r)+u]}(n,s,c,!0);if(!function(t,e,n){const{extent:i,valid:r}=t,[s,o,a,l]=i;return!(n<o||n>l)&&(null!=r&&s>a?e>=a||e<=s:e>=s&&e<=a)}(n,x,p))return[0,0];if(null==l||!u(l,x,p)){l=null;for(const[t,n]of e)if(u(n,x,p)){l=n;break}}if(null==l?.data)return[0,0];const y=h.get(l.lij);if(null==y)return[0,0];const{width:d,height:g,extent:M}=l;return y((x-M[0])/(0,o.VL)(M)*d,g-(p-M[1])/(0,o.uJ)(M)*g)}}(l,this._tileData,n),l,n.modelSize,i,h);return{result:{streamlines:c},transferList:c?.map(t=>t.vertices.buffer)??[]}}_updateTileData(t,e){if(e)for(const e of this._tileData.keys())t.has(e)||this._tileData.delete(e);t.forEach((t,e)=>{"delete"===t.type?this._tileData.delete(e):"on-worker"!==t.type&&"invalid"!==t.type&&this._tileData.set(e,t.data)})}};l=(0,i.Cg)([(0,r.$K)("esri.views.3d.support.flow.FlowWorker")],l);const h=l;function u(t,e,n,i,r){if(null==t)return;const o=(0,s.S1)(e,t,n[0],n[1],{positions:r}),a=[],l=function(t){return t?4:3}(i);for(const{vertices:t,stage:e}of o){const n=new Float32Array(t.length*l);for(let e=0;e<t.length;e++)n[e*l]=t[e].x,n[e*l+1]=t[e].y,n[e*l+2]=t[e].time,i&&(n[e*l+3]=t[e].speed);a.push({vertices:n,stage:e,hasMagnitude:i})}return a}},69052:(t,e,n)=>{n.d(e,{hr:()=>r,ie:()=>l,uC:()=>a});var i=n(34727);class r{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,n=!1){return s(this.range,this.min,this.max,t,e,n)}clamp(t,e=0){return(0,i.qE)(t-e,this.min,this.max)+e}monotonic(t,e,n){return t<e?e:e+o(this.range,t-e,n)}minimalMonotonic(t,e,n){return s(this.range,t,t+this.range,e,n)}center(t,e,n){return e=this.monotonic(t,e,n),this.normalize((t+e)/2,n)}diff(t,e,n){return this.monotonic(t,e,n)-t}shortestSignedDiff(t,e){t=this.normalize(t);const n=(e=this.normalize(e))-t,i=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(n)<Math.abs(i)?n:i}contains(t,e,n){return e=this.minimalMonotonic(t,e),(n=this.minimalMonotonic(t,n))>t&&n<e}}function s(t,e,n,i,r=0,s=!1){return(i-=r)<e?i+=o(t,e-i):i>n&&(i-=o(t,i-n)),s&&i===n&&(i=e),i+r}function o(t,e,n=0){return Math.ceil((e-n)/t)*t+n}const a=new r(0,2*Math.PI),l=(new r(-Math.PI,Math.PI),new r(0,360))},86738:(t,e,n)=>{n.d(e,{A:()=>M});var i=n(31635),r=n(69622),s=n(53966),o=n(91429),a=n(56507),l=n(91075),h=n(16930),u=n(21325),c=n(28735);function m({x:t,y:e,spatialReference:n},i=[0,0]){if(n){if((0,u.K8)(n))return(0,c.tD)(t,e,i);if((0,u.EA)(n))return i[0]=t,i[1]=e,i}return null}const f=[0,0];var x,p=n(43937),y=n(36005);const d=[0,0];function g(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let M=x=class extends l.A{static copy(t,e){e._set("x",t._get("x")),e._set("y",t._get("y")),e._set("z",t._get("z")),e._set("m",t._get("m"));const n=t._get("spatialReference");e._set("spatialReference",r.A.isFrozen(n)?n:n.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,n,i,r){let o;if(Array.isArray(t))o=t,r=e,t=o[0],e=o[1],n=o[2],i=o[3];else if(t&&"object"==typeof t){if(o=t,t=null!=o.x?o.x:o.longitude,e=null!=o.y?o.y:o.latitude,n=o.z,i=o.m,(r=o.spatialReference)&&"esri.geometry.SpatialReference"!==r.declaredClass&&(r=new h.A(r)),null!=o.longitude||null!=o.latitude)if(null==o.longitude)s.A.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==o.latitude)s.A.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!o.declaredClass&&r?.isWebMercator){const n=(0,c.je)(o.longitude,o.latitude,d);t=n[0],e=n[1]}}else g(n)?(r=n,n=null):g(i)&&(r=i,i=null);const a={x:t,y:e};return null==a.x&&null!=a.y?s.A.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&s.A.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=r&&(a.spatialReference=r),null!=n&&(a.z=n),null!=i&&(a.m=i),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){return t=this,m(t,f)?.[1]??null;var t}set latitude(t){const{spatialReference:e,x:n}=this;null!=t&&e&&(e.isWebMercator?this._set("y",(0,c.je)(n,t,d)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){return t=this,m(t,f)?.[0]??null;var t}set longitude(t){const{y:e,spatialReference:n}=this;null!=t&&n&&(n.isWebMercator?this._set("x",(0,c.je)(t,e,d)[0]):n.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,n){e[n]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new x;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return x.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:n,z:i,m:r,spatialReference:s}=this,{z:o,m:a}=t;let{x:l,y:h,spatialReference:u}=t;if(!s.equals(u))if(s.isWebMercator&&u.isWGS84)[l,h]=(0,c.je)(l,h),u=s;else{if(!s.isWGS84||!u.isWebMercator)return!1;[l,h]=(0,c.tD)(l,h),u=s}return e===l&&n===h&&i===o&&r===a&&s.wkid===u.wkid}offset(t,e,n){return this.x+=t,this.y+=e,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const t=(0,u.Vp)(this.spatialReference);if(!t)return this;let e=this.x;const[n,i]=t.valid,r=2*i;let s;return e>i?(s=Math.ceil(Math.abs(e-i)/r),e-=s*r):e<n&&(s=Math.ceil(Math.abs(e-n)/r),e+=s*r),this._set("x",e),this}distance(t){return function(t,e){const n=t.x-e.x,i=t.y-e.y,r=null!=t.z&&null!=e.z?t.z-e.z:0;return Math.sqrt(n*n+i*i+r*r)}(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};(0,i.Cg)([(0,o.MZ)({readOnly:!0})],M.prototype,"cache",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],M.prototype,"hasM",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],M.prototype,"hasZ",null),(0,i.Cg)([(0,o.MZ)({type:Number})],M.prototype,"latitude",null),(0,i.Cg)([(0,o.MZ)({type:Number})],M.prototype,"longitude",null),(0,i.Cg)([(0,o.MZ)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,o.wg)(t=>isNaN(t)?t:(0,a.GB)(t))],M.prototype,"x",void 0),(0,i.Cg)([(0,p.K)("x")],M.prototype,"writeX",null),(0,i.Cg)([(0,y.w)("x")],M.prototype,"readX",null),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],M.prototype,"y",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],M.prototype,"z",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],M.prototype,"m",void 0),M=x=(0,i.Cg)([(0,o.$K)("esri.geometry.Point")],M),M.prototype.toJSON.isDefaultToJSON=!0},91075:(t,e,n)=>{n.d(e,{A:()=>l});var i=n(31635),r=n(25482),s=n(91429),o=n(16930),a=n(36005);let l=class extends r.o{constructor(...t){super(...t),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=o.A.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(t,e){if(t instanceof o.A)return t;if(null!=t){const n=new o.A;return n.read(t,e),n}return t}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(t){return this.cache[t]}setCacheValue(t,e){this.cache[t]=e}};(0,i.Cg)([(0,s.MZ)()],l.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],l.prototype,"cache",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],l.prototype,"extent",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasM",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasZ",void 0),(0,i.Cg)([(0,s.MZ)({type:o.A,json:{write:!0},value:o.A.WGS84})],l.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.w)("spatialReference")],l.prototype,"readSpatialReference",null),l=(0,i.Cg)([(0,s.$K)("esri.geometry.Geometry")],l)},94078:(t,e,n)=>{n.d(e,{CW:()=>a,F8:()=>l,gH:()=>o,m3:()=>u,qz:()=>r,rL:()=>s,t1:()=>c});const i=[0,0];function r(t,e){return null!=e&&h(t,e.x,e.y,e.z)}function s(t,e){if(!e.points?.length)return!1;for(const n of e.points)if(!a(t,n))return!1;return!0}function o(t,e){const{xmin:n,ymin:i,zmin:r,xmax:s,ymax:o,zmax:a}=e;return t.hasZ&&e.hasZ?h(t,n,i,r)&&h(t,n,o,r)&&h(t,s,o,r)&&h(t,s,i,r)&&h(t,n,i,a)&&h(t,n,o,a)&&h(t,s,o,a)&&h(t,s,i,a):h(t,n,i)&&h(t,n,o)&&h(t,s,o)&&h(t,s,i)}function a(t,e){return h(t,e[0],e[1])}function l(t,e){return h(t,e[0],e[1],e[2])}function h(t,e,n,i){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax&&(null==i||!t.hasZ||i>=t.zmin&&i<=t.zmax)}function u(t,e){return i[1]=e.y,i[0]=e.x,function(t,e){return c(t.rings,e)}(t,i)}function c(t,e){if(!t||t.length<1)return!1;if(function(t){return!Array.isArray(t[0][0])}(t))return m(!1,t,e);let n=!1;for(let i=0,r=t.length;i<r;i++)n=m(n,t[i],e);return n}function m(t,e,n){const[i,r]=n;let s=t,o=0;for(let t=0,n=e.length;t<n;t++){o++,o===n&&(o=0);const[a,l]=e[t],[h,u]=e[o];(l<r&&u>=r||u<r&&l>=r)&&a+(r-l)/(u-l)*(h-a)<i&&(s=!s)}return s}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9829],{513:(t,n,r)=>{r.d(n,{KP:()=>a,X0:()=>h,fM:()=>c,mq:()=>u,zW:()=>l});var e=r(19419),i=r(59803),s=r(15507);class a{constructor(t,n,r,e,i,s){this.cx=t,this.cy=n,this.radius=r,this.thetaStart=e,this.thetaEnd=i,this.isInvalid=s}get startPoint(){const{cx:t,cy:n,radius:r,thetaStart:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}get endPoint(){const{cx:t,cy:n,radius:r,thetaEnd:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}}function o(t,n){const{cx:r,cy:e,radius:i}=t;return[r+i*Math.cos(n),e+i*Math.sin(n)]}function u(t,n){if(t.isInvalid)return(0,s.RS)([0,0],t.startPoint,t.endPoint,n);const{thetaStart:r,thetaEnd:e}=t;return o(t,r*(1-n)+e*n)}function c(t,n){if(t.isInvalid)return(0,i.T)(t.startPoint,t.endPoint,n);const{cx:r,cy:e,thetaStart:a,thetaEnd:u}=t,[c,h]=n,l=(0,s.Pf)((0,s.yN)(a,u),Math.atan2(h-e,c-r)),f=o(t,l);return{t:(l-a)/(u-a),curvePoint:f,distance:Math.sqrt((0,s.kb)(n,f))}}function h(t,n){if(n.isInvalid)return(0,e.tK)(t,n.startPoint),(0,e.tK)(t,n.endPoint),t;const{cx:r,cy:i,radius:a,thetaStart:u,thetaEnd:c}=n;(0,e.tK)(t,o(n,u)),(0,e.tK)(t,o(n,c));const h=(0,s.yN)(u,c),l=Math.PI/2;let f=0;for(const n of[[r+a,i],[r,i+a],[r-a,i],[r,i-a]])f=(0,s.Cp)(h,f),f>h.min&&f<h.max&&(0,e.tK)(t,n),f+=l;return t}function l(t){if(t.isInvalid)return 2*t.radius;const{radius:n,thetaStart:r,thetaEnd:e}=t;return n*Math.abs(e-r)}},537:(t,n,r)=>{r.d(n,{B$:()=>x,LJ:()=>d,Pj:()=>b,Rg:()=>M,Yz:()=>p,z8:()=>g});var e=r(19419),i=r(79567),s=r(52006);function a(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function o(t){return void 0!==t.points}function u(t){return void 0!==t.x&&void 0!==t.y}function c(t){return void 0!==t.paths}function h(t){return void 0!==t.rings}function l(t){return function(n,r){return null==n?r:null==r?n:t(n,r)}}const f=l(Math.min),m=l(Math.max);function M(t,n){return c(n)?p(t,n.curvePaths??n.paths,!1,!1)??t:h(n)?p(t,n.curveRings??n.rings,!1,!1)??t:o(n)?b(t,n.points,!1,!1,!1,!1):a(n)?y(t,n):(u(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.x,t[3]=n.y),t)}function g(t){let n,r,i,s;for(t.reset(),n=i=1/0,r=s=-1/0;t.nextPath();){const e=x(t);n=Math.min(e[0],n),i=Math.min(e[1],i),r=Math.max(e[2],r),s=Math.max(e[3],s)}return(0,e.vt)([n,i,r,s])}function x(t){let n,r,i,s;for(n=i=1/0,r=s=-1/0;t.nextPoint();)n=Math.min(t.x,n),i=Math.min(t.y,i),r=Math.max(t.x,r),s=Math.max(t.y,s);return(0,e.vt)([n,i,r,s])}function d(t,n){return c(n)?p(t,n.curvePaths??n.paths,!0,!1)??t:h(n)?p(t,n.curveRings??n.rings,!0,!1)??t:o(n)?b(t,n.points,!0,!1,!0,!1):a(n)?y(t,n,0,0,!0,!1):(u(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=n.x,t[4]=n.y,t[5]=n.z),t)}function p(t,n,r,a){const o=r?3:2;if(!n.length||!n[0].length)return null;let u,c,h,l,[M,g]=(0,s.yP)(n[0][0]),x=M,d=g;for(let t=0;t<n.length;t++){const p=n[t];for(let t=0;t<p.length;t++){const n=(0,s.yP)(p[t]),[y,b]=n;if(M=f(M,y),g=f(g,b),x=m(x,y),d=m(d,b),r&&n.length>2){const t=n[2];u=f(u,t),c=m(c,t)}if(a&&n.length>o){const t=n[o];h=f(h,t),l=m(l,t)}const v=p[t];if((0,s.Xq)(v)||t<1)continue;const P=(0,s.yP)(p[t-1]),I=(0,e.fA)(M,g,x,d);[M,g,x,d]=(0,i.e)(I,P,v)}}return r?a?(t[0]=M,t[1]=g,t[2]=u,t[3]=h,t[4]=x,t[5]=d,t[6]=c,t[7]=l,t.length=8,t):(t[0]=M,t[1]=g,t[2]=u,t[3]=x,t[4]=d,t[5]=c,t.length=6,t):a?(t[0]=M,t[1]=g,t[2]=h,t[3]=x,t[4]=d,t[5]=l,t.length=6,t):(t[0]=M,t[1]=g,t[2]=x,t[3]=d,t.length=4,t)}function y(t,n,r,e,i,s){const a=n.xmin,o=n.xmax,u=n.ymin,c=n.ymax;let h=n.zmin,l=n.zmax,f=n.mmin,m=n.mmax;return i?(h=h||0,l=l||0,s?(f=f||0,m=m||0,t[0]=a,t[1]=u,t[2]=h,t[3]=f,t[4]=o,t[5]=c,t[6]=l,t[7]=m,t):(t[0]=a,t[1]=u,t[2]=h,t[3]=o,t[4]=c,t[5]=l,t)):s?(f=f||0,m=m||0,t[0]=a,t[1]=u,t[2]=f,t[3]=o,t[4]=c,t[5]=m,t):(t[0]=a,t[1]=u,t[2]=o,t[3]=c,t)}function b(t,n,r,e,i,s){const a=r?3:2,o=e&&s,u=r&&i;if(!n.length||!n[0].length)return null;let c,h,l,M,[g,x]=n[0],[d,p]=n[0];for(let t=0;t<n.length;t++){const r=n[t],[e,i]=r;if(g=f(g,e),x=f(x,i),d=m(d,e),p=m(p,i),u&&r.length>2){const t=r[2];c=f(c,t),h=m(h,t)}if(o&&r.length>a){const t=r[a];l=f(c,t),M=m(h,t)}}return i?(c=c||0,h=h||0,s?(l=l||0,M=M||0,t[0]=g,t[1]=x,t[2]=c,t[3]=l,t[4]=d,t[5]=p,t[6]=h,t[7]=M,t):(t[0]=g,t[1]=x,t[2]=c,t[3]=d,t[4]=p,t[5]=h,t)):s?(l=l||0,M=M||0,t[0]=g,t[1]=x,t[2]=l,t[3]=d,t[4]=p,t[5]=M,t):(t[0]=g,t[1]=x,t[2]=d,t[3]=p,t)}},4305:(t,n,r)=>{r.d(n,{jK:()=>h,lM:()=>f,m_:()=>l,ty:()=>M});var e=r(34727),i=r(19419),s=r(15507);const a=[0,0];function o(t){const n=1-t,r=n*n,e=t*t;return[r*n,3*t*r,3*e*n,e*t]}function u(t,n,r,e,i){const[s,a,u,c]=o(i);return[t[0]*s+n[0]*a+r[0]*u+e[0]*c,t[1]*s+n[1]*a+r[1]*u+e[1]*c]}function c(t,n,r,e,i){const[s,a,u,c]=o(i);return t*s+n*a+r*u+e*c}function h(t,n,r){const e=t,[i,o,u]=n.b,c=(0,s.RS)([0,0],e,o,r),h=(0,s.RS)(a,o,u,r),l=(0,s.RS)([0,0],u,i,r),f=(0,s.RS)([0,0],c,h,r),m=(0,s.RS)([0,0],h,l,r);return[{b:[(0,s.RS)([],f,m,r),c,f]},{b:[[...i],m,l]}]}function l(t,n,r){const i=t,[a,o,c]=n.b,h=(0,s.R)(r,[.1,.5,.9],t=>{const n=1-t,[r,e]=u(i,o,c,a,t);return[r,e,3*n*n*(o[0]-i[0])+6*n*t*(c[0]-o[0])+3*t*t*(a[0]-c[0]),3*n*n*(o[1]-i[1])+6*n*t*(c[1]-o[1])+3*t*t*(a[1]-c[1]),6*n*(c[0]-2*o[0]+i[0])+6*t*(a[0]-2*c[0]+o[0]),6*n*(c[1]-2*o[1]+i[1])+6*t*(a[1]-2*c[1]+o[1])]}).map(t=>Math.min(1,Math.max(0,t)));h.push(0,1);let l=1/0;const f=h.map(t=>{const n=u(i,o,c,a,t),[e,s]=n,h=r[0]-e,f=r[1]-s,m=Math.sqrt(h*h+f*f);return l=Math.min(m,l),{t,curvePoint:n,distance:m}}),m=[];for(const t of f){const{t:n,distance:r}=t;(0,e.b6)(r,l)&&!m.some(({t})=>(0,e.Sp)(t,n))&&m.push(t)}return m}function f(t,n,r){const e=n,[s,a,o]=r.b;if((0,i.tK)(t,e),(0,i.tK)(t,s),(0,i.Rj)(t,a[0],a[1])&&(0,i.Rj)(t,o[0],o[1]))return t;for(const n of m(e[0],a[0],o[0],s[0]))n>0&&n<1&&(0,i.nw)(t,c(e[0],a[0],o[0],s[0],n));for(const n of m(e[1],a[1],o[1],s[1]))n>0&&n<1&&(0,i.IO)(t,c(e[1],a[1],o[1],s[1],n));return t}function m(t,n,r,e){const i=3*(3*(n-r)-t+e),s=6*(t-2*n+r),a=3*(n-t);if(0===i)return 0!==s?[-a/s]:[];const o=Math.sqrt(s*s-4*i*a);return[(-s+o)/(2*i),(-s-o)/(2*i)]}function M(t,n,r){let e=0,i=[n];for(let n=0;n<16;n++){let n=t;const a=[];for(const t of i)a.push(...h(n,t,.5)),n=t.b[0];i=a,n=t,e=0;let o=0;for(const t of i){const[r,i,a]=t.b,u=Math.sqrt((0,s.kb)(n,r));e+=(u+(Math.sqrt((0,s.kb)(n,i))+Math.sqrt((0,s.kb)(i,a))+Math.sqrt((0,s.kb)(a,r))))/2,o+=u,n=r}if(e-o<r)return e}return e}},12359:(t,n,r)=>{r.d(n,{IK:()=>h,TP:()=>f,Ve:()=>o,Z4:()=>s,l8:()=>a,w2:()=>c});var e=r(51118),i=r(95108);function s(t){return t?t.hasZ?[t.xmax-t.xmin/2,t.ymax-t.ymin/2,t.zmax-t.zmin/2]:[t.xmax-t.xmin/2,t.ymax-t.ymin/2]:null}function a(t){return function(t,n){if(!t?.length)return null;const r=[],e=[],s=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let r=0,i=t.length;r<i;r++){const i=u(t[r],n,s);i&&e.push(i)}if(e.sort((t,r)=>{let e=t[2]-r[2];return 0===e&&n&&(e=t[4]-r[4]),e}),e.length&&(r[0]=e[0][0],r[1]=e[0][1],n&&(r[2]=e[0][3]),(r[0]<s[0]||r[0]>s[1]||r[1]<s[2]||r[1]>s[3]||n&&(r[2]<s[4]||r[2]>s[5]))&&(r.length=0)),!r.length){const e=t[0]&&t[0].length?function(t,n){const r=n?[0,0,0]:[0,0],e=n?[0,0,0]:[0,0];let s=0,a=0,o=0,u=0;for(let c=0,h=t.length;c<h-1;c++){const h=t[c],l=t[c+1];if(h&&l){r[0]=h[0],r[1]=h[1],e[0]=l[0],e[1]=l[1],n&&h.length>2&&l.length>2&&(r[2]=h[2],e[2]=l[2]);const t=(0,i.R3)(r,e);if(t){s+=t;const r=(0,i.t9)(h,l);a+=t*r[0],o+=t*r[1],n&&r.length>2&&(u+=t*r[2])}}}return s>0?n?[a/s,o/s,u/s]:[a/s,o/s]:t.length?t[0]:null}(t[0],n):null;if(!e)return null;r[0]=e[0],r[1]=e[1],n&&e.length>2&&(r[2]=e[2])}return r}(t.rings,t.hasZ??!1)}function o(t){const n=a(t);if(!n)return null;const{hasZ:r,spatialReference:e}=t,[i,s,o]=n;return isNaN(i)||isNaN(s)||r&&isNaN(o)?null:{x:i,y:s,z:r?o:void 0,spatialReference:e}}function u(t,n,r){let e=0,i=0,s=0,a=0,o=0;const u=t.length?t[0][0]:0,c=t.length?t[0][1]:0,h=t.length&&n?t[0][2]:0;for(let l=0;l<t.length;l++){const f=t[l],m=t[(l+1)%t.length],[M,g,x]=f,d=M-u,p=g-c,[y,b,v]=m,P=y-u,I=b-c,R=d*I-P*p;if(a+=R,e+=(d+P)*R,i+=(p+I)*R,n&&f.length>2&&m.length>2){const t=x-h,n=v-h,r=d*n-P*t;s+=(t+n)*r,o+=r}M<r[0]&&(r[0]=M),M>r[1]&&(r[1]=M),g<r[2]&&(r[2]=g),g>r[3]&&(r[3]=g),n&&(x<r[4]&&(r[4]=x),x>r[5]&&(r[5]=x))}if(a>0&&(a*=-1),o>0&&(o*=-1),!a)return null;a*=.5,o*=.5;const l=[e/(6*a)+u,i/(6*a)+c,a];return n&&(r[4]===r[5]||0===o?(l[3]=(r[4]+r[5])/2,l[4]=0):(l[3]=s/(6*o)+h,l[4]=o)),l}function c(t,n){let r=0,e=0,i=0;t.nextPoint();const s=t.pathSize?t.x:0,a=t.pathSize?t.y:0;for(let o=0;o<t.pathSize;o++){t.seekInPath(o);const u=[t.x,t.y];t.seekInPath((o+1)%t.pathSize);const c=[t.x,t.y],[h,l]=u,f=h-s,m=l-a,[M,g]=c,x=M-s,d=g-a,p=f*d-x*m;i+=p,r+=(f+x)*p,e+=(m+d)*p,h<n[0]&&(n[0]=h),h>n[1]&&(n[1]=h),l<n[2]&&(n[2]=l),l>n[3]&&(n[3]=l)}return i>0&&(i*=-1),i?(i*=.5,[r/(6*i)+s,e/(6*i)+a,i]):null}function h(t){const{hasZ:n,totalSize:r}=t;if(0===r)return null;const s=[],a=[],o=n?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(t.reset();t.nextPath();){const n=u((0,e.A)(t),t.hasZ,o);n&&a.push(n)}if(a.sort((t,r)=>{let e=t[2]-r[2];return 0===e&&n&&(e=t[4]-r[4]),e}),a.length&&(s[0]=a[0][0],s[1]=a[0][1],n&&(s[2]=a[0][3]),(s[0]<o[0]||s[0]>o[1]||s[1]<o[2]||s[1]>o[3]||n&&(s[2]<o[4]||s[2]>o[5]))&&(s.length=0)),!s.length){t.reset(),t.nextPath();const r=t.pathSize?function(t){const{hasZ:n}=t,r=n?[0,0,0]:[0,0],e=n?[0,0,0]:[0,0];let s=0,a=0,o=0,u=0;if(t.nextPoint()){let c=t.x,h=t.y,l=t.z;for(;t.nextPoint();){const f=t.x,m=t.y,M=t.z;r[0]=c,r[1]=h,e[0]=f,e[1]=m,n&&(r[2]=l,e[2]=M);const g=(0,i.R3)(r,e);if(g){s+=g;const t=(0,i.t9)(r,e);a+=g*t[0],o+=g*t[1],n&&t.length>2&&(u+=g*t[2])}c=f,h=m,l=M}}return s>0?n?[a/s,o/s,u/s]:[a/s,o/s]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!r)return null;s[0]=r[0],s[1]=r[1],n&&r.length>2&&(s[2]=r[2])}return s}const l=1e-6;function f(t){let n=0;for(t.reset();t.nextPath();)n+=t.getCurrentRingArea();if(n<l){const n=h(t);return n?[n[0],n[1]]:null}const r=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const e=[t.x,t.y];for(t.reset();t.nextPath();)M(r,e,t);return r[0]*=1/n,r[1]*=1/n,r[0]+=e[0],r[1]+=e[1],r}const m=1/3;function M(t,n,r){if(!t||!r||r.pathSize<3)return null;r.nextPoint();const e=r.x,i=r.y;r.nextPoint();let s,a=r.x-e,o=r.y-i,u=0,c=0;for(;r.nextPoint();)u=r.x-e,c=r.y-i,s=.5*m*(u*o-c*a),t[0]+=s*(a+u),t[1]+=s*(o+c),a=u,o=c;const h=r.getCurrentRingArea(),l=[e,i];return l[0]-=n[0],l[1]-=n[1],l[0]*=h,l[1]*=h,t[0]+=l[0],t[1]+=l[1],t}},15507:(t,n,r)=>{r.d(n,{Cp:()=>M,Gz:()=>m,M_:()=>o,Pf:()=>g,R:()=>x,RS:()=>s,kb:()=>a,t7:()=>c,yN:()=>f});var e=r(34727),i=r(37585);function s(t,n,r,e){return t[0]=n[0]*(1-e)+r[0]*e,t[1]=n[1]*(1-e)+r[1]*e,t}function a(t,n){return(0,i.hG)(t,n)}function o(t,n,r,e,i){const[s,a]=n,[o,u]=r,[c,h]=e,[l,f]=i,m=(s-o)*(h-f)-(a-u)*(c-l);if(0===m)return null;const M=(s*u-a*o)*(c-l)-(s-o)*(c*f-h*l),g=(s*u-a*o)*(h-f)-(a-u)*(c*f-h*l);return t[0]=M/m,t[1]=g/m,t}const u=2*Math.PI;function c(t,n){const r=Math.atan2(t,n);return r<0?r+u:r}function h(t){return Math.abs(t)%u}function l(t){const n=h(t);return n<Math.PI?n:u-n}function f(t,n){return{min:Math.min(t,n),max:Math.max(t,n)}}function m(t,n,r,i){if((0,e.Sp)(h(t-n),0))return r?[t,t]:[t,i?t-u:t+u];const[s,a]=i?[t-u,t]:[t,t+u];return[t,M({min:s,max:a},n)]}function M({min:t,max:n},r){let e;return e=n-r,e>=u?(e-=e%u,r+e):(e=r-t,e>=u?(e-=e%u,r-e):r)}function g(t,n){const r=M(t,n);return r>t.min&&r<t.max?r:l(r-t.min)<l(r-t.max)?t.min:t.max}function x(t,n,r,e=10){return n.map(n=>{let i=n;for(let n=0;n<e;n++){const[n,e,s,a,o,u]=r(i),c=t[0]-n,h=t[1]-e,l=-s,f=-a;i+=-(2*c*l+2*h*f)/(2*l*l+2*c*-o+2*f*f+2*h*-u||1e-6)}return i})}},29242:(t,n,r)=>{function e(){return[1,0,0,0,1,0,0,0,1]}function i(t,n,r,e,i,s,a,o,u){return[t,n,r,e,i,s,a,o,u]}r.d(n,{fA:()=>i,vt:()=>e,zK:()=>s});const s=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:e,fromValues:i},Symbol.toStringTag,{value:"Module"}))},37585:(t,n,r)=>{r.d(n,{C:()=>i,Cc:()=>x,Io:()=>l,S8:()=>g,WQ:()=>a,aI:()=>b,e$:()=>p,hG:()=>f,hZ:()=>s,hs:()=>h,jb:()=>P,l0:()=>d,t2:()=>y});var e=r(34304);function i(t,n){return t[0]=n[0],t[1]=n[1],t}function s(t,n,r){return t[0]=n,t[1]=r,t}function a(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t}function o(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t}function u(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t}function c(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t}function h(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t}function l(t,n){const r=n[0]-t[0],e=n[1]-t[1];return Math.sqrt(r*r+e*e)}function f(t,n){const r=n[0]-t[0],e=n[1]-t[1];return r*r+e*e}function m(t){const n=t[0],r=t[1];return Math.sqrt(n*n+r*r)}function M(t){const n=t[0],r=t[1];return n*n+r*r}function g(t,n){const r=n[0],e=n[1];let i=r*r+e*e;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i),t}function x(t,n,r,e){const i=n[0],s=n[1];return t[0]=i+e*(r[0]-i),t[1]=s+e*(r[1]-s),t}function d(t,n,r){const e=n[0],i=n[1];return t[0]=r[0]*e+r[2]*i+r[4],t[1]=r[1]*e+r[3]*i+r[5],t}function p(t,n,r,e){const i=n[0]-r[0],s=n[1]-r[1],a=Math.sin(e),o=Math.cos(e);return t[0]=i*o-s*a+r[0],t[1]=i*a+s*o+r[1],t}function y(t,n){return t[0]===n[0]&&t[1]===n[1]}function b(t,n){const r=t[0],i=t[1],s=n[0],a=n[1],o=(0,e.FD)();return Math.abs(r-s)<=o*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-a)<=o*Math.max(1,Math.abs(i),Math.abs(a))}const v=m,P=o,I=u,R=c,N=l,S=f,A=M;Object.freeze(Object.defineProperty({__proto__:null,add:a,angle:function(t,n){const r=t[0],e=t[1],i=n[0],s=n[1];let a=r*r+e*e;a>0&&(a=1/Math.sqrt(a));let o=i*i+s*s;o>0&&(o=1/Math.sqrt(o));const u=(r*i+e*s)*a*o;return u>1?0:u<-1?Math.PI:Math.acos(u)},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},copy:i,cross:function(t,n,r){const e=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=e,t},dist:N,distance:l,div:R,divide:c,dot:function(t,n){return t[0]*n[0]+t[1]*n[1]},equals:b,exactEquals:y,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},len:v,length:m,lerp:x,max:function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t},min:function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t},mul:I,multiply:u,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t},normalize:g,projectAndScale:function(t,n,r,e,i){let s=n[0]-r[0],a=n[1]-r[1];const o=(e[0]*s+e[1]*a)*(i-1);return s=e[0]*o,a=e[1]*o,t[0]=n[0]+s,t[1]=n[1]+a,t},random:function(t,n=1){const r=2*(0,e.Ov)()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},rotate:p,round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t},scale:h,scaleAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t},set:s,sqrDist:S,sqrLen:A,squaredDistance:f,squaredLength:M,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:P,subtract:o,transformMat2:function(t,n,r){const e=n[0],i=n[1];return t[0]=r[0]*e+r[2]*i,t[1]=r[1]*e+r[3]*i,t},transformMat2d:d,transformMat3:function(t,n,r){const e=n[0],i=n[1];return t[0]=r[0]*e+r[3]*i+r[6],t[1]=r[1]*e+r[4]*i+r[7],t},transformMat4:function(t,n,r){const e=n[0],i=n[1];return t[0]=r[0]*e+r[4]*i+r[12],t[1]=r[1]*e+r[5]*i+r[13],t}},Symbol.toStringTag,{value:"Module"}))},39829:(t,n,r)=>{r.d(n,{A:()=>P});var e,i=r(31635),s=r(4576),a=r(51447),o=r(4718),u=r(53966),c=r(91429),h=r(5443),l=r(91075),f=r(86738),m=r(16930),M=r(12359),g=r(94078),x=r(95108),d=r(90634),p=r(28735),y=r(56993),b=r(43937);function v(t){return!Array.isArray(t[0])}let P=e=class extends l.A{static fromExtent(t){const n=t.clone().normalize(),{spatialReference:r}=t;let i=!1,s=!1;for(const t of n)t.hasZ&&(i=!0),t.hasM&&(s=!0);const a={rings:n.map(t=>{const n=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(i&&t.hasZ){const r=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<n.length;t++)n[t].push(r)}if(s&&t.hasM){const r=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<n.length;t++)n[t].push(r)}return n}),spatialReference:r};return i&&(a.hasZ=!0),s&&(a.hasM=!0),new e(a)}constructor(t){super(function(t){if(!t)return;let{rings:n,hasM:r,hasZ:e,spatialReference:i}=t;switch(n??=[],function(t){return"number"==typeof t[0]?.[0]}(n)&&(n=[n]),n[0]?.[0]?.length){case 4:e??=!0,r??=!0;break;case 3:e??=!0!==r,r??=!e;break;default:e??=!1,r??=!1}return i??=m.A.WGS84,{...t,hasM:r,hasZ:e,rings:n,spatialReference:i}}(t)),this.curveRings=void 0,this.rings=[],this.type="polygon"}get cache(){return this.commitProperty("curveRings"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("rings"),this.commitProperty("spatialReference"),{}}get centroid(){(0,a.Lx)(u.A.getLogger(this),"centroid",{replacement:"Please use centroidOperator.execute() instead.",version:"4.34",warnOnce:!0});const t=(0,M.Ve)(this);return t?f.A.fromJSON(t):null}writeCurveRings(t,n){n.curveRings=(0,o.o8)(t)}get extent(){const t=(0,d.v)(this),{spatialReference:n}=this;return t?new h.A({...t,spatialReference:n}):null}writeRings(t,n){n.rings=(0,o.o8)(this.rings)}addRing(t){if(!t)return;const n=this.rings,r=n.length;if(v(t)){const e=[];for(let n=0,r=t.length;n<r;n++)e[n]=t[n].toArray();n[r]=e}else n[r]=t.slice();return this.notifyChange("rings"),this}clone(){const t=new e;return t.spatialReference=this.spatialReference,t.rings=(0,o.o8)(this.rings),t.curveRings=(0,o.o8)(this.curveRings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;const n=this.spatialReference,r=t.spatialReference;if(null!=n!=(null!=r))return!1;if(null!=n&&null!=r&&!n.equals(r))return!1;if(this.rings.length!==t.rings.length)return!1;const e=([t,n,r,e],[i,s,a,o])=>t===i&&n===s&&(null==r&&null==a||r===a)&&(null==e&&null==o||e===o);for(let n=0;n<this.rings.length;n++){const r=this.rings[n],i=t.rings[n];if(!(0,s.aI)(r,i,e))return!1}return!0}contains(t){if(!t)return!1;const n=(0,p.Cv)(t,this.spatialReference);return(0,g.m3)(this,null!=n?n:t)}isClockwise(t){const n=v(t)?t.map(t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y]):t;return(0,x.$3)(n)}getPoint(t,n){if(!this._validateInputs(t,n))return null;const r=this.rings[t][n],e=this.hasZ,i=this.hasM;return e&&!i?new f.A(r[0],r[1],r[2],void 0,this.spatialReference):i&&!e?new f.A(r[0],r[1],void 0,r[2],this.spatialReference):e&&i?new f.A(r[0],r[1],r[2],r[3],this.spatialReference):new f.A(r[0],r[1],this.spatialReference)}insertPoint(t,n,r){return this._validateInputs(t,n,!0)?((0,y.h)(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[t].splice(n,0,r),this.notifyChange("rings"),this):this}removePoint(t,n){if(!this._validateInputs(t,n))return null;const r=new f.A(this.rings[t].splice(n,1)[0],this.spatialReference);return this.notifyChange("rings"),r}removeRing(t){if(!this._validateInputs(t,null))return null;const n=this.rings.splice(t,1)[0],r=this.spatialReference,e=n.map(t=>new f.A(t,r));return this.notifyChange("rings"),e}setPoint(t,n,r){return this._validateInputs(t,n)?((0,y.h)(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[t][n]=r,this.notifyChange("rings"),this):this}_validateInputs(t,n,r=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=n){const e=this.rings[t];if(r&&(n<0||n>e.length))return!1;if(!r&&(n<0||n>=e.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,i.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"cache",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"centroid",null),(0,i.Cg)([(0,c.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],P.prototype,"curveRings",void 0),(0,i.Cg)([(0,b.K)("curveRings")],P.prototype,"writeCurveRings",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"extent",null),(0,i.Cg)([(0,c.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],P.prototype,"rings",void 0),(0,i.Cg)([(0,b.K)("rings")],P.prototype,"writeRings",null),P=e=(0,i.Cg)([(0,c.$K)("esri.geometry.Polygon")],P),P.prototype.toJSON.isDefaultToJSON=!0},46068:(t,n,r)=>{r.d(n,{DL:()=>m,ED:()=>l,SW:()=>u,Uk:()=>h,pb:()=>f,xm:()=>M}),r(77690);var e=r(29242),i=(r(37585),r(19419)),s=r(52006),a=r(15507);class o{constructor(t,n,r,e,i,s,a,o,u){this.cx=t,this.cy=n,this.a=r,this.b=e,this.cosR=i,this.sinR=s,this.u1=a,this.u2=o,this.isInvalid=u}}function u(t,n){const[r,e,i,s,u,c,h]=n.a,[l,f]=t,[m,M]=r,[g,x]=e,d=c*h,p=Math.cos(u),y=Math.sin(u),[b,v]=(0,a.Gz)((0,a.t7)(1/d*(f-x)*p-1/d*(l-g)*y,1/c*(f-x)*y+1/c*(l-g)*p),Math.atan2(1/d*(M-x)*p-1/d*(m-g)*y,1/c*(M-x)*y+1/c*(m-g)*p),i,s);return new o(g,x,c,d,p,y,b,v,0===c||0===d)}function c(t,n){const{a:r,b:e,cosR:i,sinR:s,cx:a,cy:o}=t,u=Math.cos(n),c=Math.sin(n);return[r*u*i-e*c*s+a,r*u*s+e*c*i+o]}function h(t,n){const{u1:r,u2:e}=t;return c(t,r*(1-n)+e*n)}function l(t,n,r){if(r<0||r>1)return[];if(0===r||1===r)return[(0,s.tk)(n)];const[e,[i,a],o,u,c,l,f]=n.a,{u1:m,u2:M}=t,g=m*(1-r)+M*r;return[{a:[[...h(t,r)],[i,a],Math.abs(g-m)<Math.PI?1:0,u,c,l,f]},{a:[[...e],[i,a],Math.abs(M-g)<Math.PI?1:0,u,c,l,f]}]}function f(t,n){const{a:r,b:e,cosR:i,sinR:s,u1:o,u2:u}=t,h=Math.PI/6,l=(0,a.R)(n,[1*h,2*h,4*h,5*h,7*h,8*h,10*h,11*h],n=>{const a=Math.cos(n),o=Math.sin(n),[u,h]=c(t,n);return[u,h,-r*i*o-e*s*a,-r*s*o+e*i*a,-r*i*a+e*s*o,-r*s*a-e*i*o]}),f=(0,a.yN)(o,u),m=new Set(l.map(t=>(0,a.Cp)(f,t)).filter(t=>t>f.min&&t<f.max));m.add(o),m.add(u);let M,g,x=1/0;for(const r of m){const e=c(t,r),[i,s]=e,a=n[0]-i,h=n[1]-s,l=a*a+h*h;l<x&&(M=(r-o)/(u-o),g=e,x=l)}return{t:M,curvePoint:g,distance:Math.sqrt(x)}}function m(t,n,r){const e=u(n,r),{a:s,b:o,u1:h,u2:l,cosR:f,sinR:m,isInvalid:M}=e,g=r.a[0];if((0,i.tK)(t,n),(0,i.tK)(t,g),M)return t;const x=Math.atan2(-o*m,s*f),d=x+Math.PI,p=Math.atan2(o*f,s*m),y=p+Math.PI,b=(0,a.yN)(h,l);for(const n of[x,d,p,y].map(t=>(0,a.Cp)(b,t)))n>b.min&&n<b.max&&(0,i.tK)(t,c(e,n));return t}function M(t,n,r){const[e,i,s,o,l,f,m]=n.a,M=u(t,n),{u1:g,u2:x,isInvalid:d}=M,p=x-g;if(d)return Math.sqrt((0,a.kb)(t,e));const y=[0,0];let b=0,v=[h(M,0),h(M,.25),h(M,.5),h(M,.75),h(M,1)];for(let t=0;t<14;t++){const t=v.length-1,n=p/(2*t),e=[];for(let r=0;r<t;r++)e.push(v[r]),e.push(c(M,g+(2*r+1)*n));e.push(v[v.length-1]),v=e,b=0;let s=0;for(let t=1;t<v.length;t++){const n=v[t-1],r=v[t];if(b+=Math.sqrt((0,a.kb)(n,r)),t>1){const e=v[t-2],o=(0,a.M_)(y,e,n,i,r);s+=o?Math.sqrt((0,a.kb)(n,o)):Math.abs(r[0]-n[0])+Math.abs(r[1]-n[1])}else s+=b}if(s-b<r)return b}return b}(0,e.vt)(),(0,e.vt)(),(0,e.vt)(),(0,e.vt)()},49663:(t,n,r)=>{r.d(n,{i:()=>a,x:()=>o});var e=r(34727),i=r(513),s=r(15507);function a(t,n){const[r,a,o,u]=n.a,[c,h]=t,[l,f]=r,[m,M]=a,g=c-m,x=h-M,d=Math.sqrt(g*g+x*x),p=l-m,y=f-M,b=Math.sqrt(p*p+y*y),v=0===d||0===b||!(0,e.b6)(d,b),P=d,[I,R]=(0,s.Gz)((0,s.t7)(h-M,c-m),Math.atan2(f-M,l-m),o,u);return new i.KP(m,M,P,I,R,v)}function o(t,n,r){const{cx:e,cy:s,thetaStart:a,thetaEnd:o}=t,[u,c,h,l]=n.a,f=a*(1-r)+o*r;return[{a:[(0,i.mq)(t,r),[e,s],Math.abs(f-a)<Math.PI?1:0,l]},{a:[[...u],[e,s],Math.abs(o-f)<Math.PI?1:0,l]}]}},50954:(t,n,r)=>{r.d(n,{GX:()=>h,pM:()=>c});var e=r(77690),i=r(29242),s=r(513),a=r(15507);const o=(0,i.vt)();function u(t,n,r){const[i,s]=t,[u,c]=n,[h,l]=r;(0,e.hZ)(o,i,u,h,s,c,l,1,1,1);const f=(0,e.a4)(o),m=4*f/((0,a.kb)(t,n)+(0,a.kb)(n,r)+(0,a.kb)(r,t));if(!isFinite(m)||Math.abs(m)<1e-8)return null;const M=i**2+s**2,g=u**2+c**2,x=h**2+l**2;(0,e.hZ)(o,M,g,x,s,c,l,1,1,1);const d=(0,e.a4)(o);return(0,e.hZ)(o,M,g,x,i,u,h,1,1,1),[d/f*.5,(0,e.a4)(o)/f*-.5]}function c(t,n){const[r,e]=n.c,i=u(t,e,r),o=null==i,c=i??(0,a.RS)([],t,r,.5),[h,l]=t,[f,m]=e,[M,g]=r,[x,d]=c,p=h-x,y=l-d,b=Math.sqrt(p*p+y*y),v=(0,a.t7)(l-d,h-x),P=(0,a.t7)(m-d,f-x);let I=(0,a.t7)(g-d,M-x);return(P-v)*(I-P)<0&&(I+=2*Math.sign(v-I)*Math.PI),new s.KP(x,d,b,v,I,o)}function h(t,n,r){const e=(0,s.mq)(t,r/2),i=(0,s.mq)(t,r),a=(0,s.mq)(t,(r+1)/2);return[{c:[i,e]},{c:[[...n.c[0]],a]}]}},51118:(t,n,r)=>{function e(t){const n=[];for(t.reset();t.nextPath();){const r=[];for(;t.nextPoint();){const n=[t.x,t.y];t.hasZ&&n.push(t.z),t.hasM&&n.push(t.m),r.push(n)}n.push(r)}return t.reset(),n}function i(t){const n=[];for(;t.nextPoint();)n.push([t.x,t.y]);return t.seekPathStart(),n}r.d(n,{A:()=>i,x:()=>e})},52006:(t,n,r)=>{function e(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function i(t){return"b"in t}function s(t){return"c"in t}function a(t){return Array.isArray(t)}function o(t){return"a"in t&&4===t.a.length}function u(t){return"a"in t&&7===t.a.length}function c(t){return a(t)?t:i(t)?t.b[0]:s(t)?t.c[0]:t.a[0]}function h(t){if(i(t)){const[n,r,e]=t.b;return{b:[[...n],[...r],[...e]]}}if(s(t)){const[n,r]=t.c;return{c:[[...n],[...r]]}}if(a(t))return[...t];if(o(t)){const[n,r,e,i]=t.a;return{a:[[...n],[...r],e,i]}}if(u(t)){const[n,r,e,i,s,a,o]=t.a;return{a:[[...n],[...r],e,i,s,a,o]}}return t}r.d(n,{DA:()=>o,Ed:()=>e,Xq:()=>a,aO:()=>s,n1:()=>i,tk:()=>h,wY:()=>u,yP:()=>c})},56993:(t,n,r)=>{function e(t,n,r=!1){let{hasM:e,hasZ:i}=t;Array.isArray(n)?4!==n.length||e||i?3===n.length&&r&&!e?(i=!0,e=!1):3===n.length&&e&&i&&(e=!1,i=!1):(e=!0,i=!0):(i=!i&&n.hasZ&&(!e||n.hasM),e=!e&&n.hasM&&(!i||n.hasZ)),t.hasZ=i,t.hasM=e}r.d(n,{h:()=>e})},59803:(t,n,r)=>{r.d(n,{T:()=>s});var e=r(34727),i=r(15507);function s(t,n,r){const[s,a]=t,[o,u]=n,[c,h]=r,[l,f]=[o-s,u-a];let m=l*(c-s)+f*(h-a);m/=l**2+f**2,m=(0,e.qE)(m,0,1);const M=(0,i.RS)([0,0],t,n,m);return{t:m,curvePoint:M,distance:Math.sqrt((0,i.kb)(M,r))}}},77690:(t,n,r)=>{r.d(n,{B8:()=>o,Ge:()=>m,I0:()=>f,KC:()=>u,a4:()=>c,hZ:()=>s,hs:()=>l,lw:()=>h,mg:()=>a,z0:()=>i});var e=r(34304);function i(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function s(t,n,r,e,i,s,a,o,u,c){return t[0]=n,t[1]=r,t[2]=e,t[3]=i,t[4]=s,t[5]=a,t[6]=o,t[7]=u,t[8]=c,t}function a(t,n){if(t===n){const r=n[1],e=n[2],i=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=i}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function o(t,n){const r=n[0],e=n[1],i=n[2],s=n[3],a=n[4],o=n[5],u=n[6],c=n[7],h=n[8],l=h*a-o*c,f=-h*s+o*u,m=c*s-a*u;let M=r*l+e*f+i*m;return M?(M=1/M,t[0]=l*M,t[1]=(-h*e+i*c)*M,t[2]=(o*e-i*a)*M,t[3]=f*M,t[4]=(h*r-i*u)*M,t[5]=(-o*r+i*s)*M,t[6]=m*M,t[7]=(-c*r+e*u)*M,t[8]=(a*r-e*s)*M,t):null}function u(t,n){const r=n[0],e=n[1],i=n[2],s=n[3],a=n[4],o=n[5],u=n[6],c=n[7],h=n[8];return t[0]=a*h-o*c,t[1]=i*c-e*h,t[2]=e*o-i*a,t[3]=o*u-s*h,t[4]=r*h-i*u,t[5]=i*s-r*o,t[6]=s*c-a*u,t[7]=e*u-r*c,t[8]=r*a-e*s,t}function c(t){const n=t[0],r=t[1],e=t[2],i=t[3],s=t[4],a=t[5],o=t[6],u=t[7],c=t[8];return n*(c*s-a*u)+r*(-c*i+a*o)+e*(u*i-s*o)}function h(t,n,r){const e=n[0],i=n[1],s=n[2],a=n[3],o=n[4],u=n[5],c=n[6],h=n[7],l=n[8],f=r[0],m=r[1],M=r[2],g=r[3],x=r[4],d=r[5],p=r[6],y=r[7],b=r[8];return t[0]=f*e+m*a+M*c,t[1]=f*i+m*o+M*h,t[2]=f*s+m*u+M*l,t[3]=g*e+x*a+d*c,t[4]=g*i+x*o+d*h,t[5]=g*s+x*u+d*l,t[6]=p*e+y*a+b*c,t[7]=p*i+y*o+b*h,t[8]=p*s+y*u+b*l,t}function l(t,n,r){const e=r[0],i=r[1],s=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=i*n[3],t[4]=i*n[4],t[5]=i*n[5],t[6]=s*n[6],t[7]=s*n[7],t[8]=s*n[8],t}function f(t,n){const r=n[0],e=n[1],i=n[2],s=n[3],a=r+r,o=e+e,u=i+i,c=r*a,h=e*a,l=e*o,f=i*a,m=i*o,M=i*u,g=s*a,x=s*o,d=s*u;return t[0]=1-l-M,t[3]=h-d,t[6]=f+x,t[1]=h+d,t[4]=1-c-M,t[7]=m-g,t[2]=f-x,t[5]=m+g,t[8]=1-c-l,t}function m(t,n){const r=n[0],e=n[1],i=n[2],s=n[3],a=n[4],o=n[5],u=n[6],c=n[7],h=n[8],l=n[9],f=n[10],m=n[11],M=n[12],g=n[13],x=n[14],d=n[15],p=r*o-e*a,y=r*u-i*a,b=r*c-s*a,v=e*u-i*o,P=e*c-s*o,I=i*c-s*u,R=h*g-l*M,N=h*x-f*M,S=h*d-m*M,A=l*x-f*g,z=l*d-m*g,q=f*d-m*x;let Z=p*q-y*z+b*A+v*S-P*N+I*R;return Z?(Z=1/Z,t[0]=(o*q-u*z+c*A)*Z,t[1]=(u*S-a*q-c*N)*Z,t[2]=(a*z-o*S+c*R)*Z,t[3]=(i*z-e*q-s*A)*Z,t[4]=(r*q-i*S+s*N)*Z,t[5]=(e*S-r*z-s*R)*Z,t[6]=(g*I-x*P+d*v)*Z,t[7]=(x*b-M*I-d*y)*Z,t[8]=(M*P-g*b+d*p)*Z,t):null}function M(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}const g=h,x=M;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:u,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:c,equals:function(t,n){const r=t[0],i=t[1],s=t[2],a=t[3],o=t[4],u=t[5],c=t[6],h=t[7],l=t[8],f=n[0],m=n[1],M=n[2],g=n[3],x=n[4],d=n[5],p=n[6],y=n[7],b=n[8],v=(0,e.FD)();return Math.abs(r-f)<=v*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-m)<=v*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(s-M)<=v*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(a-g)<=v*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(o-x)<=v*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(u-d)<=v*Math.max(1,Math.abs(u),Math.abs(d))&&Math.abs(c-p)<=v*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(h-y)<=v*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(l-b)<=v*Math.max(1,Math.abs(l),Math.abs(b))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:i,fromQuat:f,fromRotation:function(t,n){const r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:o,isOrthoNormal:function(t){const n=(0,e.FD)(),r=t[0],i=t[1],s=t[2],a=t[3],o=t[4],u=t[5],c=t[6],h=t[7],l=t[8];return Math.abs(1-(r*r+a*a+c*c))<=n&&Math.abs(1-(i*i+o*o+h*h))<=n&&Math.abs(1-(s*s+u*u+l*l))<=n},mul:g,multiply:h,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:m,normalFromMat4Legacy:function(t,n){const r=n[0],e=n[1],i=n[2],s=n[4],a=n[5],o=n[6],u=n[8],c=n[9],h=n[10],l=h*a-o*c,f=-h*s+o*u,m=c*s-a*u,M=r*l+e*f+i*m;if(!M)return null;const g=1/M;return t[0]=l*g,t[1]=(-h*e+i*c)*g,t[2]=(o*e-i*a)*g,t[3]=f*g,t[4]=(h*r-i*u)*g,t[5]=(-o*r+i*s)*g,t[6]=m*g,t[7]=(-c*r+e*u)*g,t[8]=(a*r-e*s)*g,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){const e=n[0],i=n[1],s=n[2],a=n[3],o=n[4],u=n[5],c=n[6],h=n[7],l=n[8],f=Math.sin(r),m=Math.cos(r);return t[0]=m*e+f*a,t[1]=m*i+f*o,t[2]=m*s+f*u,t[3]=m*a-f*e,t[4]=m*o-f*i,t[5]=m*u-f*s,t[6]=c,t[7]=h,t[8]=l,t},scale:l,scaleByVec2:function(t,n,r){const e=r[0],i=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=i*n[3],t[4]=i*n[4],t[5]=i*n[5],t},set:s,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:x,subtract:M,translate:function(t,n,r){const e=n[0],i=n[1],s=n[2],a=n[3],o=n[4],u=n[5],c=n[6],h=n[7],l=n[8],f=r[0],m=r[1];return t[0]=e,t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=u,t[6]=f*e+m*a+c,t[7]=f*i+m*o+h,t[8]=f*s+m*u+l,t},transpose:a},Symbol.toStringTag,{value:"Module"}))},79567:(t,n,r)=>{r.d(n,{e:()=>h});var e=r(19419),i=r(4305),s=r(513),a=r(50954),o=r(52006),u=r(49663),c=r(46068);function h(t,n,r){if((0,o.Xq)(r))return(0,e.tK)(t,n),(0,e.tK)(t,r),t;if((0,o.n1)(r))return(0,i.lM)(t,n,r);if((0,o.aO)(r)){const e=(0,a.pM)(n,r);return(0,s.X0)(t,e)}if((0,o.DA)(r)){const e=(0,u.i)(n,r);return(0,s.X0)(t,e)}return(0,c.DL)(t,n,r)}},90634:(t,n,r)=>{r.d(n,{HA:()=>h,Z3:()=>m,ge:()=>l,v:()=>f});var e=r(537);const i=[];function s(t,n,r,e){return{xmin:t,ymin:n,xmax:r,ymax:e}}function a(t,n,r,e,i,s){return{xmin:t,ymin:n,zmin:r,xmax:e,ymax:i,zmax:s}}function o(t,n,r,e,i,s){return{xmin:t,ymin:n,mmin:r,xmax:e,ymax:i,mmax:s}}function u(t,n,r,e,i,s,a,o){return{xmin:t,ymin:n,zmin:r,mmin:e,xmax:i,ymax:s,zmax:a,mmax:o}}function c(t,n=!1,r=!1){return n?r?u(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):a(t[0],t[1],t[2],t[3],t[4],t[5]):r?o(t[0],t[1],t[2],t[3],t[4],t[5]):s(t[0],t[1],t[2],t[3])}function h(t){return t?function(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}(t)?t:function(t){return void 0!==t.x&&void 0!==t.y}(t)?function(t){const{x:n,y:r,z:e,m:i}=t,c=null!=i;return null!=e?c?u(n,r,e,i,n,r,e,i):a(n,r,e,n,r,e):c?o(n,r,i,n,r,i):s(n,r,n,r)}(t):function(t){return void 0!==t.rings}(t)?f(t):function(t){return void 0!==t.paths}(t)?m(t):function(t){return void 0!==t.points}(t)?l(t):null:null}function l(t){const{hasZ:n,hasM:r,points:s}=t,a=(0,e.Pj)(i,s,n??!1,r??!1,n??!1,r??!1);return a?c(a,n,r):null}function f(t){const{hasZ:n,hasM:r,rings:s,curveRings:a}=t,o=(0,e.Yz)(i,a??s,n??!1,r??!1);return o?c(o,n,r):null}function m(t){const{hasZ:n,hasM:r,paths:s,curvePaths:a}=t,o=(0,e.Yz)(i,a??s,n??!1,r??!1);return o?c(o,n,r):null}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(32680),l(76591),l(76597),l(24321),l(72722),l(43519),l(96336),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(14527),l(89390),l(98619),l(62602),l(22393),l(59469),l(32482),l(96598),l(51406),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(10906),l(43616),l(51255),l(14113);var s=l(28491)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(32680),l(68317),l(76597),l(24321),l(72722),l(43519),l(96336),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(14527),l(89390),l(98619),l(62602),l(22393),l(59469),l(32482),l(96598),l(51406),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(10906),l(43616),l(51255),l(14113);var s=l(28491)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5],{5443:(t,e,i)=>{i.d(e,{A:()=>y});var s,n=i(31635),r=i(799),h=i(91429),a=i(91075),m=i(86738),o=i(16930),c=i(94078),l=i(12176),u=i(21325),x=i(28735);function f(t,e,i){return null==e?i:null==i?e:t(e,i)}let y=s=class extends a.A{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,e,i,s,n){return function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?o.A.WGS84:t.spatialReference,t):{xmin:t,ymin:e,xmax:i,ymax:s,spatialReference:n??o.A.WGS84}}static fromPoint(t){return new s({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new m.A({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const e=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-e.x,t.y-e.y,t.z-e.z):this.offset(t.x-e.x,t.y-e.y)}clone(){const t=new s;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const e=this.spatialReference,i=t.spatialReference;return e&&i&&!e.equals(i)&&(0,x.y7)(e,i)&&(t=e.isWebMercator?(0,x.Gh)(t):(0,x.ci)(t,!0)),"point"===t.type?(0,c.qz)(this,t):"extent"===t.type&&(0,c.gH)(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,i=t.spatialReference;return e&&i&&!e.equals(i)&&(0,x.y7)(e,i)&&(t=e.isWebMercator?(0,x.Gh)(t):(0,x.ci)(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const e=.5*(1-t),i=this.width*e,s=this.height*e;if(this.xmin+=i,this.ymin+=s,this.xmax-=i,this.ymax-=s,this.hasZ){const t=(this.zmax-this.zmin)*e;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*e;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const e=this.spatialReference,i=t.spatialReference;return e&&i&&!(0,u.aI)(e,i)&&(0,x.y7)(e,i)&&(t=e.isWebMercator?(0,x.Gh)(t):(0,x.ci)(t,!0)),(0,l.xK)(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,e,i){return this.xmin+=t,this.ymin+=e,this.xmax+=t,this.ymax+=e,null!=i&&(this.zmin+=i,this.zmax+=i),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=f(Math.min,this.zmin,t.zmin),this.zmax=f(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=f(Math.min,this.mmin,t.mmin),this.mmax=f(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=f(Math.max,this.zmin,t.zmin),this.zmax=f(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=f(Math.max,this.mmin,t.mmin),this.mmax=f(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=(0,u.Vp)(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,i=this._getCM(t);if(i){const s=e.isWebMercator?(0,x.ci)(i):i;this.xmin-=i.x,this.xmax-=i.x,e.isWebMercator||(s.x=p(s.x,t).x),this.spatialReference=new o.A((0,r.HC)((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:s.x}))}return this}_getCM(t){let e=null;const[i,s]=t.valid,n=this.xmin,r=this.xmax;return n>=i&&n<=s&&r>=i&&r<=s||(e=this.center),e}_normalize(t,e,i){const s=this.spatialReference;if(!s)return this;const n=i??(0,u.Vp)(s);if(null==n)return this;const r=this._getParts(n).map(t=>t.extent);if(r.length<2)return r[0]||this;if(r.length>2)return t?this._shiftCM(n):this.set({xmin:n.valid[0],xmax:n.valid[1]});if(t)return this._shiftCM(n);if(e)return r;let h=!0,a=!0;return r.forEach(t=>{t.hasZ||(h=!1),t.hasM||(a=!1)}),{rings:r.map(t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(h){const i=(t.zmax-t.zmin)/2;for(let t=0;t<e.length;t++)e[t].push(i)}if(a){const i=(t.mmax-t.mmin)/2;for(let t=0;t<e.length;t++)e[t].push(i)}return e}),hasZ:h,hasM:a,spatialReference:s}}_getParts(t){let e=this.cache._parts;if(!e){e=[];const{ymin:i,ymax:n,spatialReference:r}=this,h=this.width,a=this.xmin,m=this.xmax;let o;t=t||(0,u.Vp)(r);const[c,l]=t.valid;o=p(this.xmin,t);const x=o.x,f=o.frameId;o=p(this.xmax,t);const y=o.x,z=o.frameId,d=x===y&&h>0;if(h>2*l){const t=new s(a<m?x:y,i,l,n,r),h=new s(c,i,a<m?y:x,n,r),o=new s(0,i,l,n,r),u=new s(c,i,0,n,r),p=[],d=[];t.contains(o)&&p.push(f),t.contains(u)&&d.push(f),h.contains(o)&&p.push(z),h.contains(u)&&d.push(z);for(let t=f+1;t<z;t++)p.push(t),d.push(t);e.push({extent:t,frameIds:[f]},{extent:h,frameIds:[z]},{extent:o,frameIds:p},{extent:u,frameIds:d})}else x>y||d?e.push({extent:new s(x,i,l,n,r),frameIds:[f]},{extent:new s(c,i,y,n,r),frameIds:[z]}):e.push({extent:new s(x,i,y,n,r),frameIds:[f]});this.cache._parts=e}const i=this.hasZ,n=this.hasM;if(i||n){const t={};i&&(t.zmin=this.zmin,t.zmax=this.zmax),n&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let i=0;i<e.length;i++)e[i].extent.set(t)}return e}};function p(t,e){const[i,s]=e.valid,n=2*s;let r,h=0;return t>s?(r=Math.ceil(Math.abs(t-s)/n),t-=r*n,h=r):t<i&&(r=Math.ceil(Math.abs(t-i)/n),t+=r*n,h=-r),{x:t,frameId:h}}(0,n.Cg)([(0,h.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,n.Cg)([(0,h.MZ)({readOnly:!0})],y.prototype,"center",null),(0,n.Cg)([(0,h.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,n.Cg)([(0,h.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],y.prototype,"hasM",null),(0,n.Cg)([(0,h.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],y.prototype,"hasZ",null),(0,n.Cg)([(0,h.MZ)({readOnly:!0})],y.prototype,"height",null),(0,n.Cg)([(0,h.MZ)({type:o.A,json:{write:!0},value:o.A.WGS84})],y.prototype,"spatialReference",void 0),(0,n.Cg)([(0,h.MZ)({readOnly:!0})],y.prototype,"width",null),(0,n.Cg)([(0,h.MZ)({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],y.prototype,"xmin",void 0),(0,n.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],y.prototype,"ymin",void 0),(0,n.Cg)([(0,h.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],y.prototype,"mmin",void 0),(0,n.Cg)([(0,h.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],y.prototype,"zmin",void 0),(0,n.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],y.prototype,"xmax",void 0),(0,n.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],y.prototype,"ymax",void 0),(0,n.Cg)([(0,h.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],y.prototype,"mmax",void 0),(0,n.Cg)([(0,h.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],y.prototype,"zmax",void 0),y=s=(0,n.Cg)([(0,h.$K)("esri.geometry.Extent")],y),y.prototype.toJSON.isDefaultToJSON=!0},12176:(t,e,i)=>{i.d(e,{Ql:()=>p,fA:()=>x,xB:()=>r,xK:()=>z});var s=i(94078);function n(t,e){return(0,s.qz)(t,e)}function r(t,e){const i=t.hasZ&&e.hasZ;let s,n,r;if(t.xmin<=e.xmin){if(s=e.xmin,t.xmax<s)return!1}else if(s=t.xmin,e.xmax<s)return!1;if(t.ymin<=e.ymin){if(n=e.ymin,t.ymax<n)return!1}else if(n=t.ymin,e.ymax<n)return!1;if(i&&e.hasZ)if(t.zmin<=e.zmin){if(r=e.zmin,t.zmax<r)return!1}else if(r=t.zmin,e.zmax<r)return!1;return!0}function h(t,e){const{points:i,hasZ:n}=e,r=n?s.F8:s.CW;for(const e of i)if(r(t,e))return!0;return!1}const a=[0,0],m=[0,0],o=[0,0],c=[0,0],l=[a,m,o,c],u=[[o,a],[a,m],[m,c],[c,o]];function x(t,e){return function(t,e){a[0]=t.xmin,a[1]=t.ymax,m[0]=t.xmax,m[1]=t.ymax,o[0]=t.xmin,o[1]=t.ymin,c[0]=t.xmax,c[1]=t.ymin;for(const t of l)if((0,s.t1)(e,t))return!0;for(const i of e){if(!i.length)continue;let e=i[0];if((0,s.CW)(t,e))return!0;for(let n=1;n<i.length;n++){const r=i[n];if((0,s.CW)(t,r)||y(e,r,u))return!0;e=r}}return!1}(t,e.rings)}function f(t,e){a[0]=t.xmin,a[1]=t.ymax,m[0]=t.xmax,m[1]=t.ymax,o[0]=t.xmin,o[1]=t.ymin,c[0]=t.xmax,c[1]=t.ymin;const i=e.paths;for(const e of i){if(!i.length)continue;let n=e[0];if((0,s.CW)(t,n))return!0;for(let i=1;i<e.length;i++){const r=e[i];if((0,s.CW)(t,r)||y(n,r,u))return!0;n=r}}return!1}function y(t,e,i){for(let s=0;s<i.length;s++)if(p(t,e,i[s][0],i[s][1]))return!0;return!1}function p(t,e,i,s,n){const[r,h]=t,[a,m]=e,[o,c]=i,[l,u]=s,x=l-o,f=r-o,y=a-r,p=u-c,z=h-c,d=m-h,_=p*y-x*d;if(0===_)return!1;const g=(x*z-p*f)/_,M=(y*z-d*f)/_;return g>=0&&g<=1&&M>=0&&M<=1&&(n&&(n[0]=r+g*(a-r),n[1]=h+g*(m-h)),!0)}function z(t){switch(t){case"esriGeometryEnvelope":case"extent":return r;case"esriGeometryMultipoint":case"multipoint":return h;case"esriGeometryPoint":case"point":return n;case"esriGeometryMultiPatch":case"multipatch":case"esriGeometryPolygon":case"polygon":return x;case"esriGeometryPolyline":case"polyline":return f}}},44123:(t,e,i)=>{i.d(e,{WhereClauseCache:()=>r});var s=i(66344),n=i(88368);class r{constructor(t,e){this._cache=new s.q(t),this._invalidCache=new s.q(e)}get(t,e){const i=`${e?.uid}:${t}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=n.A.create(t,{fieldsIndex:e});return this._cache.put(i,s),s}catch(t){return this._invalidCache.put(i,t),null}}getError(t,e){const i=`${e?.uid}:${t}`;return this._invalidCache.get(i)??null}}},66344:(t,e,i)=>{i.d(e,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db.clear()}register(t){this._users.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._users.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const i=this._db.get(t.id+e);return i?.size??0}put(t,e,i,n,h){e=t.id+e;const a=this._db.get(e);if(a&&(this._size-=a.size,t.size-=a.size,this._db.delete(e),a.entry!==i&&this._notifyRemove(e,a.entry,a.size,0)),n>this._maxSize)return void this._notifyRemove(e,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${e}`),void this._notifyRemove(e,i,0,0);const m=1+Math.max(h,-4)- -3;this._db.set(e,new r(i,n,m)),this._size+=n,t.size+=n,this._checkSize()}updateSize(t,e){e=t.id+e;const i=this._db.get(e);if(!i)return;this._size-=i.size,t.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const t=this._notifyRemove(e,i.entry,s,1);if(!(null!=t&&t>0))return void this._db.delete(e);s=t}i.size=s,this._size+=s,t.size+=s,this._checkSize()}pop(t,e){e=t.id+e;const i=this._db.get(e);if(i)return this._size-=i.size,t.size-=i.size,this._db.delete(e),++this._hit,i.entry;++this._miss}get(t,e){e=t.id+e;const i=this._db.get(e);if(void 0!==i)return this._db.delete(e),i.lives=i.lifetime,this._db.set(e,i),++this._hit,i.entry;++this._miss}peek(t,e){const i=this._db.get(t.id+e);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},i=new Array;this._db.forEach((t,s)=>{const n=t.lifetime;i[n]=(i[n]||0)+t.size,this._users.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=e[r]||0;e[r]=i+t.size}})});const s={};this._users.forEach(t=>{const i=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[i]||0;e[i]=n,s[i]=Math.round(100*t.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(e);n.sort((t,i)=>e[i]-e[t]),n.forEach(i=>t[i]=Math.round(e[i]/2**20)+"MB / "+s[i]);for(let e=i.length-1;e>=0;--e){const s=i[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forEach(t=>t.resetHitRate())}clear(t){const e=t.id;this._db.forEach((t,i)=>{i.startsWith(e)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,t.size,0))}),t.size=0}clearAll(){this._db.forEach((t,e)=>this._notifyRemove(e,t.entry,t.size,0)),this._users.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(const[e,i]of this._db)e.startsWith(t.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,i,s){const n=this._users.get(t.split(h)[0])?.removeFunc,r=n?.(e,s,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((t,e)=>this._checkSizeLimits(t,e)),this._checkSizeLimits(this.maxSize)}setMaxSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const i=e??this;if(i.size<=t)return;const s=e?.id;let n=!0;for(;n;){n=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!s||r.startsWith(s))){const s=e??this._users.get(r.split(h)[0]);if(this._purgeItem(r,a,s),i.size<=.9*t)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=e??this._users.get(n.split(h)[0]);if(this._purgeItem(n,r,s),i.size<=.9*t)return}}_purgeItem(t,e,i){if(this._db.delete(t),e.lives<=1){this._size-=e.size,i&&(i.size-=e.size);const s=this._notifyRemove(t,e.entry,e.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),e.lives=e.lifetime,e.size=s,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}new n(0);class r{constructor(t,e,i){this.entry=t,this.size=e,this.lifetime=i,this.lives=i}}const h=":";class a{constructor(t,e){this.removeFunc=e,this._storage=new n,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(t,e,i=1){this._storage.put(this,t,e,i,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},94078:(t,e,i)=>{i.d(e,{CW:()=>a,F8:()=>m,gH:()=>h,m3:()=>c,qz:()=>n,rL:()=>r,t1:()=>l});const s=[0,0];function n(t,e){return null!=e&&o(t,e.x,e.y,e.z)}function r(t,e){if(!e.points?.length)return!1;for(const i of e.points)if(!a(t,i))return!1;return!0}function h(t,e){const{xmin:i,ymin:s,zmin:n,xmax:r,ymax:h,zmax:a}=e;return t.hasZ&&e.hasZ?o(t,i,s,n)&&o(t,i,h,n)&&o(t,r,h,n)&&o(t,r,s,n)&&o(t,i,s,a)&&o(t,i,h,a)&&o(t,r,h,a)&&o(t,r,s,a):o(t,i,s)&&o(t,i,h)&&o(t,r,h)&&o(t,r,s)}function a(t,e){return o(t,e[0],e[1])}function m(t,e){return o(t,e[0],e[1],e[2])}function o(t,e,i,s){return e>=t.xmin&&e<=t.xmax&&i>=t.ymin&&i<=t.ymax&&(null==s||!t.hasZ||s>=t.zmin&&s<=t.zmax)}function c(t,e){return s[1]=e.y,s[0]=e.x,function(t,e){return l(t.rings,e)}(t,s)}function l(t,e){if(!t||t.length<1)return!1;if(function(t){return!Array.isArray(t[0][0])}(t))return u(!1,t,e);let i=!1;for(let s=0,n=t.length;s<n;s++)i=u(i,t[s],e);return i}function u(t,e,i){const[s,n]=i;let r=t,h=0;for(let t=0,i=e.length;t<i;t++){h++,h===i&&(h=0);const[a,m]=e[t],[o,c]=e[h];(m<n&&c>=n||c<n&&m>=n)&&a+(n-m)/(c-m)*(o-a)<s&&(r=!r)}return r}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3693],{3693:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>Se});var r=n(52106),i=n(66131),a=n(47609),s=n(66395),o=n(59534),l=n(85935),u=n(93833),d=n(30445),c=n(93818),f=n(78878),p=n(80672),h=n(48938),m=n(87449),y=n(11221),g=n(33325),w=n(80609),I=n(1262),F=n(88368);class A{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class b extends A{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class N extends A{constructor(e,t,n){super((0,g.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=n}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,w.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class S extends A{constructor(e,t,n){super(e),this.codefield=t,this._stringToCode=n,this._codeToString={};for(const e in n)this._codeToString[n[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const n=this.evaluateNodeToWhereClause(e.parseTree,0,this.field.name,this.codefield instanceof F.A?(0,w.YY)(this.codefield,0):this.codefield,e.parameters);return n.includes(S.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:F.A.create(n,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,n=null,r=null,i){switch(e.type){case"interval":return(0,w.oj)(this.evaluateNodeToWhereClause(e.value,t,n,r,i),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,n,S.BADNESS,i));for(const a of e.clauses)r+=" WHEN "+this.evaluateNodeToWhereClause(a.operand,t,n,S.BADNESS,i)+" THEN "+this.evaluateNodeToWhereClause(a.value,t,n,S.BADNESS,i);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,n,S.BADNESS,i)),r+=" END ",r}case"parameter":{const n=i[e.value.toLowerCase()];return"string"==typeof n?"'"+n.toString().replaceAll("'","''")+"'":(0,g.$P)(n)||(0,g.Lk)(n)?(0,w.bm)(n,t):(0,g.eg)(n)?(0,w.F1)(n,t):(0,g.rX)(n)?(0,w.R8)(n,t):(0,g.f0)(n)?(0,w.Nf)(n,t):Array.isArray(n)?n.map(e=>"string"==typeof e?"'"+e.toString().replaceAll("'","''")+"'":(0,g.$P)(e)||(0,g.Lk)(e)?(0,w.bm)(e,t):(0,g.eg)(e)?(0,w.F1)(e,t):(0,g.rX)(e)?(0,w.R8)(e,t):(0,g.f0)(e)?(0,w.Nf)(e,t):e.toString()):n.toString()}case"expression-list":{const a=[];for(const s of e.value)a.push(this.evaluateNodeToWhereClause(s,t,n,r,i));return a}case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,n,S.BADNESS,i)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" AND "+this.evaluateNodeToWhereClause(e.right,t,n,r,i)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" OR "+this.evaluateNodeToWhereClause(e.right,t,n,r,i)+") ";case"IS":if("null"!==e.right.type)throw new I.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new I.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IS NOT NULL )";case"IN":{if("expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let s=!0;for(const t of e.right.value){if("string"!==t.type){s=!1;break}if(void 0===this._stringToCode[t.value]){s=!1;break}a.push(this._stringToCode[t.value].toString())}if(s)return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return Array.isArray(a)?" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a+")) "}case"NOT IN":{if("expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let s=!0;for(const t of e.right.value){if("string"!==t.type){s=!1;break}if(void 0===this._stringToCode[t.value]){s=!1;break}a.push(this._stringToCode[t.value].toString())}if(s)return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return Array.isArray(a)?" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a+")) "}case"BETWEEN":{const r=this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" BETWEEN "+r[0]+" AND "+r[1]+" ) "}case"NOTBETWEEN":{const r=this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT BETWEEN "+r[0]+" AND "+r[1]+" ) "}case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this._stringToCode[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this._stringToCode[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this._stringToCode[e.left.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return(0,w.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return n&&n.toLowerCase()===e.column.toLowerCase()?"("+r+")":(0,w.Kb)(e);case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,n,S.BADNESS,i);return(0,w.F6)(e.name,r,t)}}throw new I.L("UnsupportedSyntax",{node:e.type})}extractValue(e){if(this.codefield instanceof F.A){const t=this.codefield.calculateValueCompiled(e);return this._codeToString[F.A.convertValueToStorageFormat(t)]}return this._codeToString[e.attributes[this.codefield]]}}class T extends A{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,w.bD)(e,this.field.name,(0,w.YY)(this._sql,0),t.getFieldsIndex())}}extractValue(e){return F.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class _ extends y.t1{static findField(e,t){for(const n of e)if(n.name.toLowerCase()===t.toString().toLowerCase())return n;return null}constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Adapted",this._maxProcessing=30,this._parent=e.parentfeatureset,this._adaptedFields=e.adaptedFields,this._extraFilter=e.extraFilter}_initialiseFeatureSet(){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=[];for(const e of this._adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _queryAll(){return await this._ensureLoaded(),this._extraFilter?(await this.query({abortSignal:h._})).features:this._calculateFields(await this._parent.queryAll(h._))}async query(e){let t=e.where??null;const n=this._reformulateWithoutAdaptions(t),r=n.cannot;t=n.where;let i=!1,a=e.orderBy;if(null!=a){i=!0;const e=[];for(const t of this._adaptedFields)if(!(t instanceof b)&&!0===a.scanForField(t.field.name)){if(!(t instanceof N)){a=null,i=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}a&&e.length>0&&(a=a.replaceFields(e))}null!=t?null!=this._extraFilter&&(t=(0,w.kg)(this._extraFilter,t)):t=this._extraFilter,await this._ensureLoaded();const s=await this._parent.query({...e,where:t,orderBy:a});return(0,m.dZ)(e.abortSignal),r?{...s,filterApplied:!1,ordered:!!i&&s.ordered,features:this._calculateFields(s.features)}:{...s,ordered:!!i&&s.ordered,features:this._calculateFields(s.features)}}async*_calculateFields(e){for await(const t of e)yield t.map(e=>{const t={};for(const n of this._adaptedFields)t[n.field.name]=n.extractValue(e);return{attributes:t,geometry:e.geometry}})}async queryStat(e){let t=!1,n=e.field,r=this._reformulateWithoutAdaptions(n);t=r.cannot,n=r.where;let i=e.where??null;if(r=this._reformulateWithoutAdaptions(i),t=t||r.cannot,i=r.where,null!=i?null!==this._extraFilter&&(i=(0,w.kg)(this._extraFilter,i)):i=this._extraFilter,t)return null==i&&null==e.spatialFilter?this._manualStat(e.stat,n,e.limit??g.gO,e.abortSignal):{calculated:!1};const a=await this._parent.queryStat({...e,field:n,where:i});return a.calculated?a:null==i&&null==e.spatialFilter?this._manualStat(e.stat,n,e.limit??g.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){for(const t of e.groupBy)for(const e of this._adaptedFields)if(t.toLowerCase()===e.field.name.toLowerCase()&&!(e instanceof b))return!1;const t=[];for(const n of e.statistics)if(null!==n.workingexpr){const e=this._reformulateWithoutAdaptions(n.workingexpr);if(e.cannot)return!1;const r=n.clone();r.workingexpr=e.where,t.push(r)}else t.push(n);let n=e.where??null;const r=this._reformulateWithoutAdaptions(n);return!r.cannot&&(n=r.where,null!==n?null!==this._extraFilter&&(n=(0,w.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent.canQueryAggregate({...e,statistics:t,where:n}))}async queryAggregate(e){const t=[];for(const n of e.statistics)if(null!==n.workingexpr){const e=this._reformulateWithoutAdaptions(n.workingexpr);if(e.cannot)throw new m.dr("NeverReach");const r=n.clone();r.workingexpr=e.where,t.push(r)}else t.push(n);let n=e.where??null;const r=this._reformulateWithoutAdaptions(n);if(r.cannot)throw new m.dr("NeverReach");return n=r.where,null!==n?null!==this._extraFilter&&(n=(0,w.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent.queryAggregate({...e,statistics:t,where:n})}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const n of this._adaptedFields)if(!0===(0,w.Ju)(e,n.field.name)){const r=n.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}}var C=n(35704),v=n(4576);class x extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._parent=e.parentfeatureset,this._orderByClause=e.orderbyclause}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){await this._ensureLoaded();const t=await this._parent.query({...e,orderBy:null==e.orderBy?this._orderByClause:e.orderBy});return(0,m.dZ)(e.abortSignal),!1===t.ordered?{...t,ordered:!0,features:this._sortFeatures(t.features,e.abortSignal)}:t}async*_sortFeatures(e,t){const n=[];for await(const r of e)n.push(r),await(0,f.a3)(),(0,m.dZ)(t);const r=n.flat();this._orderByClause.order(r);for(const e of(0,v.Ho)(r,this._maxQueryRate()))yield e}async queryStat(e){const t=await this._parent.queryStat(e);return t.calculated?t:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??g.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){return this._parent.canQueryAggregate(e)}async queryAggregate(e){return this._parent.queryAggregate(e)}getFieldsIndex(){return this._parent.getFieldsIndex()}}function D(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}class E{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const n=t[e].match(/\S+/g);this._fields.push(n[0]),2===n.length?"asc"===n[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 n=0;n<this._fields.length;n++){const r=this.featureValue(e,this._fields[n],n),i=this.featureValue(t,this._fields[n],n);let a=0;if(a=1===this._directions[n]?D(r,i):-1*D(r,i),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 n=0;n<this._fields.length;n++){0!==n&&(t+=",");let r=this._fields[n];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[n]?t+=" ASC":t+=" DESC"}return new E(t)}featureValue(e,t,n){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[n]=r,e.attributes[r];return null}}class k{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new k;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,n,r){const i=new k;i.field=e;const a=F.A.create(t,{fieldsIndex:n,timeZone:r}),s=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 I.L("MissingStatisticParameters");const t=F.A.create((0,w.Mi)(e.parseTree.args.value[0],0,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(a);if(null===s)throw new I.L("UnsupportedSqlFunction",{function:""});const o=s.name.toUpperCase().trim();if("MIN"===o){if(i.typeofstat="MIN",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"min"})}else if("MAX"===o){if(i.typeofstat="MAX",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"max"})}else if("COUNT"===o)i.typeofstat="COUNT",i.workingexpr=s.expr;else if("STDEV"===o){if(i.typeofstat="STDDEV",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"stdev"})}else if("SUM"===o){if(i.typeofstat="SUM",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"sum"})}else if("MEAN"===o){if(i.typeofstat="AVG",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:o})}else if("AVG"===o){if(i.typeofstat="AVG",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"avg"})}else{if("VAR"!==o)throw new I.L("UnsupportedSqlFunction",{function:o});if(i.typeofstat="VAR",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"var"})}return i}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var L=n(80200),U=n(74639),$=n(44729),j=n(55612),Z=n(15032),B=n(20437);const M=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class W extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._decodedStatsFields=[],this._decodedGroupByFields=[],this._canDoSimpleGroupBy=!0,this._physicalGroupByFields=[],this.objectIdField="ROW__ID",this._adaptedFields=[],this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}_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=this._parent.getFieldsIndex();this.objectIdField="ROW__ID",this.globalIdField="";let t=!1,n=1;for(;!1===t;){let e=!1;for(const t of this._config.groupbyfields)if(t.name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(const t of this._config.statsfields)if(t.name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+n.toString(),n++)}for(const t of this._config.statsfields){const n=new k;n.field=t.name,n.tofieldname=t.name,n.workingexpr=t.expression instanceof F.A?t.expression:F.A.create(t.expression,{fieldsIndex:e,timeZone:this.dateFieldsTimeZoneDefaultUTC}),n.typeofstat=M.lookup(t.statistic)??"COUNT",this._decodedStatsFields.push(n)}this._decodedGroupByFields=[];for(const t of this._config.groupbyfields){const n={name:t.name,singlefield:null,tofieldname:t.name,expression:t.expression instanceof F.A?t.expression:F.A.create(t.expression,{fieldsIndex:e,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupByFields.push(n)}const r={};this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const e of this._parent.fields)r[e.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField="",this.fields=[];const i=new k;i.field=this._nextUniqueName(r),i.tofieldname=this.objectIdField,i.workingexpr=F.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),i.typeofstat="MIN",this._decodedStatsFields.push(i);for(const e of this._decodedGroupByFields){const t=new B.A;if(e.name=this._nextUniqueName(r),t.name=e.tofieldname,t.alias=t.name,(0,w.DA)(e.expression)){const n=this._parent.getField((0,w.YY)(e.expression,0));if(!n)throw new m.dr("AggregationFieldNotFound");e.name=n.name,e.singlefield=n.name,this._physicalGroupByFields.push(n.name),t.type=n.type,e.sqlType=n.type}else{t.type=this._convertToEsriFieldType((0,w.IY)(e.expression,this._parent.fields));const n=new B.A;n.name=e.name,n.alias=n.name,this._physicalGroupByFields.push(e.name),this._adaptedFields.push(new T(n,e.expression)),this._canDoSimpleGroupBy=!1,e.sqlType=t.type}this.fields.push(t)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new b(e));for(const e of this._decodedStatsFields){const t=new B.A;let n=null;e.field=this._nextUniqueName(r),t.name=e.tofieldname,t.alias=t.name;const i=null!==e.workingexpr&&(0,w.DA)(e.workingexpr)?(0,w.YY)(e.workingexpr,0):"";switch(e.typeofstat){case"SUM":if(""!==i){if(n=this._parent.getField(i),!n)throw new m.dr("AggregationFieldNotFound");t.type=n.type}else t.type="double";break;case"MIN":case"MAX":if(""!==i){if(n=this._parent.getField(i),!n)throw new m.dr("AggregationFieldNotFound");t.type=n.type}else t.type="double";break;case"COUNT":t.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==i&&(n=this._parent.getField(i),!n))throw new m.dr("AggregationFieldNotFound");t.type="double"}this.fields.push(t)}}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){if(null!=e.spatialFilter)return y.An;const t={ordered:!1,nowhereclause:!1};await this._ensureLoaded();let n=e.where;if(null!=n)for(const e of this._decodedStatsFields)if(!0===(0,w.Ju)(n,e.tofieldname)){t.nowhereclause=!0,n=null;break}let r=e.orderBy;if(null!=r){t.ordered=!0;for(const e of this._decodedStatsFields)if(!0===r.scanForField(e.tofieldname)){r=null,t.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupByFields)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,t.ordered=!1;break}}if(!1!==this._canDoSimpleGroupBy&&await this._parent.canQueryAggregate({groupBy:this._physicalGroupByFields,statistics:this._decodedStatsFields,where:null,spatialFilter:null,abortSignal:e.abortSignal})){const i=await this._parent.queryAggregate({groupBy:this._physicalGroupByFields,statistics:this._decodedStatsFields,where:n?this._reformulateWhereClauseWithoutGroupByFields(n):null,spatialFilter:null,orderBy:r?this._reformulateOrderClauseWithoutGroupByFields(r):null,abortSignal:e.abortSignal});return(0,m.dZ)(e.abortSignal),{...i,filterApplied:!t.nowhereclause&&i.filterApplied,ordered:!0===t.ordered&&i.ordered,features:this._fixAggregateAttributeNames(i.features)}}const i=this._adaptedFields.length>0?new _({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null}):this._parent;if(!0===t.nowhereclause){const t=new x({parentfeatureset:i,orderbyclause:new E(this._physicalGroupByFields.join(",")+","+this._parent.objectIdField+" ASC")});return{filterApplied:!1,spatialFilterApplied:!1,ordered:!1,features:this._aggregateSortedFeatureGroups((await t.query({abortSignal:e.abortSignal})).features,this._maxQuery,e.abortSignal)}}let a=i;null!=n&&(a=new C.A({parentfeatureset:a,whereclause:this._reformulateWhereClauseWithoutGroupByFields(n)}));const s=new x({parentfeatureset:a,orderbyclause:new E(this._physicalGroupByFields.join(",")+","+this._parent.objectIdField+" ASC")});return{filterApplied:!1,spatialFilterApplied:!1,ordered:!1,features:this._aggregateSortedFeatureGroups((await s.query({abortSignal:e.abortSignal})).features,this._maxQuery,e.abortSignal)}}async*_fixAggregateAttributeNames(e){for await(const t of e)yield t.map(e=>{const t={geometry:e.geometry,attributes:{}},n={};for(const t in e.attributes)n[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupByFields)t.attributes[e.tofieldname]=n[e.name.toLowerCase()];for(const e of this._decodedStatsFields)t.attributes[e.tofieldname]=n[e.field.toLowerCase()];return t})}async*_aggregateSortedFeatureGroups(e,t,n){let r=null,i=[];for await(const a of e){await(0,f.a3)(),(0,m.dZ)(n);for(const e of a){const t=this._generateAggregateHash(e);null==r?r={features:[e],id:t}:t!==r.id?(i.push(this._calculateAndAppendAggregateItem(r)),r={features:[e],id:t}):r.features.push(e)}i.length>=t&&(yield i,i=[])}null!=r&&(i.push(this._calculateAndAppendAggregateItem(r)),yield i)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new m.dr("NeverReach")}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsFields)e=(0,w.bD)(e,t.tofieldname,(0,w.YY)(t.workingexpr,0),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupByFields)t.tofieldname!==t.name&&(e=(0,w.bD)(e,t.tofieldname,(0,w.YY)(t.expression,0),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupByFields)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_calculateFieldStat(e,t,n){const r=[];for(const n of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(n);null!==e&&(e instanceof $.n||e instanceof Z.k?r.push(e.toNumber()):e instanceof j.g?r.push(e.toMilliseconds()):r.push(e))}else r.push(null);n.attributes[t.tofieldname]=(0,U.s)(t.typeofstat,[r])}_calculateAndAppendAggregateItem(e){const t={attributes:{}};for(const n of this._decodedGroupByFields){const r=n.singlefield?e.features[0].attributes[n.singlefield]:F.A.convertValueToStorageFormat(n.expression.calculateValue(e.features[0]),n.sqlType);t.attributes[n.tofieldname]=r}for(const n of this._decodedStatsFields)this._calculateFieldStat(e,n,t);return t}_generateAggregateHash(e){let t="";for(const n of this._decodedGroupByFields){const r=n.singlefield?e.attributes[n.singlefield]:n.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,L.d)(t,L.T.String)}async getFeatureByObjectId(){throw new m.dr("NotImplemented")}}async function*R(e,t){let n=t;for await(const t of e)if(n>=t.length?(n-=t.length,yield t):(yield t.slice(0,n),n=0),n<=0)break}class P extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Top",this._maxProcessing=100,this._parent=e.parentfeatureset,this._limit=e.topnum}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){await this._ensureLoaded();const t=await this._parent.queryAll(e.abortSignal);return{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:!1,features:R(t,this._limit)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new m.dr("NeverReach")}getFieldsIndex(){return this._parent.getFieldsIndex()}}var q=n(85978),O=n(30235),V=n(334),G=n(74887),K=n(68654),J=n(20655),H=n(11254),z=n(51447),Q=n(53966),Y=n(66552);new Y.J({Clean:"clean",Dirty:"dirty"}),new Y.J({Physical:"physical",Virtual:"virtual"}),new Y.J({"Start and end":"start-and-end",Start:"start",Midspan:"midspan",End:"end"}),new Y.J({Available:"available",Consumed:"consumed",Reserved:"reserved"}),new Y.J({startingPoint:"starting-point",barrier:"barrier",stoppingPoint:"stopping-point"}),new Y.J({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation",path:"path",circuit:"circuit"});const X="{00000000-0000-0000-0000-000000000000}",ee=new Y.J({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionEdgeMidspanConnectivity:"junction-edge-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"});new Y.J({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});var te=n(2272),ne=n(31635),re=n(25482),ie=n(91429),ae=n(82799);let se=class extends re.o{constructor(e){super(e),this.type="networkElement",this.assetGroupCode=null,this.assetTypeCode=null,this.globalId=null,this.networkSourceId=null,this.objectId=null,this.positionFrom=null,this.positionTo=null,this.terminalId=null}};(0,ne.Cg)([(0,ie.MZ)({json:{write:!1}})],se.prototype,"type",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"assetGroupCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"assetTypeCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],se.prototype,"globalId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"networkSourceId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"objectId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"positionFrom",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"positionTo",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"terminalId",void 0),se=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.NetworkElement")],se);let oe=class extends se{constructor(e){super(e),this.type="telecomNetworkElement",this.firstUnit=null,this.lastUnit=null}};(0,ne.Cg)([(0,ie.MZ)({json:{write:!1}})],oe.prototype,"type",void 0),(0,ne.Cg)([(0,ie.MZ)({json:{write:!0}})],oe.prototype,"firstUnit",void 0),(0,ne.Cg)([(0,ie.MZ)({json:{write:!0}})],oe.prototype,"lastUnit",void 0),oe=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.TelecomNetworkElement")],oe);var le=n(36005),ue=n(43937);let de=class extends re.o{constructor(e){super(e),this.globalId=null,this.associationType=null,this.fromNetworkElement=null,this.toNetworkElement=null,this.geometry=null,this.errorMessage=null,this.percentAlong=null,this.errorCode=null,this.isContentVisible=null,this.status=null}readFromNetworkElement(e,t){return t.fromFirstUnit||t.fromLastUnit?new oe({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId,firstUnit:t.fromFirstUnit,lastUnit:t.fromLastUnit}):new se({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId})}writeFromNetworkElement(e,t){if(e&&(t.fromGlobalId=e.globalId,t.fromNetworkSourceId=e.networkSourceId,t.fromTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.fromFirstUnit=n.firstUnit,t.fromLastUnit=n.lastUnit}}readToNetworkElement(e,t){return t.toFirstUnit||t.toLastUnit?new oe({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId,firstUnit:t.toFirstUnit,lastUnit:t.toLastUnit}):new se({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId})}writeToNetworkElement(e,t){if(e&&(t.toGlobalId=e.globalId,t.toNetworkSourceId=e.networkSourceId,t.toTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.toFirstUnit=n.firstUnit,t.toLastUnit=n.lastUnit}}equals(e){if(this.globalId===X&&e.globalId===X){function t(e,t){return e.networkSourceId===t.networkSourceId&&e.globalId===t.globalId&&e.terminalId===t.terminalId&&e.firstUnit===t.firstUnit&&e.lastUnit===t.lastUnit}const n=this.fromNetworkElement,r=this.toNetworkElement,i=e.fromNetworkElement,a=e.toNetworkElement,s=t(n,i),o=t(r,a);return s&&o&&this.associationType===e.associationType}return null!=this.globalId&&null!=e.globalId&&this.globalId===e.globalId}};(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],de.prototype,"globalId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:ee.apiValues,json:{type:ee.jsonValues,read:ee.read,write:ee.write}})],de.prototype,"associationType",void 0),(0,ne.Cg)([(0,ie.MZ)({type:se,json:{write:{target:{fromGlobalId:{type:String},fromNetworkSourceId:{type:Number},fromTerminalId:{type:Number},fromFirstUnit:{type:Number},fromLastUnit:{type:Number}}},read:{source:["fromGlobalId","fromNetworkSourceId","fromTerminalId","fromFirstUnit","fromLastUnit"]}}})],de.prototype,"fromNetworkElement",void 0),(0,ne.Cg)([(0,le.w)("fromNetworkElement")],de.prototype,"readFromNetworkElement",null),(0,ne.Cg)([(0,ue.K)("fromNetworkElement")],de.prototype,"writeFromNetworkElement",null),(0,ne.Cg)([(0,ie.MZ)({type:se,json:{write:{target:{toGlobalId:{type:String},toNetworkSourceId:{type:Number},toTerminalId:{type:Number},toFirstUnit:{type:Number},toLastUnit:{type:Number}}},read:{source:["toGlobalId","toNetworkSourceId","toTerminalId","toFirstUnit","toLastUnit"]}}})],de.prototype,"toNetworkElement",void 0),(0,ne.Cg)([(0,le.w)("toNetworkElement")],de.prototype,"readToNetworkElement",null),(0,ne.Cg)([(0,ue.K)("toNetworkElement")],de.prototype,"writeToNetworkElement",null),(0,ne.Cg)([(0,ie.MZ)({type:ae.A,json:{write:!0}})],de.prototype,"geometry",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],de.prototype,"errorMessage",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"percentAlong",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"errorCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Boolean,json:{write:!0}})],de.prototype,"isContentVisible",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"status",void 0),de=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.Association")],de);const ce=de;let fe=class extends re.o{constructor(e){super(e),this.associations=[]}};function pe(e){const{returnDeletes:t,elements:n,gdbVersion:r,moment:i}=e.toJSON();return{returnDeletes:t,elements:JSON.stringify(n.map(e=>({globalId:e.globalId,networkSourceId:e.networkSourceId,terminalId:e.terminalId}))),types:JSON.stringify(e.types.map(e=>ee.toJSON(e))).replaceAll('"connectivity"','"junctionJunctionConnectivity"'),gdbVersion:r,moment:i??Date.now()}}(0,ne.Cg)([(0,ie.MZ)({type:[ce],json:{write:!0}})],fe.prototype,"associations",void 0),fe=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.QueryAssociationsResult")],fe);var he,me=n(56507);let ye=he=class extends re.o{static from(e){return(0,me.PZ)(he,e)}constructor(e){super(e),this.returnDeletes=!1,this.elements=[],this.types=[],this.gdbVersion=null,this.moment=null}};(0,ne.Cg)([(0,ie.MZ)({type:Boolean,json:{write:!0}})],ye.prototype,"returnDeletes",void 0),(0,ne.Cg)([(0,ie.MZ)({type:[se],json:{write:!0}})],ye.prototype,"elements",void 0),(0,ne.Cg)([(0,ie.MZ)({type:[ee.apiValues],json:{type:ee.jsonValues,read:ee.read,write:ee.write}})],ye.prototype,"types",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],ye.prototype,"gdbVersion",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?.getTime()}}}})],ye.prototype,"moment",void 0),ye=he=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.QueryAssociationsParameters")],ye);var ge=n(54218);function we(e,t,n){const r=e.getVariables();if(r.length>0){const i={};for(const e of r)i[e]=t.evaluateIdentifier(n,{name:e});e.parameters=i}return e}function Ie(e,t,n=null){for(const n in e)if(n.toLowerCase()===t.toLowerCase())return e[n];return n}function Fe(e){if(null===e)return null;const t={type:Ie(e,"type",""),name:Ie(e,"name","")};if("range"===t.type)t.range=Ie(e,"range",[]);else{t.codedValues=[];for(const n of Ie(e,"codedValues",[]))t.codedValues.push({name:Ie(n,"name",""),code:Ie(n,"code",null)})}return t}function Ae(e){if(null===e)return null;const t={},n=Ie(e,"wkt");null!==n&&(t.wkt=n);const r=Ie(e,"wkid");return null!==r&&(t.wkid=r),t}function be(e){if(null===e)return null;const t={hasZ:Ie(e,"hasz",!1),hasM:Ie(e,"hasm",!1)},n=Ie(e,"spatialreference");null!=n&&(t.spatialReference=Ae(n));const r=Ie(e,"x",null);if(null!==r)return t.x=r,t.y=Ie(e,"y",null),t.hasZ&&(t.z=Ie(e,"z",null)),t.hasM&&(t.m=Ie(e,"m",null)),t;const i=Ie(e,"rings",null);if(null!==i)return t.rings=i,t;const a=Ie(e,"paths",null);if(null!==a)return t.paths=a,t;const s=Ie(e,"points",null);if(null!==s)return t.points=s,t;for(const n of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const r=Ie(e,n,null);null!==r&&(t[n]=r)}return t}function Ne(e){return"utc"===e?.toLowerCase()?"UTC":"unknown"===e?.toLowerCase()?"Unknown":e}function Se(e){if("async"===e.mode){e.functions.timezone=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,a)=>{if((0,f.B)(a,1,2,t,n),(0,f.g)(a[0]))return"Unknown";if((0,f.f)(a[0]))return"Unknown";if((0,f.m)(a[0])){if(await a[0].load(),1===a.length||null===a[1])return a[0].datesInUnknownTimezone?Ne("unknown"):Ne(a[0].dateFieldsTimeZone);if(!(a[1]instanceof s.A)||!1===a[1].hasField("type"))throw new l.D$(t,"InvalidParameter",n);const e=a[1].field("type");if(!1===(0,ge.Kg)(e))throw new l.D$(t,"InvalidParameter",n);switch((0,f.s)(e).toLowerCase()){case"preferredtimezone":return Ne(a[0].preferredTimeZone);case"editfieldsinfo":return Ne(a[0].editFieldsInfo?.timeZone??null);case"timeinfo":return Ne(a[0].timeInfo?.timeZone??null);case"field":if(a[1].hasField("fieldname")&&(0,ge.Kg)(a[1].field("fieldname")))return Ne(a[0].fieldTimeZone((0,f.s)(a[1].field("fieldname"))))}throw new l.D$(t,"InvalidParameter",n)}const o=(0,f.P)(a[0],(0,f.K)(t));if(null===o)return null;const u=o.timeZone;return"system"===u?i.lY.systemTimeZoneCanonicalName:"utc"===u.toLowerCase()?"UTC":"unknown"===u.toLowerCase()?"Unknown":u})},e.functions.sqltimestamp=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,1,3,t,n);const a=i[0];if((0,f.e)(a)){if(1===i.length)return a.toSQLWithKeyword();if(2===i.length)return a.changeTimeZone((0,f.s)(i[1])).toSQLWithKeyword();throw new l.D$(t,"InvalidParameter",n)}if((0,f.f)(a))return a.toSQLWithKeyword();if((0,f.m)(a)){if(3!==i.length)throw new l.D$(t,"InvalidParameter",n);await a.load();const e=(0,f.s)(i[1]);if((0,f.f)(i[2]))return i[2].toSQLWithKeyword();if(!1===(0,f.e)(i[2]))throw new l.D$(t,"InvalidParameter",n);const r=a.fieldTimeZone(e);return null==r?i[2].toSQLWithKeyword():i[2].changeTimeZone(r).toSQLWithKeyword()}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,4,t,n),(0,f.l)(i[0])){const e=(0,f.s)(i[1]);let r=(0,f.J)(i[2],null);const a=(0,f.H)((0,f.J)(i[3],!0));if(null===r&&(r=["*"]),!1===(0,ge.cy)(r))throw new l.D$(t,"InvalidParameter",n);return i[0].featureSetById(e,a,r)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyid",min:2,max:4});const t=new o.b(["datasource","parent","root"]);e.functions.getfeatureset=function(n,r){return e.standardFunctionAsync(n,r,async(e,i,a)=>{if((0,f.B)(a,1,2,n,r),(0,f.k)(a[0])){const e=null==a[1]?"datasource":t.lookup((0,f.s)(a[1]));return(0,d.convertToFeatureSet)(a[0].fullSchema(),e,n.lrucache,n.interceptor,n.spatialReference)}throw new l.D$(n,"InvalidParameter",r)})},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,5,t,n),null===i[0])throw new l.D$(t,"PortalRequired",n);if(i[0]instanceof a.A){const e=(0,f.s)(i[1]),r=(0,f.s)(i[2]);let a=(0,f.J)(i[3],null);const s=(0,f.H)((0,f.J)(i[4],!0));if(null===a&&(a=["*"]),!1===(0,ge.cy)(a))throw new l.D$(t,"InvalidParameter",n);let o;return o=t.services?.portal?t.services.portal:J.A.getDefault(),o=(0,p.R)(i[0],o),(0,d.constructFeatureSetFromPortalItem)(e,r,t.spatialReference,a,s,o,t.lrucache,t.interceptor)}if(!1===(0,ge.Kg)(i[0]))throw new l.D$(t,"PortalRequired",n);const s=(0,f.s)(i[0]),o=(0,f.s)(i[1]);let u=(0,f.J)(i[2],null);const c=(0,f.H)((0,f.J)(i[3],!0));if(null===u&&(u=["*"]),!1===(0,ge.cy)(u))throw new l.D$(t,"InvalidParameter",n);return(0,d.constructFeatureSetFromPortalItem)(s,o,t.spatialReference,u,c,t.services?.portal??J.A.getDefault(),t.lrucache,t.interceptor)})},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,4,t,n),(0,f.l)(i[0])){const e=(0,f.s)(i[1]);let r=(0,f.J)(i[2],null);const a=(0,f.H)((0,f.J)(i[3],!0));if(null===r&&(r=["*"]),!1===(0,ge.cy)(r))throw new l.D$(t,"InvalidParameter",n);return i[0].featureSetByName(e,a,r)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(t,n){return e.standardFunction(t,n,(e,r,i)=>{(0,f.B)(i,1,1,t,n);const a={layerDefinition:{geometryType:"",objectIdField:"",globalIdField:"",typeIdField:"",hasM:!1,hasZ:!1,fields:[]},featureSet:{geometryType:"",features:[]}};if((0,ge.Kg)(i[0])){const e=JSON.parse(i[0]);void 0!==e.layerDefinition?(a.layerDefinition=e.layerDefinition,a.featureSet=e.featureSet,e.layerDefinition.spatialReference&&(a.layerDefinition.spatialReference=e.layerDefinition.spatialReference)):(a.featureSet.features=e.features,a.featureSet.geometryType=e.geometryType,a.layerDefinition.geometryType=a.featureSet.geometryType,a.layerDefinition.objectIdField=e.objectIdFieldName??"",a.layerDefinition.typeIdField=e.typeIdFieldName,a.layerDefinition.globalIdField=e.globalIdFieldName,a.layerDefinition.fields=e.fields,e.spatialReference&&(a.layerDefinition.spatialReference=e.spatialReference))}else{if(!(i[0]instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const e=JSON.parse(i[0].castToText(!0)),r=Ie(e,"layerdefinition");if(null!==r){a.layerDefinition.geometryType=Ie(r,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.globalIdField=Ie(r,"globalidfield",""),a.layerDefinition.objectIdField=Ie(r,"objectidfield",""),a.layerDefinition.typeIdField=Ie(r,"typeidfield",""),a.layerDefinition.hasZ=!0===Ie(r,"hasz",!1),a.layerDefinition.hasM=!0===Ie(r,"hasm",!1);const t=Ie(r,"spatialreference");t&&(a.layerDefinition.spatialReference=Ae(t));const n=[];for(const e of Ie(r,"fields",[])){const t={name:Ie(e,"name",""),alias:Ie(e,"alias",""),type:Ie(e,"type",""),nullable:Ie(e,"nullable",!0),editable:Ie(e,"editable",!0),length:Ie(e,"length",null),domain:Fe(Ie(e,"domain"))};n.push(t)}a.layerDefinition.fields=n;const i=Ie(e,"featureset");if(i){const e={};for(const t of n)e[t.name.toLowerCase()]=t.name;for(const t of Ie(i,"features",[])){const n={},r=Ie(t,"attributes",{});for(const t in r)n[e[t.toLowerCase()]]=r[t];a.featureSet.features.push({attributes:n,geometry:be(Ie(t,"geometry"))})}}}else{a.layerDefinition.hasZ=!0===Ie(e,"hasz",!1),a.layerDefinition.hasM=!0===Ie(e,"hasm",!1),a.layerDefinition.geometryType=Ie(e,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.objectIdField=Ie(e,"objectidfieldname",""),a.layerDefinition.typeIdField=Ie(e,"typeidfieldname","");const r=Ie(e,"spatialreference");r&&(a.layerDefinition.spatialReference=Ae(r));const i=[],s=Ie(e,"fields",null);if(!(0,ge.cy)(s))throw new l.D$(t,"InvalidParameter",n);for(const e of s){const t={name:Ie(e,"name",""),alias:Ie(e,"alias",""),type:Ie(e,"type",""),nullable:Ie(e,"nullable",!0),editable:Ie(e,"editable",!0),length:Ie(e,"length",null),domain:Fe(Ie(e,"domain"))};i.push(t)}a.layerDefinition.fields=i;const o={};for(const e of i)o[e.name.toLowerCase()]=e.name;let u=Ie(e,"features",null);if((0,ge.cy)(u))for(const e of u){const t={},n=Ie(e,"attributes",{});for(const e in n)t[o[e.toLowerCase()]]=n[e];a.featureSet.features.push({attributes:t,geometry:be(Ie(e,"geometry",null))})}else u=null,a.featureSet.features=u}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e){for(const t of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(t===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,ge.cy)(e.layerDefinition.fields)&&!1!==(0,ge.cy)(e.featureSet.features)}(a))throw new l.D$(t,"InvalidParameter",n);return a.layerDefinition.geometryType||(a.layerDefinition.geometryType="esriGeometryNull"),O.A.create(a,t.spatialReference)})},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.B)(a,2,2,t,n),(0,ge.cy)(a[0])||(0,f.j)(a[0])){const e=[];let r,i=a[0];if(i instanceof c.A&&(i=i.toArray()),!(0,f.i)(a[1]))throw new l.D$(t,"InvalidParameter",n);r=a[1].createFunction(t);for(const t of i){const n=r(t);(0,G.$X)(n)?!0===await n&&e.push(t):!0===n&&e.push(t)}return e}if((0,f.m)(a[0])){const n=await a[0].load(),r=F.A.create(a[1],{fieldsIndex:n.getFieldsIndex(),timeZone:n.dateFieldsTimeZoneDefaultUTC}),i=r.getVariables();if(i.length>0){const n={};for(const r of i)n[r]=e.evaluateIdentifier(t,{name:r});r.parameters=n}return new C.A({parentfeatureset:a[0],whereclause:r})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0])){const e=new E(i[1]);return new x({parentfeatureset:i[0],orderbyclause:e})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0]))return new P({parentfeatureset:i[0],topnum:i[1]});if((0,ge.cy)(i[0]))return(0,f.r)(i[1])>=i[0].length?i[0].slice():i[0].slice(0,(0,f.r)(i[1]));if((0,f.j)(i[0]))return(0,f.r)(i[1])>=i[0].length()?i[0].slice():i[0].slice(0,(0,f.r)(i[1]));throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,1,1,t,n),(0,f.m)(i[0])){const n=await i[0].first(e.abortSignal);if(null!==n){const e=u.Xj.createFromGraphicLikeObject(n.geometry,n.attributes,i[0],t.timeZone);return e._underlyingGraphic=n,e}return n}return(0,ge.cy)(i[0])?0===i[0].length?null:i[0][0]:(0,f.j)(i[0])?0===i[0].length()?null:i[0].get(0):null})},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,1,2,t,n);const a={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(i.length>1)if(i[1]instanceof s.A){if(i[1].hasField("minsize")&&(a.minsize=(0,f.r)(i[1].field("minsize"))),i[1].hasField("metadata")&&(a.returnMetadata=(0,f.H)(i[1].field("metadata"))),i[1].hasField("maxsize")&&(a.maxsize=(0,f.r)(i[1].field("maxsize"))),i[1].hasField("types")){const e=(0,f.N)(i[1].field("types"),!1);e.length>0&&(a.types=e)}}else if(null!==i[1])throw new l.D$(t,"InvalidParameter",n);if((0,f.k)(i[0])){const e=i[0]._layer;let n;if((0,f.m)(e))n=e;else{if(null==e||!(0,g.eB)(e))return[];n=(0,d.constructFeatureSet)(e,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}return await n.load(),n.queryAttachments(i[0].field(n.objectIdField),a.minsize,a.maxsize,a.types,a.returnMetadata)}if(null===i[0])return[];throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,2,4,t,n);const a=i[0],s=(0,f.s)(i[1]);let o=(0,f.J)(i[2],null);const u=(0,f.H)((0,f.J)(i[3],!0));if(null===o&&(o=["*"]),!1===(0,ge.cy)(o))throw new l.D$(t,"InvalidParameter",n);if(null===i[0])return null;if(!(0,f.k)(i[0]))throw new l.D$(t,"InvalidParameter",n);const c=a._layer;let p;if((0,f.m)(c))p=c;else{if(null==c||!(0,g.eB)(c))return null;p=(0,d.constructFeatureSet)(c,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}p=await p.load();const h=p.relationshipMetadata().filter(e=>e.name===s);if(0===h.length)return null;if(void 0!==h[0].relationshipTableId&&null!==h[0].relationshipTableId&&h[0].relationshipTableId>-1)return(0,d.constructFeatureSetFromRelationship)(p,h[0],a.field(p.objectIdField),p.spatialReference,o,u,t.lrucache,t.interceptor);let m=p.serviceUrl();if(!m)return null;m=m.endsWith("/")?m+h[0].relatedTableId.toString():m+"/"+h[0].relatedTableId.toString();const y=await(0,d.constructFeatureSetFromUrl)(m,p.spatialReference,o,u,t.lrucache,t.interceptor);await y.load();let w=y.relationshipMetadata();if(w=w.filter(e=>e.id===h[0].id),!1===a.hasField(h[0].keyField)||null===a.field(h[0].keyField)){const e=await p.getFeatureByObjectId(a.field(p.objectIdField),[h[0].keyField]);if(e){const t=F.A.create(w[0].keyField+"= @id",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});return t.parameters={id:e.attributes[h[0].keyField]},new C.A({parentfeatureset:y,whereclause:t})}return new q.A({parentfeatureset:y})}const I=F.A.create(w[0].keyField+"= @id",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});return I.parameters={id:a.field(h[0].keyField)},new C.A({parentfeatureset:y,whereclause:I})})},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,a)=>{(0,f.B)(a,2,3,t,n);const s=a[0],u=(0,o.B)((0,f.s)((0,f.J)(a[1],""))),c=(0,ge.Kg)(a[2])?(0,f.s)(a[2]):null;if(null===a[0])return null;if(!(0,f.k)(a[0]))throw new l.D$(t,"InvalidParameter",n);const p=s._layer;let h;if((0,f.m)(p))h=p;else{if(null==p||!(0,g.eB)(p))return null;h=(0,d.constructFeatureSet)(p,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}await h.load();const m=h.serviceUrl(),y=await(0,d.constructAssociationMetaDataFeatureSetFromUrl)(m,t.spatialReference,!0);if(y.unVersion>=8)return await async function(e,t,n,i,a,s,o){const u=await e.getFeatureSetInfo();if(null===(u?.layerId??null))return null;if(!a.layerIdLookup.get(u.layerId))return null;const c=e.serviceUrl().replace(/\/FeatureServer/i,"/UtilityNetworkServer"),f=[];switch(n){case"connected":f.push("connectivity"),f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity"),f.push("junction-edge-midspan-connectivity"),f.push("junction-junction-connectivity");break;case"container":case"content":f.push("containment");break;case"structure":case"attached":f.push("attachment");break;case"junctionedge":f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity");break;case"midspan":f.push("junction-edge-midspan-connectivity");break;default:throw new l.D$(s,"InvalidParameter",o)}let p=null,h=!1;if(null!==i&&""!==i&&void 0!==i){for(const e of a.terminals)e.terminalName===i&&(p=e.terminalId);null===p&&(h=!0)}const m=[];if(!h){const i=new se({globalId:t.field(e.globalIdField),networkSourceId:a.layerIdLookup.get(u.layerId).sourceId,...p?{terminalId:p}:""}),s=await async function(e,t){const n=(0,te.Dl)(e),r={...pe(t),f:"json"},i=(0,te.lF)({...n.query,...r}),a=(0,te.jV)(i,{method:"post"}),s=`${n.path}/associations/query`,{data:o}=await(0,H.A)(s,a),l=fe.fromJSON(o);return t.types.includes("connectivity")&&(0,z.Lx)(Q.A.getLogger("esri/rest/networks/support/QueryAssociationsParameters"),"types",{replacement:"Please use 'junction-junction-connectivity' instead of 'connectivity'.",see:"https://arcg.is/11Tr8a#types",version:"4.29",warnOnce:!0}),l}(c,new ye({types:f,elements:[i]}));let o=0;for(const e of s.associations){let t=null,s="",l="";if(e.fromNetworkElement?.globalId===i.globalId?(t=e.toNetworkElement,l="to"):e.toNetworkElement?.globalId===i.globalId&&(t=e.fromNetworkElement,l="from"),!t)continue;switch(n){case"attached":if("attachment"!==e.associationType)continue;if("to"!==l)continue;break;case"structure":if("attachment"!==e.associationType)continue;if("from"!==l)continue;break;case"container":if("containment"!==e.associationType)continue;if("from"!==l)continue;break;case"content":if("containment"!==e.associationType)continue;if("to"!==l)continue;break;case"connected":break;case"junctionedge":"junction-edge-to-connectivity"===e.associationType?s="to":"junction-edge-from-connectivity"===e.associationType&&(s="from");break;case"midspan":if("junction-edge-midspan-connectivity"!==e.associationType)continue}const u=a.sourceIdLookup.get(t.networkSourceId)?.className??"";m.push(new r.A({geometry:null,attributes:{objectId:o++,globalId:t.globalId,percentAlong:e.percentAlong??0,isContentVisible:e.isContentVisible?0:1,className:u,side:s}}))}}const y=new K.default({source:m,geometryType:null,objectIdField:"objectId",globalIdField:"globalId",fields:[new B.A({name:"objectId",alias:"objectId",type:"oid"}),new B.A({name:"globalId",alias:"globalId",type:"global-id"}),new B.A({name:"percentAlong",alias:"percentAlong",type:"double"}),new B.A({name:"side",alias:"side",type:"string"}),new B.A({name:"isContentVisible",alias:"isContentVisible",type:"integer"}),new B.A({name:"className",alias:"className",type:"string"})]});return(0,d.constructFeatureSet)(y)}(h,s,u,c,y,t,n);const w=y.associations;if(null==w)return null;let I=null,A=null,C=!1;if(null!==c&&""!==c&&void 0!==c){for(const e of y.terminals)e.terminalName===c&&(A=e.terminalId);null===A&&(C=!0)}const v=w.getFieldsIndex(),x=v.get("TOGLOBALID").name,D=v.get("FROMGLOBALID").name,E=v.get("TOTERMINALID").name,k=v.get("FROMTERMINALID").name,L=v.get("FROMNETWORKSOURCEID").name,U=v.get("TONETWORKSOURCEID").name,$=v.get("ASSOCIATIONTYPE").name,j=v.get("ISCONTENTVISIBLE").name,Z=v.get("OBJECTID").name;for(const e of h.fields)if("global-id"===e.type){I=s.field(e.name);break}let M=null,W=new T(new B.A({name:"percentalong",alias:"percentalong",type:"double"}),F.A.create("0",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC})),R=new T(new B.A({name:"side",alias:"side",type:"string"}),F.A.create("''",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));const P="globalid",q="globalId",O={};for(const e in y.lkp)O[e]=y.lkp[e].sourceId;const V=new S(new B.A({name:"classname",alias:"classname",type:"string"}),null,O);let G="";switch(u){case"midspan":{G=`((${x}='${I}') OR ( ${D}='${I}')) AND (${$} IN (5))`,V.codefield=F.A.create(`CASE WHEN (${x}='${I}') THEN ${L} ELSE ${U} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});const e=(0,g.ke)(_.findField(w.fields,D));e.name=P,e.alias=P,M=new T(e,F.A.create(`CASE WHEN (${D}='${I}') THEN ${x} ELSE ${D} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC})),W=y.unVersion>=4?new b(_.findField(w.fields,v.get("PERCENTALONG").name)):new T(new B.A({name:"percentalong",alias:"percentalong",type:"double"}),F.A.create("0",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));break}case"junctionedge":{G=`((${x}='${I}') OR ( ${D}='${I}')) AND (${$} IN (4,6))`,V.codefield=F.A.create(`CASE WHEN (${x}='${I}') THEN ${L} ELSE ${U} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});const e=(0,g.ke)(_.findField(w.fields,D));e.name=P,e.alias=P,M=new T(e,F.A.create(`CASE WHEN (${D}='${I}') THEN ${x} ELSE ${D} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC})),R=new T(new B.A({name:"side",alias:"side",type:"string"}),F.A.create(`CASE WHEN (${$}=4) THEN 'from' ELSE 'to' END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));break}case"connected":{let e=`${x}='@T'`,t=`${D}='@T'`;null!==A&&(e+=` AND ${E}=@A`,t+=` AND ${k}=@A`),G="(("+e+") OR ("+t+"))",G=(0,f.$)(G,"@T",I??""),e=(0,f.$)(e,"@T",I??""),null!==A&&(e=(0,f.$)(e,"@A",A.toString()),G=(0,f.$)(G,"@A",A.toString())),V.codefield=F.A.create("CASE WHEN "+e+` THEN ${L} ELSE ${U} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});const n=(0,g.ke)(_.findField(w.fields,D));n.name=P,n.alias=P,M=new T(n,F.A.create("CASE WHEN "+e+` THEN ${D} ELSE ${x} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));break}case"container":G=`${x}='${I}' AND ${$} = 2`,null!==A&&(G+=` AND ${E} = `+A.toString()),V.codefield=L,G="( "+G+" )",M=new N(_.findField(w.fields,D),P,P);break;case"content":G=`(${D}='${I}' AND ${$} = 2)`,null!==A&&(G+=` AND ${k} = `+A.toString()),V.codefield=U,G="( "+G+" )",M=new N(_.findField(w.fields,x),P,P);break;case"structure":G=`(${x}='${I}' AND ${$} = 3)`,null!==A&&(G+=` AND ${E} = `+A.toString()),V.codefield=L,G="( "+G+" )",M=new N(_.findField(w.fields,D),P,q);break;case"attached":G=`(${D}='${I}' AND ${$} = 3)`,null!==A&&(G+=` AND ${k} = `+A.toString()),V.codefield=U,G="( "+G+" )",M=new N(_.findField(w.fields,x),P,q);break;default:throw new l.D$(t,"InvalidParameter",n)}return C&&(G="1 <> 1"),new _({parentfeatureset:w,adaptedFields:[new b(_.findField(w.fields,Z)),new b(_.findField(w.fields,j)),M,R,V,W],extraFilter:G?F.A.create(G,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}):null})})},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.B)(a,3,3,t,n),!(0,f.m)(a[0]))throw new l.D$(t,"InvalidParameter",n);const o=await a[0].load(),u=[],d=[];let c=!1,p=[];if((0,ge.Kg)(a[1]))p.push(a[1]);else if(a[1]instanceof s.A)p.push(a[1]);else if((0,ge.cy)(a[1]))p=a[1];else{if(!(0,f.j)(a[1]))throw new l.D$(t,"InvalidParameter",n);p=a[1].toArray()}for(const e of p)if((0,ge.Kg)(e)){const t=F.A.create((0,f.s)(e),{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,w.DA)(t)?(0,f.s)(e):"%%%%FIELDNAME";u.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(c=!0)}else{if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const r=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",i=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===r&&(c=!0),!r)throw new l.D$(t,"InvalidParameter",n);u.push({name:r,expression:F.A.create(i||r,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(p=[],(0,ge.Kg)(a[2]))p.push(a[2]);else if((0,ge.cy)(a[2]))p=a[2];else if((0,f.j)(a[2]))p=a[2].toArray();else{if(!(a[2]instanceof s.A))throw new l.D$(t,"InvalidParameter",n);p.push(a[2])}for(const e of p){if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const r=e.hasField("name")?e.field("name"):"",i=e.hasField("statistic")?e.field("statistic"):"",a=e.hasField("expression")?e.field("expression"):"";if(!(r&&i&&(0,ge.Kg)(i)&&a))throw new l.D$(t,"InvalidParameter",n);d.push({name:r,statistic:i,expression:F.A.create(a,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(c){const e={};for(const t of o.fields)e[t.name.toLowerCase()]=1;for(const t of u)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);for(const t of d)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of u)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of u)we(n.expression,e,t);for(const n of d)we(n.expression,e,t);return new W({parentfeatureset:a[0],groupbyfields:u,statsfields:d})})},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.m)(a[0])){(0,f.B)(a,2,2,t,n);const r=await a[0].load(),i=[];let o=[];if((0,ge.Kg)(a[1]))o.push(a[1]);else if(a[1]instanceof s.A)o.push(a[1]);else if((0,ge.cy)(a[1]))o=a[1];else{if(!(0,f.j)(a[1]))throw new l.D$(t,"InvalidParameter",n);o=a[1].toArray()}let u=!1;for(const e of o)if((0,ge.Kg)(e)){const t=F.A.create((0,f.s)(e),{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,w.DA)(t)?(0,f.s)(e):"%%%%FIELDNAME";i.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(u=!0)}else{if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const a=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",s=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===a&&(u=!0),!a)throw new l.D$(t,"InvalidParameter",n);i.push({name:a,expression:F.A.create(s||a,{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC})})}}if(u){const e={};for(const t of r.fields)e[t.name.toLowerCase()]=1;for(const t of i)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of i)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of i)we(n.expression,e,t);return new W({parentfeatureset:a[0],groupbyfields:i,statsfields:[]})}return function(e){if(1===e.length){if((0,ge.cy)(e[0]))return(0,V.t)("distinct",e[0],-1);if((0,f.j)(e[0]))return(0,V.t)("distinct",e[0].toArray(),-1)}return(0,V.t)("distinct",e,-1)}(a)})},e.functions.getfeaturesetinfo=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,1,1,t,n),!(0,f.m)(i[0]))return null;const a=await i[0].getFeatureSetInfo();return a?s.A.convertObjectToArcadeDictionary({layerId:a.layerId,layerName:a.layerName,itemId:a.itemId,serviceLayerUrl:a.serviceLayerUrl,webMapLayerId:a.webMapLayerId??null,webMapLayerTitle:a.webMapLayerTitle??null,className:null,objectClassId:null},(0,f.K)(t),!1,!1):null})},e.signatures.push({name:"getfeaturesetinfo",min:1,max:1}),e.functions.filterbysubtypecode=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0])){const e=await i[0].load(),r=i[1];if(!(0,ge.Fq)(r))throw new l.D$(t,"InvalidParameter",n);if(e.subtypeField){const t=F.A.create(`${e.subtypeField}= ${i[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new C.A({parentfeatureset:i[0],whereclause:t})}if(null===e.typeIdField||""===e.typeIdField)throw new l.D$(t,"FeatureSetDoesNotHaveSubtypes",n);const a=F.A.create(`${e.typeIdField}= ${i[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new C.A({parentfeatureset:i[0],whereclause:a})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filterbysubtypecode",min:2,max:2})}}},80672:(e,t,n)=>{n.d(t,{R:()=>i});var r=n(20655);function i(e,t){return null===e?t:new r.A({url:e.field("url")})}},85978:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(87449),i=n(11221),a=n(33325);class s extends i.t1{constructor(e){super(),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._parent=e.parentfeatureset,this._databaseType=0}async _queryAll(){return i.An.features}async query(e){return i.An}async queryStat(e){return await this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal)}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new r.dr("NeverReach")}async queryAttachments(){return[]}}}}]);
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8993],{5682:(e,t,n)=>{n.d(t,{s1:()=>l});var r=n(11254),o=(n(4576),n(49186),n(44208),n(58083),n(9093)),i=(n(38954),n(51850)),s=(n(91218),n(16930),n(27993),n(19419));n(30524),n(61956);var u=n(59418);n(73941),n(48353);var a=n(91829);(0,a.fA)(0,0,0,.2);(0,a.fA)(0,0,0,.2),n(34727);var c=n(57005);async function l(e,t,n,o,i,s,a,c){const l=[];for(const r of t)if(r&&i.includes(r.name)){const t=`${e}/nodes/${n}/attributes/${r.key}/0`;l.push({url:t,storageInfo:r})}const d=await Promise.allSettled(l.map(e=>(0,r.A)(e.url,{responseType:"array-buffer",query:{...a,token:s},signal:c?.signal}).then(t=>(0,u.m0)(e.storageInfo,t.data)))),f=[];for(const e of o){const t={};for(let n=0;n<d.length;n++){const r=d[n];if("fulfilled"===r.status){const o=r.value;t[l[n].storageInfo.name]=(0,u.E5)(o,e)}}f.push(t)}return f}n(63201),(0,s.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,s.vt)(),(0,s.vt)(),new c.ab,(0,i.vt)(),new Array(72),(0,o.vt)()},15976:(e,t,n)=>{n.d(t,{o:()=>o});var r=n(74333);class o extends r.n{constructor(e,t){super(e,"sampler2D",2,(n,r,o)=>n.bindTexture(e,t(r,o)))}}},20304:(e,t,n)=>{n.d(t,{m:()=>o});var r=n(74333);class o extends r.n{constructor(e,t,n){super(e,"float",1,(r,o,i)=>r.setUniform1f(e,t(o,i),n))}}},25634:(e,t,n)=>{n.d(t,{m8:()=>u,NV:()=>c});var r=n(97768),o=n(74887);class i{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return 2}}var s=n(65786);class u extends i{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,r.Gz)(this._texture),this._textureNormal=(0,r.Gz)(this._textureNormal),this._textureEmissive=(0,r.Gz)(this._textureEmissive),this._textureOcclusion=(0,r.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,r.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new c(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,r.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const n=this._textures.acquire(e);if((0,o.$X)(n))return++this._numLoading,void n.then(e=>{if(this._disposed)return(0,r.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(n)}}class a extends s.Y{constructor(e=null){super(),this.textureEmissive=e}}class c extends a{constructor(e,t,n,r,o,i,s){super(n),this.texture=e,this.textureNormal=t,this.textureOcclusion=r,this.textureMetallicRoughness=o,this.scale=i,this.normalTextureTransformMatrix=s}}},27993:(e,t,n)=>{n.d(t,{F:()=>u});var r=n(91218),o=n(16930),i=n(9762),s=n(65806);function u(e,t,n,o){return!(null==t||null==o||e.length<2)&&((0,r.canProjectWithoutEngine)(t,o)?(0,i.projectBuffer)(e,t,0,n,o,0,1):(a.x=e[0],a.y=e[1],a.z=e[2],a.spatialReference=t,(0,s.g)(a,n,o)))}const a={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},28421:(e,t,n)=>{n.d(t,{J:()=>o});var r=n(74333);class o extends r.n{constructor(e,t,n){super(e,"float",2,(r,o,i)=>r.setUniform1f(e,t(o,i),n))}}},31821:(e,t,n)=>{n.d(t,{H:()=>r,If:()=>o});const r=(e,...t)=>{let n="";for(let r=0;r<t.length;r++)n+=e[r]+t[r];return n+=e[e.length-1],n};function o(e,t,n=""){return e?t:n}r.int=e=>Math.round(e).toString(),r.float=e=>e.toPrecision(8)},33079:(e,t,n)=>{n.d(t,{t:()=>o});var r=n(74333);class o extends r.n{constructor(e,t,n){super(e,"vec3",1,(r,o,i)=>r.setUniform3fv(e,t(o,i),n))}}},37203:(e,t,n)=>{n.d(t,{Ax:()=>g,Me:()=>c,mb:()=>v});var r=n(49186);const o=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function s(e,t,n){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,n+i.identifierOffset,i.identifierLength)),version:t.getUint16(n+i.versionOffset,o),checksum:t.getUint32(n+i.checksumOffset,o)}}const u={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function a(e,t){return{sizeLo:e.getUint32(t+u.sizeLo,o),sizeHi:e.getUint32(t+u.sizeHi,o),minX:e.getFloat64(t+u.minX,o),minY:e.getFloat64(t+u.minY,o),minZ:e.getFloat64(t+u.minZ,o),maxX:e.getFloat64(t+u.maxX,o),maxY:e.getFloat64(t+u.maxY,o),maxZ:e.getFloat64(t+u.maxZ,o),errorX:e.getFloat64(t+u.errorX,o),errorY:e.getFloat64(t+u.errorY,o),errorZ:e.getFloat64(t+u.errorZ,o),count:e.getUint32(t+u.count,o),reserved:e.getUint32(t+u.reserved,o)}}function c(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:c}=s(e,t,n);if(n+=i.byteCount,"LEPCC "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(c>1)throw new r.A("lepcc-decode-error","Unknown version");const d=a(t,n);if(n+=u.byteCount,d.sizeHi*2**32+d.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const f=new Float64Array(3*d.count),h=[],v=[],m=[],p=[];if(n=l(e,n,h),n=l(e,n,v),n=l(e,n,m),n=l(e,n,p),n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad length");let g=0,y=0;for(let e=0;e<h.length;e++){y+=h[e];let t=0;for(let n=0;n<v[e];n++){t+=m[g];const e=p[g];f[3*g]=Math.min(d.maxX,d.minX+2*d.errorX*t),f[3*g+1]=Math.min(d.maxY,d.minY+2*d.errorY*y),f[3*g+2]=Math.min(d.maxZ,d.minZ+2*d.errorZ*e),g++}}return{errorX:d.errorX,errorY:d.errorY,errorZ:d.errorZ,result:f}}function l(e,t,n){const r=[];t=d(e,t,r);const o=[];for(let i=0;i<r.length;i++){o.length=0,t=d(e,t,o);for(let e=0;e<o.length;e++)n.push(o[e]+r[i])}return t}function d(e,t,n){const i=new DataView(e,t),s=i.getUint8(0),u=31&s,a=!!(32&s),c=(192&s)>>6;let l=0;if(0===c)l=i.getUint32(1,o),t+=5;else if(1===c)l=i.getUint16(1,o),t+=3;else{if(2!==c)throw new r.A("lepcc-decode-error","Bad count type");l=i.getUint8(1),t+=2}if(a)throw new r.A("lepcc-decode-error","LUT not implemented");const d=Math.ceil(l*u/8),f=new Uint8Array(e,t,d);let h=0,v=0,m=0;const p=-1>>>32-u;for(let e=0;e<l;e++){for(;v<u;)h|=f[m]<<v,v+=8,m+=1;n[e]=h&p,h>>>=u,v-=u,v+u>32&&(h|=f[m-1]>>8-v)}return t+m}const f={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function h(e,t){return{sizeLo:e.getUint32(t+f.sizeLo,o),sizeHi:e.getUint32(t+f.sizeHi,o),count:e.getUint32(t+f.count,o),colorMapCount:e.getUint16(t+f.colorMapCount,o),lookupMethod:e.getUint8(t+f.lookupMethod),compressionMethod:e.getUint8(t+f.compressionMethod)}}function v(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:u}=s(e,t,n);if(n+=i.byteCount,"ClusterRGB"!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(u>1)throw new r.A("lepcc-decode-error","Unknown version");const a=h(t,n);if(n+=f.byteCount,a.sizeHi*2**32+a.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");if((2===a.lookupMethod||1===a.lookupMethod)&&0===a.compressionMethod){if(3*a.colorMapCount+a.count+n!==e.byteLength||a.colorMapCount>256)throw new r.A("lepcc-decode-error","Bad count");const t=new Uint8Array(e,n,3*a.colorMapCount),o=new Uint8Array(e,n+3*a.colorMapCount,a.count),i=new Uint8Array(3*a.count);for(let e=0;e<a.count;e++){const n=o[e];i[3*e]=t[3*n],i[3*e+1]=t[3*n+1],i[3*e+2]=t[3*n+2]}return i}if(0===a.lookupMethod&&0===a.compressionMethod){if(3*a.count+n!==e.byteLength||0!==a.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");return new Uint8Array(e,n).slice()}if(a.lookupMethod<=2&&1===a.compressionMethod){if(n+3!==e.byteLength||1!==a.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");const o=t.getUint8(n),i=t.getUint8(n+1),s=t.getUint8(n+2),u=new Uint8Array(3*a.count);for(let e=0;e<a.count;e++)u[3*e]=o,u[3*e+1]=i,u[3*e+2]=s;return u}throw new r.A("lepcc-decode-error","Bad method "+a.lookupMethod+","+a.compressionMethod)}const m={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function p(e,t){return{sizeLo:e.getUint32(t+m.sizeLo,o),sizeHi:e.getUint32(t+m.sizeHi,o),count:e.getUint32(t+m.count,o),scaleFactor:e.getUint16(t+m.scaleFactor,o),bitsPerPoint:e.getUint8(t+m.bitsPerPoint),reserved:e.getUint8(t+m.reserved)}}function g(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:u}=s(e,t,n);if(n+=i.byteCount,"Intensity "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(u>1)throw new r.A("lepcc-decode-error","Unknown version");const a=p(t,n);if(n+=m.byteCount,a.sizeHi*2**32+a.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const c=new Uint16Array(a.count);if(8===a.bitsPerPoint){if(a.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint8Array(e,n,a.count);for(let e=0;e<a.count;e++)c[e]=t[e]*a.scaleFactor}else if(16===a.bitsPerPoint){if(2*a.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint16Array(e,n,a.count);for(let e=0;e<a.count;e++)c[e]=t[e]*a.scaleFactor}else{const t=[];if(d(e,n,t)!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");for(let e=0;e<a.count;e++)c[e]=t[e]*a.scaleFactor}return c}},37352:(e,t,n)=>{n.d(t,{A:()=>a});var r,o=n(31635),i=n(7762),s=n(25482),u=n(91429);let a=r=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new i.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"floorField",void 0),(0,o.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllMode",void 0),(0,o.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllLevelIds",void 0),a=r=(0,o.Cg)([(0,u.$K)("esri.layers.support.LayerFloorInfo")],a)},40710:(e,t,n)=>{n.d(t,{W:()=>o});var r=n(74333);class o extends r.n{constructor(e,t,n){super(e,"vec3",2,(r,o,i,s)=>r.setUniform3fv(e,t(o,i,s),n))}}},45671:(e,t,n)=>{n.d(t,{D8:()=>i,TO:()=>o});var r=n(30524);async function o(e,t=e.popupTemplate){if(null==t)return[];const n=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:o}=t,{objectIdField:i,typeIdField:s,globalIdField:u,relationships:a}=e;if(n.includes("*"))return["*"];const c=o?(0,r.eX)(e):[],l=(0,r.DB)(e.fieldsIndex,[...n,...c]);return s&&l.push(s),l&&i&&e.fieldsIndex?.has(i)&&!l.includes(i)&&l.push(i),l&&u&&e.fieldsIndex?.has(u)&&!l.includes(u)&&l.push(u),a?.forEach(t=>{const{keyField:n}=t;l&&n&&e.fieldsIndex?.has(n)&&!l.includes(n)&&l.push(n)}),l}function i(e,t){return e&&"object"==typeof e?t?.checkPopupEnabled&&"popupEnabled"in e&&!e.popupEnabled?null:"popupTemplate"in e&&e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&"defaultPopupTemplate"in e&&e.defaultPopupTemplate?e.defaultPopupTemplate:null:null}},49255:(e,t,n)=>{function r(e){return 3===e||4===e||5===e||6===e||7===e}function o(e){return function(e){return s(e)||u(e)}(e)||2===e}function i(e){return 0===e}function s(e){return i(e)||function(e){return 8===e||9===e}(e)}function u(e){return 1===e}function a(e){return u(e)||r(e)}n.d(t,{Bf:()=>r,Dz:()=>a,Lc:()=>s,_o:()=>i,iq:()=>o})},53466:(e,t,n)=>{n.d(t,{U:()=>o});var r=n(31821);function o(e,t){switch(t.textureCoordinateType){case 1:return e.attributes.add("uv0","vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(r.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case 2:return e.attributes.add("uv0","vec2"),e.attributes.add("uvRegion","vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(r.H`void forwardTextureCoordinates() {
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8993],{5682:(e,t,n)=>{n.d(t,{s1:()=>l});var r=n(11254),o=(n(4576),n(49186),n(44208),n(58083),n(9093)),i=(n(38954),n(51850)),s=(n(91218),n(16930),n(27993),n(19419));n(30524),n(61956);var u=n(59418);n(73941),n(48353);var a=n(91829);(0,a.fA)(0,0,0,.2);(0,a.fA)(0,0,0,.2),n(34727);var c=n(57005);async function l(e,t,n,o,i,s,a,c){const l=[];for(const r of t)if(r&&i.includes(r.name)){const t=`${e}/nodes/${n}/attributes/${r.key}/0`;l.push({url:t,storageInfo:r})}const d=await Promise.allSettled(l.map(e=>(0,r.A)(e.url,{responseType:"array-buffer",query:{...a,token:s},signal:c?.signal}).then(t=>(0,u.m0)(e.storageInfo,t.data)))),f=[];for(const e of o){const t={};for(let n=0;n<d.length;n++){const r=d[n];if("fulfilled"===r.status){const o=r.value;t[l[n].storageInfo.name]=(0,u.E5)(o,e)}}f.push(t)}return f}n(63201),(0,s.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,s.vt)(),(0,s.vt)(),new c.ab,(0,i.vt)(),new Array(72),(0,o.vt)()},15976:(e,t,n)=>{n.d(t,{o:()=>o});var r=n(74333);class o extends r.n{constructor(e,t){super(e,"sampler2D",2,(n,r,o)=>n.bindTexture(e,t(r,o)))}}},20304:(e,t,n)=>{n.d(t,{m:()=>o});var r=n(74333);class o extends r.n{constructor(e,t,n){super(e,"float",1,(r,o,i)=>r.setUniform1f(e,t(o,i),n))}}},25634:(e,t,n)=>{n.d(t,{m8:()=>u,NV:()=>c});var r=n(97768),o=n(74887);class i{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return 2}}var s=n(65786);class u extends i{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,r.Gz)(this._texture),this._textureNormal=(0,r.Gz)(this._textureNormal),this._textureEmissive=(0,r.Gz)(this._textureEmissive),this._textureOcclusion=(0,r.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,r.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new c(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,r.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const n=this._textures.acquire(e);if((0,o.$X)(n))return++this._numLoading,void n.then(e=>{if(this._disposed)return(0,r.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(n)}}class a extends s.Y{constructor(e=null){super(),this.textureEmissive=e}}class c extends a{constructor(e,t,n,r,o,i,s){super(n),this.texture=e,this.textureNormal=t,this.textureOcclusion=r,this.textureMetallicRoughness=o,this.scale=i,this.normalTextureTransformMatrix=s}}},27993:(e,t,n)=>{n.d(t,{F:()=>u});var r=n(91218),o=n(16930),i=n(9762),s=n(65806);function u(e,t,n,o){return!(null==t||null==o||e.length<2)&&((0,r.canProjectWithoutEngine)(t,o)?(0,i.projectBuffer)(e,t,0,n,o,0,1):(a.x=e[0],a.y=e[1],a.z=e[2],a.spatialReference=t,(0,s.g)(a,n,o)))}const a={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},28421:(e,t,n)=>{n.d(t,{J:()=>o});var r=n(74333);class o extends r.n{constructor(e,t,n){super(e,"float",2,(r,o,i)=>r.setUniform1f(e,t(o,i),n))}}},31821:(e,t,n)=>{n.d(t,{H:()=>r,If:()=>o});const r=(e,...t)=>{let n="";for(let r=0;r<t.length;r++)n+=e[r]+t[r];return n+=e[e.length-1],n};function o(e,t,n=""){return e?t:n}r.int=e=>Math.round(e).toString(),r.float=e=>e.toPrecision(8)},33079:(e,t,n)=>{n.d(t,{t:()=>o});var r=n(74333);class o extends r.n{constructor(e,t,n){super(e,"vec3",1,(r,o,i)=>r.setUniform3fv(e,t(o,i),n))}}},37203:(e,t,n)=>{n.d(t,{Ax:()=>g,Me:()=>c,mb:()=>v});var r=n(49186);const o=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function s(e,t,n){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,n+i.identifierOffset,i.identifierLength)),version:t.getUint16(n+i.versionOffset,o),checksum:t.getUint32(n+i.checksumOffset,o)}}const u={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function a(e,t){return{sizeLo:e.getUint32(t+u.sizeLo,o),sizeHi:e.getUint32(t+u.sizeHi,o),minX:e.getFloat64(t+u.minX,o),minY:e.getFloat64(t+u.minY,o),minZ:e.getFloat64(t+u.minZ,o),maxX:e.getFloat64(t+u.maxX,o),maxY:e.getFloat64(t+u.maxY,o),maxZ:e.getFloat64(t+u.maxZ,o),errorX:e.getFloat64(t+u.errorX,o),errorY:e.getFloat64(t+u.errorY,o),errorZ:e.getFloat64(t+u.errorZ,o),count:e.getUint32(t+u.count,o),reserved:e.getUint32(t+u.reserved,o)}}function c(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:c}=s(e,t,n);if(n+=i.byteCount,"LEPCC "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(c>1)throw new r.A("lepcc-decode-error","Unknown version");const d=a(t,n);if(n+=u.byteCount,d.sizeHi*2**32+d.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const f=new Float64Array(3*d.count),h=[],v=[],m=[],p=[];if(n=l(e,n,h),n=l(e,n,v),n=l(e,n,m),n=l(e,n,p),n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad length");let g=0,y=0;for(let e=0;e<h.length;e++){y+=h[e];let t=0;for(let n=0;n<v[e];n++){t+=m[g];const e=p[g];f[3*g]=Math.min(d.maxX,d.minX+2*d.errorX*t),f[3*g+1]=Math.min(d.maxY,d.minY+2*d.errorY*y),f[3*g+2]=Math.min(d.maxZ,d.minZ+2*d.errorZ*e),g++}}return{errorX:d.errorX,errorY:d.errorY,errorZ:d.errorZ,result:f}}function l(e,t,n){const r=[];t=d(e,t,r);const o=[];for(let i=0;i<r.length;i++){o.length=0,t=d(e,t,o);for(let e=0;e<o.length;e++)n.push(o[e]+r[i])}return t}function d(e,t,n){const i=new DataView(e,t),s=i.getUint8(0),u=31&s,a=!!(32&s),c=(192&s)>>6;let l=0;if(0===c)l=i.getUint32(1,o),t+=5;else if(1===c)l=i.getUint16(1,o),t+=3;else{if(2!==c)throw new r.A("lepcc-decode-error","Bad count type");l=i.getUint8(1),t+=2}if(a)throw new r.A("lepcc-decode-error","LUT not implemented");const d=Math.ceil(l*u/8),f=new Uint8Array(e,t,d);let h=0,v=0,m=0;const p=-1>>>32-u;for(let e=0;e<l;e++){for(;v<u;)h|=f[m]<<v,v+=8,m+=1;n[e]=h&p,h>>>=u,v-=u,v+u>32&&(h|=f[m-1]>>8-v)}return t+m}const f={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function h(e,t){return{sizeLo:e.getUint32(t+f.sizeLo,o),sizeHi:e.getUint32(t+f.sizeHi,o),count:e.getUint32(t+f.count,o),colorMapCount:e.getUint16(t+f.colorMapCount,o),lookupMethod:e.getUint8(t+f.lookupMethod),compressionMethod:e.getUint8(t+f.compressionMethod)}}function v(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:u}=s(e,t,n);if(n+=i.byteCount,"ClusterRGB"!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(u>1)throw new r.A("lepcc-decode-error","Unknown version");const a=h(t,n);if(n+=f.byteCount,a.sizeHi*2**32+a.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");if((2===a.lookupMethod||1===a.lookupMethod)&&0===a.compressionMethod){if(3*a.colorMapCount+a.count+n!==e.byteLength||a.colorMapCount>256)throw new r.A("lepcc-decode-error","Bad count");const t=new Uint8Array(e,n,3*a.colorMapCount),o=new Uint8Array(e,n+3*a.colorMapCount,a.count),i=new Uint8Array(3*a.count);for(let e=0;e<a.count;e++){const n=o[e];i[3*e]=t[3*n],i[3*e+1]=t[3*n+1],i[3*e+2]=t[3*n+2]}return i}if(0===a.lookupMethod&&0===a.compressionMethod){if(3*a.count+n!==e.byteLength||0!==a.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");return new Uint8Array(e,n).slice()}if(a.lookupMethod<=2&&1===a.compressionMethod){if(n+3!==e.byteLength||1!==a.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");const o=t.getUint8(n),i=t.getUint8(n+1),s=t.getUint8(n+2),u=new Uint8Array(3*a.count);for(let e=0;e<a.count;e++)u[3*e]=o,u[3*e+1]=i,u[3*e+2]=s;return u}throw new r.A("lepcc-decode-error","Bad method "+a.lookupMethod+","+a.compressionMethod)}const m={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function p(e,t){return{sizeLo:e.getUint32(t+m.sizeLo,o),sizeHi:e.getUint32(t+m.sizeHi,o),count:e.getUint32(t+m.count,o),scaleFactor:e.getUint16(t+m.scaleFactor,o),bitsPerPoint:e.getUint8(t+m.bitsPerPoint),reserved:e.getUint8(t+m.reserved)}}function g(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:u}=s(e,t,n);if(n+=i.byteCount,"Intensity "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(u>1)throw new r.A("lepcc-decode-error","Unknown version");const a=p(t,n);if(n+=m.byteCount,a.sizeHi*2**32+a.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const c=new Uint16Array(a.count);if(8===a.bitsPerPoint){if(a.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint8Array(e,n,a.count);for(let e=0;e<a.count;e++)c[e]=t[e]*a.scaleFactor}else if(16===a.bitsPerPoint){if(2*a.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint16Array(e,n,a.count);for(let e=0;e<a.count;e++)c[e]=t[e]*a.scaleFactor}else{const t=[];if(d(e,n,t)!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");for(let e=0;e<a.count;e++)c[e]=t[e]*a.scaleFactor}return c}},37352:(e,t,n)=>{n.d(t,{A:()=>a});var r,o=n(31635),i=n(7762),s=n(25482),u=n(91429);let a=r=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new i.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"floorField",void 0),(0,o.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllMode",void 0),(0,o.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllLevelIds",void 0),a=r=(0,o.Cg)([(0,u.$K)("esri.layers.support.LayerFloorInfo")],a)},40710:(e,t,n)=>{n.d(t,{W:()=>o});var r=n(74333);class o extends r.n{constructor(e,t,n){super(e,"vec3",2,(r,o,i,s)=>r.setUniform3fv(e,t(o,i,s),n))}}},45671:(e,t,n)=>{n.d(t,{D8:()=>i,TO:()=>o});var r=n(30524);async function o(e,t=e.popupTemplate){if(null==t)return[];const n=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:o}=t,{objectIdField:i,typeIdField:s,globalIdField:u,relationships:a}=e;if(n.includes("*"))return["*"];const c=o?(0,r.eX)(e):[],l=(0,r.DB)(e.fieldsIndex,[...n,...c]);return s&&l.push(s),l&&i&&e.fieldsIndex?.has(i)&&!l.includes(i)&&l.push(i),l&&u&&e.fieldsIndex?.has(u)&&!l.includes(u)&&l.push(u),a?.forEach(t=>{const{keyField:n}=t;l&&n&&e.fieldsIndex?.has(n)&&!l.includes(n)&&l.push(n)}),l}function i(e,t){return e&&"object"==typeof e?t?.checkPopupEnabled&&"popupEnabled"in e&&!e.popupEnabled?null:"popupTemplate"in e&&e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&"defaultPopupTemplate"in e&&e.defaultPopupTemplate?e.defaultPopupTemplate:null:null}},49255:(e,t,n)=>{function r(e){return 3===(t=e)||4===t||5===t||6===e||7===e;var t}function o(e){return function(e){return s(e)||u(e)}(e)||2===e}function i(e){return 0===e}function s(e){return i(e)||function(e){return 8===e||9===e}(e)}function u(e){return 1===e}function a(e){return u(e)||r(e)}n.d(t,{Lc:()=>s,_o:()=>i,g1:()=>a,iq:()=>o,yT:()=>r})},53466:(e,t,n)=>{n.d(t,{U:()=>o});var r=n(31821);function o(e,t){switch(t.textureCoordinateType){case 1:return e.attributes.add("uv0","vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(r.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case 2:return e.attributes.add("uv0","vec2"),e.attributes.add("uvRegion","vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(r.H`void forwardTextureCoordinates() {
2
2
  vuv0 = uv0;
3
3
  vuvRegion = uvRegion;
4
4
  }`);default:t.textureCoordinateType;case 0:return void e.vertex.code.add(r.H`void forwardTextureCoordinates() {}`);case 3:return}}},59418:(e,t,n)=>{n.d(t,{wH:()=>m,MA:()=>f,E5:()=>h,m0:()=>g});var r=n(49186),o=n(4718),i=n(53966),s=n(34275),u=n(37203);const a=()=>i.A.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function c(e,t,n){let o="",i=0;for(;i<n;){const s=e[t+i];if(s<128)o+=String.fromCharCode(s),i++;else if(s>=192&&s<224){if(i+1>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const u=(31&s)<<6|63&e[t+i+1];o+=String.fromCharCode(u),i+=2}else if(s>=224&&s<240){if(i+2>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const u=(15&s)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];o+=String.fromCharCode(u),i+=3}else{if(!(s>=240&&s<248))throw new r.A("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const u=(7&s)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(u>=65536){const e=55296+(u-65536>>10),t=56320+(1023&u);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(u);i+=4}}}return o}function l(e,t){const n={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let o=0;o<t.length;o++){const i=t[o],s=i.valueType||i.type,u=w[s];n.fields[i.property]=u(e,r),r+=y[s].BYTES_PER_ELEMENT}return n.byteCount=r,n}function d(e,t,n){const o=[];let i,s,u=0;for(s=0;s<e;s+=1){if(i=t[s],i>0){if(o.push(c(n,u,i-1)),0!==n[u+i-1])throw new r.A("string-array-error","Invalid string array: missing null termination.")}else o.push(null);u+=i}return o}function f(e,t){return new(0,y[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function h(e,t){if(!e)return null;const n=e[t];return(0,s.IY)(e)?n===s.PI?null:n:(0,s._G)(e)?n===s.h2?null:n:n!=n?null:n}function v(e,t,n){if(t!==e&&a().error(`Invalid ${n} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new r.A("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function m(e,t){const n=l(e,t&&t.header);let r=n.byteCount;const o={isDraco:!1,header:n,byteOffset:n.byteCount,byteCount:0,vertexAttributes:{}},i=n.fields,s=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const n={...t.vertexAttributes[e],byteOffset:r,count:s},i=p[e]||"_"+e;o.vertexAttributes[i]=n,r+=b(n.valueType)*n.valuesPerElement*s}const u=i.faceCount;if(t.faces&&u){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const n={...t.faces[e],byteOffset:r,count:u};o.faces[e]=n,r+=b(n.valueType)*n.valuesPerElement*u}}const a=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&a){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const n={...t.featureAttributes[e],byteOffset:r,count:a};o.featureAttributes[e]=n,r+=("UInt64"===n.valueType?8:b(n.valueType))*n.valuesPerElement*a}}return v(r,e.byteLength,"geometry"),o.byteCount=r-o.byteOffset,o}const p={position:"position",normal:"normal",color:"color",uv0:"uv0",region:"uvRegion"};function g(e,t,n,i=!1){if("lepcc-rgb"===e.encoding)return i?(0,u.mb)(t):function(e){return Array.isArray(e)?e.length<s.y9?e:new Uint8Array(e):e.length<s.y9?Array.from(e):e}((0,u.mb)(t));if("lepcc-intensity"===e.encoding)return i?(0,u.Ax)(t):function(e){return Array.isArray(e)?e.length<s.y9?e:new Uint16Array(e):e.length<s.y9?Array.from(e):e}((0,u.Ax)(t));if(null!=e.encoding&&""!==e.encoding)throw new r.A("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(a().warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(a().warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const c=function(e,t,n){const i=null!=t.header?l(e,t.header):{byteOffset:0,byteCount:0,fields:{count:n}},s={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let u=i.byteCount;for(let e=0;e<t.ordering.length;e++){const n=t.ordering[e],a=(0,o.o8)(t[n]);if(a.count=i.fields.count??0,"String"===a.valueType){if(a.byteOffset=u,a.byteCount=i.fields[n+"ByteCount"],"UTF-8"!==a.encoding)throw new r.A("unsupported-encoding","Unsupported String encoding.",{encoding:a.encoding});if(a.timeEncoding&&"ECMA_ISO8601"!==a.timeEncoding)throw new r.A("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:a.timeEncoding})}else{if(!x(a.valueType))throw new r.A("unsupported-value-type","Unsupported binary valueType",{valueType:a.valueType});{const e=b(a.valueType);u+=u%e!==0?e-u%e:0,a.byteOffset=u,a.byteCount=e*a.valuesPerElement*a.count}}u+=a.byteCount??0,s.entries[n]=a}return s.byteCount=u-s.byteOffset,s}(t,e,n);v(c.byteOffset+c.byteCount,t.byteLength,"attribute");const m=c.entries.attributeValues||c.entries.objectIds;if(m){if("String"===m.valueType){const e=c.entries.attributeByteCounts,n=f(t,e),r=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,m);return m.timeEncoding?function(e,t,n){return d(e,t,n).map(e=>{const t=e?Date.parse(e):null;return null==t||Number.isNaN(t)?null:t})}(e.count,n,r):d(e.count,n,r)}return i?f(t,m):function(e,t){const n=f(e,t);if(n.length>=s.y9)return n;const r=new Array;return n.forEach((e,t)=>r.push(h(n,t))),r}(t,m)}throw new r.A("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const y={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},w={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function x(e){return y.hasOwnProperty(e)}function b(e){return x(e)?y[e].BYTES_PER_ELEMENT:0}},63201:(e,t,n)=>{n.d(t,{NL:()=>m});var r=n(49255),o=n(99208),i=n(40876),s=n(31821);function u(e){e.code.add(s.H`
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2314],{39933:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(32680),l(76591),l(76597),l(24321),l(72722),l(43519),l(96336),l(71955),l(53466),l(92700),l(35640),l(40261),l(14527),l(89390),l(98619),l(22393),l(59469),l(32482),l(96598),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(10906),l(43616),l(51255),l(14113);var s=l(57323)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2314],{39933:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(32680),l(68317),l(76597),l(24321),l(72722),l(43519),l(96336),l(71955),l(53466),l(92700),l(35640),l(40261),l(14527),l(89390),l(98619),l(22393),l(59469),l(32482),l(96598),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(10906),l(43616),l(51255),l(14113);var s=l(57323)}}]);