@arcgis/core 5.2.0-next.147 → 5.2.0-next.148

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 (246) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/03afeefb9d16b6f1d844.js +1 -0
  3. package/assets/esri/core/workers/chunks/{79c83f4e066682543ca1.js → 0a078721c7e0e24027f0.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{72019baeba520edb6bb0.js → 112befb3b5b406f29298.js} +1 -1
  5. package/assets/esri/core/workers/chunks/131e89663014bc76c4ee.js +1 -0
  6. package/assets/esri/core/workers/chunks/{392bcef780df52fb4cca.js → 16053ce50642c5ffbfa9.js} +1 -1
  7. package/assets/esri/core/workers/chunks/19689c66776b39cec234.js +1 -0
  8. package/assets/esri/core/workers/chunks/{ba46869e700ba1d2787f.js → 1b3f59fcad6e14c4d0e0.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{6dd0b79fa3a629ab4f27.js → 1bca39e0e651426bdbb5.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{305a718719ef15fda90c.js → 20458fffda7692c78135.js} +1 -1
  11. package/assets/esri/core/workers/chunks/219d0935ce281902a49f.js +1 -0
  12. package/assets/esri/core/workers/chunks/2416518db4a0117541a8.js +1 -0
  13. package/assets/esri/core/workers/chunks/{8b1c17cc52d989924313.js → 27a425d87c57b91489b3.js} +1 -1
  14. package/assets/esri/core/workers/chunks/2d9a1f23ec6ce90723ac.js +1 -0
  15. package/assets/esri/core/workers/chunks/{06e7400f5ebe0719b81c.js → 2e75df54852d65e71330.js} +1 -1
  16. package/assets/esri/core/workers/chunks/39d1d2fbe94afcd0a590.js +1 -0
  17. package/assets/esri/core/workers/chunks/{d01381b548c204835509.js → 3e9f056e4d1f0d067fc6.js} +1 -1
  18. package/assets/esri/core/workers/chunks/407f1e8176f3b0af73b4.js +1 -0
  19. package/assets/esri/core/workers/chunks/{1ba0dfbe0958cdbd7c9f.js → 42fd2a7b22b03dacc6a7.js} +1 -1
  20. package/assets/esri/core/workers/chunks/43321f244effd3d67069.js +1 -0
  21. package/assets/esri/core/workers/chunks/47e6b5631a625298db5b.js +1 -0
  22. package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +1 -0
  23. package/assets/esri/core/workers/chunks/4fc337240e7cddd0e988.js +1 -0
  24. package/assets/esri/core/workers/chunks/52c25809edf7ac008a52.js +1 -0
  25. package/assets/esri/core/workers/chunks/54b18559280a7d2a8d93.js +1 -0
  26. package/assets/esri/core/workers/chunks/561c48cb4d49b150765b.js +1 -0
  27. package/assets/esri/core/workers/chunks/{5c855af73ee3c3e764fb.js → 5732fdf6d8b87739aeea.js} +1 -1
  28. package/assets/esri/core/workers/chunks/5924ec3167a2941ebb1f.js +1 -0
  29. package/assets/esri/core/workers/chunks/5f0c06f59121e09091f7.js +1 -0
  30. package/assets/esri/core/workers/chunks/5fa1ec357c3ad1f91bc7.js +1 -0
  31. package/assets/esri/core/workers/chunks/606ea251075fe81a1206.js +1 -0
  32. package/assets/esri/core/workers/chunks/{ceb680688fe7e570a774.js → 608be1172a908e92b9f1.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{6f358116f79021ff9687.js → 612104dff305ff062dfa.js} +2 -2
  34. package/assets/esri/core/workers/chunks/68be3fb88ca61f82fb90.js +1 -0
  35. package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +1 -0
  36. package/assets/esri/core/workers/chunks/6eb5cc8ddf772c0062e6.js +1 -0
  37. package/assets/esri/core/workers/chunks/709e019885822b1f6f3e.js +1 -0
  38. package/assets/esri/core/workers/chunks/70ee81ba22badbbf045c.js +1 -0
  39. package/assets/esri/core/workers/chunks/731018c0deffc41ffc97.js +1 -0
  40. package/assets/esri/core/workers/chunks/7320a4913b6cad7cc5d7.js +1 -0
  41. package/assets/esri/core/workers/chunks/7a4f1484b119ebafc2e7.js +1 -0
  42. package/assets/esri/core/workers/chunks/8293600f94553afc8c38.js +1 -0
  43. package/assets/esri/core/workers/chunks/{c18189710d6198516175.js → 830ab9b8d000169da675.js} +1 -1
  44. package/assets/esri/core/workers/chunks/8602b3587d4bdd9cc9f5.js +1 -0
  45. package/assets/esri/core/workers/chunks/{956a40f40bde416efe93.js → 898f43feeec74acde1ec.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{700b1d5bc67b7e1b3ff3.js → 8aa80b892fde552577e8.js} +1 -1
  47. package/assets/esri/core/workers/chunks/8ef802ef8d108ae2e473.js +1 -0
  48. package/assets/esri/core/workers/chunks/900181f68449d8f82eeb.js +1 -0
  49. package/assets/esri/core/workers/chunks/925271bb763607a326ae.js +1 -0
  50. package/assets/esri/core/workers/chunks/937824bc7948f7bc7845.js +1 -0
  51. package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +1 -0
  52. package/assets/esri/core/workers/chunks/{a52bf03bffb6ffac3b54.js → a101b89c18488f213d80.js} +1 -1
  53. package/assets/esri/core/workers/chunks/a337ca943862b30b978d.js +1 -0
  54. package/assets/esri/core/workers/chunks/ac03976b8450331aa31e.js +1 -0
  55. package/assets/esri/core/workers/chunks/af349c7bc8ef41a0e1bd.js +1 -0
  56. package/assets/esri/core/workers/chunks/afc3b2af20e9d1dfd260.js +1 -0
  57. package/assets/esri/core/workers/chunks/{97dbbedea9fe03bd1306.js → b0fd7cd5fc9526d30ddc.js} +1 -1
  58. package/assets/esri/core/workers/chunks/b3e812c3a06b486f05d2.js +1 -0
  59. package/assets/esri/core/workers/chunks/{6883a5c6883eccaddf64.js → b6ba66a05030d3815dfd.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{9ab25ee06041f907b9a2.js → c2c1f51a4668055c2838.js} +1 -1
  61. package/assets/esri/core/workers/chunks/c598b22f78ccc57f9d6d.js +1 -0
  62. package/assets/esri/core/workers/chunks/c5d85be6e16bc895e7fb.js +1 -0
  63. package/assets/esri/core/workers/chunks/c62738f84c914671b143.js +1 -0
  64. package/assets/esri/core/workers/chunks/{820f41d66b2056a3ebc8.js → c7699edd14497d174445.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{a7985d20fa6e8d4878e7.js → d0f5bee9db1ad51ae687.js} +1 -1
  66. package/assets/esri/core/workers/chunks/dbcac8c1a76d4a9db13d.js +1 -0
  67. package/assets/esri/core/workers/chunks/{4ed8655770a3e018e366.js → de8d7f11f5a078c01b83.js} +1 -1
  68. package/assets/esri/core/workers/chunks/e0351753f6b4d1adf11e.js +1 -0
  69. package/assets/esri/core/workers/chunks/{534186fc921a0ccf58dc.js → e1f5d00878f27e1d413e.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{4479a166b5ac8db1e12e.js → f2b69bd704db62915a6b.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{711cfb84659cb4437679.js → f528ac5c648ca6a98582.js} +1 -1
  72. package/assets/esri/core/workers/chunks/fdbf6208df5c58746d9d.js +1 -0
  73. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ar.json +1 -1
  74. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bg.json +1 -1
  75. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bs.json +1 -1
  76. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ca.json +1 -1
  77. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.cs.json +1 -1
  78. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.da.json +1 -1
  79. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.de.json +1 -1
  80. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.el.json +1 -1
  81. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.es.json +1 -1
  82. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.et.json +1 -1
  83. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fi.json +1 -1
  84. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fr.json +1 -1
  85. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.he.json +1 -1
  86. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hr.json +1 -1
  87. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hu.json +1 -1
  88. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.id.json +1 -1
  89. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.it.json +1 -1
  90. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ja.json +1 -1
  91. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ko.json +1 -1
  92. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lt.json +1 -1
  93. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lv.json +1 -1
  94. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.nl.json +1 -1
  95. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.no.json +1 -1
  96. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pl.json +1 -1
  97. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-BR.json +1 -1
  98. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-PT.json +1 -1
  99. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ro.json +1 -1
  100. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ru.json +1 -1
  101. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sk.json +1 -1
  102. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sl.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sr.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sv.json +1 -1
  105. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.th.json +1 -1
  106. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.tr.json +1 -1
  107. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.uk.json +1 -1
  108. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.vi.json +1 -1
  109. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-CN.json +1 -1
  110. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-HK.json +1 -1
  111. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-TW.json +1 -1
  112. package/config.js +1 -1
  113. package/geometry/support/TileClipper.js +1 -1
  114. package/geometry/support/meshUtils.d.ts +1 -1
  115. package/geometry/support/scaleUtils.js +1 -1
  116. package/kernel.js +1 -1
  117. package/layers/CSVLayer.d.ts +1 -1
  118. package/layers/CatalogLayer.d.ts +1 -1
  119. package/layers/FeatureLayer.d.ts +1 -1
  120. package/layers/GeoJSONLayer.d.ts +1 -1
  121. package/layers/OrientedImageryLayer.js +1 -1
  122. package/layers/ParquetLayer.d.ts +4 -3
  123. package/layers/ParquetLayer.js +1 -1
  124. package/layers/SceneLayer.d.ts +4 -5
  125. package/layers/SceneLayer.js +1 -1
  126. package/layers/SketchLayer.d.ts +0 -1
  127. package/layers/SubtypeGroupLayer.d.ts +1 -1
  128. package/layers/WFSLayer.d.ts +1 -1
  129. package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +1 -1
  130. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
  131. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -1
  132. package/layers/mixins/ArcGISImageService.d.ts +1 -1
  133. package/layers/mixins/PortalLayer.js +1 -1
  134. package/layers/mixins/ScaleRangeLayer.js +1 -1
  135. package/layers/mixins/SublayersOwner.js +1 -1
  136. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  137. package/layers/orientedImagery/core/utils.js +1 -1
  138. package/layers/support/FeatureFilter.d.ts +1 -1
  139. package/layers/support/ParquetPortalItemData.js +1 -1
  140. package/layers/support/PortalItemData.js +1 -1
  141. package/layers/support/Sublayer.js +1 -1
  142. package/layers/support/SubtypeSublayer.d.ts +1 -1
  143. package/layers/support/SubtypeSublayer.js +1 -1
  144. package/package.json +2 -2
  145. package/popup/FeaturesModel.d.ts +26 -5
  146. package/popup/FeaturesModel.js +1 -1
  147. package/portal/support/layersLoader.js +1 -1
  148. package/portal/support/portalLayers.js +1 -1
  149. package/rest/print.js +1 -1
  150. package/rest/support/printTaskUtils.js +1 -1
  151. package/symbols/cim/CIMSymbolHelper.js +1 -1
  152. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  153. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  154. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  155. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  156. package/views/2d/layers/LayerView2D.js +1 -1
  157. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  158. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  159. package/views/3d/analysis/Viewshed/types.d.ts +3 -1
  160. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  161. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  162. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  163. package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
  164. package/views/3d/layers/FlowSubView3D.js +1 -1
  165. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  166. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  167. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  168. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  169. package/views/3d/layers/MediaLayerView3D.js +1 -1
  170. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  171. package/views/3d/layers/RouteLayerView3D.js +1 -1
  172. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  173. package/views/3d/layers/SceneLayerView3D.js +1 -1
  174. package/views/3d/layers/TiledLayerView3D.js +1 -1
  175. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  176. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  177. package/views/3d/layers/graphics/Labeler.js +1 -1
  178. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  179. package/views/3d/support/popupHitTest.js +1 -1
  180. package/views/View2D.d.ts +1 -1
  181. package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
  182. package/views/interactive/snapping/SnappingOptions.d.ts +1 -1
  183. package/views/layers/FeatureLikeLayerView.d.ts +1 -1
  184. package/views/layers/LayerView.js +1 -1
  185. package/views/layers/LineOfSightLayerView.d.ts +3 -4
  186. package/views/layers/PointCloudLayerView.d.ts +1 -1
  187. package/views/layers/SceneLayerView.d.ts +1 -1
  188. package/views/layers/ViewshedLayerView.d.ts +5 -6
  189. package/views/support/layerViewUtils.js +1 -1
  190. package/webdoc/support/saveUtils.js +1 -1
  191. package/webdoc/support/unsupportedErrors.js +1 -1
  192. package/widgets/Editor.d.ts +10 -0
  193. package/widgets/Legend.d.ts +1 -0
  194. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  195. package/widgets/OrientedImageryViewer/adapters/draw/HeightMeasurementAdapter.js +1 -1
  196. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  197. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  198. package/widgets/OrientedImageryViewer/components/ImageLocationViewModel.js +1 -1
  199. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  200. package/widgets/support/SnappingControls.d.ts +1 -1
  201. package/assets/esri/core/workers/chunks/00a600c71ceebe7bfeee.js +0 -1
  202. package/assets/esri/core/workers/chunks/0193df3f9fb23633da87.js +0 -1
  203. package/assets/esri/core/workers/chunks/050c4b212f2b5691db34.js +0 -1
  204. package/assets/esri/core/workers/chunks/07aa6d36f1006b6ab7ff.js +0 -1
  205. package/assets/esri/core/workers/chunks/0bb11751efa2023ec937.js +0 -1
  206. package/assets/esri/core/workers/chunks/2062d46f638eabfc9499.js +0 -1
  207. package/assets/esri/core/workers/chunks/222af8522773c7dc80b1.js +0 -1
  208. package/assets/esri/core/workers/chunks/303fde8f3459dde16555.js +0 -1
  209. package/assets/esri/core/workers/chunks/347bf269c2b1583d2dca.js +0 -1
  210. package/assets/esri/core/workers/chunks/350540770781b281c39a.js +0 -1
  211. package/assets/esri/core/workers/chunks/3b017b718ea2d4ed498f.js +0 -1
  212. package/assets/esri/core/workers/chunks/3e81dfc9d621ece038fe.js +0 -1
  213. package/assets/esri/core/workers/chunks/46b2d4addfc73f9183a4.js +0 -1
  214. package/assets/esri/core/workers/chunks/4d82db661365daa513a6.js +0 -1
  215. package/assets/esri/core/workers/chunks/4f48d45baa8ada16f579.js +0 -1
  216. package/assets/esri/core/workers/chunks/50ca55ad2f5421acc492.js +0 -1
  217. package/assets/esri/core/workers/chunks/5450f339f97b2b042ee2.js +0 -1
  218. package/assets/esri/core/workers/chunks/55cc8581978c71b17998.js +0 -1
  219. package/assets/esri/core/workers/chunks/633a9051580c5302d2f7.js +0 -1
  220. package/assets/esri/core/workers/chunks/641d196a554bd07f729e.js +0 -1
  221. package/assets/esri/core/workers/chunks/655c3afda1eef01611dd.js +0 -1
  222. package/assets/esri/core/workers/chunks/6569797d3c22442e5e97.js +0 -1
  223. package/assets/esri/core/workers/chunks/70793967db45fb142962.js +0 -1
  224. package/assets/esri/core/workers/chunks/798a63653f82c0e842c5.js +0 -1
  225. package/assets/esri/core/workers/chunks/84fcbf7a1d04f01685d1.js +0 -1
  226. package/assets/esri/core/workers/chunks/8e511079918e2fd9261f.js +0 -1
  227. package/assets/esri/core/workers/chunks/8fcfd515ee1b18c902e5.js +0 -1
  228. package/assets/esri/core/workers/chunks/9001e9a1e81bce175ddd.js +0 -1
  229. package/assets/esri/core/workers/chunks/9401cc22373566e1171e.js +0 -1
  230. package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +0 -1
  231. package/assets/esri/core/workers/chunks/9c0fd8baa00ee9733ba4.js +0 -1
  232. package/assets/esri/core/workers/chunks/9c1e69ac82e2bf746191.js +0 -1
  233. package/assets/esri/core/workers/chunks/a010d2e4e34eb7bc1fec.js +0 -1
  234. package/assets/esri/core/workers/chunks/a05790444115e4cf1bcc.js +0 -1
  235. package/assets/esri/core/workers/chunks/a7edf7541569fef77cb3.js +0 -1
  236. package/assets/esri/core/workers/chunks/b2c29bc48c7b3b0c9357.js +0 -1
  237. package/assets/esri/core/workers/chunks/b7d77dd2abb255fd2e5a.js +0 -1
  238. package/assets/esri/core/workers/chunks/b8054adc45bca069b948.js +0 -1
  239. package/assets/esri/core/workers/chunks/ca7fb75e2c62e7d37122.js +0 -1
  240. package/assets/esri/core/workers/chunks/d21257d2e2a37266c0f7.js +0 -1
  241. package/assets/esri/core/workers/chunks/d270cc9807161033686e.js +0 -1
  242. package/assets/esri/core/workers/chunks/d4f038e04c42aed588c1.js +0 -1
  243. package/assets/esri/core/workers/chunks/e32b96c08cb272a59851.js +0 -1
  244. package/assets/esri/core/workers/chunks/e7c60bd85abbd36cdc64.js +0 -1
  245. package/assets/esri/core/workers/chunks/f0a68d2900d24f56afa0.js +0 -1
  246. package/assets/esri/core/workers/chunks/f511a304e9dea9eb3e01.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169],{66344(e,t,r){r.d(t,{q:()=>l});const i=!!(0,r(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class a{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){return this._db.get(e.id+t)?.size??0}put(e,t,r,a,n){t=e.id+t;let l=this._db.get(t);if(l&&(this._size-=l.size,e.size-=l.size,this._db.delete(t),l.entry!==r&&this._notifyRemove(t,l.entry,l.size,0)),a>this._maxSize)return void this._notifyRemove(t,r,a,0);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!a||a<0)return i||console.warn(`Refusing to cache entry with size ${a} for key ${t}`),void this._notifyRemove(t,r,0,0);let o=1+Math.max(n,-4)- -3;this._db.set(t,new s(r,a,o)),this._size+=a,e.size+=a,this._checkSize()}updateSize(e,t){t=e.id+t;let r=this._db.get(t);if(!r)return;this._size-=r.size,e.size-=r.size;let i=r.entry.usedMemory;for(;i>this._maxSize;){let e=this._notifyRemove(t,r.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}r.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;let r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;let r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){let r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){let e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=[];this._db.forEach((e,i)=>{let a=e.lifetime;r[a]=(r[a]||0)+e.size,this._clients.forEach(r=>{let{id:a,name:s}=r;if(i.startsWith(a)){let r=t[s]||0;t[s]=r+e.size}})});let i={};this._clients.forEach(e=>{let r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){let a=t[r]||0;t[r]=a,i[r]=Math.round(100*e.hitRate)+"%"}else i[r]="0%"});let a=Object.keys(t);a.sort((e,r)=>t[r]-t[e]),a.forEach(r=>e[r]=Math.round(t[r]/2**20)+"MB / "+i[r]);for(let t=r.length-1;t>=0;--t){let i=r[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){let t=e.id;this._db.forEach((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(let[t,r]of this._db)t.startsWith(e.id)&&(yield r.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,i){let a=this._clients.get(e.split(n)[0])?.removeFunc,s=a?.(t,i,r);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){let r=t??this;if(r.size<=e)return;let i=t?.id,a=!0;for(;a;){a=!1;for(let[s,l]of this._db)if(0===l.lifetime&&(!i||s.startsWith(i))){let i=t??this._clients.get(s.split(n)[0]);if(this._purgeItem(s,l,i),r.size<=.9*e)return;a||=this._db.has(s)}}for(let[a,s]of this._db)if(!i||a.startsWith(i)){let i=t??this._clients.get(a.split(n)[0]);if(this._purgeItem(a,s,i),r.size<=.9*e)return}}_purgeItem(e,t,r){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);let i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new a(0);class s{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}const n=":";class l{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new a(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,r){r.d(t,{DZ:()=>h,Ke:()=>d,QA:()=>g,Tj:()=>u,UT:()=>L,aD:()=>f,jJ:()=>y});var i=r(32198),a=r(69622),s=r(97768),n=r(17676),l=r(10107),o=r(64108);function y(e,t,r){return(0,n.Lx)(e.map((e,i)=>t.apply(r,[e,i])))}async function u(e,t,r){return(await(0,n.Lx)(e.map((e,i)=>t.apply(r,[e,i])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function p(e){return{ok:!1,error:e}}async function d(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return c(await e)}catch(e){return p(e)}}async function h(e){try{return c(await e)}catch(e){return(0,n.QP)(e),p(e)}}function g(e){if(!0===e.ok)return e.value;throw e.error}function L(e,t){return new m(e,t)}let m=class extends a.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,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=p(e),this._cleanup()}),this._abortHandle=(0,n.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,l.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,l.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,l.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,l.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,l.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],m);class f{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>s,lM:()=>a});var i=r(34275);function a(e){if(!e)return 0;let t=y;for(let r in e)e.hasOwnProperty(r)&&(t+=n(e[r],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return o(e,8);let r=u;for(let i=0;i<t;i++)r+=n(e[i]);return r}(e);let t=y;for(let r in e)e.hasOwnProperty(r)&&(t+=n(e[r]));return t}function n(e,t=!0){switch(typeof e){case"object":return t?s(e):y;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+c:Array.isArray(t)?o(t,16):0:0),0)}function o(e,t){return u+e.length*t}const y=32,u=16,c=145},83027(e,t,r){const i=r(29953).ho;r.d(t,["h",0,i])},34287(e,t,r){var i=r(32198),a=r(49186),s=r(84952),n=r(91429),l=r(78888),o=r(89317),y=r(45917),u=r(49422),c=r(10873),p=r(6345),d=r(79677),h=r(59923),g=r(36005),L=r(43937);r.d(t,["q",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,u.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r){e&&(t[r]=e)}writeTitle(e,t){t.title=e??"Layer"}readVisibilityTimeExtent(e){return e?d.A.fromArray(e):null}writeVisibilityTimeExtent(e,t,r,i){if(e&&"tables"!==i.layerContainerType){if(e.isEmpty)return void(i?.messages&&i.messages.push(new a.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")));t[r]=e.toArray()}}read(e,t){t&&(t.layer=this),(0,y.t)(this,e,t=>super.read(e,t),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin&&!(0,p.Bu)(t,this.operationalLayerType,this.type))return(0,h.U4)(t,this),null;let r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter(e=>e instanceof a.A&&"web-document-write:property-required"===e.name).length;return(0,s.w8)(r?.url)?(t?.messages?.push(new a.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i.Cg)([(0,n.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],r.prototype,"id",void 0),(0,i.Cg)([(0,g.w)("id",["id"])],r.prototype,"readId",null),(0,i.Cg)([(0,n.MZ)(c.C1)],r.prototype,"listMode",void 0),(0,i.Cg)([(0,L.K)("listMode")],r.prototype,"writeListMode",null),(0,i.Cg)([(0,n.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:o.K,isRequired:!0}}}}})],r.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,L.K)("operationalLayerType")],r.prototype,"writeOperationalLayerType",null),(0,i.Cg)([(0,n.MZ)(c.ke)],r.prototype,"opacity",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,readOnly:!1})],r.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],r.prototype,"title",void 0),(0,i.Cg)([(0,L.K)("title"),(0,L.K)(["web-scene"],"title")],r.prototype,"writeTitle",null),(0,i.Cg)([(0,n.MZ)({type:d.A,json:{origins:{"web-scene":{write:{layerContainerTypes:o.K}}}}})],r.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,g.w)("visibilityTimeExtent")],r.prototype,"readVisibilityTimeExtent",null),(0,i.Cg)([(0,L.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[l.jz,l.Uv]]}})],r.prototype,"writeVisibilityTimeExtent",null),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{name:"visibility",write:{layerContainerTypes:o.K}}})],r.prototype,"visible",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.OperationalLayer")],r),r}])},8303(e,t,r){var i=r(32198),a=r(92602),s=r(70333),n=r(56507),l=r(60999),o=r(49186),y=r(36563),u=r(53966),c=r(97768),p=r(17676),d=r(84952),h=r(91429),g=r(77548),L=r(20655),m=r(80812),f=r(41318),S=r(10407),_=r(36005),I=r(43937);const b={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,v=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:a}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,y.rE)(i),"reloadFromPortal"),await a({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!a.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:a}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",a)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,a,n=!s.id?.findCredential(this.url),l=e===r.id;if(l&&r.portal.user)return this._getUserPrivileges(r,n);if(l)i=r.portal.url;else try{i=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!i||!(0,d.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;a=await(s.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await r.reload():(r=new m.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,p.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,S.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;let r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,a=L.A.getDefault();if(a&&a.loaded&&(0,d.S8)(a.restUrl)===(0,d.S8)(i))return a.user;let o=`${i}/community/self`,y=null==e?null:e.signal,u=await(0,l.Ke)((0,n.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:y}));return u.ok?f.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){let r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||L.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,h.MZ)({type:m.default})],v.prototype,"portalItem",null),(0,i.Cg)([(0,_.w)("web-document","portalItem",["itemId"])],v.prototype,"readPortalItem",null),(0,i.Cg)([(0,I.K)("web-document","portalItem",{itemId:{type:String}})],v.prototype,"writePortalItem",null),(0,i.Cg)([(0,h.MZ)({clonable:!1})],v.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],v.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],v.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],v.prototype,"userHasUpdateItemPrivileges",void 0),v=(0,i.Cg)([(0,h.$K)("esri.layers.mixins.PortalLayer")],v),v}])},6345(e,t,r){r.d(t,{Bu:()=>S,VH:()=>f});var i=r(44208);const a={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},s={ArcGISAnnotationLayer:"AnnotationFeatureLayer",ArcGISDimensionLayer:"DimensionFeatureLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",get ParquetLayer(){return(0,i.A)("parquetlayer-persistence-enabled")?"ParquetLayer":"UnsupportedLayer"},SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},n={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},l={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},o={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},y={ArcGISTiledElevationServiceLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CSV:"CSVLayer",CatalogLayer:"CatalogLayer",GaussianSplatLayer:"GaussianSplatLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",Object3DTilesLayer:"UnsupportedLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},c={ArcGISFeatureLayer:"FeatureLayer"},p={...s,LinkChartLayer:"LinkChartLayer"},d=a,h=n,g={ArcGISAnnotationLayer:"AnnotationFeatureLayer",ArcGISDimensionLayer:"DimensionFeatureLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",BuildingSceneLayer:"BuildingSceneLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",MediaLayer:"MediaLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",SubtypeGroupLayer:"SubtypeGroupLayer",WCS:"WCSLayer"},L=n;function m(e){switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap-base-layers":return l;case"basemap-ground-layers":return o;case"ground":return y;case"tables":return c;default:return u}case"link-chart":switch(e.layerContainerType){case"basemap-base-layers":return d;case"tables":return h;default:return p}default:switch(e.layerContainerType){case"basemap-base-layers":return a;case"tables":return n;case"ground":case"basemap-ground-layers":return;default:return s}}}function f(e,t){if(!t)return"UnknownLayer";if("DefaultTileLayer"===t){let t="UnknownLayer";if("web-scene"===e.origin)switch(e.layerContainerType){case"operational-layers":case"basemap-base-layers":t="TileLayer";break;case"ground":t="ElevationLayer"}else switch(e.layerContainerType){case"basemap-base-layers":case"operational-layers":t="TileLayer"}return t}return m(e)?.[t]??"UnknownLayer"}function S(e,t,r){if(!e?.origin)return!1;switch(e.origin){case"web-map":case"link-chart":if("operational-layers"===e.layerContainerType&&"ArcGISDimensionLayer"===t&&"dimension-feature"!==r)return!1;break;case"web-scene":if("operational-layers"===e.layerContainerType)switch(t){case"ArcGISDimensionLayer":if("dimension"!==r)return!1;break;case"ArcGISTiledElevationServiceLayer":return!1}break;case"portal-item":if("ArcGISDimensionLayer"===t&&"dimension-feature"!==r)return!1}let i=function(e){if("portal-item"===e.origin)switch(e.layerContainerType){case"basemap-base-layers":case"ground":case"basemap-ground-layers":return;case"tables":return L;default:return g}return m(e)}(e)?.[t];return null!=i&&"UnknownLayer"!==i&&"UnsupportedLayer"!==i}},10407(e,t,r){r.d(t,{It:()=>d,LG:()=>n,OM:()=>y,Sm:()=>u,Y:()=>l,bK:()=>o,sQ:()=>c});var i=r(99917),a=r(16930),s=r(28735);function n(e,t){if(!l(e,t)){let r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,p.HOSTED_SERVICE)}function y(e,t){let r=e.typeKeywords;if(r){let e=r.indexOf(t);e>-1&&r.splice(e,1)}}function u(e,t,r){r?n(e,t):y(e,t)}async function c(e){let t,r=e.clone().normalize();if(r.length>1)for(let e of r)t?e.width>t.width&&(t=e):t=e;else t=r[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);let r=a.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(t)}const p={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",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",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function d(e){let{portal:t,isOrgItem:r,itemControl:i}=e,a=t.user?.privileges,s=!a||a.includes("features:user:edit"),n=!!r&&!!a?.includes("features:user:fullEdit"),l="update"===i||"admin"===i;return l?n=s=!0:n&&(s=!0),{features:{edit:s,fullEdit:n},content:{updateItem:l}}}r.d(t,["mm",0,p])},78553(e,t,r){r.d(t,{D:()=>s,p:()=>a});var i=r(78888);function a(e){let t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){let t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3121],{11006(e,t,r){function i(e,t,r,i,a){n(e,t,r||0,i||e.length-1,a||s)}function n(e,t,r,i,s){for(;i>r;){if(i-r>600){var o=i-r+1,l=t-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);n(e,t,Math.max(r,Math.floor(t-l*c/o+h)),Math.min(i,Math.floor(t+(o-l)*c/o+h)),s)}var d=e[t],p=r,y=i;for(a(e,r,t),s(e[i],d)>0&&a(e,r,i);p<y;){for(a(e,p,y),p++,y--;s(e[p],d)<0;)p++;for(;s(e[y],d)>0;)y--}0===s(e[r],d)?a(e,r,y):a(e,++y,i),y<=t&&(r=y+1),t<=y&&(i=y-1)}}function a(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function s(e,t){return e<t?-1:+(e>t)}r.d(t,{q:()=>i})},40876(e,t,r){r.d(t,{Eq:()=>p,G1:()=>m,Q6:()=>v,TS:()=>a,V6:()=>n,Vm:()=>y,ay:()=>l,c1:()=>g,c4:()=>s,j5:()=>u,lT:()=>h,oW:()=>c,xV:()=>_});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function n(e){return!!i[e]||!!i[e.toLowerCase()]}function a(e){return i[e]??i[e.toLowerCase()]}function s(e){return[...a(e)]}function o(e,t,r){r<0&&++r,r>1&&--r;let i=6*r;return i<1?e+(t-e)*i:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,i=1){let n=(e%360+360)%360/360,a=r<=.5?r*(t+1):r+t-r*t,s=2*r-a;return[Math.round(255*o(s,a,n+1/3)),Math.round(255*o(s,a,n)),Math.round(255*o(s,a,n-1/3)),i]}function u(e){let t=e.length>5,r=t?8:4,i=(1<<r)-1,n=t?1:17,a=t?9===e.length:5===e.length,s=Number("0x"+e.slice(1));if(isNaN(s))return null;let o,l=[0,0,0,1];return a&&(o=s&i,s>>=r,l[3]=n*o/255),o=s&i,s>>=r,l[2]=n*o,o=s&i,s>>=r,l[1]=n*o,o=s&i,s>>=r,l[0]=n*o,l}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{let t=parseInt(e.slice(1,2),16),r=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),n=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,r+16*r,i+16*i,(n+16*n)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function h(e){let t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){let e=t[2].split(/\s*,\s*/),r=t[1];if("rgb"===r&&3===e.length||"rgba"===r&&4===e.length){if(e[0].endsWith("%")){let t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===r&&3===e.length||"hsla"===r&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=g(e[0]),e[1]=g(e[1]),e[2]=g(e[2]),e[3]=4===e.length?m(e[3]):1,e}function p(e){let t=n(e)?a(e):null;return t??=h(e),t??=c(e),t}function y(e){let t=p(e);return null==t?null:[t[0]/255,t[1]/255,t[2]/255,t[3]]}function m(e){return f(e,0,1)}function g(e){return Math.round(f(e,0,255))}function f(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}const x=1/2.2;function v(e){return e**2.2}function _(e){return e**x}r.d(t,["iw",0,x])},60999(e,t,r){r.d(t,{DZ:()=>y,Ke:()=>p,QA:()=>m,Tj:()=>c,UT:()=>g,aD:()=>x,jJ:()=>u});var i=r(32198),n=r(69622),a=r(97768),s=r(17676),o=r(10107),l=r(64108);function u(e,t,r){return(0,s.Lx)(e.map((e,i)=>t.apply(r,[e,i])))}async function c(e,t,r){return(await(0,s.Lx)(e.map((e,i)=>t.apply(r,[e,i])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function y(e){try{return h(await e)}catch(e){return(0,s.QP)(e),d(e)}}function m(e){if(!0===e.ok)return e.value;throw e.error}function g(e,t){return new f(e,t)}let f=class extends n.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,a.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,s.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,a.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,o.MZ)()],f.prototype,"value",null),(0,i.Cg)([(0,o.MZ)()],f.prototype,"error",null),(0,i.Cg)([(0,o.MZ)()],f.prototype,"finished",null),(0,i.Cg)([(0,o.MZ)()],f.prototype,"promise",void 0),(0,i.Cg)([(0,o.MZ)()],f.prototype,"_result",void 0),f=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],f);class x{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},62885(e,t,r){r.d(t,{H:()=>a,V:()=>n});var i=r(7762);function n(e,t,r=i.A){return t||=new r,t===e||t.destroyed||(t.removeAll(),(n=e)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?t.addMany(e):e&&t.add(e)),t;var n}function a(e){return e}},21287(e,t,r){r.d(t,{M5:()=>h,eV:()=>c});var i=r(56507),n=r(49186),a=r(17676),s=r(84952),o=r(26306);let l=null,u=!0;function c(e,t,r,i){if(!t||!r)throw Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,r)}catch{u=!1}let n=function(e,t,r){return r||=(l||(l=document.createElement("canvas"),l.width=1,l.height=1),l),r.getContext("2d").createImageData(e,t)}(t,r,i);return n.data.set(e,0),n}async function h(e,t){let{arrayBuffer:l,mediaType:u}=await async function(e,t){let r=(0,s.r$)(e);if(r?.isBase64)return{arrayBuffer:(0,o.M)(r.data),mediaType:r.mediaType};let n=await(0,i.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:n.data,mediaType:n.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){let{isAnimatedGIF:e,parseGif:i}=await r.e(820).then(()=>r(10820));if(e(l))return i(l,t)}if(c){let{isAnimatedPNG:e,parseApng:i}=await r.e(2390).then(()=>r(22390));if(e(l))return i(l,t)}return async function(e,t){let r=window.URL.createObjectURL(e);try{let{data:e}=await(0,i.A)(r,{...t,responseType:"image"});return e}catch(e){throw(0,a.zf)(e)?e:new n.A("invalid-image",`Could not fetch requested image at ${r}`)}finally{window.URL.revokeObjectURL(r)}}(new Blob([l],{type:u}),t)}},35522(e,t,r){r.d(t,{$A:()=>I,Bw:()=>a,C:()=>s,Cc:()=>S,DI:()=>M,Io:()=>x,Ln:()=>f,Om:()=>b,Qr:()=>h,Re:()=>u,S8:()=>w,T9:()=>m,WQ:()=>l,Z0:()=>C,_S:()=>p,aI:()=>B,ei:()=>A,fw:()=>E,gL:()=>T,hG:()=>v,hZ:()=>o,hs:()=>g,jk:()=>y,lw:()=>c,m3:()=>_,oW:()=>G,t2:()=>R,tn:()=>d,ze:()=>L});var i=r(51850),n=r(34304);function a(e){let t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function h(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function y(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function m(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function g(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function f(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}function x(e,t){let r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}function v(e,t){let r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}function _(e){let t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}function L(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function M(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function w(e,t=e){let r=t[0],i=t[1],n=t[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function I(e,t,r){let i=t[0],n=t[1],a=t[2],s=r[0],o=r[1],l=r[2];return e[0]=n*l-a*o,e[1]=a*s-i*l,e[2]=i*o-n*s,e}function S(e,t,r,i){let n=t[0],a=t[1],s=t[2];return e[0]=n+i*(r[0]-n),e[1]=a+i*(r[1]-a),e[2]=s+i*(r[2]-s),e}function C(e,t,r){let i=t[0],n=t[1],a=t[2];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12],e[1]=r[1]*i+r[5]*n+r[9]*a+r[13],e[2]=r[2]*i+r[6]*n+r[10]*a+r[14],e}function A(e,t,r){let i=t[0],n=t[1],a=t[2];return e[0]=i*r[0]+n*r[3]+a*r[6],e[1]=i*r[1]+n*r[4]+a*r[7],e[2]=i*r[2]+n*r[5]+a*r[8],e}function T(e,t,r){return E(e,t,r[0],r[1],r[2],r[3])}function E(e,t,r,i,n,a){let s=t[0],o=t[1],l=t[2],u=i*l-n*o,c=n*s-r*l,h=r*o-i*s,d=i*h-n*c,p=n*u-r*h,y=r*c-i*u,m=2*a;return e[0]=s+u*m+2*d,e[1]=o+c*m+2*p,e[2]=l+h*m+2*y,e}const P=(0,i.vt)(),O=(0,i.vt)();function R(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function B(e,t){if(e===t)return!0;let r=e[0],i=e[1],a=e[2],s=t[0],o=t[1],l=t[2],u=(0,n.FD)();return Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-o)<=u*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(a-l)<=u*Math.max(1,Math.abs(a),Math.abs(l))}function G(e,t,r){let i=r[0]-t[0],n=r[1]-t[1],a=r[2]-t[2],s=i*i+n*n+a*a;return s>0?(s=1/Math.sqrt(s),e[0]=i*s,e[1]=n*s,e[2]=a*s,e):(e[0]=0,e[1]=0,e[2]=0,e)}const k=u,U=c,Z=h,W=x,V=v,Y=a,F=_;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(e,t){w(P,e),w(O,t);let r=b(P,O);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(e,t,r,i,n,a){let s=1-a,o=s*s,l=a*a,u=o*s,c=3*a*o,h=3*l*s,d=l*a;return e[0]=t[0]*u+r[0]*c+i[0]*h+n[0]*d,e[1]=t[1]*u+r[1]*c+i[1]*h+n[1]*d,e[2]=t[2]*u+r[2]*c+i[2]*h+n[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,r=1){return e[0]=Math.min(Math.max(e[0],t),r),e[1]=Math.min(Math.max(e[1],t),r),e[2]=Math.min(Math.max(e[2],t),r),e},copy:s,cross:I,crossAndNormalize:function(e,t,r){let i=t[0],n=t[1],a=t[2],s=r[0],o=r[1],l=r[2],u=n*l-a*o,c=a*s-i*l,h=i*o-n*s,d=Math.sqrt(u*u+c*c+h*h);return e[0]=u/d,e[1]=c/d,e[2]=h/d,e},direction:G,dist:W,distance:x,div:Z,divide:h,dot:b,equals:B,exactEquals:R,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,r,i,n,a){let s=a*a,o=s*(2*a-3)+1,l=s*(a-2)+a,u=s*(a-1),c=s*(3-2*a);return e[0]=t[0]*o+r[0]*l+i[0]*u+n[0]*c,e[1]=t[1]*o+r[1]*l+i[1]*u+n[1]*c,e[2]=t[2]*o+r[2]*l+i[2]*u+n[2]*c,e},inverse:M,len:Y,length:a,lerp:S,max:m,min:y,mul:U,multiply:c,negate:L,normalize:w,random:function(e,t=1){let r=n.Ov,i=2*r()*Math.PI,a=2*r()-1,s=Math.sqrt(1-a*a)*t;return e[0]=Math.cos(i)*s,e[1]=Math.sin(i)*s,e[2]=a*t,e},rotateX:function(e,t,r,i){let n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),a[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},rotateY:function(e,t,r,i){let n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),a[1]=n[1],a[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},rotateZ:function(e,t,r,i){let n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),a[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),a[2]=n[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:g,scaleAndAdd:f,scaleTo:function(e,t){return g(e,e,t/Y(e))},set:o,sign:p,sqrDist:V,sqrLen:F,squaredDistance:v,squaredLength:_,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:k,subtract:u,transformMat3:A,transformMat4:C,transformMat4Z:function(e,t){return t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]},transformQuat:T,transformQuatValues:E},Symbol.toStringTag,{value:"Module"})),r.d(t,["Il",0,Y,"jb",0,k,"lo",0,V,"uE",0,F])},75503(e,t,r){r.d(t,{wq:()=>o});var i=r(4576),n=r(21818),a=(r(44208),r(15142)),s=r(11006);class o{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),L.prune(),M.prune(),w.prune(),b.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data,i=this._toBBox;if(v(e,r))for(L.clear();r;){for(let n=0,a=r.children.length;n<a;n++){let a=r.children[n],s=r.leaf?i(a):a;v(e,s)&&(r.leaf?t(a):x(e,s)?l(a,t):L.push(a))}r=L.pop()}}collides(e){let t=this._data,r=this._toBBox;if(!v(e,t))return!1;for(L.clear();t;){for(let i=0,n=t.children.length;i<n;i++){let n=t.children[i],a=t.leaf?r(n):n;if(v(e,a)){if(t.leaf||x(e,a))return!0;L.push(n)}}t=L.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){let e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new C([]),this}remove(e){if(!e)return this;let t,r=this._data,a=null,s=0,o=!1,l=this._toBBox(e);for(w.clear(),b.clear();r||w.length>0;){if(r||(r=w.pop(),a=w.data[w.length-1],s=b.pop()??0,o=!0),r.leaf&&(t=(0,i.qh)(r.children,(0,n.z)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),w.push(r),this._condense(w),this;o||r.leaf||!x(r,l)?a?(s++,r=a.children[s],o=!1):r=null:(w.push(r),b.push(s),s=0,a=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,i){let n=r-t+1,a=this._maxEntries;if(n<=a){let i=new C(e.slice(t,r+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(a)),a=Math.ceil(n/a**(i-1)));let s=new A([]);s.height=i;let o=Math.ceil(n/a),l=o*Math.ceil(Math.sqrt(a));_(e,t,r,l,this._compareMinX);for(let n=t;n<=r;n+=l){let t=Math.min(n+l-1,r);_(e,n,t,o,this._compareMinY);for(let r=n;r<=t;r+=o){let n=Math.min(r+o-1,t);s.children.push(this._build(e,r,n,i-1))}}return u(s,this._toBBox),s}_insert(e,t,r){let i=this._toBBox,n=r?e:i(e);w.clear();let a=function(e,t,r,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==r;){let r,i=1/0,n=1/0;for(let a=0,s=t.children.length;a<s;a++){let s=t.children[a],o=y(s),l=g(e,s)-o;l<n?(n=l,i=o<i?o:i,r=s):l===n&&o<i&&(i=o,r=s)}t=r||t.children[0]}return t}(n,this._data,t,w);for(a.children.push(e),h(a,n);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;!function(e,t,r){for(let i=r;i>=0;i--)h(t.data[i],e)}(n,w,t)}_split(e,t){let r=e.data[t],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);let a=this._chooseSplitIndex(r,n,i);if(!a)return;let s=r.children.splice(a,r.children.length-a),o=r.leaf?new C(s):new A(s);o.height=r.height,u(r,this._toBBox),u(o,this._toBBox),t?e.data[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this._data=new A([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let i,n,a;i=n=1/0;for(let s=t;s<=r-t;s++){let t=c(e,0,s,this._toBBox),o=c(e,s,r,this._toBBox),l=f(t,o),u=y(t)+y(o);l<i?(i=l,a=s,n=u<n?u:n):l===i&&u<n&&(n=u,a=s)}return a}_chooseSplitAxis(e,t,r){let i=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,r,i)<this._allDistMargin(e,t,r,n)&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);let n=this._toBBox,a=c(e,0,t,n),s=c(e,r-t,r,n),o=m(a)+m(s);for(let i=t;i<r-t;i++){let t=e.children[i];h(a,e.leaf?n(t):t),o+=m(a)}for(let i=r-t-1;i>=t;i--){let t=e.children[i];h(s,e.leaf?n(t):t),o+=m(s)}return o}_condense(e){for(let t=e.length-1;t>=0;t--){let r=e.data[t];if(0===r.children.length)if(t>0){let n=e.data[t-1],a=n.children;a.splice((0,i.qh)(a,r,a.length,n.indexHint),1)}else this.clear();else u(r,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(M.clear();r;){if(!0===r.leaf)for(let e of r.children)t((0,n.z)(e));else M.pushArray(r.children);r=M.pop()??null}}function u(e,t){c(e,0,e.children.length,t,e)}function c(e,t,r,i,n){n||=new C([]),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let a,s=t;s<r;s++)a=e.children[s],h(n,e.leaf?i(a):a);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){let r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),a=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,a-i)}function x(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _(e,t,r,i,n){let a=[t,r];for(;a.length;){let t=a.pop(),r=a.pop();if(t-r<=i)continue;let o=r+Math.ceil((t-r)/i/2)*i;(0,s.q)(e,o,r,t,n),a.push(r,o,o,t)}}const L=new a.A,M=new a.A,w=new a.A,b=new a.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class C extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class A extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},16494(e,t,r){var i=r(76361);const n=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup",..."animate.animatetransform.circle.clippath.defs.ellipse.g.image.line.lineargradient.marker.mask.path.pattern.polygon.polyline.radialgradient.rect.stop.svg.switch.symbol.text.textpath.tspan.use".split(".")].reduce((e,t)=>(e[t]=[],e),{}),a="align.alink.alt.bgcolor.border.cellpadding.cellspacing.class.color.cols.colspan.coords.d.dir.face.height.hspace.ismap.lang.marginheight.marginwidth.multiple.nohref.noresize.noshade.nowrap.ref.rel.rev.rows.rowspan.scrolling.shape.span.summary.tabindex.title.usemap.valign.value.vlink.vspace.width".split("."),s=new i.I({whiteList:n,onTagAttr:(e,t,r)=>{let i=`${t}="${r}"`;if(a.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),o=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1);r.d(t,["Nd",0,o,"W5",0,s])},90629(e,t,r){r.d(t,{Lz:()=>n,PN:()=>a,cr:()=>s,gs:()=>l,r_:()=>u,tc:()=>o}),r(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function n(e){return e?e/72*96:0}function a(e){return e?72*e/96:0}function s(e){if("string"==typeof e){let t=e.match(i);if(t){let r=Number(t[1]),i=t[3]&&t[3].toLowerCase(),n=e.startsWith("-"),s="px"===i?a(r):r;return n?-s:s}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function o(e=0,t=0){return{x:e,y:t}}function l(e=0,t=0){return[e,t]}function u(e=0,t=0,r=0){return[e,t,r]}},13069(e,t,r){r.d(t,{AG:()=>o,lk:()=>n,vD:()=>s,yS:()=>a});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function a(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}function o(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},80754(e,t,r){r.d(t,{kS:()=>u,kd:()=>l});var i=r(82799),n=r(16930),a=r(60408),s=r(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,s.Ed)(e))for(let r of function(e){return(0,a.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r){if((0,s.aO)(e)){let[r,i]=e.c;r[0]+=t,i[0]+=t;continue}if((0,s.FG)(e)){let[r,i]=e.a;r[0]+=t,i[0]+=t;continue}if((0,s.n1)(e)){let[r,i,n]=e.b;r[0]+=t,i[0]+=t,n[0]+=t;continue}e[0]+=t}for(let r of function(e){return(0,a.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,o])},89056(e,t,r){r.d(t,{b3:()=>h,jZ:()=>c});var i=r(12195),n=r(19419),a=r(537),s=r(95108),o=r(60408),l=r(80754),u=r(21325);function c(e){return d(e,!0)}function h(e){return d(e,!1)}function d(e,t){if(null==e)return null;let r=e.spatialReference,n=(0,u.Vp)(r),s=(0,i.W)(e)?e.toJSON():e;if(!n)return s;let c=(0,u.K8)(r)?102100:4326,h=l.j7[c].maxX,d=l.j7[c].minX;if((0,o.fT)(s))return y(s,h,d);if((0,o.U9)(s))return s.points=s.points.map(e=>y(e,h,d)),s;if((0,o.ZC)(s))return p(s,n);if((0,o.Bi)(s)||(0,o.Rg)(s)){let e=(0,a.Rg)(_,s),r={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},i=(0,l.kd)(r.xmin,d),n=2*h*i,o=0===n?s:(0,l.kS)(s,n);return r.xmin+=n,r.xmax+=n,r.xmax>h?x(o,h,t):r.xmin<d?x(o,d,t):o}return s}function p(e,t){if(!t)return e;let r=function(e,t){let r=[],{ymin:i,ymax:n,xmin:a,xmax:s}=e,o=e.xmax-e.xmin,[l,u]=t.valid,{x:c,frameId:h}=m(e.xmin,t),{x:d,frameId:p}=m(e.xmax,t),y=c===d&&o>0;if(o>2*u){let e={xmin:a<s?c:d,ymin:i,xmax:u,ymax:n},t={xmin:l,ymin:i,xmax:a<s?d:c,ymax:n},o={xmin:0,ymin:i,xmax:u,ymax:n},y={xmin:l,ymin:i,xmax:0,ymax:n},m=[],f=[];g(e,o)&&m.push(h),g(e,y)&&f.push(h),g(t,o)&&m.push(p),g(t,y)&&f.push(p);for(let e=h+1;e<p;e++)m.push(e),f.push(e);r.push(new v(e,[h]),new v(t,[p]),new v(o,m),new v(y,f))}else c>d||y?r.push(new v({xmin:c,ymin:i,xmax:u,ymax:n},[h]),new v({xmin:l,ymin:i,xmax:d,ymax:n},[p])):r.push(new v({xmin:c,ymin:i,xmax:d,ymax:n},[h]));return r}(e,t).map(e=>e.extent);return r.length<2?r[0]||e:r.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:r.map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}}function y(e,t,r){if(Array.isArray(e)){let i=e[0];if(i>t){let r=(0,l.kd)(i,t);e[0]=i+-2*t*r}else if(i<r){let t=(0,l.kd)(i,r);e[0]=i+-2*r*t}}else{let i=e.x;if(i>t){let r=(0,l.kd)(i,t);e.x+=-2*t*r}else if(i<r){let t=(0,l.kd)(i,r);e.x+=-2*r*t}}return e}function m(e,t){let r,[i,n]=t.valid,a=2*n,s=0;return e>n?(r=Math.ceil(Math.abs(e-n)/a),e-=r*a,s=r):e<i&&(r=Math.ceil(Math.abs(e-i)/a),e+=r*a,s=-r),{x:e,frameId:s}}function g(e,t){let{xmin:r,ymin:i,xmax:n,ymax:a}=t;return f(e,r,i)&&f(e,r,a)&&f(e,n,a)&&f(e,n,i)}function f(e,t,r){return t>=e.xmin&&t<=e.xmax&&r>=e.ymin&&r<=e.ymax}function x(e,t,r=!0){let i=!(0,o.Rg)(e);if(i&&(0,s.m3)(e),r)return(new L).cut(e,t);let n=i?e.rings:e.paths,a=i?4:2,l=n.length,u=-2*t;for(let e=0;e<l;e++){let t=n[e];if(t&&t.length>=a){let e=[];for(let[r,...i]of t)e.push([r+u,...i]);n.push(e)}}return i?e.rings=n:e.paths=n,e}class v{constructor(e,t){this.extent=e,this.frameIds=t}}const _=(0,n.vt)();class L{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let r;if(this._xCut=t,e.rings)this._closed=!0,r=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,r=e.paths,this._minPts=2}for(let e of r){if(!e||e.length<this._minPts)continue;let t=!0;for(let r of e)t?(this.moveTo(r),t=!1):this.lineTo(r);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),r=[];for(let e of this._linesIn)e&&e.length>=this._minPts&&r.push(e);let i=-2*this._xCut;for(let e of this._linesOut)if(e&&e.length>=this._minPts){for(let t of e)t[0]+=i;r.push(e)}return this._closed?e.rings=r:e.paths=r,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e,this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){let t=this._side(e[0]);if(t*this._prevSide===-1){let r=this._intersect(this._prevPt,e);this._lineTo(r,0),this._prevSide=0,this._lineTo(e,t)}else this._lineTo(e,t);this._prevSide=t,this._prevPt=e}close(){let e=this._firstPt,t=this._prevPt;(e[0]!==t[0]||e[1]!==t[1])&&this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t){this._closed?(this._lineIn.push(M(e,t<=0?e[0]:this._xCut)),this._lineOut.push(M(e,t>=0?e[0]:this._xCut))):(t<=0&&this._lineIn.push(e.slice()),t>=0&&this._lineOut.push(e.slice()))}_lineTo(e,t){this._closed?(w(this._lineIn,e,t<=0?e[0]:this._xCut),w(this._lineOut,e,t>=0?e[0]:this._xCut)):t<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push(e.slice())):t>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push(e.slice())):this._prevSide<0?(this._lineIn.push(e.slice()),this._lineOut.push(e.slice())):this._prevSide>0&&(this._lineOut.push(e.slice()),this._lineIn.push(e.slice()))}_checkClosingPt(e){let t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0]=e[t-2].slice(),e.pop())}_side(e){return e<this._xCut?-1:+(e>this._xCut)}_intersect(e,t){let r=(this._xCut-e[0])/(t[0]-e[0]),i=[this._xCut,e[1]+r*(t[1]-e[1])],n=Math.min(e.length,t.length);for(let a=2;a<n;a++)i.push(e[a]+r*(t[a]-e[a]));return i}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function M(e,t){let r=e.slice();return r[0]=t,r}function w(e,t,r){let i=e.length;i>1&&e[i-1][0]===r&&e[i-2][0]===r?e[i-1]=M(t,r):e.push(M(t,r))}},99557(e,t,r){r.r(t),r.d(t,{default:()=>Pe});var i=r(32198),n=r(7762),a=r(49186),s=r(53966),o=r(25728),l=r(17676),u=r(91429),c=r(16930),h=r(4146),d=r(63074),p=r(34287),y=r(8303),m=r(25036),g=r(48237),f=r(56507),x=r(21287),v=r(84952),_=r(13069),L=r(92474),M=r(64108);let w=0;const b=e=>{let t=e,r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:w++})}};return r=(0,i.Cg)([(0,M.$)("esri.core.NumericIdentifiable")],r),r};var I=r(90629),S=r(35666),C=r(5443),A=r(86738),T=r(21325),E=r(56560),P=r(69540),O=r(83529),R=r(29242),B=r(37585),G=r(48163),k=r(39829),U=r(99917),Z=r(33905);const W=(0,G.vt)();let V=class extends((0,Z.L)(P.Pw)){constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:r,bottomRight:i}=this;if(null==e||null==t||null==r||null==i)return null;let n=e.spatialReference;return t=this.projectOrWarn(t,n),r=this.projectOrWarn(r,n),i=this.projectOrWarn(i,n),null==t||null==r||null==i?null:new k.A({rings:[[[r.x,r.y],[e.x,e.y],[t.x,t.y],[i.x,i.y],[r.x,r.y]]],spatialReference:n})}set coords(e){let{topLeft:t}=this;if(null==t)return;let r=t.spatialReference;if(null==(e=this.projectOrWarn(e,r)))return;let{rings:[[i,n,a,s]]}=e;this.bottomLeft=new A.A({x:i[0],y:i[1],spatialReference:r}),this.topLeft=new A.A({x:n[0],y:n[1],spatialReference:r}),this.topRight=new A.A({x:a[0],y:a[1],spatialReference:r}),this.bottomRight=new A.A({x:s[0],y:s[1],spatialReference:r})}toSourceNormalized(e){let{topLeft:t,topRight:r,bottomRight:i,bottomLeft:n}=this;if(null==e||null==t||null==r||null==i||null==n)return null;let a=t.spatialReference;e=e.normalize();let s=(0,U.projectOrLoad)(e,a).geometry;if(null==s)return null;(0,B.hZ)(W,s.x,s.y);let o=(0,O.O)((0,R.vt)(),[t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y],[0,0,0,1,1,0,1,1]);return(0,O.W)(W,W,o),(0,I.tc)(W[0],W[1])}};(0,i.Cg)([(0,u.MZ)({clonable:!1})],V.prototype,"coords",null),(0,i.Cg)([(0,u.MZ)({type:A.A})],V.prototype,"bottomLeft",void 0),(0,i.Cg)([(0,u.MZ)({type:A.A})],V.prototype,"bottomRight",void 0),(0,i.Cg)([(0,u.MZ)({type:A.A})],V.prototype,"topLeft",void 0),(0,i.Cg)([(0,u.MZ)({type:A.A})],V.prototype,"topRight",void 0),V=(0,i.Cg)([(0,u.$K)("esri.layers.support.CornersGeoreference")],V);const Y=V;var F=r(34727),H=r(34304);let j=class extends((0,Z.L)(P.Pw)){constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;let e,{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:a}=this.extent;if(this.rotation){let{x:a,y:s}=this.extent.center,o=D(a,s,this.rotation);e=[o(t,r),o(t,n),o(i,n),o(i,r)],e.push(e[0])}else e=[[t,r],[t,n],[i,n],[i,r],[t,r]];return new k.A({rings:[e],spatialReference:a})}set coords(e){if(null==e||null==this.extent)return;let t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;let{rings:[[r,i,n]],extent:{center:{x:a,y:s}}}=e,o=(0,F.KJ)(Math.PI/2-Math.atan2(i[1]-r[1],i[0]-r[0])),l=D(a,s,-o),[u,c]=l(r[0],r[1]),[h,d]=l(n[0],n[1]);this.extent=new C.A({xmin:u,ymin:c,xmax:h,ymax:d,spatialReference:t}),this.rotation=o}toSourceNormalized(e){let{extent:t,rotation:r}=this;if(null==e||null==t)return null;let{xmin:i,ymin:n,xmax:a,ymax:s,center:o,spatialReference:l}=t;e=e.normalize();let u=(0,U.projectOrLoad)(e,l).geometry;if(null==u)return null;let c=u.x,h=u.y;return r&&([c,h]=D(o.x,o.y,-r)(c,h)),(0,I.tc)((0,F.hs)(c,i,a,0,1),(0,F.hs)(h,s,n,0,1))}};function D(e,t,r){let i=(0,H.DF)(r),n=Math.cos(i),a=Math.sin(i);return(r,i)=>[n*(r-e)+a*(i-t)+e,n*(i-t)-a*(r-e)+t]}(0,i.Cg)([(0,u.MZ)({clonable:!1})],j.prototype,"coords",null),(0,i.Cg)([(0,u.MZ)({type:C.A})],j.prototype,"extent",void 0),(0,i.Cg)([(0,u.MZ)({type:Number})],j.prototype,"rotation",void 0),j=(0,i.Cg)([(0,u.$K)("esri.layers.support.ExtentAndRotationGeoreference")],j);const X=j,q={key:"type",base:null,typeMap:{"control-points":g.A,corners:Y,"extent-and-rotation":X}},N={key:"type",base:null,typeMap:{"control-points":g.A}};function z(e,t){let r=(0,S.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=r&&r>3}function $(e,t,r){return{enabled:!z(r?.layer,r?.origin),ignoreOrigin:!0}}const K={json:{name:"url",type:String,write:{overridePolicy:$}}},J={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:$}}},Q={types:q,json:{types:N,write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};var ee=r(59923),te=r(36005),re=r(43937);let ie=class extends(b((0,o.M)(L.x_))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return g.A.fromJSON(e)}writeGeoreference(e,t,r,i){let n=i?.resources?.pendingOperations,a=()=>{let n=function(e,t,r){if(!e||"control-points"===e.type)return e;let{coords:i}=e;if(5!==i?.rings[0]?.length)return null;let[n,a,s,o]=i.rings[0],{spatialReference:l}=i;return new g.A({controlPoints:[new E.A({mapPoint:new A.A({x:n[0],y:n[1],spatialReference:l}),sourcePoint:(0,I.tc)(0,r)}),new E.A({mapPoint:new A.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,I.tc)(0,0)}),new E.A({mapPoint:new A.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,I.tc)(t,0)}),new E.A({mapPoint:new A.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,I.tc)(t,r)})],width:t,height:r})}(this.georeference,this.contentWidth,this.contentHeight);if(n){if("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==n.controlPoints?.length)return void(0,ee.qt)(i,"ControlPointsGeoreference.controlPoints","only 'control-points' georeference with 4 control points may be persisted.");t[r]=n.write({},i)}};if("control-points"!==e.type&&!this.loaded&&n)return t[r]={},void n.push(this.load().then(a));a()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){let{georeference:t,contentWidth:r,contentHeight:i}=this;if(null==e||null==t||0===r||0===i)return null;let n=t.toSourceNormalized(e);return null==n?null:(n.x*=r,n.y*=i,n)}};(0,i.Cg)([(0,u.MZ)(Q)],ie.prototype,"georeference",void 0),(0,i.Cg)([(0,te.w)("georeference")],ie.prototype,"readGeoreference",null),(0,i.Cg)([(0,re.K)("georeference")],ie.prototype,"writeGeoreference",null),(0,i.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],ie.prototype,"opacity",void 0),ie=(0,i.Cg)([(0,u.$K)("esri.layers.support.MediaElementBase")],ie);var ne=r(85648);const ae=Symbol("ImageElementInstance"),se=Symbol("VideoElementInstance");function oe(e){return"object"==typeof e&&!!e&&ae in e}function le(e){return oe(e)||function(e){return"object"==typeof e&&!!e&&se in e}(e)}var ue,ce=r(97159);let he=class extends ie{static{ue=ae}constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this[ue]=!0,this.image=null}load(){let e=this.image;if("string"==typeof e){let t=(0,x.M5)(e).then(e=>{this._set("content",e)});this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){let t=e.decode().then(()=>{this._set("content",e)});this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new a.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,r){return(0,ce.f)(t.url,r)}writeImage(e,t,r,i){if(null==e)return;let n=i?.portalItem,a=i?.resources;if(!n||!a)return void("string"==typeof e&&(t[r]=(0,ce.t)(e,i)));let s=function(e){return"string"==typeof e&&!(0,v.DB)(e)&&!(0,v.w8)(e)}(e)?e:null;if(s){if(null==(0,ce.i)(s))return void(t[r]=s);let e=(0,ce.t)(s,{...i,verifyItemRelativeUrls:i?.verifyItemRelativeUrls?{writtenUrls:i.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1);if(n&&e&&!(0,v.oP)(e))return a.toKeep.push({resource:n.resourceFromPath(e),compress:!1}),void(t[r]=e)}t[r]="<pending>",a.pendingOperations.push(async function(e){return"string"==typeof e?(0,v.DB)(e)?(0,v.N9)(e):(await(0,f.A)(e,{responseType:"blob"})).data:new Promise(t=>function(e){if(e instanceof HTMLCanvasElement)return e;let t=e instanceof HTMLImageElement?e.naturalWidth:e.width,r=e instanceof HTMLImageElement?e.naturalHeight:e.height,i=document.createElement("canvas"),n=i.getContext("2d");return i.width=t,i.height=r,e instanceof HTMLImageElement?n.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&n.putImageData(e,0,0),i}(e).toBlob(t))}(e).then(e=>{let i=function(e,t){let r=(0,_.lk)(),i=`${(0,v.fj)("media",r)}.${(0,ne.n)({type:"blob",blob:e})}`;return t.resourceFromPath(i)}(e,n);t[r]=i.itemRelativeUrl,a.toAdd.push({resource:i,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})}))}};(0,i.Cg)([(0,u.MZ)()],he.prototype,"animationOptions",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],he.prototype,"content",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],he.prototype,"contentWidth",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],he.prototype,"contentHeight",null),(0,i.Cg)([(0,u.MZ)(K)],he.prototype,"image",void 0),(0,i.Cg)([(0,te.w)("image",["url"])],he.prototype,"readImage",null),(0,i.Cg)([(0,re.K)("image")],he.prototype,"writeImage",null),(0,i.Cg)([(0,u.MZ)(J)],he.prototype,"type",void 0),he=(0,i.Cg)([(0,u.$K)("esri.layers.support.ImageElement")],he);var de=r(62885),pe=r(65529),ye=r(61893),me=r(36708),ge=r(19419),fe=r(12176),xe=r(6518),ve=r(69622),_e=r(89056);let Le=class extends ve.A{constructor(e){super(e)}get bounds(){let e=this.coords;return null==e?.extent?null:(0,ge.VY)(e.extent)}get coords(){let e=this.element.georeference?.coords;return(0,U.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return k.A.fromJSON((0,_e.jZ)(this.coords))}get normalizedBounds(){let e=null==this.normalizedCoords?null:this.normalizedCoords.extent;return null==e?null:(0,ge.VY)(e)}};(0,i.Cg)([(0,u.MZ)()],Le.prototype,"spatialReference",void 0),(0,i.Cg)([(0,u.MZ)()],Le.prototype,"element",void 0),(0,i.Cg)([(0,u.MZ)()],Le.prototype,"bounds",null),(0,i.Cg)([(0,u.MZ)()],Le.prototype,"coords",null),(0,i.Cg)([(0,u.MZ)()],Le.prototype,"normalizedCoords",null),(0,i.Cg)([(0,u.MZ)()],Le.prototype,"normalizedBounds",null),Le=(0,i.Cg)([(0,u.$K)("esri.layers.support.MediaElementView")],Le);var Me,we=r(16494),be=r(38969);const Ie=Symbol("canplay");let Se=class extends ie{static{Me=se}constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video",this[Me]=!0}load(){let e=this.video;return"string"==typeof e?this.addResolvingPromise(this._preProcessVideoUrl(e).then(async e=>{let t=document.createElement("video");return t.src=we.W5.sanitizeUrl((0,v.s2)(e)),t.crossOrigin="anonymous",t.autoplay=this.autoplay,t.muted=!0,t.loop=!0,t.playsInline=!0,this._loadVideo(t).then(()=>{this._set("content",t)})})):e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then(()=>{this._set("content",e)})):this.addResolvingPromise(Promise.reject(new a.A("video-element:invalid-video-type","Invalid video type",{video:e}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.content?.currentTime}set currentTime(e){if(!this.content)return;let t=(0,F.qE)(e,0,this.content.duration);"fastSeek"in this.content?this.content.fastSeek(t):this.content.currentTime=t,this.content.play().then(()=>{this.content?.pause()}).catch(()=>{})}get duration(){return this.content?.duration}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(e,t,r,i){if(!e)return void(i?.messages&&i.messages.push(new a.A("video-element:unsupported-video","video source is missing")));let n=function(e){return"string"==typeof e&&!(0,v.DB)(e)&&!(0,v.w8)(e)}(e)?e:null;if(!n)return void(i?.messages&&i.messages.push(new a.A("video-element:unsupported-video","video source must be an absolute url")));!(0,v.oP)(n)&&i?.blockedRelativeUrls&&i.blockedRelativeUrls.push(n);let s=(0,v.s2)(n);(0,ce.i)(s)?i?.messages&&i.messages.push(new a.A("video-element:unsupported-video","video source cannot be an item resource")):t[r]=s}async _preProcessVideoUrl(e){if((0,v.zs)(e))return(0,v.yM)(e);try{return await(0,f.A)(e,{method:"head"}),e}catch{try{return(0,v.yM)(e,!0)}catch{return e}}}async _loadVideo(e){"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",(0,v.w8)(e.src)||(e.src=e.src));try{await(0,be.i)(e,e=>this.addHandles(e,Ie)),this.autoplay&&await e.play().catch(e=>{throw console.error(e),e})}finally{this.removeHandles(Ie)}}};(0,i.Cg)([(0,u.MZ)()],Se.prototype,"autoplay",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"content",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"contentWidth",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Se.prototype,"contentHeight",null),(0,i.Cg)([(0,u.MZ)({type:Number})],Se.prototype,"currentTime",null),(0,i.Cg)([(0,u.MZ)({type:Number})],Se.prototype,"duration",null),(0,i.Cg)([(0,u.MZ)(K)],Se.prototype,"video",null),(0,i.Cg)([(0,re.K)("video")],Se.prototype,"writeVideo",null),(0,i.Cg)([(0,u.MZ)(J)],Se.prototype,"type",void 0),Se=(0,i.Cg)([(0,u.$K)("esri.layers.support.VideoElement")],Se);const Ce={key:"type",defaultKeyValue:"image",base:ie,typeMap:{image:he,video:Se}},Ae=n.A.ofType(Ce);let Te=class extends((0,L.WV)((0,ye.g)(pe.nJ))){constructor(e){super(e),this._index=new xe.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(let t of e.removed){let e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}let{spatialReference:t}=this;for(let r of e.added){if(this._elementViewsMap.get(r))continue;let e=new Le({spatialReference:t,element:r});this._elementViewsMap.set(r,e);let i=(0,me.wB)(()=>e.coords,()=>this._updateIndexForElement(e,!1));this._updateIndexForElement(e,!0),this.addHandles(i,e)}this._elementsIndexes.clear(),this.elements.forEach((e,t)=>this._elementsIndexes.set(e,t)),this.emit("refresh")},this.elements=new Ae}async load(e){if((0,l.Te)(e),!this.spatialReference){let e=this.elements.find(e=>null!=e.georeference?.coords);this._set("spatialReference",e?e.georeference.coords.spatialReference:c.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}get elements(){return this._get("elements")}set elements(e){this._set("elements",(0,de.V)(e,this._get("elements"),Ae))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;let e=this._index.fullBounds;return null==e?null:new C.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,U.initializeProjection)(e.spatialReference,this.spatialReference,null,t);let r=(0,T.aI)(e.spatialReference,this.spatialReference)?e:(0,U.project)(e,this.spatialReference);if(!r)return[];let i=r.normalize(),n=[];for(let e of i)this._index.forEachInBounds((0,ge.VY)(e),({normalizedCoords:t,element:r})=>{null!=t&&(0,fe.fA)(e,t)&&n.push(r)});return n.sort((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t)),n}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){let r=e.normalizedBounds,i=this._index.has(e),n=null!=r;this._index.delete(e),n&&this._index.set(e,r),this.notifyChange("fullExtent"),t||(i===n?this.emit("change",{element:e.element}):this.emit("refresh"))}};(0,i.Cg)([(0,u.MZ)()],Te.prototype,"elements",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Te.prototype,"fullExtent",null),(0,i.Cg)([(0,u.MZ)()],Te.prototype,"spatialReference",null),Te=(0,i.Cg)([(0,u.$K)("esri.layers.support.LocalMediaElementSource")],Te);let Ee=class extends((0,d.dM)((0,m.j)((0,p.q)((0,y.A)((0,o.M)(h.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{let{save:n,saveAs:a}=await r.e(3561).then(()=>r(63561));switch(e){case 0:return n(this,t);case 1:return a(this,i,t)}}),this.source=new Te}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new a.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");let r=this._getSourceOverride(t,this.georeference);r&&(this.setAtOrigin("source",r,"web-map"),this.setAtOrigin("source",r,"web-scene"),t=r);let i=le(t)?new Te({elements:new n.A([t])}):t;this._set("effectiveSource",i),this.spatialReference&&(i.spatialReference=this.spatialReference),await i.load(e),this.spatialReference=i.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}get loaded(){return super.loaded}get source(){return this._get("source")}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new Te({elements:new n.A(e)}):e instanceof n.A?new Te({elements:e}):e:null}readSource(e,t,r){if("itemId"in t&&t.itemId)return;let i=this._createSource(t);return i?.read(t,r),i}writeSource(e,t,r,i){if(e&&e instanceof Te){let t=e.elements.length;if(1!==t)return void(i?.messages&&i.messages.push(new a.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}le(e)?e.write(t,i):i?.messages&&(e?i.messages.push(new a.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):i.messages.push(new a.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new he;case"video":return new Se}return null}_getSourceOverride(e,t){if(le(e)&&3===this.originIdOf("source")&&t&&(5===this.originIdOf("georeference")||4===this.originIdOf("georeference"))){let r=e.toJSON(),i=this._createSource(r);return i.read({...r},{origin:"portal-item"}),i.read({georeference:t},{origin:"web-map"}),i.read({georeference:t},{origin:"web-scene"}),i}return null}};(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Ee.prototype,"effectiveSource",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],Ee.prototype,"georeference",void 0),(0,i.Cg)([(0,te.w)("web-document","georeference")],Ee.prototype,"readGeoreference",null),(0,i.Cg)([(0,u.MZ)({type:String})],Ee.prototype,"copyright",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Ee.prototype,"fullExtent",null),(0,i.Cg)([(0,u.MZ)({type:["MediaLayer"]})],Ee.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,u.MZ)({type:["show","hide"]})],Ee.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:g.A}},overridePolicy(e,t,r){return{enabled:!0,allowNull:!1,ignoreOrigin:z(this,r?.origin)&&le(e)&&!!e.georeference&&e.originIdOf("georeference")>3}}}}})],Ee.prototype,"source",null),(0,i.Cg)([(0,u.wg)("source")],Ee.prototype,"castSource",null),(0,i.Cg)([(0,te.w)("source",["url"])],Ee.prototype,"readSource",null),(0,i.Cg)([(0,re.K)("source")],Ee.prototype,"writeSource",null),(0,i.Cg)([(0,u.MZ)({type:c.A})],Ee.prototype,"spatialReference",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Ee.prototype,"type",void 0),Ee=(0,i.Cg)([(0,u.$K)("esri.layers.MediaLayer")],Ee);const Pe=Ee},6518(e,t,r){r.d(t,{F:()=>o});var i=r(44208),n=r(75503),a=r(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let e=Array(this._idByBounds.size),t=0;this._idByBounds.forEach((r,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let e=(0,a.Ie)();for(let t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){let t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,r){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,r)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){let t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},34287(e,t,r){var i=r(32198),n=r(49186),a=r(84952),s=r(91429),o=r(78888),l=r(89317),u=r(45917),c=r(49422),h=r(10873),d=r(6345),p=r(79677),y=r(59923),m=r(36005),g=r(43937);r.d(t,["q",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,c.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r){e&&(t[r]=e)}writeTitle(e,t){t.title=e??"Layer"}readVisibilityTimeExtent(e){return e?p.A.fromArray(e):null}writeVisibilityTimeExtent(e,t,r,i){if(e&&"tables"!==i.layerContainerType){if(e.isEmpty)return void(i?.messages&&i.messages.push(new n.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")));t[r]=e.toArray()}}read(e,t){t&&(t.layer=this),(0,u.t)(this,e,t=>super.read(e,t),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin&&!(0,d.Bu)(t,this.operationalLayerType,this.type))return(0,y.U4)(t,this),null;let r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter(e=>e instanceof n.A&&"web-document-write:property-required"===e.name).length;return(0,a.w8)(r?.url)?(t?.messages?.push(new n.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],r.prototype,"id",void 0),(0,i.Cg)([(0,m.w)("id",["id"])],r.prototype,"readId",null),(0,i.Cg)([(0,s.MZ)(h.C1)],r.prototype,"listMode",void 0),(0,i.Cg)([(0,g.K)("listMode")],r.prototype,"writeListMode",null),(0,i.Cg)([(0,s.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:l.K,isRequired:!0}}}}})],r.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,g.K)("operationalLayerType")],r.prototype,"writeOperationalLayerType",null),(0,i.Cg)([(0,s.MZ)(h.ke)],r.prototype,"opacity",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,readOnly:!1})],r.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],r.prototype,"title",void 0),(0,i.Cg)([(0,g.K)("title"),(0,g.K)(["web-scene"],"title")],r.prototype,"writeTitle",null),(0,i.Cg)([(0,s.MZ)({type:p.A,json:{origins:{"web-scene":{write:{layerContainerTypes:l.K}}}}})],r.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,m.w)("visibilityTimeExtent")],r.prototype,"readVisibilityTimeExtent",null),(0,i.Cg)([(0,g.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[o.jz,o.Uv]]}})],r.prototype,"writeVisibilityTimeExtent",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{name:"visibility",write:{layerContainerTypes:l.K}}})],r.prototype,"visible",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.OperationalLayer")],r),r}])},8303(e,t,r){var i=r(32198),n=r(92602),a=r(70333),s=r(56507),o=r(60999),l=r(49186),u=r(36563),c=r(53966),h=r(97768),d=r(17676),p=r(84952),y=r(91429),m=r(77548),g=r(20655),f=r(80812),x=r(41318),v=r(10407),_=r(36005),L=r(43937);const M={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,w=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new f.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:n}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,n,s=!a.id?.findCredential(this.url),o=e===r.id;if(o&&r.portal.user)return this._getUserPrivileges(r,s);if(o)i=r.portal.url;else try{i=await(0,m.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!i||!(0,p.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;n=await(a.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(o?await r.reload():(r=new f.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,d.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,v.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?a.id?.findCredential(this.url):null;if(!t)return!0;let r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=a.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,n=g.A.getDefault();if(n&&n.loaded&&(0,p.S8)(n.restUrl)===(0,p.S8)(i))return n.user;let l=`${i}/community/self`,u=null==e?null:e.signal,c=await(0,o.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?x.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){let r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&i&&!(0,p.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,y.MZ)({type:f.default})],w.prototype,"portalItem",null),(0,i.Cg)([(0,_.w)("web-document","portalItem",["itemId"])],w.prototype,"readPortalItem",null),(0,i.Cg)([(0,L.K)("web-document","portalItem",{itemId:{type:String}})],w.prototype,"writePortalItem",null),(0,i.Cg)([(0,y.MZ)({clonable:!1})],w.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasUpdateItemPrivileges",void 0),w=(0,i.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],w),w}])},6345(e,t,r){r.d(t,{Bu:()=>v,VH:()=>x});var i=r(44208);const n={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},a={ArcGISAnnotationLayer:"AnnotationFeatureLayer",ArcGISDimensionLayer:"DimensionFeatureLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",get ParquetLayer(){return(0,i.A)("parquetlayer-persistence-enabled")?"ParquetLayer":"UnsupportedLayer"},SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},s={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},o={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},l={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},u={ArcGISTiledElevationServiceLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},c={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CSV:"CSVLayer",CatalogLayer:"CatalogLayer",GaussianSplatLayer:"GaussianSplatLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",Object3DTilesLayer:"UnsupportedLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},h={ArcGISFeatureLayer:"FeatureLayer"},d={...a,LinkChartLayer:"LinkChartLayer"},p=n,y=s,m={ArcGISAnnotationLayer:"AnnotationFeatureLayer",ArcGISDimensionLayer:"DimensionFeatureLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",BuildingSceneLayer:"BuildingSceneLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",MediaLayer:"MediaLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",SubtypeGroupLayer:"SubtypeGroupLayer",WCS:"WCSLayer"},g=s;function f(e){switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap-base-layers":return o;case"basemap-ground-layers":return l;case"ground":return u;case"tables":return h;default:return c}case"link-chart":switch(e.layerContainerType){case"basemap-base-layers":return p;case"tables":return y;default:return d}default:switch(e.layerContainerType){case"basemap-base-layers":return n;case"tables":return s;case"ground":case"basemap-ground-layers":return;default:return a}}}function x(e,t){if(!t)return"UnknownLayer";if("DefaultTileLayer"===t){let t="UnknownLayer";if("web-scene"===e.origin)switch(e.layerContainerType){case"operational-layers":case"basemap-base-layers":t="TileLayer";break;case"ground":t="ElevationLayer"}else switch(e.layerContainerType){case"basemap-base-layers":case"operational-layers":t="TileLayer"}return t}return f(e)?.[t]??"UnknownLayer"}function v(e,t,r){if(!e?.origin)return!1;switch(e.origin){case"web-map":case"link-chart":if("operational-layers"===e.layerContainerType&&"ArcGISDimensionLayer"===t&&"dimension-feature"!==r)return!1;break;case"web-scene":if("operational-layers"===e.layerContainerType)switch(t){case"ArcGISDimensionLayer":if("dimension"!==r)return!1;break;case"ArcGISTiledElevationServiceLayer":return!1}break;case"portal-item":if("ArcGISDimensionLayer"===t&&"dimension-feature"!==r)return!1}let i=function(e){if("portal-item"===e.origin)switch(e.layerContainerType){case"basemap-base-layers":case"ground":case"basemap-ground-layers":return;case"tables":return g;default:return m}return f(e)}(e)?.[t];return null!=i&&"UnknownLayer"!==i&&"UnsupportedLayer"!==i}},38969(e,t,r){r.d(t,{i:()=>n});var i=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",n)))})}},10407(e,t,r){r.d(t,{It:()=>p,LG:()=>s,OM:()=>u,Sm:()=>c,Y:()=>o,bK:()=>l,sQ:()=>h});var i=r(99917),n=r(16930),a=r(28735);function s(e,t){if(!o(e,t)){let r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return o(e,d.HOSTED_SERVICE)}function u(e,t){let r=e.typeKeywords;if(r){let e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?s(e,t):u(e,t)}async function h(e){let t,r=e.clone().normalize();if(r.length>1)for(let e of r)t?e.width>t.width&&(t=e):t=e;else t=r[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,a.ci)(e);let r=n.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(t)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",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",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function p(e){let{portal:t,isOrgItem:r,itemControl:i}=e,n=t.user?.privileges,a=!n||n.includes("features:user:edit"),s=!!r&&!!n?.includes("features:user:fullEdit"),o="update"===i||"admin"===i;return o?s=a=!0:s&&(a=!0),{features:{edit:a,fullEdit:s},content:{updateItem:o}}}r.d(t,["mm",0,d])},85648(e,t,r){r.d(t,{n:()=>n});var i=r(84952);function n(e){return a[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){let t=(0,i.Zo)(e);return l[t]||s}(e.url)}(e)]||o}const a={},s="text/plain",o=a[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(let e in l)a[l[e]]=e},78553(e,t,r){r.d(t,{D:()=>a,p:()=>n});var i=r(78888);function n(e){let t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function a(e){let t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2170],{69540(t,e,i){var n=i(32198),s=i(69622),r=(i(44208),i(4718)),h=(i(53966),i(97768)),o=i(88620),a=i(64108);const l=Symbol("ClonableMixin"),u=t=>{var e;let i=t,s=class extends i{constructor(){super(...arguments),this[e]=!0}static{e=l}clone(t){let e=(0,o.oY)(this);(0,h.Lw)(e,"unable to clone instance of non-accessor class");let i=e.metadata,n=e.store,s={},a=new Map;for(let e in i){let h=i[e],o=n?.originOf(e),l=h.clonable;if(h.readOnly||!1===l||7!==o&&0!==o&&5!==o&&4!==o)continue;let u=this[e],f=null;if("function"==typeof l)f=l(u,t);else if("reference"===l)f=u;else if(f=(0,r.TU)(u,t),null!=u&&null==f)continue;0===o?a.set(e,f):s[e]=f}let l=new(0,Object.getPrototypeOf(this).constructor)(s);if(a.size){let t=(0,o.oY)(l)?.store;if(t)for(let[e,i]of a)t.set(e,i,0)}return l}};return s=(0,n.Cg)([(0,a.$)("esri.core.Clonable")],s),s},f=u(s.A);i.d(e,["OU",0,u,"Pw",0,f])},67482(t,e,i){function n(t){return null!==s(t)}function s(t){return function(t){let e=r.exec(t);if(!e?.groups)return null;let i=e.groups,n=+i.year,s=i.month-1,h=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),l=+(i.seconds??"0");if(o>23||a>59||l>59)return null;let u,f=i.ms??"0",c=f?+f.padEnd(3,"0").slice(0,3):0;if(i.isUTC||!i.offsetSign)u=Date.UTC(n,s,h,o,a,l,c);else{let t=+i.offsetHours,e=+i.offsetMinutes;u=6e4*("+"===i.offsetSign?-1:1)*(60*t+e)+Date.UTC(n,s,h,o,a,l,c)}return Number.isNaN(u)?null:u}(t)??function(t){let e=new Date(t),i=e.getTime();return Number.isNaN(i)?null:t.toLowerCase()===e.toUTCString().toLowerCase()?i:null}(t)??function(t){if(!h.test(t))return null;let e=new Date(t);return Number.isNaN(e.getTime())?null:e.getTime()-6e4*e.getTimezoneOffset()}(t)}i.d(e,{C:()=>n,_:()=>s});const r=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,h=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(t,e,i){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(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]]}i.d(e,{o8:()=>s,vt:()=>n});const r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:s,create:n,fromValues:function(t,e,i,n,s,r,h,o,a,l,u,f,c,d,y,_){return[t,e,i,n,s,r,h,o,a,l,u,f,c,d,y,_]}},Symbol.toStringTag,{value:"Module"})),i.d(e,["zK",0,r])},35522(t,e,i){i.d(e,{$A:()=>T,Bw:()=>r,C:()=>h,Cc:()=>B,DI:()=>b,Io:()=>g,Ln:()=>p,Om:()=>I,Qr:()=>f,Re:()=>l,S8:()=>v,T9:()=>_,WQ:()=>a,Z0:()=>A,_S:()=>d,aI:()=>O,ei:()=>P,fw:()=>C,gL:()=>S,hG:()=>x,hZ:()=>o,hs:()=>m,jk:()=>y,lw:()=>u,m3:()=>M,oW:()=>X,t2:()=>Y,tn:()=>c,ze:()=>w});var n=i(51850),s=i(34304);function r(t){let e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t}function a(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function l(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function u(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function f(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function c(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function _(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function m(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function p(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t}function g(t,e){let i=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(i*i+n*n+s*s)}function x(t,e){let i=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return i*i+n*n+s*s}function M(t){let e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function w(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function b(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function v(t,e=t){let i=e[0],n=e[1],s=e[2],r=i*i+n*n+s*s;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r),t}function I(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function T(t,e,i){let n=e[0],s=e[1],r=e[2],h=i[0],o=i[1],a=i[2];return t[0]=s*a-r*o,t[1]=r*h-n*a,t[2]=n*o-s*h,t}function B(t,e,i,n){let s=e[0],r=e[1],h=e[2];return t[0]=s+n*(i[0]-s),t[1]=r+n*(i[1]-r),t[2]=h+n*(i[2]-h),t}function A(t,e,i){let n=e[0],s=e[1],r=e[2];return t[0]=i[0]*n+i[4]*s+i[8]*r+i[12],t[1]=i[1]*n+i[5]*s+i[9]*r+i[13],t[2]=i[2]*n+i[6]*s+i[10]*r+i[14],t}function P(t,e,i){let n=e[0],s=e[1],r=e[2];return t[0]=n*i[0]+s*i[3]+r*i[6],t[1]=n*i[1]+s*i[4]+r*i[7],t[2]=n*i[2]+s*i[5]+r*i[8],t}function S(t,e,i){return C(t,e,i[0],i[1],i[2],i[3])}function C(t,e,i,n,s,r){let h=e[0],o=e[1],a=e[2],l=n*a-s*o,u=s*h-i*a,f=i*o-n*h,c=n*f-s*u,d=s*l-i*f,y=i*u-n*l,_=2*r;return t[0]=h+l*_+2*c,t[1]=o+u*_+2*d,t[2]=a+f*_+2*y,t}const R=(0,n.vt)(),F=(0,n.vt)();function Y(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function O(t,e){if(t===e)return!0;let i=t[0],n=t[1],r=t[2],h=e[0],o=e[1],a=e[2],l=(0,s.FD)();return Math.abs(i-h)<=l*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(n-o)<=l*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=l*Math.max(1,Math.abs(r),Math.abs(a))}function X(t,e,i){let n=i[0]-e[0],s=i[1]-e[1],r=i[2]-e[2],h=n*n+s*s+r*r;return h>0?(h=1/Math.sqrt(h),t[0]=n*h,t[1]=s*h,t[2]=r*h,t):(t[0]=0,t[1]=0,t[2]=0,t)}const j=l,Z=u,E=f,L=g,G=x,k=r,q=M;Object.freeze(Object.defineProperty({__proto__:null,abs:c,add:a,angle:function(t,e){v(R,t),v(F,e);let i=I(R,F);return i>1?0:i<-1?Math.PI:Math.acos(i)},bezier:function(t,e,i,n,s,r){let h=1-r,o=h*h,a=r*r,l=o*h,u=3*r*o,f=3*a*h,c=a*r;return t[0]=e[0]*l+i[0]*u+n[0]*f+s[0]*c,t[1]=e[1]*l+i[1]*u+n[1]*f+s[1]*c,t[2]=e[2]*l+i[2]*u+n[2]*f+s[2]*c,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,i=1){return t[0]=Math.min(Math.max(t[0],e),i),t[1]=Math.min(Math.max(t[1],e),i),t[2]=Math.min(Math.max(t[2],e),i),t},copy:h,cross:T,crossAndNormalize:function(t,e,i){let n=e[0],s=e[1],r=e[2],h=i[0],o=i[1],a=i[2],l=s*a-r*o,u=r*h-n*a,f=n*o-s*h,c=Math.sqrt(l*l+u*u+f*f);return t[0]=l/c,t[1]=u/c,t[2]=f/c,t},direction:X,dist:L,distance:g,div:E,divide:f,dot:I,equals:O,exactEquals:Y,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,i,n,s,r){let h=r*r,o=h*(2*r-3)+1,a=h*(r-2)+r,l=h*(r-1),u=h*(3-2*r);return t[0]=e[0]*o+i[0]*a+n[0]*l+s[0]*u,t[1]=e[1]*o+i[1]*a+n[1]*l+s[1]*u,t[2]=e[2]*o+i[2]*a+n[2]*l+s[2]*u,t},inverse:b,len:k,length:r,lerp:B,max:_,min:y,mul:Z,multiply:u,negate:w,normalize:v,random:function(t,e=1){let i=s.Ov,n=2*i()*Math.PI,r=2*i()-1,h=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*h,t[1]=Math.sin(n)*h,t[2]=r*e,t},rotateX:function(t,e,i,n){let s=[],r=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],r[0]=s[0],r[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),r[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),t[0]=r[0]+i[0],t[1]=r[1]+i[1],t[2]=r[2]+i[2],t},rotateY:function(t,e,i,n){let s=[],r=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],r[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),r[1]=s[1],r[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),t[0]=r[0]+i[0],t[1]=r[1]+i[1],t[2]=r[2]+i[2],t},rotateZ:function(t,e,i,n){let s=[],r=[];return s[0]=e[0]-i[0],s[1]=e[1]-i[1],s[2]=e[2]-i[2],r[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),r[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),r[2]=s[2],t[0]=r[0]+i[0],t[1]=r[1]+i[1],t[2]=r[2]+i[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:p,scaleTo:function(t,e){return m(t,t,e/k(t))},set:o,sign:d,sqrDist:G,sqrLen:q,squaredDistance:x,squaredLength:M,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:j,subtract:l,transformMat3:P,transformMat4:A,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:S,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),i.d(e,["Il",0,k,"jb",0,j,"lo",0,G,"uE",0,q])},75503(t,e,i){i.d(e,{wq:()=>o});var n=i(4576),s=i(21818),r=(i(44208),i(15142)),h=i(11006);class o{constructor(t=9,e){this._compareMinX=c,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),w.prune(),b.prune(),v.prune(),I.prune()}all(t){a(this._data,t)}search(t,e){let i=this._data,n=this._toBBox;if(x(t,i))for(w.clear();i;){for(let s=0,r=i.children.length;s<r;s++){let r=i.children[s],h=i.leaf?n(r):r;x(t,h)&&(i.leaf?e(r):g(t,h)?a(r,e):w.push(r))}i=w.pop()}}collides(t){let e=this._data,i=this._toBBox;if(!x(t,e))return!1;for(w.clear();e;){for(let n=0,s=e.children.length;n<s;n++){let s=e.children[n],r=e.leaf?i(s):s;if(x(t,r)){if(e.leaf||g(t,r))return!0;w.push(s)}}e=w.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){let t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(t){if(!t)return this;let e,i=this._data,r=null,h=0,o=!1,a=this._toBBox(t);for(v.clear(),I.clear();i||v.length>0;){if(i||(i=v.pop(),r=v.data[v.length-1],h=I.pop()??0,o=!0),i.leaf&&(e=(0,n.qh)(i.children,(0,s.z)(t),i.children.length,i.indexHint),-1!==e))return i.children.splice(e,1),v.push(i),this._condense(v),this;o||i.leaf||!g(i,a)?r?(h++,i=r.children[h],o=!1):i=null:(v.push(i),I.push(h),h=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,i,n){let s=i-e+1,r=this._maxEntries;if(s<=r){let n=new A(t.slice(e,i+1));return l(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(n-1)));let h=new P([]);h.height=n;let o=Math.ceil(s/r),a=o*Math.ceil(Math.sqrt(r));M(t,e,i,a,this._compareMinX);for(let s=e;s<=i;s+=a){let e=Math.min(s+a-1,i);M(t,s,e,o,this._compareMinY);for(let i=s;i<=e;i+=o){let s=Math.min(i+o-1,e);h.children.push(this._build(t,i,s,n-1))}}return l(h,this._toBBox),h}_insert(t,e,i){let n=this._toBBox,s=i?t:n(t);v.clear();let r=function(t,e,i,n){for(;n.push(e),!0!==e.leaf&&n.length-1!==i;){let i,n=1/0,s=1/0;for(let r=0,h=e.children.length;r<h;r++){let h=e.children[r],o=y(h),a=m(t,h)-o;a<s?(s=a,n=o<n?o:n,i=h):a===s&&o<n&&(n=o,i=h)}e=i||e.children[0]}return e}(s,this._data,e,v);for(r.children.push(t),f(r,s);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;!function(t,e,i){for(let n=i;n>=0;n--)f(e.data[n],t)}(s,v,e)}_split(t,e){let i=t.data[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);let r=this._chooseSplitIndex(i,s,n);if(!r)return;let h=i.children.splice(r,i.children.length-r),o=i.leaf?new A(h):new P(h);o.height=i.height,l(i,this._toBBox),l(o,this._toBBox),e?t.data[e-1].children.push(o):this._splitRoot(i,o)}_splitRoot(t,e){this._data=new P([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,i){let n,s,r;n=s=1/0;for(let h=e;h<=i-e;h++){let e=u(t,0,h,this._toBBox),o=u(t,h,i,this._toBBox),a=p(e,o),l=y(e)+y(o);a<n?(n=a,r=h,s=l<s?l:s):a===n&&l<s&&(s=l,r=h)}return r}_chooseSplitAxis(t,e,i){let n=t.leaf?this._compareMinX:c,s=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);let s=this._toBBox,r=u(t,0,e,s),h=u(t,i-e,i,s),o=_(r)+_(h);for(let n=e;n<i-e;n++){let e=t.children[n];f(r,t.leaf?s(e):e),o+=_(r)}for(let n=i-e-1;n>=e;n--){let e=t.children[n];f(h,t.leaf?s(e):e),o+=_(h)}return o}_condense(t){for(let e=t.length-1;e>=0;e--){let i=t.data[e];if(0===i.children.length)if(e>0){let s=t.data[e-1],r=s.children;r.splice((0,n.qh)(r,i,r.length,s.indexHint),1)}else this.clear();else l(i,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){let i=t;for(b.clear();i;){if(!0===i.leaf)for(let t of i.children)e((0,s.z)(t));else b.pushArray(i.children);i=b.pop()??null}}function l(t,e){u(t,0,t.children.length,e,t)}function u(t,e,i,n,s){s||=new A([]),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,h=e;h<i;h++)r=t.children[h],f(s,t.leaf?n(r):r);return s}function f(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function y(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function _(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){let i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),s=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,s-i)*Math.max(0,r-n)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function x(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,i,n,s){let r=[e,i];for(;r.length;){let e=r.pop(),i=r.pop();if(e-i<=n)continue;let o=i+Math.ceil((e-i)/n/2)*n;(0,h.q)(t,o,i,e,s),r.push(i,o,o,e)}}const w=new r.A,b=new r.A,v=new r.A,I=new r.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class B extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends B{constructor(t){super(),this.children=t,this.leaf=!0}}class P extends B{constructor(t){super(),this.children=t,this.leaf=!1}}},69397(t,e,i){i.d(e,{Qf:()=>o,Qh:()=>r,lM:()=>s});var n=i(34275);function s(t){if(!t)return 0;let e=l;for(let i in t)t.hasOwnProperty(i)&&(e+=h(t[i],!1));return e}function r(t){if(!t)return 0;if("number"==typeof t[0])return o(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return a(t,8);let i=u;for(let n=0;n<e;n++)i+=h(t[n]);return i}(t);let e=l;for(let i in t)t.hasOwnProperty(i)&&(e+=h(t[i]));return e}function h(t,e=!0){switch(typeof t){case"object":return e?r(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...t){return t.reduce((t,e)=>t+(e?(0,n.iu)(e)?e.byteLength+f:Array.isArray(e)?a(e,16):0:0),0)}function a(t,e){return u+t.length*e}const l=32,u=16,f=145},48526(t,e,i){i.d(e,{A:()=>m});var n,s=i(32198),r=i(4576),h=i(4718),o=i(91429),a=i(5443),l=i(91075),u=i(86738),f=i(16930),c=i(90634),d=i(47610),y=i(56993),_=i(43937);let m=n=class extends l.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:i,hasZ:n,spatialReference:s}=t;switch(e??=[],e?.at(0)?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return s??=f.A.WGS84,{...t,hasM:i,hasZ:n,points:e,spatialReference:s}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let t=(0,c.ge)(this);return t?new a.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,h.o8)(this.points)}clone(){let{points:t,spatialReference:e,hasM:i,hasZ:s}=this;return new n({points:(0,h.o8)(t),spatialReference:e.clone(),hasM:i,hasZ:s})}equals(t){if(this===t)return!0;if(null==t)return!1;let e=this.spatialReference,i=t.spatialReference;return!(null!=e!=(null!=i)||null!=e&&null!=i&&!e.equals(i))&&(0,r.aI)(this.points,t.points,d.v6)}addPoint(t){return(0,y.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;let e=this.points[t],i={x:e[0],y:e[1],spatialReference:this.spatialReference},n=2;return this.hasZ&&(i.z=e[2],n=3),this.hasM&&(i.m=e[n]),new u.A(i)}removePoint(t){if(!this._validateInputs(t))return null;let e=new u.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)?((0,y.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,s.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,s.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,s.Cg)([(0,o.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],m.prototype,"points",void 0),(0,s.Cg)([(0,_.K)("points")],m.prototype,"writePoints",null),m=n=(0,s.Cg)([(0,o.$K)("esri.geometry.Multipoint")],m),m.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,i){i.d(e,{A:()=>y});var n,s=i(32198),r=i(4718),h=i(91429),o=i(5443),a=i(91075),l=i(86738),u=i(16930),f=i(90634),c=i(56993),d=i(43937);let y=n=class extends a.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:i,hasZ:n,spatialReference:s}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return s??=u.A.WGS84,{...t,hasM:i,hasZ:n,paths:e,spatialReference:s}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,r.o8)(t)}get extent(){let t=(0,f.Z3)(this),{spatialReference:e}=this;return t?new o.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,r.o8)(this.paths)}addPath(t){if(!t)return;let e=this.paths,i=e.length;if(function(t){return!Array.isArray(t[0])}(t)){let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e].toArray();e[i]=n}else e[i]=t.slice();return this.notifyChange("paths"),this}clone(){let t=new n;return t.spatialReference=this.spatialReference,t.paths=(0,r.o8)(this.paths),t.curvePaths=(0,r.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;let i=this.paths[t][e],n=this.hasZ,s=this.hasM;return n&&!s?new l.A(i[0],i[1],i[2],void 0,this.spatialReference):s&&!n?new l.A(i[0],i[1],void 0,i[2],this.spatialReference):n&&s?new l.A(i[0],i[1],i[2],i[3],this.spatialReference):new l.A(i[0],i[1],this.spatialReference)}insertPoint(t,e,i){return this._validateInputs(t,e,!0)?((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t].splice(e,0,i),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;let e=this.paths.splice(t,1)[0],i=this.spatialReference,n=e.map(t=>new l.A(t,i));return this.notifyChange("paths"),n}removePoint(t,e){if(!this._validateInputs(t,e))return null;let i=new l.A(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),i}setPoint(t,e,i){return this._validateInputs(t,e)?((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t][e]=i,this.notifyChange("paths"),this):this}_validateInputs(t,e,i=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){let n=this.paths[t];if(i&&(e<0||e>n.length)||!i&&(e<0||e>=n.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,s.Cg)([(0,h.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,s.Cg)([(0,h.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],y.prototype,"curvePaths",void 0),(0,s.Cg)([(0,d.K)("curvePaths")],y.prototype,"writeCurvePaths",null),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,s.Cg)([(0,h.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],y.prototype,"paths",void 0),(0,s.Cg)([(0,d.K)("paths")],y.prototype,"writePaths",null),y=n=(0,s.Cg)([(0,h.$K)("esri.geometry.Polyline")],y),y.prototype.toJSON.isDefaultToJSON=!0},4197(t,e,i){i.d(e,{Vj:()=>u,cj:()=>l,jh:()=>r,l5:()=>o,yH:()=>a});var n=i(34275),s=i(9093);function r(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function h(t){return((0,n.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function o(t,e,i){return Array.isArray(t)?t.slice(e,e+i):t.subarray(e,e+i)}function a(t,e){if(0===e.length)return h(t);if(0===t.length)return h(e);let i=r(t.length+e.length);for(let e=0;e<t.length;++e)i[e]=t[e];for(let n=0;n<e.length;++n)i[t.length+n]=e[n];return i}function l(t){return[...t]}function u(t){let e=(0,s.vt)();for(let i=0;i<16;++i)e[i]=t[i];return e}},6774(t,e,i){i.d(e,{O3:()=>r,Ox:()=>h,bR:()=>n});class n{constructor(t,e){this.x=t,this.y=e}static fromArray(t){return new n(t[0],t[1])}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){return this.x=t,this.y=e,this}normalize(){let t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return this.x/=i,this.y/=i,this}rightPerpendicular(){let t=this.x;return this.x=this.y,this.y=-t,this}leftPerpendicular(){let t=this.x;return this.x=-this.y,this.y=t,this}move(t,e){return this.x+=t,this.y+=e,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}assignSub(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}rotate(t,e){let i=this.x,n=this.y;return this.x=i*t-n*e,this.y=i*e+n*t,this}rotateReverse(t,e){let i=this.x,n=this.y;return this.x=i*t+n*e,this.y=-i*e+n*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){let t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}sub(t){return this.x-=t.x,this.y-=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}static distance(t,e){let i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}class s{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class r{constructor(t,e,i,n=8,s=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=n,this._pixelMargin=s,this._tileSize=512*n,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;let i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new n(t,e),this._firstPt=new n(t,e),this._dist=0}lineTo(t,e){let i,r,h,o,a,l,u,f,c=this._isIn(t,e),d=new n(t,e),y=n.distance(this._prevPt,d);if(c)this._prevIsIn?this._lineTo(t,e,!0):(i=this._prevPt,r=d,h=this._intersect(r,i),this._start=this._dist+y*(1-this._r),this._lineTo(h.x,h.y,!0),this._lineTo(r.x,r.y,!0));else if(this._prevIsIn)r=this._prevPt,i=d,h=this._intersect(r,i),this._lineTo(h.x,h.y,!0),this._lineTo(i.x,i.y,!1);else{let t=this._prevPt,e=d;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{let i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(o=(this._xmin-t.x)/(e.x-t.x),f=t.y+o*(e.y-t.y),f<=this._ymin?l=!1:f>=this._ymax?l=!0:i.push(new s(o,this._xmin,f))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(o=(this._xmax-t.x)/(e.x-t.x),f=t.y+o*(e.y-t.y),f<=this._ymin?l=!1:f>=this._ymax?l=!0:i.push(new s(o,this._xmax,f))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(o=(this._ymin-t.y)/(e.y-t.y),u=t.x+o*(e.x-t.x),u<=this._xmin?a=!1:u>=this._xmax?a=!0:i.push(new s(o,u,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(o=(this._ymax-t.y)/(e.y-t.y),u=t.x+o*(e.x-t.x),u<=this._xmin?a=!1:u>=this._xmax?a=!0:i.push(new s(o,u,this._ymax))),0===i.length)a?l?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):l?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+y*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+y*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=y,this._prevIsIn=c,this._prevPt=d}close(){if(this._line.length>2){let t=this._firstPt,e=this._prevPt;(t.x!==e.x||t.y!==e.y)&&this.lineTo(t.x,t.y);let i=this._line,n=i.length;for(;n>=4&&(i[0].x===i[1].x&&i[0].x===i[n-2].x||i[0].y===i[1].y&&i[0].y===i[n-2].y);)i.pop(),i[0].x=i[n-2].x,i[0].y=i[n-2].y,--n}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(3===this._type&&t&&o.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(2!==this._type)throw Error("Only valid for lines");this._pushLine();let t=this._lines,e=t.length;if(0===e)return null;let i=[];for(let n=0;n<e;n++)i.push({line:t[n],start:this._starts[n]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,s,r;if(e.x>=this._xmin&&e.x<=this._xmax)s=e.y<=this._ymin?this._ymin:this._ymax,r=(s-t.y)/(e.y-t.y),i=t.x+r*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,r=(i-t.x)/(e.x-t.x),s=t.y+r*(e.y-t.y);else{s=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;let n=(i-t.x)/(e.x-t.x),h=(s-t.y)/(e.y-t.y);n<h?(r=n,s=t.y+n*(e.y-t.y)):(r=h,i=t.x+h*(e.x-t.x))}return this._r=r,new n(i,s)}_pushLine(){this._line&&(1===this._type?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):2===this._type?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):3===this._type&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){3===this._type?(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)),this._isH=!1,this._isV=!1):i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)))}_lineTo(t,e,i){let s,r;if(3!==this._type)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(s=this._line[this._line.length-1],s.equals(t,e)))return;this._line.push(new n(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){s=this._line[this._line.length-1];let i=s.x===t,h=s.y===e;if(i&&h)return;this._isH&&i||this._isV&&h?(s.x=t,s.y=e,r=this._line[this._line.length-2],r.x===t&&r.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(r=this._line[this._line.length-2],this._isH=r.x===t,this._isV=r.y===e)):(this._isH=r.x===t,this._isV=r.y===e)):(this._line.push(new n(t,e)),this._isH=i,this._isV=h)}else this._line.push(new n(t,e))}}class h{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];let i=this._ratio;this._line.push(new n(t*i,e*i))}lineTo(t,e){let i=this._ratio;this._line.push(new n(t*i,e*i))}close(){let t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}class o{static simplify(t,e,i){if(!i)return;let n=-e,s=t+e,r=-e,h=t+e,a=[],l=[],u=i.length;for(let t=0;t<u;++t){let e=i[t];if(!e||e.length<2)continue;let o,u=e[0],f=e.length;for(let i=1;i<f;++i)o=e[i],u.x===o.x&&(u.x<=n&&(u.y>o.y?(a.push(t),a.push(i),a.push(0),a.push(-1)):(l.push(t),l.push(i),l.push(0),l.push(-1))),u.x>=s&&(u.y<o.y?(a.push(t),a.push(i),a.push(1),a.push(-1)):(l.push(t),l.push(i),l.push(1),l.push(-1)))),u.y===o.y&&(u.y<=r&&(u.x<o.x?(a.push(t),a.push(i),a.push(2),a.push(-1)):(l.push(t),l.push(i),l.push(2),l.push(-1))),u.y>=h&&(u.x>o.x?(a.push(t),a.push(i),a.push(3),a.push(-1)):(l.push(t),l.push(i),l.push(3),l.push(-1)))),u=o}if(0===a.length||0===l.length)return;o.fillParent(i,l,a),o.fillParent(i,a,l);let f=[];o.calcDeltas(f,l,a),o.calcDeltas(f,a,l),o.addDeltas(f,i)}static fillParent(t,e,i){let n=i.length,s=e.length;for(let r=0;r<s;r+=4){let s=e[r],h=e[r+1],o=e[r+2],l=t[s][h-1],u=t[s][h],f=8092,c=-1;for(let e=0;e<n;e+=4){if(i[e+2]!==o)continue;let n=i[e],s=i[e+1],r=t[n][s-1],h=t[n][s];switch(o){case 0:case 1:if(a(l.y,r.y,h.y)&&a(u.y,r.y,h.y)){let t=Math.abs(h.y-r.y);t<f&&(f=t,c=e)}break;case 2:case 3:if(a(l.x,r.x,h.x)&&a(u.x,r.x,h.x)){let t=Math.abs(h.x-r.x);t<f&&(f=t,c=e)}}}e[r+3]=c}}static calcDeltas(t,e,i){let n=e.length;for(let s=0;s<n;s+=4){let n=o.calcDelta(s,e,i,[]);t.push(e[s]),t.push(e[s+1]),t.push(e[s+2]),t.push(n)}}static calcDelta(t,e,i,n){let s=e[t+3];if(-1===s)return 0;let r=n.length;return r>1&&n[r-2]===s?0:(n.push(s),o.calcDelta(s,i,e,n)+1)}static addDeltas(t,e){let i=t.length,n=0;for(let e=0;e<i;e+=4){let i=t[e+3];i>n&&(n=i)}for(let s=0;s<i;s+=4){let i=e[t[s]],r=t[s+1],h=n-t[s+3];switch(t[s+2]){case 0:i[r-1].x-=h,i[r].x-=h,1===r&&(i[i.length-1].x-=h),r===i.length-1&&(i[0].x-=h);break;case 1:i[r-1].x+=h,i[r].x+=h,1===r&&(i[i.length-1].x+=h),r===i.length-1&&(i[0].x+=h);break;case 2:i[r-1].y-=h,i[r].y-=h,1===r&&(i[i.length-1].y-=h),r===i.length-1&&(i[0].y-=h);break;case 3:i[r-1].y+=h,i[r].y+=h,1===r&&(i[i.length-1].y+=h),r===i.length-1&&(i[0].y+=h)}}}}const a=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},70328(t,e,i){i.d(e,{BI:()=>A,C:()=>h,DC:()=>c,Ej:()=>x,Ie:()=>T,Jt:()=>B,Lu:()=>w,Ne:()=>b,RF:()=>f,TF:()=>p,VL:()=>y,aI:()=>S,fA:()=>o,gE:()=>l,gX:()=>g,hZ:()=>I,iT:()=>d,is:()=>P,pg:()=>M,uJ:()=>m,vI:()=>v,vY:()=>a,vt:()=>r,w1:()=>u,yr:()=>_}),i(35522);var n=i(5443),s=(i(19419),i(4197));function r(t=R){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function h(t,e){for(let i=0;i<6;i++)t[i]=e[i];return t}function o(t,e,i,n,s,h,o=r()){return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=h,o}function a(t,e=r()){return function(t,e,i,n=r()){return I(n,C),function(t,e,i=0,n=e.length/3){let s=t[0],r=t[1],h=t[2],o=t[3],a=t[4],l=t[5];for(let t=0;t<n;t++)s=Math.min(s,e[i+3*t]),r=Math.min(r,e[i+3*t+1]),h=Math.min(h,e[i+3*t+2]),o=Math.max(o,e[i+3*t]),a=Math.max(a,e[i+3*t+1]),l=Math.max(l,e[i+3*t+2]);t[0]=s,t[1]=r,t[2]=h,t[3]=o,t[4]=a,t[5]=l}(n,t,e,i),n}(t,0,t.length/3,e)}function l(t,e=(0,s.jh)(24)){let[i,n,r,h,o,a]=t;return e[0]=i,e[1]=n,e[2]=r,e[3]=i,e[4]=n,e[5]=a,e[6]=i,e[7]=o,e[8]=r,e[9]=i,e[10]=o,e[11]=a,e[12]=h,e[13]=n,e[14]=r,e[15]=h,e[16]=n,e[17]=a,e[18]=h,e[19]=o,e[20]=r,e[21]=h,e[22]=o,e[23]=a,e}function u(t,e){return isFinite(t[2])||isFinite(t[5])?new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function f(t,e,i=t){i[0]=Math.min(t[0],e[0]),i[1]=Math.min(t[1],e[1]),i[2]=Math.min(t[2],e[2]),i[3]=Math.max(t[3],e[3]),i[4]=Math.max(t[4],e[4]),i[5]=Math.max(t[5],e[5])}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,i,n]){!function(t,e,i,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.min(t[2],n),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],i),t[5]=Math.max(t[5],n)}(t,e,i,n)}function y(t){return t[0]>=t[3]?0:t[3]-t[0]}function _(t){return t[1]>=t[4]?0:t[4]-t[1]}function m(t){return t[2]>=t[5]?0:t[5]-t[2]}function p(t){let e=y(t),i=m(t),n=_(t);return e*e+i*i+n*n}function g(t,e=[0,0,0]){return e[0]=t[0]+y(t)/2,e[1]=t[1]+_(t)/2,e[2]=t[2]+m(t)/2,e}function x(t,e=[0,0,0]){return e[0]=y(t),e[1]=_(t),e[2]=m(t),e}function M(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function w(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function b(t,e,i=t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i!==t&&(i[3]=t[3],i[4]=t[4],i[5]=t[5]),i}function v(t,e,i=t){return i[3]=e[0],i[4]=e[1],i[5]=e[2],i!==t&&(i[0]=t[0],i[1]=t[1],i[2]=t[2]),t}function I(t,e){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}function T(t){return t?I(t,C):r(C)}function B(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function A(t,e,i,n,s){return t[0]=e,t[1]=i,t[2]=-1/0,t[3]=n,t[4]=s,t[5]=1/0,t}function P(t){return 6===t.length}function S(t,e,i){if(null==t||null==e)return t===e;if(!P(t)||!P(e))return!1;if(i){for(let n=0;n<t.length;n++)if(!i(t[n],e[n]))return!1}else for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],R=[0,0,0,0,0,0];r(),i.d(e,["qv",0,C,"v_",0,R])},60408(t,e,i){function n(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function s(t){return void 0!==t.points}function r(t){return void 0!==t.x&&void 0!==t.y}function h(t){return void 0!==t.paths||void 0!==t.curvePaths}function o(t){return void 0!==t.rings||void 0!==t.curveRings}function a(t){return"object"==typeof t&&"vertexAttributes"in t}function l(t){return t?r(t)?"esriGeometryPoint":h(t)?"esriGeometryPolyline":o(t)?"esriGeometryPolygon":n(t)?"esriGeometryEnvelope":s(t)?"esriGeometryMultipoint":null:null}function u(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function f(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}i.d(e,{$B:()=>l,Bi:()=>o,Pv:()=>u,Rg:()=>h,U9:()=>s,W0:()=>f,ZC:()=>n,fT:()=>r,uW:()=>a})},6518(t,e,i){i.d(e,{F:()=>o});var n=i(44208),s=i(75503),r=i(19419);const h={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.wq(9,(0,n.A)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let t=Array(this._idByBounds.size),e=0;this._idByBounds.forEach((i,n)=>{t[e++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(t=>this._idByBounds.has(t))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let t=(0,r.Ie)();for(let e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){let e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,i){(function(t){h.minX=t[0],h.minY=t[1],h.maxX=t[2],h.maxY=t[3]})(e),t.search(h,i)}(this._index,t,t=>e(this._idByBounds.get(t)))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){let e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(t,e,i){i.d(e,{A:()=>y});var n=i(4576),s=i(49186),r=i(65529),h=i(53966),o=i(70328),a=i(19419),l=i(90708),u=i(6518),f=i(51441),c=i(37730);const d=(0,o.vt)();class y{constructor(t){this.geometryInfo=t,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach(e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;let[e,i,n,s]=this.fullBounds;return{xmin:e,ymin:i,xmax:n,ymax:s,spatialReference:(0,f.ag)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(let e of t)this._add(e);this._emitChanged()}upsertMany(t){let e=t.map(t=>this._upsert(t));return this._emitChanged(),e.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(t){let e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(let e of t){let t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(let i of t){let t=this._boundsStore.get(i.objectId);t&&e((0,o.Jt)(d,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach(e=>t(e))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,t=>{e(this._featuresById.get(t))})}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;let e=t.objectId;if(null==e)return void h.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:t}));let i,n=this._featuresById.get(e);if(n?(t.displayId=n.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(t),!t.geometry?.coords?.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);i=(0,l.jQ)(i??(0,a.vt)(),t.geometry),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t),this._usedMemory+=this.estimateFeatureUsedMemory?.(t)??0}_upsert(t){let e=t?.objectId;if(null==e)return h.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;let i=this._featuresById.get(e);if(!i)return this._add(t),t;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:n,attributes:r}=t;for(let t in r)i.attributes[t]=r[t];return n&&(i.geometry=n,this._boundsStore.set(e,(0,l.jQ)((0,a.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);let e=t.objectId;return this._boundsStore.delete(e),this._featuresById.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(t)??0,t}}},37730(t,e,i){var n=i(43334);const s={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e,i)=>new n.Om(e,t.attributes,null,t.objectId,t.displayId,t.distance,t.vertexCount),getGeometry:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)};i.d(e,["T",0,s])},85113(t,e,i){i.d(e,{BM:()=>T,bd:()=>B,sO:()=>I,xD:()=>f});var n=i(67482),s=i(49186),r=i(21325),h=i(90708),o=i(43334),a=i(92722),l=i(30524);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function f(t){return u[t]}function*c(t){switch(t.type){case"Feature":yield t;break;case"FeatureCollection":for(let e of t.features)e&&(yield e)}}function*d(t){if(t)switch(t.type){case"Point":yield t.coordinates;break;case"LineString":case"MultiPoint":yield*t.coordinates;break;case"MultiLineString":case"Polygon":for(let e of t.coordinates)yield*e;break;case"MultiPolygon":for(let e of t.coordinates)for(let t of e)yield*t}}function y(t){for(let e of t)if(e.length>2)return!0;return!1}function _(t){let e=0;for(let i=0;i<t.length;i++){let n=t[i],s=t[(i+1)%t.length];e+=n[0]*s[1]-s[0]*n[1]}return e<=0}function m(t){let e=t[0],i=t[t.length-1];(e[0]!==i[0]||e[1]!==i[1]||e[2]!==i[2])&&t.push(e)}function p(t,e){let{coordinates:i,type:n}=t,s=e.hasZ??!1;switch(n){case"Point":return new a.A([],[...i],s,!1);case"LineString":return(0,h.Ap)({paths:[i],hasZ:!0},s,!1);case"MultiLineString":return(0,h.Ap)({paths:i,hasZ:!0},s,!1);case"MultiPoint":return(0,h.PR)({points:i,hasZ:!0},s,!1);case"Polygon":case"MultiPolygon":{let t=new a.A([],[],s,!1);for(let e of"Polygon"===n?[i]:i){g(t,e[0],s);for(let i=1;i<e.length;i++)x(t,e[i],s)}return t}}}function g(t,e,i){m(e),function(t){return!_(t)}(e)?w(t,e,i):M(t,e,i)}function x(t,e,i){m(e),function(t){return _(t)}(e)?w(t,e,i):M(t,e,i)}function M(t,e,i){for(let n of e)b(t,n,i);t.lengths.push(e.length)}function w(t,e,i){for(let n=e.length-1;n>=0;n--)b(t,e[n],i);t.lengths.push(e.length)}function b(t,[e,i,n],s){t.coords.push(e,i),s&&t.coords.push(n||0)}function v(t){switch(typeof t){case"string":return(0,n.C)(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function I(t,e=4326){if(!t)throw new s.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==t.type&&"FeatureCollection"!==t.type)throw new s.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:t});let{crs:i}=t;if(!i)return;let n="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,h=(0,r.oT)({wkid:e})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${e})$`,"i");if(!n||!h.test(n))throw new s.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function T(t,e={}){let i,n=[],s=new Set,r=new Set,h=!1,o=null,a=!1,{geometryType:u=null}=e;for(let e of c(t)){let{geometry:t,properties:c,id:_}=e;if((!t||(u||=f(t.type),f(t.type)===u))&&(h||=y(d(t)),a||(a=null!=_,a&&(i=typeof _,c&&(o=Object.keys(c).filter(t=>c[t]===_)))),c&&o&&a&&null!=_&&(o.length>1?o=o.filter(t=>c[t]===_):1===o.length&&(o=c[o[0]]===_?o:[])),c))for(let t in c){if(s.has(t))continue;let e=v(c[t]);if("unknown"===e){r.add(t);continue}r.delete(t),s.add(t);let i=(0,l.rS)(t);i&&n.push({name:i,alias:t,type:e})}}let _=(0,l.rS)(1===o?.length&&o[0]||null)??void 0;if(_)for(let t of n)if(t.name===_&&(0,l.WA)(t)){t.type="esriFieldTypeOID";break}return{fields:n,geometryType:u,hasZ:h,objectIdFieldName:_,objectIdFieldType:i,unknownFields:Array.from(r)}}function B(t,e){return Array.from(function*(t,e={}){let{geometryType:i,objectIdField:n}=e;for(let s of t){let{geometry:t,properties:r,id:h}=s;if(t&&f(t.type)!==i)continue;let a,l=r||{};n&&(a=l[n],null!=h&&!a&&(l[n]=a=h)),yield new o.Om(t&&p(t,e),l,null,a)}}(c(t),e))}},14289(t,e,i){i.r(e),i.d(e,{default:()=>P});var n=i(56507),s=i(17676),r=i(19419),h=i(21325),o=i(6774),a=i(90708),l=i(92722),u=i(83221),f=i(31464),c=i(85113);const d=new TextEncoder;class y{constructor(){this._bytes=[]}finish(){return new Uint8Array(this._bytes)}writeBooleanField(t,e){this._writeTag(t,0),this.writeVarint(+!!e)}writeDoubleField(t,e){this._writeTag(t,1);let i=new ArrayBuffer(8);new DataView(i).setFloat64(0,e,!0),this._writeBytes(new Uint8Array(i))}writeMessage(t,e,i){this._writeTag(t,2);let n=this._bytes.length;for(let t=0;t<5;t++)this._bytes.push(0);let s=this._bytes.length;e(i,this),this._writeMessageLength(n,this._bytes.length-s)}writeStringField(t,e){let i=d.encode(e);this._writeTag(t,2),this.writeVarint(i.byteLength),this._writeBytes(i)}writeSVarintField(t,e){this._writeTag(t,0),this.writeVarint(e<0?2*-e-1:2*e)}writeVarint(t){for(;t>127;)this._bytes.push(127&t|128),t=Math.floor(t/128);this._bytes.push(t)}writeVarintField(t,e){this._writeTag(t,0),this.writeVarint(e)}_writeBytes(t){for(let e of t)this._bytes.push(e)}_writeMessageLength(t,e){let i=0;for(;e>127;)this._bytes[t+i++]=127&e|128,e=Math.floor(e/128);this._bytes[t+i++]=e,this._bytes.splice(t+i,5-i)}_writeTag(t,e){this.writeVarint(t<<3|e)}}function _(t,e,i){let n=new y;return n.writeMessage(3,m,{cursor:e,extent:i,keyIndices:new Map,keys:[],name:t,valueIndices:new Map,values:[]}),Uint8Array.from(n.finish()).buffer}function m(t,e){for(e.writeVarintField(15,1),e.writeStringField(1,t.name),e.writeVarintField(5,t.extent);t.cursor.next();)e.writeMessage(2,p,t);for(let i of t.keys)e.writeStringField(3,i);for(let i of t.values)e.writeMessage(4,M,i)}function p(t,e){let i=t.cursor.getId();"number"==typeof i&&e.writeVarintField(1,i),e.writeMessage(2,g,t),e.writeVarintField(3,t.cursor.getType()),e.writeMessage(4,x,t.cursor)}function g(t,e){let i=t.cursor.getAttributes();if(i)for(let n of Object.keys(i)){let s=w(i[n]);if(null==s)continue;let r=t.keyIndices.get(n);r??(r=t.keys.length,t.keyIndices.set(n,r),t.keys.push(n));let h=`${typeof s}:${s}`,o=t.valueIndices.get(h);o??(o=t.values.length,t.valueIndices.set(h,o),t.values.push(s)),e.writeVarint(r),e.writeVarint(o)}}function x(t,e){let i=t.getType(),n=0,s=0;for(let r=0;r<t.getPathCount();r++){let h=t.getPathLength(r),o=1===i?h:1;e.writeVarint(b(1,o));let a=3===i?h-1:h;for(let h=0;h<a;h++){1===h&&1!==i&&e.writeVarint(b(2,a-1));let o=t.getX(r,h),l=t.getY(r,h);e.writeVarint(v(o-n)),e.writeVarint(v(l-s)),n=o,s=l}3===i&&e.writeVarint(b(7,1))}}function M(t,e){"string"==typeof t?e.writeStringField(1,t):"boolean"==typeof t?e.writeBooleanField(7,t):Number.isInteger(t)?t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t):e.writeDoubleField(3,t)}function w(t){return"string"==typeof t||"boolean"==typeof t||"number"==typeof t?t:null==t?null:JSON.stringify(t)??null}function b(t,e){return(e<<3)+(7&t)}function v(t){return t<<1^t>>31}const I=4096,T=20037508.342787,B=2*T,A=[{geometryType:"esriGeometryPolygon",vectorTileGeometryType:3},{geometryType:"esriGeometryPolyline",vectorTileGeometryType:2},{geometryType:"esriGeometryPoint",vectorTileGeometryType:1},{geometryType:"esriGeometryMultipoint",vectorTileGeometryType:1}];class P{constructor(){this._buffer=128,this._featureIds=new Map,this._name="",this._stores=[],this._tolerance=.375}destroy(){for(let{store:t}of this._stores)t.clear();this._featureIds.clear(),this._stores.length=0}async initialize({definition:t,name:e,requestOptions:i},r={}){if(null==t.data)throw Error(`GeoJSON source '${e}' must define a data property.`);if(!0===t.lineMetrics)throw Error("GeoJSON lineMetrics are not supported.");if(t.promoteId&&t.generateId)throw Error("GeoJSON promoteId and generateId cannot be used together.");let h="string"==typeof t.data?(await(0,n.A)(t.data,{...i,responseType:"json",signal:r.signal})).data:t.data;(0,s.Te)(r),(0,c.sO)(h),this.destroy(),this._buffer=t.buffer??128,this._name=e,this._tolerance=t.tolerance??.375;let o=0;for(let{geometryType:e,vectorTileGeometryType:i}of A){let n=(0,c.bd)(h,{geometryType:e,hasZ:!1}),s=S(h,e,t);if(0===n.length)continue;let r=new u.A({geometryType:e,hasM:!1,hasZ:!1}),a=[],l=0;for(let t of n){let i=C(t.geometry,e);i&&(t.objectId=o++,t.geometry=i,this._featureIds.set(t.objectId,s[l++]??null),a.push(t))}a.length>0&&(r.addMany(a),this._stores.push({geometryType:e,store:r,vectorTileGeometryType:i}))}return(0,s.Te)(r),{geometryTypes:["polygon","line","point"].filter(t=>this._stores.some(({vectorTileGeometryType:e})=>e===function(t){switch(t){case"polygon":return 3;case"line":return 2;case"point":return 1}}(t)))}}requestTile({col:t,level:e,row:i},n={}){(0,s.Te)(n);let r=this._getTileFeatures(e,i,t),h=r.length>0?_(this._name,new F(r),I):new ArrayBuffer(0);return(0,s.Te)(n),{result:h,transferList:[h]}}_getTileFeatures(t,e,i){let n=B/2**t,s=i*n-20037508.342787,h=T-e*n,o=n/I,a=this._buffer*o,l=this._tolerance*o,u=[];for(let t of[-40075016.685574,0,B]){let e=(0,r.fA)(s-a-t,h-n-a,s+n+a-t,h+a),i={scale:[o,-o,1,1],translate:[s-t,h,0,0]};for(let{geometryType:t,store:n,vectorTileGeometryType:s}of this._stores)n.forEachInBounds(e,e=>{let n=R(e,t,s,i,l,this._buffer);n&&u.push({attributes:e.attributes,geometry:n,id:this._featureIds.get(e.objectId),type:s})})}return u}}function S(t,e,i){let n=[],s="FeatureCollection"===t.type?t.features:[t];for(let t=0;t<s.length;t++){let r=s[t];if(!r.geometry||(0,c.xD)(r.geometry.type)!==e)continue;let h=i.promoteId?r.properties?.[i.promoteId]:!0===i.generateId?t:r.id;n.push("number"==typeof h||"string"==typeof h?h:null)}return n}function C(t,e){return t?(0,a.Ux)((0,f.Cv)((0,a.zv)(t,e,!1,!1),h.KK,h.ch))??null:null}function R(t,e,i,n,s,r){if(!t.geometry)return null;let h=s>0?(0,a.kz)(t.geometry,e,s,!1,!1):t.geometry;return function(t,e,i){if(!t)return null;let n=new o.O3(0,0,0,8,i/8);if(n.setExtent(I),n.reset(e),1===e)for(let e=0;e<t.size;e++){let i=e*t.stride;n.moveTo(t.coords[i],t.coords[i+1])}else{let i=0;for(let s of t.lengths){n.moveTo(t.coords[i],t.coords[i+1]);for(let e=1;e<s;e++){let s=i+e*t.stride;n.lineTo(t.coords[s],t.coords[s+1])}3===e&&n.close(),i+=s*t.stride}}let s=n.result();if(!s)return null;let r=1===e?[s.length]:s.map(t=>t.length),h=[];for(let t of s)for(let e of t)h.push(e.x,e.y);return new l.A(r,h)}((0,a.Nl)(h,e,n,!1,!1,!0),i,r)}class F{constructor(t){this._features=t,this._index=-1,this._pathOffsets=[]}get _feature(){return this._features[this._index]}destroy(){}getAttributes(){return this._feature.attributes}getId(){return this._feature.id}getPathCount(){return 1===this._feature.type?1:this._feature.geometry.lengths.length}getPathLength(t){return 1===this._feature.type?this._feature.geometry.size:this._feature.geometry.lengths[t]}getType(){return this._feature.type}getX(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)]}getY(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)+1]}next(){return!(++this._index>=this._features.length||(this._pathOffsets=function(t){let e=Array(t.lengths.length),i=0;for(let n=0;n<t.lengths.length;n++)e[n]=i,i+=t.lengths[n];return e}(this._feature.geometry),0))}_getCoordinateIndex(t,e){return(1===this._feature.type?e:this._pathOffsets[t]+e)*this._feature.geometry.stride}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,5977],{67482(e,t,r){function i(e){return null!==o(e)}function o(e){return function(e){let t=n.exec(e);if(!t?.groups)return null;let r=t.groups,i=+r.year,o=r.month-1,s=+r.day,l=+(r.hours??"0"),a=+(r.minutes??"0"),u=+(r.seconds??"0");if(l>23||a>59||u>59)return null;let p,d=r.ms??"0",c=d?+d.padEnd(3,"0").slice(0,3):0;if(r.isUTC||!r.offsetSign)p=Date.UTC(i,o,s,l,a,u,c);else{let e=+r.offsetHours,t=+r.offsetMinutes;p=6e4*("+"===r.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,o,s,l,a,u,c)}return Number.isNaN(p)?null:p}(e)??function(e){let t=new Date(e),r=t.getTime();return Number.isNaN(r)?null:e.toLowerCase()===t.toUTCString().toLowerCase()?r:null}(e)??function(e){if(!s.test(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset()}(e)}r.d(t,{C:()=>i,_:()=>o});const n=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,s=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},18370(e,t,r){r.d(t,{z:()=>o});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function o(e){return new i(e)}},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>n,lM:()=>o});var i=r(34275);function o(e){if(!e)return 0;let t=u;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function n(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return a(e,8);let r=p;for(let i=0;i<t;i++)r+=s(e[i]);return r}(e);let t=u;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?n(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?a(t,16):0:0),0)}function a(e,t){return p+e.length*t}const u=32,p=16,d=145},13069(e,t,r){r.d(t,{AG:()=>l,lk:()=>o,vD:()=>s,yS:()=>n});const i="randomUUID"in crypto;function o(){if(i)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${o().toUpperCase()}}`}function s(){return`{${o()}}`}function l(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},65977(e,t,r){r.r(t),r.d(t,{default:()=>V});var i=r(32198),o=r(37838),n=r(49186),s=r(25728),l=r(91429),a=r(5443),u=r(16930),p=r(50498),d=r(41910),c=r(55156),y=r(60950),f=r(89808),h=r(99959);const g=Symbol("isOGCFeatureGraphicOrigin");var m;class w extends h.A{get[(m=g,y.ym)](){return this.layer}get[c.e](){return this.layer}get[f.Q](){return this.layer}get[d.e7](){return this.layer}constructor(e){super(),this[m]=!0,this.type="ogc-feature",this.layer=e}get id(){return this.layer.id}}var v=r(4146),C=r(92474),M=r(799),b=r(75321),I=r(4071),A=r(22671);let T=class extends C.x_{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){let{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:o,customParameters:n,effectiveMaxRecordCount:s}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:s,queryParameters:{apiKey:o,customParameters:n},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then(e=>A.A.fromJSON(e))}queryFeaturesJSON(e,t={}){let r=this.getSource();return this.load(t).then(()=>(0,b.bW)(r,e,t))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){let{isWebMercator:t,isWGS84:r,latestWkid:i,wkid:o}=e,{supportedCrs:n}=this.featureDefinition;return r||t||!!o&&!!n[o]||!!i&&!!n[i]}_conformsToType(e,t){let r=RegExp(`^${(0,M.Cj)(t)}$`,"i");return e.conformsTo.some(e=>r.test(e))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,supportsStatisticsAggregatedIds:!1,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsOutDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:I.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){let t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){let t=e.storageCrs??b.QE,r=(0,b.J0)(t);return null==r?u.A.WGS84:new u.A({wkid:r})}_getSupportedSpatialReferences(e,t){let r="#/crs",i=e.crs??[b.QE],o=i.includes(r)?i.filter(e=>e!==r).concat(t.crs??[]):i,n=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return o.filter(e=>!n.test(e))}async _loadOGCServices(e,t){let r=null==t?null:t.signal,{apiKey:i,collectionId:o,customParameters:s,fields:l,geometryType:a,hasZ:u,objectIdField:d,timeInfo:c,url:y}=e,f={fields:l?.map(e=>e.toJSON()),geometryType:p.Ye.toJSON(a),hasZ:u,objectIdField:d,timeInfo:c?.toJSON()},h={apiKey:i,customParameters:s,signal:r},g=await(0,b.Ki)(y,h),[m,w]=await Promise.all([(0,b.Px)(g,h),(0,b.CJ)(g,h)]);if(!this._conformsToType(m,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new n.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");let v=w.collections.find(({id:e})=>e===o);if(!v)throw new n.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");let C=this._conformsToType(m,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,b.GA)(g,h):null,I=await(0,b.GL)(v,f,h),A=this._getMaxRecordCount(C),T=this._getCapabilities(I.hasZ,A),S=this._getStorageSpatialReference(v).toJSON(),F=this._getSupportedSpatialReferences(v,w),P=RegExp(`^${(0,M.Cj)(b.vJ)}`,"i"),x={};for(let e of F){let t=(0,b.J0)(e);null!=t&&(x[t]||(x[t]=e.replace(P,"")))}this.featureDefinition={capabilities:T,collection:v,layerDefinition:I,spatialReference:S,supportedCrs:x}}};(0,i.Cg)([(0,l.MZ)()],T.prototype,"featureDefinition",void 0),(0,i.Cg)([(0,l.MZ)({constructOnly:!0})],T.prototype,"layer",void 0),(0,i.Cg)([(0,l.MZ)()],T.prototype,"type",void 0),T=(0,i.Cg)([(0,l.$K)("esri.layers.graphics.sources.OGCFeatureSource")],T);var S=r(52136),F=r(63074),P=r(69208),x=r(6455),O=r(87718),Z=r(56658),R=r(34287),j=r(32756),E=r(8303),G=r(54310),D=r(25036),N=r(82935),L=r(63396),k=r(10873),_=r(33143),U=r(20437),B=r(17036),$=r(30524),q=r(46499),K=r(39383),Q=r(41214),W=r(97552),z=r(30291);const J=(0,B.p)();let H=class extends((0,x.FJ)((0,S.p)((0,P.d)((0,Z.J)((0,O.F)((0,F.dM)((0,j.fY)((0,N.e)((0,L.d)((0,D.j)((0,R.q)((0,E.A)((0,G.J)((0,s.M)(v.A))))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new w(this),this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new T({layer:this}),this.spatialReference=null,this.timeInfo=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then(()=>this._fetchService(e))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,$.yp)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,z.tn)(this,e)}createQuery(){return new W.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1,o=t?.feature?.attributes,n=this.typeIdField&&o?.[this.typeIdField];return null!=n&&this.types&&(i=this.types.some(t=>t.id==n&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0))),!i&&!r&&(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(W.A.from(e)||this.createQuery(),t)).then(e=>(e?.features?.forEach(e=>{e.layer=e.sourceLayer=this,e.origin=this.graphicOrigin}),e))}async queryAttributeBins(e,t){throw new n.A("OGCFeatureLayer","Layer source does not support queryAttributeBins capability")}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,$.yp)(this.renderer,this.fieldsIndex),(0,$.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(let t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],H.prototype,"capabilities",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],H.prototype,"collectionId",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],H.prototype,"copyright",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],H.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],H.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],H.prototype,"displayField",void 0),(0,i.Cg)([(0,l.MZ)({type:Number})],H.prototype,"effectiveMaxRecordCount",null),(0,i.Cg)([(0,l.MZ)(k.Yj)],H.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,l.MZ)({type:[U.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],H.prototype,"fields",void 0),(0,i.Cg)([(0,l.MZ)(J.fieldsIndex)],H.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:a.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],H.prototype,"fullExtent",void 0),(0,i.Cg)([(0,l.MZ)({type:p.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:p.gy.read}}}}})],H.prototype,"geometryType",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,clonable:!1})],H.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],H.prototype,"hasZ",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,readOnly:!0})],H.prototype,"isTable",null),(0,i.Cg)([(0,l.MZ)({type:[q.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:K.w},write:!0}}}})],H.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,l.MZ)(k.kF)],H.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,l.MZ)(k.fV)],H.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,l.MZ)({type:Number})],H.prototype,"maxRecordCount",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],H.prototype,"objectIdField",void 0),(0,i.Cg)([(0,l.MZ)({type:["OGCFeatureLayer"]})],H.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,l.MZ)(k.M6)],H.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,l.MZ)({type:o.A,json:{name:"popupInfo",write:!0}})],H.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,l.MZ)({types:Q.Hg,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:Q.XJ,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],H.prototype,"renderer",null),(0,i.Cg)([(0,l.MZ)(k.PY)],H.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],H.prototype,"source",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:u.A,json:{origins:{service:{read:!0}}}})],H.prototype,"spatialReference",void 0),(0,i.Cg)([(0,l.MZ)((0,k.U$)({name:"layerDefinition.timeInfo"}))],H.prototype,"timeInfo",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],H.prototype,"title",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],H.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0})],H.prototype,"typeIdField",void 0),(0,i.Cg)([(0,l.MZ)({type:[_.A]})],H.prototype,"types",void 0),(0,i.Cg)([(0,l.MZ)(k.OZ)],H.prototype,"url",void 0),H=(0,i.Cg)([(0,l.$K)("esri.layers.OGCFeatureLayer")],H);const V=H},43334(e,t,r){r.d(t,{N3:()=>l,Om:()=>s});var i=r(69397),o=r(27647),n=r(92722);class s{constructor(e,t,r,i,o=0,n=null,s=null){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=o,this.distance=n,this.vertexCount=s}static fromJSON(e){let t=e.geometry?n.A.fromJSON(e.geometry):null,r=e.centroid?n.A.fromJSON(e.centroid):null,i=e.objectId;return new s(t,e.attributes,r,i,void 0,e.distance,e.vertexCount)}weakClone(){return new s(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new s(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(e){return this.centroid??=(0,o.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,i.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(e){return!!e.geometry?.coords?.length}},58512(e,t,r){r.d(t,{A:()=>i});class i{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let e=new i;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722(e,t,r){r.d(t,{A:()=>o});var i=r(69397);class o{constructor(e=[],t=[],r=!1,i=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=i}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:i}){return new o(e,t,r||!1,i||!1)}static fromRect([e,t,r,i]){let n=r-e,s=i-t;return new o([5],[e,t,n,0,0,s,-n,0,0,-s])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,i.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:i}=this,o=this.coords[i*t],n=this.coords[i*t+1];for(let s=1;s<r;s+=1){let r=i*(t+s),l=this.coords[r],a=this.coords[r+1];e+=-.5*(l-o)*(a+n),o=l,n=a}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let i of this.lengths){for(let o=0;o<i;o++){let i=r*(t+o);e(this.coords[i],this.coords[i+1])}t+=i}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,i=0,{stride:o}=this;for(let e of r){for(let r=1;r<e;r++){let e=o*(i+r);t[e]+=t[e-o],t[e+1]+=t[e+1-o]}i+=e}return e}clone(e){if(this.isPoint)return new o([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:i}=this,n=this.coords.slice(0,i*r);return e?(e.set(n),new o(t,e,this.hasZ,this.hasM)):new o(t,Array.from(n),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,i=0;t<r.length;t+=e)r[i++]=this.coords[t],r[i++]=this.coords[t+1];return new o(this.lengths,r,!1,!1)}}},27647(e,t,r){r.d(t,{Q:()=>n});var i=r(92722);function o(e,t){return e?t?4:3:t?3:2}function n(e){if(null==e||!e?.lengths.length)return null;let{lengths:t,coords:r,stride:o,hasZ:n,hasM:a}=e,u=new i.A([],[],n,!1),p=u.coords,d=[],c=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],y=0;for(let e of t){let t=s(c,r,y,e,n,a);t&&d.push(t),y+=e*o}if(d.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&n&&(r=e[4]-t[4]),r}),d.length){let e=6*d[0][2];p[0]=d[0][0]/e,p[1]=d[0][1]/e,n&&(e=6*d[0][4],p[2]=0===e?0:d[0][3]/e),(p[0]<c[0]||p[0]>c[1]||p[1]<c[2]||p[1]>c[3]||n&&(p[2]<c[4]||p[2]>c[5]))&&(p.length=0)}if(!p.length){let i=e.lengths[0]?l(r,0,t[0],n,a):null;if(!i)return null;p[0]=i[0],p[1]=i[1],n&&(p[2]=i[2]??0)}return u}function s(e,t,r,i,n,s){let l=o(n,s),a=r,u=r+l,p=0,d=0,c=0,y=0,f=0;for(let r=0,o=i-1;r<o;r++,a+=l,u+=l){let r=t[a],i=t[a+1],o=t[a+2],s=t[u],l=t[u+1],h=t[u+2],g=r*l-s*i;y+=g,p+=(r+s)*g,d+=(i+l)*g,n&&(g=r*h-s*o,c+=(o+h)*g,f+=g),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(o<e[4]&&(e[4]=o),o>e[5]&&(e[5]=o))}if(y>0&&(y*=-1),f>0&&(f*=-1),!y)return null;let h=[p,d,.5*y];return n&&(h[3]=c,h[4]=.5*f),h}function l(e,t,r,i,n){let s=o(i,n),l=t,c=t+s,y=0,f=0,h=0,g=0;for(let t=0,o=r-1;t<o;t++,l+=s,c+=s){let t=e[l],r=e[l+1],o=e[l+2],n=e[c],s=e[c+1],m=e[c+2],w=i?u(t,r,o,n,s,m):a(t,r,n,s);if(w)if(y+=w,i){let e=d(t,r,o,n,s,m);f+=w*e[0],h+=w*e[1],g+=w*e[2]}else{let e=p(t,r,n,s);f+=w*e[0],h+=w*e[1]}}return y>0?i?[f/y,h/y,g/y]:[f/y,h/y]:r>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function a(e,t,r,i){let o=r-e,n=i-t;return Math.sqrt(o*o+n*n)}function u(e,t,r,i,o,n){let s=i-e,l=o-t,a=n-r;return Math.sqrt(s*s+l*l+a*a)}function p(e,t,r,i){return[e+.5*(r-e),t+.5*(i-t)]}function d(e,t,r,i,o,n){return[e+.5*(i-e),t+.5*(o-t),r+.5*(n-r)]}},99352(e,t,r){r.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},90708(e,t,r){r.d(t,{Ap:()=>F,B2:()=>g,DF:()=>b,Di:()=>j,E2:()=>R,IE:()=>h,Nl:()=>U,PR:()=>T,Rk:()=>z,Ux:()=>G,Ye:()=>x,ZF:()=>L,aQ:()=>Q,jH:()=>_,jQ:()=>K,kz:()=>B,oN:()=>E,q3:()=>k,qN:()=>I,zv:()=>D});var i=r(49186),o=r(53966),n=r(97768),s=r(70328),l=r(19419),a=r(60408),u=r(43334),p=r(58512),d=r(92722),c=r(54339);const y=()=>o.A.getLogger("esri.layers.graphics.featureConversionUtils"),f={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function h({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function g({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function m({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function w({scale:e,translate:t},r){return Math.round((r-t[1])/e[1])}function v({scale:e,translate:t},r,i){return r*e[i]+t[i]}function C(e,t,r){return t&&(e.hasZ=!0),r&&(e.hasM=!0),e}function M(e,t,r,i){if(t&&i&&e!==r)return(t,r,i,o)=>{i[o++]=t[r++],i[o++]=t[r++],e?r++:i[o++]=0,i[o++]=t[r++]??0};let o=+!!r+2+ +!!i,n=o-((!e&&r?1:0)+(!t&&i?1:0));return(e,t,r,i)=>{for(let s=0;s<o;++s)r[i++]=s<n?e[t++]??0:0}}function b(e,t,r){if(!e)return null;let{coords:i,hasZ:o,hasM:n}=e,[s,l]=i,a=o?i[2]:0,u=n?i[+!!o+2]:0;return{x:s,y:l,z:t?a:void 0,m:r?u:void 0}}function I(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{x:i,y:o,z:n,m:s}=e,l=[i,o];return t&&l.push(n??0),r&&l.push(s??0),new d.A([],l,t,r)}function A(e,t,r){if(null==e)return null;let{coords:i,stride:o,hasZ:n,hasM:s}=e,l=M(n,s,t,r),a=[];for(let e=0;e<i.length;e+=o){let t=[];l(i,e,t,0),a.push(t)}return C({points:a},t,r)}function T(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{points:i,hasZ:o,hasM:n}=e,s=new d.A([i.length],[],t,r),{coords:l,stride:u}=s,p=0,c=M(o??!1,n??!1,t,r);for(let e of i)c(e,0,l,p),p+=u;return s}function S(e,t,r){if(!e)return null;let{coords:i,lengths:o,stride:n,hasZ:s,hasM:l}=e,a=0,u=M(s,l,t,r),p=[];for(let e of o){let t=[];for(let r=0;r<e;r++){let e=[];u(i,a,e,0),a+=n,t.push(e)}p.push(t)}return C({paths:p},t,r)}function F(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{paths:i,hasZ:o,hasM:n}=e,s=M(o??!1,n??!1,t,r),l=new d.A([],[],t,r),{lengths:u,coords:p,stride:c}=l,y=0;for(let e of i){for(let t of e)s(t,0,p,y),y+=c;u.push(e.length)}return l}function P(e,t,r){if(!e)return null;let{coords:i,lengths:o,stride:n,hasZ:s,hasM:l}=e,a=0,u=M(s,l,t,r),p=[];for(let e of o){let t=[];for(let r=0;r<e;r++){let e=[];u(i,a,e,0),a+=n,t.push(e)}p.push(t)}return C({rings:p},t,r)}function x(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{rings:i,hasZ:o,hasM:n}=e,s=new d.A([],[],t,r),{lengths:l,coords:u,stride:p}=s,c=0,y=M(o??!1,n??!1,t,r);for(let e of i){for(let t of e)y(t,0,u,c),c+=p;l.push(e.length)}return s}const O=[],Z=[];function R(e,t,r,i,o){O[0]=e;let[n]=j(Z,O,t,r,i,o);return J(O),J(Z),n}function j(e,t,r,o,n,s){if(J(e),!r){for(let r of t){let t=(0,c.W)(r,s);e.push(new u.Om(null,r.attributes,null,t,void 0,r.distance,r.vertexCount))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,i,o){for(let n of t){let{geometry:t,attributes:s,centroid:l}=n,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?I(t,r&&p,i&&d):null,s,l?I(l,!1,!1):null,(0,c.W)(n,o),n.displayId,n.distance,n.vertexCount))}return e}(e,t,o,n,s);case"esriGeometryMultipoint":return function(e,t,r,i,o){for(let n of t){let{geometry:t,attributes:s}=n,l=(0,a.Pv)(t),p=(0,a.W0)(t);e.push(new u.Om(t?T(t,r&&l,i&&p):null,s,null,(0,c.W)(n,o),n.displayId,n.distance,n.vertexCount))}return e}(e,t,o,n,s);case"esriGeometryPolyline":return function(e,t,r,i,o){for(let n of t){let{geometry:t,attributes:s,centroid:l}=n,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?F(t,r&&p,i&&d):null,s,l?I(l,!1,!1):null,(0,c.W)(n,o),n.displayId,n.distance,n.vertexCount))}return e}(e,t,o,n,s);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,r,i,o){for(let n of t){let{geometry:t,attributes:s,centroid:l}=n,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?x(t,r&&p,i&&d):null,s,l?I(l,!1,!1):null,(0,c.W)(n,o),n.displayId,n.distance,n.vertexCount))}return e}(e,t,o,n,s);default:y().error("convertToFeatureSet:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`)),J(e)}return e}function E(e,t,r,i){Z[0]=e,N(O,Z,t,r,i);let o=O[0];return J(O),J(Z),o}function G(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){return null==e?null:(0,a.fT)(e)?I(e,t,r):(0,a.Bi)(e)?x(e,t,r):(0,a.Rg)(e)?F(e,t,r):(0,a.U9)(e)?T(e,t,r):void y().error("convertFromGeometry:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function D(e,t,r,o){if(null==e)return null;let n="coords"in e?e:e.geometry;if(null==n)return null;switch(t){case"esriGeometryPoint":return b(n,r,o);case"esriGeometryMultipoint":return A(n,r,o);case"esriGeometryPolyline":return S(n,r,o);case"esriGeometryPolygon":return P(n,r,o);default:return y().error("convertToGeometry:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`)),null}}function N(e,t,r,o,n){if(J(e),null==r)return function(e,t){for(let r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,i){for(let{geometry:o,attributes:n}of t)e.push({attributes:n,geometry:b(o,r,i)});return e}(e,t,o,n);case"esriGeometryMultipoint":return function(e,t,r,i){for(let{geometry:o,attributes:n}of t)e.push({geometry:o&&A(o,r,i),attributes:n});return e}(e,t,o,n);case"esriGeometryPolyline":return function(e,t,r,i){for(let{geometry:o,attributes:n}of t)e.push({geometry:o&&S(o,r,i),attributes:n});return e}(e,t,o,n);case"esriGeometryPolygon":return function(e,t,r,i){for(let{geometry:o,attributes:n,centroid:s}of t){let t=P(o,r,i),l=b(s,!1,!1);e.push(s?{geometry:t,attributes:n,centroid:l}:{geometry:t,attributes:n})}return e}(e,t,o,n);default:y().error("convertToFeatureSet:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`))}return e}function L(e){let{spatialReference:t,transform:r,fields:i,hasM:o,hasZ:n,features:s,geometryType:l,exceededTransferLimit:a,queryGeometry:u,queryGeometryType:p}=e,d={features:N([],s,l,n,o),fields:i,geometryType:l,spatialReference:t,queryGeometry:D(u,p,n,o)};return r&&(d.transform=r),a&&(d.exceededTransferLimit=a),o&&(d.hasM=o),n&&(d.hasZ=n),d}function k(e,t){let r=new p.A,{hasM:i,hasZ:o,features:n,spatialReference:s,geometryType:l,exceededTransferLimit:a,transform:u,fields:d,globalIdFieldName:c}=e;return d&&(r.fields=d),r.geometryType=l??null,r.spatialReference=s??null,n&&j(r.features,n,l,o,i,t),a&&(r.exceededTransferLimit=a),i&&(r.hasM=i),o&&(r.hasZ=o),u&&(r.transform=u),c&&(r.globalIdFieldName=c),r}function _(e,t){let{geometryType:r,features:i}=t;if(!e)return t;for(let t=0;t<i.length;t++){let o=i[t],n=o.weakClone();n.geometry=U(o.geometry,r,e),n.centroid=U(o.centroid,"esriGeometryPoint",e),i[t]=n}return t.transform=e,t}function U(e,t,r,i,o,n=!1){if(null==e||!e?.coords.length)return null;let s=f[t],{coords:l,lengths:a,stride:u,hasZ:p,hasM:c}=e;i??=p,o??=c;let y=new d.A([],[],i,o),v=y.stride,C=M(p,c,i,o),b=0,I=[0,0,0,0].slice(v),A=n?m:h,T=n?w:g;function S(){C(l,b,I,0),b+=u,I[0]=A(r,I[0]),I[1]=T(r,I[1])}if(e.isPoint)return S(),y.coords.push(...I),y;let F=0;for(let e of a){if(e<s)continue;let t=1;S(),y.coords.push(...I);let[r,i]=I;for(let o=1;o<e;o++){S();let[e,o]=I;(r!==e||i!==o)&&(n||(I[0]-=r,I[1]-=i),y.coords.push(...I),r=e,i=o,t++)}t>=s?(y.lengths.push(t),F=y.coords.length):J(y.coords,F)}return J(y.coords,F),y.coords.length?y:null}function B(e,t,r,i=e.hasZ,o=e.hasM){if(!e.coords.length)return null;let n=f[t],{coords:s,lengths:l,stride:a,hasZ:u,hasM:p}=e,c=new d.A([],[],i,o),y=c.stride,h=M(u,p,i,o);if(e.isPoint)return h(s,0,c.coords,0),c;let g=0,m=r*r;for(let e of l){if(e<n){g+=e*a;continue}let t=c.coords.length/y,r=g,i=g+(e-1)*a;h(s,r,c.coords,c.coords.length),q(c.coords,s,a,m,h,r,i),h(s,i,c.coords,c.coords.length);let o=c.coords.length/y-t;o>=n?c.lengths.push(o):J(c.coords,t*y),g+=e*a}return c.coords.length?c:null}function $(e,t,r,i){let o=e[t],n=e[t+1],s=e[r],l=e[r+1],a=e[i],u=e[i+1],p=s,d=l,c=a-p,y=u-d;if(0!==c||0!==y){let e=((o-p)*c+(n-d)*y)/(c*c+y*y);e>1?(p=a,d=u):e>0&&(p+=c*e,d+=y*e)}return c=o-p,y=n-d,c*c+y*y}function q(e,t,r,i,o,n,s){let l,a=i,u=0;for(let e=n+r;e<s;e+=r)l=$(t,e,n,s),l>a&&(u=e,a=l);a>i&&(u-n>r&&q(e,t,r,i,o,n,u),o(t,u,e,e.length),s-u>r&&q(e,t,r,i,o,u,s))}function K(e,t){if(!t?.coords?.length)return null;let r=1/0,i=1/0,o=-1/0,n=-1/0,{coords:a,stride:u}=t;for(let e=0;e<a.length;e+=u){let t=a[e],s=a[e+1];r=Math.min(r,t),o=Math.max(o,t),i=Math.min(i,s),n=Math.max(n,s)}return(0,s.is)(e)?(0,s.BI)(e,r,i,o,n):(0,l.fA)(r,i,o,n,e),e}function Q(e,t){let{coords:r,lengths:i,stride:o,hasZ:s,hasM:l}=e;if(!r.length)return void(i.length=0);(0,n.Lw)(t);let{originPosition:a,scale:u,translate:p}=t,d=H;d.originPosition=a;let c=d.scale;c[0]=u[0]??1,c[1]=-(u[1]??1),c[2]=u[2]??1,c[3]=u[3]??1;let y=d.translate;if(y[0]=p[0]??0,y[1]=p[1]??0,y[2]=p[2]??0,y[3]=p[3]??0,l&&!s&&(c[2]=c[3],y[2]=y[3]),!i.length){for(let e=0;e<o;++e)r[e]=v(d,r[e],e);return void(i.length=0)}let f=0;for(let e=0;e<i.length;e++){let t=i[e];i[e]=t;for(let e=0;e<o;++e)r[f+e]=v(d,r[f+e],e);let n=r[f],s=r[f+1];f+=o;for(let e=1;e<t;e++,f+=o){n+=r[f]*c[0],s+=r[f+1]*c[1],r[f]=n,r[f+1]=s;for(let e=2;e<o;++e)r[f+e]=v(d,r[f+e],e)}}}function W(e,t,r,i){let o=0,n=e[i*t],s=e[i*(t+1)];for(let l=1;l<r;l++){let r=n+e[i*(t+l)],a=s+e[i*(t+l)+1],u=(r-n)*(a+s);n=r,s=a,o+=u}return.5*o}function z(e,t){let{coords:r,lengths:i}=e,o=0,n=0;for(let e=0;e<i.length;e++){let s=i[e];n+=W(r,o,s,t),o+=s}return Math.abs(n)}function J(e,t=0){e.length!==t&&(e.length=t)}const H={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},85113(e,t,r){r.d(t,{BM:()=>T,bd:()=>S,sO:()=>A,xD:()=>d});var i=r(67482),o=r(49186),n=r(21325),s=r(90708),l=r(43334),a=r(92722),u=r(30524);const p={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function d(e){return p[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(let t of e.features)t&&(yield t)}}function*y(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(let t of e.coordinates)yield*t;break;case"MultiPolygon":for(let t of e.coordinates)for(let e of t)yield*e}}function f(e){for(let t of e)if(t.length>2)return!0;return!1}function h(e){let t=0;for(let r=0;r<e.length;r++){let i=e[r],o=e[(r+1)%e.length];t+=i[0]*o[1]-o[0]*i[1]}return t<=0}function g(e){let t=e[0],r=e[e.length-1];(t[0]!==r[0]||t[1]!==r[1]||t[2]!==r[2])&&e.push(t)}function m(e,t){let{coordinates:r,type:i}=e,o=t.hasZ??!1;switch(i){case"Point":return new a.A([],[...r],o,!1);case"LineString":return(0,s.Ap)({paths:[r],hasZ:!0},o,!1);case"MultiLineString":return(0,s.Ap)({paths:r,hasZ:!0},o,!1);case"MultiPoint":return(0,s.PR)({points:r,hasZ:!0},o,!1);case"Polygon":case"MultiPolygon":{let e=new a.A([],[],o,!1);for(let t of"Polygon"===i?[r]:r){w(e,t[0],o);for(let r=1;r<t.length;r++)v(e,t[r],o)}return e}}}function w(e,t,r){g(t),function(e){return!h(e)}(t)?M(e,t,r):C(e,t,r)}function v(e,t,r){g(t),function(e){return h(e)}(t)?M(e,t,r):C(e,t,r)}function C(e,t,r){for(let i of t)b(e,i,r);e.lengths.push(t.length)}function M(e,t,r){for(let i=t.length-1;i>=0;i--)b(e,t[i],r);e.lengths.push(t.length)}function b(e,[t,r,i],o){e.coords.push(t,r),o&&e.coords.push(i||0)}function I(e){switch(typeof e){case"string":return(0,i.C)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function A(e,t=4326){if(!e)throw new o.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new o.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});let{crs:r}=e;if(!r)return;let i="string"==typeof r?r:"name"===r.type?r.properties.name:"EPSG"===r.type?r.properties.code:null,s=(0,n.oT)({wkid:t})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${t})$`,"i");if(!i||!s.test(i))throw new o.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:r})}function T(e,t={}){let r,i=[],o=new Set,n=new Set,s=!1,l=null,a=!1,{geometryType:p=null}=t;for(let t of c(e)){let{geometry:e,properties:c,id:h}=t;if((!e||(p||=d(e.type),d(e.type)===p))&&(s||=f(y(e)),a||(a=null!=h,a&&(r=typeof h,c&&(l=Object.keys(c).filter(e=>c[e]===h)))),c&&l&&a&&null!=h&&(l.length>1?l=l.filter(e=>c[e]===h):1===l.length&&(l=c[l[0]]===h?l:[])),c))for(let e in c){if(o.has(e))continue;let t=I(c[e]);if("unknown"===t){n.add(e);continue}n.delete(e),o.add(e);let r=(0,u.rS)(e);r&&i.push({name:r,alias:e,type:t})}}let h=(0,u.rS)(1===l?.length&&l[0]||null)??void 0;if(h)for(let e of i)if(e.name===h&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:i,geometryType:p,hasZ:s,objectIdFieldName:h,objectIdFieldType:r,unknownFields:Array.from(n)}}function S(e,t){return Array.from(function*(e,t={}){let{geometryType:r,objectIdField:i}=t;for(let o of e){let{geometry:e,properties:n,id:s}=o;if(e&&d(e.type)!==r)continue;let a,u=n||{};i&&(a=u[i],null!=s&&!a&&(u[i]=a=s)),yield new l.Om(e&&m(e,t),u,null,a)}}(c(e),t))}},64714(e,t,r){r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>c,f:()=>y});var i=r(44208),o=r(4718),n=r(99352),s=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${d(t)} = null;`);for(let t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;let i=Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch{return()=>t?{[t]:null,...e}:{...e}}}function d(e){return a.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,o.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832(e,t,r){r.d(t,{$1:()=>w,CR:()=>m,MB:()=>f,Yx:()=>p,bP:()=>c});var i=r(67482),o=r(18370),n=r(60408),s=r(21325),l=r(30524);class a{constructor(e){this.description=e,this.code=null}}class u{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new a(e)}}function p(e){return new u(e)}class d{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function c(e){return new d(e)}const y=new Set;function f(e,t,r,i=!1){y.clear();for(let o in r){let n=e.get(o);if(!n)continue;let s=h(n,r[o]);if(y.add(n.name),n&&(i||n.editable)){let e=(0,l.CJ)(n,s);if(e)return p((0,l.uo)(e,n,s));t[n.name]=s}}for(let t of e.requiredFields??[])if(!y.has(t.name))return p(`missing required field "${t.name}"`);return null}function h(e,t){let r=t;return(0,l.WA)(e)&&"string"==typeof t?r=(0,l.XT)(t):(0,l.yM)(e)&&null!=t&&"string"!=typeof t?r=String(t):(0,l.vE)(e)&&"string"==typeof t&&(r=(0,i._)(t)),(0,l.WX)(r)}const g=(0,o.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(3456)]).then(()=>r(3637)));function m(e,t){if(!(0,n.Bi)(e)&&!(0,n.Rg)(e)||!(0,s.fn)(t))return e;let r=g.module;if(null==r)throw TypeError("simplify operator not loaded");return r.simplifyExecute({...e,spatialReference:t})??e}async function w(e,t){(0,s.fn)(e)&&("esriGeometryPolygon"===t||"esriGeometryPolyline"===t)&&await g.getImportPromise()}r.d(t,["PC",0,{supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}])},52136(e,t,r){var i=r(32198),o=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,i.Cg)([(0,o.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},69208(e,t,r){var i=r(32198),o=r(91429);r.d(t,["d",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,o.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},6455(e,t,r){r.d(t,{FJ:()=>m,Dp:()=>w,KV:()=>v});var i=r(32198),o=r(93637),n=r(91429),s=r(89317),l=r(69540),a=r(7762),u=r(25482),p=r(83960),d=r(13069);const c={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let y=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.id=(0,d.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],y.prototype,"id",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:c})],y.prototype,"maxScale",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:c})],y.prototype,"minScale",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],y.prototype,"title",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],y.prototype,"where",void 0),y=(0,i.Cg)([(0,n.$K)("esri.layers.support.DisplayFilter")],y);var f=r(41560),h=r(43937);let g=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(a.A.ofType(y)),this.mode="manual"}writeFilters(e,t,r,i){let o=e.toArray();"scale"===this.mode&&o.sort((e,t)=>{let r=(0,p.oW)(t.minScale,e.minScale),i=e.maxScale-t.maxScale;return 0===r?i:r}),t[r]=o.map(e=>e.toJSON(i))}write(e,t){return super.write(e,(0,f.mW)(this,t))}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],g.prototype,"activeFilterId",void 0),(0,i.Cg)([(0,n.MZ)({type:a.A.ofType(y),nonNullable:!0,json:{write:!0}})],g.prototype,"filters",void 0),(0,i.Cg)([(0,h.K)("filters")],g.prototype,"writeFilters",null),(0,i.Cg)([(0,n.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],g.prototype,"mode",void 0),g=(0,i.Cg)([(0,n.$K)("esri.layers.support.DisplayFilterInfo")],g);const m=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,i.Cg)([(0,n.MZ)(w)],r.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,n.MZ)(v)],r.prototype,"displayFilterInfo",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.DisplayFilteredLayer")],r),r},w={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:s.K,writer(e,t,r){(0,o.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},v={type:g,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:s.K},origins:{"web-scene":{write:!1,read:!1}}}}},32756(e,t,r){r.d(t,{Rr:()=>l});var i=r(32198),o=r(93637),n=r(91429),s=r(91880);function l(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let o=new s.A;return o.read(i,r),[o]}const a={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){let n=e.find(e=>!!e.field);n&&(0,o.sM)(r,[n.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,n.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,a])},8303(e,t,r){var i=r(32198),o=r(92602),n=r(70333),s=r(56507),l=r(60999),a=r(49186),u=r(36563),p=r(53966),d=r(97768),c=r(17676),y=r(84952),f=r(91429),h=r(77548),g=r(20655),m=r(80812),w=r(41318),v=r(10407),C=r(36005),M=r(43937);const b={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,I=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,d.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:o}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await o({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,o,s=!n.id?.findCredential(this.url),l=e===r.id;if(l&&r.portal.user)return this._getUserPrivileges(r,s);if(l)i=r.portal.url;else try{i=await(0,h.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,y.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;o=await(n.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await r.reload():(r=new m.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,v.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;let r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,o=g.A.getDefault();if(o&&o.loaded&&(0,y.S8)(o.restUrl)===(0,y.S8)(i))return o.user;let a=`${i}/community/self`,u=null==e?null:e.signal,p=await(0,l.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){let r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&i&&!(0,y.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,f.MZ)({type:m.default})],I.prototype,"portalItem",null),(0,i.Cg)([(0,C.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,i.Cg)([(0,M.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,i.Cg)([(0,f.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,i.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],I),I}])},82935(e,t,r){var i=r(32198),o=r(91429),n=r(30524),s=r(96184),l=r(73133),a=r(79677),u=r(10184),p=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"}}};r.d(t,["B",0,d,"e",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){let r=t.timeInfo.exportOptions;if(!r)return null;let i=r.timeOffset,o=l.j.fromJSON(r.timeOffsetUnits);return i&&o?new u.A({value:i,unit:o}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,n.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,o.MZ)({type:a.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,o.MZ)({type:u.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,p.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,o.MZ)({value:null,type:s.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,o.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},63396(e,t,r){r.d(t,{d:()=>I});var i=r(32198),o=r(91429),n=r(41910),s=r(60950),l=r(99959);class a extends l.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[s.ym](){return this.trackInfoProvider.trackInfo}get[n.e7](){return this.trackInfoProvider}}var u=r(37838),p=r(69540),d=r(25482),c=r(93637),y=r(50820),f=r(10873),h=r(46499),g=r(41214);let m=class extends((0,p.OU)(d.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,i.Cg)([(0,o.MZ)({type:[h.A],json:{write:!0}})],m.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,o.MZ)(f.kF)],m.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,o.MZ)({types:g.Hg,json:{write:!0}})],m.prototype,"renderer",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"visible",void 0),m=(0,i.Cg)([(0,o.$K)("esri.layers.support.TrackPartInfo")],m);var w=r(96576),v=r(59868),C=r(10184),M=r(43937);let b=class extends((0,p.OU)(d.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new m({renderer:new w.A({symbol:v.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new m({renderer:new w.A({symbol:v.UK.clone()})}),this.trackLines=new m({renderer:new w.A({symbol:v.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){let i=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,c.sM)(r,i,t)}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],b.prototype,"enabled",void 0),(0,i.Cg)([(0,o.MZ)({type:[y.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,i.Cg)([(0,M.K)("fields")],b.prototype,"writeFields",null),(0,i.Cg)([(0,o.MZ)({type:m,json:{write:!0}})],b.prototype,"latestObservations",void 0),(0,i.Cg)([(0,o.MZ)({type:C.A,json:{write:!0}})],b.prototype,"maxDisplayDuration",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],b.prototype,"maxDisplayObservationsPerTrack",void 0),(0,i.Cg)([(0,o.MZ)(f.M6)],b.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,o.MZ)({type:u.A,json:{name:"popupInfo",write:!0}})],b.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,o.MZ)({type:m,json:{write:!0}})],b.prototype,"previousObservations",void 0),(0,i.Cg)([(0,o.MZ)({type:m,json:{write:!0}})],b.prototype,"trackLines",void 0),(0,i.Cg)([(0,o.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],b.prototype,"timeField",void 0),b=(0,i.Cg)([(0,o.$K)("esri.layers.support.TrackInfo")],b);const I=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new a(this),this.trackInfo=null}};return(0,i.Cg)([(0,o.MZ)({readOnly:!0,clonable:!1})],r.prototype,"trackGraphicOrigin",void 0),(0,i.Cg)([(0,o.MZ)({type:b})],r.prototype,"trackInfo",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.TrackableLayer")],r),r}},75321(e,t,r){r.d(t,{CJ:()=>I,GA:()=>S,GL:()=>b,I:()=>x,J0:()=>F,Ki:()=>T,Px:()=>A,bW:()=>P});var i=r(56507),o=r(49186),n=r(53966),s=r(84952),l=r(16930),a=r(21325),u=r(28735),p=r(90708),d=r(58512),c=r(85113),y=r(64714),f=r(82832),h=r(95466),g=r(98453);r(98623);const m=()=>n.A.getLogger("esri.layers.ogc.ogcFeatureUtils"),w="startindex",v=new Set([w,"offset"]),C="http://www.opengis.net/def/crs/",M=`${C}OGC/1.3/CRS84`;async function b(e,t,r={},n=5){let{links:l}=e,a=E(l);if(!a)throw new o.A("ogc-feature-layer:missing-items-page","Missing items url");let{apiKey:u,customParameters:p,signal:d}=r,f=(0,s.s2)(a.href,e.landingPage.url),v={limit:n,...p,token:u},C=(0,s.a6)(f,v),{data:M}=await(0,i.A)(C,{signal:d,headers:{accept:"application/geo+json"}}),b=N(C,n,M.links)??w;(0,c.sO)(M);let I=M.numberMatched,A=(0,c.BM)(M,{geometryType:t.geometryType}),T=t.fields||A.fields||[],S=null==t.hasZ?A.hasZ:t.hasZ,F=A.geometryType,P=t.objectIdField||A.objectIdFieldName||"OBJECTID",x=t.timeInfo,O=T.find(({name:e})=>e===P);if(O)O.editable=!1,O.nullable=!1;else{if(!A.objectIdFieldType)throw new o.A("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");T.unshift({name:P,alias:P,type:"number"===A.objectIdFieldType?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if(P!==A.objectIdFieldName){let e=T.find(({name:e})=>e===A.objectIdFieldName);e&&(e.type="esriFieldTypeInteger")}T===A.fields&&A.unknownFields.length>0&&m().warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:A.unknownFields}});for(let e of T){if(e.name??=e.alias,e.alias??=e.name,"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable??=!0,e.nullable??=!0),!e.name)throw new o.A("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!g.m.jsonValues.includes(e.type))throw new o.A("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(x){let e=new h.A(T);if(x.startTimeField){let t=e.get(x.startTimeField);t?(x.startTimeField=t.name,t.type="esriFieldTypeDate"):x.startTimeField=null}if(x.endTimeField){let t=e.get(x.endTimeField);t?(x.endTimeField=t.name,t.type="esriFieldTypeDate"):x.endTimeField=null}if(x.trackIdField){let t=e.get(x.trackIdField);t?x.trackIdField=t.name:(x.trackIdField=null,m().warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:x}}))}x.timeReference||={timeZoneIANA:"UTC"},!x.startTimeField&&!x.endTimeField&&(m().warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:x}}),x=void 0)}return{drawingInfo:F?(0,y.F0)(F):null,extent:j(e),geometryType:F,fields:T,hasZ:!!S,objectIdField:P,paginationParameter:b,timeInfo:x,featureCount:I}}async function I(e,t={}){let{links:r,url:n}=e,l=G(a=r,"data","application/json")??G(a,"http://www.opengis.net/def/rel/ogc/1.0/data","application/json");var a;if(!l)throw new o.A("ogc-feature-layer:missing-collections-page","Missing collections url");let{apiKey:u,customParameters:p,signal:d}=t,c=(0,s.s2)(l.href,n),{data:y}=await(0,i.A)(c,{signal:d,headers:{accept:"application/json"},query:{...p,token:u}});for(let t of y.collections)t.landingPage=e;return y}async function A(e,t={}){let{links:r,url:n}=e,l=G(a=r,"conformance","application/json")??G(a,"http://www.opengis.net/def/rel/ogc/1.0/conformance","application/json");var a;if(!l)throw new o.A("ogc-feature-layer:missing-conformance-page","Missing conformance url");let{apiKey:u,customParameters:p,signal:d}=t,c=(0,s.s2)(l.href,n),{data:y}=await(0,i.A)(c,{signal:d,headers:{accept:"application/json"},query:{...p,token:u}});return y}async function T(e,t={}){let{apiKey:r,customParameters:o,signal:n}=t,{data:s}=await(0,i.A)(e,{signal:n,headers:{accept:"application/json"},query:{...o,token:r}});return s.url=e,s}async function S(e,t={}){let{links:r,url:o}=e,n=G(r,"service-desc","application/vnd.oai.openapi+json;version=3.0");if(!n)return m().warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;let{apiKey:l,customParameters:a,signal:u}=t,p=(0,s.s2)(n.href,o),{data:d}=await(0,i.A)(p,{signal:u,headers:{accept:"application/vnd.oai.openapi+json;version=3.0"},query:{...a,token:l}});return d}function F(e){let t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e)?.groups;if(!t)return null;let{authority:r,code:i}=t;switch(r.toLowerCase()){case"ogc":switch(i.toLowerCase()){case"crs27":return l.A.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return l.A.WGS84.wkid;default:return null}case"esri":case"epsg":{let e=Number.parseInt(i,10);return Number.isNaN(e)?null:e}default:return null}}async function P(e,t,r){let i=await x(e,t,r);return(0,p.ZF)(i)}async function x(e,t,r){let{collection:{links:n,landingPage:{url:y}},layerDefinition:g,maxRecordCount:m,queryParameters:{apiKey:w,customParameters:v},spatialReference:C,supportedCrs:M}=e,b=E(n);if(!b)throw new o.A("ogc-feature-layer:missing-items-page","Missing items url");let{geometry:I,num:A,start:T,timeExtent:S,where:F}=t;if(t.objectIds)throw new o.A("ogc-feature-layer:query-by-objectids-not-supported","Queries with object ids are not supported");let P=l.A.fromJSON(C),x=t.outSpatialReference??P,Z=x.isWGS84?null:O(x,M),j=R(I,M),G=function(e){if(!e)return null;let{start:t,end:r}=e;return`${null==t?"..":t.toISOString()}/${null==r?"..":r.toISOString()}`}(S),N=(H=F)&&"1=1"!==H?H:null,L=A??(null==T?m:10),k=0===T?void 0:T,{fields:_,geometryType:U,hasZ:B,objectIdField:$,paginationParameter:q}=g,K=(0,s.s2)(b.href,y),{data:Q}=await(0,i.A)(K,{...r,query:{...v,...j,crs:Z,datetime:G,query:N,limit:L,[q]:k,token:w},headers:{accept:"application/geo+json"}}),W=(0,c.bd)(Q,{geometryType:U,hasZ:B,objectIdField:$}),z=W.length===L&&!!D(Q.links??[]),J=new h.A(_);var H;for(let e of W){let t={};(0,f.MB)(J,t,e.attributes,!0);for(let e of J.fields)e.nullable&&!(e.name in t)&&(t[e.name]=null);t[$]=e.attributes[$],e.attributes=t}if(!Z&&x.isWebMercator)for(let e of W)if(null!=e.geometry&&null!=U){let t=(0,p.zv)(e.geometry,U,B,!1);t.spatialReference=l.A.WGS84,e.geometry=(0,p.Ux)((0,u.Cv)(t,x))}for(let e of W)e.objectId=e.attributes[$];let V=Z||!Z&&x.isWebMercator?x.toJSON():a.KK,Y=new d.A;return Y.exceededTransferLimit=z,Y.features=W,Y.fields=_,Y.geometryType=U,Y.hasZ=B,Y.spatialReference=V,Y}function O(e,t){let{isWebMercator:r,wkid:i,latestWkid:o}=e;if(!i&&!o)return null;let n=r?t[3857]??t[102100]??t[102113]??t[900913]:i&&t[i]||o&&t[o];return n?`${C}${n}`:null}function Z(e){if(!e)return"";let{xmin:t,ymin:r,xmax:i,ymax:o}=e;return`${t},${r},${i},${o}`}function R(e,t){if(!function(e){return null!=e&&"extent"===e.type}(e))return null;let{spatialReference:r}=e;if(!r||r.isWGS84)return{bbox:Z(e)};let i=O(r,t);return null==i?r.isWebMercator?{bbox:Z((0,u.Cv)(e,l.A.WGS84))}:null:{bbox:Z(e),"bbox-crs":i}}function j(e){let t=e.extent?.spatial;if(!t)return null;let r=t.bbox[0],i=4===r.length,[o,n]=r,s=i?void 0:r[2];return{xmin:o,ymin:n,xmax:i?r[2]:r[3],ymax:i?r[3]:r[4],zmin:s,zmax:i?void 0:r[5],spatialReference:l.A.WGS84.toJSON()}}function E(e){return G(e,"items","application/geo+json","http://www.opengis.net/def/profile/ogc/0/rfc7946")??G(e,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json","http://www.opengis.net/def/profile/ogc/0/rfc7946")}function G(e,t,r,i){return i?e.find(({rel:e,type:o,profile:n})=>e===t&&o===r&&n?.includes(i))??e.find(({rel:e,type:i,profile:o})=>e===t&&i===r&&!o):e.find(({rel:e,type:i})=>e===t&&i===r)??e.find(({rel:e,type:r})=>e===t&&!r)}function D(e){return G(e,"next","application/geo+json")}function N(e,t,r){if(!r)return;let i=D(r),o=(0,s.An)(i?.href)?.query;if(!o)return;let n=(0,s.An)(e).query,l=Object.keys(n??{});return Object.entries(o).filter(([e])=>!l.includes(e)).find(([e,r])=>v.has(e.toLowerCase())&&Number.parseInt(r,10)===t)?.[0]}r.d(t,["QE",0,M,"vJ",0,C])},29005(e,t,r){r.d(t,{A:()=>u});var i=r(32198),o=r(69540),n=r(66552),s=r(25482),l=r(91429);const a=new n.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>d});var i=r(32198),o=r(69540),n=r(25482),s=r(91429),l=r(8631),a=r(29005),u=r(36005),p=r(43937);let d=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,s.MZ)({type:[a.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],d)},91880(e,t,r){r.d(t,{A:()=>u});var i,o=r(32198),n=r(66552),s=r(25482),l=r(91429);const a=new n.J({asc:"ascending",desc:"descending"});let u=class extends s.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],u.prototype,"order",void 0),u=i=(0,o.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>n});var i=r(34727),o=r(39516);function n(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){let n=function(e){if("manual"===u(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(n&&((0,i.gg)(t,n[0])||(0,i.ZH)(r,n[1])))return"";let s=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;let o=p(e.at(0)?.minScale),n=d(e.at(-1)?.maxScale);if((0,i.ZH)(o,t)||(0,i.gg)(n,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],o=e[t+1];if((0,i.ZH)(p(o.minScale),d(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,o.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===u(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,o){return e=p(e),r=p(r),t=d(t),!(!(0,i.Sp)(r,e)&&(o??r)>e||(0,i.Hx)(t,r)||void 0!==o&&(0,i.Sp)(o,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||1/0}function d(e){return e||0}},17036(e,t,r){r.d(t,{p:()=>a});var i=r(44208),o=r(53966),n=r(20437),s=r(95466),l=r(30524);function a(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");o.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||o.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,l.DB)(this.fieldsIndex,e)}}}}},10407(e,t,r){r.d(t,{It:()=>y,LG:()=>s,OM:()=>u,Sm:()=>p,Y:()=>l,bK:()=>a,sQ:()=>d});var i=r(99917),o=r(16930),n=r(28735);function s(e,t){if(!l(e,t)){let r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,c.HOSTED_SERVICE)}function u(e,t){let r=e.typeKeywords;if(r){let e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?s(e,t):u(e,t)}async function d(e){let t,r=e.clone().normalize();if(r.length>1)for(let e of r)t?e.width>t.width&&(t=e):t=e;else t=r[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);let r=o.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(t)}const c={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",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",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function y(e){let{portal:t,isOrgItem:r,itemControl:i}=e,o=t.user?.privileges,n=!o||o.includes("features:user:edit"),s=!!r&&!!o?.includes("features:user:fullEdit"),l="update"===i||"admin"===i;return l?s=n=!0:s&&(n=!0),{features:{edit:n,fullEdit:s},content:{updateItem:l}}}r.d(t,["mm",0,c])},22671(e,t,r){r.d(t,{A:()=>w});var i,o=r(32198),n=r(52106),s=r(66552),l=r(25482),a=r(4718),u=r(91429),p=r(16930),d=r(60408),c=r(65864),y=r(50498),f=r(20437),h=r(36005),g=r(43937);const m=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.o{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,r,i){if(e)return void m.write(e,t,r,i);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=p.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.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){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,o]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,o],scale:[n,s]}=r,l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*n+i,e=>o-e*s,l,a);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=p.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let n=e[t],s=r.fromJSON(n),l=n.geometry?.spatialReference;null!=s.geometry&&!l&&(s.geometry.spatialReference=i);let a=n.aggregateGeometries,u=s.aggregateGeometries;if(a&&null!=u)for(let e in u){let t=u[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}o.push(s)}return o}_quantizePoints(e,t,r){let i,o,n=[];for(let s=0,l=e.length;s<l;s++){let l=e[s];if(s>0){let e=t(l[0]),s=r(l[1]);(e!==i||s!==o)&&(n.push([e-i,s-o]),i=e,o=s)}else i=t(l[0]),o=r(l[1]),n.push([i,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,d.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,n=i.length;e<n;e++){let n=i[e],s=this._quantizePoints(n,t,r);s&&o.push(s)}return o.length>0?((0,d.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let n,s,l=(0,d.Bi)(e)?e.rings:e.paths;for(let e=0,i=l.length;e<i;e++){let i=l[e];for(let e=0,o=i.length;e<o;e++){let o=i[e];e>0?(n+=o[0],s+=o[1]):(n=o[0],s=o[1]),o[0]=t(n),o[1]=r(s)}}if(i&&o)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let n,s,l=e.points;for(let e=0,i=l.length;e<i;e++){let i=l[e];e>0?(n+=i[0],s+=i[1]):(n=i[0],s=i[1]),i[0]=t(n),i[1]=r(s)}if(i&&o)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2])}else if(o)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,u.MZ)({type:[n.A],json:{write:!0}})],w.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],w.prototype,"readFeatures",null),(0,o.Cg)([(0,u.MZ)({type:[f.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,o.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],w.prototype,"geometryType",void 0),(0,o.Cg)([(0,g.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o.Cg)([(0,g.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,o.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0}}]);