@arcgis/core 4.27.0-next.20230317 → 4.27.0-next.20230321

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 (300) hide show
  1. package/TimeExtent.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/05e47e78e258dd5ab6ea.js +1 -0
  4. package/assets/esri/core/workers/chunks/{b661d2c785333429aad3.js → 0b005e3502dd97562701.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{8812629e07e5bf46caa7.js → 1d2271a36641f6834401.js} +1 -1
  6. package/assets/esri/core/workers/chunks/1d65a2bc91774fdbd690.js +1 -0
  7. package/assets/esri/core/workers/chunks/273a894ab44b76ee4488.js +1 -0
  8. package/assets/esri/core/workers/chunks/29ee4f14602caf6967e4.js +1 -0
  9. package/assets/esri/core/workers/chunks/{56ddde83f40cda0a8a5c.js → 2c0775541cfec9d43acb.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{48a1b8be3c2a59c4c925.js → 32f9b488915a4a8864e5.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{790d62ea3c90ca076095.js → 403c18eaa30673b096fe.js} +1 -1
  12. package/assets/esri/core/workers/chunks/41bbf58417f4085657f4.js +1 -0
  13. package/assets/esri/core/workers/chunks/{c36efbdd0a84fe851bbb.js → 433686dfda9e2ff1f98b.js} +1 -1
  14. package/assets/esri/core/workers/chunks/4be7647605300e07e843.js +1 -0
  15. package/assets/esri/core/workers/chunks/5cc99e9e974fec32b597.js +1 -0
  16. package/assets/esri/core/workers/chunks/6062bc79ebd5047a473a.js +1 -0
  17. package/assets/esri/core/workers/chunks/{57aa75a10fb8bb3fa517.js → 622139ef8f7181e48cd0.js} +1 -1
  18. package/assets/esri/core/workers/chunks/6b14673a4afd6ef81487.js +1 -0
  19. package/assets/esri/core/workers/chunks/70ea44365021b665c213.js +1 -0
  20. package/assets/esri/core/workers/chunks/{7727e6a4338c831f272f.js → 7570ec6a64a88ddc0fdd.js} +1 -1
  21. package/assets/esri/core/workers/chunks/81a6f4b43e047c3395c0.js +1 -0
  22. package/assets/esri/core/workers/chunks/87edeb09a948122fa030.js +1 -0
  23. package/assets/esri/core/workers/chunks/8daa0523d49653cc5861.js +1 -0
  24. package/assets/esri/core/workers/chunks/{3ff3d67f1bc6e2b2f48e.js → 90e12cff7672f3d92ced.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{f150bd21c3b9e098da57.js → 92951b85676df776961f.js} +56 -56
  26. package/assets/esri/core/workers/chunks/983b26414cc46d9c3105.js +1 -0
  27. package/assets/esri/core/workers/chunks/{19355af765993931a7c0.js → 9b196a726c6d175ca60f.js} +1 -1
  28. package/assets/esri/core/workers/chunks/a27951dbe83c63f9d01a.js +1 -0
  29. package/assets/esri/core/workers/chunks/bc002e4dff8859571a7a.js +1 -0
  30. package/assets/esri/core/workers/chunks/bfc2b40f1892970281c6.js +1 -0
  31. package/assets/esri/core/workers/chunks/c162d1e27e779732d494.js +1 -0
  32. package/assets/esri/core/workers/chunks/c5d872adce711ec61ede.js +1 -0
  33. package/assets/esri/core/workers/chunks/c5dd23d11fa91b0f318e.js +1 -0
  34. package/assets/esri/core/workers/chunks/{e97c4beb3a6cf1d91310.js → c6c2f771bca0e303b5c0.js} +1 -1
  35. package/assets/esri/core/workers/chunks/c8f019d13f6b22481f2e.js +1 -0
  36. package/assets/esri/core/workers/chunks/d34dbb49508a95588423.js +1 -0
  37. package/assets/esri/core/workers/chunks/e637e47000f4dc48054d.js +1 -0
  38. package/assets/esri/core/workers/chunks/e7093d27a31345953dca.js +1 -0
  39. package/assets/esri/core/workers/chunks/f1ab86dbbd5b04e2a96c.js +1 -0
  40. package/assets/esri/core/workers/chunks/f85a01429959e60a8713.js +1 -0
  41. package/assets/esri/core/workers/chunks/ff9efa829497557ec26a.js +1 -0
  42. package/assets/esri/themes/base/widgets/_Bookmarks.scss +3 -0
  43. package/assets/esri/themes/base/widgets/_Editor.scss +18 -0
  44. package/assets/esri/themes/base/widgets/_ItemList.scss +13 -33
  45. package/assets/esri/themes/dark/main.css +1 -1
  46. package/assets/esri/themes/light/main.css +1 -1
  47. package/assets/esri/themes/light/view.css +1 -1
  48. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  49. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  50. package/assets/esri/widgets/Slice/t9n/Slice_ar.json +1 -1
  51. package/assets/esri/widgets/Slice/t9n/Slice_bg.json +1 -1
  52. package/assets/esri/widgets/Slice/t9n/Slice_bs.json +1 -1
  53. package/assets/esri/widgets/Slice/t9n/Slice_ca.json +1 -1
  54. package/assets/esri/widgets/Slice/t9n/Slice_cs.json +1 -1
  55. package/assets/esri/widgets/Slice/t9n/Slice_da.json +1 -1
  56. package/assets/esri/widgets/Slice/t9n/Slice_de.json +1 -1
  57. package/assets/esri/widgets/Slice/t9n/Slice_el.json +1 -1
  58. package/assets/esri/widgets/Slice/t9n/Slice_es.json +1 -1
  59. package/assets/esri/widgets/Slice/t9n/Slice_et.json +1 -1
  60. package/assets/esri/widgets/Slice/t9n/Slice_fi.json +1 -1
  61. package/assets/esri/widgets/Slice/t9n/Slice_fr.json +1 -1
  62. package/assets/esri/widgets/Slice/t9n/Slice_he.json +1 -1
  63. package/assets/esri/widgets/Slice/t9n/Slice_hr.json +1 -1
  64. package/assets/esri/widgets/Slice/t9n/Slice_hu.json +1 -1
  65. package/assets/esri/widgets/Slice/t9n/Slice_id.json +1 -1
  66. package/assets/esri/widgets/Slice/t9n/Slice_it.json +1 -1
  67. package/assets/esri/widgets/Slice/t9n/Slice_ja.json +1 -1
  68. package/assets/esri/widgets/Slice/t9n/Slice_ko.json +1 -1
  69. package/assets/esri/widgets/Slice/t9n/Slice_lt.json +1 -1
  70. package/assets/esri/widgets/Slice/t9n/Slice_lv.json +1 -1
  71. package/assets/esri/widgets/Slice/t9n/Slice_nb.json +1 -1
  72. package/assets/esri/widgets/Slice/t9n/Slice_nl.json +1 -1
  73. package/assets/esri/widgets/Slice/t9n/Slice_pl.json +1 -1
  74. package/assets/esri/widgets/Slice/t9n/Slice_pt-BR.json +1 -1
  75. package/assets/esri/widgets/Slice/t9n/Slice_pt-PT.json +1 -1
  76. package/assets/esri/widgets/Slice/t9n/Slice_ro.json +1 -1
  77. package/assets/esri/widgets/Slice/t9n/Slice_ru.json +1 -1
  78. package/assets/esri/widgets/Slice/t9n/Slice_sk.json +1 -1
  79. package/assets/esri/widgets/Slice/t9n/Slice_sl.json +1 -1
  80. package/assets/esri/widgets/Slice/t9n/Slice_sr.json +1 -1
  81. package/assets/esri/widgets/Slice/t9n/Slice_sv.json +1 -1
  82. package/assets/esri/widgets/Slice/t9n/Slice_th.json +1 -1
  83. package/assets/esri/widgets/Slice/t9n/Slice_tr.json +1 -1
  84. package/assets/esri/widgets/Slice/t9n/Slice_uk.json +1 -1
  85. package/assets/esri/widgets/Slice/t9n/Slice_vi.json +1 -1
  86. package/assets/esri/widgets/Slice/t9n/Slice_zh-CN.json +1 -1
  87. package/assets/esri/widgets/Slice/t9n/Slice_zh-HK.json +1 -1
  88. package/assets/esri/widgets/Slice/t9n/Slice_zh-TW.json +1 -1
  89. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
  90. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
  91. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
  92. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
  93. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
  94. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
  95. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
  96. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
  97. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
  98. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
  99. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
  100. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
  101. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
  102. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
  103. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
  104. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
  105. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
  106. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
  107. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
  108. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
  109. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
  110. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
  111. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
  112. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
  113. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
  114. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
  115. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
  116. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
  117. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
  118. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
  119. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
  120. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
  121. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
  122. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
  123. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
  124. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
  125. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
  126. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
  127. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
  128. package/chunks/ColorMaterial.glsl.js +16 -14
  129. package/core/domUtils.js +1 -1
  130. package/core/maybe.js +1 -1
  131. package/core/urlUtils.js +1 -1
  132. package/geohash/GeohashTree.js +1 -1
  133. package/interfaces.d.ts +12 -214
  134. package/layers/SceneLayer.js +1 -1
  135. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  136. package/layers/support/FieldsIndex.js +1 -1
  137. package/layers/support/fieldType.js +1 -1
  138. package/layers/support/fieldUtils.js +1 -1
  139. package/layers/support/rasterFunctionConstants.js +1 -1
  140. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  141. package/layers/support/rasterFunctions/CurvatureFunction.js +5 -0
  142. package/layers/support/rasterFunctions/CurvatureFunctionArguments.js +5 -0
  143. package/layers/support/rasterFunctions/SlopeFunction.js +1 -1
  144. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  145. package/layers/support/rasterFunctions/surfaceUtils.js +1 -1
  146. package/package.json +1 -1
  147. package/portal/schemas/definitions.js +1 -1
  148. package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
  149. package/support/revision.js +1 -1
  150. package/views/2d/engine/imagery/processor/curvatureProcessor.js +5 -0
  151. package/views/2d/engine/imagery/processor/rasterProcessor.js +1 -1
  152. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  153. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  154. package/views/2d/layers/features/support/BinStore.js +1 -1
  155. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  156. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  157. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  158. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  159. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  160. package/views/2d/layers/features/support/FeatureSetReaderPBFIndirect.js +1 -1
  161. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  162. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  163. package/views/3d/environment/CloudsData.js +1 -1
  164. package/views/3d/environment/CloudsGenerator.js +1 -1
  165. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  166. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  167. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  168. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  169. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateObjectSymbol3DAdapter.js +1 -1
  170. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  171. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  172. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  173. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  174. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  175. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  176. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  177. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  178. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  179. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  180. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  181. package/views/3d/layers/graphics/interfaces.js +1 -1
  182. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  183. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  184. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  185. package/views/3d/support/buffer/glUtil.js +1 -1
  186. package/views/3d/support/buffer/workerHelper.js +1 -1
  187. package/views/3d/support/engineContent/line.js +1 -1
  188. package/views/3d/terrain/PatchRenderData.js +1 -1
  189. package/views/3d/terrain/TerrainSurface.js +1 -1
  190. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +2 -2
  191. package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
  192. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  193. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  194. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  195. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  196. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  197. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  198. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  199. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  200. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  201. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  202. package/views/interactive/tooltip/TransformTooltipInfos.js +1 -1
  203. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  204. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  205. package/widgets/Bookmarks/css.js +1 -1
  206. package/widgets/Bookmarks.js +1 -1
  207. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  208. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  209. package/widgets/Editor/EditorViewModel.js +1 -1
  210. package/widgets/Editor/Upload.js +5 -0
  211. package/widgets/Editor/UploadState.js +4 -0
  212. package/widgets/Editor/workflowUtils.js +1 -1
  213. package/widgets/Editor.js +1 -1
  214. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  215. package/widgets/FeatureForm/{InputField.js → FieldInput.js} +1 -1
  216. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  217. package/widgets/FeatureForm/GroupInput.js +5 -0
  218. package/widgets/FeatureForm/css.js +1 -1
  219. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  220. package/widgets/FeatureForm.js +1 -1
  221. package/widgets/FeatureTable/FieldColumn.js +1 -1
  222. package/widgets/FeatureTemplates/ItemList.js +1 -1
  223. package/widgets/FeatureTemplates/TemplateItem.js +1 -1
  224. package/widgets/FeatureTemplates.js +1 -1
  225. package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
  226. package/widgets/LayerList/LayerListViewModel.js +1 -1
  227. package/widgets/LayerList.js +1 -1
  228. package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
  229. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  230. package/assets/esri/core/workers/chunks/009348f65fab440f7752.js +0 -1
  231. package/assets/esri/core/workers/chunks/075ecd53fb229dfee53c.js +0 -1
  232. package/assets/esri/core/workers/chunks/1c77b92063ee36421914.js +0 -1
  233. package/assets/esri/core/workers/chunks/1ee774c3f29d8074da12.js +0 -1
  234. package/assets/esri/core/workers/chunks/262b6de5a29c713b4010.js +0 -1
  235. package/assets/esri/core/workers/chunks/281c0f936b5645a673ab.js +0 -1
  236. package/assets/esri/core/workers/chunks/2883a59fc1fc9e4d71af.js +0 -1
  237. package/assets/esri/core/workers/chunks/2e032a58ac6717313227.js +0 -1
  238. package/assets/esri/core/workers/chunks/4d4cbfe72835c0460b09.js +0 -1
  239. package/assets/esri/core/workers/chunks/5504dff4113dd74d2fa7.js +0 -1
  240. package/assets/esri/core/workers/chunks/5bded2588008117d0c35.js +0 -1
  241. package/assets/esri/core/workers/chunks/6caf8a0b49bd01906f32.js +0 -1
  242. package/assets/esri/core/workers/chunks/9cab04c71d8bccf0156d.js +0 -1
  243. package/assets/esri/core/workers/chunks/9f02a0670ad73718d8f9.js +0 -1
  244. package/assets/esri/core/workers/chunks/a265e454461edb306e2d.js +0 -1
  245. package/assets/esri/core/workers/chunks/a50ca44a62434bf18664.js +0 -1
  246. package/assets/esri/core/workers/chunks/bd090f9ec6cfe08e19a3.js +0 -1
  247. package/assets/esri/core/workers/chunks/c3338bdce8368731c4e9.js +0 -1
  248. package/assets/esri/core/workers/chunks/c54df59b2b3f73828a44.js +0 -1
  249. package/assets/esri/core/workers/chunks/ddebf3b5a131a6da5419.js +0 -1
  250. package/assets/esri/core/workers/chunks/de461c30aa24ec8bb212.js +0 -1
  251. package/assets/esri/core/workers/chunks/e23f56bee694a38da5b9.js +0 -1
  252. package/assets/esri/core/workers/chunks/ec73d16ef169adfc34fb.js +0 -1
  253. package/assets/esri/core/workers/chunks/ef884e2833868234c13c.js +0 -1
  254. package/assets/esri/core/workers/chunks/f3c99525fb1b0f719fe0.js +0 -1
  255. package/assets/esri/core/workers/chunks/fe314feede84dd688010.js +0 -1
  256. package/assets/esri/core/workers/chunks/ff15557dc7b74162ed75.js +0 -1
  257. package/assets/esri/widgets/Directions/t9n/Printout.json +0 -1
  258. package/assets/esri/widgets/Directions/t9n/Printout_ar.json +0 -1
  259. package/assets/esri/widgets/Directions/t9n/Printout_bg.json +0 -1
  260. package/assets/esri/widgets/Directions/t9n/Printout_bs.json +0 -1
  261. package/assets/esri/widgets/Directions/t9n/Printout_ca.json +0 -1
  262. package/assets/esri/widgets/Directions/t9n/Printout_cs.json +0 -1
  263. package/assets/esri/widgets/Directions/t9n/Printout_da.json +0 -1
  264. package/assets/esri/widgets/Directions/t9n/Printout_de.json +0 -1
  265. package/assets/esri/widgets/Directions/t9n/Printout_el.json +0 -1
  266. package/assets/esri/widgets/Directions/t9n/Printout_en.json +0 -1
  267. package/assets/esri/widgets/Directions/t9n/Printout_es.json +0 -1
  268. package/assets/esri/widgets/Directions/t9n/Printout_et.json +0 -1
  269. package/assets/esri/widgets/Directions/t9n/Printout_fi.json +0 -1
  270. package/assets/esri/widgets/Directions/t9n/Printout_fr.json +0 -1
  271. package/assets/esri/widgets/Directions/t9n/Printout_he.json +0 -1
  272. package/assets/esri/widgets/Directions/t9n/Printout_hr.json +0 -1
  273. package/assets/esri/widgets/Directions/t9n/Printout_hu.json +0 -1
  274. package/assets/esri/widgets/Directions/t9n/Printout_id.json +0 -1
  275. package/assets/esri/widgets/Directions/t9n/Printout_it.json +0 -1
  276. package/assets/esri/widgets/Directions/t9n/Printout_ja.json +0 -1
  277. package/assets/esri/widgets/Directions/t9n/Printout_ko.json +0 -1
  278. package/assets/esri/widgets/Directions/t9n/Printout_lt.json +0 -1
  279. package/assets/esri/widgets/Directions/t9n/Printout_lv.json +0 -1
  280. package/assets/esri/widgets/Directions/t9n/Printout_nb.json +0 -1
  281. package/assets/esri/widgets/Directions/t9n/Printout_nl.json +0 -1
  282. package/assets/esri/widgets/Directions/t9n/Printout_pl.json +0 -1
  283. package/assets/esri/widgets/Directions/t9n/Printout_pt-BR.json +0 -1
  284. package/assets/esri/widgets/Directions/t9n/Printout_pt-PT.json +0 -1
  285. package/assets/esri/widgets/Directions/t9n/Printout_ro.json +0 -1
  286. package/assets/esri/widgets/Directions/t9n/Printout_ru.json +0 -1
  287. package/assets/esri/widgets/Directions/t9n/Printout_sk.json +0 -1
  288. package/assets/esri/widgets/Directions/t9n/Printout_sl.json +0 -1
  289. package/assets/esri/widgets/Directions/t9n/Printout_sr.json +0 -1
  290. package/assets/esri/widgets/Directions/t9n/Printout_sv.json +0 -1
  291. package/assets/esri/widgets/Directions/t9n/Printout_th.json +0 -1
  292. package/assets/esri/widgets/Directions/t9n/Printout_tr.json +0 -1
  293. package/assets/esri/widgets/Directions/t9n/Printout_uk.json +0 -1
  294. package/assets/esri/widgets/Directions/t9n/Printout_vi.json +0 -1
  295. package/assets/esri/widgets/Directions/t9n/Printout_zh-CN.json +0 -1
  296. package/assets/esri/widgets/Directions/t9n/Printout_zh-HK.json +0 -1
  297. package/assets/esri/widgets/Directions/t9n/Printout_zh-TW.json +0 -1
  298. package/widgets/FeatureForm/InputField.d.ts +0 -4
  299. package/widgets/FeatureForm/InputFieldGroup.d.ts +0 -4
  300. package/widgets/FeatureForm/InputFieldGroup.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8833],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={},u={get exports(){return a},set exports(e){a=e}};i=u,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var u=n-r+1,o=i-r+1,l=Math.log(u),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(u-h)/u)*(o-u/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-o*h/u+c)),Math.min(n,Math.floor(i+(u-o)*h/u+c)),a)}var d=s[i],_=r,p=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);_<p;){for(t(s,_,p),_++,p--;a(s[_],d)<0;)_++;for(;a(s[p],d)>0;)p--}0===a(s[r],d)?t(s,r,p):t(s,++p,n),p<=i&&(r=p+1),i<=p&&(n=p-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a},32448:(e,t,s)=>{s.d(t,{Z:()=>o});var i=s(43697),r=s(15923),n=s(50758),a=s(52011);class u{constructor(){this._emitter=new u.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){const s=this._listenersMap&&this._listenersMap.get(e);if(!s)return!1;const i=this._target||this;return[...s].forEach((e=>{e.call(i,t)})),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,n.AL)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),{remove:()=>{const s=this._listenersMap&&this._listenersMap.get(e)||[],i=s.indexOf(t);i>=0&&s.splice(i,1)}}}once(e,t){const s=this.on(e,(e=>{s.remove(),t.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,a.j)("esri.core.Evented")],s),s};let s=class extends r.Z{constructor(){super(...arguments),this._emitter=new u.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,a.j)("esri.core.Evented")],s),e.EventedAccessor=s}(u||(u={}));const o=u},29730:(e,t,s)=>{function i(e,t){return e?t?4:3:t?3:2}function r(e,t,s,r,u){if(null==t||!t.lengths.length)return null;const o="upperLeft"===u?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const l=e.coords,h=[],c=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:d,coords:_}=t,p=i(s,r);let f=0;for(const e of d){const t=n(c,_,f,e,s,r,o);t&&h.push(t),f+=e*p}if(h.sort(((e,t)=>{let i=o*e[2]-o*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),h.length){let e=6*h[0][2];l[0]=h[0][0]/e,l[1]=h[0][1]/e,s&&(e=6*h[0][4],l[2]=0!==e?h[0][3]/e:0),(l[0]<c[0]||l[0]>c[1]||l[1]<c[2]||l[1]>c[3]||s&&(l[2]<c[4]||l[2]>c[5]))&&(l.length=0)}if(!l.length){const e=t.lengths[0]?a(_,0,d[0],s,r):null;if(!e)return null;l[0]=e[0],l[1]=e[1],s&&e.length>2&&(l[2]=e[2])}return e}function n(e,t,s,r,n,a,u=1){const o=i(n,a);let l=s,h=s+o,c=0,d=0,_=0,p=0,f=0;for(let s=0,i=r-1;s<i;s++,l+=o,h+=o){const s=t[l],i=t[l+1],r=t[l+2],a=t[h],u=t[h+1],o=t[h+2];let m=s*u-a*i;p+=m,c+=(s+a)*m,d+=(i+u)*m,n&&(m=s*o-a*r,_+=(r+o)*m,f+=m),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(p*u>0&&(p*=-1),f*u>0&&(f*=-1),!p)return null;const m=[c,d,.5*p];return n&&(m[3]=_,m[4]=.5*f),m}function a(e,t,s,r,n){const a=i(r,n);let c=t,d=t+a,_=0,p=0,f=0,m=0;for(let t=0,i=s-1;t<i;t++,c+=a,d+=a){const t=e[c],s=e[c+1],i=e[c+2],n=e[d],a=e[d+1],g=e[d+2],y=r?o(t,s,i,n,a,g):u(t,s,n,a);if(y)if(_+=y,r){const e=h(t,s,i,n,a,g);p+=y*e[0],f+=y*e[1],m+=y*e[2]}else{const e=l(t,s,n,a);p+=y*e[0],f+=y*e[1]}}return _>0?r?[p/_,f/_,m/_]:[p/_,f/_]:s>0?r?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function u(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function o(e,t,s,i,r,n){const a=i-e,u=r-t,o=n-s;return Math.sqrt(a*a+u*u+o*o)}function l(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function h(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}s.d(t,{Y:()=>r})},50245:(e,t,s)=>{s.d(t,{q:()=>ue});var i=s(67676),r=s(20102),n=s(22974),a=s(70586),u=s(69801),o=s(95330),l=s(67900),h=s(60437),c=s(24470),d=s(20322),_=s(33955),p=s(16306),f=s(8744),m=s(98732),g=s(62432),y=s(37427),E=s(61159),I=s(26993),S=s(10402),R=s(17590),T=s(11490),F=s(99514),w=s(59266),A=s(61247),b=(s(80442),s(92604)),x=s(54790),N=s(44553),O=s(17445),C=s(76882),k=s(58971),v=s(10661);class L{constructor(e){this._observable=new v.s,this._value=e}get(){return(0,k.it)(this._observable),this._value}set(e){e!==this._value&&(this._value=e,this._observable.notify())}}class P{constructor(){this._tasks=new Array,this._running=new L(!1)}get length(){return this._tasks.length}get running(){return this._running.get()}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.push(new Q(i,r,e,t,s))))}unshift(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.unshift(new Q(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,o.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,o.zE)());else{const i=s?t.abortCallback?.((0,o.zE)()):t.callback(e);(0,o.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this._running.set(this._tasks.length>0),!0}cancelAll(){const e=(0,o.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this._running.set(!1)}}class Q{constructor(e,t,s,i=undefined,r=undefined){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var U=s(43697),M=s(15923),G=s(5600),D=(s(75215),s(52011));let q=class extends M.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,U._)([(0,G.Cb)()],q.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,U._)([(0,G.Cb)()],q.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),q=(0,U._)([(0,D.j)("esri.views.support.DebugFlags")],q);const B=new q;var Y,H,j,V;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(Y||(Y={})),(V=H||(H={}))[V.YIELD=1]="YIELD",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(j||(j={}));const Z=new Map([[j.RESOURCE_CONTROLLER_IMMEDIATE,0],[j.RESOURCE_CONTROLLER,4],[j.SLIDE,0],[j.STREAM_DATA_LOADER,0],[j.ELEVATION_QUERY,0],[j.TERRAIN_SURFACE,1],[j.SURFACE_GEOMETRY_UPDATES,1],[j.LOD_RENDERER,2],[j.GRAPHICS_CORE,2],[j.I3S_CONTROLLER,2],[j.POINT_CLOUD_LAYER,2],[j.FEATURE_TILE_FETCHER,2],[j.OVERLAY,4],[j.STAGE,4],[j.GRAPHICS_DECONFLICTOR,4],[j.FILTER_VISIBILITY,4],[j.SCALE_VISIBILITY,4],[j.FRUSTUM_VISIBILITY,4],[j.CLOUDS_GENERATOR,4],[j.POINT_OF_INTEREST_FREQUENT,6],[j.POINT_OF_INTEREST_INFREQUENT,30],[j.LABELER,8],[j.FEATURE_QUERY_ENGINE,8],[j.FEATURE_TILE_TREE,16],[j.FEATURE_TILE_TREE_ACTIVE,0],[j.ELEVATION_ALIGNMENT,12],[j.TEXT_TEXTURE_ATLAS,12],[j.TEXTURE_UNLOAD,12],[j.LINE_OF_SIGHT_TOOL,16],[j.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[j.SNAPPING,0],[j.SHADOW_ACCUMULATOR,30]]);function z(e){return Z.has(e)?Z.get(e):"number"==typeof e?e:1}const W=(0,C.HA)(6.5),X=(0,C.HA)(1),J=(0,C.HA)(30),$=(0,C.HA)(1e3/30),K=(0,C.HA)(100);var ee,te;!function(e){e.Scheduler=class{get updating(){return this._updating.get()}_updatingChanged(){this._updating.set(this._tasks.some((e=>e.needsUpdate)))}constructor(){this._updating=new L(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new x.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=Y.INTERACTING,this._tasks=new N.Z,this._runQueue=new N.Z,this._load=0,this._idleStateCallbacks=new N.Z,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,O.YP)((()=>B.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),O.nn);for(const e of Object.keys(j))this.performanceInfo.tasks.set(j[e],new x.Z(j[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:W,INTERACTING_BUDGET:$,IDLE_BUDGET:K,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,a.hw)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())})))}registerTask(e,s){const i=z(e),r=new t(this,e,s,i);return this._tasks.push(r),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new x.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===Y.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===Y.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Y.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=W,s=e.frameDuration,i=X;switch(this.state){case Y.IDLE:t=(0,C.HA)(0),s=(0,C.HA)(Math.max(K,e.frameDuration)),i=J;break;case Y.INTERACTING:s=(0,C.HA)(Math.max($,e.frameDuration));case Y.ANIMATING:}return s=(0,C.HA)(s-e.elapsedFrameTime-t),this.state!==Y.IDLE&&s<X&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,C.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Y.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Y.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,C.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return te.SCHEDULED;let t=te.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=te.READY:t!==te.READY&&(t=te.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===H.YIELD&&(s.blockFrame=this._frameNumber)}catch(e){b.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e)}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,j.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&i>2*this._budget.budget&&console.log("Task",s.name,"used",i,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(j))this._frameTaskTimes.set(j[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{get task(){return this._task.get()}get updating(){return this._queue.running}constructor(e,t,s,i){this._scheduler=e,this.name=t,this._basePriority=i,this.blockFrame=0,this.runtime=0,this._queue=new P,this._handles=new A.Z,this.schedulePriority=this._basePriority,this._task=new L(null!=s?s:this._queue),this._handles.add((0,O.gx)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(se),this._scheduler.removeTask(this),this.schedule=ie.schedule,this.reschedule=ie.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=z(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Y.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(ee||(ee={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(te||(te={}));const se=(()=>{const e=new ee.Budget;return e.enabled=!1,e})(),ie=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,o.Hc)(t)){const e=(0,o.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,o.gx)(e(se))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},re="feature-store:unsupported-query",ne=new u.WJ(2e6);let ae=0;class ue{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:E.g},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new u.Xq(ae+++"$$",ne)),this.fieldsIndex=new F.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,a.hw)(this._frameTask),this.clearCache(),(0,a.SC)(this._geometryQueryCache),this._changeHandle=(0,a.hw)(this._changeHandle),(0,a.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==T.vF)throw t;return new I.y([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==T.vF)throw e;return 0}}async executeQueryForExtent(e,t){const s=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=i.size;return r?{count:r,extent:await this._getBounds(i.items,i.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===T.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),i=s.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(s.featureAdapter.getObjectId(e))}),t),r}catch(e){if(e===T.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===I.r.NONE)return{candidates:[]};const n=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),a=!(0,f.fS)(s.spatialReference,this.spatialReference);a&&await(0,y._W)(s.spatialReference,this.spatialReference);const u="number"==typeof i?i:i.x,o="number"==typeof i?i:i.y,l={xmin:s.x-u,xmax:s.x+u,ymin:s.y-o,ymax:s.y+o,spatialReference:s.spatialReference},h=a?(0,y.iV)(l,this.spatialReference):l;if(!h)return{candidates:[]};const c=(await(0,p.aX)((0,_.im)(s),null,{signal:t}))[0],d=(await(0,p.aX)((0,_.im)(h),null,{signal:t}))[0];if(null==c||null==d)return{candidates:[]};const m=new I.y(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(d.toJSON()))),t),n,this);await this._reschedule((()=>this._executeObjectIdsQuery(m)),t),await this._reschedule((()=>this._executeTimeQuery(m)),t),await this._reschedule((()=>this._executeAttributesQuery(m)),t);const g=c.toJSON(),E=a?(0,y.iV)(g,this.spatialReference):g,S=a?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:i;return m.createSnappingResponse({...e,point:E,distance:S},s.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new r.Z(re,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const s=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(s)),t),s.createQueryResponse()}catch(t){if(t!==T.vF)throw t;return new I.y([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,field2:r,field3:n,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,field2:r,field3:n,valueExpression:a},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const[t,s]=await Promise.all(["getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getBounds(await this._getAllFeatures(),this.spatialReference,this.spatialReference),null!=this._timeExtentPromise?this._timeExtentPromise:this._timeExtentPromise=(0,R.R)(this.timeInfo,this.featureStore)]);return(0,o.k_)(e),{fullExtent:t,timeExtent:s}}async _getBounds(e,t,s){const i=(0,h.t8)((0,h.Ue)(),h.Gv);await this.featureStore.forEachBounds(e,(e=>(0,h.TC)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,T.S2)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5]);const n=(0,y.iV)(r,t,s);if(n.spatialReference=(0,T.S2)(s),n.xmax-n.xmin==0){const e=(0,l.c9)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,l.c9)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,l.c9)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}async _schedule(e,t){return null!=this._frameTask?this._frameTask.schedule(e,t):e(se)}async _reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(se)}async _getAllFeaturesQueryEngineResult(e){return new I.y(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,n.d9)(e),e=await this._schedule((()=>(0,T.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkQuerySupport(e)),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,u=null==n||(0,f.fS)(n,a.spatialReference)?a:(0,y.iV)(a,n);if(!u)return null;const o=i||r,l=(0,f.JY)(s)&&!(0,f.fS)(this.spatialReference,s)&&o?async e=>this._project(e,s):e=>e,h=this.featureAdapter,c=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(u))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const s=new Set;for(const e of c)s.add(h.getObjectId(e));const i=await this._reschedule((()=>this._getAllFeatures()),t),r=await this._reschedule((async()=>{const r=await(0,S.cW)("esriSpatialRelDisjoint",u,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(i,(e=>!s.has(h.getObjectId(e))||r(h.getGeometry(e))),t);return new I.y(n,e,this)}),t);return l(r)}if(!c.length)return new I.y([],e,this);if(this._canExecuteSinglePass(u,e))return l(new I.y(c,e,this));const d=await(0,S.cW)("esriSpatialRelContains",u,this.geometryType,this.hasZ,this.hasM),_=await this._runSpatialFilter(c,(e=>d(h.getGeometry(e))),t);return l(new I.y(_,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;e=null!=t?t.query:e;const{geometry:r,outSR:n,spatialRel:a,returnGeometry:u,returnCentroid:o}=e,l=this.featureStore.featureSpatialReference,h=!r||null==l||(0,f.fS)(l,r.spatialReference)?r:(0,y.iV)(r,l),c=u||o,d=(0,f.JY)(n)&&!(0,f.fS)(this.spatialReference,n),_=this._geometryQueryCache&&null==t?d&&c?JSON.stringify({originalFilterGeometry:r,spatialRelationship:a,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:a}):null,p=_?this._geometryQueryCache.get(_):null;if(null!=p)return new I.y(p,e,this);const m=async e=>(d&&c&&await this._project(e,n),_&&this._geometryQueryCache.put(_,e.items,e.items.length+1),e);if(!h)return m(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const g=this.featureAdapter;let E=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(r))),s);if("esriSpatialRelDisjoint"===a){if(!E.length)return m(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of E)i.add(g.getObjectId(e));const r=null!=t?t.items:await this._reschedule((()=>this._getAllFeatures()),s),n=await this._reschedule((async()=>{const t=await(0,S.cW)(a,h,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(r,(e=>!i.has(g.getObjectId(e))||t(g.getGeometry(e))),s);return new I.y(n,e,this)}),s);return m(n)}if(null!=t){const e=new i.SO;E=E.filter((s=>(0,i.cq)(t.items,s,t.items.length,e)>=0))}if(!E.length){const t=new I.y([],e,this);return _&&this._geometryQueryCache.put(_,t.items,1),t}if(this._canExecuteSinglePass(h,e))return m(new I.y(E,e,this));const R=await(0,S.cW)(a,h,this.geometryType,this.hasZ,this.hasM),T=await this._runSpatialFilter(E,(e=>R(g.getGeometry(e))),s);return m(new I.y(T,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds||!e.query.aggregateIds.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds||!e.query.objectIds.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,R.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,g.Jc)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const u=e[i++];t(u)&&(r.push(u),a.madeProgress()),a.done&&await this._reschedule((e=>n(e)),s)}};return this._reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),u=n.get(e);(!u||i>a(u,r))&&n.set(e,s)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,S.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s||"esriSpatialRelWithin"===s))}async _project(e,t){if(!t||(0,f.fS)(this.spatialReference,t))return e;const s=this.featureAdapter,i=await(0,y.oj)(e.items.map((e=>(0,T.Op)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t);return e.items=i.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,m.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,S.hN)(e)){if((0,_.YX)(e))return[(0,c.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,_.oU)(e))return e.rings.map((e=>(0,c.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,d.$P)((0,c.Ue)(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _checkStatisticsSupport(e,t){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.Z(re,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t),(0,S.P0)(e,this.geometryType,this.spatialReference),(0,y._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,w.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.field2&&t.push(e.field2),e.field3&&t.push(e.field3),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new r.Z(re,"params should have at least a field or valueExpression",{params:e});(0,g.Of)(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.Z(re,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,S.P0)(e,this.geometryType,this.spatialReference),(0,y._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:i,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.includes(e)?i.split(e)[0]:i.includes(t)?i.split(t)[0]:s})).filter((e=>!a.includes(e)));(0,g.Of)(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)(0,g.Of)(this.fieldsIndex,t,"outFields contains missing fields");else if(i)throw new r.Z(re,"outFields should be specified for returnDistinctValues",{query:e});(0,g.hO)(this.fieldsIndex,e.where)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:i}=e,n=s&&s.length,a=t&&t.length;if(i){if(!n||!a)throw new r.Z(re,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});(0,g.z4)(this.fieldsIndex,i,t)}if(a){if(!function(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const i=t.map((e=>e.onStatisticField)).filter(Boolean);(0,g.Of)(this.fieldsIndex,i,"onStatisticFields contains missing fields"),n&&(0,g.Of)(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:i}=s;if("percentile_disc"!==i&&"percentile_cont"!==i||!("statisticParameters"in s)){if("count"!==i&&t&&(0,g.G3)(t,this.fieldsIndex))throw new r.Z(re,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new r.Z(re,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e,t,s){e=(0,n.d9)(e);try{e=await this._schedule((()=>(0,T.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}catch(t){if(t!==T.vF)throw t;return new I.y([],e,this)}}}},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},10402:(e,t,s)=>{s.d(t,{hN:()=>S,P0:()=>I,cW:()=>E});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),u=s(8744);function o(e,t){return e?t?4:3:t?3:2}function l(e,t,s,i,r,n){const a=o(r,n),{coords:u,lengths:l}=i;if(!l)return!1;for(let i=0,r=0;i<l.length;i++,r+=a)if(!h(e,t,s,u[r],u[r+1]))return!1;return!0}function h(e,t,s,i,r){if(!e)return!1;const n=o(t,s),{coords:a,lengths:u}=e;let l=!1,h=0;for(const e of u)l=c(l,a,n,h,e,i,r),h+=e*n;return l}function c(e,t,s,i,r,n,a){let u=e,o=i;for(let e=i,l=i+r*s;e<l;e+=s){o=e+s,o===l&&(o=i);const r=t[e],h=t[e+1],c=t[o],d=t[o+1];(h<a&&d>=a||d<a&&h>=a)&&r+(a-h)/(d-h)*(c-r)<n&&(u=!u)}return u}var d=s(98732),_=s(5428),p=s(37427),f=s(11490);const m="feature-store:unsupported-query",g={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}};function E(e,t,i,u,o){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new _.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return h(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new _.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>l(s,!1,!1,e,u,o)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(c=i)?n.h_:(0,n.IY)(c);return Promise.resolve((s=>e(t,(0,f.Op)(i,u,o,s))))}var c;return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[g[e]].bind(null,t.spatialReference,t);return e=>r((0,f.Op)(i,u,o,e))}))}async function I(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===y.spatialRelationship[e]}(r))throw new i.Z(m,"Unsupported query spatial relationship",{query:e});if((0,u.JY)(n.spatialReference)&&(0,u.JY)(s)){if(!function(e){return null!=e&&!0===y.queryGeometry[(0,a.Ji)(e)]}(n))throw new i.Z(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===y.layerGeometry[e]}(t))throw new i.Z(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function S(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{async function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)await t.forEach((e=>{const t=s.getAttribute(e,i),u=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==u||isNaN(u)||(a=Math.max(a,u))}));else{const e=i||r;await t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),u=e.getAttribute(n,s);return(null==a||a<=r)&&(null==u||u>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},99514:(e,t,s)=>{s.d(t,{Z:()=>a});var i=s(35671);function r(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function n(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class a{constructor(e=[]){if(this.fields=[],this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;this.fields=e;const t=[];for(const a of e){const e=a?.name,l=o(a?.name);if(e&&l){const o=u(e);this._fieldsMap.set(e,a),this._fieldsMap.set(o,a),this._normalizedFieldsMap.set(l,a),t.push(o),"date"===(s=a).type||"esriFieldTypeDate"===s.type?(this.dateFields.push(a),this._dateFieldsSet.add(a)):(0,i.H7)(a)&&(this._numericFieldsSet.add(a),this.numericFields.push(a)),r(a)||n(a)||(a.editable=null==a.editable||!!a.editable,a.nullable=null==a.nullable||!!a.nullable)}}var s;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)r(e)||n(e)||e.nullable||void 0!==(0,i.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(o(e)),t&&this._fieldsMap.set(e,t),t)}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name??void 0}}function u(e){return e.trim().toLowerCase()}function o(e){return(0,i.q6)(e)?.toLowerCase()??""}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8833],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={},u={get exports(){return a},set exports(e){a=e}};i=u,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var u=n-r+1,o=i-r+1,l=Math.log(u),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(u-h)/u)*(o-u/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-o*h/u+c)),Math.min(n,Math.floor(i+(u-o)*h/u+c)),a)}var d=s[i],_=r,p=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);_<p;){for(t(s,_,p),_++,p--;a(s[_],d)<0;)_++;for(;a(s[p],d)>0;)p--}0===a(s[r],d)?t(s,r,p):t(s,++p,n),p<=i&&(r=p+1),i<=p&&(n=p-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a},32448:(e,t,s)=>{s.d(t,{Z:()=>o});var i=s(43697),r=s(15923),n=s(50758),a=s(52011);class u{constructor(){this._emitter=new u.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){const s=this._listenersMap&&this._listenersMap.get(e);if(!s)return!1;const i=this._target||this;return[...s].forEach((e=>{e.call(i,t)})),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,n.AL)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),{remove:()=>{const s=this._listenersMap&&this._listenersMap.get(e)||[],i=s.indexOf(t);i>=0&&s.splice(i,1)}}}once(e,t){const s=this.on(e,(e=>{s.remove(),t.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,a.j)("esri.core.Evented")],s),s};let s=class extends r.Z{constructor(){super(...arguments),this._emitter=new u.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,a.j)("esri.core.Evented")],s),e.EventedAccessor=s}(u||(u={}));const o=u},29730:(e,t,s)=>{function i(e,t){return e?t?4:3:t?3:2}function r(e,t,s,r,u){if(null==t||!t.lengths.length)return null;const o="upperLeft"===u?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const l=e.coords,h=[],c=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:d,coords:_}=t,p=i(s,r);let f=0;for(const e of d){const t=n(c,_,f,e,s,r,o);t&&h.push(t),f+=e*p}if(h.sort(((e,t)=>{let i=o*e[2]-o*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),h.length){let e=6*h[0][2];l[0]=h[0][0]/e,l[1]=h[0][1]/e,s&&(e=6*h[0][4],l[2]=0!==e?h[0][3]/e:0),(l[0]<c[0]||l[0]>c[1]||l[1]<c[2]||l[1]>c[3]||s&&(l[2]<c[4]||l[2]>c[5]))&&(l.length=0)}if(!l.length){const e=t.lengths[0]?a(_,0,d[0],s,r):null;if(!e)return null;l[0]=e[0],l[1]=e[1],s&&e.length>2&&(l[2]=e[2])}return e}function n(e,t,s,r,n,a,u=1){const o=i(n,a);let l=s,h=s+o,c=0,d=0,_=0,p=0,f=0;for(let s=0,i=r-1;s<i;s++,l+=o,h+=o){const s=t[l],i=t[l+1],r=t[l+2],a=t[h],u=t[h+1],o=t[h+2];let m=s*u-a*i;p+=m,c+=(s+a)*m,d+=(i+u)*m,n&&(m=s*o-a*r,_+=(r+o)*m,f+=m),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(p*u>0&&(p*=-1),f*u>0&&(f*=-1),!p)return null;const m=[c,d,.5*p];return n&&(m[3]=_,m[4]=.5*f),m}function a(e,t,s,r,n){const a=i(r,n);let c=t,d=t+a,_=0,p=0,f=0,m=0;for(let t=0,i=s-1;t<i;t++,c+=a,d+=a){const t=e[c],s=e[c+1],i=e[c+2],n=e[d],a=e[d+1],g=e[d+2],y=r?o(t,s,i,n,a,g):u(t,s,n,a);if(y)if(_+=y,r){const e=h(t,s,i,n,a,g);p+=y*e[0],f+=y*e[1],m+=y*e[2]}else{const e=l(t,s,n,a);p+=y*e[0],f+=y*e[1]}}return _>0?r?[p/_,f/_,m/_]:[p/_,f/_]:s>0?r?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function u(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function o(e,t,s,i,r,n){const a=i-e,u=r-t,o=n-s;return Math.sqrt(a*a+u*u+o*o)}function l(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function h(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}s.d(t,{Y:()=>r})},50245:(e,t,s)=>{s.d(t,{q:()=>ue});var i=s(67676),r=s(20102),n=s(22974),a=s(70586),u=s(69801),o=s(95330),l=s(67900),h=s(60437),c=s(24470),d=s(20322),_=s(33955),p=s(16306),f=s(8744),m=s(98732),g=s(62432),y=s(37427),E=s(61159),I=s(26993),S=s(10402),T=s(17590),R=s(11490),F=s(99514),w=s(59266),A=s(61247),b=(s(80442),s(92604)),x=s(54790),N=s(44553),O=s(17445),C=s(76882),k=s(58971),v=s(10661);class L{constructor(e){this._observable=new v.s,this._value=e}get(){return(0,k.it)(this._observable),this._value}set(e){e!==this._value&&(this._value=e,this._observable.notify())}}class P{constructor(){this._tasks=new Array,this._running=new L(!1)}get length(){return this._tasks.length}get running(){return this._running.get()}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.push(new Q(i,r,e,t,s))))}unshift(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.unshift(new Q(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,o.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,o.zE)());else{const i=s?t.abortCallback?.((0,o.zE)()):t.callback(e);(0,o.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this._running.set(this._tasks.length>0),!0}cancelAll(){const e=(0,o.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this._running.set(!1)}}class Q{constructor(e,t,s,i=undefined,r=undefined){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var U=s(43697),M=s(15923),G=s(5600),D=(s(75215),s(52011));let q=class extends M.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,U._)([(0,G.Cb)()],q.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,U._)([(0,G.Cb)()],q.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),q=(0,U._)([(0,D.j)("esri.views.support.DebugFlags")],q);const B=new q;var Y,H,j,V;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(Y||(Y={})),(V=H||(H={}))[V.YIELD=1]="YIELD",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(j||(j={}));const Z=new Map([[j.RESOURCE_CONTROLLER_IMMEDIATE,0],[j.RESOURCE_CONTROLLER,4],[j.SLIDE,0],[j.STREAM_DATA_LOADER,0],[j.ELEVATION_QUERY,0],[j.TERRAIN_SURFACE,1],[j.SURFACE_GEOMETRY_UPDATES,1],[j.LOD_RENDERER,2],[j.GRAPHICS_CORE,2],[j.I3S_CONTROLLER,2],[j.POINT_CLOUD_LAYER,2],[j.FEATURE_TILE_FETCHER,2],[j.OVERLAY,4],[j.STAGE,4],[j.GRAPHICS_DECONFLICTOR,4],[j.FILTER_VISIBILITY,4],[j.SCALE_VISIBILITY,4],[j.FRUSTUM_VISIBILITY,4],[j.CLOUDS_GENERATOR,4],[j.POINT_OF_INTEREST_FREQUENT,6],[j.POINT_OF_INTEREST_INFREQUENT,30],[j.LABELER,8],[j.FEATURE_QUERY_ENGINE,8],[j.FEATURE_TILE_TREE,16],[j.FEATURE_TILE_TREE_ACTIVE,0],[j.ELEVATION_ALIGNMENT,12],[j.TEXT_TEXTURE_ATLAS,12],[j.TEXTURE_UNLOAD,12],[j.LINE_OF_SIGHT_TOOL,16],[j.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[j.SNAPPING,0],[j.SHADOW_ACCUMULATOR,30]]);function z(e){return Z.has(e)?Z.get(e):"number"==typeof e?e:1}const W=(0,C.HA)(6.5),X=(0,C.HA)(1),J=(0,C.HA)(30),$=(0,C.HA)(1e3/30),K=(0,C.HA)(100);var ee,te;!function(e){e.Scheduler=class{get updating(){return this._updating.get()}_updatingChanged(){this._updating.set(this._tasks.some((e=>e.needsUpdate)))}constructor(){this._updating=new L(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new x.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=Y.INTERACTING,this._tasks=new N.Z,this._runQueue=new N.Z,this._load=0,this._idleStateCallbacks=new N.Z,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,O.YP)((()=>B.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),O.nn);for(const e of Object.keys(j))this.performanceInfo.tasks.set(j[e],new x.Z(j[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:W,INTERACTING_BUDGET:$,IDLE_BUDGET:K,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,a.hw)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())})))}registerTask(e,s){const i=z(e),r=new t(this,e,s,i);return this._tasks.push(r),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new x.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===Y.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===Y.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Y.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=W,s=e.frameDuration,i=X;switch(this.state){case Y.IDLE:t=(0,C.HA)(0),s=(0,C.HA)(Math.max(K,e.frameDuration)),i=J;break;case Y.INTERACTING:s=(0,C.HA)(Math.max($,e.frameDuration));case Y.ANIMATING:}return s=(0,C.HA)(s-e.elapsedFrameTime-t),this.state!==Y.IDLE&&s<X&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,C.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Y.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Y.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,C.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return te.SCHEDULED;let t=te.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=te.READY:t!==te.READY&&(t=te.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===H.YIELD&&(s.blockFrame=this._frameNumber)}catch(e){b.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e)}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,j.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&i>2*this._budget.budget&&console.log("Task",s.name,"used",i,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(j))this._frameTaskTimes.set(j[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{get task(){return this._task.get()}get updating(){return this._queue.running}constructor(e,t,s,i){this._scheduler=e,this.name=t,this._basePriority=i,this.blockFrame=0,this.runtime=0,this._queue=new P,this._handles=new A.Z,this.schedulePriority=this._basePriority,this._task=new L(null!=s?s:this._queue),this._handles.add((0,O.gx)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(se),this._scheduler.removeTask(this),this.schedule=ie.schedule,this.reschedule=ie.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=z(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Y.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(ee||(ee={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(te||(te={}));const se=(()=>{const e=new ee.Budget;return e.enabled=!1,e})(),ie=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,o.Hc)(t)){const e=(0,o.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,o.gx)(e(se))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},re="feature-store:unsupported-query",ne=new u.WJ(2e6);let ae=0;class ue{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:E.g},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new u.Xq(ae+++"$$",ne)),this.fieldsIndex=new F.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,a.hw)(this._frameTask),this.clearCache(),(0,a.SC)(this._geometryQueryCache),this._changeHandle=(0,a.hw)(this._changeHandle),(0,a.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==R.vF)throw t;return new I.y([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==R.vF)throw e;return 0}}async executeQueryForExtent(e,t){const s=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=i.size;return r?{count:r,extent:await this._getBounds(i.items,i.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===R.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),i=s.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(s.featureAdapter.getObjectId(e))}),t),r}catch(e){if(e===R.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===I.r.NONE)return{candidates:[]};const n=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),a=!(0,f.fS)(s.spatialReference,this.spatialReference);a&&await(0,y._W)(s.spatialReference,this.spatialReference);const u="number"==typeof i?i:i.x,o="number"==typeof i?i:i.y,l={xmin:s.x-u,xmax:s.x+u,ymin:s.y-o,ymax:s.y+o,spatialReference:s.spatialReference},h=a?(0,y.iV)(l,this.spatialReference):l;if(!h)return{candidates:[]};const c=(await(0,p.aX)((0,_.im)(s),null,{signal:t}))[0],d=(await(0,p.aX)((0,_.im)(h),null,{signal:t}))[0];if(null==c||null==d)return{candidates:[]};const m=new I.y(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(d.toJSON()))),t),n,this);await this._reschedule((()=>this._executeObjectIdsQuery(m)),t),await this._reschedule((()=>this._executeTimeQuery(m)),t),await this._reschedule((()=>this._executeAttributesQuery(m)),t);const g=c.toJSON(),E=a?(0,y.iV)(g,this.spatialReference):g,S=a?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:i;return m.createSnappingResponse({...e,point:E,distance:S},s.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new r.Z(re,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const s=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(s)),t),s.createQueryResponse()}catch(t){if(t!==R.vF)throw t;return new I.y([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,field2:r,field3:n,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,field2:r,field3:n,valueExpression:a},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const[t,s]=await Promise.all(["getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getBounds(await this._getAllFeatures(),this.spatialReference,this.spatialReference),null!=this._timeExtentPromise?this._timeExtentPromise:this._timeExtentPromise=(0,T.R)(this.timeInfo,this.featureStore)]);return(0,o.k_)(e),{fullExtent:t,timeExtent:s}}async _getBounds(e,t,s){const i=(0,h.t8)((0,h.Ue)(),h.Gv);await this.featureStore.forEachBounds(e,(e=>(0,h.TC)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,R.S2)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5]);const n=(0,y.iV)(r,t,s);if(n.spatialReference=(0,R.S2)(s),n.xmax-n.xmin==0){const e=(0,l.c9)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,l.c9)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,l.c9)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}async _schedule(e,t){return null!=this._frameTask?this._frameTask.schedule(e,t):e(se)}async _reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(se)}async _getAllFeaturesQueryEngineResult(e){return new I.y(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,n.d9)(e),e=await this._schedule((()=>(0,R.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkQuerySupport(e)),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,u=null==n||(0,f.fS)(n,a.spatialReference)?a:(0,y.iV)(a,n);if(!u)return null;const o=i||r,l=(0,f.JY)(s)&&!(0,f.fS)(this.spatialReference,s)&&o?async e=>this._project(e,s):e=>e,h=this.featureAdapter,c=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(u))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const s=new Set;for(const e of c)s.add(h.getObjectId(e));const i=await this._reschedule((()=>this._getAllFeatures()),t),r=await this._reschedule((async()=>{const r=await(0,S.cW)("esriSpatialRelDisjoint",u,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(i,(e=>!s.has(h.getObjectId(e))||r(h.getGeometry(e))),t);return new I.y(n,e,this)}),t);return l(r)}if(!c.length)return new I.y([],e,this);if(this._canExecuteSinglePass(u,e))return l(new I.y(c,e,this));const d=await(0,S.cW)("esriSpatialRelContains",u,this.geometryType,this.hasZ,this.hasM),_=await this._runSpatialFilter(c,(e=>d(h.getGeometry(e))),t);return l(new I.y(_,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;e=null!=t?t.query:e;const{geometry:r,outSR:n,spatialRel:a,returnGeometry:u,returnCentroid:o}=e,l=this.featureStore.featureSpatialReference,h=!r||null==l||(0,f.fS)(l,r.spatialReference)?r:(0,y.iV)(r,l),c=u||o,d=(0,f.JY)(n)&&!(0,f.fS)(this.spatialReference,n),_=this._geometryQueryCache&&null==t?d&&c?JSON.stringify({originalFilterGeometry:r,spatialRelationship:a,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:a}):null,p=_?this._geometryQueryCache.get(_):null;if(null!=p)return new I.y(p,e,this);const m=async e=>(d&&c&&await this._project(e,n),_&&this._geometryQueryCache.put(_,e.items,e.items.length+1),e);if(!h)return m(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const g=this.featureAdapter;let E=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(r))),s);if("esriSpatialRelDisjoint"===a){if(!E.length)return m(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of E)i.add(g.getObjectId(e));const r=null!=t?t.items:await this._reschedule((()=>this._getAllFeatures()),s),n=await this._reschedule((async()=>{const t=await(0,S.cW)(a,h,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(r,(e=>!i.has(g.getObjectId(e))||t(g.getGeometry(e))),s);return new I.y(n,e,this)}),s);return m(n)}if(null!=t){const e=new i.SO;E=E.filter((s=>(0,i.cq)(t.items,s,t.items.length,e)>=0))}if(!E.length){const t=new I.y([],e,this);return _&&this._geometryQueryCache.put(_,t.items,1),t}if(this._canExecuteSinglePass(h,e))return m(new I.y(E,e,this));const T=await(0,S.cW)(a,h,this.geometryType,this.hasZ,this.hasM),R=await this._runSpatialFilter(E,(e=>T(g.getGeometry(e))),s);return m(new I.y(R,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds||!e.query.aggregateIds.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds||!e.query.objectIds.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,T.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,g.Jc)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const u=e[i++];t(u)&&(r.push(u),a.madeProgress()),a.done&&await this._reschedule((e=>n(e)),s)}};return this._reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),u=n.get(e);(!u||i>a(u,r))&&n.set(e,s)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,S.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s||"esriSpatialRelWithin"===s))}async _project(e,t){if(!t||(0,f.fS)(this.spatialReference,t))return e;const s=this.featureAdapter,i=await(0,y.oj)(e.items.map((e=>(0,R.Op)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t);return e.items=i.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,m.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,S.hN)(e)){if((0,_.YX)(e))return[(0,c.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,_.oU)(e))return e.rings.map((e=>(0,c.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,d.$P)((0,c.Ue)(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _checkStatisticsSupport(e,t){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.Z(re,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t),(0,S.P0)(e,this.geometryType,this.spatialReference),(0,y._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,w.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.field2&&t.push(e.field2),e.field3&&t.push(e.field3),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new r.Z(re,"params should have at least a field or valueExpression",{params:e});(0,g.Of)(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.Z(re,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,S.P0)(e,this.geometryType,this.spatialReference),(0,y._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:i,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.includes(e)?i.split(e)[0]:i.includes(t)?i.split(t)[0]:s})).filter((e=>!a.includes(e)));(0,g.Of)(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)(0,g.Of)(this.fieldsIndex,t,"outFields contains missing fields");else if(i)throw new r.Z(re,"outFields should be specified for returnDistinctValues",{query:e});(0,g.hO)(this.fieldsIndex,e.where)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:i}=e,n=s&&s.length,a=t&&t.length;if(i){if(!n||!a)throw new r.Z(re,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});(0,g.z4)(this.fieldsIndex,i,t)}if(a){if(!function(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const i=t.map((e=>e.onStatisticField)).filter(Boolean);(0,g.Of)(this.fieldsIndex,i,"onStatisticFields contains missing fields"),n&&(0,g.Of)(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:i}=s;if("percentile_disc"!==i&&"percentile_cont"!==i||!("statisticParameters"in s)){if("count"!==i&&t&&(0,g.G3)(t,this.fieldsIndex))throw new r.Z(re,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new r.Z(re,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e,t,s){e=(0,n.d9)(e);try{e=await this._schedule((()=>(0,R.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}catch(t){if(t!==R.vF)throw t;return new I.y([],e,this)}}}},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},10402:(e,t,s)=>{s.d(t,{hN:()=>S,P0:()=>I,cW:()=>E});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),u=s(8744);function o(e,t){return e?t?4:3:t?3:2}function l(e,t,s,i,r,n){const a=o(r,n),{coords:u,lengths:l}=i;if(!l)return!1;for(let i=0,r=0;i<l.length;i++,r+=a)if(!h(e,t,s,u[r],u[r+1]))return!1;return!0}function h(e,t,s,i,r){if(!e)return!1;const n=o(t,s),{coords:a,lengths:u}=e;let l=!1,h=0;for(const e of u)l=c(l,a,n,h,e,i,r),h+=e*n;return l}function c(e,t,s,i,r,n,a){let u=e,o=i;for(let e=i,l=i+r*s;e<l;e+=s){o=e+s,o===l&&(o=i);const r=t[e],h=t[e+1],c=t[o],d=t[o+1];(h<a&&d>=a||d<a&&h>=a)&&r+(a-h)/(d-h)*(c-r)<n&&(u=!u)}return u}var d=s(98732),_=s(5428),p=s(37427),f=s(11490);const m="feature-store:unsupported-query",g={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}};function E(e,t,i,u,o){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new _.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return h(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new _.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>l(s,!1,!1,e,u,o)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(c=i)?n.h_:(0,n.IY)(c);return Promise.resolve((s=>e(t,(0,f.Op)(i,u,o,s))))}var c;return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[g[e]].bind(null,t.spatialReference,t);return e=>r((0,f.Op)(i,u,o,e))}))}async function I(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===y.spatialRelationship[e]}(r))throw new i.Z(m,"Unsupported query spatial relationship",{query:e});if((0,u.JY)(n.spatialReference)&&(0,u.JY)(s)){if(!function(e){return null!=e&&!0===y.queryGeometry[(0,a.Ji)(e)]}(n))throw new i.Z(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===y.layerGeometry[e]}(t))throw new i.Z(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function S(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{async function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)await t.forEach((e=>{const t=s.getAttribute(e,i),u=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==u||isNaN(u)||(a=Math.max(a,u))}));else{const e=i||r;await t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),u=e.getAttribute(n,s);return(null==a||a<=r)&&(null==u||u>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},99514:(e,t,s)=>{s.d(t,{Z:()=>a});var i=s(35671);function r(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function n(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class a{constructor(e=[]){if(this.fields=[],this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;this.fields=e;const t=[];for(const a of e){const e=a?.name,l=o(a?.name);if(e&&l){const o=u(e);this._fieldsMap.set(e,a),this._fieldsMap.set(o,a),this._normalizedFieldsMap.set(l,a),t.push(o),"date"===(s=a).type||"esriFieldTypeDate"===s.type||"date-only"===s.type||"esriFieldTypeDateOnly"===s.type||"timestamp-offset"===s.type||"esriFieldTypeTimestampOffset"===s.type?(this.dateFields.push(a),this._dateFieldsSet.add(a)):(0,i.H7)(a)&&(this._numericFieldsSet.add(a),this.numericFields.push(a)),r(a)||n(a)||(a.editable=null==a.editable||!!a.editable,a.nullable=null==a.nullable||!!a.nullable)}}var s;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)r(e)||n(e)||e.nullable||void 0!==(0,i.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(o(e)),t&&this._fieldsMap.set(e,t),t)}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name??void 0}}function u(e){return e.trim().toLowerCase()}function o(e){return(0,i.q6)(e)?.toLowerCase()??""}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3529],{63529:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>c});var t=r(20102),n=r(17452),l=r(66677),s=r(52104),i=r(84230),o=r(87344),y=r(96187);const u={FeatureLayer:!0,SceneLayer:!0};async function c(e){const a=e.properties?.customParameters,c=await async function(e,a){let r=(0,l.Qc)(e);if(null==r&&(r=await async function(e,a){const r=await(0,y.T)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":f(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&f(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.DR)(e):null;return{title:null!=o&&r.name||(0,n.vt)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.mN)(e).path}}}(e,a)),null==r)throw new t.Z("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let m;const b={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"};switch(c){case"MapServer":m=null!=d?"FeatureLayer":await async function(e,a){return(await(0,y.T)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,y.T)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;m=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,y.T)(r.url.path,{customParameters:a});if(m="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)m="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=i.fb[e]&&(m=i.fb[e])}}break}default:m=b[c]}const w="FeatureServer"===c,h={parsedUrl:r,Constructor:null,layerOrTableId:w?d:void 0,sublayerIds:null,tableIds:null};if(u[m]&&null==d){const r=await async function(e,a,r){let t,n=!1;if("FeatureServer"===a){const a=await(0,s.V)(e,{customParameters:r});n=!!a.layersJSON,t=a.layersJSON||a.serviceJSON}else t=await(0,y.T)(e,{customParameters:r});const l=t?.layers,i=t?.tables;return{layerIds:l?.map((e=>e.id)).reverse()||[],tableIds:i?.map((e=>e.id)).reverse()||[],layerInfos:n?l:[],tableInfos:n?i:[]}}(e,c,a);w&&(h.sublayerInfos=r.layerInfos,h.tableInfos=r.tableInfos),1!==r.layerIds.length+r.tableIds.length?(h.sublayerIds=r.layerIds,h.tableIds=r.tableIds):w&&(h.layerOrTableId=r.layerIds[0]??r.tableIds[0],h.sourceJSON=r.layerInfos?.[0]??r.tableInfos?.[0])}return h.Constructor=await async function(e){return(0,o.T[e])()}(m),h}(e.url,a),m={...e.properties,url:e.url};if(!c.sublayerIds)return null!=c.layerOrTableId&&(m.layerId=c.layerOrTableId,m.sourceJSON=c.sourceJSON),new c.Constructor(m);const b=new(0,(await Promise.all([r.e(163),r.e(4609),r.e(7483)]).then(r.bind(r,89348))).default)({title:c.parsedUrl.title});return function(e,a,r){function t(e,t){const n={...r,layerId:e,sublayerTitleMode:"service-name"};return null!=t&&(n.sourceJSON=t),new a.Constructor(n)}a.sublayerIds.forEach((r=>{const n=t(r,d(a.sublayerInfos,r));e.add(n)})),a.tableIds.forEach((r=>{const n=t(r,d(a.tableInfos,r));e.tables.add(n)}))}(b,c,m),b}function d(e,a){return e?e.find((e=>e.id===a)):null}function f(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}},52104:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(96187);async function n(e,a){const r=await(0,t.T)(e,a);r.layers=r.layers.filter(l);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const s=await(0,t.T)(e+"/layers",a);return n.layersJSON={layers:s.layers.filter(l),tables:s.tables},n}function l(e){return!e.type||"Feature Layer"===e.type}},87344:(e,a,r)=>{r.d(a,{T:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(8153)]).then(r.bind(r,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(5590),r.e(6935),r.e(632),r.e(223)]).then(r.bind(r,30223))).default,CSVLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(9675)]).then(r.bind(r,45425))).default,DimensionLayer:async()=>(await Promise.all([r.e(163),r.e(9408),r.e(81)]).then(r.bind(r,40081))).default,ElevationLayer:async()=>(await Promise.all([r.e(163),r.e(3055),r.e(2763)]).then(r.bind(r,65665))).default,FeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(5159)]).then(r.bind(r,19238))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(7202)]).then(r.bind(r,23477))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(9538)]).then(r.bind(r,3723))).default,GroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(7483)]).then(r.bind(r,89348))).default,ImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(4165),r.e(4599),r.e(6610),r.e(7391),r.e(1194)]).then(r.bind(r,90444))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(5837),r.e(3055),r.e(6610),r.e(7391),r.e(8104),r.e(3381)]).then(r.bind(r,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(163),r.e(6935),r.e(1537)]).then(r.bind(r,9310))).default,KMLLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(739)]).then(r.bind(r,42756))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(163),r.e(7316)]).then(r.bind(r,30690))).default,MapImageLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(4599),r.e(6368),r.e(7374)]).then(r.bind(r,27374))).default,MapNotesLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(1227)]).then(r.bind(r,62128))).default,MediaLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(1984)]).then(r.bind(r,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(2855)]).then(r.bind(r,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(6237)]).then(r.bind(r,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(5132)]).then(r.bind(r,76604))).default,PointCloudLayer:async()=>(await Promise.all([r.e(163),r.e(4729),r.e(8643),r.e(237)]).then(r.bind(r,10608))).default,RouteLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4286)]).then(r.bind(r,40153))).default,SceneLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(5590),r.e(6935),r.e(632),r.e(7476)]).then(r.bind(r,57476))).default,StreamLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(5004)]).then(r.bind(r,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(9942),r.e(908)]).then(r.bind(r,30359))).default,TileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(4599),r.e(3055),r.e(6368),r.e(8636)]).then(r.bind(r,98636))).default,UnknownLayer:async()=>(await r.e(4166).then(r.bind(r,44166))).default,UnsupportedLayer:async()=>(await r.e(9296).then(r.bind(r,39296))).default,VectorTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(3055),r.e(4325),r.e(1785),r.e(719)]).then(r.bind(r,94756))).default,VoxelLayer:async()=>(await Promise.all([r.e(163),r.e(4729),r.e(9408),r.e(8865)]).then(r.bind(r,28865))).default,WFSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(3974)]).then(r.bind(r,12653))).default,WMSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(2462)]).then(r.bind(r,25906))).default,WMTSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(5853)]).then(r.bind(r,55853))).default,WebTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971)]).then(r.bind(r,16199))).default}},96187:(e,a,r)=>{r.d(a,{T:()=>n});var t=r(3172);async function n(e,a){const{data:r}=await(0,t.default)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3529],{63529:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>c});var t=r(20102),n=r(17452),l=r(66677),s=r(52104),i=r(84230),o=r(87344),y=r(96187);const u={FeatureLayer:!0,SceneLayer:!0};async function c(e){const a=e.properties?.customParameters,c=await async function(e,a){let r=(0,l.Qc)(e);if(null==r&&(r=await async function(e,a){const r=await(0,y.T)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":f(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&f(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.DR)(e):null;return{title:null!=o&&r.name||(0,n.vt)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.mN)(e).path}}}(e,a)),null==r)throw new t.Z("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let m;const b={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"};switch(c){case"MapServer":m=null!=d?"FeatureLayer":await async function(e,a){return(await(0,y.T)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,y.T)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;m=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,y.T)(r.url.path,{customParameters:a});if(m="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)m="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=i.fb[e]&&(m=i.fb[e])}}break}default:m=b[c]}const w="FeatureServer"===c,h={parsedUrl:r,Constructor:null,layerOrTableId:w?d:void 0,sublayerIds:null,tableIds:null};if(u[m]&&null==d){const r=await async function(e,a,r){let t,n=!1;if("FeatureServer"===a){const a=await(0,s.V)(e,{customParameters:r});n=!!a.layersJSON,t=a.layersJSON||a.serviceJSON}else t=await(0,y.T)(e,{customParameters:r});const l=t?.layers,i=t?.tables;return{layerIds:l?.map((e=>e.id)).reverse()||[],tableIds:i?.map((e=>e.id)).reverse()||[],layerInfos:n?l:[],tableInfos:n?i:[]}}(e,c,a);w&&(h.sublayerInfos=r.layerInfos,h.tableInfos=r.tableInfos),1!==r.layerIds.length+r.tableIds.length?(h.sublayerIds=r.layerIds,h.tableIds=r.tableIds):w&&(h.layerOrTableId=r.layerIds[0]??r.tableIds[0],h.sourceJSON=r.layerInfos?.[0]??r.tableInfos?.[0])}return h.Constructor=await async function(e){return(0,o.T[e])()}(m),h}(e.url,a),m={...e.properties,url:e.url};if(!c.sublayerIds)return null!=c.layerOrTableId&&(m.layerId=c.layerOrTableId,m.sourceJSON=c.sourceJSON),new c.Constructor(m);const b=new(0,(await Promise.all([r.e(163),r.e(4609),r.e(7483)]).then(r.bind(r,89348))).default)({title:c.parsedUrl.title});return function(e,a,r){function t(e,t){const n={...r,layerId:e,sublayerTitleMode:"service-name"};return null!=t&&(n.sourceJSON=t),new a.Constructor(n)}a.sublayerIds.forEach((r=>{const n=t(r,d(a.sublayerInfos,r));e.add(n)})),a.tableIds.forEach((r=>{const n=t(r,d(a.tableInfos,r));e.tables.add(n)}))}(b,c,m),b}function d(e,a){return e?e.find((e=>e.id===a)):null}function f(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}},52104:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(96187);async function n(e,a){const r=await(0,t.T)(e,a);r.layers=r.layers.filter(l);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const s=await(0,t.T)(e+"/layers",a);return n.layersJSON={layers:s.layers.filter(l),tables:s.tables},n}function l(e){return!e.type||"Feature Layer"===e.type}},87344:(e,a,r)=>{r.d(a,{T:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(8153)]).then(r.bind(r,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(5590),r.e(6935),r.e(632),r.e(223)]).then(r.bind(r,30223))).default,CSVLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(9675)]).then(r.bind(r,45425))).default,DimensionLayer:async()=>(await Promise.all([r.e(163),r.e(9408),r.e(81)]).then(r.bind(r,40081))).default,ElevationLayer:async()=>(await Promise.all([r.e(163),r.e(3055),r.e(2763)]).then(r.bind(r,65665))).default,FeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(5159)]).then(r.bind(r,19238))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(7202)]).then(r.bind(r,23477))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(9538)]).then(r.bind(r,3723))).default,GroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(7483)]).then(r.bind(r,89348))).default,ImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(4165),r.e(4599),r.e(6610),r.e(7391),r.e(1194)]).then(r.bind(r,90444))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(5837),r.e(3055),r.e(6610),r.e(7391),r.e(5604),r.e(3381)]).then(r.bind(r,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(163),r.e(6935),r.e(1537)]).then(r.bind(r,9310))).default,KMLLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(739)]).then(r.bind(r,42756))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(163),r.e(7316)]).then(r.bind(r,30690))).default,MapImageLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(4599),r.e(6368),r.e(7374)]).then(r.bind(r,27374))).default,MapNotesLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(1227)]).then(r.bind(r,62128))).default,MediaLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(1984)]).then(r.bind(r,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(2855)]).then(r.bind(r,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(6237)]).then(r.bind(r,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(5132)]).then(r.bind(r,76604))).default,PointCloudLayer:async()=>(await Promise.all([r.e(163),r.e(4729),r.e(8643),r.e(237)]).then(r.bind(r,10608))).default,RouteLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4286)]).then(r.bind(r,40153))).default,SceneLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(5590),r.e(6935),r.e(632),r.e(7476)]).then(r.bind(r,57476))).default,StreamLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(5004)]).then(r.bind(r,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(9942),r.e(908)]).then(r.bind(r,30359))).default,TileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(4599),r.e(3055),r.e(6368),r.e(8636)]).then(r.bind(r,98636))).default,UnknownLayer:async()=>(await r.e(4166).then(r.bind(r,44166))).default,UnsupportedLayer:async()=>(await r.e(9296).then(r.bind(r,39296))).default,VectorTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(3055),r.e(4325),r.e(1785),r.e(719)]).then(r.bind(r,94756))).default,VoxelLayer:async()=>(await Promise.all([r.e(163),r.e(4729),r.e(9408),r.e(8865)]).then(r.bind(r,28865))).default,WFSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1223),r.e(1423),r.e(4165),r.e(911),r.e(5546),r.e(3974)]).then(r.bind(r,12653))).default,WMSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(2462)]).then(r.bind(r,25906))).default,WMTSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(5853)]).then(r.bind(r,55853))).default,WebTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971)]).then(r.bind(r,16199))).default}},96187:(e,a,r)=>{r.d(a,{T:()=>n});var t=r(3172);async function n(e,a){const{data:r}=await(0,t.default)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7483],{92835:(e,t,i)=>{i.d(t,{Z:()=>g});var s,r=i(43697),n=i(96674),l=i(70586),a=i(35463),o=i(5600),h=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),c=i(30556);let d=s=class extends n.wq{static get allTime(){return f}static get empty(){return p}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,i=null!=this.end?this.end.getTime():this.end,s=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===s&&i===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,l.yw)(this.start,(t=>(0,a.JE)(t,e))),i=(0,l.yw)(this.end,(t=>{const i=(0,a.JE)(t,e);return t.getTime()===i.getTime()?i:(0,a.Nm)(i,1,e)}));return new s({start:t,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let l,a;if(r>=t&&r<=i?l=r:t>=r&&t<=n&&(l=t),i>=r&&i<=n?a=i:n>=t&&n<=i&&(a=n),null!=l&&null!=a&&!isNaN(l)&&!isNaN(a)){const e=new s;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return s.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:r,end:n}=this;return null!=r&&(i.start=(0,a.Nm)(r,e,t)),null!=n&&(i.end=(0,a.Nm)(n,e,t)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,r._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,r._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,r._)([(0,c.c)("end")],d.prototype,"writeEnd",null),(0,r._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,r._)([(0,o.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,r._)([(0,o.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,r._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,r._)([(0,c.c)("start")],d.prototype,"writeStart",null),d=s=(0,r._)([(0,u.j)("esri.TimeExtent")],d);const f=new d,p=new d({start:void 0,end:void 0}),g=d},5732:(e,t,i)=>{i.d(t,{c:()=>s});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}},46791:(e,t,i)=>{i.d(t,{Z:()=>O});var s,r=i(43697),n=i(3894),l=i(32448),a=i(22974),o=i(70586),h=i(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(s||(s={}));var u,c=i(1654),d=i(75215),f=i(58971),p=i(5600),g=i(52421),m=i(52011),y=i(10661);const _=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),b=()=>{};function v(e){return e?e instanceof L?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function C(e,t,i,s){const r=Math.min(e.length-i,t.length-s);let n=0;for(;n<r&&e[i+n]===t[s+n];)n++;return n}function E(e,t,i,s){t&&t.forEach(((t,r,n)=>{e.push(t),E(e,i.call(s,t,r,n),i,s)}))}const A=new Set,M=new Set,D=new Set,I=new Map;let T=0,L=u=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof u}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new y.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:T++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof u?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(s.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=b,i.removed=!0,e.splice(e.indexOf(i),1)}}}return this._emitter.on(e,t)}once(e,t){const i=this.on(e,t);return{remove(){i.remove()}}}add(e,t){if((0,f.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(s.ADD),this}addMany(e,t=this._items.length){if((0,f.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const i=this.getNextIndex(t);return this._splice(i,0,v(e)),this._emitAfterChanges(s.ADD),this}at(e){if((0,f.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(s.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...e){(0,f.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const i=(0,o.j0)(this._splice(0,this.length)),r=i.length;for(let s=0;s<r;s++)e.call(t,i[s],s,i);this._emitAfterChanges(s.REMOVE)}every(e,t){return(0,f.it)(this._observable),this._items.every(e,t)}filter(e,t){let i;return(0,f.it)(this._observable),i=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:i})}find(e,t){return(0,f.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.it)(this._observable);const i=[];return E(i,this,e,t),new u(i)}forEach(e,t){return(0,f.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.it)(this._observable),this._items[e]}getNextIndex(e){(0,f.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.it)(this._observable);const i=this._items.map(e,t);return new u({items:i})}reorder(e,t=this.length-1){(0,f.it)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(s.MOVE))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(s.MOVE)}return e}}pop(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),e}push(...e){return(0,f.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(s.ADD)),this.length}reduce(e,t){(0,f.it)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.it)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(s.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(s.REMOVE),t}removeMany(e){if((0,f.it)(this._observable),!e||!e.length||this._emitBeforeChanges(s.REMOVE))return[];const t=e instanceof u?e.toArray():e,i=this._items,r=[],n=t.length;for(let e=0;e<n;e++){const s=t[e],n=i.indexOf(s);if(n>-1){const s=1+C(t,i,e+1,n+1),l=this._splice(n,s);l&&l.length>0&&r.push.apply(r,l),e+=s-1}}return this._emitAfterChanges(s.REMOVE),r}reverse(){if((0,f.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),e}slice(e=0,t=this.length){return(0,f.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.it)(this._observable),this._items.some(e,t)}sort(e){if((0,f.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const t=(0,o.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(s.MOVE),this}splice(e,t,...i){(0,f.it)(this._observable);const r=(t?s.REMOVE:0)|(i.length?s.ADD:0);if(this._emitBeforeChanges(r))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(r),n}toArray(){return(0,f.it)(this._observable),this._items.slice()}toJSON(){return(0,f.it)(this._observable),this.toArray()}toLocaleString(){return(0,f.it)(this._observable),this._items.toLocaleString()}toString(){return(0,f.it)(this._observable),this._items.toString()}unshift(...e){return(0,f.it)(this._observable),!e.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,e),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const s=this._items,r=this.itemType;let n,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(l=s.splice(e,t),this.hasEventListener("before-remove")){const t=_.acquire();t.target=this,t.cancellable=!0;for(let i=0,r=l.length;i<r;i++)n=l[i],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(i,1),s.splice(e,0,n),e+=1,i-=1,r-=1);_.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=_.acquire();e.target=this,e.cancellable=!1;const t=l.length;for(let i=0;i<t;i++)e.reset(l[i]),this.emit("after-remove",e);_.release(e)}}if(i&&i.length){if(r){const e=[];for(const t of i){const i=r.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),l=e===this.length;if(t||n){const r=_.acquire();r.target=this,r.cancellable=!0;const a=_.acquire();a.target=this,a.cancellable=!1;for(const o of i)t?(r.reset(o),this.emit("before-add",r),r.defaultPrevented||(l?s.push(o):s.splice(e++,0,o),this._set("length",s.length),n&&(a.reset(o),this.emit("after-add",a)))):(l?s.push(o):s.splice(e++,0,o),this._set("length",s.length),a.reset(o),this.emit("after-add",a));_.release(a),_.release(r)}else{if(l)for(const e of i)s.push(e);else s.splice(e,0,...i);this._set("length",s.length)}}return(i&&i.length||l&&l.length)&&this._notifyChangeEvent(i,l),l}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=_.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,_.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=_.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),_.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;A.clear(),M.clear(),D.clear();for(const{added:t,removed:i}of e){if(t)if(0===D.size&&0===M.size)for(const e of t)A.add(e);else for(const e of t)M.has(e)?(D.add(e),M.delete(e)):D.has(e)||A.add(e);if(i)if(0===D.size&&0===A.size)for(const e of i)M.add(e);else for(const e of i)A.has(e)?A.delete(e):(D.delete(e),M.add(e))}const i=n.Z.acquire();A.forEach((e=>{i.push(e)}));const s=n.Z.acquire();M.forEach((e=>{s.push(e)}));const r=this._items,l=t.items,a=n.Z.acquire();if(D.forEach((e=>{l.indexOf(e)!==r.indexOf(e)&&a.push(e)})),t.listeners&&(i.length||s.length||a.length)){const e={target:this,added:i,removed:s,moved:a},r=t.listeners.length;for(let i=0;i<r;i++){const s=t.listeners[i];s.removed||s.callback.call(this,e)}}n.Z.release(i),n.Z.release(s),n.Z.release(a)}A.clear(),M.clear(),D.clear()}};L.ofType=e=>{if(!e)return u;if(I.has(e))return I.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const s=e.typeMap[i].prototype.declaredClass;t?t+=` | ${s}`:t=s}let i=class extends u{};return(0,r._)([(0,g.c)({Type:e,ensureType:"function"==typeof e?(0,d.se)(e):(0,d.N7)(e)})],i.prototype,"itemType",void 0),i=(0,r._)([(0,m.j)(`esri.core.Collection<${t}>`)],i),I.set(e,i),i},(0,r._)([(0,p.Cb)()],L.prototype,"length",void 0),(0,r._)([(0,p.Cb)()],L.prototype,"items",null),L=u=(0,r._)([(0,m.j)("esri.core.Collection")],L);const O=L},57435:(e,t,i)=>{i.d(t,{Z:()=>h});var s=i(43697),r=i(46791),n=(i(80442),i(20102),i(92604),i(26258),i(87538)),l=i(5600),a=i(52011);let o=class extends r.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const i of e)null!=i&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new r.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(i(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,l.Cb)()],o.prototype,"getCollections",void 0),(0,s._)([(0,l.Cb)()],o.prototype,"getChildrenFunction",void 0),(0,s._)([(0,l.Cb)()],o.prototype,"itemFilterFunction",void 0),o=(0,s._)([(0,a.j)("esri.core.CollectionFlattener")],o);const h=o},52421:(e,t,i)=>{function s(e){return(t,i)=>{t[i]=e}}i.d(t,{c:()=>s})},70921:(e,t,i)=>{i.d(t,{R:()=>n,Z:()=>r});var s=i(46791);function r(e,t,i=s.Z){return t||(t=new i),t===e||(t.removeAll(),(r=e)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?t.addMany(e):e&&t.add(e)),t;var r}function n(e){return e}},68668:(e,t,i)=>{i.d(t,{G:()=>l,w:()=>a});var s=i(66643),r=i(46791),n=i(83379);async function l(e,t){return await e.load(),a(e,t)}async function a(e,t){const i=[],l=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?l(...t):r.Z.isCollection(t)?t.forEach((e=>l(e))):n.Z.isLoadable(t)&&i.push(t))};t(l);let a=null;if(await(0,s.UI)(i,(async e=>{const t=await(0,s.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},17445:(e,t,i)=>{i.d(t,{N1:()=>d,YP:()=>o,Z_:()=>g,gx:()=>h,nn:()=>m,on:()=>c,tX:()=>y});var s=i(91460),r=i(50758),n=i(70586),l=i(95330),a=i(26258);function o(e,t,i={}){return u(e,t,i,f)}function h(e,t,i={}){return u(e,t,i,p)}function u(e,t,i={},s){let r=null;const l=i.once?(e,i)=>{s(e)&&((0,n.hw)(r),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(r=(0,a.aQ)(e,l,i.sync,i.equals),i.initial){const t=e();l(t,t)}return r}function c(e,t,i,l={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),l.onListenerRemove?.(a),a=null,h=null)}function d(e){l.once&&l.once&&(0,n.hw)(u),i(e)}const f=o(e,((e,i)=>{c(),(0,s.vT)(e)&&(a=e,h=(0,s.on)(e,t,d),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return u=(0,r.kB)((()=>{f.remove(),c()})),u}function d(e,t){return function(e,t,i){if((0,l.Hc)(i))return Promise.reject((0,l.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function o(){a=(0,n.hw)(a)}return new Promise(((s,n)=>{a=(0,r.AL)([(0,l.fu)(i,(()=>{o(),n((0,l.zE)())})),u(e,(e=>{o(),s(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(87538);const g={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},35463:(e,t,i)=>{i.d(t,{JE:()=>l,Nm:()=>n,rJ:()=>a}),i(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,i){const s=new Date(e.getTime());if(t&&i){const e=r[i],{getter:n,setter:l,multiplier:a}=e;if("months"===i){const e=function(e,t){const i=new Date(e,t+1,1);return i.setDate(0),i.getDate()}(s.getFullYear(),s.getMonth()+t);s.getDate()>e&&s.setDate(e)}s[l](s[n]()+t*a)}return s}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,i){return 0===e?0:e*s[t]/s[i]}},89348:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var s=i(43697),r=i(57435),n=i(68668),l=i(16453),a=i(17445),o=i(5600),h=(i(75215),i(67676),i(80442),i(1153)),u=i(52011),c=i(30556),d=i(87085),f=i(71612),p=i(38009),g=i(16859),m=i(72965),y=i(87344),_=i(46791),b=i(70921),v=i(92604),w=i(95330);function C(e,t,i){let s,r;if(e)for(let n=0,l=e.length;n<l;n++){if(s=e.getItemAt(n),s[t]===i)return s;if("group"===s?.type&&(r=C(s.layers,t,i),r))return r}}const E=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new _.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||v.Z.getLogger(this.declaredClass).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>i(e.item)))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,b.Z)(e,this._get("layers")))}add(e,t){const i=this.layers;if(t=i.getNextIndex(t),e instanceof d.Z){const s=e;s.parent===this?this.reorder(s,t):i.add(s,t)}else(0,w.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):v.Z.getLogger(this.declaredClass).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const i=this.layers;let s=i.getNextIndex(t);e.slice().forEach((e=>{e.parent!==this?(i.add(e,s),s+=1):this.reorder(e,s)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,s._)([(0,o.Cb)()],t.prototype,"layers",null),t=(0,s._)([(0,u.j)("esri.support.LayersMixin")],t),t};function A(e,t,i){if(e)for(let s=0,r=e.length;s<r;s++){const r=e.getItemAt(s);if(r[t]===i)return r;if("group"===r?.type){const e=A(r.tables,t,i);if(e)return e}}}const M=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new _.Z,this.addHandles([this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&v.Z.getLogger(this.declaredClass).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))])}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,b.Z)(e,this._get("tables")))}findTableById(e){return A(this.tables,"id",e)}findTableByUid(e){return A(this.tables,"uid",e)}};return(0,s._)([(0,o.Cb)()],t.prototype,"tables",null),t=(0,s._)([(0,u.j)("esri.support.TablesMixin")],t),t};var D=i(15650);let I=class extends((0,f.h)((0,m.M)((0,p.q)((0,g.I)(M(E((0,l.R)(d.Z)))))))){constructor(e){var t;super(e),this.allLayers=new r.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new r.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles((0,a.YP)((()=>this.visible),this._onVisibilityChange.bind(this),a.Z_))}destroy(){this.allLayers.destroy(),this.allTables.destroy()}_writeLayers(e,t,i,s){const r=[];if(!e)return r;e.forEach((e=>{const t=(0,D.Nw)(e,s.webmap?s.webmap.getLayerJSONFromResourceInfo(e):null,s);null!=t&&t.layerType&&r.push(t)})),t.layers=r}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"],layerModuleTypeMap:y.T},e)),Promise.resolve(this)}async loadAll(){return(0,n.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer readded to Grouplayer: uid=${e.uid}`):this.addHandles((0,a.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),a.Z_),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,h.vw)(this).initialized)return;const i=this.layers;let s=i.find((e=>e.visible));switch(e){case"exclusive":i.length&&!s&&(s=i.getItemAt(0),s.visible=!0),this._turnOffOtherLayers(s);break;case"inherited":i.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,s._)([(0,o.Cb)({readOnly:!0,dependsOn:[]})],I.prototype,"allLayers",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],I.prototype,"allTables",void 0),(0,s._)([(0,o.Cb)()],I.prototype,"fullExtent",void 0),(0,s._)([(0,o.Cb)({json:{read:!0,write:!0}})],I.prototype,"blendMode",void 0),(0,s._)([(0,o.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],I.prototype,"layers",void 0),(0,s._)([(0,c.c)("layers")],I.prototype,"_writeLayers",null),(0,s._)([(0,o.Cb)({type:["GroupLayer"]})],I.prototype,"operationalLayerType",void 0),(0,s._)([(0,o.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],I.prototype,"portalItem",null),(0,s._)([(0,o.Cb)()],I.prototype,"spatialReference",void 0),(0,s._)([(0,o.Cb)({json:{read:!1},readOnly:!0,value:"group"})],I.prototype,"type",void 0),(0,s._)([(0,o.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{read:!1,write:!1}}}})],I.prototype,"visibilityMode",null),I=(0,s._)([(0,u.j)("esri.layers.GroupLayer")],I);const T=I},16859:(e,t,i)=>{i.d(t,{I:()=>C});var s=i(43697),r=i(68773),n=i(40330),l=i(3172),a=i(66643),o=i(20102),h=i(92604),u=i(70586),c=i(95330),d=i(17452),f=i(5600),p=(i(75215),i(67676),i(80442),i(71715)),g=i(52011),m=i(30556),y=i(84230),_=i(65587),b=i(15235),v=i(86082),w=i(14661);const C=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const s=await i.e(8062).then(i.bind(i,18062));return(0,c.k_)(t),await s.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||h.Z.getLogger(this.declaredClass).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!r.Z.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===i.id;if(s&&i.portal.user)return(0,w.Ss)(i);let r,l;if(s)r=i.portal.url;else try{r=await(0,y.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!r||!(0,d.Zo)(r,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await i.reload():(i=new b.default({id:e,portal:{url:r}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=E.credential===t?E.user:await this._fetchEditingUser(e);return E.credential=t,E.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const s=`${i.owningSystemUrl}/sharing/rest`,r=_.Z.getDefault();if(r&&r.loaded&&(0,d.Fv)(r.restUrl)===(0,d.Fv)(s))return r.user;const o=`${s}/community/self`,h=null!=e?e.signal:null,u=await(0,a.q6)((0,l.default)(o,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?v.default.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,s=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return i&&s&&!(0,d.tm)(s.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, 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,s._)([(0,f.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,s._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,f.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,f.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,g.j)("esri.layers.mixins.PortalLayer")],t),t},E={credential:null,user:null}},15650:(e,t,i)=>{i.d(t,{Nw:()=>c});var s=i(20102),r=i(22974),n=i(78286),l=i(827),a=i(84230);const o=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),h=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","media","ogc-feature","route","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){"maxScale"in e&&(t.maxScale=(0,l.k)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,l.k)(e.minScale)??void 0)}function c(e,t,i){if(!("write"in e)||!e.write)return i&&i.messages&&i.messages.push(new s.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const i=function(e){return"basemap"===e.layerContainerType?o:"operational-layers"===e.layerContainerType?h:null}(t);return null==i||i.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,i)){const t={};return e.write(t,i)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,a.rQ)(e)){const i=(0,n.hS)("featureCollection.layers",t),s=i&&i[0]&&i[0].layerDefinition;s&&u(e,s)}else"stream"===e.type?u(e,t.layerDefinition=t.layerDefinition||{}):"group"!==e.type&&u(e,t)}(e,t),t&&("blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,l.k)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,a.rQ)(e)){const i=t.featureCollection;i&&(i.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,r.d9)(t)),t}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[450,9880],{41993:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=41993,e.exports=t},99880:(e,t,r)=>{"use strict";r.d(t,{V:()=>l});var s=r(68773),i=(r(3172),r(20102)),n=r(92604),o=r(17452);const a=n.Z.getLogger("esri.assets");function l(e){if(!s.Z.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new i.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(s.Z.assetsPath,e)}},32448:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var s=r(43697),i=r(15923),n=r(50758),o=r(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){const r=this._listenersMap&&this._listenersMap.get(e);if(!r)return!1;const s=this._target||this;return[...r].forEach((e=>{e.call(s,t)})),r.length>0}on(e,t){if(Array.isArray(e)){const r=e.map((e=>this.on(e,t)));return(0,n.AL)(r)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const r=this._listenersMap.get(e)||[];return r.push(t),this._listenersMap.set(e,r),{remove:()=>{const r=this._listenersMap&&this._listenersMap.get(e)||[],s=r.indexOf(t);s>=0&&r.splice(s,1)}}}once(e,t){const r=this.on(e,(e=>{r.remove(),t.call(null,e)}));return r}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let r=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return r=(0,s._)([(0,o.j)("esri.core.Evented")],r),r};let r=class extends i.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};r=(0,s._)([(0,o.j)("esri.core.Evented")],r),e.EventedAccessor=r}(a||(a={}));const l=a},609:(e,t,r)=>{"use strict";r.d(t,{D:()=>u,v:()=>c});var s,i,n=r(43697),o=r(15923),a=r(70586),l=r(95330),h=r(52011);(i=s||(s={}))[i.PENDING=0]="PENDING",i[i.RESOLVED=1]="RESOLVED",i[i.REJECTED=2]="REJECTED";class d{constructor(e){this.instance=e,this._resolver=(0,l.dD)(),this._status=s.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=s.RESOLVED,this._cleanUp()}),(()=>{this._status=s.REJECTED,this._cleanUp()}))}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return this._status===s.RESOLVED}isRejected(){return this._status===s.REJECTED}isFulfilled(){return this._status!==s.PENDING}abort(){this._resolver.reject((0,l.zE)())}when(e,t){return this._resolver.promise.then(e,t)}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const e=(0,l.dD)(),t=[...this._resolvingPromises,(0,a.j0)(e.promise)],r=this._allPromise=Promise.all(t);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve(this.instance)}),(e=>{this.isFulfilled()||this._allPromise!==r||(0,l.D_)(e)||this._resolver.reject(e)})),e.resolve()}}const c=e=>{let t=class extends e{constructor(...e){super(...e),this._promiseProps=new d(this),this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return new Promise(((e,t)=>{this._promiseProps.when(e,t)})).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}};return t=(0,n._)([(0,h.j)("esri.core.Promise")],t),t};let u=class extends(c(o.Z)){};u=(0,n._)([(0,h.j)("esri.core.Promise")],u)},17445:(e,t,r)=>{"use strict";r.d(t,{N1:()=>u,YP:()=>l,Z_:()=>m,gx:()=>h,nn:()=>g,on:()=>c,tX:()=>_});var s=r(91460),i=r(50758),n=r(70586),o=r(95330),a=r(26258);function l(e,t,r={}){return d(e,t,r,p)}function h(e,t,r={}){return d(e,t,r,f)}function d(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.hw)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let a=null,h=null,d=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function u(e){o.once&&o.once&&(0,n.hw)(d),r(e)}const p=l(e,((e,r)=>{c(),(0,s.vT)(e)&&(a=e,h=(0,s.on)(e,t,u),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return d=(0,i.kB)((()=>{p.remove(),c()})),d}function u(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((s,n)=>{a=(0,i.AL)([(0,o.fu)(r,(()=>{l(),n((0,o.zE)())})),d(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(87538);const m={sync:!0},g={initial:!0},_={sync:!0,initial:!0}},41123:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const 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)}},73660:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_t});var s=r(40330),i=r(43697),n=r(68773),o=r(3172),a=r(20102),l=r(32448),h=r(91460),d=r(22974),c=r(78286),u=r(95330),p=r(17445),f=r(17452),m=r(5600),g=(r(75215),r(52011)),_=(r(67676),r(80442)),v=r(940);r(2587),Element.prototype.closest;var y=r(61247),w=r(92604),S=r(70586),I=r(609),k=r(41123),b=r(90578),A=r(58971),T=r(38805),U=r(8728),C=r(3894),x=r(50758);const P=new Map;function R(){P.clear()}function O(e){P.delete(e)}w.Z.getLogger("esri.widgets.support.widgetUtils");function D(e){const t=C.Z.acquire();for(let e=0;e<arguments.length;e++){const r=arguments[e],s=typeof r;if("string"===s)t.push(r);else if(Array.isArray(r))t.push.apply(t,r);else if("object"===s)for(const e in r)r[e]&&t.push(e)}const r=t.join(" ");return C.Z.release(t),r}function E(e){this[e.getAttribute("data-node-ref")]=e}(()=>{const e=new Map;new ResizeObserver((t=>{R();for(const r of t)e.get(r.target)?.(r)}))})();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"].reduce(((e,t)=>(e[t]=[],e)),{}),L=["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"],j=new U.Z({whiteList:N,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(L.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),M="http://www.w3.org/",q=`${M}2000/svg`,F=`${M}1999/xlink`;let $=[],B=(e,t)=>{let r={};return Object.keys(e).forEach((t=>{r[t]=e[t]})),t&&Object.keys(t).forEach((e=>{r[e]=t[e]})),r},V=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),Z=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},z=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(V(e[s],t))return s;return-1},H=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let n=i.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if(V(t,i))throw new Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},J=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},W=[],G=!1,Y=e=>{(e.children||[]).forEach(Y),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},K=()=>{G=!1,W.forEach(Y),W.length=0},X=e=>{W.push(e),G||(G=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(K,{timeout:16}):setTimeout(K,16))},Q=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),X(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),X(e))},ee=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),n=i.length;for(let o=0;o<n;o++){let n=i[o],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)ne(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],n=a[s];n&&(Z(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let i=typeof a;"function"===i?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===q?"href"===n?e.setAttributeNS(F,n,a):e.setAttribute(n,a):"string"===i&&"value"!==n?"innerHTML"===n?e[n]=j.sanitize(a):te(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function te(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let re,se=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)ie(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),ee(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},ie=(e,t,r,s)=>{let i,n=0,o=e.vnodeSelector,a=t.ownerDocument;if(""===o)i=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(i,r):t.appendChild(i);else{for(let l=0;l<=o.length;++l){let h=o.charAt(l);if(l===o.length||"."===h||"#"===h){let h=o.charAt(n-1),d=o.slice(n,l);"."===h?i.classList.add(d):"#"===h?i.id=d:("svg"===d&&(s=B(s,{namespace:q})),void 0!==s.namespace?i=e.domNode=a.createElementNS(s.namespace,d):(i=e.domNode=e.domNode||a.createElement(d),"input"===d&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(i,r):i.parentNode!==t&&t.appendChild(i)),n=l+1}}se(i,e,s)}},ne=(e,t,r)=>{t&&t.split(" ").forEach((t=>{t&&e.classList.toggle(t,r)}))};re=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=B(r,{namespace:q})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=((e,t,r,s,i)=>{if(r===s)return!1;s=s||$;let n,o=(r=r||$).length,a=s.length,l=0,h=0,d=!1;for(;h<a;){let a=l<o?r[l]:void 0,c=s[h];if(void 0!==a&&V(a,c))d=re(a,c,i)||d,l++;else{let a=z(r,c,l+1);if(a>=0){for(n=l;n<a;n++)Q(r[n]),H(r,n,e,"removed");d=re(r[a],c,i)||d,l=a+1}else ie(c,t,l<o?r[l].domNode:void 0,i),J(c),H(s,h,e,"added")}h++}if(o>l)for(n=l;n<o;n++)Q(r[n]),H(r,n,e,"removed");return d})(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let i=!1,n=Object.keys(r),o=n.length;for(let a=0;a<o;a++){let o=n[a],l=r[o],h=t[o];if("class"===o)h!==l&&(ne(e,h,!1),ne(e,l,!0));else if("classes"===o){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(i=!0,n?t.add(s):t.remove(s))}}else if("styles"===o){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],o=l[r];o!==h[r]&&(i=!0,o?(Z(o),s.styleApplyer(e,r,o)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"===o){let t=e[o];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[o]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}else if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===q?"href"===o?e.setAttributeNS(F,o,l):e.setAttribute(o,l):"string"===t?"innerHTML"===o?e[o]=j.sanitize(l):"role"===o&&""===l?e.removeAttribute(o):te(e)&&o in e?e[o]=l:e.setAttribute(o,l):e[o]!==l&&(e[o]=l),i=!0)}}return i})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let oe=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,re(s,r,t)},domNode:e.domNode});const ae={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let le,he=e=>B(ae,e),de=(e,t,r)=>(r=he(r),ie(t,e,void 0,r),oe(t,r)),ce=(e,t,r)=>(r=he(r),ie(t,e.parentNode,e,r),oe(t,r)),ue=(e,t,r)=>(r=he(r),t.domNode=e,se(e,t,r),oe(t,r)),pe=(e,t,r)=>(r=he(r),ie(t,e.parentNode,e,r),e.parentNode.removeChild(e),oe(t,r));le=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const fe={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},me={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{e.style[t]=r}},ge=(e,t,r=!1)=>{let s=e;return t.forEach(((e,i)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,(t=>t.domNode===e)):void 0;r&&!n&&i!==t.length-1||(s=n)})),s};var _e=r(65161),ve=r(99880);let ye;(0,_.Z)("esri-disable-components-assets-path")||(ye="components/assets");const we=Symbol("widget"),Se=Symbol("widget-test-data"),Ie=[],ke={},be=new WeakMap;function Ae(e,t){let r=t.children;if(r&&r.length)for(let t=0;t<r.length;++t)r[t]=Ae(e,r[t]);else r=Ie;const s=t.vnodeSelector;if(xe(s)){const i=t.properties||ke,n=i.key||s;return{vnodeSelector:"div",properties:{key:n,afterCreate:Te,afterUpdate:Ue,afterRemoved:Ce,parentWidget:e,widgetConstructor:s,widgetProperties:{...i,key:n,children:r}},children:void 0,text:void 0,domNode:null}}return t}function Te(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:n}){const o=new i(n);o.container=e,be.set(e,o),o.afterCreate?.(o,e),s._internalHandles.add((0,x.kB)((()=>Ce(e))))}function Ue(e,t,r,{widgetProperties:s}){const i=be.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Ce(e){const t=be.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),be.delete(e))}function xe(e){return"function"==typeof e&&e[we]}const Pe=new Set;var Re,Oe=r(70171),De=r(94443);let Ee=0;function Ne(e,t){for(const r in t)null!=e[r]&&("object"==typeof e[r]&&"object"==typeof t[r]?Ne(e[r],t?.[r]):e[r]=t[r]);return e}const Le=(e=>{let t;const r={...fe,...e},s=(n=r,{...me,...n}),i=s.performanceLogger;var n;let o,a=!0,l=!1;const h=[],d=[],c=(e,n,o)=>{let a;s.eventHandlerInterceptor=(e,s,n,o)=>function(e){let s;i("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),o=n.some((e=>customElements.get(e?.tagName?.toLowerCase())));if(e.eventPhase!==Event.CAPTURING_PHASE&&o){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).filter((e=>e.getRootNode()===e.ownerDocument)).reverse();s=ge(a.getLastRender(),r,!0)}else n.reverse(),s=ge(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),i("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=o();a=e(n,l,s),h.push(a),d.push(o),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(o=void 0,a){a=!1,i("renderStart",void 0);for(let e=0;e<h.length;e++){const t=d[e]();i("rendered",void 0),h[e].update(t),i("patched",void 0)}i("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,d)),t={renderNow:u,scheduleRender:()=>{o||l||(o=requestAnimationFrame(u))},stop:()=>{o&&(cancelAnimationFrame(o),o=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{c(de,e,t)},insertBefore:(e,t)=>{c(ce,e,t)},merge:(e,t)=>{c(ue,e,t)},replace:(e,t)=>{c(pe,e,t)},detach:e=>{for(let t=0;t<d.length;t++)if(d[t]===e)return d.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,n)=>{const o=t?.(e,s,i,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>o?.call(i,e);i.addEventListener(t,r,a);const s=()=>i.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return o}},handleInterceptedEvent(e,t,r,s){const{eventPhase:i,type:n}=s,o=i===Event.CAPTURING_PHASE;let a=`on${n}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${o?"Capture":""}`,l&&a in l))&&(R(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let je=!1,Me=class extends((0,I.v)(l.Z.EventedAccessor)){constructor(e,t){super(e,t),this._attached=!1,this._internalHandles=new y.Z,this._projector=Le,this._readyForTrueRender=!1,this.iconClass="esri-icon-checkbox-unchecked",this.icon=null,this.key=this,this._loadLocale=(0,u.Ds)((async()=>{if(this._messageBundleProps&&this._messageBundleProps.length){const e=await(0,u.as)(this._messageBundleProps.map((async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,De.ME)(e);this.uiStrings&&Object.keys(this.uiStrings)&&(r=Ne((0,d.d9)(r),this.uiStrings)),this[t]=r})));if(this.destroyed)return;for(const t of e)t.error&&w.Z.getLogger(this.declaredClass).error("widget-intl:locale-error",this.declaredClass,t.error)}await this.loadLocale()})),ye&&(0,_e.Y)((0,f.hF)((0,ve.V)(ye)));const r="esri-widget-uid-"+(0,k.D)(),s=this.render.bind(this);this._trackingTarget=new T.M((()=>this.scheduleRender()));const i=()=>{if(!this._readyForTrueRender||this.destroyed)return null;if(!this.visible)return{vnodeSelector:"div",properties:{key:r,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0};const e=s();let{properties:t}=e;t||(e.properties=t={});let{key:i,styles:n}=t;i||(t.key=r),n||(t.styles=n={}),n.display||(n.display="");let o=0;return e.children?.forEach((e=>{if(xe(e.vnodeSelector))return;let{properties:t}=e;t||(e.properties=t={}),t.key||(t.key=`${this.id}--${o++}`)})),Ae(this,e)};var n;this.render=()=>{if(je)return i();let e=function(e){return P.get(e)}(this)??null;if(e)return e;this._trackingTarget.clear(),je=!0;try{e=(0,A.LJ)(this._trackingTarget,i)}catch(e){throw console.error(e),e}finally{je=!1}return e&&function(e,t){P.set(e,t)}(this,e),e},this.addResolvingPromise(this._resourcesFetch=this.beforeFirstRender().then((()=>{this._readyForTrueRender=!0,this._postInitialize()}))),n=this._resourcesFetch,Pe.add(n),n.finally((()=>Pe.delete(n)))}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){return Promise.all([this.loadDependencies(),this._loadLocale()]).then((()=>{})).catch(u.H9)}async loadDependencies(){}async loadLocale(){}destroy(){this.destroyed||((0,S.SC)(this._trackingTarget),(0,S.SC)(this.viewModel),this._detach(this.container),this._set("container",null),this._internalHandles.destroy(),this._emitter.clear(),this.render=()=>null,this._projector=null,O(this))}set container(e){this._get("container")||this._set("container",e)}castContainer(e){return function(e){return"string"==typeof e?document.getElementById(e):e??null}(e)}get domNode(){return this.container}set domNode(e){this.container=e}get id(){return this._get("id")||this.get("container.id")||Date.now().toString(16)+"-widget-"+Ee++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(Re=we,Se)](){return{projector:this._projector}}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(O(this),this._projector.scheduleRender())}classes(...e){return D.apply(this,e)}renderNow(){O(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this._internalHandles.add((0,p.YP)((()=>this.viewModel),((e,t)=>{t&&this._internalHandles.remove("delegated-events"),e&&(0,h.vT)(e)&&this._internalHandles.add(this._delegatedEventNames.map((t=>(0,h.on)(e,t,(e=>{this.emit(t,e)})))),"delegated-events")}),p.nn)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(u.H9),this.scheduleRender()};this._internalHandles.add([(0,Oe.qe)(e),(0,p.YP)((()=>this.uiStrings),e),(0,p.gx)((()=>this.container),(e=>{this.destroyed||this._attach(e)}),{initial:!0,once:!0})])}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};Me[Re]=!0,(0,i._)([(0,m.Cb)()],Me.prototype,"_readyForTrueRender",void 0),(0,i._)([(0,m.Cb)({value:null})],Me.prototype,"container",null),(0,i._)([(0,b.p)("container")],Me.prototype,"castContainer",null),(0,i._)([(0,m.Cb)()],Me.prototype,"iconClass",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"icon",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"id",null),(0,i._)([(0,m.Cb)()],Me.prototype,"label",null),(0,i._)([(0,m.Cb)()],Me.prototype,"renderable",null),(0,i._)([(0,m.Cb)()],Me.prototype,"uiStrings",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"viewModel",void 0),(0,i._)([(0,m.Cb)({value:!0})],Me.prototype,"visible",null),(0,i._)([(0,m.Cb)()],Me.prototype,"key",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"children",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"afterCreate",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"afterUpdate",void 0),(0,i._)([(0,m.Cb)()],Me.prototype,"afterRemoved",void 0),Me=(0,i._)([(0,g.j)("esri.widgets.Widget")],Me);const qe=Me;function Fe(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}}var $e=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Be=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Be(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=$e(i)),t.push(i))}},Ve=function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var i=[];return Be(r,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}};function Ze(e,t,...r){return"function"!=typeof e||xe(e)?Ve(e,t,...r):e(t,...r)}const ze="esri-identity-form",He={base:ze,group:`${ze}__group`,label:`${ze}__label`,footer:`${ze}__footer`,esriInput:"esri-input",esriButton:"esri-button",esriButtonSecondary:"esri-button--secondary"};let Je=class extends qe{constructor(e,t){super(e,t),this._usernameInputNode=null,this._passwordInputNode=null,this.signingIn=!1,this.server=null,this.resource=null,this.error=null,this.oAuthPrompt=!1}render(){const{error:e,server:t,resource:r,signingIn:s,oAuthPrompt:i,messages:n}=this,o=Ze("div",{class:He.group},(0,v.n)(i?n.oAuthInfo:n.info,{server:t&&/\.arcgis\.com/i.test(t)?"ArcGIS Online":t,resource:`(${r||n.lblItem})`})),a=i?null:Ze("div",{class:He.group,key:"username"},Ze("label",{class:He.label},n.lblUser,Ze("input",{value:"",required:!0,autocomplete:"off",spellcheck:!1,type:"text",bind:this,afterCreate:E,"data-node-ref":"_usernameInputNode",class:He.esriInput}))),l=i?null:Ze("div",{class:He.group,key:"password"},Ze("label",{class:He.label},n.lblPwd,Ze("input",{value:"",required:!0,type:"password",bind:this,afterCreate:E,"data-node-ref":"_passwordInputNode",class:He.esriInput}))),h=Ze("div",{class:this.classes(He.group,He.footer)},Ze("input",{type:"submit",disabled:!!s,value:s?n.lblSigning:n.lblOk,class:He.esriButton}),Ze("input",{type:"button",value:n.lblCancel,bind:this,onclick:this._cancel,class:this.classes(He.esriButton,He.esriButtonSecondary)})),d=e?Ze("div",null,e.details&&e.details.httpStatus?n.invalidUser:n.noAuthService):null;return Ze("form",{class:He.base,bind:this,onsubmit:this._submit},o,d,a,l,h)}_cancel(){this._set("signingIn",!1),this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode&&this._usernameInputNode.value,password:this._passwordInputNode&&this._passwordInputNode.value};this.emit("submit",t)}};(0,i._)([(0,m.Cb)(),Fe("esri/identity/t9n/identity")],Je.prototype,"messages",void 0),(0,i._)([(0,m.Cb)()],Je.prototype,"signingIn",void 0),(0,i._)([(0,m.Cb)()],Je.prototype,"server",void 0),(0,i._)([(0,m.Cb)()],Je.prototype,"resource",void 0),(0,i._)([(0,m.Cb)()],Je.prototype,"error",void 0),(0,i._)([(0,m.Cb)()],Je.prototype,"oAuthPrompt",void 0),Je=(0,i._)([(0,g.j)("esri.identity.IdentityForm")],Je);const We=Je;var Ge=r(44291);const Ye="esri-identity-modal",Ke={base:Ye,open:`${Ye}--open`,closed:`${Ye}--closed`,title:`${Ye}__title`,dialog:`${Ye}__dialog`,content:`${Ye}__content`,closeButton:`${Ye}__close-button`,iconClose:"esri-icon-close"};let Xe=class extends qe{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.content=null,this.open=!1,this._focusTrap=null,this._close=()=>{this.open=!1},document.body.appendChild(this.container),this.addHandles((0,p.YP)((()=>this.open),(()=>this._toggleFocusTrap())))}destroy(){this._destroyFocusTrap()}get title(){return this.messages?.auth.signIn}render(){const e=this.id,{open:t,content:r,title:s,messages:i}=this,n=t&&!!r,o={[Ke.open]:n,[Ke.closed]:!n},a=Ze("button",{class:Ke.closeButton,"aria-label":i.close,title:i.close,bind:this,onclick:this._close,type:"button"},Ze("span",{"aria-hidden":"true",class:Ke.iconClose})),l=`${e}_title`,h=`${e}_content`,d=s?Ze("h1",{id:l,class:Ke.title},s):null,c=n?Ze("div",{bind:this,class:Ke.dialog,role:"dialog","aria-labelledby":l,"aria-describedby":h,afterCreate:this._createFocusTrap},a,d,this._renderContent(h)):null;return Ze("div",{tabIndex:-1,class:this.classes(Ke.base,o)},c)}_destroyFocusTrap(){this._focusTrap?.deactivate({onDeactivate:()=>{}}),this._focusTrap=null}_toggleFocusTrap(){const{_focusTrap:e,open:t}=this;e&&(t?e.activate():e.deactivate())}_createFocusTrap(e){this._destroyFocusTrap();const t=requestAnimationFrame((()=>{this._focusTrap=(0,Ge.v)(e,{initialFocus:"input",onDeactivate:this._close}),this._toggleFocusTrap()}));this.addHandles((0,x.kB)((()=>cancelAnimationFrame(t))))}_renderContent(e){const t=this.content;return"string"==typeof t?Ze("div",{class:Ke.content,id:e,innerHTML:t}):function(e){return e&&"function"==typeof e.render}(t)?Ze("div",{class:Ke.content,id:e},t.render()):t instanceof HTMLElement?Ze("div",{class:Ke.content,id:e,bind:t,afterCreate:this._attachToNode}):null}_attachToNode(e){e.appendChild(this)}};(0,i._)([(0,m.Cb)({readOnly:!0})],Xe.prototype,"container",void 0),(0,i._)([(0,m.Cb)()],Xe.prototype,"content",void 0),(0,i._)([(0,m.Cb)()],Xe.prototype,"open",void 0),(0,i._)([(0,m.Cb)(),Fe("esri/t9n/common")],Xe.prototype,"messages",void 0),(0,i._)([(0,m.Cb)()],Xe.prototype,"title",null),Xe=(0,i._)([(0,g.j)("esri.identity.IdentityModal")],Xe);const Qe=Xe,et="esriJSAPIOAuth";class tt{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t&&t.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(et,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t&&t.appId&&t.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken",r=new FormData;if(r.append("f","json"),r.append("auth_token",this.refreshToken||this.token),r.append("client_id",t.appId),r.append("token_type_hint",this.refreshToken?"refresh_token":"access_token"),"function"==typeof navigator.sendBeacon)navigator.sendBeacon(e,r);else{const t=new XMLHttpRequest;t.open("POST",e),t.send(r)}}if(t&&t.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(et,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t&&t.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(et);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}tt.prototype.declaredClass="esri.identity.OAuthCredential";var rt,st=r(96674);let it=rt=class extends st.wq{constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return rt.fromJSON(this.toJSON())}};(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"appId",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"authNamespace",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"expiration",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"flowType",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"forceLogin",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"forceUserId",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"locale",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"minTimeUntilExpiration",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"popup",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"popupCallbackUrl",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"popupWindowFeatures",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"portalUrl",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"preserveUrlHash",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],it.prototype,"userId",void 0),it=rt=(0,i._)([(0,g.j)("esri.identity.OAuthInfo")],it);const nt=it;let ot=class extends st.wq{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"adminTokenServiceUrl",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"currentVersion",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"hasPortal",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"hasServer",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"owningSystemUrl",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"owningTenant",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"server",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"shortLivedTokenValidity",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"tokenServiceUrl",void 0),(0,i._)([(0,m.Cb)({json:{write:!0}})],ot.prototype,"webTierAuth",void 0),ot=(0,i._)([(0,g.j)("esri.identity.ServerInfo")],ot);const at=ot;var lt=r(19745);const ht={},dt=e=>{const t=new f.R9(e.owningSystemUrl).host,r=new f.R9(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},ct=(e,t)=>!!(dt(e)&&t&&t.some((t=>t.test(e.server))));let ut=null,pt=null;try{ut=window.localStorage,pt=window.sessionStorage}catch{}class ft extends l.Z{constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.formConstructor=We,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,f.mN)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^\/]+\/[^\/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer)).*/gi,this._gwUser=/http.+\/users\/([^\/]+)\/?.*/i,this._gwItem=/http.+\/items\/([^\/]+)\/?.*/i,this._gwGroup=/http.+\/groups\/([^\/]+)\/?.*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getOAuthLocationParams(),window.addEventListener("pageshow",(e=>{this._pageShowHandler(e)}))}registerServers(e){const t=this.serverInfos;t?(e=e.filter((e=>!this.findServerInfo(e.server))),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach((e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)}))}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new at,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new mt({userId:e.userId,server:i.server,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,d.yd)({serverInfos:this.serverInfos.map((e=>e.toJSON())),oAuthInfos:this.oAuthInfos.map((e=>e.toJSON())),credentials:this.credentials.map((e=>e.toJSON()))})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach((t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new at(t))})),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach((t=>{t.appId&&e.push(t.declaredClass?t:new nt(t))})),e.length&&this.registerOAuthInfos(e)}s&&s.forEach((e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new mt(e)).emitTokenChange(),this.credentials.push(e))}))}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s,i=!0;t&&(r=!!t.token,s=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,o=(0,u.hh)();if(t.signal&&(0,u.fu)(t.signal,(()=>{n.abort()})),(0,u.fu)(n,(()=>{o.reject(new a.Z("identity-manager:user-aborted","ABORTED"))})),(0,u.Hc)(n))return o.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=r?this.findCredential(e):null;let d;if(h&&s&&s.details&&498===s.details.httpStatus)h.destroy();else if(h)return d=new a.Z("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:s}),o.reject(d),o.promise;const c=this._findCredential(e,t);if(c)return o.resolve(c),o.promise;let p=this.findServerInfo(e);if(p)!p.hasServer&&this._isServerRsrc(e)&&(p._restInfoPms=this._getTokenSvcUrl(e),p.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return d=new a.Z("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),o.reject(d),o.promise;p=new at,p.server=this._getServerInstanceRoot(e),"string"==typeof t?(p.tokenServiceUrl=t,p.hasPortal=!0):(p._restInfoPms=t,p.hasServer=!0),this.registerServers([p])}return p.hasPortal&&void 0===p._selfReq&&(i||(0,f.D6)(p.tokenServiceUrl,this._appOrigin)||this._gwDomains.some((e=>e.tokenServiceUrl===p.tokenServiceUrl)))&&(p._selfReq={owningTenant:t&&t.owningTenant,selfDfd:this._getPortalSelf(p.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,p,t,o,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),i=new f.R9(this._appOrigin),n=e.shortLivedTokenValidity;let l,h,d,c,u,p,m,g;t&&(g=this.tokenValidity||n||this._defaultTokenValidity,g>n&&n>0&&(g=n)),r&&(l=r.isAdmin,h=r.serverUrl,d=r.token,p=r.signal,m=r.ssl,e.customParameters=r.customParameters),l?c=e.adminTokenServiceUrl:(c=e.tokenServiceUrl,u=new f.R9(c.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!m&&"http"===i.scheme&&((0,f.D6)(i.uri,c,!0)||"https"===u.scheme&&i.host===u.host&&"7080"===i.port&&"7443"===u.port)&&(c=c.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const _={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:d,expiration:g,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:p,...r?.ioArgs};return s||(_.withCredentials=!1),(0,o.default)(c,_).then((r=>{const s=r.data;if(!s||!s.token)return new a.Z("identity-manager:authentication-failed","Unable to generate token");const i=e.server;return ht[i]||(ht[i]={}),t&&(ht[i][t.username]=t.password),s.validity=g,s}))}isBusy(){return!!this._busy}checkSignInStatus(e){return this.checkAppAccess(e,"").then((e=>e.credential))}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then((i=>{let n;const l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r&&r.force))n=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};n=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};n=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,o.default)(n,{query:l,authMode:"anonymous"}).then((e=>{if(!1===e.data.valid)throw new a.Z("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}})).catch((e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details&&e.details.httpStatus;if(498===t)throw i.destroy(),new a.Z("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new a.Z("identity-manager:invalid-request");return{credential:i}}))})).then((e=>({credential:e.credential,viewOnly:s})))}setOAuthResponseHash(e){e&&("#"===e.charAt(0)&&(e=e.substring(1)),this._processOAuthPopupParams((0,f.u0)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=(0,u.hh)(),i=()=>{l?.remove(),h?.remove(),d?.remove(),o?.destroy(),this.dialog?.destroy(),this.dialog=o=l=h=d=null},n=()=>{i(),this._oAuthDfd=null,s.reject(new a.Z("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,u.fu)(r.signal,(()=>{n()}));let o=new this.formConstructor;o.resource=this.getResourceName(e),o.server=t.server,this.dialog=new Qe,this.dialog.content=o,this.dialog.open=!0,this.emit("dialog-create");let l=o.on("cancel",n),h=(0,p.YP)((()=>this.dialog.open),n),d=o.on("submit",(e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then((n=>{i();const o=new mt({userId:e.username,server:t.server,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(o)})).catch((e=>{o.error=e,o.signingIn=!1}))}));return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=(0,u.hh)();const i=this._oAuthDfd;let n;s?.signal&&(0,u.fu)(s.signal,(()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&m()})),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;const o=r._oAuthCred;if(o.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&!r.popup&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,f.rS)(e),o.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),o.stateUID=(0,f.rS)(e),o.save()||(o.codeVerifier=n=null)}else o.codeVerifier=null;let l,h,d,c;this._getCodeChallenge(n).then((i=>{const n=!s||!1!==s.oAuthPopupConfirmation;r.popup&&n?(l=new this.formConstructor,l.oAuthPrompt=!0,l.server=t.server,this.dialog=new Qe,this.dialog.content=l,this.dialog.open=!0,this.emit("dialog-create"),h=l.on("cancel",m),d=(0,p.YP)((()=>this.dialog.open),m),c=l.on("submit",(()=>{g(),this._doOAuthSignIn(e,t,r,i)}))):this._doOAuthSignIn(e,t,r,i)}));const m=()=>{g(),this._oAuthDfd=null,i.reject(new a.Z("identity-manager:user-aborted","ABORTED"))},g=()=>{h?.remove(),d?.remove(),c?.remove(),l?.destroy(),this.dialog?.destroy(),this.dialog=null};return i.promise}destroyCredentials(){this.credentials&&this.credentials.slice().forEach((e=>{e.destroy()})),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,h.on)(window,"message",(t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then((e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)})).catch((e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)}))}}))}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){"#"===e.charAt(0)&&(e=e.substring(1));const t=(0,f.u0)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){"?"===t.charAt(0)&&(t=t.substring(1));const e=(0,f.u0)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach((e=>{delete t[e]}));const r=(0,f.B7)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,o.default)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then((e=>e.data))}_getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e);return crypto.subtle.digest("SHA-256",t).then((e=>(0,f.rS)(new Uint8Array(e))))}return Promise.resolve(null)}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new a.Z("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t&&t.token,l=t&&t.resource,h=this._isServerRsrc(e)?"server":"portal",d=this.credentials.filter((t=>this._hasSameServerInstance(t.server,e)&&t.scope===h));if(e=l||e,d.length)if(1===d.length){if(r=d[0],i=this.findServerInfo(r.server),s=i&&i.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(d.some((a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i&&i.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0)))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t&&t.isAdmin&&!(0,f.D6)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,f.D6)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new f.R9(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,lt.P)(t)||(r=t.indexOf("/sharing")),-1===r&&"/"===t.substr(-1)&&(r=t.length-1),r>-1?e.substring(0,r):e}_hasSameServerInstance(e,t){return"/"===e.substr(-1)&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=this._normalizeAGOLorgDomain(e),t=this._normalizeAGOLorgDomain(t),(e=e.substr(e.indexOf(":")))===t.substr(t.indexOf(":"))}_normalizeAGOLorgDomain(e){const t=/^https?:\/\/(?:cdn|[a-z\d-]+\.maps)\.arcgis\.com/i,r=/^https?:\/\/(?:cdndev|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,s=/^https?:\/\/(?:cdnqa|[a-z\d-]+\.mapsqa)\.arcgis\.com/i;return t.test(e)?e=e.replace(t,"https://www.arcgis.com"):r.test(e)?e=e.replace(r,"https://devext.arcgis.com"):s.test(e)&&(e=e.replace(s,"https://qaext.arcgis.com")),e}_sanitizeUrl(e){const t=(n.Z.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.substring(r+t.length+1)),e=(0,f.Fv)(e),(0,f.mN)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replace(e,"$1")===i.replace(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new f.R9(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some((e=>e.regex.test(t.uri)));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||n.Z.portalUrl&&(s=(0,f.D6)(t,n.Z.portalUrl,!0)),s||(s=this._portals.some((e=>this._hasSameServerInstance(e,t.uri)))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach(((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)}));let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r&&r.owningSystemUrl;s&&dt(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,o.default)(e=s+"/rest/info",{query:{f:"json"}}).then((e=>e.data)),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some((r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t))),t||this._portals.some((r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t))),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.substring(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new f.R9(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}if(e.toLowerCase().includes("premium.arcgisonline.com"))return"https://premium.arcgisonline.com/server/tokens"}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then((i=>{const n=new mt({userId:i.username,server:r.server,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?ut:pt,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n}))}const i=new mt({userId:e.username,server:r.server,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?ut:pt,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new a.Z(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then((e=>{t.resolve(e)})).catch((e=>{t.reject(e)}))}_setOAuthResponseQueryString(e){e&&("?"===e.charAt(0)&&(e=e.substring(1)),this._processOAuthPopupParams((0,f.u0)(e)))}_exchangeToken(e,t,r){return(0,o.default)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}}).then((e=>e.data.token))}_getPlatformSelf(e,t){return e=e.replace(/^http:/i,"https:"),(0,o.default)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0}).then((e=>e.data))}_getPortalSelf(e,t){let r;return this._gwDomains.some((t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r))),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,o.default)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then((e=>e.data)))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,f.D6)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,f.ed)(n)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!i)&&r(new a.Z("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),i}_enqueue(e,t,r,s,i,n){return s||(s=(0,u.hh)()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_&&e.options_.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach((e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}})),e.resolve(t),o.forEach((e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)})),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,n,o,l)=>{const d=e.sinfo_,c=!e.options_||!1!==e.options_.prompt,p=d.hasPortal&&this._findOAuthInfo(e.resUrl_);let m,g;if(i)t(new mt({userId:i,server:d.server,token:o||null,expires:null!=l?Number(l):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,h.on)(window,"message",(e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new a.Z("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new mt(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new a.Z("identity-manager:credential-request-failed","Parent application's token has expired.")):r(a.Z.fromJSON(e.data.error))))}));(0,u.fu)(e.options_?.signal,(()=>{s.remove()}))}else if(p){let i=p._oAuthCred;if(!i){const e=new tt(p,ut),t=new tt(p,pt);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,p._oAuthCred=i}if(i.isValid()){m=new mt({userId:i.userId,server:d.server,token:i.token,expires:i.expires,ssl:i.ssl,_oAuthCred:i});const r=p.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);r||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(d.server,i.refreshToken,i.appId).then((e=>(m.expires=Date.now()+1e3*e.expires_in,m.token=e.access_token,m))):Promise.resolve(m),e._pendingDfd.then((e=>r?this._exchangeToken(e.server,p.appId,e.token).then((t=>(e.token=t,e))).catch((()=>e)):e)).then((e=>{t(e)})).catch((()=>{i?.destroy(),s()}))):t(m)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(p.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,p,d).then((e=>{t(e)})).catch(r)}else{const s=()=>{c?e._pendingDfd=this.oAuthSignIn(e.resUrl_,d,p,e.options_).then(t,r):(g=new a.Z("identity-manager:not-authenticated","User is not signed in."),r(g))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(d.server,p.appId).then((e=>{(0,f.D6)(e.portalUrl,this._appOrigin,!0)?(m=new mt({userId:e.username,server:d.server,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(m)):s()})).catch(s):s()}}else if(c){if(this._checkProtocol(e.resUrl_,d,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,d,s).then(t,r)}}else g=new a.Z("identity-manager:not-authenticated","User is not signed in."),r(g)},i=()=>{const s=e.sinfo_,i=s.owningSystemUrl,n=e.options_;let o,a,l,h;if(n&&(o=n.token,a=n.error,l=n.prompt),h=this._findCredential(i,{token:o,resource:e.resUrl_}),!h)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){h=e;break}if(h){const i=this.findCredential(e.resUrl_,h.userId);if(i)t(i);else if(ct(s,this._legacyFed)){const e=h.toJSON();e.server=s.server,e.resources=null,t(new mt(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(h.server),null,{serverUrl:e.resUrl_,token:h.token,signal:e.options_.signal,ssl:h.ssl})).then((r=>{t(new mt({userId:h?.userId,server:s.server,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))}),r)}else this._busy=null,o&&(e.options_.token=null),(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,token:o,error:a,prompt:l})).then((()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)}),(t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)}))};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,o=this._isServerRsrc(e.resUrl_),l=e.sinfo_._restInfoPms;l?l.promise.then((t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,c.hS)("authInfo.tokenServicesUrl",t)||(0,c.hS)("authInfo.tokenServiceUrl",t)||(0,c.hS)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,c.hS)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}o&&r.owningSystemUrl?i():s()}),(()=>{e.sinfo_._restInfoPms=null;const t=new a.Z("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)})):o&&n?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then((t=>{const r={};let s,i,n,o;return t&&(s=t.user&&t.user.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch((()=>null)).then((e=>(r.portalToken=e&&e.token,r.tokenExpiration=e&&e.expires,r))):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch((()=>null)).then((()=>r)):r})).catch((()=>null)).then((t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()})):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const i=e.customBaseUrl,n=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=window.location.href;let e=r.indexOf("?");e>-1&&(r=r.slice(0,e)),e=r.search(/\/(apps|home)\//),r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,o.default)(r+"/sharing/rest",{query:{f:"json"}}).then((()=>{this._defaultOAuthInfo=new nt({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})}))):t=Promise.resolve(),t.then((()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,o.default)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:n,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,f.hF)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then((e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&i?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+i:t.portalUrl=s,t.popup=window!==window.top||!((0,f.D6)(s,this._appOrigin)||this._gwDomains.some((e=>e.regex.test(s)&&e.regex.test(this._appOrigin)))),this.oAuthInfos.push(t)}}))}))}_doOAuthSignIn(e,t,r,s){const i=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),i.stateUID&&(n.uid=i.stateUID);const o={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(o.force_login=!0),r.forceUserId&&r.userId&&(o.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(o.redirectToUserOrgUrl=!0),i.codeVerifier&&(o.code_challenge=s||i.codeVerifier,o.code_challenge_method=s?"S256":"plain");const l=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",d=l+"?"+(0,f.B7)(o);if(r.popup){const e=window.open(d,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval((()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new a.Z("identity-manager:user-aborted","ABORTED");e.reject(t)}}}),500),this._oAuthOnPopupHandle=(0,h.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],(e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)}));else{const e=new a.Z("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:o,authorizeUrl:l,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=d}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,f.hF)(e.popupCallbackUrl);if(t){const e=(0,f.mN)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach((t=>{delete e.query[t]})),(0,f.fl)(e.path,e.query)}return r}}ft.prototype.declaredClass="esri.identity.IdentityManagerBase";let mt=class extends l.Z.EventedAccessor{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e&&e._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){const e=s.id.findServerInfo(this.server),t=e&&e.owningSystemUrl,r=!!t&&"server"===this.scope,i=r&&ct(e,s.id._legacyFed),n=e.webTierAuth,o=n&&s.id.normalizeWebTierAuth,a=ht[this.server],l=a&&a[this.userId];let h,d=this.resources&&this.resources[0],c=r?s.id.findServerInfo(t):null,u={username:this.userId,password:l};if(n&&!o)return;r&&!c&&s.id.serverInfos.some((e=>(s.id._isIdProvider(t,e.server)&&(c=e),!!c)));const p=c?s.id.findCredential(c.server,this.userId):null;if(!r||p){if(!i){if(r)h={serverUrl:d,token:p&&p.token,ssl:p&&p.ssl};else if(o)u=null,h={ssl:this.ssl};else{if(!l){let t;return d&&(d=s.id._sanitizeUrl(d),this._enqueued=1,t=s.id._enqueue(d,e,null,null,this.isAdmin,this),t.then((()=>{this._enqueued=0,this.refreshServerTokens()})).catch((()=>{this._enqueued=0}))),t}this.isAdmin&&(h={isAdmin:!0})}return s.id.generateToken(r?c:e,r?null:u,h).then((e=>{this.token=e.token,this.expires=null!=e.expires?Number(e.expires):null,this.creationTime=Date.now(),this.validity=e.validity,this.emitTokenChange(),this.refreshServerTokens()})).catch((()=>{}))}p?.refreshToken()}}refreshServerTokens(){"portal"===this.scope&&s.id.credentials.forEach((e=>{const t=s.id.findServerInfo(e.server),r=t&&t.owningSystemUrl;e!==this&&e.userId===this.userId&&r&&"server"===e.scope&&(s.id._hasSameServerInstance(this.server,r)||s.id._isIdProvider(r,this.server))&&(ct(t,s.id._legacyFed)?(e.token=this.token,e.expires=this.expires,e.creationTime=this.creationTime,e.validity=this.validity,e.emitTokenChange()):e.refreshToken())}))}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=this.server&&s.id.findServerInfo(this.server),r=t&&t.owningSystemUrl,i=r&&s.id.findServerInfo(r);!1===e||r&&"portal"!==this.scope&&(!i||!i.webTierAuth||s.id.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id.credentials.indexOf(this);e>-1&&s.id.credentials.splice(e,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,d.yd)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,i._)([(0,m.Cb)()],mt.prototype,"creationTime",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"expires",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"isAdmin",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"oAuthState",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"resources",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"scope",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"server",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"ssl",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"token",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"tokenRefreshBuffer",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"userId",void 0),(0,i._)([(0,m.Cb)()],mt.prototype,"validity",void 0),mt=(0,i._)([(0,g.j)("esri.identity.Credential")],mt);class gt extends ft{}gt.prototype.declaredClass="esri.identity.IdentityManager";const _t=new gt;(0,s.qh)(_t)},2587:(e,t,r)=>{"use strict";r(90344),r(18848),r(940),r(70171);var s=r(94443),i=r(3172),n=r(20102);async function o(e){if(null!=l.fetchBundleAsset)return l.fetchBundleAsset(e);const t=await(0,i.default)(e,{responseType:"text"});return JSON.parse(t.data)}class a{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,i){const a=t.exec(r);if(!a)throw new n.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",h=a[2],d=(0,s.Su)(i),c=`${l}${h}.json`,u=d?`${l}${h}_${d}.json`:c;let p;try{p=await o(e(u))}catch(t){if(u===c)throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{p=await o(e(c))}catch(e){throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return p}(this.getAssetUrl,this.matcher,e,t)}}const l={};var h,d=r(99880);(0,s.tz)((h={pattern:"esri/",location:d.V},new a(h)))},90344:(e,t,r)=>{"use strict";r.d(t,{Ze:()=>g,p6:()=>_});var s=r(35454),i=r(70171);const n={year:"numeric",month:"numeric",day:"numeric"},o={year:"numeric",month:"long",day:"numeric"},a={year:"numeric",month:"short",day:"numeric"},l={year:"numeric",month:"long",weekday:"long",day:"numeric"},h={hour:"numeric",minute:"numeric"},d={...h,second:"numeric"},c={"short-date":n,"short-date-short-time":{...n,...h},"short-date-short-time-24":{...n,...h,hour12:!1},"short-date-long-time":{...n,...d},"short-date-long-time-24":{...n,...d,hour12:!1},"short-date-le":n,"short-date-le-short-time":{...n,...h},"short-date-le-short-time-24":{...n,...h,hour12:!1},"short-date-le-long-time":{...n,...d},"short-date-le-long-time-24":{...n,...d,hour12:!1},"long-month-day-year":o,"long-month-day-year-short-time":{...o,...h},"long-month-day-year-short-time-24":{...o,...h,hour12:!1},"long-month-day-year-long-time":{...o,...d},"long-month-day-year-long-time-24":{...o,...d,hour12:!1},"day-short-month-year":a,"day-short-month-year-short-time":{...a,...h},"day-short-month-year-short-time-24":{...a,...h,hour12:!1},"day-short-month-year-long-time":{...a,...d},"day-short-month-year-long-time-24":{...a,...d,hour12:!1},"long-date":l,"long-date-short-time":{...l,...h},"long-date-short-time-24":{...l,...h,hour12:!1},"long-date-long-time":{...l,...d},"long-date-long-time-24":{...l,...d,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":h,"long-time":d},u=(0,s.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),p=(u.apiValues,u.toJSON.bind(u),u.fromJSON.bind(u),{ar:"ar-u-nu-latn-ca-gregory"});let f=new WeakMap,m=c["short-date-short-time"];function g(e){return e?c[e]:null}function _(e,t){return function(e){const t=e||m;let r=f.get(t);if(!r){const e=(0,i.Kd)(),s=p[(0,i.Kd)()]||e;r=new Intl.DateTimeFormat(s,t),f.set(t,r)}return r}(t).format(e)}(0,i.Ze)((()=>{f=new WeakMap,m=c["short-date-short-time"]}))},70171:(e,t,r)=>{"use strict";let s;r.d(t,{Kd:()=>o,Ze:()=>d,qe:()=>l});const i=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function n(){return i??globalThis.navigator?.language??"en"}function o(){return void 0===s&&(s=n()),s}const a=[];function l(e){return a.push(e),{remove(){a.splice(a.indexOf(e),1)}}}const h=[];function d(e){return h.push(e),{remove(){a.splice(h.indexOf(e),1)}}}globalThis.addEventListener?.("languagechange",(function(){const e=n();s!==e&&(s=e,[...h].forEach((t=>{t.call(null,e)})),[...a].forEach((t=>{t.call(null,e)})))}))},94443:(e,t,r)=>{"use strict";r.d(t,{ME:()=>p,Su:()=>f,tz:()=>u});var s=r(20102),i=r(95330),n=r(70171);const o=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,a={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function l(e){return a[e]??!1}const h=[],d=new Map;function c(e){for(const t of d.keys())m(e.pattern,t)&&d.delete(t)}function u(e){return h.includes(e)||(c(e),h.unshift(e)),{remove(){const t=h.indexOf(e);t>-1&&(h.splice(t,1),c(e))}}}async function p(e){const t=(0,n.Kd)();d.has(e)||d.set(e,async function(e,t){const r=[];for(const s of h)if(m(s.pattern,e))try{return await s.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new s.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new s.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=d.get(e);return r&&await g.add(r),r}function f(e){if(!o.test(e))return null;const t=o.exec(e);if(null===t)return null;const[,r,s]=t,i=r+(s?"-"+s.toUpperCase():"");return l(i)?i:l(r)?r:null}function m(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,n.Ze)((()=>{d.clear()}));const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,i.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18848:(e,t,r)=>{"use strict";r.d(t,{sh:()=>l,uf:()=>h});var s=r(70586),i=r(70171);const n={ar:"ar-u-nu-latn"};let o=new WeakMap,a={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||a;if(!o.has(t)){const r=(0,i.Kd)(),s=n[(0,i.Kd)()]||r;o.set(t,new Intl.NumberFormat(s,e))}return(0,s.j0)(o.get(t))}(t).format(e)}(0,i.Ze)((()=>{o=new WeakMap,a={}}))},940:(e,t,r)=>{"use strict";r.d(t,{n:()=>h});var s=r(92604),i=r(78286),n=r(19153),o=r(90344),a=r(18848);const l=s.Z.getLogger("esri.intl.substitute");function h(e,t,r={}){const{format:s={}}=r;return(0,n.gx)(e,(e=>function(e,t,r){let s,n;const o=e.indexOf(":");if(-1===o?s=e.trim():(s=e.slice(0,o).trim(),n=e.slice(o+1).trim()),!s)return"";const a=(0,i.hS)(s,t);if(null==a)return"";const l=(n?r?.[n]:null)??r?.[s];return l?d(a,l):n?c(a,n):u(a)}(e,t,s)))}function d(e,t){switch(t.type){case"date":return(0,o.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),u(e)}}function c(e,t){switch(t.toLowerCase()){case"dateformat":return(0,o.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,o.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):u(e)}}function u(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,o.p6)(e):""}}}}]);