@arcgis/core 4.34.0-next.20 → 4.34.0-next.22

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 (252) hide show
  1. package/analysis/VolumeMeasurement/CutFillOptions.js +5 -0
  2. package/analysis/VolumeMeasurement/volumeMeasurementUtils.js +5 -0
  3. package/analysis/VolumeMeasurementAnalysis.d.ts +4 -0
  4. package/analysis/VolumeMeasurementAnalysis.js +5 -0
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/{bcaf6edf887e4afbbdd2.js → 02dc6e31b1244e5bb785.js} +1 -1
  7. package/assets/esri/core/workers/chunks/04c17957c15234ca0321.js +1 -0
  8. package/assets/esri/core/workers/chunks/084236ca316aad980192.js +1 -0
  9. package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +1 -0
  10. package/assets/esri/core/workers/chunks/{822b32aaeec05a347c84.js → 0ba6177ba118a0f032e2.js} +1 -1
  11. package/assets/esri/core/workers/chunks/12723e79b996969e304e.js +1 -0
  12. package/assets/esri/core/workers/chunks/{bd7b985f7962b1cc7b8a.js → 146520d263b910b5bdc7.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{445ddf57d2f503a0b98b.js → 15064c3b21b325d5c2f6.js} +1 -1
  14. package/assets/esri/core/workers/chunks/19ae76283a0cb0fe4dee.js +346 -0
  15. package/assets/esri/core/workers/chunks/{28b525963420f022fb0a.js → 1cc30073f8200b67cff6.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{82a5000296134834d1ac.js → 1d75cb1747ffb7b8b050.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{55ce214a10fb6fc2e901.js → 24fe862b607ec927e07f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/30fae1f066dc3cd781f1.js +1 -0
  19. package/assets/esri/core/workers/chunks/32756905bcf11699b3f7.js +1 -0
  20. package/assets/esri/core/workers/chunks/{7ec73f63929b1623de72.js → 3793f282ddaccd3465f2.js} +1 -1
  21. package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +1 -0
  22. package/assets/esri/core/workers/chunks/41f487713c6278d389a1.js +1 -0
  23. package/assets/esri/core/workers/chunks/{5e7f35bf1aab93cb1c52.js → 4cea5170939c8d363ef7.js} +1 -1
  24. package/assets/esri/core/workers/chunks/5253cca467fe9bc0a210.js +1 -0
  25. package/assets/esri/core/workers/chunks/{735d96d2b951cc1df3a3.js → 576e408fb0834f3948e8.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{2a784da5fa3f502d1803.js → 58e74681ddef30ba9cb6.js} +1 -1
  27. package/assets/esri/core/workers/chunks/5b276962c46c57155166.js +1 -0
  28. package/assets/esri/core/workers/chunks/5ce62d9fff80d014d186.js +1 -0
  29. package/assets/esri/core/workers/chunks/5e805c9e9012dd39ec86.js +1 -0
  30. package/assets/esri/core/workers/chunks/{27c9d3f6cebca087a123.js → 6136bf09950adc46bc33.js} +1 -1
  31. package/assets/esri/core/workers/chunks/66757fc16316a5c50e1e.js +1 -0
  32. package/assets/esri/core/workers/chunks/6a0fbc54638f7de138c1.js +1 -0
  33. package/assets/esri/core/workers/chunks/{dfd9ac2e28c96900c53e.js → 6c33ecffbc783cb8f944.js} +1 -1
  34. package/assets/esri/core/workers/chunks/6ca764b4baadef5c1515.js +1 -0
  35. package/assets/esri/core/workers/chunks/{fcdf714339060731fe1c.js → 7051bcc178eb512819f6.js} +1 -1
  36. package/assets/esri/core/workers/chunks/7cfba5cec425221962e8.js +1 -0
  37. package/assets/esri/core/workers/chunks/{3a753ce4de2e6ad40f7b.js → 86d6007c45f2aa643ac8.js} +1 -1
  38. package/assets/esri/core/workers/chunks/8b19fe829a9dc26fb3fe.js +1 -0
  39. package/assets/esri/core/workers/chunks/8eea6251aa09725e654e.js +1 -0
  40. package/assets/esri/core/workers/chunks/916691122d7fb38497d6.js +1 -0
  41. package/assets/esri/core/workers/chunks/919d2fd7ebc0c840a759.js +1 -0
  42. package/assets/esri/core/workers/chunks/92ad9098006568358550.js +1 -0
  43. package/assets/esri/core/workers/chunks/{2ed698579befe73caafd.js → 94d75f3b215e3bd1b4d7.js} +1 -1
  44. package/assets/esri/core/workers/chunks/97324f030738fc0d456b.js +1 -0
  45. package/assets/esri/core/workers/chunks/9c510df592befb9ff892.js +1 -0
  46. package/assets/esri/core/workers/chunks/{15d1ab71aaf6bcf3145b.js → a7a5b89c2bb69f3af59c.js} +1 -1
  47. package/assets/esri/core/workers/chunks/aba520714efc01bead36.js +1 -0
  48. package/assets/esri/core/workers/chunks/accff253af360c34e8a8.js +1 -0
  49. package/assets/esri/core/workers/chunks/ad3871f497ecea1a08c9.js +1 -0
  50. package/assets/esri/core/workers/chunks/ae6eed26fc932bc08356.js +1 -0
  51. package/assets/esri/core/workers/chunks/b4512d62b6cb26fc6b25.js +1 -0
  52. package/assets/esri/core/workers/chunks/{63e984a65ee670449a4a.js → b4bb461955a4c2bce072.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{abc75c945f3cfb1629b0.js → ba5b24beebeb703b5919.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{51afd0e71df1825d7593.js → c64fa94cba71ba2794e2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/c94cc026c4ed330408fb.js +1 -0
  56. package/assets/esri/core/workers/chunks/cab1a1067f44ce374673.js +1 -0
  57. package/assets/esri/core/workers/chunks/{3f4a8c874c022dace9be.js → d1b363c418a67b087306.js} +1 -1
  58. package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +1 -0
  59. package/assets/esri/core/workers/chunks/{f806e9221dff7fcfc2f9.js → e2cb295104ed2f8cd2ff.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{9432a5466eec397710a4.js → e49a135a2933306a6105.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{d31fa648497b0af97dc1.js → e9a9174c4d1a0a9effb6.js} +1 -1
  62. package/assets/esri/core/workers/chunks/f3d5d92e0aefc2593208.js +1 -0
  63. package/assets/esri/core/workers/chunks/f3e3c2340452c1d60c95.js +1 -0
  64. package/assets/esri/core/workers/chunks/{85b0e2a898251d048dda.js → f42155b7a4e6c5e80757.js} +1 -1
  65. package/assets/esri/core/workers/chunks/f43110391f124b8a179c.js +1009 -0
  66. package/assets/esri/core/workers/chunks/{080a8a1c6fe2d215142d.js → fb5e2b1ced03eef28e96.js} +1 -1
  67. package/assets/esri/core/workers/chunks/fe73e74e3e4278aedcc3.js +1 -0
  68. package/config.js +1 -1
  69. package/core/Clonable.js +1 -1
  70. package/core/lang.js +1 -1
  71. package/core/libs/rbush/PooledRBush.js +1 -1
  72. package/core/scheduling.js +1 -1
  73. package/geometry/Mesh.js +1 -1
  74. package/geometry/support/MeshComponent.js +1 -1
  75. package/geometry/support/MeshMaterial.js +1 -1
  76. package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
  77. package/geometry/support/MeshTexture.js +1 -1
  78. package/geometry/support/MeshTransform.js +1 -1
  79. package/geometry/support/MeshVertexAttributes.js +1 -1
  80. package/geometry/support/buffer/BufferView.js +1 -1
  81. package/geometry/support/float16.js +1 -1
  82. package/geometry/support/meshUtils/convertMeshVertexSpace.js +1 -1
  83. package/geometry/support/meshUtils/merge.js +1 -1
  84. package/geometry/support/meshUtils/meshCloneUtils.js +5 -0
  85. package/interfaces.d.ts +1134 -156
  86. package/kernel.js +1 -1
  87. package/layers/SubtypeGroupLayer.js +1 -1
  88. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  89. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  90. package/layers/mixins/ArcGISMapService.js +1 -1
  91. package/layers/save/mapImageLayerUtils.js +1 -1
  92. package/layers/support/TilemapCache.js +1 -1
  93. package/layers/support/TitleCreator.js +1 -1
  94. package/layers/support/arcgisLayerUrl.js +1 -1
  95. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  96. package/package.json +1 -1
  97. package/rest/knowledgeGraph/GraphAddFieldIndexResult.d.ts +4 -0
  98. package/rest/knowledgeGraph/GraphAddPropertyResult.d.ts +4 -0
  99. package/rest/knowledgeGraph/GraphDataModelOperationResult.d.ts +4 -0
  100. package/rest/knowledgeGraph/GraphDeleteFieldIndexResult.d.ts +4 -0
  101. package/rest/knowledgeGraph/GraphDeletePropertyResult.d.ts +4 -0
  102. package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.d.ts +4 -0
  103. package/rest/knowledgeGraph/GraphUpdatePropertyResult.d.ts +4 -0
  104. package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.d.ts +4 -0
  105. package/rest/knowledgeGraphService.d.ts +7 -0
  106. package/support/requestUtils.js +1 -1
  107. package/support/revision.js +1 -1
  108. package/views/2d/engine/ManagedCanvas.js +1 -1
  109. package/views/2d/engine/ParentChildStage.js +5 -0
  110. package/views/2d/engine/Stage.js +1 -1
  111. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  112. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  113. package/views/2d/engine/webgl/Painter.js +1 -1
  114. package/views/2d/engine/webgl/VideoScreenRenderer.js +5 -0
  115. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +1 -1
  116. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js +5 -0
  117. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +5 -0
  118. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  119. package/views/2d/layers/MediaLayerView2D.js +1 -1
  120. package/views/2d/layers/TileLayerView2D.js +1 -1
  121. package/views/2d/layers/features/Processor.js +1 -1
  122. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  123. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  124. package/views/2d/mapViewDeps.js +1 -1
  125. package/views/3d/analysis/AnalysisViewManager3D.js +1 -1
  126. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +4 -0
  127. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +5 -0
  128. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  129. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  130. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  131. package/views/3d/layers/graphics/DeconflictAABR.js +1 -1
  132. package/views/3d/layers/graphics/ExtentSet.js +1 -1
  133. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  134. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  135. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  136. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  137. package/views/3d/layers/graphics/Labeler.js +1 -1
  138. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  139. package/views/3d/layers/i3s/I3SAsyncElevationUpdater.js +1 -1
  140. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  141. package/views/3d/layers/i3s/I3SLodHandling.js +1 -1
  142. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  143. package/views/3d/layers/support/FeatureTileDescriptor.js +1 -1
  144. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  145. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  146. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  147. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  148. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  149. package/views/3d/state/GoToOperation.js +1 -1
  150. package/views/3d/state/ViewStateManager.js +1 -1
  151. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  152. package/views/3d/support/StreamDataLoader.js +1 -1
  153. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  154. package/views/3d/support/cameraUtils.js +1 -1
  155. package/views/3d/support/viewingModeUtils.js +5 -0
  156. package/views/3d/support/viewpointUtils.js +1 -1
  157. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  158. package/views/3d/terrain/OverlayManager.js +1 -1
  159. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  160. package/views/3d/terrain/OverlayRenderer.js +1 -1
  161. package/views/3d/terrain/TerrainSurface.js +1 -1
  162. package/views/3d/webgl/ManagedFBOResource.js +1 -1
  163. package/views/3d/webgl-engine/Stage.js +1 -1
  164. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  165. package/views/3d/webgl-engine/core/FBOPool.js +1 -1
  166. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  167. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  168. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  169. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  170. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  171. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  172. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  173. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  174. package/views/3d/webgl.d.ts +2 -0
  175. package/views/3d/webgl.js +1 -1
  176. package/views/SceneView.js +1 -1
  177. package/views/VideoView.js +1 -1
  178. package/views/View2D.js +1 -1
  179. package/views/Viewport2DBaseMixin.js +5 -0
  180. package/views/Viewport2DMixin.js +1 -1
  181. package/views/layers/FeatureLayerView.js +1 -1
  182. package/views/support/Scheduler.js +1 -1
  183. package/views/support/layerViewUtils.js +1 -1
  184. package/views/video/VideoOperationalDataView.js +5 -0
  185. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  186. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +4 -0
  187. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  188. package/widgets/BatchAttributeForm/inputs/EditableInput.d.ts +4 -0
  189. package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
  190. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +4 -0
  191. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  192. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +4 -0
  193. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  194. package/widgets/BatchAttributeForm/inputs/InputBase.d.ts +4 -0
  195. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  196. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  197. package/widgets/Directions.js +1 -1
  198. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  199. package/widgets/Editor/Edits.js +1 -1
  200. package/widgets/FeatureForm/EditableInput.d.ts +2 -2
  201. package/widgets/FeatureForm/FieldInput.d.ts +2 -2
  202. package/widgets/FeatureForm/GroupInput.d.ts +2 -2
  203. package/widgets/FeatureForm/InputBase.d.ts +2 -2
  204. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  205. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  206. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  207. package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
  208. package/widgets/OrientedImageryViewer.js +1 -1
  209. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  210. package/widgets/VideoPlayer.js +1 -1
  211. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  212. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  213. package/widgets/support/SelectionList/LayerItem.js +1 -1
  214. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  215. package/widgets/support/SelectionList.js +1 -1
  216. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  217. package/assets/esri/core/workers/chunks/034950f7d0596e77a7dd.js +0 -1
  218. package/assets/esri/core/workers/chunks/0808b7b2a18331ac0cf6.js +0 -1
  219. package/assets/esri/core/workers/chunks/093938edee5f0532d7da.js +0 -1
  220. package/assets/esri/core/workers/chunks/0f5643d5437f48c63225.js +0 -1
  221. package/assets/esri/core/workers/chunks/116bbff428cc2dc1832e.js +0 -1
  222. package/assets/esri/core/workers/chunks/1646699188ed0cd4ce24.js +0 -1
  223. package/assets/esri/core/workers/chunks/1c7393bcd6e85ba25e1b.js +0 -1
  224. package/assets/esri/core/workers/chunks/2999ae2a7d4d1ad6447b.js +0 -1
  225. package/assets/esri/core/workers/chunks/2e3f620c79ec04033a6e.js +0 -1
  226. package/assets/esri/core/workers/chunks/2e54be3094e41fd3026d.js +0 -346
  227. package/assets/esri/core/workers/chunks/3541714d448958c9bc38.js +0 -1
  228. package/assets/esri/core/workers/chunks/48953ddf0bbcf3d77e04.js +0 -1
  229. package/assets/esri/core/workers/chunks/5b7464137aacf1c5fd78.js +0 -1
  230. package/assets/esri/core/workers/chunks/629a257509b148ff38c0.js +0 -1
  231. package/assets/esri/core/workers/chunks/6b5fc9da8ae34c889b83.js +0 -1
  232. package/assets/esri/core/workers/chunks/707b34e15937c4f7902f.js +0 -1
  233. package/assets/esri/core/workers/chunks/770e609a6bd3533ceda9.js +0 -1
  234. package/assets/esri/core/workers/chunks/7925e8ffa8027b59410e.js +0 -1
  235. package/assets/esri/core/workers/chunks/8235a997acb45ab43173.js +0 -1
  236. package/assets/esri/core/workers/chunks/851baab753d9c8e967bd.js +0 -1
  237. package/assets/esri/core/workers/chunks/aa6c37f116c07ddca5fb.js +0 -1
  238. package/assets/esri/core/workers/chunks/bac5e1d50b69f0d94694.js +0 -1
  239. package/assets/esri/core/workers/chunks/bc0c3b5a5ab3fcb8f77a.js +0 -1
  240. package/assets/esri/core/workers/chunks/bcefb413d03d59506b5a.js +0 -1009
  241. package/assets/esri/core/workers/chunks/c96fed4889712f5a9135.js +0 -1
  242. package/assets/esri/core/workers/chunks/cac281604a41af9b1759.js +0 -1
  243. package/assets/esri/core/workers/chunks/cb4c49d5b70f9563bc46.js +0 -1
  244. package/assets/esri/core/workers/chunks/d25c8c30ce4058937d4f.js +0 -1
  245. package/assets/esri/core/workers/chunks/d638ae7814acf6c0fb8e.js +0 -1
  246. package/assets/esri/core/workers/chunks/d6ce99a713afdb03e332.js +0 -1
  247. package/assets/esri/core/workers/chunks/dc3816eef53d17074eab.js +0 -1
  248. package/assets/esri/core/workers/chunks/dd70b060ea4f632c2430.js +0 -1
  249. package/assets/esri/core/workers/chunks/e2e5e8bd3406609d8996.js +0 -1
  250. package/assets/esri/core/workers/chunks/e9aa1d9ded8a52a40c57.js +0 -1
  251. package/assets/esri/core/workers/chunks/f65ad6a41c0c69bf1b21.js +0 -1
  252. package/assets/esri/core/workers/chunks/f6c815f7d3ca072172ce.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5323],{5760:(t,e,o)=>{o.d(e,{NM:()=>l,Tb:()=>h,_R:()=>n,h9:()=>s,rM:()=>a,x0:()=>p,y7:()=>y});var i=o(34727),r=o(56507);const s=["none","underline","line-through"],n=["normal","italic","oblique"],l=["normal","lighter","bold","bolder"],h={type:Number,cast:t=>{const e=(0,r.GB)(t);return 0===e?1:(0,i.qE)(e,.1,4)},nonNullable:!0},a={type:["left","right","center"],nonNullable:!0},p={type:["baseline","top","middle","bottom"],nonNullable:!0},y=8},11831:(t,e,o)=>{o.d(e,{A:()=>y});var i,r=o(90237),s=o(25482),n=o(90629),l=o(10107),h=o(79901),a=(o(44208),o(87811),o(40608)),p=o(5760);let y=i=class extends s.A{constructor(t){super(t),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(t){return(0,n.cr)(t)}clone(){return new i({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};(0,r._)([(0,l.MZ)({type:p.h9,json:{default:"none",write:!0}})],y.prototype,"decoration",void 0),(0,r._)([(0,l.MZ)({type:String,json:{write:!0}})],y.prototype,"family",void 0),(0,r._)([(0,l.MZ)({type:Number,json:{write:{overridePolicy:(t,e,o)=>({enabled:!o||!o.textSymbol3D})}}})],y.prototype,"size",void 0),(0,r._)([(0,h.w)("size")],y.prototype,"castSize",null),(0,r._)([(0,l.MZ)({type:p._R,json:{default:"normal",write:!0}})],y.prototype,"style",void 0),(0,r._)([(0,l.MZ)({type:p.NM,json:{default:"normal",write:!0}})],y.prototype,"weight",void 0),y=i=(0,r._)([(0,a.$)("esri.symbols.Font")],y)},20378:(t,e,o)=>{o.d(e,{A:()=>c});var i=o(90237),r=o(68197),s=o(66552),n=o(25482),l=o(10107),h=(o(44208),o(53966),o(87811),o(36005)),a=o(40608);const p=new s.J({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let y=0,c=class extends n.A{constructor(t){super(t),this.id="sym"+y++,this.type=null,this.color=new r.A([0,0,0,1])}readColor(t){return null!=t?.[0]?[t[0],t[1],t[2],t[3]/255]:t}async collectRequiredFields(t,e){}hash(){return JSON.stringify(this.toJSON())}clone(){}};(0,i._)([(0,l.MZ)({type:p.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:p.write,isRequired:!0}}})],c.prototype,"type",void 0),(0,i._)([(0,l.MZ)({type:r.A,json:{write:{allowNull:!0}}})],c.prototype,"color",void 0),(0,i._)([(0,h.w)("color")],c.prototype,"readColor",null),c=(0,i._)([(0,a.$)("esri.symbols.Symbol")],c)},31593:(t,e,o)=>{o.d(e,{A:()=>M});var i=o(90237),r=o(66552),s=o(4718),n=o(90629),l=o(10107),h=(o(44208),o(53966),o(93223)),a=o(40608),p=(o(87811),o(20378));let y=class extends p.A{constructor(t){super(t),this.type="simple-line",this.width=.75}hash(){return`${this.type}.${this.width}`}};(0,i._)([(0,h.e)({esriSLS:"simple-line"},{readOnly:!0})],y.prototype,"type",void 0),(0,i._)([(0,l.MZ)({type:Number,cast:n.cr,json:{write:!0}})],y.prototype,"width",void 0),y=(0,i._)([(0,a.$)("esri.symbols.LineSymbol")],y);var c,u=o(68197),d=o(25482),m=o(36005),S=o(43937),g=o(83213);let b=c=class extends d.A{constructor(t){super(t),this.placement="begin-end",this.type="line-marker",this.style="arrow"}writeStyle(t,e,o,i){e[o]="web-map"===i?.origin?"arrow":t}set color(t){this._set("color",t)}readColor(t){return null!=t?.[0]?[t[0],t[1],t[2],t[3]/255]:t}writeColor(t,e,o,i){"web-map"===i?.origin||(e[o]=t)}clone(){return new c({color:(0,s.o8)(this.color),placement:this.placement,style:this.style})}hash(){return`${this.placement}.${this.color?.hash()}.${this.style}`}};(0,i._)([(0,l.MZ)({type:["begin","end","begin-end"],json:{write:!0}})],b.prototype,"placement",void 0),(0,i._)([(0,h.e)({"line-marker":"line-marker"},{readOnly:!0}),(0,l.MZ)({json:{origins:{"web-map":{write:!1}}}})],b.prototype,"type",void 0),(0,i._)([(0,l.MZ)({type:g.z})],b.prototype,"style",void 0),(0,i._)([(0,S.K)("style")],b.prototype,"writeStyle",null),(0,i._)([(0,l.MZ)({type:u.A,value:null,json:{write:{allowNull:!0}}})],b.prototype,"color",null),(0,i._)([(0,m.w)("color")],b.prototype,"readColor",null),(0,i._)([(0,S.K)("color")],b.prototype,"writeColor",null),b=c=(0,i._)([(0,a.$)("esri.symbols.LineSymbolMarker")],b);const f=b;var w;const _=new r.J({esriSLSSolid:"solid",esriSLSDash:"dash",esriSLSDot:"dot",esriSLSDashDot:"dash-dot",esriSLSDashDotDot:"long-dash-dot-dot",esriSLSNull:"none",esriSLSShortDash:"short-dash",esriSLSShortDot:"short-dot",esriSLSShortDashDot:"short-dash-dot",esriSLSShortDashDotDot:"short-dash-dot-dot",esriSLSLongDash:"long-dash",esriSLSLongDashDot:"long-dash-dot"});let M=w=class extends y{constructor(...t){super(...t),this.type="simple-line",this.style="solid",this.cap="round",this.join="round",this.marker=null,this.miterLimit=2}normalizeCtorArgs(t,e,o,i,r,s){if(t&&"string"!=typeof t)return t;const l={};return null!=t&&(l.style=t),null!=e&&(l.color=e),null!=o&&(l.width=(0,n.cr)(o)),null!=i&&(l.cap=i),null!=r&&(l.join=r),null!=s&&(l.miterLimit=(0,n.cr)(s)),l}clone(){return new w({color:(0,s.o8)(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit,marker:this.marker?.clone()})}hash(){return`${super.hash()}.${this.color?.hash()}.${this.style}.${this.cap}.${this.join}.${this.miterLimit}.${this.marker?.hash()}`}};(0,i._)([(0,h.e)({esriSLS:"simple-line"},{readOnly:!0})],M.prototype,"type",void 0),(0,i._)([(0,l.MZ)({type:_.apiValues,json:{read:_.read,write:_.write}})],M.prototype,"style",void 0),(0,i._)([(0,l.MZ)({type:["butt","round","square"],json:{write:{overridePolicy:(t,e,o)=>({enabled:"round"!==t&&null==o?.origin})}}})],M.prototype,"cap",void 0),(0,i._)([(0,l.MZ)({type:["miter","round","bevel"],json:{write:{overridePolicy:(t,e,o)=>({enabled:"round"!==t&&null==o?.origin})}}})],M.prototype,"join",void 0),(0,i._)([(0,l.MZ)({types:{key:"type",base:null,defaultKeyValue:"line-marker",typeMap:{"line-marker":f}},json:{write:!0,origins:{"web-scene":{write:!1}}}})],M.prototype,"marker",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{read:!1,write:!1}})],M.prototype,"miterLimit",void 0),M=w=(0,i._)([(0,a.$)("esri.symbols.SimpleLineSymbol")],M)},53930:(t,e,o)=>{o.d(e,{A:()=>S});var i,r=o(90237),s=o(68197),n=o(66552),l=o(4718),h=o(90629),a=o(10107),p=(o(44208),o(53966),o(93223)),y=o(40608),c=o(43937),u=o(89420),d=o(31593);const m=new n.J({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});let S=i=class extends u.A{constructor(...t){super(...t),this.color=new s.A([255,255,255,.25]),this.type="simple-marker",this.size=12,this.style="circle",this.outline=new d.A}normalizeCtorArgs(t,e,o,i){if(t&&"string"!=typeof t)return t;const r={};return t&&(r.style=t),null!=e&&(r.size=(0,h.cr)(e)),o&&(r.outline=o),i&&(r.color=i),r}writeColor(t,e){t&&"x"!==this.style&&"cross"!==this.style&&(e.color=t.toJSON()),null===t&&(e.color=null)}set path(t){this.style="path",this._set("path",t)}clone(){return new i({angle:this.angle,color:(0,l.o8)(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${super.hash()}.${this.color&&this.color.hash()}.${this.path}.${this.style}.${this.outline?.hash()}`}};(0,r._)([(0,a.MZ)()],S.prototype,"color",void 0),(0,r._)([(0,c.K)("color")],S.prototype,"writeColor",null),(0,r._)([(0,p.e)({esriSMS:"simple-marker"},{readOnly:!0})],S.prototype,"type",void 0),(0,r._)([(0,a.MZ)()],S.prototype,"size",void 0),(0,r._)([(0,a.MZ)({type:m.apiValues,json:{read:m.read,write:m.write}})],S.prototype,"style",void 0),(0,r._)([(0,a.MZ)({type:String,json:{write:!0}})],S.prototype,"path",null),(0,r._)([(0,a.MZ)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":d.A}},json:{default:null,write:!0}})],S.prototype,"outline",void 0),S=i=(0,r._)([(0,y.$)("esri.symbols.SimpleMarkerSymbol")],S)},65851:(t,e,o)=>{o.d(e,{A:()=>h});var i=o(90237),r=o(10107),s=(o(44208),o(53966),o(87811),o(40608)),n=o(31593),l=o(20378);let h=class extends l.A{constructor(t){super(t),this.outline=null,this.type=null}hash(){return`${this.type}.${this.outline?.hash()}`}};(0,i._)([(0,r.MZ)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":n.A}},json:{default:null,write:!0}})],h.prototype,"outline",void 0),(0,i._)([(0,r.MZ)({type:["simple-fill","picture-fill"],readOnly:!0})],h.prototype,"type",void 0),h=(0,i._)([(0,s.$)("esri.symbols.FillSymbol")],h)},68197:(t,e,o)=>{o.d(e,{A:()=>y});var i,r,s=o(40876),n=o(34727),l=o(56507);function h(t){return(0,n.qE)((0,l.Vr)(t),0,255)}function a(t,e){const o=t.toString(16).padStart(2,"0");return e?o.slice(0,1):o}class p{static blendColors(t,e,o,i=new p){return i.r=Math.round(t.r+(e.r-t.r)*o),i.g=Math.round(t.g+(e.g-t.g)*o),i.b=Math.round(t.b+(e.b-t.b)*o),i.a=t.a+(e.a-t.a)*o,i._sanitize()}static fromRgb(t,e){const o=(0,s.lT)(t);return o?p.fromArray(o,e):null}static fromHex(t,e=new p){const o=(0,s.oW)(t);return o?p.fromArray(o,e):null}static fromArray(t,e=new p){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const o=(0,s.Eq)(t);return o?p.fromArray(o,e):null}static fromJSON(t){return null!=t?new p([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?p.fromString(t,this):Array.isArray(t)?p.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof p||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,o=t?.digits??6,i=3===o||4===o,r=4===o||8===o,s=`#${a(this.r,i)}${a(this.g,i)}${a(this.b,i)}${r?a(Math.round(255*this.a),i):""}`;return e?s.toUpperCase():s}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=p.AlphaMode.ALWAYS){const e=h(this.r),o=h(this.g),i=h(this.b);return t===p.AlphaMode.ALWAYS||1!==this.a?[e,o,i,h(255*this.a)]:[e,o,i]}clone(){return new p(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=(0,s.c1)(this.r),this.g=(0,s.c1)(this.g),this.b=(0,s.c1)(this.b),this.a=(0,s.G1)(this.a),this}_set(t,e,o,i){this.r=t,this.g=e,this.b=o,this.a=i}}p.prototype.declaredClass="esri.Color",(r=(i=p||(p={})).AlphaMode||(i.AlphaMode={}))[r.ALWAYS=0]="ALWAYS",r[r.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const y=p},68249:(t,e,o)=>{o.d(e,{A:()=>S});var i,r=o(90237),s=o(68197),n=o(4718),l=o(90629),h=o(10107),a=o(79901),p=o(93223),y=o(40608),c=o(43937),u=o(11831),d=o(20378),m=o(5760);let S=i=class extends d.A{constructor(...t){super(...t),this.backgroundColor=null,this.borderLineColor=null,this.borderLineSize=null,this.font=new u.A,this.horizontalAlignment="center",this.kerning=!0,this.haloColor=null,this.haloSize=null,this.rightToLeft=null,this.rotated=!1,this.text="",this.type="text",this.verticalAlignment="baseline",this.xoffset=0,this.yoffset=0,this.angle=0,this.width=null,this.lineWidth=192,this.lineHeight=1}normalizeCtorArgs(t,e,o){if(t&&"string"!=typeof t)return t;const i={};return t&&(i.text=t),e&&(i.font=e),o&&(i.color=o),i}writeLineWidth(t,e,o,i){i&&"string"!=typeof i?i.origin:e[o]=t}castLineWidth(t){return(0,l.cr)(t)}writeLineHeight(t,e,o,i){i&&"string"!=typeof i?i.origin:e[o]=t}clone(){return new i({angle:this.angle,backgroundColor:(0,n.o8)(this.backgroundColor),borderLineColor:(0,n.o8)(this.borderLineColor),borderLineSize:this.borderLineSize,color:(0,n.o8)(this.color),font:this.font&&this.font.clone(),haloColor:(0,n.o8)(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,lineHeight:this.lineHeight,lineWidth:this.lineWidth,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${this.backgroundColor?.hash()}.${this.borderLineColor}.${this.borderLineSize}.${this.color?.hash()}.${this.font&&this.font.hash()}.${this.haloColor?.hash()}.${this.haloSize}.${this.horizontalAlignment}.${this.kerning}.${this.rightToLeft}.${this.rotated}.${this.text}.${this.verticalAlignment}.${this.width}.${this.xoffset}.${this.yoffset}.${this.lineHeight}.${this.lineWidth}.${this.angle}`}};(0,r._)([(0,h.MZ)({type:s.A,json:{write:!0}})],S.prototype,"backgroundColor",void 0),(0,r._)([(0,h.MZ)({type:s.A,json:{write:!0}})],S.prototype,"borderLineColor",void 0),(0,r._)([(0,h.MZ)({type:Number,json:{write:!0},cast:l.cr})],S.prototype,"borderLineSize",void 0),(0,r._)([(0,h.MZ)({type:u.A,json:{write:!0}})],S.prototype,"font",void 0),(0,r._)([(0,h.MZ)({...m.rM,json:{write:!0}})],S.prototype,"horizontalAlignment",void 0),(0,r._)([(0,h.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"kerning",void 0),(0,r._)([(0,h.MZ)({type:s.A,json:{write:!0}})],S.prototype,"haloColor",void 0),(0,r._)([(0,h.MZ)({type:Number,cast:l.cr,json:{write:!0}})],S.prototype,"haloSize",void 0),(0,r._)([(0,h.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"rightToLeft",void 0),(0,r._)([(0,h.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"rotated",void 0),(0,r._)([(0,h.MZ)({type:String,json:{write:!0}})],S.prototype,"text",void 0),(0,r._)([(0,p.e)({esriTS:"text"},{readOnly:!0})],S.prototype,"type",void 0),(0,r._)([(0,h.MZ)({...m.x0,json:{write:!0}})],S.prototype,"verticalAlignment",void 0),(0,r._)([(0,h.MZ)({type:Number,cast:l.cr,json:{write:!0}})],S.prototype,"xoffset",void 0),(0,r._)([(0,h.MZ)({type:Number,cast:l.cr,json:{write:!0}})],S.prototype,"yoffset",void 0),(0,r._)([(0,h.MZ)({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],S.prototype,"angle",void 0),(0,r._)([(0,h.MZ)({type:Number,json:{write:!0}})],S.prototype,"width",void 0),(0,r._)([(0,h.MZ)({type:Number})],S.prototype,"lineWidth",void 0),(0,r._)([(0,c.K)("lineWidth")],S.prototype,"writeLineWidth",null),(0,r._)([(0,a.w)("lineWidth")],S.prototype,"castLineWidth",null),(0,r._)([(0,h.MZ)(m.Tb)],S.prototype,"lineHeight",void 0),(0,r._)([(0,c.K)("lineHeight")],S.prototype,"writeLineHeight",null),S=i=(0,r._)([(0,y.$)("esri.symbols.TextSymbol")],S)},69540:(t,e,o)=>{o.d(e,{A:()=>c});var i=o(90237),r=o(69622),s=(o(44208),o(4718)),n=(o(53966),o(97768)),l=o(35666),h=o(88620),a=o(40608);const p=t=>{let e=class extends t{clone(){const t=(0,h.oY)(this);(0,n.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,o=t.store,i={},r=new Map;for(const t in e){const n=e[t],h=o?.originOf(t),a=n.clonable;if(n.readOnly||!1===a||h!==l.Gr.USER&&h!==l.Gr.DEFAULTS&&h!==l.Gr.WEB_MAP&&h!==l.Gr.WEB_SCENE)continue;const p=this[t];let y=null;y="function"==typeof a?a(p):"reference"===a?p:(0,s.TU)(p),null!=p&&null==y||(h===l.Gr.DEFAULTS?r.set(t,y):i[t]=y)}const a=new(0,Object.getPrototypeOf(this).constructor)(i);if(r.size){const t=(0,h.oY)(a)?.store;if(t)for(const[e,o]of r)t.set(e,o,l.Gr.DEFAULTS)}return a}};return e=(0,i._)([(0,a.$)("esri.core.Clonable")],e),e};let y=class extends(p(r.A)){};y=(0,i._)([(0,a.$)("esri.core.Clonable")],y),(y||(y={})).ClonableMixin=p;const c=y},83213:(t,e,o)=>{o.d(e,{x:()=>i,z:()=>r});const i=["begin","end","begin-end"],r=["arrow","circle","square","diamond","cross","x"]},89420:(t,e,o)=>{o.d(e,{A:()=>a});var i=o(90237),r=o(90629),s=o(10107),n=o(56507),l=(o(44208),o(87811),o(40608)),h=o(20378);let a=class extends h.A{constructor(t){super(t),this.angle=0,this.type=null,this.xoffset=0,this.yoffset=0,this.size=9}hash(){return`${this.type}.${this.angle}.${this.size}.${this.xoffset}.${this.yoffset}`}};(0,i._)([(0,s.MZ)({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],a.prototype,"angle",void 0),(0,i._)([(0,s.MZ)({type:["simple-marker","picture-marker"],readOnly:!0})],a.prototype,"type",void 0),(0,i._)([(0,s.MZ)({type:Number,cast:r.cr,json:{write:!0}})],a.prototype,"xoffset",void 0),(0,i._)([(0,s.MZ)({type:Number,cast:r.cr,json:{write:!0}})],a.prototype,"yoffset",void 0),(0,i._)([(0,s.MZ)({cast:t=>"auto"===t?t:(0,n.GB)((0,r.cr)(t)),json:{write:!0}})],a.prototype,"size",void 0),a=(0,i._)([(0,l.$)("esri.symbols.MarkerSymbol")],a)},90629:(t,e,o)=>{o.d(e,{Lz:()=>n,PN:()=>l,cr:()=>h,tc:()=>a});const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,r="screenUtils.toPt: input not recognized!",s=96;function n(t){return t?t/72*s:0}function l(t){return t?72*t/s:0}function h(t){if("string"==typeof t){const e=t.match(i);if(e){const o=Number(e[1]),i=e[3]&&e[3].toLowerCase(),r="-"===t.charAt(0),s="px"===i?l(o):o;return r?-s:s}return console.warn(r),null}return t}function a(t=0,e=0){return{x:t,y:e}}},94985:(t,e,o)=>{o.d(e,{A:()=>d});var i,r=o(90237),s=o(68197),n=o(66552),l=o(4718),h=o(10107),a=(o(44208),o(53966),o(93223)),p=o(40608),y=o(65851),c=o(31593);const u=new n.J({esriSFSSolid:"solid",esriSFSNull:"none",esriSFSHorizontal:"horizontal",esriSFSVertical:"vertical",esriSFSForwardDiagonal:"forward-diagonal",esriSFSBackwardDiagonal:"backward-diagonal",esriSFSCross:"cross",esriSFSDiagonalCross:"diagonal-cross"});let d=i=class extends y.A{constructor(...t){super(...t),this.color=new s.A([0,0,0,.25]),this.outline=new c.A,this.type="simple-fill",this.style="solid"}normalizeCtorArgs(t,e,o){if(t&&"string"!=typeof t)return t;const i={};return t&&(i.style=t),e&&(i.outline=e),o&&(i.color=o),i}clone(){return new i({color:(0,l.o8)(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}hash(){return`${super.hash()}${this.style}.${this.color&&this.color.hash()}`}};(0,r._)([(0,h.MZ)()],d.prototype,"color",void 0),(0,r._)([(0,h.MZ)()],d.prototype,"outline",void 0),(0,r._)([(0,a.e)({esriSFS:"simple-fill"},{readOnly:!0})],d.prototype,"type",void 0),(0,r._)([(0,h.MZ)({type:u.apiValues,json:{read:u.read,write:u.write}})],d.prototype,"style",void 0),d=i=(0,r._)([(0,p.$)("esri.symbols.SimpleFillSymbol")],d)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[788,3186,3447,3651,4697,7060,8407],{5503:(e,t,i)=>{i.d(t,{A:()=>E});var r,s=i(90237),n=i(98291),a=i(65529),l=i(36563),o=i(4718),u=i(93687);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(r||(r={}));var c,h=i(11932),d=i(56507),f=i(62788),p=i(10107),y=i(7695),_=i(40608),g=i(95488),m=i(12195);class w{constructor(e,t,i,r,s){this.target=e,this.added=t,this.removed=i,this.start=r,this.deleteCount=s}}const b=new u.A(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function F(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function S(e){return e?e instanceof k?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function v(e){if(e?.length)return e[0]}function I(e,t,i,r){const s=Math.min(e.length-i,t.length-r);let n=0;for(;n<s&&e[i+n]===t[r+n];)n++;return n}function A(e,t,i,r){t&&t.forEach((t,s,n)=>{e.push(t),A(e,i.call(r,t,s,n),i,r)})}const T=new Set,x=new Set,C=new Set,D=new Map;let R=0,k=class extends a.A.EventedAccessor{static{c=this}static{this.ofType=e=>{if(!e)return c;if(D.has(e))return D.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const r=e.typeMap[i].prototype.declaredClass;t?t+=` | ${r}`:t=r}let i=class extends c{};return(0,s._)([(0,y.u)({Type:e,ensureType:"function"==typeof e?(0,d.dp)(e):(0,d.aq)(e)})],i.prototype,"itemType",void 0),i=(0,s._)([(0,_.$)(`esri.core.Collection<${t}>`)],i),D.set(e,i),i}}static isCollection(e){return null!=e&&e instanceof c}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new g.I,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:R++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof c?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(r.ADD)||(this._splice(0,this.length,S(e)),this._emitAfterChanges(r.ADD))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,l.hA)();if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,l.hA)(()=>{i.removed=!0,e.splice(e.indexOf(i),1)})}return this._emitter.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,r=this.on(e,e=>{i()?.call(null,e),r.remove()});return r}add(e,t){if((0,f.gc)(this._observable),this._emitBeforeChanges(r.ADD))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(r.ADD),this}addMany(e,t=this._items.length){if((0,f.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(r.ADD))return this;const i=this.getNextIndex(t);return this._splice(i,0,S(e)),this._emitAfterChanges(r.ADD),this}at(e){if((0,f.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(r.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.map(o.o8)})}concat(...e){(0,f.gc)(this._observable);const t=e.map(S);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return;const i=this._splice(0,this.length),s=i.length;for(let r=0;r<s;r++)e.call(t,i[r],r,i);this._emitAfterChanges(r.REMOVE)}destroyAll(){this.drain(F)}destroyMany(e){const t=this.removeMany(e);return t.forEach(F),t}every(e,t){return(0,f.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,f.gc)(this._observable);const i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,f.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.gc)(this._observable);const i=[];return A(i,this,e,t),new c(i)}forEach(e,t){return(0,f.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.gc)(this._observable),this._items[e]}getNextIndex(e){(0,f.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.gc)(this._observable);const i=this._items.map(e,t);return new c({items:i})}reorder(e,t=this.length-1){(0,f.gc)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(r.MOVE))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(r.MOVE)}return e}}pop(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return;const e=v(this._splice(this.length-1,1));return this._emitAfterChanges(r.REMOVE),e}push(...e){return(0,f.gc)(this._observable),this._emitBeforeChanges(r.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(r.ADD)),this.length}reduce(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(r.REMOVE))return;const t=v(this._splice(e,1));return this._emitAfterChanges(r.REMOVE),t}removeMany(e){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(r.REMOVE))return[];const t=e instanceof c?e.toArray():e,i=this._items,s=[],n=t.length;for(let e=0;e<n;e++){const r=t[e],n=i.indexOf(r);if(n>-1){const r=1+I(t,i,e+1,n+1),a=this._splice(n,r);a&&a.length>0&&s.push.apply(s,a),e+=r-1}}return this._emitAfterChanges(r.REMOVE),s}reverse(){if((0,f.gc)(this._observable),this._emitBeforeChanges(r.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(r.MOVE),this}shift(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return;const e=v(this._splice(0,1));return this._emitAfterChanges(r.REMOVE),e}slice(e=0,t=this.length){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.MOVE)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(r.MOVE),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,f.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const s=(t?r.REMOVE:0)|(i.length?r.ADD:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(s),n}toArray(){return(0,f.gc)(this._observable),this._items.slice()}toJSON(e){return(0,f.gc)(this._observable),this.toArray().map(t=>(0,m.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,f.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,f.gc)(this._observable),this._items.toString()}unshift(...e){return(0,f.gc)(this._observable),!e.length||this._emitBeforeChanges(r.ADD)||(this._splice(0,0,e),this._emitAfterChanges(r.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const r=this._items,s=this.itemType;let n,a;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,h._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(a=r.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let i=0,s=a.length;i<s;i++)n=a[i],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(a.splice(i,1),r.splice(e,0,n),e+=1,i-=1,s-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=a.length;for(let i=0;i<t;i++)e.reset(a[i]),this.emit("after-remove",e);b.release(e)}}if(i?.length){if(s){const e=[];for(const t of i){const i=s.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),a=e===this.length;if(t||n){const s=b.acquire();s.target=this,s.cancellable=!0;const l=b.acquire();l.target=this,l.cancellable=!1;for(const o of i)t?(s.reset(o),this.emit("before-add",s),s.defaultPrevented||(a?r.push(o):r.splice(e++,0,o),this._set("length",r.length),n&&(l.reset(o),this.emit("after-add",l)))):(a?r.push(o):r.splice(e++,0,o),this._set("length",r.length),l.reset(o),this.emit("after-add",l));b.release(l),b.release(s)}else{if(a)for(const e of i)r.push(e);else r.splice(e,0,...i);this._set("length",r.length)}}if((i?.length||a?.length)&&this._notifyChangeEvent(i,a),this.hasEventListener("after-splice")){const r=new w(this,i,a,e,t);this.emit("after-splice",r)}return a}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=b.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,b.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;T.clear(),x.clear(),C.clear();for(const{added:t,removed:i}of e){if(t)if(0===C.size&&0===x.size)for(const e of t)T.add(e);else for(const e of t)x.has(e)?(C.add(e),x.delete(e)):C.has(e)||T.add(e);if(i)if(0===C.size&&0===T.size)for(const e of i)x.add(e);else for(const e of i)T.has(e)?T.delete(e):(C.delete(e),x.add(e))}const i=n.A.acquire();T.forEach(e=>{i.push(e)});const r=n.A.acquire();x.forEach(e=>{r.push(e)});const s=this._items,a=t.items,l=n.A.acquire();if(C.forEach(e=>{a.indexOf(e)!==s.indexOf(e)&&l.push(e)}),t.listeners&&(i.length||r.length||l.length)){const e={target:this,added:i,removed:r,moved:l},s=t.listeners.length;for(let i=0;i<s;i++){const r=t.listeners[i];r.removed||r.callback.call(this,e)}}n.A.release(i),n.A.release(r),n.A.release(l)}T.clear(),x.clear(),C.clear()}};(0,s._)([(0,p.MZ)()],k.prototype,"_updating",void 0),(0,s._)([(0,p.MZ)()],k.prototype,"length",void 0),(0,s._)([(0,p.MZ)()],k.prototype,"items",null),(0,s._)([(0,p.MZ)({readOnly:!0})],k.prototype,"updating",null),k=c=(0,s._)([(0,_.$)("esri.core.Collection")],k);const E=k},6797:(e,t,i)=>{i.d(t,{Mj:()=>d,Ui:()=>p,w2:()=>f});var r=i(69622),s=i(5503),n=i(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.A}function o(e){return e instanceof s.A?Object.keys(e.items):l(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function h(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=o(e),s=o(t);if(0===r.length&&0===s.length)return;if(!r.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter(e=>!r.includes(e)),d=r.filter(e=>!s.includes(e)),f=r.filter(i=>s.includes(i)&&u(e,i)!==u(t,i)).concat(n,d).sort(),p=c(e);if(p&&a.has(p)&&f.length)return{type:"complete",oldValue:e,newValue:t};let y;const _=l(e)&&l(t);for(const r of f){const s=u(e,r),n=u(t,r);let a;if((_||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(i&&i[r]&&"function"==typeof i[r])a=i[r]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;a={type:"complete",oldValue:s,newValue:n}}else a="object"==typeof s&&"object"==typeof n&&c(s)===c(n)?h(s,n):{type:"complete",oldValue:s,newValue:n};null!=a&&(null!=y?y.diff[r]=a:y={type:"partial",diff:{[r]:a}})}}return y}function d(e,t){return function(e,t){if(null==e)return!1;const i=t.split(".");let r=e;for(const e of i){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}(e,t)}function f(e,t){if(!e)return!1;if("partial"===e.type){const i=Object.keys(e.diff);return 1===i.length&&i[0]===t}return!1}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},7695:(e,t,i)=>{function r(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>r})},10407:(e,t,i)=>{i.d(t,{It:()=>f,LG:()=>a,OM:()=>u,Sm:()=>c,Y:()=>l,bK:()=>o,mm:()=>d,sQ:()=>h});var r=i(98988),s=i(16930),n=i(28735);function a(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,d.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function c(e,t,i){i?a(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function f(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit");const l="update"===r||"admin"===r;return l?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:l}}}},17311:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(90237),s=i(69622),n=i(4576),a=i(60999),l=i(5503),o=i(10107),u=(i(44208),i(53966),i(40608)),c=i(30524),h=i(43668);let d=class extends s.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,a.UT)(()=>(0,h.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([i.e(4560),i.e(9926)]).then(i.bind(i,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const i=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(i.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:i,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(i,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const i=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of i){const i=t.split("."),r=this.fieldsIndex.get(i.at(-1)??"");r&&e.add(r.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const i of t){const t=this.fieldsIndex.get(i);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,i){return(await this.getTitles(e,[t],i)).get(t)??""}async getTitles(e,t,i){const r=new Map,s=i?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:n}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);i?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:a,workingTitle:l}=this,o=l&&a;t.forEach(t=>{const i=o?n({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:a,globalAttributes:this._createFormattedAttributes(e,t,s).global,layer:e,text:l}):"";r.set(t,i)})}catch{}return r}async _checkAndReQueryGraphics(e,t){const i=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(n.Ru);if(i.length!==t.length)return t;if(t.some(e=>!(0,c.Kl)(e,this.requiredFields))){const r=e.createQuery();r.where="1=1",r.outFields=[...this.requiredFields],r.objectIds=i;const s=await e.queryFeatures(r);if(s?.features.length===t.length)return s.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const i of e){if(!i.fieldName)continue;const e=this.fieldsIndex.get(i.fieldName),r=e?.name??i.fieldName;i.fieldName=r,t.set(r.toLowerCase(),i)}return t}_createFormattedAttributes(e,t,i="system"){const r=this.effectivePopupTemplate?.fieldInfos??[],s={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const i=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{s[`expression/${e.name}`]=e.func({vars:{$feature:i}})}catch{}}const n={...t.attributes,...s};return{global:this._featureUtils.formatAttributes({fieldInfos:r,attributes:n,graphic:t,timeZone:i,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter(e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/")))}};(0,r._)([(0,o.MZ)({readOnly:!0})],d.prototype,"_arcadeTask",null),(0,r._)([(0,o.MZ)()],d.prototype,"_featureUtils",void 0),(0,r._)([(0,o.MZ)({readOnly:!0})],d.prototype,"featureUtilsPromise",null),(0,r._)([(0,o.MZ)({readOnly:!0})],d.prototype,"calculatedExpressions",null),(0,r._)([(0,o.MZ)()],d.prototype,"displayField",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"effectivePopupTemplate",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"expressionsUsedInTitle",null),(0,r._)([(0,o.MZ)()],d.prototype,"fieldsIndex",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"fieldInfoMap",null),(0,r._)([(0,o.MZ)()],d.prototype,"fields",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"objectIdField",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"requiredFields",null),d=(0,r._)([(0,u.$)("esri.layers.support.TitleCreator")],d)},22671:(e,t,i)=>{i.d(t,{A:()=>m});var r,s=i(90237),n=i(52106),a=i(66552),l=i(25482),o=i(4718),u=i(10107),c=(i(44208),i(53966),i(36005)),h=i(40608),d=i(43937),f=i(16930),p=i(65864),y=i(50498),_=i(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let m=r=class extends l.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,p.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=f.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,o.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,s]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((s-e)/i));for(let e=0,t=n.length;e<t;e++)a?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,s],scale:[n,a]}=i;let l=null,o=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;o=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,e=>e*n+r,e=>s-e*a,l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){const r=f.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const n=e[t],a=i.fromJSON(n),l=n.geometry?.spatialReference;null==a.geometry||l||(a.geometry.spatialReference=r);const o=n.aggregateGeometries,u=a.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],i=o[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}s.push(a)}return s}_quantizePoints(e,t,i){let r,s;const n=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===s||(n.push([e-r,a-s]),r=e,s=a)}else r=t(l[0]),s=i(l[1]),n.push([r,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,p.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],a=this._quantizePoints(n,t,i);a&&s.push(a)}return s.length>0?((0,p.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,s){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,p.Bi)(e)?e.rings:e.paths;let a,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,s=r.length;e<s;e++){const s=r[e];e>0?(a+=s[0],l+=s[1]):(a=s[0],l=s[1]),s[0]=t(a),s[1]=i(l)}}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=s(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=s(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let a,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(a+=r[0],l+=r[1]):(a=r[0],l=r[1]),r[0]=t(a),r[1]=i(l)}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=s(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,u.MZ)({type:String,json:{write:!0}})],m.prototype,"displayFieldName",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],m.prototype,"features",void 0),(0,s._)([(0,c.w)("features")],m.prototype,"readFeatures",null),(0,s._)([(0,u.MZ)({type:[_.A],json:{write:!0}})],m.prototype,"fields",void 0),(0,s._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],m.prototype,"geometryType",void 0),(0,s._)([(0,d.K)("geometryType")],m.prototype,"writeGeometryType",null),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasM",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasZ",void 0),(0,s._)([(0,u.MZ)({types:y.yR,json:{write:!0}})],m.prototype,"queryGeometry",void 0),(0,s._)([(0,c.w)("queryGeometry")],m.prototype,"readQueryGeometry",null),(0,s._)([(0,u.MZ)({type:f.A,json:{write:!0}})],m.prototype,"spatialReference",void 0),(0,s._)([(0,d.K)("spatialReference")],m.prototype,"writeSpatialReference",null),(0,s._)([(0,u.MZ)({json:{write:!0}})],m.prototype,"transform",void 0),m=r=(0,s._)([(0,h.$)("esri.rest.support.FeatureSet")],m),m.prototype.toJSON.isDefaultToJSON=!0},27865:(e,t,i)=>{i.d(t,{O9:()=>n,dw:()=>a,mj:()=>s});var r=i(59247);function s(e,t){const i=e.length>t.length?e:t;return(e.length>t.length?t:e).every((e,t)=>e.type===i[t].type)}function n(e,t){const i=e.length>t.length?e:t,s=e.length>t.length?t:e;for(let e=s.length;e<i.length;e++)s.push((0,r.sK)(i[e]))}function a(e){const t=e[0];return!!t&&"type"in t}},30235:(e,t,i)=>{i.d(t,{A:()=>p});var r=i(52106),s=i(87449),n=i(11221),a=i(89169),l=i(33325),o=i(80609),u=i(39516),c=i(91075),h=i(13600),d=i(33143),f=i(20437);class p extends n.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type||this._layer.objectIdField===i.name)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=l.zl.Standardised,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return l.J6.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new r.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,s){let n="",c=!1;if(null!==r&&(n=r.constructClause(),c=!0),this.isTable()&&t&&null!==e&&""!==e)return new a.A([],[],!0,null);const h=this._createQuery();h.where=(0,u.mA)(h.where,null===i?null===t?"1=1":"":(0,o.YY)(i,l.zl.Standardised)),h.spatialRelationship=this._makeRelationshipEnum(e),h.outSpatialReference=this.spatialReference,h.orderByFields=""!==n?n.split(","):null,h.geometry=null===t?null:t,h.relationParameter=this._makeRelationshipParam(e);const d=await this._layer.queryFeatures(h);if(null===d)return new a.A([],[],c,null);this._checkCancelled(s);const f=[];return d.features.forEach(e=>{const t=e.attributes[this._layer.objectIdField];f.push(t),this._featureCache[t]=this._changeFeature(e)}),new a.A([],f,c,null)}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _queryAllFeatures(){if(this._wset)return this._wset;if(await this._ensureLoaded(),this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach(t=>{const i=t.attributes[this._layer.objectIdField];e.push(i),this._featureCache[i]=this._changeFeature(t)}),this._wset=new a.A([],e,!1,null),this._wset}const e=this._createQuery();e.where="1=1";const t=await this._layer.queryFeatures(e),i=[];return t.features.forEach(e=>{const t=e.attributes[this._layer.objectIdField];i.push(t),this._featureCache[t]=this._changeFeature(e)}),this._wset=new a.A([],i,!1,null),this._wset}async _getFeatures(e,t,i){const r=[];-1!==t&&void 0===this._featureCache[t]&&r.push(t);for(let s=e._lastFetchedIndex;s<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&r.push(e._known[s]),r.length>i)));s++);if(0===r.length)return"success";throw new s.dr(s.D_.MissingFeatures)}async _refineSetBlock(e){return e}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const i in e)t[i]=e[i];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let i=e.layerDefinition.objectIdField;const r=e.layerDefinition.typeIdField??"",s=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)s.push(d.A.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!i){let t=!1;for(const r of e.layerDefinition.fields)if("oid"===r.type||"esriFieldTypeOID"===r.type){i=r.name,t=!0;break}if(!1===t){let t="FID",r=!0,s=0;for(;r;){let i=!0;for(const r of e.layerDefinition.fields)if(r.name===t){i=!1;break}!0===i?r=!1:(s++,t="FID"+s.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let i=0;i<a.length;i++)n.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),n[i].attributes[t]=i;a=n,i=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof f.A?o.push(t):o.push(f.A.fromJSON(t));let u=n;switch(u||(u=""),u){case"esriGeometryPoint":u="point";break;case"esriGeometryPolyline":u="polyline";break;case"esriGeometryPolygon":u="polygon";break;case"esriGeometryEnvelope":u="extent";break;case"esriGeometryMultipoint":u="multipoint";break;case"":case"esriGeometryNull":u="esriGeometryNull"}if("esriGeometryNull"!==u)for(const e of a)e.geometry&&e.geometry instanceof c.A==0&&(e.geometry.type=u,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const y={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:s,typeIdField:r,objectIdField:i,spatialReference:t},_="esriGeometryNull"===u||null===u;_||(y.geometryType=u);const g=new h.default(y);return e?.layerDefinition?.subtypeField&&e?.layerDefinition?.subtypes&&g.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new p({layer:g,spatialReference:t,isTable:_})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const i=await this._layer.queryFeatures(t);return 1===i.features.length?i.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return this._layer?.timeInfo}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return this.fsetInfo??{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},32730:(e,t,i)=>{i.d(t,{BI:()=>_,D3:()=>p,XJ:()=>y,lc:()=>f,mX:()=>m,rU:()=>g,tH:()=>v});var r=i(799);const s="__begin__",n="__end__",a=new RegExp(s,"ig"),l=new RegExp(n,"ig"),o=new RegExp("^"+s,"i"),u=new RegExp(n+"$","i"),c='"',h=c+" + ",d=" + "+c;function f(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function p(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=f(e.labelExpression),t.type="conventional"),t}function _(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return m(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function m(e){let t;return e?(t=(0,r.HC)(e,e=>s+'$feature["'+e+'"]'+n),t=o.test(t)?t.replace(o,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(a,h).replaceAll(l,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,F=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,S=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=b.exec(e)||F.exec(e);return t?t[1]||t[3]:(t=S.exec(e),t?t[2]:null)}},32756:(e,t,i)=>{i.d(t,{Rr:()=>o,fY:()=>c,ne:()=>u});var r=i(90237),s=i(93637),n=i(10107),a=(i(44208),i(53966),i(87811),i(40608)),l=i(91880);function o(e,t,i){if(!e)return null;const r=e.find(e=>!!e.field);if(!r)return null;const s=new l.A;return s.read(r,i),[s]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:o},write:{writer:function(e,t,i,r){const n=e.find(e=>!!e.field);n&&(0,s.sM)(i,[n.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,r._)([(0,n.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,r._)([(0,a.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(90237),s=i(69540),n=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),o=i(40608),u=i(43937),c=i(80451),h=i(29005);let d=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,c.rS)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,r._)([(0,l.w)("domains")],d.prototype,"readDomains",null),(0,r._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,r._)([(0,a.MZ)({type:[h.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,r._)([(0,o.$)("esri.layers.support.FeatureType")],d)},35704:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(87449),s=i(11221),n=i(89169),a=i(33325),l=i(80609),o=i(74887),u=i(88368),c=i(16930);class h extends s.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof u.A?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new c.A({wkid:4326}),this.geometryType=a.ik.point)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("",null,this._whereclause,null,e);return this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new n.A(t._candidates.slice().concat(t._known.slice()),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new n.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent?._isInFeatureSet(e);return t===a.J6.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?a.J6.Unknown:t)}_getFeature(e,t,i){return this._parent._getFeature(e,t,i)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction){const t=this._whereClauseFunction(e);return(0,o.$X)(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,i){const r=new n.A([],e,!1,null),s=Math.min(t,e.length);if(await(this._parent?._getFeatures(r,-1,s,i)),this._checkCancelled(i),null==this._whereClauseFunction){for(let t=0;t<s;t++){const i=this._parent?._featureFromCache(e[t]);!0===this.executeWhereClause(i)?this._idstates[e[t]]=a.J6.InFeatureSet:this._idstates[e[t]]=a.J6.NotInFeatureSet}return"success"}const l=[];for(let t=0;t<s;t++){const i=this._parent?._featureFromCache(e[t]);l.push(await this.executeWhereClauseDeferred(i))}for(let i=0;i<t;i++)!0===l[i]?this._idstates[e[i]]=a.J6.InFeatureSet:this._idstates[e[i]]=a.J6.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,i,r,s){null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,l.kg)(this._whereclause,i)):i=this._whereclause),await this._ensureLoaded();const a=await this._parent._getFilteredSet(e,t,i,r,s);let o;return this._checkCancelled(s),o=null!==this._whereClauseFunction?new n.A(a._candidates.slice().concat(a._known.slice()),[],a._ordered,this._clonePageDefinition(a.pagesDefinition)):new n.A(a._candidates.slice(),a._known.slice(),a._ordered,this._clonePageDefinition(a.pagesDefinition)),o}async _stat(e,t,i,r,s,n,a){if(null!==this._whereClauseFunction)return null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1};let o=this._whereclause;null!==s&&null!==this._whereclause&&(o=(0,l.kg)(this._whereclause,s));const u=await this._parent._stat(e,t,i,r,o,n,a);return!1===u.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1}:u}async _canDoAggregates(e,t,i,r,s){return null===this._whereClauseFunction&&(null!==s?null!==this._whereclause&&(s=(0,l.kg)(this._whereclause,s)):s=this._whereclause,null!==this._parent&&this._parent._canDoAggregates(e,t,i,r,s))}async _getAggregatePagesDataSourceDefinition(e,t,i,s,n,a,o){if(null===this._parent)throw new r.dr(r.D_.NeverReach);return null!==n?null!==this._whereclause&&(n=(0,l.kg)(this._whereclause,n)):n=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,s,n,a,o)}static registerAction(){s.A._featuresetFunctions.filter=function(e){if("function"==typeof e)return new h({parentfeatureset:this,whereclause:e});let t=null;return e instanceof u.A&&(t=e),new h({parentfeatureset:this,whereclause:t})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>y,Vh:()=>_,on:()=>h,pc:()=>g,wB:()=>o,z7:()=>u});var r=i(37955),s=i(36563),n=i(97768),a=i(74887),l=i(14012);function o(e,t,i={}){return c(e,t,i,f)}function u(e,t,i={}){return c(e,t,i,p)}function c(e,t,i={},r){let s=null;const a=i.once?(e,i)=>{r(e)&&((0,n.xt)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.Cn)(e,a,i.sync,i.equals),i.initial){const t=e();a(t,t)}return s}function h(e,t,i,a={}){let l=null,u=null,c=null;function h(){l&&u&&(u.remove(),a.onListenerRemove?.(l),l=null,u=null)}function d(e){a.once&&a.once&&(0,n.xt)(c),i(e)}const f=o(e,(e,i)=>{h(),(0,r.wb)(e)&&(l=e,u=(0,r.on)(e,t,d),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return c=(0,s.hA)(()=>{f.remove(),h()}),c}function d(e,t){return function(e,t,i){if((0,a.G4)(i))return Promise.reject((0,a.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function o(){l=(0,n.xt)(l)}return new Promise((r,n)=>{l=(0,s.vE)([(0,a.u7)(i,()=>{o(),n((0,a.NK)())}),c(e,e=>{o(),r(e)},{sync:!1,once:!0},t??f)])})}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(80559);const y={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},39516:(e,t,i)=>{let r;async function s(){return null==r&&(r=Promise.all([i.e(8368),i.e(4123)]).then(i.bind(i,44123)).then(e=>new e.WhereClauseCache(500,500))),r}async function n(e,t){const i=await s(),r=i.get(e,t);if(null==r)throw i.getError(e,t);return r}function a(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function l(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}i.d(t,{GP:()=>n,IW:()=>l,mA:()=>a})},40334:(e,t,i)=>{i.r(t),i.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>se,constructFeatureSet:()=>ie,constructFeatureSetFromPortalItem:()=>he,constructFeatureSetFromRelationship:()=>ne,constructFeatureSetFromUrl:()=>te,convertToFeatureSet:()=>ce,createFeatureSetCollectionFromMap:()=>oe,createFeatureSetCollectionFromService:()=>ue,initialiseMetaDataCache:()=>X});var r=i(78888);class s{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,i){this._layerById[t]=i,this._layerByName[e]=i}async featureSetByName(e,t=!0,i=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,i=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}var n=i(78878),a=i(35704),l=i(52106),o=i(59534),u=i(68423),c=i(86691),h=i(87449),d=i(11221),f=i(89169),p=i(87594),y=i(33325),_=i(80609),g=i(1262),m=i(88368);class w{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new w;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i,r){const s=new w;s.field=e;const n=m.A.create(t,{fieldsIndex:i,timeZone:r}),a=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new g.L8(g.Z7.MissingStatisticParameters);const t=m.A.create((0,_.Mi)(e.parseTree.args.value[0],y.zl.Standardised,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(n);if(null===a)throw new g.L8(g.Z7.UnsupportedSqlFunction,{function:""});const l=a.name.toUpperCase().trim();if("MIN"===l){if(s.typeofstat="MIN",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"min"})}else if("MAX"===l){if(s.typeofstat="MAX",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"max"})}else if("COUNT"===l)s.typeofstat="COUNT",s.workingexpr=a.expr;else if("STDEV"===l){if(s.typeofstat="STDDEV",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"stdev"})}else if("SUM"===l){if(s.typeofstat="SUM",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"sum"})}else if("MEAN"===l){if(s.typeofstat="AVG",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:l})}else if("AVG"===l){if(s.typeofstat="AVG",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"avg"})}else{if("VAR"!==l)throw new g.L8(g.Z7.UnsupportedSqlFunction,{function:l});if(s.typeofstat="VAR",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"var"})}return s}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 b=i(53966),F=i(80200),S=i(74639),v=i(44729),I=i(55612),A=i(15032),T=i(16930),x=i(20437),C=i(95466);const D=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class R extends d.A{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return y.J6.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const r=this._parent?this._parent.getFieldsIndex():new C.A([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const e of this._config.statsfields){const t=new w;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof m.A?e.expression:m.A.create(e.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),t.typeofstat=D.lookup(e.statistic)??"COUNT",this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof m.A?e.expression:m.A.create(e.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField=""}else this.geometryType=y.ik.point,this.typeIdField="",this.types=null,this.subtypes=null,this.subtypeField="",this.spatialReference=new T.A({wkid:4326});this.fields=[];const s=new w;s.field=this._nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=m.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const i=new x.A;if(t.name=this._nextUniqueName(e),i.name=t.tofieldname,i.alias=i.name,(0,_.DA)(t.expression)){const e=this._parent.getField((0,_.YY)(t.expression,y.zl.Standardised));if(!e)throw new h.dr(h.D_.AggregationFieldNotFound);t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),i.type=e.type,t.sqlType=e.type}else{i.type=this._convertToEsriFieldType((0,_.IY)(t.expression,this._parent.fields));const e=new x.A;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new u.Gr(e,t.expression)),this._candosimplegroupby=!1,t.sqlType=i.type}this.fields.push(i)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new u.IO(e));for(let t=0;t<this._decodedStatsfield.length;t++){const i=new x.A;let r=null;const s=this._decodedStatsfield[t];s.field=this._nextUniqueName(e),s.tofieldname===this.objectIdField&&(this._internalObjectIdField=s.field),i.name=s.tofieldname,i.alias=i.name;const n=null!==s.workingexpr&&(0,_.DA)(s.workingexpr)?(0,_.YY)(s.workingexpr,y.zl.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(r=this._parent.getField(n),!r)throw new h.dr(h.D_.AggregationFieldNotFound);i.type=r.type}else i.type="double";break;case"MIN":case"MAX":if(""!==n){if(r=this._parent.getField(n),!r)throw new h.dr(h.D_.AggregationFieldNotFound);i.type=r.type}else i.type="double";break;case"COUNT":i.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(r=this._parent.getField(n),!r))throw new h.dr(h.D_.AggregationFieldNotFound);i.type="double"}this.fields.push(i)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,i,r){-1!==t&&this._featureCache[t];const s=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,s)?(await this._expandPagedSet(e,s,0,0,r),this._getFeatures(e,t,i,r)):"success"}async _getFilteredSet(e,t,i,r,s){if(""!==e)return new f.A([],[],!0,null);let n=null;const l={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==i)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,_.Ju)(i,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,i=null;break}if(null!==r){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===r.scanForField(this._decodedStatsfield[e].tofieldname)){r=null,l.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,l.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;r&&(t=this._reformulateOrderClauseWithoutGroupByFields(r));const a=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(s),n=!0===l.nowhereclause?new f.A(a._candidates.slice().concat(a._known.slice()),[],!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)):new f.A(a._candidates.slice(),a._known.slice(),!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)),n}let o=this._parent;if(this._adaptedFields.length>0&&(o=new u.a({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new f.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:o,orderbyclause:new p.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=o;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a.A({parentfeatureset:e,whereclause:t})}n=new f.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:e,orderbyclause:new p.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,_.bD)(e,t.tofieldname,(0,_.YY)(t.workingexpr,y.zl.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,_.bD)(e,t.tofieldname,(0,_.YY)(t.expression,y.zl.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,i){return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?(await this._expandPagedSet(e,this._maxQuery,0,0,i),this._refineSetBlock(e,t,i)):(this._checkCancelled(i),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,e)}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}async _getPhysicalPage(e,t,i){if(!0===e.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,i,[]);const r=await this._getAgregagtePhysicalPage(e,t,i);for(const e of r){const t={geometry:e.geometry,attributes:{}},i={};for(const t in e.attributes)i[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=i[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=i[e.field.toLowerCase()];if(null!=this._featureCache[t.attributes[this.objectIdField]])throw b.A.getLogger("esri.arcade.featureset.actions.GroupBy").error(`Duplicate object id returned: ${t.attributes[this.objectIdField]}`),new h.dr(h.D_.NeverReach);this._featureCache[t.attributes[this.objectIdField]]=new l.A(t)}return r.length}_sequentialGetPhysicalItem(e,t,i,r){return new Promise((s,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?s(r.length):this._nextAggregateItem(e,t,i,r,n=>{null===n?s(r.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,i,r)))},n)})}_nextAggregateItem(e,t,i,r,s,a){try{(0,n.a0)(e.pagesDefinition.internal.iterator.next()).then(n=>{if(null===n)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);r.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,s(null)}else e.pagesDefinition.internal.fullyResolved=!0,s(null);else{const l=this._generateAggregateHash(n);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[n],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const i=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return r.push(i),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(i.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[n],id:l},void s(i)}e.pagesDefinition.internal.workingItem.features.push(n)}this._nextAggregateItem(e,t,i,r,s,a)}},a)}catch(e){a(e)}}_calculateFieldStat(e,t,i){const r=[];for(const i of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(i);null!==e&&(e instanceof v.n||e instanceof A.k?r.push(e.toNumber()):e instanceof I.g?r.push(e.toMilliseconds()):r.push(e))}else r.push(null);i.attributes[t.tofieldname]=(0,S.s)(t.typeofstat,[r])}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.features[0].attributes[i.singlefield]:m.A.convertValueToStorageFormat(i.expression.calculateValue(e.features[0]),i.sqlType);t.attributes[i.tofieldname]=r}for(const i of this._decodedStatsfield)this._calculateFieldStat(e,i,t);const i=[];for(let r=0;r<this._decodedStatsfield.length;r++)i.push(this._calculateFieldStat(e,this._decodedStatsfield[r],t));if(null!=this._featureCache[t.attributes[this.objectIdField]])throw b.A.getLogger("esri.arcade.featureset.actions.GroupBy").error(`Duplicate object id returned: ${t.attributes[this.objectIdField]}`),new h.dr(h.D_.NeverReach);return this._featureCache[t.attributes[this.objectIdField]]=new l.A({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,F.d)(t,F.T.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){d.A._featuresetFunctions.groupby=function(e,t){return new R({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var k=i(54784),E=i(54461),L=i(70333),N=i(61454),M=i(66395),O=i(50145),P=i(4576),j=i(39516),G=i(65864),B=i(21325),q=i(13600),U=i(54546),Z=i(61956),V=i(7562);class W extends d.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,y.JB)(e.toJSON());return(0,F.d)(t,F.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=y.zl.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=y.zl.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=y.zl.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=y.zl.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}_isInFeatureSet(){return y.J6.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new Z.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const i="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let r=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);r=this.recentlyUsedQueries.getFromCache(t),null===r&&(r=i(e),this.recentlyUsedQueries.addToCache(t,r),r=r.catch(e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e}))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===r&&(r=i(e)),r}async _getFilteredSet(e,t,i,r,s){const n=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e)return new f.A([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=this._createQuery();o.where=(0,j.mA)(o.where,null===i?null===t?"1=1":"":(0,_.YY)(i,n)),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e);let u=await this.executeQuery(o,"executeForIds");return null===u&&(u=[]),this._checkCancelled(s),new f.A([],u,l,null)}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}async _getFilteredSetUsingPaging(e,t,i,r,s){let n="",a=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=r.constructClause(),a=!0);const l=await this.databaseType(),o=null===i?null===t?"1=1":"":(0,_.YY)(i,l);let u=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<u&&(u=c);let h=null;if(!0===this._pageJustIds)h=new f.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const r=this._overrideFields??this._fieldsIncludingObjectId(["*"]);h=new f.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(h,u,0,1,s),h}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,s=r,n=e.pagesDefinition.internal.lastPage,a=this._createQuery();a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields.split(","),a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.geometry=e.pagesDefinition.geometry,a.where=(0,j.mA)(a.where,e.pagesDefinition.where),a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==n)return"done";const o=this._layer.objectIdField;for(let t=0;t<l.features.length;t++)e.pagesDefinition.internal.set[s+t]=l.features[t].attributes[o];if(!1===this._pageJustIds)for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFeatures(e,t,i,r){const s=[];if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,r),this._getFeatures(e,t,i,r);let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[r]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[r]]){const s=t._featureMap[e._known[r]];null!==s&&(i=!0,this._featureCache[e._known[r]]=s)}}if(!1===i&&(e._known[r]!==t&&s.push(e._known[r]),s.length>=this._maxProcessingRate()-1))break}if(n>=i&&0===s.length)break}if(0===s.length)return"success";const a=this._createQuery();a.objectIds=s,a.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),a.returnGeometry=!0,!0===this._removeGeometry&&(a.returnGeometry=!1),a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(r),void 0!==l.error)throw new h.dr(h.D_.RequestFailed,{reason:l.error});const o=this._layer.objectIdField;for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return"success"}async _getDistinctPages(e,t,i,r,s,n,a,l,o){await this._ensureLoaded();const u=await this.databaseType();let c=i.parseTree.column;const d=this._layer.fields??[];for(let e=0;e<d.length;e++)if(d[e].name.toLowerCase()===c.toLowerCase()){c=d[e].name;break}const f=this._createQuery();f.where=(0,j.mA)(f.where,null===n?null===s?"1=1":"":(0,_.YY)(n,u)),f.spatialRelationship=this._makeRelationshipEnum(r),f.relationParameter=this._makeRelationshipParam(r),f.geometry=null===s?null:s,f.returnDistinctValues=!0,f.returnGeometry=!1,f.outFields=[c];const p=await this.executeQuery(f,"execute");if(this._checkCancelled(o),!p.hasOwnProperty("features"))throw new h.dr(h.D_.InvalidStatResponse);let y=!1;for(let e=0;e<d.length;e++)if(d[e].name===c){"date"===d[e].type&&(y=!0);break}for(let e=0;e<p.features.length;e++){if(y){const t=p.features[e].attributes[c];null!==t?l.push(new Date(t)):l.push(t)}else l.push(p.features[e].attributes[c]);if(l.length>=a)break}return 0===p.features.length?l:p.features.length===this._layer.capabilities?.query.maxRecordCount&&l.length<a?{calculated:!0,result:await this._getDistinctPages(e+p.features.length,t,i,r,s,n,a,l,o)}:l}async _distinctStat(e,t,i,r,s,n,a){return{calculated:!0,result:await this._getDistinctPages(0,e,t,i,r,s,n,[],a)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,i,r){const s=await this.databaseType();if(this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};const n=this._createQuery();return n.where=(0,j.mA)(n.where,null===r?null===i?"1=1":"":(0,_.YY)(r,s)),n.spatialRelationship=this._makeRelationshipEnum(t),n.relationParameter=this._makeRelationshipParam(t),n.geometry=null===i?null:i,n.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(n,"executeForCount")}}async _stats(e,t,i,r,s,n,a){await this._ensureLoaded();const l=this._layer.capabilities?.query,o=!!l?.supportsSqlExpression,u=!!l?.supportsStatistics,c=!!l?.supportsDistinct;if("count"===e)return c?this._countstat(e,i,r,s):{calculated:!1};if(!1===u||!1===(0,_.DA)(t)&&!1===o||!1===t.isStandardized)return""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a);if("distinct"===e)return!1===c?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,i,r,s,n,a);const d=await this.databaseType();if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const f=this._createQuery();f.where=(0,j.mA)(f.where,null===s?null===r?"1=1":"":(0,_.YY)(s,d)),f.spatialRelationship=this._makeRelationshipEnum(i),f.relationParameter=this._makeRelationshipParam(i),f.geometry=null===r?null:r;const p=new V.A;p.statisticType=(0,O.Dp)(e),p.onStatisticField=(0,_.YY)(t,d),p.outStatisticFieldName="ARCADE_STAT_RESULT",f.returnGeometry=!1;let y="ARCADE_STAT_RESULT";f.outStatistics=[p];const g=await this.executeQuery(f,"execute");if(!g.hasOwnProperty("features")||0===g.features.length)throw new h.dr(h.D_.InvalidStatResponse);let m=!1;const w=g.fields??[];for(let e=0;e<w.length;e++)if("ARCADE_STAT_RESULT"===w[e].name.toUpperCase()){y=w[e].name,"date"===w[e].type&&(m=!0);break}if(m){let e=g.features[0].attributes[y];return null!==e&&(e=new Date(g.features[0].attributes[y])),{calculated:!0,result:e}}return{calculated:!0,result:g.features[0].attributes[y]}}_stat(e,t,i,r,s,n,a){return this._stats(e,t,i,r,s,n,a)}async _canDoAggregates(e,t){await this._ensureLoaded();let i=!1;const r=this._layer.capabilities?.query,s=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(i=!0),i)for(let e=0;e<t.length-1;e++)(!1===t[e].workingexpr?.isStandardized||!1===(0,_.DA)(t[e].workingexpr)&&!1===s)&&(i=!1);return!1!==i}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,a){await this._ensureLoaded();const l=await this.databaseType();let o=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const t=this.getFieldsIndex();o={keyFields:e.map((e,i)=>({name:t.normalizeFieldName(e)??e,asc:null==n||1===n._directions[i]}))}}let u="",c=!1;null!=n&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==o||(0,P.MJ)(e,0,e.length,n._fields,0,Math.min(n._fields.length,e.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(u=n.constructClause(),c=!0),""===u&&(u=e.join(","));const h=[];for(let e=0;e<t.length;e++){const i=new V.A;i.onStatisticField=null!==t[e].workingexpr?(0,_.YY)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),h.push(i)}let d=this._maxQueryRate();const p=this._layer.capabilities?.query.maxRecordCount;null!=p&&p<d&&(d=p);const y=null===s?null===r?"1=1":"":(0,_.YY)(s,l);return new f.A([],["GETPAGES"],c,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:!1,generatedOid:a,resultRecordCount:d,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:h,geometry:null===r?null:r,where:y,orderByFields:u,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1,keysetPagination:o}})}async _getAgregagtePhysicalPage(e,t,i){let r=e.pagesDefinition.where;if(!0===e.pagesDefinition.useOIDpagination&&(r=(0,j.mA)(r,e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString())),null!=e.pagesDefinition.internal.keysetPagination?.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new h.dr(h.D_.NotImplemented);r=(0,j.mA)(r,(0,_.YY)(e.pagesDefinition.internal.keysetPagination.clause,await this.databaseType()))}const s=e.pagesDefinition.internal.lastRetrieved,n=s,a=e.pagesDefinition.internal.lastPage,o=this._createQuery();if(o.where=(0,j.mA)(o.where,r),o.spatialRelationship=e.pagesDefinition.spatialRel,o.relationParameter=e.pagesDefinition.relationParam,o.outFields=e.pagesDefinition.outFields,o.outStatistics=e.pagesDefinition.outStatistics,o.geometry=e.pagesDefinition.geometry,o.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,o.num=e.pagesDefinition.resultRecordCount,o.start=e.pagesDefinition.internal.lastPage,o.returnGeometry=e.pagesDefinition.returnGeometry,o.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(i),!u.hasOwnProperty("features"))throw new h.dr(h.D_.InvalidStatResponse);const c=[];if(e.pagesDefinition.internal.lastPage!==a)return[];u.features.length>0&&void 0===u.features[0].attributes[e.pagesDefinition.generatedOid]&&(e.pagesDefinition.generatedOid=e.pagesDefinition.generatedOid.toLowerCase());for(let t=0;t<u.features.length;t++)e.pagesDefinition.internal.set[n+t]=u.features[t].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<u.features.length;e++)c.push(new l.A({attributes:u.features[e].attributes,geometry:null}));return e.pagesDefinition.internal.keysetPagination?0!==u.features.length&&u.exceededTransferLimit?function(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new h.dr(h.D_.NeverReach);const t=[];for(let i=0;i<e.length;i++){const r=e[i],s=[`"${r.name.replaceAll('"','""')}" ${r.asc?">":"<"} @last_${i}`];for(let t=0;t<i;t++){const i=e[t];s.push(`"${i.name.replaceAll('"','""')}" = @last_${t}`)}t.push(s.join(" AND "))}const i=t.join(" OR ");return m.A.create(i)}(e.keyFields));for(let i=0;i<e.keyFields.length;i++){const r=e.keyFields[i].name;e.clause.parameters[`last_${i}`]=t.attributes[r]}}(e.pagesDefinition.internal.keysetPagination,c.at(-1)):e.pagesDefinition.internal.fullyResolved=!0:!0===e.pagesDefinition.useOIDpagination?0===u.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==e.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=s+u.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,c}static create(e,t,i,r,s){const n=new q.default({url:e,outFields:null===t?["*"]:t});return new W({layer:n,spatialReference:i,lrucache:r,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,y.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,i,r,s){const n=this._layer;if(function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(n)){const a={objectIds:[e],returnMetadata:s};(t&&t>0||i&&i>0)&&(a.size=[t&&t>0?t:0,i&&i>0?i:t+1]),r&&r.length>0&&(a.attachmentTypes=r),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:n,query:a,method:"attachments"});const l=await n.queryAttachments(new U.A(a)),o=[];return l&&l[e]&&l[e].forEach(t=>{const i=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let r=null;s&&t.exifInfo&&(r=M.A.convertJsonToArcade(t.exifInfo,"system",!0)),o.push(new N.A(t.id,t.name,t.contentType,t.size,i,r,t.keywords??null))}),o}return[]}async queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields?.join(","),returnGeometry:e.returnGeometry.toString()};void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds&&e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=(0,B.YX)(e.outSpatialReference)),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const i=await(0,r.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(i.data){const e={},t=i.data;if(t?.relatedRecordGroups){const i=t.spatialReference;for(const r of t.relatedRecordGroups){const s=r.objectId,n=[];for(const e of r.relatedRecords){e.geometry&&(e.geometry.spatialReference=i);const t=new l.A({geometry:e.geometry?(0,G.rS)(e.geometry):null,attributes:e.attributes});n.push(t)}e[s]={features:n,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new h.dr(h.D_.InvalidRequest)}async getFeatureByObjectId(e,t){const i=this._createQuery();i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=(0,j.mA)(i.where,this.objectIdField+"="+e.toString()),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const r=await this._layer.queryFeatures(i);return 1===r.features.length?r.features[0]:null}async getIdentityUser(){await this.load();const e=L.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=L.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const i=t.toLowerCase().indexOf("/rest/services");if(t=i>-1?t.slice(0,i):t,t){t+="/rest/info";try{const e=await(0,r.A)(t,{query:{f:"json"}});let i="";return e.data?.owningSystemUrl&&(i=e.data.owningSystemUrl),i}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new W({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this.fsetInfo)return this.fsetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const i=this._layer.parsedUrl?.path??null;if(i){const s=await(0,r.A)(i,{responseType:"json",query:{f:"json"}});e=s?.data?.name??null,t=s?.data?.serviceItemId??null}const s=this._layer.title&&null!==(this._layer.parent??null);return this.featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===i?null:i,webMapLayerId:s?this._layer.id??null:null,webMapLayerTitle:s?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}var J=i(30235),z=i(26591);class Q extends d.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}_isInFeatureSet(){return y.J6.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new l.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,s){if(await this.databaseType(),this.isTable()&&t&&null!==e&&""!==e)return new f.A([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new f.A([],[],!0,null);if(n.capabilities?.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&!0===n.capabilities?.queryRelated.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new z.default;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let c=!0;!0===this._removeGeometry&&(c=!1),o.returnGeometry=c,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null;const h=await n.source.queryRelatedFeatures(o);this._checkCancelled(s);const d=h[this._findObjectId]?h[this._findObjectId].features:[],p=[];for(let e=0;e<d.length;e++)this._featureCache[d[e].attributes[this._relatedLayer.objectIdField]]=d[e],p.push(d[e].attributes[this._relatedLayer.objectIdField]);const y=t&&null!==e&&""!==e,_=null!=i;return new f.A(y||_?p:[],y||_?[]:p,l,null)}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFilteredSetUsingPaging(e,t,i,r,s){let n="",a=!1;const l=this._layer.nativeCapabilities();null!==r&&!0===l.capabilities?.queryRelated.supportsOrderBy&&(n=r.constructClause(),a=!0),await this.databaseType();let o=this._maxQueryRate();const u=l.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const c=t&&null!==e&&""!==e,h=null!=i;let d=null,p=!0;!0===this._removeGeometry&&(p=!1);const y=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]);return d=new f.A(c||h?["GETPAGES"]:[],c||h?[]:["GETPAGES"],a,{outFields:y.join(","),resultRecordCount:o,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(d,o,0,0,s),d}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,s=r,n=e.pagesDefinition.internal.lastPage,a=this._layer.nativeCapabilities(),l=new z.default;!0===this._requestStandardised&&(l.sqlFormat="standard"),l.relationshipId=this.relationship.id,l.objectIds=e.pagesDefinition.objectIds,l.resultOffset=e.pagesDefinition.internal.lastPage,l.resultRecordCount=e.pagesDefinition.resultRecordCount,l.outFields=e.pagesDefinition.outFields.split(","),l.where=e.pagesDefinition.where,l.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,l.returnGeometry=e.pagesDefinition.returnGeometry,l.outSpatialReference=this.spatialReference;const o=await a.source.queryRelatedFeatures(l);if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==n)return 0;const u=o[this._findObjectId]?o[this._findObjectId].features:[];for(let t=0;t<u.length;t++)e.pagesDefinition.internal.set[s+t]=u[t].attributes[this._relatedLayer.objectIdField];for(let e=0;e<u.length;e++)this._featureCache[u[e].attributes[this._relatedLayer.objectIdField]]=u[e];const c=!o[this._findObjectId]||!1===o[this._findObjectId].exceededTransferLimit;return u.length!==e.pagesDefinition.resultRecordCount&&c&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+u.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,u.length}async _getFeatures(e,t,i,r){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return await this._expandPagedSet(e,n,0,0,r),this._getFeatures(e,t,i,r);let a=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(a++,a<=i&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[r]&&void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>i)))&&!(a>=i&&0===s.length);r++);if(0===s.length)return"success";throw new h.dr(h.D_.MissingFeatures)}async _refineSetBlock(e,t,i){return e}async _stat(e,t,i,r,s,n,a){return{calculated:!1}}get gdbVersion(){return this._relatedLayer.gdbVersion}async _canDoAggregates(e,t,i,r,s){return!1}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,i,r,s){return this._relatedLayer.queryAttachments(e,t,i,r,s)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}async getFeatureSetInfo(){return this.fsetInfo??this._layer.featureSetInfo}}var $=i(23732),Y=i(92474),K=i(4146),H=i(80812);function X(){null===$.A.applicationCache&&($.A.applicationCache=new $.A)}async function ee(e,t,i){if($.A.applicationCache){const i=$.A.applicationCache.getLayerInfo(e);if(i){const r=await i;return new q.default({url:e,outFields:t,sourceJSON:r})}const r=new q.default({url:e,outFields:t}),s=(async()=>(await r.load(),r.sourceJSON))();if($.A.applicationCache){$.A.applicationCache.setLayerInfo(e,s);try{return await s,r}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}return await s,r}if(null!=i){const r=i.getCachedLayerMetadata(e);if(r){const i=await r;return new q.default({url:e,outFields:t,sourceJSON:i})}const s=new q.default({url:e,outFields:t}),n=(async()=>(await s.load(),s.sourceJSON))();i.setCachedLayerMetadata(e,n);try{return await n,s}catch(t){throw i.removeCachedLayerMetadata(e,n),t}}return new q.default({url:e,outFields:t})}async function te(e,t,i,r,s,n=null){return ie(await ee(e,["*"],s),t,i,r,s,n)}function ie(e,t=null,i=null,r=!0,s=null,n=null){switch(e.type){case"catalog-footprint":return ie(e.parent,t,i,r,s,n);case"subtype-sublayer":{const a=ie(e.parent,t,i,r,s,n);return a.filter(m.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:a.dateFieldsTimeZoneDefaultUTC}))}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new J.A({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:n});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const a={layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:n};return!e.url&&e.source?new J.A(a):new W(a)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function re(e,t){if(null!==$.A.applicationCache){const t=$.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const i=t.getCachedServiceMetadata(e);if(null!=i)return i}const i=(async()=>{const t=await(0,r.A)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(e,i);try{return await i}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,i);try{return await i}catch(r){throw t.removeCachedServiceMetadata(e,i),r}}return i}async function se(e,t,i){const s={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},n=await re(e,null);if(s.metadata=n,void 0!==n.controllerDatasetLayers?.utilityNetworkLayerId&&null!==n.controllerDatasetLayers.utilityNetworkLayerId){if(n.layers)for(const e of n.layers)s.layerNameLkp[e.id]=e.name;if(n.tables)for(const e of n.tables)s.layerNameLkp[e.id]=e.name;const a=n.controllerDatasetLayers.utilityNetworkLayerId;s.networkId=a;const l=await async function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==$.A.applicationCache){const e=$.A.applicationCache.getLayerInfo(i);if(null!==e)return e}const s=(async()=>{const i=await(0,r.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(i.data){const e=i.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new h.dr(h.D_.DataElementsNotFound)})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(i,s);try{return await s}catch(e){throw $.A.applicationCache.clearLayerInfo(i),e}}return s}(e,a);if(l){s.queryelem=l,s.queryelem?.dataElement&&void 0!==s.queryelem.dataElement.schemaGeneration&&(s.unVersion=s.queryelem.dataElement.schemaGeneration),s.lkp={},s.queryelem.dataElement.domainNetworks||(s.queryelem.dataElement.domainNetworks=[]);for(const e of s.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:s.layerNameLkp[t.layerId]??null};s.layerIdLookup.set(e.layerId,e),s.sourceIdLookup.set(e.sourceId,e),e.className&&(s.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:s.layerNameLkp[t.layerId]??null};s.layerIdLookup.set(e.layerId,e),s.sourceIdLookup.set(e.sourceId,e),e.className&&(s.lkp[e.className]=e)}}if(s.queryelem.dataElement.terminalConfigurations)for(const e of s.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)s.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const n=await async function(e){if(null!==$.A.applicationCache){const t=$.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,r.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+a);if(void 0!==n.systemLayers?.associationsTableId&&null!==n.systemLayers.associationsTableId){let r=null;if(i&&s.unVersion<8){const i=[];s.unVersion>=4&&(i.push("STATUS"),i.push("PERCENTALONG")),r=await te(e+"/"+n.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...i],!1,null,null),await r.load(),s.unVersion>=4&&(r=r.filter(m.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC})),await r.load())}return{lkp:s.lkp,associations:r,unVersion:s.unVersion,terminals:s.terminals,layerIdLookup:s.layerIdLookup,sourceIdLookup:s.sourceIdLookup}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function ne(e,t,i,r=null,s=null,n=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await te(o,r,s,n,a,l);return new Q({layer:e,relatedLayer:u,relationship:t,objectId:i,spatialReference:r,outFields:s,includeGeometry:n,lrucache:a,interceptor:l})}a.A.registerAction(),R.registerAction(),c.A.registerAction(),k.A.registerAction(),E.A.registerAction();class ae extends s{constructor(e,t=null,i=null,r=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=i,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const r=ie(e,this._overrideSpatialReference,null===i?["*"]:i,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async featureSetByName(e,t=!0,i=null){if(Y.A.isLoadable(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,i);null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=s)return this._makeAndAddFeatureSet(s,t,i);if(this._map.allTables){const r=this._map.allTables.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){if(Y.A.isLoadable(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,i);null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.id===e);if(s)return this._makeAndAddFeatureSet(s,t,i);if(this._map.allTables){const r=this._map.allTables.find(t=>(0,y.eB)(t)&&t.id===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,i)}return null}}class le extends s{constructor(e,t=null,i=null,r=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=i,this._interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,i=null){const r=ie(e,this._overrideSpatialReference,null===i?["*"]:i,t,this._lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async _loadMetaData(){const e=await re(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new le(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,i=null){null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])t.name===e&&(n=t);if(!n)for(const t of s.tables??[])t.name===e&&(n=t);if(n){const e=await ee(this._url+"/"+n.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);e=null!=e?e.toString():"";for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(!n)for(const t of s.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(n){const e=await ee(this._url+"/"+n.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,i)}return null}}function oe(e,t,i=null,r=null){return new ae(e,t,i,r)}function ue(e,t,i=null,r=null){return new le(e,t,i,r)}function ce(e,t,i,r,s){if(null===e)return null;if((0,n.m)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof K.A&&(0,y.NI)(e)){const n=e;switch(t){case"datasource":return ie(n,s,"outFields"in n?n.outFields:null,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return ie(n,s,"outFields"in n?n.outFields:null,!0,i,r)}return null}if((0,n.$)(e)){switch(t){case"datasource":return ie(e.parent,s,e.parent.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return ie(e,s,e.parent.outFields,!0,i,r)}return null}return null}async function he(e,t,i,r,s,n,a,l=null){if($.A.applicationCache){const o=$.A.applicationCache.getLayerInfo(e+":"+n.url);if(o)return de(await o,t,i,r,s,a,l)}if(null!=a){const o=a.getCachedPortalItem(n.url,e);if(null!=o)return await de(await o,t,i,r,s,a,l)}const o=new H.default({id:e,portal:n}).load();$.A.applicationCache?$.A.applicationCache.setLayerInfo(e+":"+n.url,o):null!=a&&a.setCachedPortalItem(n.url,e,o);try{return await de(await o,t,i,r,s,a,l)}catch(t){throw $.A.applicationCache&&$.A.applicationCache.clearLayerInfo(e+":"+n.url),null!=a&&a.removeCachedPortalItem(n.url,e,o),t}}async function de(e,t,i,r,s,n,a){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await ee((0,y.Qi)(e.url??"")+"/"+t,["*"],n);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=n){const t=n.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=K.A.fromPortalItem(e);n.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(i){throw n.removeCachedPortalItemLayer(e.portal.url,e.id,t),i}}}else l=await K.A.fromPortalItem(e)}return ie(l,i,r,s,n,a)}},41366:(e,t,i)=>{i.d(t,{K:()=>d,Q:()=>u});var r=i(90237),s=i(66552),n=i(53966),a=i(10107),l=(i(44208),i(87811),i(93223)),o=i(40608);const u=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,r._)([(0,l.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,r._)([(0,o.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,i)=>{i.d(t,{Ch:()=>a,mW:()=>n});var r=i(34727),s=i(39516);function n(e,t){return{...t,filterMode:e.mode}}function a(e,t,i){const n=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:i,maxScale:r}of e.filters)t[0]=Math.max(t[0],c(i)),t[1]=Math.min(t[1],h(r));return t}(e);if(n&&((0,r.gg)(t,n[0])||(0,r.ZH)(i,n[1])))return"";const a=Array.from(l(e,t,i)),o=function(e,t,i){if(0===e.length)return!0;const s=c(e.at(0)?.minScale),n=h(e.at(-1)?.maxScale);if((0,r.ZH)(s,t)||(0,r.gg)(n,i))return!0;for(let t=0;t<e.length-1;t++){const i=e[t],s=e[t+1];if((0,r.ZH)(c(s.minScale),h(i.maxScale)))return!0}return!1}(a,t,i)?"1=1":a.map(e=>e.where||"1=1").reduce((e,t)=>(0,s.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,i){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const r of e.filters)o(r.minScale,r.maxScale,t,i)&&(yield r)}}function o(e,t,i,s){return e=c(e),i=c(i),t=h(t),!(!(0,r.Sp)(i,e)&&(s??i)>e||(0,r.Hx)(t,i)||void 0!==s&&(0,r.Sp)(s,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function h(e){return e||0}},46140:(e,t,i)=>{i.d(t,{R:()=>s});var r=i(49186);let s=class e{constructor(e,t,i=""){this.major=e,this.minor=t,this._context=i}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",i=this._context&&this._context+" ";throw new r.A(t+"unsupported-version",`Required major ${i}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,i=""){const[s,n]=t.split("."),a=/^\s*\d+\s*$/;if(!s?.match||!a.test(s))throw new r.A((i&&i+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!a.test(n))throw new r.A((i&&i+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(s,10),o=parseInt(n,10);return new e(l,o,i)}}},50498:(e,t,i)=>{i.d(t,{Ye:()=>h,gy:()=>c,yR:()=>d});var r=i(66552),s=i(5443),n=i(91075),a=i(48526),l=i(86738),o=i(39829),u=i(82799);const c=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),h=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:n.A,key:"type",typeMap:{extent:s.A,multipoint:a.A,point:l.A,polyline:u.A,polygon:o.A}}},52106:(e,t,i)=>{i.d(t,{A:()=>b});var r,s=i(90237),n=i(13874),a=i(69540),l=i(51447),o=i(25482),u=i(53966),c=i(36708),h=i(24326),d=i(10107),f=(i(44208),i(87811),i(40608)),p=i(12195),y=i(65864),_=i(50498),g=i(54339),m=i(33910);function w(e){if(null==e)return null;const t={};for(const i in e){const r=e[i];r&&(t[i]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let b=class extends(a.A.ClonableMixin(o.A)){static{r=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,h.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const i of[t,this.sourceLayer,this.layer])if(i){if("popupTemplate"in i&&i.popupTemplate)return i.popupTemplate;if(e&&"defaultPopupTemplate"in i&&null!=i.defaultPopupTemplate)return i.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,p.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(s.action=r),"attributes"===e&&(s.attributeName=r),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,s._)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const r=(0,y.rS)(e[i]);r&&(t[i]=r)}return 0!==Object.keys(t).length?t:null}}})],b.prototype,"aggregateGeometries",null),(0,s._)([(0,d.MZ)({value:null})],b.prototype,"attributes",null),(0,s._)([(0,d.MZ)({value:null,types:_.yR,json:{read:y.rS}})],b.prototype,"geometry",null),(0,s._)([(0,d.MZ)({type:Boolean})],b.prototype,"isAggregate",void 0),(0,s._)([(0,d.MZ)({clonable:!1})],b.prototype,"layer",void 0),(0,s._)([(0,d.MZ)({clonable:"reference"})],b.prototype,"origin",void 0),(0,s._)([(0,d.MZ)({type:n.A,value:null})],b.prototype,"popupTemplate",null),(0,s._)([(0,d.MZ)({clonable:"reference"})],b.prototype,"sourceLayer",void 0),(0,s._)([(0,d.MZ)({value:null,types:m.Es})],b.prototype,"symbol",null),(0,s._)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],b.prototype,"_version",void 0),(0,s._)([(0,d.MZ)({type:Boolean,value:!0})],b.prototype,"visible",null),b=r=(0,s._)([(0,f.$)("esri.Graphic")],b)},54461:(e,t,i)=>{i.d(t,{A:()=>l});var r=i(87449),s=i(11221),n=i(89169),a=i(33325);class l extends s.A{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getSet(e);return this._wset=new n.A(t._candidates.slice(),t._known.slice(),!1,this._clonePageDefinition(t.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset}return this._wset}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===a.J6.NotInFeatureSet)return t;const i=this._idstates[e];return i===a.J6.InFeatureSet||i===a.J6.NotInFeatureSet?i:t===a.J6.InFeatureSet&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=a.J6.InFeatureSet,this._countedin++,a.J6.InFeatureSet):(this._idstates[e]=a.J6.NotInFeatureSet,a.J6.NotInFeatureSet):a.J6.Unknown}async _expandPagedSet(e,t,i,s,n){if(null===this._parent)throw new r.dr(r.D_.NotImplemented);if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),"success"}const a=await this._parent._expandPagedSet(e,t,i,s,n);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),a}async _getFeatures(e,t,i,r){const s=[],a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return await this._expandPagedSet(e,a,0,0,r),this._getFeatures(e,t,i,r);-1!==t&&void 0===this._featureCache[t]&&s.push(t);let l=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(l++,l<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>a)));r++);if(0===s.length)return"success";const o=new n.A([],s,!1,null),u=Math.min(s.length,i);await this._parent._getFeatures(o,-1,u,r);for(let e=0;e<u;e++){const t=this._parent._featureFromCache(s[e]);void 0!==t&&(this._featureCache[s[e]]=t)}return"success"}async _getFilteredSet(e,t,i,r,s){await this._ensureLoaded();const a=await this._getSet(s);return new n.A(a._candidates.slice().concat(a._known.slice()),[],!1,this._clonePageDefinition(a.pagesDefinition))}_refineKnowns(e,t){let i=0,r=null;const s=[];for(let n=0;n<e._candidates.length;n++){const l=this._isInFeatureSet(e._candidates[n]);if(l===a.J6.InFeatureSet){if(e._known.push(e._candidates[n]),i+=1,null===r?r={start:n,end:n}:r.end===n-1?r.end=n:(s.push(r),r={start:n,end:n}),e._known.length>=this._topnum)break}else if(l===a.J6.NotInFeatureSet)null===r?r={start:n,end:n}:r.end===n-1?r.end=n:(s.push(r),r={start:n,end:n}),i+=1;else if(l===a.J6.Unknown)break;if(i>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}static registerAction(){s.A._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},55674:(e,t,i)=>{i.d(t,{Ad:()=>f,Gj:()=>_,QY:()=>d,lL:()=>g,xR:()=>p});var r=i(66131),s=i(49186),n=(i(44208),i(44729)),a=i(15032),l=i(65864),o=i(95466),u=i(43668),c=i(98623);const h=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const i of h)t.hasArcadeDependency(i)&&e.add(i);return e}function f(e,t){return y.create(e,t,null,["$feature","$view"])}function p(e,t,i){return y.create(e,t,i,["$feature","$view","$config"])}class y{static async create(e,t,i,r){const{arcade:n,Dictionary:a}=await(0,u.l)();let l;try{l=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const o=n.scriptUsesGeometryEngine(l);o&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,l,null,!1,o);const c={vars:r.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},h=n.compileScript(l,c);let d=null;null!=i&&(d=new a(i),d.immutable=!0);const f=new a;return f.immutable=!1,f.setField("scale",0),new y(e,n,l,h,t,f,d,a)}constructor(e,t,i,r,s,n,a,l){this.script=e,this._arcade=t,this._syntaxTree=i,this._compiled=r,this._spatialReference=s,this._viewDict=n,this._configDict=a,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new _,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const i=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=i?r.lY.epochToArcadeDate(s,i):r.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=i?r.lY.epochToArcadeDate(n,i):r.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:i})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class _{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,i){const r=t??new o.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=r.fields,this._boundSchema.fieldsIndex=r,this._boundSchema.spatialReference=i}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const i=this._getField(e);if(i){const t=this._boundTarget.attributes[i.name];if(null==t)return null;switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return r.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?r.lY.unknownEpochToArcadeDate(t):r.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const i in e)t.push({name:i,alias:i,type:"string"==typeof e[i]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,i)=>{i.d(t,{q:()=>s});var r=i(62815);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},59247:(e,t,i)=>{i.d(t,{bv:()=>o,Fk:()=>u,yG:()=>c,$b:()=>h,Nd:()=>d,jm:()=>f,sK:()=>_});var r=i(40876),s=i(90629);function n(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const a=n();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:n,fromValues:function(e,t,i,r,s,n,a,l,o,u,c,h,d,f,p,y){const _=new Float32Array(16);return _[0]=e,_[1]=t,_[2]=i,_[3]=r,_[4]=s,_[5]=n,_[6]=a,_[7]=l,_[8]=o,_[9]=u,_[10]=c,_[11]=h,_[12]=d,_[13]=f,_[14]=p,_[15]=y,_}},Symbol.toStringTag,{value:"Module"}));var l=i(58083);class o{constructor(e,t,i){this.strength=e,this.radius=t,this.threshold=i,this.type="bloom"}interpolate(e,t,i){this.strength=p(e.strength,t.strength,i),this.radius=p(e.radius,t.radius,i),this.threshold=p(e.threshold,t.threshold,i)}clone(){return new o(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:y(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,i){this.radius=Math.round(p(e.radius,t.radius,i))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:y(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,i){this.amount=p(e.amount,t.amount,i),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||n();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const i=(0,l.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,l.mg)(i,i)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const i=(0,l.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,l.mg)(i,i)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,i=(0,l.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,l.mg)(i,i)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const i=1-2*t,r=(0,l.hZ)(e,i,0,0,t,0,i,0,t,0,0,i,t,0,0,0,1);return(0,l.mg)(r,r)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const i=(0,l.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,l.mg)(i,i)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,i=(0,l.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,l.mg)(i,i)})(e)}}}class h{constructor(e,t,i,r){this.offsetX=e,this.offsetY=t,this.blurRadius=i,this.color=r,this.type="drop-shadow"}interpolate(e,t,i){this.offsetX=p(e.offsetX,t.offsetX,i),this.offsetY=p(e.offsetY,t.offsetY,i),this.blurRadius=p(e.blurRadius,t.blurRadius,i),this.color[0]=Math.round(p(e.color[0],t.color[0],i)),this.color[1]=Math.round(p(e.color[1],t.color[1],i)),this.color[2]=Math.round(p(e.color[2],t.color[2],i)),this.color[3]=p(e.color[3],t.color[3],i)}clone(){return new h(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:y(this.offsetX),yoffset:y(this.offsetY),blurRadius:y(this.blurRadius),color:e}}}class d{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,i){this.angle=p(e.angle,t.angle,i),this._updateMatrix()}clone(){return new d(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||n();this._colorMatrix=((e,t)=>{const i=Math.sin(t*Math.PI/180),r=Math.cos(t*Math.PI/180),s=(0,l.hZ)(e,.213+.787*r-.213*i,.715-.715*r-.715*i,.072-.072*r+.928*i,0,.213-.213*r+.143*i,.715+.285*r+.14*i,.072-.072*r-.283*i,0,.213-.213*r-.787*i,.715-.715*r+.715*i,.072+.928*r+.072*i,0,0,0,0,1);return(0,l.mg)(s,s)})(e,this.angle)}}class f{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,i){this.amount=p(e.amount,t.amount,i)}clone(){return new f(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function p(e,t,i){return e+(t-e)*i}function y(e){return Math.round(1e3*(0,s.PN)(e))/1e3}function _(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new f(1);case"hue-rotate":return new d(0);case"blur":return new u(0);case"drop-shadow":return new h(0,0,0,[...(0,r.TS)("transparent")]);case"bloom":return new o(0,0,1)}}},60999:(e,t,i)=>{i.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>c,UT:()=>y,jJ:()=>u});var r=i(90237),s=i(69622),n=i(97768),a=i(74887),l=i(10107),o=i(40608);function u(e,t,i){return(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function c(e,t,i){return(await(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function p(e){try{return h(await e)}catch(e){return(0,a.QP)(e),d(e)}}function y(e,t){return new _(e,t)}let _=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r._)([(0,l.MZ)()],_.prototype,"value",null),(0,r._)([(0,l.MZ)()],_.prototype,"error",null),(0,r._)([(0,l.MZ)()],_.prototype,"finished",null),(0,r._)([(0,l.MZ)()],_.prototype,"promise",void 0),(0,r._)([(0,l.MZ)()],_.prototype,"_result",void 0),_=(0,r._)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],_)},61760:(e,t,i)=>{i.d(t,{PU:()=>a,YW:()=>o,ex:()=>s,hv:()=>l,zp:()=>n}),i(34727);var r=i(90629);i(87317),i(91829);const s=2.4;function n(e){return(0,r.PN)(e*s)}function a(e){return(0,r.Lz)(e)/s}function l(e,t,i){const r=Math.sqrt(e**2+t**2)/i;return r>1?0:3/(Math.PI*i**2)*(1-r**2)**2}function o(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},65529:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(90237),s=i(69622),n=i(36563),a=i(40608);class l{constructor(){this._emitter=new l.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){let i=this._listenersMap?.get(e);if(!i)return!1;const r=this._target||this;let s=!1;for(const e of i.slice()){const i="deref"in e?e.deref():e;i?i?.call(r,t):s=!0}return s&&(i=i.filter(e=>!("deref"in e)||null!=e.deref()),this._listenersMap.set(e,i)),i.length>0}on(e,t){if(Array.isArray(e)){const i=e.map(e=>this.on(e,t));return(0,n.vE)(i)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??=new Map;const i=this._listenersMap.get(e)||[];return i.push(t),this._listenersMap.set(e,i),(0,n.hA)(()=>{const i=this._listenersMap?.get(e),r=i?.indexOf(t)??-1;r>=0&&i.splice(r,1)})}once(e,t){const i=this.on(e,e=>{i.remove();const r="deref"in t?t.deref():t;r?.call(null,e)});return i}hasEventListener(e){const t=this._listenersMap?.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let i=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return i=(0,r._)([(0,a.$)("esri.core.Evented")],i),i};let i=class extends s.A{constructor(){super(...arguments),this._emitter=new l.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};i=(0,r._)([(0,a.$)("esri.core.Evented.EventedAccessor")],i),e.EventedAccessor=i}(l||(l={}));const o=l},68423:(e,t,i)=>{i.d(t,{Gr:()=>m,IO:()=>y,a:()=>w,bV:()=>g,p8:()=>_});var r=i(52106),s=i(78502),n=i(87449),a=i(11221),l=i(89169),o=i(33325),u=i(80609),c=i(97768),h=i(1262),d=i(88368),f=i(16930);class p{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class y extends p{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class _ extends p{constructor(e,t,i){super((0,o.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=i}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,u.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class g extends p{constructor(e,t,i){super(e),this.codefield=t,this.lkp=i,this.reverseLkp={};for(const e in i)this.reverseLkp[i[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const i=this.evaluateNodeToWhereClause(e.parseTree,o.zl.Standardised,this.field.name,this.codefield instanceof d.A?(0,u.YY)(this.codefield,o.zl.Standardised):this.codefield,e.parameters);return i.includes(g.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:d.A.create(i,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,i=null,r=null,s){let n,a,l,c;switch(e.type){case"interval":return(0,u.oj)(this.evaluateNodeToWhereClause(e.value,t,i,r,s),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,i,g.BADNESS,s));for(let n=0;n<e.clauses.length;n++)r+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[n].operand,t,i,g.BADNESS,s)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[n].value,t,i,g.BADNESS,s);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,i,g.BADNESS,s)),r+=" END ",r}case"parameter":{const i=s[e.value.toLowerCase()];if("string"==typeof i)return"'"+i.toString().replaceAll("'","''")+"'";if((0,o.$P)(i))return(0,u.bm)(i,t);if((0,o.Lk)(i))return(0,u.bm)(i,t);if((0,o.eg)(i))return(0,u.F1)(i,t);if((0,o.rX)(i))return(0,u.R8)(i,t);if((0,o.f0)(i))return(0,u.Nf)(i,t);if(Array.isArray(i)){const e=[];for(let r=0;r<i.length;r++)"string"==typeof i[r]?e.push("'"+i[r].toString().replaceAll("'","''")+"'"):(0,o.$P)(i[r])||(0,o.Lk)(i[r])?e.push((0,u.bm)(i[r],t)):(0,o.eg)(i[r])?e.push((0,u.F1)(i[r],t)):(0,o.rX)(i[r])?e.push((0,u.R8)(i[r],t)):(0,o.f0)(i[r])?e.push((0,u.Nf)(i[r],t)):e.push(i[r].toString());return e}return i.toString()}case"expression-list":a=[];for(const n of e.value)a.push(this.evaluateNodeToWhereClause(n,t,i,r,s));return a;case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,i,g.BADNESS,s)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" AND "+this.evaluateNodeToWhereClause(e.right,t,i,r,s)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" OR "+this.evaluateNodeToWhereClause(e.right,t,i,r,s)+") ";case"IS":if("null"!==e.right.type)throw new h.L8(h.Z7.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new h.L8(h.Z7.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IS NOT NULL )";case"IN":if(n=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+n.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,s),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+c+")) ";case"NOT IN":if(n=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+n.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,s),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+c+")) ";case"BETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") "}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,u.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+r+")":(0,u.Kb)(e.column);case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,i,g.BADNESS,s);return(0,u.F6)(e.name,r,t)}}throw new h.L8(h.Z7.UnsupportedSyntax,{node:e.type})}extractValue(e){if(this.codefield instanceof d.A){const t=this.codefield.calculateValueCompiled(e);return this.reverseLkp[d.A.convertValueToStorageFormat(t)]}return this.reverseLkp[e.attributes[this.codefield]]}}class m extends p{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,u.bD)(e,this.field.name,(0,u.YY)(this._sql,o.zl.Standardised),t.getFieldsIndex())}}extractValue(e){return d.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class w extends a.A{static findField(e,t){for(const i of e)if(i.name.toLowerCase()===t.toString().toLowerCase())return i;return null}constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=[],this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}_initialiseFeatureSet(){null!==this._parent?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new f.A({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=o.ik.point,this.typeIdField="",this.types=null,this.subtypeField=null,this.subtypes=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();let t=null;return t=this._extraFilter?await this._getFilteredSet("",null,null,null,e):await(this._parent?._getSet(e)),this._checkCancelled(e),(0,c.Lw)(t),this._wset=new l.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}async _getFeatures(e,t,i,n){const a=[];-1!==t&&void 0===this._featureCache[t]&&a.push(t);const o=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,o))return await this._expandPagedSet(e,o,0,0,n),this._getFeatures(e,t,i,n);let u=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(u++,u<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&a.push(e._known[r]),a.length>=o)));r++);if(0===a.length)return"success";e=new l.A([],a,e._ordered,null);const c=Math.min(a.length,i);await(this._parent?._getFeatures(e,-1,c,n)),this._checkCancelled(n);const h=[];for(let e=0;e<c;e++){const t=this._parent?._featureFromCache(a[e]);void 0!==t&&h.push({geometry:t.geometry,attributes:t.attributes,id:a[e]})}for(const e of h){const t=[];for(const i of this.adaptedFields)t[i.field.name]=i.extractValue(e);this._featureCache[e.id]=new r.A({attributes:t,geometry:(0,s.Yq)(e.geometry)})}return"success"}async _fetchAndRefineFeatures(){throw new n.dr(n.D_.NeverReach)}async _getFilteredSet(e,t,i,r,s){let n=!1;const a=this._reformulateWithoutAdaptions(i);n=a.cannot,i=a.where;let o=!1;if(null!==r){o=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof y)&&!0===r.scanForField(t.field.name)){if(!(t instanceof _)){r=null,o=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}r&&e.length>0&&(r=r.replaceFields(e))}null!==i?null!==this._extraFilter&&(i=(0,u.kg)(this._extraFilter,i)):i=this._extraFilter,await this._ensureLoaded();const c=await this._parent._getFilteredSet(e,t,i,r,s);let h;return this._checkCancelled(s),h=!0===n?new l.A(c._candidates.slice().concat(c._known.slice()),[],!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)):new l.A(c._candidates.slice(),c._known.slice(),!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)),h}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const i of this.adaptedFields)if(!0===(0,u.Ju)(e,i.field.name)){const r=i.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}async _stat(e,t,i,r,s,n,a){let l=!1,o=this._reformulateWithoutAdaptions(t);if(l=o.cannot,t=o.where,o=this._reformulateWithoutAdaptions(s),l=l||o.cannot,null!==(s=o.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,!0===l)return null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1};const c=await this._parent._stat(e,t,i,r,s,n,a);return!1===c.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1}:c}async _canDoAggregates(e,t,i,r,s){if(null===this._parent)return!1;for(let t=0;t<e.length;t++)for(const i of this.adaptedFields)if(e[t].toLowerCase()===i.field.name.toLowerCase()&&!(i instanceof y))return!1;const n=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return!1;const t=i.clone();t.workingexpr=e.where,n.push(t)}else n.push(i)}const a=this._reformulateWithoutAdaptions(s);return!a.cannot&&(null!==(s=a.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,n,i,r,s))}async _getAggregatePagesDataSourceDefinition(e,t,i,r,s,a,l){if(null===this._parent)throw new n.dr(n.D_.NeverReach);const o=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)throw new n.dr(n.D_.NeverReach);const t=i.clone();t.workingexpr=e.where,o.push(t)}else o.push(i)}const c=this._reformulateWithoutAdaptions(s);if(c.cannot)throw new n.dr(n.D_.NeverReach);return null!==(s=c.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,o,i,r,s,a,l)}}},73681:(e,t,i)=>{i.d(t,{n:()=>o});var r=i(49186),s=i(53966),n=i(46140),a=i(95466),l=i(55674);class o{static async from(e,t,i){const a=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),h={};if(t)for(const e in t)h[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)h.hasOwnProperty(t.name)||(h[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(i))d.delete(e);d.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const f=await(0,l.xR)(e.expression,null,h);if(!f)throw new r.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const p=!a||!a.greaterEqual(4,0);p&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});const y=new u(i,p);return new o(p,c,f,y)}constructor(e,t,i,r){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=i,this._reader=r}get itemNames(){return this._itemNames}evaluate(e,t,i,r){try{return this._reader.bind(e,i,r),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,i)=>{i.d(t,{Gh:()=>y,tk:()=>h,BR:()=>c,wI:()=>u,G$:()=>f,$x:()=>d,Ov:()=>l,W_:()=>o,OP:()=>p,TU:()=>a,XX:()=>n});var r=i(70333),s=i(78888);i(5503),i(84952),i(36563),i(36708),new WeakMap;const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const i=r.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const a=`${e.slice(0,n)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,s.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function h(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function d(e,t){return null}function f(e){return null}function p(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function y(e,t){if(!t||!p(e))return;const i=(e.url,null);i&&(e.url=i)}},86691:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(78878),s=i(87449),n=i(11221),a=i(89169),l=i(87594);class o extends n.A{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,this._orderbyclause,e);return this._checkCancelled(e),this._wset=t,this._wset}return this._wset}async manualOrderSet(e,t){const i=await this.getIdColumnDictionary(e,[],-1,t);this._orderbyclause?.order(i);const r=new a.A([],[],!0,null);for(let e=0;e<i.length;e++)r._known.push(i[e].id);return r}async getIdColumnDictionary(e,t,i,s){if(i<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return await(0,r.a0)(this._parent._expandPagedSet(e,n,0,0,s)),this.getIdColumnDictionary(e,t,i,s);let a=i+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;i+=l.length;const o=await(0,r.a0)(this._parent._getFeatureBatch(l,s));this._checkCancelled(s);for(const e of o)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,i,s)}return e._candidates.length>0?(await(0,r.a0)(this._refineSetBlock(e,this._maxProcessingRate(),s)),this._checkCancelled(s),this.getIdColumnDictionary(e,t,i,s)):t}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}async _fetchAndRefineFeatures(){throw new s.dr(s.D_.NeverReach)}async _getFilteredSet(e,t,i,r,s){await this._ensureLoaded();const n=await this._parent._getFilteredSet(e,t,i,null===r?this._orderbyclause:r,s);this._checkCancelled(s);const l=new a.A(n._candidates.slice(),n._known.slice(),n._ordered,this._clonePageDefinition(n.pagesDefinition));let o=!0;if(n._candidates.length>0&&(o=!1),!1===l._ordered){let e=await this.manualOrderSet(l,s);return!1===o&&(null===t&&null===i||(e=new a.A(e._candidates.slice().concat(e._known.slice()),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e}return l}static registerAction(){n.A._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new l.A(e)})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},87594:(e,t,i)=>{function r(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}i.d(t,{A:()=>s});class s{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const i=t[e].match(/\S+/g);this._fields.push(i[0]),2===i.length?"asc"===i[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort((e,t)=>{for(let i=0;i<this._fields.length;i++){const s=this.featureValue(e.feature,this._fields[i],i),n=this.featureValue(t.feature,this._fields[i],i);let a=0;if(a=1===this._directions[i]?r(s,n):-1*r(s,n),0!==a)return a}return 0})}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let i=0;i<this._fields.length;i++){0!==i&&(t+=",");let r=this._fields[i];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[i]?t+=" ASC":t+=" DESC"}return new s(t)}featureValue(e,t,i){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[i]=r,e.attributes[r];return null}}},91880:(e,t,i)=>{i.d(t,{A:()=>c});var r,s=i(90237),n=i(66552),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(40608));const u=new n.J({asc:"ascending",desc:"descending"});let c=class extends a.A{static{r=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,s._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,s._)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=r=(0,s._)([(0,o.$)("esri.layers.support.OrderByInfo")],c)},92935:(e,t,i)=>{var r;i.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7937],{4341:(t,n,r)=>{r.d(n,{I:()=>o});var e=r(26390);class o{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,e.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},9093:(t,n,r)=>{function e(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}r.d(n,{o8:()=>o,vt:()=>e,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:e,fromValues:function(t,n,r,e,o,i,u,c,a,s,f,h,M,l,m,d){return[t,n,r,e,o,i,u,c,a,s,f,h,M,l,m,d]}},Symbol.toStringTag,{value:"Module"}))},29242:(t,n,r)=>{function e(){return[1,0,0,0,1,0,0,0,1]}function o(t,n,r,e,o,i,u,c,a){return[t,n,r,e,o,i,u,c,a]}r.d(n,{fA:()=>o,vt:()=>e,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,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:o},Symbol.toStringTag,{value:"Module"}))},32114:(t,n,r)=>{r.d(n,{Rc:()=>l,J8:()=>m,rq:()=>h,Km:()=>M}),r(44208);var e=r(26390),o=r(29242),i=r(9093),u=r(82534),c=r(48163),a=r(51850),s=r(91829);class f{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,e.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new f(c.vt)}static createVec3f64(){return new f(a.vt)}static createVec4f64(){return new f(s.vt)}static createMat3f64(){return new f(o.vt)}static createMat4f64(){return new f(i.vt)}static createQuatf64(){return new f(u.vt)}get test(){}}f.createVec2f64();const h=f.createVec3f64(),M=f.createVec4f64(),l=(f.createMat3f64(),f.createMat4f64()),m=f.createQuatf64()},38954:(t,n,r)=>{r.d(n,{A:()=>m,B:()=>l,C:()=>f,D:()=>h,E:()=>I,F:()=>D,H:()=>k,a:()=>V,b:()=>b,c:()=>u,d:()=>s,e:()=>P,f:()=>a,g:()=>g,h:()=>S,i:()=>c,j:()=>_,k:()=>p,l:()=>i,m:()=>j,n:()=>x,o:()=>T,q:()=>C,r:()=>y,s:()=>v,t:()=>O,u:()=>q,v:()=>w,w:()=>M,x:()=>N,y:()=>F,z:()=>d});var e=r(51850),o=r(34304);function i(t){const n=t[0],r=t[1],e=t[2];return Math.sqrt(n*n+r*r+e*e)}function u(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function c(t,n,r,e){return t[0]=n,t[1]=r,t[2]=e,t}function a(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t}function s(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}function f(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t}function h(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}function M(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function l(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function m(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t}function d(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t}function g(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}function b(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}function _(t,n){const r=n[0]-t[0],e=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+e*e+o*o)}function v(t,n){const r=n[0]-t[0],e=n[1]-t[1],o=n[2]-t[2];return r*r+e*e+o*o}function p(t){const n=t[0],r=t[1],e=t[2];return n*n+r*r+e*e}function q(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function y(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function x(t,n){const r=n[0],e=n[1],o=n[2];let i=r*r+e*e+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function S(t,n,r){const e=n[0],o=n[1],i=n[2],u=r[0],c=r[1],a=r[2];return t[0]=o*a-i*c,t[1]=i*u-e*a,t[2]=e*c-o*u,t}function j(t,n,r,e){const o=n[0],i=n[1],u=n[2];return t[0]=o+e*(r[0]-o),t[1]=i+e*(r[1]-i),t[2]=u+e*(r[2]-u),t}function O(t,n,r){const e=n[0],o=n[1],i=n[2];return t[0]=r[0]*e+r[4]*o+r[8]*i+r[12],t[1]=r[1]*e+r[5]*o+r[9]*i+r[13],t[2]=r[2]*e+r[6]*o+r[10]*i+r[14],t}function T(t,n,r){const e=n[0],o=n[1],i=n[2];return t[0]=e*r[0]+o*r[3]+i*r[6],t[1]=e*r[1]+o*r[4]+i*r[7],t[2]=e*r[2]+o*r[5]+i*r[8],t}function w(t,n,r){const e=r[0],o=r[1],i=r[2],u=r[3],c=n[0],a=n[1],s=n[2],f=o*s-i*a,h=i*c-e*s,M=e*a-o*c,l=o*M-i*h,m=i*f-e*M,d=e*h-o*f,g=2*u;return t[0]=c+f*g+2*l,t[1]=a+h*g+2*m,t[2]=s+M*g+2*d,t}const z=(0,e.vt)(),A=(0,e.vt)();function C(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function I(t,n,r){const e=r[0]-n[0],o=r[1]-n[1],i=r[2]-n[2];let u=e*e+o*o+i*i;return u>0?(u=1/Math.sqrt(u),t[0]=e*u,t[1]=o*u,t[2]=i*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const V=s,E=f,R=h,D=_,N=v,k=i,F=p;Object.freeze(Object.defineProperty({__proto__:null,abs:M,add:a,angle:function(t,n){x(z,t),x(A,n);const r=P(z,A);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,n,r,e,o,i){const u=1-i,c=u*u,a=i*i,s=c*u,f=3*i*c,h=3*a*u,M=a*i;return t[0]=n[0]*s+r[0]*f+e[0]*h+o[0]*M,t[1]=n[1]*s+r[1]*f+e[1]*h+o[1]*M,t[2]=n[2]*s+r[2]*f+e[2]*h+o[2]*M,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,r=1){return t[0]=Math.min(Math.max(t[0],n),r),t[1]=Math.min(Math.max(t[1],n),r),t[2]=Math.min(Math.max(t[2],n),r),t},copy:u,cross:S,crossAndNormalize:function(t,n,r){const e=n[0],o=n[1],i=n[2],u=r[0],c=r[1],a=r[2],s=o*a-i*c,f=i*u-e*a,h=e*c-o*u,M=Math.sqrt(s*s+f*f+h*h);return t[0]=s/M,t[1]=f/M,t[2]=h/M,t},direction:I,dist:D,distance:_,div:R,divide:h,dot:P,equals:function(t,n){if(t===n)return!0;const r=t[0],e=t[1],i=t[2],u=n[0],c=n[1],a=n[2],s=(0,o.FD)();return Math.abs(r-u)<=s*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(e-c)<=s*Math.max(1,Math.abs(e),Math.abs(c))&&Math.abs(i-a)<=s*Math.max(1,Math.abs(i),Math.abs(a))},exactEquals:C,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,r,e,o,i){const u=i*i,c=u*(2*i-3)+1,a=u*(i-2)+i,s=u*(i-1),f=u*(3-2*i);return t[0]=n[0]*c+r[0]*a+e[0]*s+o[0]*f,t[1]=n[1]*c+r[1]*a+e[1]*s+o[1]*f,t[2]=n[2]*c+r[2]*a+e[2]*s+o[2]*f,t},inverse:y,len:k,length:i,lerp:j,max:d,min:m,mul:E,multiply:f,negate:q,normalize:x,random:function(t,n=1){const r=o.Ov,e=2*r()*Math.PI,i=2*r()-1,u=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(e)*u,t[1]=Math.sin(e)*u,t[2]=i*n,t},rotateX:function(t,n,r,e){const o=[],i=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],i[0]=o[0],i[1]=o[1]*Math.cos(e)-o[2]*Math.sin(e),i[2]=o[1]*Math.sin(e)+o[2]*Math.cos(e),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateY:function(t,n,r,e){const o=[],i=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],i[0]=o[2]*Math.sin(e)+o[0]*Math.cos(e),i[1]=o[1],i[2]=o[2]*Math.cos(e)-o[0]*Math.sin(e),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateZ:function(t,n,r,e){const o=[],i=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],i[0]=o[0]*Math.cos(e)-o[1]*Math.sin(e),i[1]=o[0]*Math.sin(e)+o[1]*Math.cos(e),i[2]=o[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:g,scaleAndAdd:b,set:c,sign:l,sqrDist:N,sqrLen:F,squaredDistance:v,squaredLength:p,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:V,subtract:s,transformMat3:T,transformMat4:O,transformQuat:w},Symbol.toStringTag,{value:"Module"}))},44280:(t,n,r)=>{r.d(n,{EJ:()=>a,g7:()=>c,gr:()=>u});var e=r(34727),o=r(38954),i=r(51850);function u(t,n){return(0,o.e)(t,n)/(0,o.l)(t)}function c(t,n){const r=(0,o.e)(t,n)/((0,o.l)(t)*(0,o.l)(n));return-(0,e.XM)(r)}function a(t,n,r){(0,o.n)(s,t),(0,o.n)(f,n);const i=(0,o.e)(s,f),u=(0,e.XM)(i),c=(0,o.h)(s,s,f);return(0,o.e)(c,r)<0?2*Math.PI-u:u}const s=(0,i.vt)(),f=(0,i.vt)()},48163:(t,n,r)=>{function e(){return[0,0]}function o(t,n){return[t,n]}function i(){return o(1,1)}function u(){return o(1,0)}function c(){return o(0,1)}r.d(n,{Un:()=>a,fA:()=>o,vt:()=>e});const a=i(),s=u(),f=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:a,UNIT_X:s,UNIT_Y:f,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:e,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const r=Math.min(2,t.length);for(let e=0;e<r;++e)n[e]=t[e];return n},fromValues:o,ones:i,unitX:u,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},71351:(t,n,r)=>{r.d(n,{C:()=>h,Cr:()=>M,LV:()=>f,kb:()=>l,oC:()=>m,vt:()=>a}),r(4576);var e=r(4341),o=(r(77690),r(29242)),i=r(38954),u=r(51850),c=r(32114);function a(t){return t?s((0,u.o8)(t.origin),(0,u.o8)(t.direction)):s((0,u.vt)(),(0,u.vt)())}function s(t,n){return{origin:t,direction:n}}function f(t,n){const r=d.get();return r.origin=t,r.direction=n,r}function h(t,n=a()){return function(t,n,r=a()){return(0,i.c)(r.origin,t),(0,i.c)(r.direction,n),r}(t.origin,t.direction,n)}function M(t,n,r=a()){return(0,i.c)(r.origin,t),(0,i.d)(r.direction,n,t),r}function l(t,n){const r=(0,i.h)(c.rq.get(),(0,i.n)(c.rq.get(),t.direction),(0,i.d)(c.rq.get(),n,t.origin));return(0,i.e)(r,r)}function m(t,n,r){const e=(0,i.e)(t.direction,(0,i.d)(r,n,t.origin));return(0,i.f)(r,t.origin,(0,i.g)(r,t.direction,e)),r}const d=new e.I(()=>a());(0,u.vt)(),(0,u.vt)(),(0,u.vt)(),(0,o.vt)()},77690:(t,n,r)=>{r.d(n,{B8:()=>c,Ge:()=>M,I0:()=>h,KC:()=>a,hZ:()=>i,hs:()=>f,lw:()=>s,mg:()=>u,z0:()=>o});var e=r(34304);function o(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 i(t,n,r,e,o,i,u,c,a,s){return t[0]=n,t[1]=r,t[2]=e,t[3]=o,t[4]=i,t[5]=u,t[6]=c,t[7]=a,t[8]=s,t}function u(t,n){if(t===n){const r=n[1],e=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=o}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 c(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=n[4],c=n[5],a=n[6],s=n[7],f=n[8],h=f*u-c*s,M=-f*i+c*a,l=s*i-u*a;let m=r*h+e*M+o*l;return m?(m=1/m,t[0]=h*m,t[1]=(-f*e+o*s)*m,t[2]=(c*e-o*u)*m,t[3]=M*m,t[4]=(f*r-o*a)*m,t[5]=(-c*r+o*i)*m,t[6]=l*m,t[7]=(-s*r+e*a)*m,t[8]=(u*r-e*i)*m,t):null}function a(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=n[4],c=n[5],a=n[6],s=n[7],f=n[8];return t[0]=u*f-c*s,t[1]=o*s-e*f,t[2]=e*c-o*u,t[3]=c*a-i*f,t[4]=r*f-o*a,t[5]=o*i-r*c,t[6]=i*s-u*a,t[7]=e*a-r*s,t[8]=r*u-e*i,t}function s(t,n,r){const e=n[0],o=n[1],i=n[2],u=n[3],c=n[4],a=n[5],s=n[6],f=n[7],h=n[8],M=r[0],l=r[1],m=r[2],d=r[3],g=r[4],b=r[5],_=r[6],v=r[7],p=r[8];return t[0]=M*e+l*u+m*s,t[1]=M*o+l*c+m*f,t[2]=M*i+l*a+m*h,t[3]=d*e+g*u+b*s,t[4]=d*o+g*c+b*f,t[5]=d*i+g*a+b*h,t[6]=_*e+v*u+p*s,t[7]=_*o+v*c+p*f,t[8]=_*i+v*a+p*h,t}function f(t,n,r){const e=r[0],o=r[1],i=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=i*n[6],t[7]=i*n[7],t[8]=i*n[8],t}function h(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=r+r,c=e+e,a=o+o,s=r*u,f=e*u,h=e*c,M=o*u,l=o*c,m=o*a,d=i*u,g=i*c,b=i*a;return t[0]=1-h-m,t[3]=f-b,t[6]=M+g,t[1]=f+b,t[4]=1-s-m,t[7]=l-d,t[2]=M-g,t[5]=l+d,t[8]=1-s-h,t}function M(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=n[4],c=n[5],a=n[6],s=n[7],f=n[8],h=n[9],M=n[10],l=n[11],m=n[12],d=n[13],g=n[14],b=n[15],_=r*c-e*u,v=r*a-o*u,p=r*s-i*u,q=e*a-o*c,y=e*s-i*c,x=o*s-i*a,P=f*d-h*m,S=f*g-M*m,j=f*b-l*m,O=h*g-M*d,T=h*b-l*d,w=M*b-l*g;let z=_*w-v*T+p*O+q*j-y*S+x*P;return z?(z=1/z,t[0]=(c*w-a*T+s*O)*z,t[1]=(a*j-u*w-s*S)*z,t[2]=(u*T-c*j+s*P)*z,t[3]=(o*T-e*w-i*O)*z,t[4]=(r*w-o*j+i*S)*z,t[5]=(e*j-r*T-i*P)*z,t[6]=(d*x-g*y+b*q)*z,t[7]=(g*p-m*x-b*v)*z,t[8]=(m*y-d*p+b*_)*z,t):null}function l(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 m=s,d=l;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:a,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:function(t){const n=t[0],r=t[1],e=t[2],o=t[3],i=t[4],u=t[5],c=t[6],a=t[7],s=t[8];return n*(s*i-u*a)+r*(-s*o+u*c)+e*(a*o-i*c)},equals:function(t,n){const r=t[0],o=t[1],i=t[2],u=t[3],c=t[4],a=t[5],s=t[6],f=t[7],h=t[8],M=n[0],l=n[1],m=n[2],d=n[3],g=n[4],b=n[5],_=n[6],v=n[7],p=n[8],q=(0,e.FD)();return Math.abs(r-M)<=q*Math.max(1,Math.abs(r),Math.abs(M))&&Math.abs(o-l)<=q*Math.max(1,Math.abs(o),Math.abs(l))&&Math.abs(i-m)<=q*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(u-d)<=q*Math.max(1,Math.abs(u),Math.abs(d))&&Math.abs(c-g)<=q*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(a-b)<=q*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(s-_)<=q*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(f-v)<=q*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(h-p)<=q*Math.max(1,Math.abs(h),Math.abs(p))},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:o,fromQuat:h,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:c,isOrthoNormal:function(t){const n=(0,e.FD)(),r=t[0],o=t[1],i=t[2],u=t[3],c=t[4],a=t[5],s=t[6],f=t[7],h=t[8];return Math.abs(1-(r*r+u*u+s*s))<=n&&Math.abs(1-(o*o+c*c+f*f))<=n&&Math.abs(1-(i*i+a*a+h*h))<=n},mul:m,multiply:s,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],o=n[2],i=n[4],u=n[5],c=n[6],a=n[8],s=n[9],f=n[10],h=f*u-c*s,M=-f*i+c*a,l=s*i-u*a,m=r*h+e*M+o*l;if(!m)return null;const d=1/m;return t[0]=h*d,t[1]=(-f*e+o*s)*d,t[2]=(c*e-o*u)*d,t[3]=M*d,t[4]=(f*r-o*a)*d,t[5]=(-c*r+o*i)*d,t[6]=l*d,t[7]=(-s*r+e*a)*d,t[8]=(u*r-e*i)*d,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],o=n[1],i=n[2],u=n[3],c=n[4],a=n[5],s=n[6],f=n[7],h=n[8],M=Math.sin(r),l=Math.cos(r);return t[0]=l*e+M*u,t[1]=l*o+M*c,t[2]=l*i+M*a,t[3]=l*u-M*e,t[4]=l*c-M*o,t[5]=l*a-M*i,t[6]=s,t[7]=f,t[8]=h,t},scale:f,scaleByVec2:function(t,n,r){const e=r[0],o=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:i,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:d,subtract:l,translate:function(t,n,r){const e=n[0],o=n[1],i=n[2],u=n[3],c=n[4],a=n[5],s=n[6],f=n[7],h=n[8],M=r[0],l=r[1];return t[0]=e,t[1]=o,t[2]=i,t[3]=u,t[4]=c,t[5]=a,t[6]=M*e+l*u+s,t[7]=M*o+l*c+f,t[8]=M*i+l*a+h,t},transpose:u},Symbol.toStringTag,{value:"Module"}))},82534:(t,n,r)=>{function e(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}r.d(n,{o8:()=>o,vt:()=>e,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:e,fromValues:function(t,n,r,e){return[t,n,r,e]}},Symbol.toStringTag,{value:"Module"}))},97937:(t,n,r)=>{r.d(n,{a:()=>q,c:()=>g,f:()=>y,g:()=>p,h:()=>v,k:()=>O,o:()=>V,s:()=>D}),r(44208),r(53966);var e=r(34727),o=r(58083),i=r(38954),u=r(51850),c=r(87317),a=r(91829),s=r(34304),f=r(88582),h=r(71351);function M(t,n){const r=(0,i.l)(t),o=(0,e.YN)(t[2]/r),u=Math.atan2(t[1]/r,t[0]/r);return(0,i.i)(n,r,o,u),n}var l=r(44280),m=r(32114);const d=g();function g(){return(0,a.vt)()}const b=c.e,_=c.e;function v(t,n){return(0,c.c)(n,t)}function p(t){return t[3]}function q(t){return t}function y(t,n,r,e){return(0,a.fA)(t,n,r,e)}function x(t,n,r){if(null==n)return!1;if(!S(t,n,P))return!1;let{t0:e,t1:o}=P;if((e<0||o<e&&o>0)&&(e=o),e<0)return!1;if(r){const{origin:t,direction:o}=n;r[0]=t[0]+o[0]*e,r[1]=t[1]+o[1]*e,r[2]=t[2]+o[2]*e}return!0}const P={t0:0,t1:0};function S(t,n,r){const{origin:e,direction:o}=n,i=j;i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2];const u=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===u)return!1;const c=2*(o[0]*i[0]+o[1]*i[1]+o[2]*i[2]),a=c*c-4*u*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-t[3]*t[3]);if(a<0)return!1;const s=Math.sqrt(a);return r.t0=(-c-s)/(2*u),r.t1=(-c+s)/(2*u),!0}const j=(0,u.vt)();function O(t,n){return x(t,n,null)}function T(t,n,r){const e=m.rq.get(),u=m.Rc.get();(0,i.h)(e,n.origin,n.direction);const c=p(t);(0,i.h)(r,e,n.origin),(0,i.g)(r,r,1/(0,i.l)(r)*c);const a=z(t,n.origin),s=(0,l.g7)(n.origin,r);return(0,o.$0)(u,s+a,e),(0,i.t)(r,r,u),r}function w(t,n,r){const e=(0,i.d)(m.rq.get(),n,t),o=(0,i.g)(m.rq.get(),e,t[3]/(0,i.l)(e));return(0,i.f)(r,o,t)}function z(t,n){const r=(0,i.d)(m.rq.get(),n,t),o=(0,i.l)(r),u=p(t),c=u+Math.abs(u-o);return(0,e.XM)(u/c)}const A=(0,u.vt)();function C(t,n,r,e){const o=(0,i.d)(A,n,t);switch(r){case f._.X:{const t=M(o,A)[2];return(0,i.i)(e,-Math.sin(t),Math.cos(t),0)}case f._.Y:{const t=M(o,A),n=t[1],r=t[2],u=Math.sin(n);return(0,i.i)(e,-u*Math.cos(r),-u*Math.sin(r),Math.cos(n))}case f._.Z:return(0,i.n)(e,o);default:return}}function I(t,n){const r=(0,i.d)(E,n,t);return(0,i.l)(r)-t[3]}function V(t,n){const r=(0,i.s)(t,n),e=p(t);return r<=e*e}const E=(0,u.vt)(),R=g(),D=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:d,altitudeAt:I,angleToSilhouette:z,axisAt:C,cameraFrustumCoverage:function(t,n,r,e){const o=p(t),i=o*o,u=n+.5*Math.PI,c=r*r+i-2*Math.cos(u)*r*o,a=Math.sqrt(c),s=c-i;if(s<=0)return.5;const f=Math.sqrt(s),h=Math.acos(f/a)-Math.asin(o/(a/Math.sin(u)));return Math.min(1,(h+.5*e)/e)},clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,n,r){return x(t,n,r)?r:((0,h.oC)(n,t,r),w(t,r,r))},closestPointOnSilhouette:T,containsPoint:V,copy:v,create:g,distanceToSilhouette:function(t,n){const r=(0,i.d)(m.rq.get(),n,t),e=(0,i.k)(r),o=t[3]*t[3];return Math.sqrt(Math.abs(e-o))},elevate:function(t,n,r){return t!==r&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=t[3]+n,r},equals:_,exactEquals:b,fromCenterAndRadius:function(t,n){return(0,a.fA)(t[0],t[1],t[2],n)},fromRadius:function(t,n){return t[0]=t[1]=t[2]=0,t[3]=n,t},fromValues:y,getCenter:q,getExtent:function(t,n){return n},getRadius:p,intersectLine:function(t,n,r){const e=(0,h.Cr)(n,r);if(!S(t,e,P))return[];const{origin:o,direction:c}=e,{t0:a,t1:f}=P,M=n=>{const r=(0,u.vt)();return(0,i.b)(r,o,c,n),w(t,r,r)};return Math.abs(a-f)<(0,s.FD)()?[M(a)]:[M(a),M(f)]},intersectRay:x,intersectRayClosestSilhouette:function(t,n,r){if(x(t,n,r))return r;const e=T(t,n,m.rq.get());return(0,i.f)(r,n.origin,(0,i.g)(m.rq.get(),n.direction,(0,i.j)(n.origin,e)/(0,i.l)(n.direction))),r},intersectsRay:O,projectPoint:w,setAltitudeAt:function(t,n,r,e){const o=I(t,n),u=C(t,n,f._.Z,E),c=(0,i.g)(E,u,r-o);return(0,i.f)(e,n,c)},setExtent:function(t,n,r){return t!==r&&v(t,r),r},tmpSphere:R,union:function(t,n,r=(0,a.vt)()){const e=(0,i.j)(t,n),o=t[3],u=n[3];return e+u<o?((0,c.c)(r,t),r):e+o<u?((0,c.c)(r,n),r):((0,i.m)(r,t,n,(e+u-o)/(2*e)),r[3]=(e+o+u)/2,r)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))}}]);