@arcgis/core 4.34.0-next.7 → 4.34.0-next.9

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 (363) hide show
  1. package/Map.js +1 -1
  2. package/applications/ExperienceBuilder/sketchUtils.d.ts +1 -0
  3. package/applications/ExperienceBuilder/sketchUtils.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{feaf79b69d2e2a1f2aa2.js → 06877ea5b9df7de89aff.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{44db659fd4e711f8e22f.js → 076f830d6d0337dfce9d.js} +1 -1
  7. package/assets/esri/core/workers/chunks/09907c9ff597df9bc954.js +1 -0
  8. package/assets/esri/core/workers/chunks/0dbb350ce651bc236ec8.js +1 -0
  9. package/assets/esri/core/workers/chunks/0ed4ec00ef16aa58a33d.js +1 -0
  10. package/assets/esri/core/workers/chunks/{0624ae07d3af8d5f1ac8.js → 15b3eb60f86954783fab.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b845586219f284a215b2.js → 1db026cc25338dbc208e.js} +1 -1
  12. package/assets/esri/core/workers/chunks/21de4516bf5c9630edfd.js +1 -0
  13. package/assets/esri/core/workers/chunks/2254989ca3ff3960f2fe.js +1 -0
  14. package/assets/esri/core/workers/chunks/248a198f97871a8d6dd6.js +1 -0
  15. package/assets/esri/core/workers/chunks/2dbd18df5c691c8d0a61.js +1 -0
  16. package/assets/esri/core/workers/chunks/2e1ceff3f88a6c78dfa2.js +1 -0
  17. package/assets/esri/core/workers/chunks/{847e88e1d6da1e74cdc8.js → 2ecc1057d53e0b4a60b7.js} +1 -1
  18. package/assets/esri/core/workers/chunks/3025e420e13e2bc8c0a1.js +1 -0
  19. package/assets/esri/core/workers/chunks/32537e2b014bc3d82f5c.js +346 -0
  20. package/assets/esri/core/workers/chunks/34f55bb89ddf26b10260.js +1 -0
  21. package/assets/esri/core/workers/chunks/355ab428a04ee9fcf888.js +1 -0
  22. package/assets/esri/core/workers/chunks/{28e31ac00dc95a1318e9.js → 3916879b9ca8c6979011.js} +1 -1
  23. package/assets/esri/core/workers/chunks/3a74654fa539f78ceb86.js +1 -0
  24. package/assets/esri/core/workers/chunks/3bec10a4f01757590c1c.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a4c108e913d2dc0edc7b.js → 4088f4c25a09932a3eb1.js} +1 -1
  26. package/assets/esri/core/workers/chunks/427318722815bef1496b.js +1 -0
  27. package/assets/esri/core/workers/chunks/4c3bd6cc0badb78c7112.js +1 -0
  28. package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +1 -0
  29. package/assets/esri/core/workers/chunks/5222523fff30d07f88de.js +1 -0
  30. package/assets/esri/core/workers/chunks/{412eef58cb0d24826375.js → 52c34d6ecd9d45a33e69.js} +1 -1
  31. package/assets/esri/core/workers/chunks/539541dec5fcf3b657aa.js +1 -0
  32. package/assets/esri/core/workers/chunks/53e8c061f36516c3c3e4.js +1 -0
  33. package/assets/esri/core/workers/chunks/{ca76950d81ab4ebb65e1.js → 58f403f956b7b3467344.js} +1 -1
  34. package/assets/esri/core/workers/chunks/5a01bd7a9ee24be7bac4.js +1 -0
  35. package/assets/esri/core/workers/chunks/5bfcb3d87380e7f85b08.js +1 -0
  36. package/assets/esri/core/workers/chunks/5d3246b8fc50f9d9e2c4.js +1 -0
  37. package/assets/esri/core/workers/chunks/{4dd0a5f327fa5fc7249d.js → 5ef1095842e21090f1f4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/614bc3f05873b37af091.js +1 -0
  39. package/assets/esri/core/workers/chunks/6194636638b0439fccd8.js +1 -0
  40. package/assets/esri/core/workers/chunks/66e4cb2479bed1384ed5.js +1 -0
  41. package/assets/esri/core/workers/chunks/6b0ae9ccdd1acef5b5b4.js +1 -0
  42. package/assets/esri/core/workers/chunks/7112b092d98172b7db8b.js +1 -0
  43. package/assets/esri/core/workers/chunks/72ea996b03932c0f004f.js +1 -0
  44. package/assets/esri/core/workers/chunks/74d18c22fa1c178bd9df.js +1 -0
  45. package/assets/esri/core/workers/chunks/766e08d0c56b2b31b63b.js +1 -0
  46. package/assets/esri/core/workers/chunks/77dbb1d5d5e1a6ced932.js +1 -0
  47. package/assets/esri/core/workers/chunks/{bd7b54db7fd278b15500.js → 7a2189614f2dad49ffcd.js} +1 -1
  48. package/assets/esri/core/workers/chunks/7ae88c141a5d85e5bb88.js +1 -0
  49. package/assets/esri/core/workers/chunks/7aef81778155be373d3e.js +1 -0
  50. package/assets/esri/core/workers/chunks/7e1906d35a764f7f10b0.js +1 -0
  51. package/assets/esri/core/workers/chunks/80777a9db53bee2ad8a8.js +1 -0
  52. package/assets/esri/core/workers/chunks/8249b5de5c15461a6787.js +1 -0
  53. package/assets/esri/core/workers/chunks/8385c13ac10e595374cb.js +1 -0
  54. package/assets/esri/core/workers/chunks/83db8bd42f94f97c7cf1.js +1 -0
  55. package/assets/esri/core/workers/chunks/87623ebe32c6ae9cb223.js +1 -0
  56. package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +1 -0
  57. package/assets/esri/core/workers/chunks/8b86c75426c55b29ebed.js +1 -0
  58. package/assets/esri/core/workers/chunks/8c4b26d86483646c70d2.js +1 -0
  59. package/assets/esri/core/workers/chunks/9cb242dfc3765b590f51.js +1 -0
  60. package/assets/esri/core/workers/chunks/9ddb0b07be31c3747238.js +1 -0
  61. package/assets/esri/core/workers/chunks/9f0f1472f36b42c507d1.js +1 -0
  62. package/assets/esri/core/workers/chunks/{f840e1655c4f6b6630be.js → 9f964467f7353039dd9c.js} +19 -19
  63. package/assets/esri/core/workers/chunks/9fe62638dc7dce466612.js +1 -0
  64. package/assets/esri/core/workers/chunks/a2e9141ff4efd13413a1.js +66 -0
  65. package/assets/esri/core/workers/chunks/adf6982e2d8102669cdf.js +1 -0
  66. package/assets/esri/core/workers/chunks/{d9b2263e0a9f9068ab62.js → b6c3a2d93a59df9a1418.js} +1 -1
  67. package/assets/esri/core/workers/chunks/b763292829aa4d3fab60.js +1 -0
  68. package/assets/esri/core/workers/chunks/ba015f4f72714820a12f.js +1 -0
  69. package/assets/esri/core/workers/chunks/bbbd58b02a3ee8fe595e.js +1 -0
  70. package/assets/esri/core/workers/chunks/c3d95f7f4370486eed2c.js +1 -0
  71. package/assets/esri/core/workers/chunks/c3df693d1bce8f189fa2.js +1 -0
  72. package/assets/esri/core/workers/chunks/{6993a59cbb78bc26f029.js → c45a314ace9725aa250e.js} +1 -1
  73. package/assets/esri/core/workers/chunks/c96fed4889712f5a9135.js +1 -0
  74. package/assets/esri/core/workers/chunks/c9fbada1e84981784f6c.js +1 -0
  75. package/assets/esri/core/workers/chunks/cefcecbeef4f0a46f58c.js +1 -0
  76. package/assets/esri/core/workers/chunks/d2317b87aa2ac3ad97a6.js +1 -0
  77. package/assets/esri/core/workers/chunks/{0bbb38f59f37c51c72f0.js → d45a4e5806a80b69ceec.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{7a23dc625a812a562c21.js → d5f770302dc686e55ba7.js} +1 -1
  79. package/assets/esri/core/workers/chunks/dc14507cfc052faa5890.js +1 -0
  80. package/assets/esri/core/workers/chunks/e7a440476cd1eb4c6547.js +1 -0
  81. package/assets/esri/core/workers/chunks/ede9738ac20e7dd5ce63.js +1 -0
  82. package/assets/esri/core/workers/chunks/eec034d88db320880133.js +1 -0
  83. package/assets/esri/core/workers/chunks/f1e87720b425d7fb348a.js +1 -0
  84. package/assets/esri/core/workers/chunks/f2863c501d62dece5fdd.js +1 -0
  85. package/assets/esri/core/workers/chunks/f5741d09fd4e1809f580.js +1 -0
  86. package/assets/esri/core/workers/chunks/f9e1b73976027e17cd03.js +1 -0
  87. package/assets/esri/core/workers/chunks/fd207a40faf882d3b2a3.js +1 -0
  88. package/assets/esri/core/workers/chunks/fe3832107278244dc04d.js +1 -0
  89. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  90. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  91. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  92. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  93. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  94. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  95. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  96. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  97. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  98. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  99. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  100. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  101. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  102. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  103. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  104. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  105. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  106. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  107. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  108. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  109. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  110. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  111. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  112. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  113. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  114. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  115. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  116. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  117. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  118. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  119. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  120. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  121. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  122. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  123. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  124. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  125. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  126. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  127. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  128. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  129. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  130. package/chunks/aiServices.js +1 -1
  131. package/config.js +1 -1
  132. package/core/workers/Connection.js +1 -1
  133. package/core/workers/RemoteClient.js +1 -1
  134. package/core/workers/WorkerHandle.js +1 -1
  135. package/effects/FocusArea.d.ts +4 -0
  136. package/effects/FocusArea.js +1 -1
  137. package/effects/FocusAreaOutline.d.ts +4 -0
  138. package/effects/FocusAreaOutline.js +1 -1
  139. package/effects/FocusAreas.d.ts +4 -0
  140. package/effects/FocusAreas.js +1 -1
  141. package/geometry.js +1 -1
  142. package/interfaces.d.ts +319 -43
  143. package/kernel.js +1 -1
  144. package/layers/BuildingSceneLayer.js +1 -1
  145. package/layers/GroupLayer.js +1 -1
  146. package/layers/ImageryLayer.js +1 -1
  147. package/layers/ImageryTileLayer.js +1 -1
  148. package/layers/VideoLayer.js +1 -1
  149. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  150. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  151. package/layers/graphics/editingSupport.js +1 -1
  152. package/layers/mixins/ImageryTileMixin.js +1 -1
  153. package/layers/mixins/operationalLayerModuleMap.js +1 -1
  154. package/layers/mixins/operationalLayers.js +1 -1
  155. package/layers/support/BuildingSummaryStatistics.js +1 -1
  156. package/layers/support/PromiseQueue.js +1 -1
  157. package/layers/support/TelemetryDisplay.js +1 -1
  158. package/layers/support/TitleCreator.js +1 -1
  159. package/layers/support/arcgisLayers.js +1 -1
  160. package/layers/support/featurePopupQueryUtils.js +5 -0
  161. package/layers/support/fieldUtils.js +1 -1
  162. package/layers/support/layersCreator.js +1 -1
  163. package/layers/support/multiLayerServiceUtils.js +5 -0
  164. package/networks/CircuitManager.js +1 -1
  165. package/networks/UnitIdentifierManager.js +1 -1
  166. package/networks/UtilityNetwork.js +1 -1
  167. package/networks/support/UNTraceConfiguration.js +1 -1
  168. package/networks/support/typeUtils.js +1 -1
  169. package/package.json +1 -1
  170. package/portal/PortalItem.js +1 -1
  171. package/portal/support/layersLoader.js +1 -1
  172. package/portal/support/portalLayers.js +1 -1
  173. package/rasterRenderers.js +1 -1
  174. package/renderers.js +1 -1
  175. package/rest/featureService/FeatureService.js +1 -1
  176. package/rest/locator/locationToAddress.js +1 -1
  177. package/rest/networks/circuits/queryCircuits.js +1 -1
  178. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  179. package/rest/networks/support/CircuitTraceResult.js +5 -0
  180. package/rest/networks/support/TraceResult.js +1 -1
  181. package/rest/networks/unitIdentifiers/support/{QueryUnitIdentifiersParamters.js → QueryUnitIdentifiersParameters.js} +1 -1
  182. package/rest/support/LocationToAddressParameters.js +1 -1
  183. package/rest/support/geocodeEnums.js +5 -0
  184. package/support/revision.js +1 -1
  185. package/symbols/cim/animationUtils.js +1 -1
  186. package/symbols/cim/cimAnalyzer.js +1 -1
  187. package/symbols/cim/defaultCIMValues.js +1 -1
  188. package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
  189. package/symbols/cim/utils.js +1 -1
  190. package/symbols/support/cimSymbolUtils.js +1 -1
  191. package/symbols/support/previewCIMSymbol.js +1 -1
  192. package/symbols.js +1 -1
  193. package/views/2d/engine/webgl/animations/infos.js +1 -1
  194. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  195. package/views/2d/engine/webgl/animations/utils.js +1 -1
  196. package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
  197. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
  198. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +1 -1
  199. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +5 -0
  200. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +5 -0
  201. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +5 -0
  202. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +5 -0
  203. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +5 -0
  206. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechniques.js +5 -0
  208. package/views/2d/engine/webgl/shaderGraph/techniques/animated/ComputedAnimatedParams.js +5 -0
  209. package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +5 -0
  210. package/views/2d/engine/webgl/shaderGraph/techniques/animated/enums.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  213. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  214. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
  215. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  216. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  217. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  218. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  219. package/views/2d/layers/MediaLayerView2D.js +1 -1
  220. package/views/2d/layers/TileLayerView2D.js +1 -1
  221. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  222. package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
  223. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  224. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  225. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  226. package/views/3d/layers/I3SMeshView3D.js +1 -1
  227. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  228. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  229. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  230. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  231. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  232. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  233. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  234. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  235. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  236. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  237. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  238. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  239. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  240. package/views/3d/terrain/OverlayRenderer.js +1 -1
  241. package/views/3d/terrain/TerrainRenderer.js +1 -1
  242. package/views/3d/terrain/TerrainSurface.js +1 -1
  243. package/views/3d/terrain/TileRenderer.js +1 -1
  244. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  245. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  246. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  247. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  248. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  249. package/views/SelectionManager.js +1 -1
  250. package/views/VideoView.js +1 -1
  251. package/views/draw/support/GraphicMover.js +1 -1
  252. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  253. package/views/layers/FeatureLayerView.js +1 -1
  254. package/views/layers/ImageryLayerView.js +1 -1
  255. package/views/layers/ImageryTileLayerView.js +1 -1
  256. package/views/layers/PointCloudLayerView.js +1 -1
  257. package/views/support/TextureCompressionTracker.js +5 -0
  258. package/views/webgl/Texture.js +1 -1
  259. package/webdoc/support/writeUtils.js +1 -1
  260. package/webmap/utils.js +1 -1
  261. package/widgets/Attachments.js +1 -1
  262. package/widgets/BatchAttributeForm.js +1 -1
  263. package/widgets/Directions/DirectionsVisibleElements.js +1 -1
  264. package/widgets/Directions.js +1 -1
  265. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  266. package/widgets/Editor/EditorViewModel.js +1 -1
  267. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  268. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  269. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  270. package/widgets/Editor/workflowUtils.js +1 -1
  271. package/widgets/Expand.js +1 -1
  272. package/widgets/Feature/support/featureUtils.js +1 -1
  273. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  274. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  275. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  276. package/widgets/FeatureForm.js +1 -1
  277. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  278. package/widgets/Features/FeaturesViewModel.js +1 -1
  279. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  280. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  281. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  282. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  283. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  284. package/widgets/OrientedImageryViewer/videoViewerUtils.js +5 -0
  285. package/widgets/OrientedImageryViewer.js +1 -1
  286. package/widgets/Search/LocatorSearchSource.js +1 -1
  287. package/widgets/Search/SearchSource.js +1 -1
  288. package/widgets/Search/SearchViewModel.js +1 -1
  289. package/widgets/Search/support/locatorUtils.js +1 -1
  290. package/widgets/Sketch.js +1 -1
  291. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  292. package/widgets/support/SelectionToolbar.js +1 -1
  293. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  294. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  295. package/assets/esri/core/workers/chunks/003ddb190a5cc56f7925.js +0 -1
  296. package/assets/esri/core/workers/chunks/03db109e9b695528c35d.js +0 -1
  297. package/assets/esri/core/workers/chunks/09da6b3085fc84cd69d5.js +0 -1
  298. package/assets/esri/core/workers/chunks/0a770f283eb77c8dc97a.js +0 -1
  299. package/assets/esri/core/workers/chunks/0b70b2ee62904318a12c.js +0 -1
  300. package/assets/esri/core/workers/chunks/0c2dccec20c0994366fe.js +0 -1
  301. package/assets/esri/core/workers/chunks/0d78fc2c2bc1152f84db.js +0 -1
  302. package/assets/esri/core/workers/chunks/0fb5de3f8a4d69b2d514.js +0 -1
  303. package/assets/esri/core/workers/chunks/17e43a050fbf8dc87588.js +0 -1
  304. package/assets/esri/core/workers/chunks/1d7f2abfccc54659d6f2.js +0 -1
  305. package/assets/esri/core/workers/chunks/1f9c6fbcd4d0eae1e574.js +0 -1
  306. package/assets/esri/core/workers/chunks/22e53cb1c8c575fa4d46.js +0 -1
  307. package/assets/esri/core/workers/chunks/2cf82d3645c75d311e99.js +0 -1
  308. package/assets/esri/core/workers/chunks/2d90806faa4269828948.js +0 -1
  309. package/assets/esri/core/workers/chunks/377a7f0f7d304ff9fe5b.js +0 -1
  310. package/assets/esri/core/workers/chunks/3bf1cf6c3cba172e2f6d.js +0 -1
  311. package/assets/esri/core/workers/chunks/3d7eedb787c1e3b9fbfc.js +0 -1
  312. package/assets/esri/core/workers/chunks/3fe7be535affae31de7e.js +0 -1
  313. package/assets/esri/core/workers/chunks/417293f00b2c21cc3175.js +0 -1
  314. package/assets/esri/core/workers/chunks/41cbba9b286cf5558a9c.js +0 -1
  315. package/assets/esri/core/workers/chunks/42bb9bb6fe44a47d9b81.js +0 -1
  316. package/assets/esri/core/workers/chunks/465f2db4ab8aa9c9f907.js +0 -1
  317. package/assets/esri/core/workers/chunks/4ca0738ed38c15b68a77.js +0 -1
  318. package/assets/esri/core/workers/chunks/515e3295495d0958db7e.js +0 -1
  319. package/assets/esri/core/workers/chunks/51ba7345c31e6eb79060.js +0 -1
  320. package/assets/esri/core/workers/chunks/5200be8bce60fa831026.js +0 -1
  321. package/assets/esri/core/workers/chunks/52a57106a41b8c9483d7.js +0 -1
  322. package/assets/esri/core/workers/chunks/536d7986ebb710a8a452.js +0 -1
  323. package/assets/esri/core/workers/chunks/5617532299f73d186968.js +0 -1
  324. package/assets/esri/core/workers/chunks/56d2a20c1b143697aa19.js +0 -1
  325. package/assets/esri/core/workers/chunks/5890740d5a761b038560.js +0 -1
  326. package/assets/esri/core/workers/chunks/5dbd8d81d94cfda5bb32.js +0 -1
  327. package/assets/esri/core/workers/chunks/5e1f7fe6bbc5754efee1.js +0 -1
  328. package/assets/esri/core/workers/chunks/61f9747c960d959b571b.js +0 -346
  329. package/assets/esri/core/workers/chunks/74182421ba425720dc7f.js +0 -1
  330. package/assets/esri/core/workers/chunks/74c0db9e3a62e9839b23.js +0 -1
  331. package/assets/esri/core/workers/chunks/7b12607633bbdc318936.js +0 -1
  332. package/assets/esri/core/workers/chunks/86023cc5ccbc7ac43479.js +0 -1
  333. package/assets/esri/core/workers/chunks/87eca6de502d18d8b7eb.js +0 -1
  334. package/assets/esri/core/workers/chunks/8aa8f9986b966ccb64e2.js +0 -1
  335. package/assets/esri/core/workers/chunks/8d14e957219364a81d5f.js +0 -66
  336. package/assets/esri/core/workers/chunks/937b653b10e8704b38bf.js +0 -1
  337. package/assets/esri/core/workers/chunks/98ef17d15517368d2383.js +0 -1
  338. package/assets/esri/core/workers/chunks/9cac00d4bfac14aaae12.js +0 -1
  339. package/assets/esri/core/workers/chunks/a0c35521e677459f6fa3.js +0 -1
  340. package/assets/esri/core/workers/chunks/a32dcd5bc4680374d30c.js +0 -1
  341. package/assets/esri/core/workers/chunks/aaa6d45316a7d3466d0f.js +0 -1
  342. package/assets/esri/core/workers/chunks/ae733c963d61065faa54.js +0 -1
  343. package/assets/esri/core/workers/chunks/b2a6afa0cd537805b4b8.js +0 -1
  344. package/assets/esri/core/workers/chunks/bf9b6b74654d303a6dae.js +0 -1
  345. package/assets/esri/core/workers/chunks/c6580fdcdc33153008b0.js +0 -1
  346. package/assets/esri/core/workers/chunks/c779335f5d5455c77a62.js +0 -1
  347. package/assets/esri/core/workers/chunks/c77cfd8790877393353a.js +0 -1
  348. package/assets/esri/core/workers/chunks/c9ab067b07d1eab974d1.js +0 -1
  349. package/assets/esri/core/workers/chunks/d3c0d7799c92c6f0e7d3.js +0 -1
  350. package/assets/esri/core/workers/chunks/d52f5214a0330ed2e05e.js +0 -1
  351. package/assets/esri/core/workers/chunks/dbe10c20df7e0e563a0b.js +0 -1
  352. package/assets/esri/core/workers/chunks/df7ca2fe12e22ccfde17.js +0 -1
  353. package/assets/esri/core/workers/chunks/df933eac03dc63064723.js +0 -1
  354. package/assets/esri/core/workers/chunks/e89345c7af9d3d4d8452.js +0 -1
  355. package/assets/esri/core/workers/chunks/ee6240636d04d7d37b7b.js +0 -1
  356. package/assets/esri/core/workers/chunks/ef7955a2509be0f03ca2.js +0 -1
  357. package/assets/esri/core/workers/chunks/f1c6df5cf2ccb6ac47a1.js +0 -1
  358. package/assets/esri/core/workers/chunks/f3d97a4c4f433adbdab5.js +0 -1
  359. package/assets/esri/core/workers/chunks/fc0a3db3d6d26c763fb9.js +0 -1
  360. package/assets/esri/core/workers/chunks/fd4c020297badcb81947.js +0 -1
  361. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerTechnique.js +0 -5
  362. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedShader.js +0 -5
  363. package/views/support/TextureCompressionHandle.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const e={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},r={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},a={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},S={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,Object3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":e,"web-map/basemap":r,"web-map/tables":a,"link-chart/operational-layers":{...e,LinkChartLayer:!0},"link-chart/basemap":r,"link-chart/tables":a,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0,WCS:!0},"portal-item/tables":{ArcGISFeatureLayer:!0,SubtypeGroupTable:!0}};export{S as supportedTypes};
5
+ const e={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,ArcGISVideoLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},r={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},a={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},S={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,Object3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":e,"web-map/basemap":r,"web-map/tables":a,"link-chart/operational-layers":{...e,LinkChartLayer:!0},"link-chart/basemap":r,"link-chart/tables":a,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0,WCS:!0},"portal-item/tables":{ArcGISFeatureLayer:!0,SubtypeGroupTable:!0}};export{S as supportedTypes};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../request.js";import t from"../../core/JSONSupport.js";import s from"../../core/Loadable.js";import o from"../../core/Logger.js";import i from"../../core/Promise.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";let p=class extends t{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};e([l({type:String})],p.prototype,"fieldName",void 0),e([l({type:String})],p.prototype,"modelName",void 0),e([l({type:String})],p.prototype,"label",void 0),e([l({type:Number})],p.prototype,"min",void 0),e([l({type:Number})],p.prototype,"max",void 0),e([l({json:{read:e=>Array.isArray(e)&&(e.every((e=>"string"==typeof e))||e.every((e=>"number"==typeof e)))?e.slice():null}})],p.prototype,"mostFrequentValues",void 0),e([l({type:[Number]})],p.prototype,"subLayerIds",void 0),p=e([a("esri.layers.support.BuildingSummaryStatistics.BuildingFieldStatistics")],p);let n=class extends(s.LoadableMixin(i.EsriPromiseMixin(t))){constructor(){super(...arguments),this.url=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(o.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(r)),Promise.resolve(this)}async _fetchService(e){const t=(await r(this.url,{query:{f:"json"},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};e([l({constructOnly:!0,type:String})],n.prototype,"url",void 0),e([l({readOnly:!0,type:[p],json:{read:{source:"summary"}}})],n.prototype,"fields",null),n=e([a("esri.layers.support.BuildingSummaryStatistics")],n);export{n as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../request.js";import r from"../../core/JSONSupport.js";import s from"../../core/Loadable.js";import o from"../../core/Logger.js";import i from"../../core/Promise.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";let p=class extends r{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};t([l({type:String})],p.prototype,"fieldName",void 0),t([l({type:String})],p.prototype,"modelName",void 0),t([l({type:String})],p.prototype,"label",void 0),t([l({type:Number})],p.prototype,"min",void 0),t([l({type:Number})],p.prototype,"max",void 0),t([l({json:{read:t=>Array.isArray(t)&&(t.every((t=>"string"==typeof t))||t.every((t=>"number"==typeof t)))?t.slice():null}})],p.prototype,"mostFrequentValues",void 0),t([l({type:[Number]})],p.prototype,"subLayerIds",void 0),p=t([a("esri.layers.support.BuildingSummaryStatistics.BuildingFieldStatistics")],p);let n=class extends(s.LoadableMixin(i.EsriPromiseMixin(r))){constructor(t){super(t),this.url=null,this.customParameters=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(o.getLogger(this).error("building summary statistics are not loaded"),null)}load(t){const e=null!=t?t.signal:null;return this.addResolvingPromise(this._fetchService(e)),Promise.resolve(this)}async _fetchService(t){const r=(await e(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t})).data;this.read(r,{origin:"service"})}};t([l({constructOnly:!0,type:String})],n.prototype,"url",void 0),t([l({constructOnly:!0})],n.prototype,"customParameters",void 0),t([l({constructOnly:!0})],n.prototype,"apiKey",void 0),t([l({readOnly:!0,type:[p],json:{read:{source:"summary"}}})],n.prototype,"fields",null),n=t([a("esri.layers.support.BuildingSummaryStatistics")],n);export{n as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{isAborted as s,createAbortError as t,isPromiseLike as e}from"../../core/promiseUtils.js";import{signal as r}from"../../core/signal.js";import{Yield as n}from"../../views/support/Yield.js";class i{constructor(){this._tasks=new Array,this._runningTasks=r(0)}get length(){return this._tasks.length}get running(){return this._runningTasks.value>0}destroy(){this.cancelAll()}runTask(s){if(0===this.length)return n;for(;!s.done&&this._process(s);)s.madeProgress()}push(s,t,e){return++this._runningTasks.value,new Promise(((r,n)=>this._tasks.push(new a(r,n,s,t,e)))).finally((()=>--this._runningTasks.value))}unshift(s,t,e){return++this._runningTasks.value,new Promise(((r,n)=>this._tasks.unshift(new a(r,n,s,t,e)))).finally((()=>--this._runningTasks.value))}_process(r){if(0===this._tasks.length)return!1;const n=this._tasks.shift();try{const i=s(n.signal);if(i&&!n.abortCallback)n.reject(t());else{const s=i?n.abortCallback?.(t()):n.callback(r);e(s)?s.then(n.resolve,n.reject):n.resolve(s)}}catch(i){n.reject(i)}return!0}cancelAll(){const s=t();for(const t of this._tasks)if(t.abortCallback){const e=t.abortCallback(s);t.resolve(e)}else t.reject(s);this._tasks.length=0}}class a{constructor(s,t,e,r=void 0,n=void 0){this.resolve=s,this.reject=t,this.callback=e,this.signal=r,this.abortCallback=n}}export{i as PromiseQueue};
5
+ import{isAborted as s,createAbortError as t,isPromiseLike as n}from"../../core/promiseUtils.js";import{signal as e}from"../../core/signal.js";import{Yield as i}from"../../views/support/Yield.js";class r{constructor(){this._tasks=new Array,this._numPendingTasks=e(0),this._running=e(!1)}get length(){return this._tasks.length}get updating(){return this._numPendingTasks.value>0}get running(){return this._running.value}_updateRunning(){this._running.value=this._tasks.length>0}destroy(){this.cancelAll()}runTask(s){if(0===this.length)return i;for(;!s.done&&this._process(s);)s.madeProgress()}push(s,t,n){return new Promise(((e,i)=>{this._tasks.push(new a(e,i,s,t,n)),++this._numPendingTasks.value,this._updateRunning()})).finally((()=>--this._numPendingTasks.value))}unshift(s,t,n){return new Promise(((e,i)=>{this._tasks.unshift(new a(e,i,s,t,n)),++this._numPendingTasks.value,this._updateRunning()})).finally((()=>--this._numPendingTasks.value))}_process(e){if(0===this._tasks.length)return!1;const i=this._tasks.shift();this._updateRunning();try{const r=s(i.signal);if(r&&!i.abortCallback)i.reject(t());else{const s=r?i.abortCallback?.(t()):i.callback(e);n(s)?s.then(i.resolve,i.reject):i.resolve(s)}}catch(r){i.reject(r)}return!0}cancelAll(){const s=t();for(const t of this._tasks)if(t.abortCallback){const n=t.abortCallback(s);t.resolve(n)}else t.reject(s);this._tasks.length=0,this._updateRunning()}}class a{constructor(s,t,n,e=void 0,i=void 0){this.resolve=s,this.reject=t,this.callback=n,this.signal=e,this.abortCallback=i}}export{r as PromiseQueue};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import e from"../../core/Clonable.js";import r from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let p=class extends(e.ClonableMixin(r)){constructor(o){super(o),this.frame=null,this.frameCenter=null,this.frameOutline=null,this.lineOfSight=null,this.sensorLocation=null,this.sensorTrail=null}};o([t({type:Boolean})],p.prototype,"frame",void 0),o([t({type:Boolean})],p.prototype,"frameCenter",void 0),o([t({type:Boolean})],p.prototype,"frameOutline",void 0),o([t({type:Boolean})],p.prototype,"lineOfSight",void 0),o([t({type:Boolean})],p.prototype,"sensorLocation",void 0),o([t({type:Boolean})],p.prototype,"sensorTrail",void 0),p=o([s("esri.layers.support.TelemetryDisplay")],p);export{p as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import r from"../../core/Clonable.js";import e from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";const i={type:Boolean,json:{write:!0}};let p=class extends(r.ClonableMixin(e)){constructor(o){super(o),this.frame=!1,this.frameCenter=!1,this.frameOutline=!0,this.lineOfSight=!0,this.sensorLocation=!0,this.sensorTrail=!0}};o([t(i)],p.prototype,"frame",void 0),o([t(i)],p.prototype,"frameCenter",void 0),o([t(i)],p.prototype,"frameOutline",void 0),o([t(i)],p.prototype,"lineOfSight",void 0),o([t(i)],p.prototype,"sensorLocation",void 0),o([t(i)],p.prototype,"sensorTrail",void 0),p=o([s("esri.layers.support.TelemetryDisplay")],p);export{p as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{createTask as s}from"../../core/asyncUtils.js";import i from"../../core/Collection.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{featureHasFields as o,extractSubstitutionTemplatesFromString as n}from"./fieldUtils.js";import{loadArcade as l}from"../../support/loadArcade.js";const p="relationships/",c="expression/";let d=class extends t{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){if(this.expressionsUsedInTitle.length>0){return this._get("_arcadeTask")||s((()=>l()))}return null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??import("../../widgets/Feature/support/featureUtils.js").then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new i;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const s=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(s.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:s,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(s,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const s of this.calculatedExpressions?.toArray()??[])try{const t=this._arcadeTask.value.arcade.extractFieldLiterals(s.syntax);for(const s of t){const t=s.split("."),i=this.fieldsIndex.get(t.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const s of t){const t=this.fieldsIndex.get(s);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,s){try{const{attributes:i}=t,r=s?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:a}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);if(s.fetchMissingFields&&(t=await this._checkAndReQueryGraphic(e,t)),this.workingTitle&&this.fieldInfoMap){const s=this._createFormattedAttributes(e,t,r).global;return a({attributes:i,expressionAttributes:null,fieldInfoMap:this.fieldInfoMap,globalAttributes:s,layer:e,text:this.workingTitle})}return""}catch{}return""}async _checkAndReQueryGraphic(e,t){const s=t.getObjectId();if(null==s)return t;if(!o(this.requiredFields,t)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[s];const i=await e.queryFeatures(t);if(1===i?.features.length)return i.features[0]}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const s of e){if(!s.fieldName)continue;const e=this.fieldsIndex.get(s.fieldName),i=e?.name??s.fieldName;s.fieldName=i,t.set(i.toLowerCase(),s)}return t}_createFormattedAttributes(e,t,s="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],r={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const s=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{r[`expression/${e.name}`]=e.func({vars:{$feature:s}})}catch{}}const a={...t.attributes,...r};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:a,graphic:t,timeZone:s,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return n(e).filter((e=>!(0===e.indexOf(p)||0===e.indexOf(c))))}};e([r({readOnly:!0})],d.prototype,"_arcadeTask",null),e([r()],d.prototype,"_featureUtils",void 0),e([r({readOnly:!0})],d.prototype,"featureUtilsPromise",null),e([r({readOnly:!0})],d.prototype,"calculatedExpressions",null),e([r()],d.prototype,"displayField",void 0),e([r()],d.prototype,"effectivePopupTemplate",void 0),e([r()],d.prototype,"expressionsUsedInTitle",null),e([r()],d.prototype,"fieldsIndex",void 0),e([r()],d.prototype,"fieldInfoMap",null),e([r()],d.prototype,"fields",void 0),e([r()],d.prototype,"objectIdField",void 0),e([r()],d.prototype,"requiredFields",null),d=e([a("esri.layers.support.TitleCreator")],d);export{d as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{createTask as s}from"../../core/asyncUtils.js";import i from"../../core/Collection.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{featureHasFields as o,extractSubstitutionTemplatesFromString as n}from"./fieldUtils.js";import{loadArcade as l}from"../../support/loadArcade.js";const p="relationships/",c="expression/";let d=class extends t{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){if(this.expressionsUsedInTitle.length>0){return this._get("_arcadeTask")||s((()=>l()))}return null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??import("../../widgets/Feature/support/featureUtils.js").then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new i;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const s=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(s.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:s,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(s,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const s of this.calculatedExpressions?.toArray()??[])try{const t=this._arcadeTask.value.arcade.extractFieldLiterals(s.syntax);for(const s of t){const t=s.split("."),i=this.fieldsIndex.get(t.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const s of t){const t=this.fieldsIndex.get(s);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,s){try{const{attributes:i}=t,r=s?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:a}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);if(s.fetchMissingFields&&(t=await this._checkAndReQueryGraphic(e,t)),this.workingTitle&&this.fieldInfoMap){const s=this._createFormattedAttributes(e,t,r).global;return a({attributes:i,expressionAttributes:null,fieldInfoMap:this.fieldInfoMap,globalAttributes:s,layer:e,text:this.workingTitle})}return""}catch{}return""}async _checkAndReQueryGraphic(e,t){const s=t.getObjectId();if(null==s)return t;if(!o(t,this.requiredFields)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[s];const i=await e.queryFeatures(t);if(1===i?.features.length)return i.features[0]}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const s of e){if(!s.fieldName)continue;const e=this.fieldsIndex.get(s.fieldName),i=e?.name??s.fieldName;s.fieldName=i,t.set(i.toLowerCase(),s)}return t}_createFormattedAttributes(e,t,s="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],r={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const s=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{r[`expression/${e.name}`]=e.func({vars:{$feature:s}})}catch{}}const a={...t.attributes,...r};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:a,graphic:t,timeZone:s,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return n(e).filter((e=>!(0===e.indexOf(p)||0===e.indexOf(c))))}};e([r({readOnly:!0})],d.prototype,"_arcadeTask",null),e([r()],d.prototype,"_featureUtils",void 0),e([r({readOnly:!0})],d.prototype,"featureUtilsPromise",null),e([r({readOnly:!0})],d.prototype,"calculatedExpressions",null),e([r()],d.prototype,"displayField",void 0),e([r()],d.prototype,"effectivePopupTemplate",void 0),e([r()],d.prototype,"expressionsUsedInTitle",null),e([r()],d.prototype,"fieldsIndex",void 0),e([r()],d.prototype,"fieldInfoMap",null),e([r()],d.prototype,"fields",void 0),e([r()],d.prototype,"objectIdField",void 0),e([r()],d.prototype,"requiredFields",null),d=e([a("esri.layers.support.TitleCreator")],d);export{d as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{urlToObject as r,getFilename as a}from"../../core/urlUtils.js";import{parse as t,parseNonStandardSublayerUrl as s}from"./arcgisLayerUrl.js";import{findAssociatedFeatureService as l}from"./associatedFeatureServiceUtils.js";import{getLayerModuleType as o,fetchFeatureService as n}from"./fetchService.js";import{sceneServiceLayerTypeToClassName as c}from"./layerUtils.js";import{layerLookupMap as i}from"./lazyLayerLoader.js";import{fetchArcGISServiceJSON as u}from"../../support/requestPresets.js";const y={FeatureLayer:!0,SceneLayer:!0};async function f(e){const{properties:r,url:a}=e,t={...r,url:a},s=await w(a,r?.customParameters),{Constructor:l,layerId:o,sourceJSON:n,parsedUrl:c,layers:i,tables:u}=s;if(i.length+u.length===0)return null!=o&&(t.layerId=o),null!=n&&(t.sourceJSON=n),new l(t);const y=new(0,(await import("../GroupLayer.js")).default)({title:c.title});return await d(y,s,t),y}function p(e,r){return e?e.find((({id:e})=>e===r)):null}function m(e,r,a,t,s){const l={...s,layerId:r};return null!=e&&(l.url=e),null!=a&&(l.sourceJSON=a),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}async function d(e,r,a){const t=r.sublayerConstructorProvider;for(const{id:s,serverUrl:l}of r.layers){const o=p(r.sublayerInfos,s),n=m(l,s,o,(o&&t?.(o))??r.Constructor,a);e.add(n)}if(r.tables.length){const t=await I("FeatureLayer");r.tables.forEach((({id:s,serverUrl:l})=>{const o=m(l,s,p(r.tableInfos,s),t,a);e.tables.add(o)}))}}async function w(r,a){let s=t(r);if(null==s&&(s=await v(r,a)),null==s)throw new e("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:r});const{serverType:l,sublayer:n}=s;let i;const f={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},p="FeatureServer"===l,m="SceneServer"===l,d={parsedUrl:s,Constructor:null,layerId:p||m?n??void 0:void 0,layers:[],tables:[]};switch(l){case"MapServer":if(null!=n){const{type:t}=await u(r,{customParameters:a});switch(i="FeatureLayer",t){case"Catalog Layer":i="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new e("arcgis-layers:unsupported",`fromUrl() not supported for "${t}" layers`)}}else{i=await L(r,a)?"TileLayer":"MapImageLayer"}break;case"ImageServer":{const e=await u(r,{customParameters:a}),{tileInfo:t,cacheType:s}=e;i=t?"LERC"!==t?.format?.toUpperCase()||s&&"elevation"!==s.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await u(s.url.path,{customParameters:a});if(i="SceneLayer",e){const r=e?.layers;if("Voxel"===e?.layerType)i="VoxelLayer";else if(r?.length){const e=r[0]?.layerType;null!=e&&null!=c[e]&&(i=c[e])}}break}case"3DTilesServer":throw new e("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(i="FeatureLayer",null!=n){const e=await u(r,{customParameters:a});d.sourceJSON=e,i=o(e.type)}break;default:i=f[l]}if(y[i]&&null==n){const e=await b(r,l,a);p&&(d.sublayerInfos=e.layerInfos,d.tableInfos=e.tableInfos);if(1!==e.layers.length+e.tables.length)d.layers=e.layers,d.tables=e.tables,p&&e.layerInfos?.length&&(d.sublayerConstructorProvider=await g(e.layerInfos));else if(p||m){const r=e.layerInfos?.[0]??e.tableInfos?.[0];if(d.layerId=e.layers[0]?.id??e.tables[0]?.id,d.sourceJSON=r,p){const e=r?.type;i=o(e)}}}return d.Constructor=await I(i),d}async function v(e,t){const l=await u(e,{customParameters:t});let o=null,n=null;const c=l.type;if("Feature Layer"===c||"Table"===c?(o="FeatureServer",n=l.id??null):"indexedVector"===c?o="VectorTileServer":l.hasOwnProperty("mapName")?o="MapServer":l.hasOwnProperty("bandCount")&&l.hasOwnProperty("pixelSizeX")?o="ImageServer":l.hasOwnProperty("maxRecordCount")&&l.hasOwnProperty("allowGeometryUpdates")?o="FeatureServer":l.hasOwnProperty("streamUrls")?o="StreamServer":S(l)?(o="SceneServer",n=l.id):l.hasOwnProperty("layers")&&S(l.layers?.[0])&&(o="SceneServer"),!o)return null;const i=null!=n?s(e):null;return{title:null!=i&&l.name||a(e),serverType:o,sublayer:n,url:{path:null!=i?i.serviceUrl:r(e).path}}}function S(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function b(e,r,a){let t,s,l=!1;switch(r){case"FeatureServer":{const r=await n(e,{customParameters:a});l=!!r.layersJSON,t=r.layersJSON||r.serviceJSON;break}case"SceneServer":{const r=await h(e,a);t=r.serviceInfo,s=r.tableServerUrl;break}default:t=await u(e,{customParameters:a})}const o=t?.layers,c=t?.tables;return{layers:o?.map((e=>({id:e.id}))).reverse()||[],tables:c?.map((e=>({serverUrl:s,id:e.id}))).reverse()||[],layerInfos:l?o:[],tableInfos:l?c:[]}}async function h(e,r){const a=await u(e,{customParameters:r}),t=a.layers?.[0];if(!t)return{serviceInfo:a};try{const{serverUrl:t}=await l(e),s=await u(t,{customParameters:r}).catch((()=>null));return s&&(a.tables=s.tables),{serviceInfo:a,tableServerUrl:t}}catch{return{serviceInfo:a}}}async function I(e){return(0,i[e])()}async function L(e,r){return(await u(e,{customParameters:r})).tileInfo}async function g(e){if(!e.length)return;const r=new Set,a=[];for(const{type:l}of e)r.has(l)||(r.add(l),a.push(I(o(l))));const t=await Promise.all(a),s=new Map;return Array.from(r).forEach(((e,r)=>{s.set(e,t[r])})),e=>s.get(e.type)}export{f as fromUrl};
5
+ import e from"../../core/Error.js";import{urlToObject as r,getFilename as a}from"../../core/urlUtils.js";import{parse as t,parseNonStandardSublayerUrl as s}from"./arcgisLayerUrl.js";import{findAssociatedFeatureService as o}from"./associatedFeatureServiceUtils.js";import{getLayerModuleType as l,fetchFeatureService as n}from"./fetchService.js";import{sceneServiceLayerTypeToClassName as c}from"./layerUtils.js";import{layerLookupMap as i}from"./lazyLayerLoader.js";import{fetchArcGISServiceJSON as u}from"../../support/requestPresets.js";const y={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function f(e){const{properties:r,url:a}=e,t={...r,url:a},s=await w(a,r?.customParameters),{Constructor:o,layerId:l,sourceJSON:n,parsedUrl:c,layers:i,tables:u}=s;if(i.length+u.length===0)return null!=l&&(t.layerId=l),null!=n&&(t.sourceJSON=n),new o(t);const y=new(0,(await import("../GroupLayer.js")).default)({title:c.title});return await d(y,s,t),y}function p(e,r){return e?e.find((({id:e})=>e===r)):null}function m(e,r,a,t,s){const o={...s,layerId:r};return null!=e&&(o.url=e),null!=a&&(o.sourceJSON=a),"sublayerTitleMode"in t.prototype&&(o.sublayerTitleMode="service-name"),new t(o)}async function d(e,r,a){const t=r.sublayerConstructorProvider;for(const{id:s,serverUrl:o}of r.layers){const l=p(r.sublayerInfos,s),n=m(o,s,l,(l&&t?.(l))??r.Constructor,a);e.add(n)}if(r.tables.length){const t=await I("FeatureLayer");r.tables.forEach((({id:s,serverUrl:o})=>{const l=m(o,s,p(r.tableInfos,s),t,a);e.tables.add(l)}))}}async function w(r,a){let s=t(r);if(null==s&&(s=await v(r,a)),null==s)throw new e("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:r});const{serverType:o,sublayer:n}=s;let i;const f={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},p="FeatureServer"===o,m="SceneServer"===o,d={parsedUrl:s,Constructor:null,layerId:p||m?n??void 0:void 0,layers:[],tables:[]};switch(o){case"MapServer":if(null!=n){const{type:t}=await u(r,{customParameters:a});switch(i="FeatureLayer",t){case"Catalog Layer":i="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new e("arcgis-layers:unsupported",`fromUrl() not supported for "${t}" layers`)}}else{i=await L(r,a)?"TileLayer":"MapImageLayer"}break;case"ImageServer":{const e=await u(r,{customParameters:a}),{tileInfo:t,cacheType:s}=e;i=t?"LERC"!==t?.format?.toUpperCase()||s&&"elevation"!==s.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await u(s.url.path,{customParameters:a});if(i="SceneLayer",e){const r=e?.layers;if("Voxel"===e?.layerType)i="VoxelLayer";else if(r?.length){const e=r[0]?.layerType;null!=e&&null!=c[e]&&(i=c[e])}}break}case"3DTilesServer":throw new e("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(i="FeatureLayer",null!=n){const e=await u(r,{customParameters:a});d.sourceJSON=e,i=l(e.type)}break;default:i=f[o]}if(y[i]&&null==n){const e=await b(r,o,a);p&&(d.sublayerInfos=e.layerInfos,d.tableInfos=e.tableInfos);if(1!==e.layers.length+e.tables.length)d.layers=e.layers,d.tables=e.tables,p&&e.layerInfos?.length&&(d.sublayerConstructorProvider=await g(e.layerInfos));else if(p||m){const r=e.layerInfos?.[0]??e.tableInfos?.[0];if(d.layerId=e.layers[0]?.id??e.tables[0]?.id,d.sourceJSON=r,p){const e=r?.type;i=l(e)}}}return d.Constructor=await I(i),d}async function v(e,t){const o=await u(e,{customParameters:t});let l=null,n=null;const c=o.type;if("Feature Layer"===c||"Table"===c?(l="FeatureServer",n=o.id??null):"indexedVector"===c?l="VectorTileServer":o.hasOwnProperty("mapName")?l="MapServer":o.hasOwnProperty("bandCount")&&o.hasOwnProperty("pixelSizeX")?l="ImageServer":o.hasOwnProperty("maxRecordCount")&&o.hasOwnProperty("allowGeometryUpdates")?l="FeatureServer":o.hasOwnProperty("streamUrls")?l="StreamServer":S(o)?(l="SceneServer",n=o.id):o.hasOwnProperty("layers")&&S(o.layers?.[0])&&(l="SceneServer"),!l)return null;const i=null!=n?s(e):null;return{title:null!=i&&o.name||a(e),serverType:l,sublayer:n,url:{path:null!=i?i.serviceUrl:r(e).path}}}function S(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function b(e,r,a){let t,s,o=!1;switch(r){case"FeatureServer":{const r=await n(e,{customParameters:a});o=!!r.layersJSON,t=r.layersJSON||r.serviceJSON;break}case"SceneServer":{const r=await h(e,a);t=r.serviceInfo,s=r.tableServerUrl;break}default:t=await u(e,{customParameters:a})}const l=t?.layers,c=t?.tables;return{layers:l?.map((e=>({id:e.id}))).reverse()||[],tables:c?.map((e=>({serverUrl:s,id:e.id}))).reverse()||[],layerInfos:o?l:[],tableInfos:o?c:[]}}async function h(e,r){const a=await u(e,{customParameters:r}),t=a.layers?.[0];if(!t)return{serviceInfo:a};try{const{serverUrl:t}=await o(e),s=await u(t,{customParameters:r}).catch((()=>null));return s&&(a.tables=s.tables),{serviceInfo:a,tableServerUrl:t}}catch{return{serviceInfo:a}}}async function I(e){return(0,i[e])()}async function L(e,r){return(await u(e,{customParameters:r})).tileInfo}async function g(e){if(!e.length)return;const r=new Set,a=[];for(const{type:o}of e)r.has(o)||(r.add(o),a.push(I(l(o))));const t=await Promise.all(a),s=new Map;return Array.from(r).forEach(((e,r)=>{s.set(e,t[r])})),e=>s.get(e.type)}export{f as fromUrl};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{throwIfAborted as e}from"../../core/promiseUtils.js";import{sqlAnd as t}from"../../core/sql.js";import{unpackFieldNames as o,featureHasFields as i}from"./fieldUtils.js";import{loadArcade as n}from"../../support/loadArcade.js";async function s(n,s,l,u){const c=new Array(s.length),a=new Map,d=new Map,p=o(n.fieldsIndex,l.outFields),f=u?.hasRequiredFields??i;for(let t=0;t<s.length;t++){const o=s[t];if(o.isAggregate){c[t]=o;continue}let i=!1;if(u?.getPopupTemplate){const t=o.origin?.layer??o.sourceLayer??o.layer,n=u.getPopupTemplate(t);if(null==n)continue;const s=await r(n);e(u),i=s&&s.arcadeUtils.hasGeometryOperations(n)}if(i||!f(o,p)){const e=o.getObjectId();if(null!=e){a.set(e,{graphic:o,index:t});continue}const i=o.getGlobalId();if(null!=i){d.set(i,{graphic:o,index:t});continue}}c[t]=o}if(!n.queryFeatures||0===a.size&&0===d.size)return c.filter(Boolean);const g=[],y=(e,t)=>{t&&(e.outFields??=[],e.outFields.includes(t)||e.outFields.push(t))};if(a.size>0){const e=l.clone();y(e,n.objectIdField),"uniqueIdFields"in n&&n.uniqueIdFields?.length&&(e.outFields??=[],e.outFields.push(...n.uniqueIdFields)),e.objectIds=Array.from(a.keys()),g.push({type:"object-id",query:e,map:a})}const m="globalIdField"in n?n.globalIdField:null;if(null!=m&&d.size>0){const e=l.clone();y(e,m);const o=Array.from(d.keys());e.where=t(l.where,`${m} IN (${o.map((e=>`'${e}'`)).join(",")})`),g.push({type:"global-id",query:e,map:d})}const b=u?.updateSourceAttributes??!1;for(const{type:e,query:t,map:o}of g)try{const i=await n.queryFeatures(t,u);for(const t of i.features){const i="object-id"===e?t.getObjectId():t.getGlobalId();if(null==i)continue;const n=o.get(i);if(!n)continue;const{graphic:s,index:r}=n;if(b&&t.attributes){s.attributes??={};for(const e of p)e in t.attributes&&(s.attributes[e]=t.attributes[e])}const{geometry:l,origin:u}=s;t.geometry||=l,t.origin=u,c[r]=t}}catch{}return c.filter(Boolean)}async function r(e){if(e.expressionInfos?.length||Array.isArray(e.content)&&e.content.some((e=>"expression"===e.type)))return n()}export{s as fetchFeaturePopupFeatures,r as loadFeaturePopupArcadeModules};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{DomainValidationError as l,getDomainRange as o}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as s}from"../../support/arcadeExpressionUtils.js";import{isStringOrNull as a,isString as u}from"../../support/guards.js";import{loadArcade as f}from"../../support/loadArcade.js";const c=/^([0-9_])/,d=/[^a-z0-9_\u0080-\uffff]+/gi;function p(e){if(null==e)return null;return e.trim().replaceAll(d,"_").replace(c,"F$1")||null}const m=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],y=["field","normalizationField"];function g(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(F(m,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)F(y,e,n)}function F(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function I(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const b=new Set;function w(e,n){return e&&n?(b.clear(),T(b,e,n),Array.from(b).sort()):[]}function T(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)x(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function x(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function h(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}function E(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=w(e,n);return t.length/e.fields.length>=i?["*"]:t}async function A(e,n,i){if(!i)return;let t;const r=s(i);if(r)t=[r];else{const{arcadeUtils:e}=await f();t=e.extractFieldNames(i,n?.fields?.map((e=>e.name)))}for(const l of t)x(e,n,l)}async function _(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});T(n,i,l.fieldNames)}}function v({displayField:e,fields:n}){return e||(n?.length?N(n,"name-or-title")||N(n,"unique-identifier")||N(n,"type-or-category")||S(n):null)}function S(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function N(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function $(e){if(!e)return[];const n=new Set;return await L(n,e),Array.from(n).sort()}async function L(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function O(e,n,i){i.onStatisticExpression?A(e,n,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function D(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(V(e,n,r)),i.fields&&t.push(...i.fields.map((async i=>O(e,n.fieldsIndex,i)))),await Promise.all(t)}async function M(e,n){const{fieldsIndex:i,trackInfo:t}=n;if(!n||!t||!i)return;const r=[t.latestObservations.renderer?.collectRequiredFields(e,i),t.previousObservations.renderer?.collectRequiredFields(e,i),t.trackLines.renderer?.collectRequiredFields(e,i)];t.popupTemplate&&r.push(V(e,n,t.popupTemplate));for(const l of[t.latestObservations.labelingInfo,t.previousObservations.labelingInfo,t.trackLines.labelingInfo])if(l)for(const n of l)r.push(Z(e,i,n));await Promise.all(r)}async function V(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map((i=>A(e,n.fieldsIndex,i.expression))));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(A(e,n.fieldsIndex,l.expressionInfo.expression));await Promise.all(t)}async function R(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&T(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&T(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await _(e,n.fieldsIndex,i.where))}async function j(e,n,i){n&&i&&await Promise.all(i.map((i=>U(e,n,i))))}async function U(e,n,i){n&&i&&(i.valueExpression?await A(e,n.fieldsIndex,i.valueExpression):i.field&&x(e,n.fieldsIndex,i.field))}async function k(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?w(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?w(e.fieldsIndex,Y(e)):[]}function G(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?w(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function P(e,n,i){if(!n||!i)return;const t=n.fieldsIndex;await Promise.all(i.filters.map((n=>_(e,t,n.where))))}const q=new Set(["oid","global-id","guid"]),X=new Set(["oid","global-id"]),z=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/perimeter/i,/objectid/i,/_i$/i];function B(e){const n=new Set;J(e).forEach((e=>n.add(e))),G(e).forEach((e=>n.add(e.toLowerCase())));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(i.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}function Y(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function J(e){return Y(e).map((e=>e.toLowerCase()))}function W(e,n){return e.editable&&!q.has(e.type)&&!J(n).includes(e.name?.toLowerCase()??"")}function H(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||B(n).includes(i)||X.has(e.type)||z.some((e=>e.test(i))))}async function K(e){if(!e)return[];const n=new Set;return await Q(n,e),Array.from(n).sort()}async function Q(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map((n=>Z(e,t,n))))}async function Z(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await A(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{x(e,n,i.slice(1,-1))}))}await _(e,n,r)}function ee(e){const n=e.defaultValue;return void 0!==n&&oe(e,n)?n:e.nullable?null:void 0}function ne(e){const n="string"==typeof e?{type:e}:e;return Fe(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ie(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function te(e){return null===e||ie(e)}function re(e){return null===e||Number.isInteger(e)}function le(){return!0}function oe(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?re:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?te:ie;break;case"string":case"esriFieldTypeString":i=e.nullable?a:u;break;default:i=le}return 1===arguments.length?i:i(n)}const se=["integer","small-integer","big-integer","long"],ae=["single","double"],ue=[...se,...ae],fe=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"],ce=["esriFieldTypeSingle","esriFieldTypeDouble"],de=new Set([...se,...fe]),pe=new Set([...ae,...ce]),me=t(de,pe);function ye(e){return null!=e&&de.has(e.type)}function ge(e){return null!=e&&me.has(e.type)}function Fe(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Ie(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function be(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function we(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function Te(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function xe(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function he(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function Ee(e,n){return null===Se(e,n)}var Ae,_e;function ve(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Se(e,n){return null==e||e.nullable&&null===n?null:oe(e,n)?ge(e)&&!Ne(e.type,Number(n))?Ae.OUT_OF_RANGE:null:_e.INVALID_TYPE}function Ne(e,n){const i="string"==typeof e?Le(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function $e(e,n){const i=o(e,n);return i||(ge(e)?Le(e.type):void 0)}function Le(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return De;case"esriFieldTypeInteger":case"esriFieldTypeLong":case"integer":case"long":return Me;case"esriFieldTypeBigInteger":case"big-integer":return Ve;case"esriFieldTypeSingle":case"single":return Re;case"esriFieldTypeDouble":case"double":return je}}function Oe(e){if(!ie(e))return null;if(Number.isInteger(e)){if(e>=De.min&&e<=De.max)return"esriFieldTypeSmallInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeInteger";if(e>=Ve.min&&e<=Ve.max)return"esriFieldTypeBigInteger"}return e>=Re.min&&e<=Re.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(Ae||(Ae={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(_e||(_e={}));const De={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Me={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Ve={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},Re={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},je={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Ue(e,n,i){switch(e){case l.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case l.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case _e.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case Ae.OUT_OF_RANGE:{const{min:e,max:t}=Le(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function ke(e,n){return!Ce(e,n,null)}function Ce(e,n,i){if(!n?.attributes||!e){if(null!=i)for(const n of e??[])i.add(n);return!0}const t=new Set(Object.keys(n.attributes));let r=!1;for(const l of e)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ge(e,n){const i=new Set;for(const t of n)await A(i,e.fieldsIndex,t);return Array.from(i).sort()}function Pe(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}async function qe(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function Xe(e){const n=e?.match(/{[^}]+}/g);return n?n.map((e=>e.slice(1,-1).split(":")[0].trim())):[]}export{Ae as NumericRangeValidationError,_e as TypeValidationError,Ve as bigIntegerRange,A as collectArcadeFieldNames,P as collectDisplayFilterFields,L as collectElevationFields,D as collectFeatureReductionFields,x as collectField,T as collectFields,R as collectFilterFields,Q as collectLabelingFields,j as collectOrderByInfos,V as collectPopupTemplateFields,M as collectTrackInfoFields,je as doubleRange,Xe as extractSubstitutionTemplatesFromString,ke as featureHasFields,w as fixFields,g as fixRendererFields,I as fixTimeInfoFields,ce as floatJSONTypes,ae as floatTypes,v as getDisplayFieldName,Y as getEditTrackingFields,$ as getElevationFields,Ge as getExpressionFields,C as getFeatureEditFields,G as getFeatureGeometryFields,ne as getFieldDefaultLength,ee as getFieldDefaultValue,$e as getFieldRange,K as getLabelingFields,B as getLowerCaseDefaultHiddenFields,J as getLowerCaseEditTrackingFields,Oe as getNumericTypeForValue,qe as getRendererFields,k as getTimeFields,fe as integerJSONTypes,Me as integerRange,se as integerTypes,Ie as isDateField,be as isDateOnlyField,W as isFieldEditable,H as isFieldVisibleByDefault,he as isGlobalIDField,ye as isIntegerField,Ne as isNumberInRange,ge as isNumericField,xe as isObjectIDField,Pe as isRasterPixelValueField,Fe as isStringField,Te as isTimeOnlyField,we as isTimestampOffsetField,Ee as isValidFieldValue,oe as isValueMatchingFieldType,p as normalizeFieldName,ue as numericTypes,E as packFields,Ce as populateMissingFields,m as rendererFields,ve as sanitizeNullFieldValue,Re as singleRange,De as smallIntegerRange,h as unpackFieldNames,Se as validateFieldValue,Ue as validationErrorToString,y as visualVariableFields};
5
+ import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{DomainValidationError as l,getDomainRange as o}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as s}from"../../support/arcadeExpressionUtils.js";import{isStringOrNull as a,isString as u}from"../../support/guards.js";import{loadArcade as f}from"../../support/loadArcade.js";const c=/^([0-9_])/,d=/[^a-z0-9_\u0080-\uffff]+/gi;function p(e){if(null==e)return null;return e.trim().replaceAll(d,"_").replace(c,"F$1")||null}const m=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],y=["field","normalizationField"];function g(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(F(m,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)F(y,e,n)}function F(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function I(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const b=new Set;function w(e,n){return e&&n?(b.clear(),T(b,e,n),Array.from(b).sort()):[]}function T(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)x(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function x(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function h(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}function E(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=w(e,n);return t.length/e.fields.length>=i?["*"]:t}async function A(e,n,i){if(!i)return;let t;const r=s(i);if(r)t=[r];else{const{arcadeUtils:e}=await f();t=e.extractFieldNames(i,n?.fields?.map((e=>e.name)))}for(const l of t)x(e,n,l)}async function _(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});T(n,i,l.fieldNames)}}function v({displayField:e,fields:n}){return e||(n?.length?N(n,"name-or-title")||N(n,"unique-identifier")||N(n,"type-or-category")||S(n):null)}function S(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function N(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function $(e){if(!e)return[];const n=new Set;return await L(n,e),Array.from(n).sort()}async function L(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function O(e,n,i){i.onStatisticExpression?A(e,n,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function D(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(V(e,n,r)),i.fields&&t.push(...i.fields.map((async i=>O(e,n.fieldsIndex,i)))),await Promise.all(t)}async function M(e,n){const{fieldsIndex:i,trackInfo:t}=n;if(!n||!t||!i)return;const r=[t.latestObservations.renderer?.collectRequiredFields(e,i),t.previousObservations.renderer?.collectRequiredFields(e,i),t.trackLines.renderer?.collectRequiredFields(e,i)];t.popupTemplate&&r.push(V(e,n,t.popupTemplate));for(const l of[t.latestObservations.labelingInfo,t.previousObservations.labelingInfo,t.trackLines.labelingInfo])if(l)for(const n of l)r.push(Z(e,i,n));await Promise.all(r)}async function V(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map((i=>A(e,n.fieldsIndex,i.expression))));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(A(e,n.fieldsIndex,l.expressionInfo.expression));await Promise.all(t)}async function R(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&T(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&T(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await _(e,n.fieldsIndex,i.where))}async function j(e,n,i){n&&i&&await Promise.all(i.map((i=>U(e,n,i))))}async function U(e,n,i){n&&i&&(i.valueExpression?await A(e,n.fieldsIndex,i.valueExpression):i.field&&x(e,n.fieldsIndex,i.field))}async function k(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?w(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?w(e.fieldsIndex,Y(e)):[]}function G(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?w(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function P(e,n,i){if(!n||!i)return;const t=n.fieldsIndex;await Promise.all(i.filters.map((n=>_(e,t,n.where))))}const q=new Set(["oid","global-id","guid"]),X=new Set(["oid","global-id"]),z=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/perimeter/i,/objectid/i,/_i$/i];function B(e){const n=new Set;J(e).forEach((e=>n.add(e))),G(e).forEach((e=>n.add(e.toLowerCase())));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(i.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}function Y(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function J(e){return Y(e).map((e=>e.toLowerCase()))}function W(e,n){return e.editable&&!q.has(e.type)&&!J(n).includes(e.name?.toLowerCase()??"")}function H(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||B(n).includes(i)||X.has(e.type)||z.some((e=>e.test(i))))}async function K(e){if(!e)return[];const n=new Set;return await Q(n,e),Array.from(n).sort()}async function Q(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map((n=>Z(e,t,n))))}async function Z(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await A(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{x(e,n,i.slice(1,-1))}))}await _(e,n,r)}function ee(e){const n=e.defaultValue;return void 0!==n&&oe(e,n)?n:e.nullable?null:void 0}function ne(e){const n="string"==typeof e?{type:e}:e;return Fe(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ie(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function te(e){return null===e||ie(e)}function re(e){return null===e||Number.isInteger(e)}function le(){return!0}function oe(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?re:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?te:ie;break;case"string":case"esriFieldTypeString":i=e.nullable?a:u;break;default:i=le}return 1===arguments.length?i:i(n)}const se=["integer","small-integer","big-integer","long"],ae=["single","double"],ue=[...se,...ae],fe=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"],ce=["esriFieldTypeSingle","esriFieldTypeDouble"],de=new Set([...se,...fe]),pe=new Set([...ae,...ce]),me=t(de,pe);function ye(e){return null!=e&&de.has(e.type)}function ge(e){return null!=e&&me.has(e.type)}function Fe(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Ie(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function be(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function we(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function Te(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function xe(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function he(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function Ee(e,n){return null===Se(e,n)}var Ae,_e;function ve(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Se(e,n){return null==e||e.nullable&&null===n?null:oe(e,n)?ge(e)&&!Ne(e.type,Number(n))?Ae.OUT_OF_RANGE:null:_e.INVALID_TYPE}function Ne(e,n){const i="string"==typeof e?Le(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function $e(e,n){const i=o(e,n);return i||(ge(e)?Le(e.type):void 0)}function Le(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return De;case"esriFieldTypeInteger":case"esriFieldTypeLong":case"integer":case"long":return Me;case"esriFieldTypeBigInteger":case"big-integer":return Ve;case"esriFieldTypeSingle":case"single":return Re;case"esriFieldTypeDouble":case"double":return je}}function Oe(e){if(!ie(e))return null;if(Number.isInteger(e)){if(e>=De.min&&e<=De.max)return"esriFieldTypeSmallInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeInteger";if(e>=Ve.min&&e<=Ve.max)return"esriFieldTypeBigInteger"}return e>=Re.min&&e<=Re.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(Ae||(Ae={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(_e||(_e={}));const De={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Me={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Ve={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},Re={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},je={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Ue(e,n,i){switch(e){case l.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case l.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case _e.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case Ae.OUT_OF_RANGE:{const{min:e,max:t}=Le(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function ke(e,n){return!Ce(e,n,null)}function Ce(e,n,i){if(!e?.attributes||!n){if(null!=i)for(const e of n??[])i.add(e);return!0}const t=new Set(Object.keys(e.attributes));let r=!1;for(const l of n)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ge(e,n){const i=new Set;for(const t of n)await A(i,e.fieldsIndex,t);return Array.from(i).sort()}function Pe(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}async function qe(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function Xe(e){const n=e?.match(/{[^}]+}/g);return n?n.map((e=>e.slice(1,-1).split(":")[0].trim())):[]}export{Ae as NumericRangeValidationError,_e as TypeValidationError,Ve as bigIntegerRange,A as collectArcadeFieldNames,P as collectDisplayFilterFields,L as collectElevationFields,D as collectFeatureReductionFields,x as collectField,T as collectFields,R as collectFilterFields,Q as collectLabelingFields,j as collectOrderByInfos,V as collectPopupTemplateFields,M as collectTrackInfoFields,je as doubleRange,Xe as extractSubstitutionTemplatesFromString,ke as featureHasFields,w as fixFields,g as fixRendererFields,I as fixTimeInfoFields,ce as floatJSONTypes,ae as floatTypes,v as getDisplayFieldName,Y as getEditTrackingFields,$ as getElevationFields,Ge as getExpressionFields,C as getFeatureEditFields,G as getFeatureGeometryFields,ne as getFieldDefaultLength,ee as getFieldDefaultValue,$e as getFieldRange,K as getLabelingFields,B as getLowerCaseDefaultHiddenFields,J as getLowerCaseEditTrackingFields,Oe as getNumericTypeForValue,qe as getRendererFields,k as getTimeFields,fe as integerJSONTypes,Me as integerRange,se as integerTypes,Ie as isDateField,be as isDateOnlyField,W as isFieldEditable,H as isFieldVisibleByDefault,he as isGlobalIDField,ye as isIntegerField,Ne as isNumberInRange,ge as isNumericField,xe as isObjectIDField,Pe as isRasterPixelValueField,Fe as isStringField,Te as isTimeOnlyField,we as isTimestampOffsetField,Ee as isValidFieldValue,oe as isValueMatchingFieldType,p as normalizeFieldName,ue as numericTypes,E as packFields,Ce as populateMissingFields,m as rendererFields,ve as sanitizeNullFieldValue,Re as singleRange,De as smallIntegerRange,h as unpackFieldNames,Se as validateFieldValue,Ue as validationErrorToString,y as visualVariableFields};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Collection.js";import"../../core/has.js";import{LayerLoadContext as r}from"./LayerLoadContext.js";import{layerLookupMap as a}from"./lazyLayerLoader.js";import y from"../../portal/PortalItem.js";import{isMapNotesLayer as t,isMarkupLayer as i,isRouteLayer as L}from"../../portal/support/featureCollectionUtils.js";import{selectLayerClassPath as o}from"../../portal/support/portalLayers.js";import{loadStyleRenderer as n}from"../../renderers/support/styleUtils.js";async function l(e,r,a){if(!r)return;const y=r.map((e=>G(e,a))),t=await Promise.allSettled(y);for(const i of t)"rejected"===i.status||i.value&&e.add(i.value)}const c={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},s={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},p={ArcGISFeatureLayer:"FeatureLayer"},S={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},u={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},d={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},I={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},m={...u,LinkChartLayer:"LinkChartLayer"},g={...d},T={...I};async function G(e,r){return f(await M(e,r),e,r)}async function f(e,r,a){const y=new e;return y.read(r,a.context),"group"===y.type&&("GroupLayer"===r.layerType?await v(y,r,a):b(r)?C(y,r,a.context):A(r)&&await h(y,r,a.context)),await n(y,a.context),y}async function M(e,n){const l=n.context,c=w(l);let s=e.layerType||e.type;!s&&n?.defaultLayerType&&(s=n.defaultLayerType);const p=c[s];let S=p?a[p]:a.UnknownLayer;if(b(e)){const t=l?.portal;if(e.itemId){const i=new y({id:e.itemId,portal:t});await i.load();const L=(await o(i,new r)).className||"UnknownLayer";S=a[L]}}else"ArcGISFeatureLayer"===s?t(e)||i(e)?S=a.MapNotesLayer:L(e)?S=a.RouteLayer:A(e)&&(S=a.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?S=a.WMTSLayer:"WFS"===s&&"2.0.0"!==e.wfsInfo?.version&&(S=a.UnsupportedLayer);return S()}function A(e){if("ArcGISFeatureLayer"!==e.layerType||b(e))return!1;return(e.featureCollection?.layers?.length??0)>1}function b(e){return"Feature Collection"===e.type}function w(e){let r;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":r=S;break;case"ground":r=s;break;case"tables":r=p;break;default:r=c}break;case"link-chart":switch(e.layerContainerType){case"basemap":r=T;break;case"tables":r=g;break;default:r=m}break;default:switch(e.layerContainerType){case"basemap":r=I;break;case"tables":r=d;break;default:r=u}}return r}async function v(r,a,y){const t=new e,i=l(t,Array.isArray(a.layers)?a.layers:[],y);try{try{if(await i,"group"===r.type)return r.layers.addMany(t),r}catch(L){r.destroy();for(const e of t)e.destroy();throw L}}catch(L){throw L}}function C(e,r,a){r.itemId&&(e.portalItem=new y({id:r.itemId,portal:a?.portal}),e.when((()=>{const y=y=>{const t=y.layerId;W(y,e,r,t,a);const i=r.featureCollection?.layers?.[t];i&&y.read(i,a)};e.layers?.forEach(y),e.tables?.forEach(y)})))}async function h(e,r,y){const t=a.FeatureLayer,i=await t(),L=r.featureCollection,o=L?.showLegend,n=L?.layers?.map(((a,t)=>{const L=new i;L.read(a,y);const n={...y,ignoreDefaults:!0};return W(L,e,r,t,n),null!=o&&L.read({showLegend:o},n),L}));e.layers.addMany(n??[])}function W(e,r,a,y,t){e.read({id:`${r.id}-sublayer-${y}`,visibility:a.visibleLayers?.includes(y)??!0},t)}export{v as populateGroupLayer,l as populateOperationalLayers};
5
+ import e from"../../core/Collection.js";import"../../core/has.js";import{LayerLoadContext as r}from"./LayerLoadContext.js";import{layerLookupMap as a}from"./lazyLayerLoader.js";import y from"../../portal/PortalItem.js";import{isMapNotesLayer as t,isMarkupLayer as i,isRouteLayer as L}from"../../portal/support/featureCollectionUtils.js";import{selectLayerClassPath as o}from"../../portal/support/portalLayers.js";import{loadStyleRenderer as n}from"../../renderers/support/styleUtils.js";async function l(e,r,a){if(!r)return;const y=r.map((e=>G(e,a))),t=await Promise.allSettled(y);for(const i of t)"rejected"===i.status||i.value&&e.add(i.value)}const c={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},s={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},p={ArcGISFeatureLayer:"FeatureLayer"},S={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},u={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},d={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},I={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},m={...u,LinkChartLayer:"LinkChartLayer"},g={...d},T={...I};async function G(e,r){return f(await M(e,r),e,r)}async function f(e,r,a){const y=new e;return y.read(r,a.context),"group"===y.type&&("GroupLayer"===r.layerType?await v(y,r,a):b(r)?C(y,r,a.context):A(r)&&await h(y,r,a.context)),await n(y,a.context),y}async function M(e,n){const l=n.context,c=w(l);let s=e.layerType||e.type;!s&&n?.defaultLayerType&&(s=n.defaultLayerType);const p=c[s];let S=p?a[p]:a.UnknownLayer;if(b(e)){const t=l?.portal;if(e.itemId){const i=new y({id:e.itemId,portal:t});await i.load();const L=(await o(i,new r)).className||"UnknownLayer";S=a[L]}}else"ArcGISFeatureLayer"===s?t(e)||i(e)?S=a.MapNotesLayer:L(e)?S=a.RouteLayer:A(e)&&(S=a.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?S=a.WMTSLayer:"WFS"===s&&"2.0.0"!==e.wfsInfo?.version&&(S=a.UnsupportedLayer);return S()}function A(e){if("ArcGISFeatureLayer"!==e.layerType||b(e))return!1;return(e.featureCollection?.layers?.length??0)>1}function b(e){return"Feature Collection"===e.type}function w(e){let r;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":r=S;break;case"ground":r=s;break;case"tables":r=p;break;default:r=c}break;case"link-chart":switch(e.layerContainerType){case"basemap":r=T;break;case"tables":r=g;break;default:r=m}break;default:switch(e.layerContainerType){case"basemap":r=I;break;case"tables":r=d;break;default:r=u}}return r}async function v(r,a,y){const t=new e,i=l(t,Array.isArray(a.layers)?a.layers:[],y);try{try{if(await i,"group"===r.type)return r.layers.addMany(t),r}catch(L){r.destroy();for(const e of t)e.destroy();throw L}}catch(L){throw L}}function C(e,r,a){r.itemId&&(e.portalItem=new y({id:r.itemId,portal:a?.portal}),e.when((()=>{const y=y=>{const t=y.layerId;W(y,e,r,t,a);const i=r.featureCollection?.layers?.[t];i&&y.read(i,a)};e.layers?.forEach(y),e.tables?.forEach(y)})))}async function h(e,r,y){const t=a.FeatureLayer,i=await t(),L=r.featureCollection,o=L?.showLegend,n=L?.layers?.map(((a,t)=>{const L=new i;L.read(a,y);const n={...y,ignoreDefaults:!0};return W(L,e,r,t,n),null!=o&&L.read({showLegend:o},n),L}));e.layers.addMany(n??[])}function W(e,r,a,y,t){e.read({id:`${r.id}-sublayer-${y}`,visibility:a.visibleLayers?.includes(y)??!0},t)}export{v as populateGroupLayer,l as populateOperationalLayers};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{clone as r}from"../../core/lang.js";import t from"../../core/Logger.js";import{urlToObject as o,join as e}from"../../core/urlUtils.js";import{writeUrlWithLayerId as l,sanitizeUrlWithLayerId as n}from"./arcgisLayerUrl.js";import{url as i}from"./commonProperties.js";function s(){const o=r(i),e=o.json?.write;return"object"==typeof e&&e&&(e.writer=function(r,t,o,e){l(this,r,null,t,e)}),{...o,set:function(r){if(null==r)return void this._set("url",r);const o=n({layer:this,url:r,nonStandardUrlAllowed:!0,logger:t.getLogger(this)});this._set("url",o.url),null!=o.layerId&&this._set("layerId",o.layerId)}}}function u(r){const t=o(r.url);return null!=t&&null!=r.layerId&&(t.path=e(t.path,r.layerId.toString())),t}export{u as normalizeParsedUrlObject,s as urlProperty};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{emitApplyEditsEvent as s}from"../layers/mixins/EditBusLayer.js";import o from"./UtilityNetwork.js";import{isVersionInEditSession as a,currentSessionId as n,isSafeToEditVersion as c}from"../versionManagement/support/versionManagementUtils.js";let u=class extends t{constructor(e){super(e),this.telecomDomainNetwork=null,this.utilityNetwork=null}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}get telecomDomainNetworkName(){return this.telecomDomainNetwork?.domainNetworkName??null}async create(e){const[{createCircuit:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/createCircuit.js"),import("../rest/networks/circuits/support/CreateAlterCircuitParameters.js")]),i=r.from({circuit:e,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),u=await t(this.networkServiceUrl,i);o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:u})}async alter(e){const[{alterCircuit:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/alterCircuit.js"),import("../rest/networks/circuits/support/CreateAlterCircuitParameters.js")]),i=r.from({circuit:e,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),u=await t(this.networkServiceUrl,i);o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:u})}async delete(e){const[{deleteCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/deleteCircuits.js"),import("../rest/networks/circuits/support/DeleteCircuitsParameters.js")]),i=r.from({circuits:e,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),u=await t(this.networkServiceUrl,i);o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:u})}async export(e){const[{exportCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/exportCircuits.js"),import("../rest/networks/circuits/support/ExportCircuitsParameters.js")]),i=r.from(e);a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.domainNetworkName=this.telecomDomainNetworkName,i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),u=await t(this.networkServiceUrl,i);return o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:u.moment}),u.circuits}async verify(e,t=!1){const[{verifyCircuits:r},{default:i}]=await Promise.all([import("../rest/networks/circuits/verifyCircuits.js"),import("../rest/networks/circuits/support/VerifyCircuitsParameters.js")]),o=i.from({circuits:e,synthesizeGeometries:t,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(o.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):o.sessionId=null,o.gdbVersion=this.gdbVersion;const u=s(this.featureServiceUrl,null,this.gdbVersion,!1),l=await r(this.networkServiceUrl,o);return u.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:l.moment}),l.circuits}async queryCircuits(e){const[{queryCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/queryCircuits.js"),import("../rest/networks/circuits/support/QueryCircuitsParameters.js")]),i=Array.isArray(e)?{circuits:e}:e,s=r.from(i);a(this.featureServiceUrl,this.gdbVersion||null)?s.sessionId=n:s.sessionId=null,s.domainNetworkName=this.telecomDomainNetworkName,s.resultType=["circuit"],s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;return(await t(this.networkServiceUrl,s)).circuits||[]}async queryCircuitNames(e){const[{queryCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/queryCircuits.js"),import("../rest/networks/circuits/support/QueryCircuitsParameters.js")]),i=r.from(e);a(this.featureServiceUrl,this.gdbVersion||null)?i.sessionId=n:i.sessionId=null,i.domainNetworkName=this.telecomDomainNetworkName,i.resultType=["name"],i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;return(await t(this.networkServiceUrl,i)).circuitNames||[]}};e([r({constructOnly:!0})],u.prototype,"telecomDomainNetwork",void 0),e([r({type:o,constructOnly:!0})],u.prototype,"utilityNetwork",void 0),e([r()],u.prototype,"networkServiceUrl",null),e([r()],u.prototype,"featureServiceUrl",null),e([r()],u.prototype,"gdbVersion",null),e([r()],u.prototype,"historicMoment",null),e([r()],u.prototype,"telecomDomainNetworkName",null),u=e([i("esri.networks.CircuitManager")],u);const l=u;export{l as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{emitApplyEditsEvent as s}from"../layers/mixins/EditBusLayer.js";import o from"./UtilityNetwork.js";import{isVersionInEditSession as a,currentSessionId as n,isSafeToEditVersion as c}from"../versionManagement/support/versionManagementUtils.js";let u=class extends t{constructor(e){super(e),this.telecomDomainNetwork=null,this.utilityNetwork=null}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}get telecomDomainNetworkName(){return this.telecomDomainNetwork?.domainNetworkName??null}async create(e){const[{createCircuit:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/createCircuit.js"),import("../rest/networks/circuits/support/CreateAlterCircuitParameters.js")]),i=r.from({circuit:e,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),u=await t(this.networkServiceUrl,i);o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:u})}async alter(e){const[{alterCircuit:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/alterCircuit.js"),import("../rest/networks/circuits/support/CreateAlterCircuitParameters.js")]),i=r.from({circuit:e,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),u=await t(this.networkServiceUrl,i);o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:u})}async delete(e){const[{deleteCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/deleteCircuits.js"),import("../rest/networks/circuits/support/DeleteCircuitsParameters.js")]),i=r.from({circuits:e,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),u=await t(this.networkServiceUrl,i);o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:u})}async export(e){const[{exportCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/exportCircuits.js"),import("../rest/networks/circuits/support/ExportCircuitsParameters.js")]),i=r.from(e);a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.domainNetworkName=this.telecomDomainNetworkName,i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;const o=s(this.featureServiceUrl,null,this.gdbVersion,!1),u=await t(this.networkServiceUrl,i);return o.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:u.moment}),u.circuits}async verify(e,t=!1){const[{verifyCircuits:r},{default:i}]=await Promise.all([import("../rest/networks/circuits/verifyCircuits.js"),import("../rest/networks/circuits/support/VerifyCircuitsParameters.js")]),o=i.from({circuits:e,synthesizeGeometries:t,domainNetworkName:this.telecomDomainNetworkName});a(this.featureServiceUrl,this.gdbVersion||null)?(o.sessionId=n,await c(this.featureServiceUrl,this.gdbVersion,!0)):o.sessionId=null,o.gdbVersion=this.gdbVersion;const u=s(this.featureServiceUrl,null,this.gdbVersion,!1),l=await r(this.networkServiceUrl,o);return u.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:l.moment}),l.circuits}async queryCircuits(e){const[{queryCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/queryCircuits.js"),import("../rest/networks/circuits/support/QueryCircuitsParameters.js")]),i=Array.isArray(e)?{circuits:e}:e,s=r.from(i);a(this.featureServiceUrl,this.gdbVersion||null)?s.sessionId=n:s.sessionId=null,s.domainNetworkName=this.telecomDomainNetworkName,s.resultTypes=["circuit"],s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;return(await t(this.networkServiceUrl,s)).circuits||[]}async queryCircuitNames(e){const[{queryCircuits:t},{default:r}]=await Promise.all([import("../rest/networks/circuits/queryCircuits.js"),import("../rest/networks/circuits/support/QueryCircuitsParameters.js")]),i=r.from(e);a(this.featureServiceUrl,this.gdbVersion||null)?i.sessionId=n:i.sessionId=null,i.domainNetworkName=this.telecomDomainNetworkName,i.resultTypes=["name"],i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;return(await t(this.networkServiceUrl,i)).circuitNames||[]}};e([r({constructOnly:!0})],u.prototype,"telecomDomainNetwork",void 0),e([r({type:o,constructOnly:!0})],u.prototype,"utilityNetwork",void 0),e([r()],u.prototype,"networkServiceUrl",null),e([r()],u.prototype,"featureServiceUrl",null),e([r()],u.prototype,"gdbVersion",null),e([r()],u.prototype,"historicMoment",null),e([r()],u.prototype,"telecomDomainNetworkName",null),u=e([i("esri.networks.CircuitManager")],u);const l=u;export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{emitApplyEditsEvent as i}from"../layers/mixins/EditBusLayer.js";import n from"./UtilityNetwork.js";import{isVersionInEditSession as o,currentSessionId as a,isSafeToEditVersion as d}from"../versionManagement/support/versionManagementUtils.js";let l=class extends t{constructor(e){super(e),this.utilityNetwork=null}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}async insertGap(e,t,r){const[{insertGap:s},{default:n}]=await Promise.all([import("../rest/networks/unitIdentifiers/insertGap.js"),import("../rest/networks/unitIdentifiers/support/InsertGapParameters.js")]),l=new n({object:e,firstUnit:t,numUnits:r});o(this.featureServiceUrl,this.gdbVersion||null)?(l.sessionId=a,await d(this.featureServiceUrl,this.gdbVersion,!0)):l.sessionId=null,l.gdbVersion=this.gdbVersion;const u=i(this.featureServiceUrl,null,this.gdbVersion,!1),c=await s(this.networkServiceUrl,l);u.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:c})}async reset(e){const[{reset:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/reset.js"),import("../rest/networks/unitIdentifiers/support/ResetParameters.js")]),s=new r({objects:e});o(this.featureServiceUrl,this.gdbVersion||null)?(s.sessionId=a,await d(this.featureServiceUrl,this.gdbVersion,!0)):s.sessionId=null,s.gdbVersion=this.gdbVersion;const n=i(this.featureServiceUrl,null,this.gdbVersion,!1),l=await t(this.networkServiceUrl,s);n.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:l})}async resize(e,t){const[{resize:r},{default:s}]=await Promise.all([import("../rest/networks/unitIdentifiers/resize.js"),import("../rest/networks/unitIdentifiers/support/ResizeParameters.js")]),n=new s({object:e,numUnits:t});o(this.featureServiceUrl,this.gdbVersion||null)?(n.sessionId=a,await d(this.featureServiceUrl,this.gdbVersion,!0)):n.sessionId=null,n.gdbVersion=this.gdbVersion;const l=i(this.featureServiceUrl,null,this.gdbVersion,!1),u=await r(this.networkServiceUrl,n);l.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:u})}async query(e){const[{queryUnitIdentifiers:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/queryUnitIdentifiers.js"),import("../rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParamters.js")]),s=new r({objects:e});o(this.featureServiceUrl,this.gdbVersion||null)?s.sessionId=a:s.sessionId=null,s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;return await t(this.networkServiceUrl,s)}};e([r({type:n,constructOnly:!0})],l.prototype,"utilityNetwork",void 0),e([r()],l.prototype,"networkServiceUrl",null),e([r()],l.prototype,"featureServiceUrl",null),e([r()],l.prototype,"gdbVersion",null),e([r()],l.prototype,"historicMoment",null),l=e([s("esri.networks.UnitIdentifierManager")],l);const u=l;export{u as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{emitApplyEditsEvent as i}from"../layers/mixins/EditBusLayer.js";import n from"./UtilityNetwork.js";import{isVersionInEditSession as o,currentSessionId as a,isSafeToEditVersion as d}from"../versionManagement/support/versionManagementUtils.js";let l=class extends t{constructor(e){super(e),this.utilityNetwork=null}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}async insertGap(e,t,r){const[{insertGap:s},{default:n}]=await Promise.all([import("../rest/networks/unitIdentifiers/insertGap.js"),import("../rest/networks/unitIdentifiers/support/InsertGapParameters.js")]),l=new n({object:e,firstUnit:t,numUnits:r});o(this.featureServiceUrl,this.gdbVersion||null)?(l.sessionId=a,await d(this.featureServiceUrl,this.gdbVersion,!0)):l.sessionId=null,l.gdbVersion=this.gdbVersion;const u=i(this.featureServiceUrl,null,this.gdbVersion,!1),c=await s(this.networkServiceUrl,l);u.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:c})}async reset(e){const[{reset:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/reset.js"),import("../rest/networks/unitIdentifiers/support/ResetParameters.js")]),s=new r({objects:e});o(this.featureServiceUrl,this.gdbVersion||null)?(s.sessionId=a,await d(this.featureServiceUrl,this.gdbVersion,!0)):s.sessionId=null,s.gdbVersion=this.gdbVersion;const n=i(this.featureServiceUrl,null,this.gdbVersion,!1),l=await t(this.networkServiceUrl,s);n.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:l})}async resize(e,t){const[{resize:r},{default:s}]=await Promise.all([import("../rest/networks/unitIdentifiers/resize.js"),import("../rest/networks/unitIdentifiers/support/ResizeParameters.js")]),n=new s({object:e,numUnits:t});o(this.featureServiceUrl,this.gdbVersion||null)?(n.sessionId=a,await d(this.featureServiceUrl,this.gdbVersion,!0)):n.sessionId=null,n.gdbVersion=this.gdbVersion;const l=i(this.featureServiceUrl,null,this.gdbVersion,!1),u=await r(this.networkServiceUrl,n);l.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!1,historicMoment:u})}async query(e){const[{queryUnitIdentifiers:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/queryUnitIdentifiers.js"),import("../rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js")]),s=new r({objects:e});o(this.featureServiceUrl,this.gdbVersion||null)?s.sessionId=a:s.sessionId=null,s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;return await t(this.networkServiceUrl,s)}};e([r({type:n,constructOnly:!0})],l.prototype,"utilityNetwork",void 0),e([r()],l.prototype,"networkServiceUrl",null),e([r()],l.prototype,"featureServiceUrl",null),e([r()],l.prototype,"gdbVersion",null),e([r()],l.prototype,"historicMoment",null),l=e([s("esri.networks.UnitIdentifierManager")],l);const u=l;export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import o from"../layers/FeatureLayer.js";import{queryAllJSON as a}from"../layers/support/featureQueryAll.js";import i from"./Network.js";import n from"./RulesTable.js";import l from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as u}from"./support/networkFieldUtils.js";import d from"./support/NetworkSystemLayers.js";import m from"./support/TerminalConfiguration.js";import c from"./support/TraceJobInfo.js";import{AssociationTypeEnum as y,RuleType as p}from"./support/typeUtils.js";import{doesRuleAllowAssociation as f}from"./support/utils.js";import h from"../rest/support/Query.js";let I=class extends i{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility",this._terminalById=new Map}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new d({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map((e=>m.fromJSON(e)))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map((e=>e.domainNetworkName))||[]}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map((t=>{t?.edgeSources?.map((({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)})),t?.junctionSources?.map((({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)}))})),e}async load(e){return this.addResolvingPromise(super.load(e)),this.addResolvingPromise(this._loadNamedTraceConfigurationsFromNetwork(e)),this}getTerminalConfiguration(e){let t=null,r=null;const s=e.layer;let o=null;if("feature"===s?.type){if(o=s.layerId,null===o)return null}else{if("subtype-sublayer"!==s?.type)return null;if(o=s?.parent?.layerId??null,null===o)return null}const a=e.attributes;if(null==a)return null;for(const l of Object.keys(a))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let i=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find((e=>e.layerId===o));if(e){const s=e.assetGroups?.find((e=>e.assetGroupCode===t));if(s){const e=s.assetTypes?.find((e=>e.assetTypeCode===r));if(e?.isTerminalConfigurationSupported){i=e.terminalConfigurationId;break}}}}if(null!=i){const e=this.dataElement.terminalConfigurations,t=e?.find((e=>e.terminalConfigurationId===i));return t?m.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find((t=>t.domainNetworkName===e));return t?.tiers?.map((e=>e.name))||[]}async getRulesTable(){return this._sharedRulesTable||(this._sharedRulesTable=this._createRulesTable()),await this._sharedRulesTable}getTerminalById(e){if(!this.dataElement||null==e)return null;const t=this._terminalById.get(e);return null!=t?t:(this.terminalConfigurations.forEach((e=>{e.terminals.forEach((e=>{this._terminalById.set(e.id,e)}))})),this._terminalById.get(e))}isUtilityLayer(e){return"layerId"in e?this._utilityLayerList.has(e?.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):!("subtype-sublayer"!==e.type||!e.parent)&&(this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1))}async queryAssociations(e,t){const[{queryAssociations:r},{default:s}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),o=s.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;return(await r(this.networkServiceUrl,o,t)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const o=await t(this.networkServiceUrl,s);return new c({statusUrl:o})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;const{fromNetworkElement:r,toNetworkElement:s}=e;if(!r||!s)return!1;await t.load();let o=null;switch(e.associationType){case"containment":o=t.rulesCategorized.containment;break;case"attachment":o=t.rulesCategorized.attachment;break;default:o=t.rulesCategorized.connectivity}return o.some((e=>f(e,r,s)))}generateAddAssociations(e){const{associationsTable:r}=this.networkSystemLayers,{fromNetworkSourceId:s,fromGlobalId:o,fromTerminalId:a,toNetworkSourceId:i,toGlobalId:n,toTerminalId:l,associationType:d,isContentVisible:m,percentAlong:c,globalId:p}=u(r);return{addFeatures:e.map((e=>new t({attributes:{[s]:e.fromNetworkElement?.networkSourceId,[o]:e.fromNetworkElement?.globalId,[a]:e.fromNetworkElement?.terminalId,[i]:e.toNetworkElement?.networkSourceId,[n]:e.toNetworkElement?.globalId,[l]:e.toNetworkElement?.terminalId,[d]:y[e.associationType],[m]:null==e.isContentVisible?void 0:e.isContentVisible?1:0,[c]:e.percentAlong,[p]:e.globalId}}))),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:r?.globalIdField??"globalid",objectIdField:r?.objectIdField??"objectid"}}}generateDeleteAssociations(e){const{associationsTable:t,associationsTableId:r}=this.networkSystemLayers;return{deleteFeatures:e.map((e=>({globalId:e.globalId}))),id:r,identifierFields:{globalIdField:t?.globalIdField??"globalid",objectIdField:t?.objectIdField??"objectid"}}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map((e=>e.globalId)),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find((e=>e.globalId===s.globalId));if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}async _createRulesTable(){const e=this.networkSystemLayers.rulesTableUrl,t=new o({url:e});await t.load();const r=this.dataElement?.domainNetworks;if(!r)return null;const s=r.flatMap((e=>[...e.edgeSources||[],...e.junctionSources||[]])),a=(await b(t)).map((e=>this._hydrateRuleInfo(t,s,e)));return new n({rulesLayer:t,rules:a})}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,o=s.get("RULETYPE"),a=s.get("CREATIONDATE"),i=s.get("FROMNETWORKSOURCEID"),n=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),u=s.get("FROMTERMINALID"),d=s.get("TONETWORKSOURCEID"),m=s.get("TOASSETGROUP"),c=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),f=s.get("VIANETWORKSOURCEID"),h=s.get("VIAASSETGROUP"),I=s.get("VIAASSETTYPE"),b=s.get("VIATERMINALID"),g=r.attributes[o.name],T=new Date(r.attributes[a.name]),w=[{networkSourceId:r.attributes[i.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[d.name],assetGroupId:r.attributes[m.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[f.name],assetGroupId:r.attributes[h.name],assetTypeId:r.attributes[I.name],terminalId:r.attributes[b.name]}];let S;!function(e){e[e.from=0]="from",e[e.to=1]="to",e[e.via=2]="via"}(S||(S={}));const k={ruleType:g,creationDate:T};for(const N of[S.from,S.to,S.via]){if(g!==p.RTEdgeJunctionEdgeConnectivity&&N===S.via)continue;const e=w[N],r=t.find((t=>t.sourceId===e.networkSourceId)),s=r?.assetGroups.find((t=>t.assetGroupCode===e.assetGroupId)),o=s?.assetTypes.find((t=>t.assetTypeCode===e.assetTypeId)),a=this._getTerminal(o,e);let i="";switch(N){case S.from:i="from";break;case S.to:i="to";break;case S.via:i="via"}k[`${i}NetworkSource`]=r,k[`${i}AssetGroup`]=s,k[`${i}AssetType`]=o,k[`${i}Terminal`]=a?.toJSON()}return k}_getTerminal(e,t){const r=e?.terminalConfigurationId,s=this.terminalConfigurations?.find((e=>e.id===r));return s?.terminals?.find((e=>e.id===t.terminalId))??null}};async function b(e){const t=new h({where:"1=1",outFields:["*"]});return(await a(e,t)).features}e([r({type:[l],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],I.prototype,"sharedNamedTraceConfigurations",void 0),e([r({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],I.prototype,"type",void 0),e([r({readOnly:!0})],I.prototype,"serviceTerritoryFeatureLayerId",null),e([r({readOnly:!0})],I.prototype,"networkSystemLayers",null),e([r({readOnly:!0})],I.prototype,"terminalConfigurations",null),e([r({readOnly:!0})],I.prototype,"domainNetworkNames",null),I=e([s("esri.networks.UtilityNetwork")],I);const g=I;export{g as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import a from"../layers/FeatureLayer.js";import{queryAllJSON as o}from"../layers/support/featureQueryAll.js";import n from"./Network.js";import l from"./RulesTable.js";import u from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as d}from"./support/networkFieldUtils.js";import m from"./support/NetworkSystemLayers.js";import c from"./support/TerminalConfiguration.js";import y from"./support/TraceJobInfo.js";import{AssociationTypeEnum as p,RuleType as f}from"./support/typeUtils.js";import{doesRuleAllowAssociation as h}from"./support/utils.js";import I from"../rest/support/Query.js";let g=class extends n{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility",this._terminalById=new Map,this._circuitManagerMap=new Map,this._unitIdentifierManager=null}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new m({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map((e=>c.fromJSON(e)))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map((e=>e.domainNetworkName))||[]}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map((t=>{t?.edgeSources?.map((({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)})),t?.junctionSources?.map((({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)}))})),e}get hasTelecomNetwork(){return this.dataElement?.domainNetworks.some((e=>e.isTelecomNetwork))??!1}async load(e){return this.addResolvingPromise(super.load(e)),this.addResolvingPromise(this._loadNamedTraceConfigurationsFromNetwork(e)),this}getTerminalConfiguration(e){let t=null,r=null;const s=e.layer;let i=null;if("feature"===s?.type){if(i=s.layerId,null===i)return null}else{if("subtype-sublayer"!==s?.type)return null;if(i=s?.parent?.layerId??null,null===i)return null}const a=e.attributes;if(null==a)return null;for(const l of Object.keys(a))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let o=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find((e=>e.layerId===i));if(e){const s=e.assetGroups?.find((e=>e.assetGroupCode===t));if(s){const e=s.assetTypes?.find((e=>e.assetTypeCode===r));if(e?.isTerminalConfigurationSupported){o=e.terminalConfigurationId;break}}}}if(null!=o){const e=this.dataElement.terminalConfigurations,t=e?.find((e=>e.terminalConfigurationId===o));return t?c.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find((t=>t.domainNetworkName===e));return t?.tiers?.map((e=>e.name))||[]}async getRulesTable(){return this._sharedRulesTable||(this._sharedRulesTable=this._createRulesTable()),await this._sharedRulesTable}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;const t=this.dataElement?.domainNetworks.find((t=>t.domainNetworkName===e&&t.isTelecomNetwork));if(!t)return null;const{default:s}=await import("./CircuitManager.js");return r(this._circuitManagerMap,e,(()=>new s({utilityNetwork:this,telecomDomainNetwork:t})))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;const{default:e}=await import("./UnitIdentifierManager.js");return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){if(!this.dataElement||null==e)return null;const t=this._terminalById.get(e);return null!=t?t:(this.terminalConfigurations.forEach((e=>{e.terminals.forEach((e=>{this._terminalById.set(e.id,e)}))})),this._terminalById.get(e))}isUtilityLayer(e){return"layerId"in e?this._utilityLayerList.has(e?.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):!("subtype-sublayer"!==e.type||!e.parent)&&(this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1))}async queryAssociations(e,t){const[{queryAssociations:r},{default:s}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),i=s.from(e);i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;return(await r(this.networkServiceUrl,i,t)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const i=await t(this.networkServiceUrl,s);return new y({statusUrl:i})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;const{fromNetworkElement:r,toNetworkElement:s}=e;if(!r||!s)return!1;await t.load();let i=null;switch(e.associationType){case"containment":i=t.rulesCategorized.containment;break;case"attachment":i=t.rulesCategorized.attachment;break;default:i=t.rulesCategorized.connectivity}return i.some((e=>h(e,r,s)))}generateAddAssociations(e){const{associationsTable:r}=this.networkSystemLayers,{fromNetworkSourceId:s,fromGlobalId:i,fromTerminalId:a,toNetworkSourceId:o,toGlobalId:n,toTerminalId:l,associationType:u,isContentVisible:m,percentAlong:c,globalId:y}=d(r);return{addFeatures:e.map((e=>new t({attributes:{[s]:e.fromNetworkElement?.networkSourceId,[i]:e.fromNetworkElement?.globalId,[a]:e.fromNetworkElement?.terminalId,[o]:e.toNetworkElement?.networkSourceId,[n]:e.toNetworkElement?.globalId,[l]:e.toNetworkElement?.terminalId,[u]:p[e.associationType],[m]:null==e.isContentVisible?void 0:e.isContentVisible?1:0,[c]:e.percentAlong,[y]:e.globalId}}))),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:r?.globalIdField??"globalid",objectIdField:r?.objectIdField??"objectid"}}}generateDeleteAssociations(e){const{associationsTable:t,associationsTableId:r}=this.networkSystemLayers;return{deleteFeatures:e.map((e=>({globalId:e.globalId}))),id:r,identifierFields:{globalIdField:t?.globalIdField??"globalid",objectIdField:t?.objectIdField??"objectid"}}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map((e=>e.globalId)),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find((e=>e.globalId===s.globalId));if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}async _createRulesTable(){const e=this.networkSystemLayers.rulesTableUrl,t=new a({url:e});await t.load();const r=this.dataElement?.domainNetworks;if(!r)return null;const s=r.flatMap((e=>[...e.edgeSources||[],...e.junctionSources||[]])),i=(await b(t)).map((e=>this._hydrateRuleInfo(t,s,e)));return new l({rulesLayer:t,rules:i})}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,i=s.get("RULETYPE"),a=s.get("CREATIONDATE"),o=s.get("FROMNETWORKSOURCEID"),n=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),u=s.get("FROMTERMINALID"),d=s.get("TONETWORKSOURCEID"),m=s.get("TOASSETGROUP"),c=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),p=s.get("VIANETWORKSOURCEID"),h=s.get("VIAASSETGROUP"),I=s.get("VIAASSETTYPE"),g=s.get("VIATERMINALID"),b=r.attributes[i.name],w=new Date(r.attributes[a.name]),T=[{networkSourceId:r.attributes[o.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[d.name],assetGroupId:r.attributes[m.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[p.name],assetGroupId:r.attributes[h.name],assetTypeId:r.attributes[I.name],terminalId:r.attributes[g.name]}];let k;!function(e){e[e.from=0]="from",e[e.to=1]="to",e[e.via=2]="via"}(k||(k={}));const N={ruleType:b,creationDate:w};for(const S of[k.from,k.to,k.via]){if(b!==f.RTEdgeJunctionEdgeConnectivity&&S===k.via)continue;const e=T[S],r=t.find((t=>t.sourceId===e.networkSourceId)),s=r?.assetGroups.find((t=>t.assetGroupCode===e.assetGroupId)),i=s?.assetTypes.find((t=>t.assetTypeCode===e.assetTypeId)),a=this._getTerminal(i,e);let o="";switch(S){case k.from:o="from";break;case k.to:o="to";break;case k.via:o="via"}N[`${o}NetworkSource`]=r,N[`${o}AssetGroup`]=s,N[`${o}AssetType`]=i,N[`${o}Terminal`]=a?.toJSON()}return N}_getTerminal(e,t){const r=e?.terminalConfigurationId,s=this.terminalConfigurations?.find((e=>e.id===r));return s?.terminals?.find((e=>e.id===t.terminalId))??null}};async function b(e){const t=new I({where:"1=1",outFields:["*"]});return(await o(e,t)).features}e([s({type:[u],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],g.prototype,"sharedNamedTraceConfigurations",void 0),e([s({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],g.prototype,"type",void 0),e([s({readOnly:!0})],g.prototype,"serviceTerritoryFeatureLayerId",null),e([s({readOnly:!0})],g.prototype,"networkSystemLayers",null),e([s({readOnly:!0})],g.prototype,"terminalConfigurations",null),e([s({readOnly:!0})],g.prototype,"domainNetworkNames",null),e([s({readOnly:!0})],g.prototype,"hasTelecomNetwork",null),g=e([i("esri.networks.UtilityNetwork")],g);const w=g;export{w as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import r from"./TraceConfiguration.js";let i=class extends r{constructor(t){super(t),this.filterBarriers=[],this.arcadeExpressionBarrier=null,this.domainNetworkName=null,this.filterBitsetNetworkAttributeName=null,this.filterFunctionBarriers=[],this.filterScope=null,this.includeContainers=null,this.includeContent=null,this.includeIsolated=null,this.includeStructures=null,this.allowIndeterminateFlow=null,this.includeUpToFirstSpatialContainer=null,this.inferConnectivity=null,this.maxHops=null,this.nearestNeighbor=null,this.numPaths=null,this.outputFilterCategories=[],this.outputFilters=[],this.propagators=[],this.subnetworkName=null,this.targetTierName=null,this.diagramTemplateName=null,this.tierName=null,this.validateLocatability=null}};t([e({type:[Object],json:{write:!0}})],i.prototype,"filterBarriers",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"arcadeExpressionBarrier",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"domainNetworkName",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"filterBitsetNetworkAttributeName",void 0),t([e({type:[Object],json:{write:!0}})],i.prototype,"filterFunctionBarriers",void 0),t([e({type:["junctions","edges","junctionsAndEdges"],json:{write:!0}})],i.prototype,"filterScope",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"includeContainers",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"includeContent",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"includeIsolated",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"includeStructures",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"allowIndeterminateFlow",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"includeUpToFirstSpatialContainer",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"inferConnectivity",void 0),t([e({type:Number,json:{write:!0}})],i.prototype,"maxHops",void 0),t([e({type:Object,json:{write:!0}})],i.prototype,"nearestNeighbor",void 0),t([e({type:Number,json:{write:!0}})],i.prototype,"numPaths",void 0),t([e({type:[Object],json:{write:!0}})],i.prototype,"outputFilterCategories",void 0),t([e({type:[Object],json:{write:!0}})],i.prototype,"outputFilters",void 0),t([e({type:[Object],json:{write:!0}})],i.prototype,"propagators",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"subnetworkName",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"targetTierName",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"diagramTemplateName",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"tierName",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"validateLocatability",void 0),i=t([o("esri.networks.support.UNTraceConfiguration")],i);const n=i;export{n as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import r from"./TraceConfiguration.js";let i=class extends r{constructor(t){super(t),this.filterBarriers=[],this.arcadeExpressionBarrier=null,this.circuitName=null,this.domainNetworkName=null,this.filterBitsetNetworkAttributeName=null,this.filterFunctionBarriers=[],this.filterScope=null,this.includeContainers=null,this.includeContent=null,this.includeIsolated=null,this.includeStructures=null,this.allowIndeterminateFlow=null,this.includeUpToFirstSpatialContainer=null,this.inferConnectivity=null,this.maxHops=null,this.nearestNeighbor=null,this.numPaths=null,this.outputFilterCategories=[],this.outputFilters=[],this.propagators=[],this.subnetworkName=null,this.targetTierName=null,this.diagramTemplateName=null,this.tierName=null,this.validateLocatability=null}};t([e({type:[Object],json:{write:!0}})],i.prototype,"filterBarriers",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"arcadeExpressionBarrier",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"circuitName",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"domainNetworkName",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"filterBitsetNetworkAttributeName",void 0),t([e({type:[Object],json:{write:!0}})],i.prototype,"filterFunctionBarriers",void 0),t([e({type:["junctions","edges","junctionsAndEdges"],json:{write:!0}})],i.prototype,"filterScope",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"includeContainers",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"includeContent",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"includeIsolated",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"includeStructures",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"allowIndeterminateFlow",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"includeUpToFirstSpatialContainer",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"inferConnectivity",void 0),t([e({type:Number,json:{write:!0}})],i.prototype,"maxHops",void 0),t([e({type:Object,json:{write:!0}})],i.prototype,"nearestNeighbor",void 0),t([e({type:Number,json:{write:!0}})],i.prototype,"numPaths",void 0),t([e({type:[Object],json:{write:!0}})],i.prototype,"outputFilterCategories",void 0),t([e({type:[Object],json:{write:!0}})],i.prototype,"outputFilters",void 0),t([e({type:[Object],json:{write:!0}})],i.prototype,"propagators",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"subnetworkName",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"targetTierName",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"diagramTemplateName",void 0),t([e({type:String,json:{write:!0}})],i.prototype,"tierName",void 0),t([e({type:Boolean,json:{write:!0}})],i.prototype,"validateLocatability",void 0),i=t([o("esri.networks.support.UNTraceConfiguration")],i);const n=i;export{n as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{JSONMap as n}from"../../core/jsonMap.js";var t;!function(n){n[n.RTJunctionJunctionConnectivity=1]="RTJunctionJunctionConnectivity",n[n.RTContainment=2]="RTContainment",n[n.RTAttachment=3]="RTAttachment",n[n.RTJunctionEdgeConnectivity=4]="RTJunctionEdgeConnectivity",n[n.RTEdgeJunctionEdgeConnectivity=5]="RTEdgeJunctionEdgeConnectivity"}(t||(t={}));const o=new n({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation",path:"path"}),i=new n({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionEdgeMidspanConnectivity:"junction-edge-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"}),e={connectivity:1,"junction-junction-connectivity":1,containment:2,attachment:3,"junction-edge-from-connectivity":4,"junction-edge-midspan-connectivity":5,"junction-edge-to-connectivity":6},c=new n({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});export{e as AssociationTypeEnum,t as RuleType,i as associationTypeKebabDict,o as traceTypeKebabDict,c as validationTypeKebabDict};
5
+ import{JSONMap as n}from"../../core/jsonMap.js";var t;!function(n){n[n.RTJunctionJunctionConnectivity=1]="RTJunctionJunctionConnectivity",n[n.RTContainment=2]="RTContainment",n[n.RTAttachment=3]="RTAttachment",n[n.RTJunctionEdgeConnectivity=4]="RTJunctionEdgeConnectivity",n[n.RTEdgeJunctionEdgeConnectivity=5]="RTEdgeJunctionEdgeConnectivity"}(t||(t={}));const o=new n({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation",path:"path",circuit:"circuit"}),i=new n({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionEdgeMidspanConnectivity:"junction-edge-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"}),e={connectivity:1,"junction-junction-connectivity":1,containment:2,attachment:3,"junction-edge-from-connectivity":4,"junction-edge-midspan-connectivity":5,"junction-edge-to-connectivity":6},c=new n({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});export{e as AssociationTypeEnum,t as RuleType,i as associationTypeKebabDict,o as traceTypeKebabDict,c as validationTypeKebabDict};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.34.0-next.7",
3
+ "version": "4.34.0-next.9",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{getAssetUrl as t}from"../assets.js";import i from"../core/Error.js";import r from"../core/JSONSupport.js";import{clone as o,fixJson as s}from"../core/lang.js";import a from"../core/Loadable.js";import{isDataProtocol as n,makeAbsolute as l}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{ensureClass as c}from"../core/accessorSupport/ensureType.js";import{reader as d}from"../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import m from"../geometry/Extent.js";import h from"./Portal.js";import g from"./PortalItemResource.js";import y from"./PortalRating.js";import{a as w}from"../chunks/persistableUrlUtils.js";var v;const f=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Map Service","Media Layer","Scene Service","Stream Service","Vector Tile Service","WFS","WMS","WMTS"]),b=new Set(["KML","GeoJson","CSV"]);let k=v=class extends(r.JSONSupportMixin(a)){static from(e){return c(v,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.classification=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Geocoding Service"===e?i="Locator":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e?.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"Raster function template"===e?i="Raster Function Template":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e?i="Insights Report":"Excalibur Imagery Project"===e?i="Excalibur Project":"3DTiles Service"===e?i="3D tiles layer":"3DTiles Package"===e&&(i="3D tiles package"),i}readExtent(e){return e&&e.length?new m(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",i=this.typeKeywords||[],r="esri/images/portal/",o="16";let s,a=!1,n=!1,l=!1,p=!1,c=!1,d=!1,u=!1,m=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(a=i.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=i.includes("Table"),l=i.includes("Route Layer"),p=i.includes("Markup"),c=i.includes("Spatiotemporal"),d=i.includes("UtilityNetwork"),s=c&&n?"spatiotemporaltable":n?"table":l?"routelayer":p?"markup":c?"spatiotemporal":d?"utilitynetwork":a?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(c=i.includes("Spatiotemporal"),u=i.includes("Relational"),s=c||u?"mapimages":a||i.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):s="scene service"===e?i.includes("Line")?"sceneweblayerline":i.includes("3DObject")?"sceneweblayermultipatch":i.includes("Point")?"sceneweblayerpoint":i.includes("IntegratedMesh")?"sceneweblayermesh":i.includes("PointCloud")?"sceneweblayerpointcloud":i.includes("Polygon")?"sceneweblayerpolygon":i.includes("Building")?"sceneweblayerbuilding":i.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?i.includes("Elevation 3D Layer")?"elevationlayer":i.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?i.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?i.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?i.includes("3DObject")?"3dobjecttileslayer":i.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?s="maps":"web scene"===e?s=i.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&i.includes("configurableApp")?s="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?s="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&i.includes("ArcGIS Pro")||"explorer map"===e&&i.indexOf("Explorer Document")?s="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?s="datafiles":"360 vr experience"===e?s="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?s="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?s="addindesktop":"pdf"===e?s="pdf":"microsoft word"===e?s="word":"microsoft excel"===e?s="excel":"microsoft powerpoint"===e?s="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&i.includes("Explorer Mapping Application")||i.includes("Document")?s="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?s="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?s="layersgray":"analysis model"===e?s="analysismodel":"scene package"===e?s="scenepackage":"3dtiles package"===e?s="3dtileslayerpackage":"3dtiles service"===e?s="3dtileslayer":"mobile scene package"===e?s="mobilescenepackage":"tile package"===e||"compact tile package"===e?s="tilepackage":"task file"===e?s="taskfile":"report template"===e?s="report-template":"statistical data collection"===e?s="statisticaldatacollection":"insights workbook"===e?s="workbook":"insights model"===e?s="insightsmodel":"insights page"===e?s="insightspage":"insights theme"===e?s="insightstheme":"hub initiative"===e?s="hubinitiative":"hub page"===e?s="hubpage":"hub site application"===e?s="hubsite":"hub event"===e?s="hubevent":"hub project"===e?s="hubproject":"relational database connection"===e?s="relationaldatabaseconnection":"big data file share"===e?s="datastorecollection":"image collection"===e?s="imagecollection":"desktop style"===e?s="desktopstyle":"style"===e?s=i.includes("Dictionary")?"dictionarystyle":"style":"dashboard"===e?s="dashboard":"raster function template"===e?s="rasterprocessingtemplate":"vector tile package"===e?s="vectortilepackage":"ortho mapping project"===e?s="orthomappingproject":"ortho mapping template"===e?s="orthomappingtemplate":"solution"===e?s="solutions":"geopackage"===e?s="geopackage":"deep learning package"===e?s="deeplearningpackage":"real time analytic"===e?s="realtimeanalytics":"reality mapping project"===e?s="realitymappingproject":"big data analytic"===e?s="bigdataanalytics":"feed"===e?s="feed":"excalibur imagery project"===e?s="excaliburimageryproject":"notebook"===e?s="notebook":"storymap"===e?s="storymap":"survey123 add in"===e?s="survey123addin":"mission"===e?s="mission":"mission report"===e?s="missionreport":"mission template"===e?s="missiontemplate":"quickcapture project"===e?s="quickcaptureproject":"pro report"===e?s="proreport":"pro report template"===e?s="proreporttemplate":"urban model"===e?s="urbanmodel":"urban project"===e?s="urbanproject":"web experience"===e?s="experiencebuilder":"web experience template"===e?s="webexperiencetemplate":"experience builder widget"===e?s="experiencebuilderwidget":"experience builder widget package"===e?s="experiencebuilderwidgetpackage":"workflow"===e?s="workflow":"kernel gateway connection"===e?s="kernelgatewayconnection":"insights script"===e?s="insightsscript":"hub initiative template"===e?s="hubinitiativetemplate":"storymap theme"===e?s="storymaptheme":"knowledge graph"===e?s="knowledgegraph":"knowledge graph layer"===e?s="knowledgegraphlayer":"knowledge studio project"===e?s="knowledgestudio":"native application"===e?s="nativeapp":"native application installer"===e?s="nativeappinstaller":"web link chart"===e?s="linkchart":"knowledge graph web investigation"===e?s="investigation":"ogcfeatureserver"===e?s="features":"pro presentation"===e?s="propresentation":"pro project"===e?s="proproject":"insights workbook package"===e?s="insightsworkbookpackage":"apache parquet"===e?s="apacheparquet":"notebook code snippet library"===e?s="notebookcodesnippets":"suitability model"===e?s="suitabilitymodel":"esri classifier definition"===e?s="classifierdefinition":"esri classification schema"===e?s="classificationschema":"insights data engineering workbook"===e?s="dataengineeringworkbook":"insights data engineering model"===e?s="dataengineeringmodel":"deep learning studio project"===e?s="deeplearningproject":"discussion"===e?s="discussion":"allsource project"===e?s="allsourceproject":"api key"===e?s="apikey":"data pipeline"===e?s="datapipelines":"group layer"===e?(m=i.includes("Map"),s=m?"layergroup2d":"layergroup"):s="media layer"===e?"onlinemedialayer":"form"===e?i.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"maps",s?t(r+s+o+".png"):null}get isLayer(){return null!=this.type&&f.has(this.type)}get itemCdnUrl(){return w(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.id;if(!t)return null;return`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`}load(e){const t=this.portal??(this.portal=h.getDefault()),i=t.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}},i=e instanceof y?e.rating:e;return null==i||isNaN(i)||"number"!=typeof e||(t.query.rating=i),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new y({rating:i,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:o(this.applicationProxies),avgRating:this.avgRating,categories:o(this.categories),classification:o(this.classification),created:o(this.created),culture:this.culture,description:this.description,extent:o(this.extent),groupCategories:o(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:o(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:o(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new v({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");for(const t of["extent","classification"]){const i=e[t];i&&(e[t]=JSON.stringify(i))}return e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new y(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},v)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.applicationProxies&&!Object.hasOwn(e,"appProxies")&&(this.applicationProxies=null),this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e?.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new i("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:o,folder:s,tags:a,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===o,folder:"string"==typeof s?s:s?.id,includeResources:!!o,tags:a?.join(","),title:n}},{itemId:p}=await t.request(`${r}/copy`,l);return new v({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)n(t)?r.query={data:t}:r.query={url:l(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:i}=await import("./support/resourceUtils.js");return i(this,e,t)}async addResource(e,t,i){const{addOrUpdateResources:r}=await import("./support/resourceUtils.js");return e.portalItem=this,await r(this,[{resource:e,content:t,compress:i?.compress,access:i?.access}],"add",i),e}async removeResource(e,t){const{removeResource:r}=await import("./support/resourceUtils.js");if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await import("./support/resourceUtils.js");return t(this,e)}resourceFromPath(e){return new g({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:o(this.categories),classification:o(this.classification),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};return s(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new v({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};e([p({type:["private","shared","org","public"]})],k.prototype,"access",void 0),e([p()],k.prototype,"accessInformation",void 0),e([p({type:String})],k.prototype,"apiKey",void 0),e([p({json:{read:{source:"appProxies"}}})],k.prototype,"applicationProxies",void 0),e([p()],k.prototype,"avgRating",void 0),e([p()],k.prototype,"categories",void 0),e([p()],k.prototype,"classification",void 0),e([p({type:Date})],k.prototype,"created",void 0),e([p()],k.prototype,"culture",void 0),e([p()],k.prototype,"description",void 0),e([p({readOnly:!0})],k.prototype,"displayName",null),e([p({type:m})],k.prototype,"extent",void 0),e([d("extent")],k.prototype,"readExtent",null),e([p()],k.prototype,"groupCategories",void 0),e([p({readOnly:!0})],k.prototype,"iconUrl",null),e([p()],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"isLayer",null),e([p({type:Boolean,readOnly:!0})],k.prototype,"isOrgItem",void 0),e([p()],k.prototype,"itemControl",void 0),e([p({readOnly:!0})],k.prototype,"itemPageUrl",null),e([p({readOnly:!0})],k.prototype,"itemUrl",null),e([p()],k.prototype,"licenseInfo",void 0),e([p({type:Date})],k.prototype,"modified",void 0),e([p()],k.prototype,"name",void 0),e([p()],k.prototype,"numComments",void 0),e([p()],k.prototype,"numRatings",void 0),e([p()],k.prototype,"numViews",void 0),e([p()],k.prototype,"owner",void 0),e([p()],k.prototype,"ownerFolder",void 0),e([p({type:h})],k.prototype,"portal",void 0),e([p()],k.prototype,"screenshots",void 0),e([p()],k.prototype,"size",void 0),e([p()],k.prototype,"snippet",void 0),e([p()],k.prototype,"sourceJSON",void 0),e([p({type:String})],k.prototype,"sourceUrl",void 0),e([p({type:String})],k.prototype,"spatialReference",void 0),e([p()],k.prototype,"tags",void 0),e([p()],k.prototype,"thumbnail",void 0),e([p({readOnly:!0})],k.prototype,"thumbnailUrl",null),e([p()],k.prototype,"title",void 0),e([p()],k.prototype,"type",void 0),e([p()],k.prototype,"typeKeywords",void 0),e([p({type:String,json:{read(e,t){if(b.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],k.prototype,"url",void 0),e([p({readOnly:!0})],k.prototype,"userItemUrl",null),k=v=e([u("esri.portal.PortalItem")],k);export{k as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{getAssetUrl as t}from"../assets.js";import i from"../core/Error.js";import r from"../core/JSONSupport.js";import{clone as o,fixJson as s}from"../core/lang.js";import a from"../core/Loadable.js";import{isDataProtocol as n,makeAbsolute as l}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{ensureClass as c}from"../core/accessorSupport/ensureType.js";import{reader as d}from"../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import m from"../geometry/Extent.js";import h from"./Portal.js";import g from"./PortalItemResource.js";import y from"./PortalRating.js";import{a as w}from"../chunks/persistableUrlUtils.js";var v;const f=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Knowledge Graph Layer","Map Service","Media Layer","Scene Service","Stream Service","Video Service","Vector Tile Service","WCS","WFS","WMS","WMTS"]),b=new Set(["KML","GeoJson","CSV"]);let k=v=class extends(r.JSONSupportMixin(a)){static from(e){return c(v,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.classification=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Geocoding Service"===e?i="Locator":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e?.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"Raster function template"===e?i="Raster Function Template":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e?i="Insights Report":"Excalibur Imagery Project"===e?i="Excalibur Project":"3DTiles Service"===e?i="3D tiles layer":"3DTiles Package"===e&&(i="3D tiles package"),i}readExtent(e){return e&&e.length?new m(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",i=this.typeKeywords||[],r="esri/images/portal/",o="16";let s,a=!1,n=!1,l=!1,p=!1,c=!1,d=!1,u=!1,m=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(a=i.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=i.includes("Table"),l=i.includes("Route Layer"),p=i.includes("Markup"),c=i.includes("Spatiotemporal"),d=i.includes("UtilityNetwork"),s=c&&n?"spatiotemporaltable":n?"table":l?"routelayer":p?"markup":c?"spatiotemporal":d?"utilitynetwork":a?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(c=i.includes("Spatiotemporal"),u=i.includes("Relational"),s=c||u?"mapimages":a||i.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):s="scene service"===e?i.includes("Line")?"sceneweblayerline":i.includes("3DObject")?"sceneweblayermultipatch":i.includes("Point")?"sceneweblayerpoint":i.includes("IntegratedMesh")?"sceneweblayermesh":i.includes("PointCloud")?"sceneweblayerpointcloud":i.includes("Polygon")?"sceneweblayerpolygon":i.includes("Building")?"sceneweblayerbuilding":i.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?i.includes("Elevation 3D Layer")?"elevationlayer":i.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?i.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?i.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?i.includes("3DObject")?"3dobjecttileslayer":i.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?s="maps":"web scene"===e?s=i.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&i.includes("configurableApp")?s="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?s="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&i.includes("ArcGIS Pro")||"explorer map"===e&&i.indexOf("Explorer Document")?s="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?s="datafiles":"360 vr experience"===e?s="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?s="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?s="addindesktop":"pdf"===e?s="pdf":"microsoft word"===e?s="word":"microsoft excel"===e?s="excel":"microsoft powerpoint"===e?s="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&i.includes("Explorer Mapping Application")||i.includes("Document")?s="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?s="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?s="layersgray":"analysis model"===e?s="analysismodel":"scene package"===e?s="scenepackage":"3dtiles package"===e?s="3dtileslayerpackage":"3dtiles service"===e?s="3dtileslayer":"mobile scene package"===e?s="mobilescenepackage":"tile package"===e||"compact tile package"===e?s="tilepackage":"task file"===e?s="taskfile":"report template"===e?s="report-template":"statistical data collection"===e?s="statisticaldatacollection":"insights workbook"===e?s="workbook":"insights model"===e?s="insightsmodel":"insights page"===e?s="insightspage":"insights theme"===e?s="insightstheme":"hub initiative"===e?s="hubinitiative":"hub page"===e?s="hubpage":"hub site application"===e?s="hubsite":"hub event"===e?s="hubevent":"hub project"===e?s="hubproject":"relational database connection"===e?s="relationaldatabaseconnection":"big data file share"===e?s="datastorecollection":"image collection"===e?s="imagecollection":"desktop style"===e?s="desktopstyle":"style"===e?s=i.includes("Dictionary")?"dictionarystyle":"style":"dashboard"===e?s="dashboard":"raster function template"===e?s="rasterprocessingtemplate":"vector tile package"===e?s="vectortilepackage":"ortho mapping project"===e?s="orthomappingproject":"ortho mapping template"===e?s="orthomappingtemplate":"solution"===e?s="solutions":"geopackage"===e?s="geopackage":"deep learning package"===e?s="deeplearningpackage":"real time analytic"===e?s="realtimeanalytics":"reality mapping project"===e?s="realitymappingproject":"big data analytic"===e?s="bigdataanalytics":"feed"===e?s="feed":"excalibur imagery project"===e?s="excaliburimageryproject":"notebook"===e?s="notebook":"storymap"===e?s="storymap":"survey123 add in"===e?s="survey123addin":"mission"===e?s="mission":"mission report"===e?s="missionreport":"mission template"===e?s="missiontemplate":"quickcapture project"===e?s="quickcaptureproject":"pro report"===e?s="proreport":"pro report template"===e?s="proreporttemplate":"urban model"===e?s="urbanmodel":"urban project"===e?s="urbanproject":"web experience"===e?s="experiencebuilder":"web experience template"===e?s="webexperiencetemplate":"experience builder widget"===e?s="experiencebuilderwidget":"experience builder widget package"===e?s="experiencebuilderwidgetpackage":"workflow"===e?s="workflow":"kernel gateway connection"===e?s="kernelgatewayconnection":"insights script"===e?s="insightsscript":"hub initiative template"===e?s="hubinitiativetemplate":"storymap theme"===e?s="storymaptheme":"knowledge graph"===e?s="knowledgegraph":"knowledge graph layer"===e?s="knowledgegraphlayer":"knowledge studio project"===e?s="knowledgestudio":"native application"===e?s="nativeapp":"native application installer"===e?s="nativeappinstaller":"web link chart"===e?s="linkchart":"knowledge graph web investigation"===e?s="investigation":"ogcfeatureserver"===e?s="features":"pro presentation"===e?s="propresentation":"pro project"===e?s="proproject":"insights workbook package"===e?s="insightsworkbookpackage":"apache parquet"===e?s="apacheparquet":"notebook code snippet library"===e?s="notebookcodesnippets":"suitability model"===e?s="suitabilitymodel":"esri classifier definition"===e?s="classifierdefinition":"esri classification schema"===e?s="classificationschema":"insights data engineering workbook"===e?s="dataengineeringworkbook":"insights data engineering model"===e?s="dataengineeringmodel":"deep learning studio project"===e?s="deeplearningproject":"discussion"===e?s="discussion":"allsource project"===e?s="allsourceproject":"api key"===e?s="apikey":"data pipeline"===e?s="datapipelines":"group layer"===e?(m=i.includes("Map"),s=m?"layergroup2d":"layergroup"):s="media layer"===e?"onlinemedialayer":"form"===e?i.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"maps",s?t(r+s+o+".png"):null}get isLayer(){return null!=this.type&&f.has(this.type)}get itemCdnUrl(){return w(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.id;if(!t)return null;return`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`}load(e){const t=this.portal??(this.portal=h.getDefault()),i=t.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}},i=e instanceof y?e.rating:e;return null==i||isNaN(i)||"number"!=typeof e||(t.query.rating=i),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new y({rating:i,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:o(this.applicationProxies),avgRating:this.avgRating,categories:o(this.categories),classification:o(this.classification),created:o(this.created),culture:this.culture,description:this.description,extent:o(this.extent),groupCategories:o(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:o(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:o(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new v({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");for(const t of["extent","classification"]){const i=e[t];i&&(e[t]=JSON.stringify(i))}return e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new y(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},v)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.applicationProxies&&!Object.hasOwn(e,"appProxies")&&(this.applicationProxies=null),this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e?.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new i("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:o,folder:s,tags:a,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===o,folder:"string"==typeof s?s:s?.id,includeResources:!!o,tags:a?.join(","),title:n}},{itemId:p}=await t.request(`${r}/copy`,l);return new v({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)n(t)?r.query={data:t}:r.query={url:l(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new i("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:i}=await import("./support/resourceUtils.js");return i(this,e,t)}async addResource(e,t,i){const{addOrUpdateResources:r}=await import("./support/resourceUtils.js");return e.portalItem=this,await r(this,[{resource:e,content:t,compress:i?.compress,access:i?.access}],"add",i),e}async removeResource(e,t){const{removeResource:r}=await import("./support/resourceUtils.js");if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await import("./support/resourceUtils.js");return t(this,e)}resourceFromPath(e){return new g({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:o(this.categories),classification:o(this.classification),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:o(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:o(this.typeKeywords),url:this.url};return s(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new v({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};e([p({type:["private","shared","org","public"]})],k.prototype,"access",void 0),e([p()],k.prototype,"accessInformation",void 0),e([p({type:String})],k.prototype,"apiKey",void 0),e([p({json:{read:{source:"appProxies"}}})],k.prototype,"applicationProxies",void 0),e([p()],k.prototype,"avgRating",void 0),e([p()],k.prototype,"categories",void 0),e([p()],k.prototype,"classification",void 0),e([p({type:Date})],k.prototype,"created",void 0),e([p()],k.prototype,"culture",void 0),e([p()],k.prototype,"description",void 0),e([p({readOnly:!0})],k.prototype,"displayName",null),e([p({type:m})],k.prototype,"extent",void 0),e([d("extent")],k.prototype,"readExtent",null),e([p()],k.prototype,"groupCategories",void 0),e([p({readOnly:!0})],k.prototype,"iconUrl",null),e([p()],k.prototype,"id",void 0),e([p({readOnly:!0})],k.prototype,"isLayer",null),e([p({type:Boolean,readOnly:!0})],k.prototype,"isOrgItem",void 0),e([p()],k.prototype,"itemControl",void 0),e([p({readOnly:!0})],k.prototype,"itemPageUrl",null),e([p({readOnly:!0})],k.prototype,"itemUrl",null),e([p()],k.prototype,"licenseInfo",void 0),e([p({type:Date})],k.prototype,"modified",void 0),e([p()],k.prototype,"name",void 0),e([p()],k.prototype,"numComments",void 0),e([p()],k.prototype,"numRatings",void 0),e([p()],k.prototype,"numViews",void 0),e([p()],k.prototype,"owner",void 0),e([p()],k.prototype,"ownerFolder",void 0),e([p({type:h})],k.prototype,"portal",void 0),e([p()],k.prototype,"screenshots",void 0),e([p()],k.prototype,"size",void 0),e([p()],k.prototype,"snippet",void 0),e([p()],k.prototype,"sourceJSON",void 0),e([p({type:String})],k.prototype,"sourceUrl",void 0),e([p({type:String})],k.prototype,"spatialReference",void 0),e([p()],k.prototype,"tags",void 0),e([p()],k.prototype,"thumbnail",void 0),e([p({readOnly:!0})],k.prototype,"thumbnailUrl",null),e([p()],k.prototype,"title",void 0),e([p()],k.prototype,"type",void 0),e([p()],k.prototype,"typeKeywords",void 0),e([p({type:String,json:{read(e,t){if(b.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],k.prototype,"url",void 0),e([p({readOnly:!0})],k.prototype,"userItemUrl",null),k=v=e([u("esri.portal.PortalItem")],k);export{k as default};