@arcgis/core 4.34.0-next.6 → 4.34.0-next.8

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/{54ea93f416ab52b413c1.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/4088f4c25a09932a3eb1.js +1 -0
  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/52c34d6ecd9d45a33e69.js +1 -0
  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/{a036503087baa1f9fd00.js → 82ff4229c51011b243f2.js} +1 -1
  54. package/assets/esri/core/workers/chunks/8385c13ac10e595374cb.js +1 -0
  55. package/assets/esri/core/workers/chunks/83db8bd42f94f97c7cf1.js +1 -0
  56. package/assets/esri/core/workers/chunks/87623ebe32c6ae9cb223.js +1 -0
  57. package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +1 -0
  58. package/assets/esri/core/workers/chunks/8b86c75426c55b29ebed.js +1 -0
  59. package/assets/esri/core/workers/chunks/8c4b26d86483646c70d2.js +1 -0
  60. package/assets/esri/core/workers/chunks/9cb242dfc3765b590f51.js +1 -0
  61. package/assets/esri/core/workers/chunks/9ddb0b07be31c3747238.js +1 -0
  62. package/assets/esri/core/workers/chunks/9f0f1472f36b42c507d1.js +1 -0
  63. package/assets/esri/core/workers/chunks/{f840e1655c4f6b6630be.js → 9f964467f7353039dd9c.js} +19 -19
  64. package/assets/esri/core/workers/chunks/9fe62638dc7dce466612.js +1 -0
  65. package/assets/esri/core/workers/chunks/a2e9141ff4efd13413a1.js +66 -0
  66. package/assets/esri/core/workers/chunks/adf6982e2d8102669cdf.js +1 -0
  67. package/assets/esri/core/workers/chunks/{d9b2263e0a9f9068ab62.js → b6c3a2d93a59df9a1418.js} +1 -1
  68. package/assets/esri/core/workers/chunks/b763292829aa4d3fab60.js +1 -0
  69. package/assets/esri/core/workers/chunks/ba015f4f72714820a12f.js +1 -0
  70. package/assets/esri/core/workers/chunks/bbbd58b02a3ee8fe595e.js +1 -0
  71. package/assets/esri/core/workers/chunks/c3d95f7f4370486eed2c.js +1 -0
  72. package/assets/esri/core/workers/chunks/c3df693d1bce8f189fa2.js +1 -0
  73. package/assets/esri/core/workers/chunks/{6993a59cbb78bc26f029.js → c45a314ace9725aa250e.js} +1 -1
  74. package/assets/esri/core/workers/chunks/c96fed4889712f5a9135.js +1 -0
  75. package/assets/esri/core/workers/chunks/c9fbada1e84981784f6c.js +1 -0
  76. package/assets/esri/core/workers/chunks/cefcecbeef4f0a46f58c.js +1 -0
  77. package/assets/esri/core/workers/chunks/d2317b87aa2ac3ad97a6.js +1 -0
  78. package/assets/esri/core/workers/chunks/{0bbb38f59f37c51c72f0.js → d45a4e5806a80b69ceec.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{7a23dc625a812a562c21.js → d5f770302dc686e55ba7.js} +1 -1
  80. package/assets/esri/core/workers/chunks/dc14507cfc052faa5890.js +1 -0
  81. package/assets/esri/core/workers/chunks/e7a440476cd1eb4c6547.js +1 -0
  82. package/assets/esri/core/workers/chunks/ede9738ac20e7dd5ce63.js +1 -0
  83. package/assets/esri/core/workers/chunks/eec034d88db320880133.js +1 -0
  84. package/assets/esri/core/workers/chunks/f1e87720b425d7fb348a.js +1 -0
  85. package/assets/esri/core/workers/chunks/f2863c501d62dece5fdd.js +1 -0
  86. package/assets/esri/core/workers/chunks/f5741d09fd4e1809f580.js +1 -0
  87. package/assets/esri/core/workers/chunks/f9e1b73976027e17cd03.js +1 -0
  88. package/assets/esri/core/workers/chunks/fd207a40faf882d3b2a3.js +1 -0
  89. package/assets/esri/core/workers/chunks/fe3832107278244dc04d.js +1 -0
  90. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  91. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  92. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  93. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  94. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  95. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  96. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  97. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  98. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  99. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  100. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  101. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  102. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  103. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  104. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  105. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  106. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  107. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  108. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  109. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  110. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  111. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  112. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  113. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  114. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  115. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  116. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  117. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  118. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  119. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  120. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  121. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  122. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  123. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  124. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  125. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  126. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  127. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  128. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  129. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  130. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  131. package/chunks/aiServices.js +1 -1
  132. package/config.js +1 -1
  133. package/core/workers/Connection.js +1 -1
  134. package/core/workers/RemoteClient.js +1 -1
  135. package/core/workers/WorkerHandle.js +1 -1
  136. package/effects/FocusArea.d.ts +4 -0
  137. package/effects/FocusArea.js +1 -1
  138. package/effects/FocusAreaOutline.d.ts +4 -0
  139. package/effects/FocusAreaOutline.js +1 -1
  140. package/effects/FocusAreas.d.ts +4 -0
  141. package/effects/FocusAreas.js +1 -1
  142. package/geometry.js +1 -1
  143. package/interfaces.d.ts +530 -433
  144. package/kernel.js +1 -1
  145. package/layers/BuildingSceneLayer.js +1 -1
  146. package/layers/GroupLayer.js +1 -1
  147. package/layers/ImageryLayer.js +1 -1
  148. package/layers/ImageryTileLayer.js +1 -1
  149. package/layers/VideoLayer.js +1 -1
  150. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  151. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  152. package/layers/graphics/editingSupport.js +1 -1
  153. package/layers/mixins/ImageryTileMixin.js +1 -1
  154. package/layers/mixins/operationalLayerModuleMap.js +1 -1
  155. package/layers/mixins/operationalLayers.js +1 -1
  156. package/layers/support/BuildingSummaryStatistics.js +1 -1
  157. package/layers/support/PromiseQueue.js +1 -1
  158. package/layers/support/TelemetryDisplay.js +1 -1
  159. package/layers/support/TitleCreator.js +1 -1
  160. package/layers/support/arcgisLayers.js +1 -1
  161. package/layers/support/featurePopupQueryUtils.js +5 -0
  162. package/layers/support/fieldUtils.js +1 -1
  163. package/layers/support/layersCreator.js +1 -1
  164. package/layers/support/multiLayerServiceUtils.js +5 -0
  165. package/networks/CircuitManager.js +1 -1
  166. package/networks/UnitIdentifierManager.js +1 -1
  167. package/networks/UtilityNetwork.js +1 -1
  168. package/networks/support/UNTraceConfiguration.js +1 -1
  169. package/networks/support/typeUtils.js +1 -1
  170. package/package.json +1 -1
  171. package/portal/PortalItem.js +1 -1
  172. package/portal/support/layersLoader.js +1 -1
  173. package/portal/support/portalLayers.js +1 -1
  174. package/rasterRenderers.js +1 -1
  175. package/renderers/support/colorRampUtils.js +1 -1
  176. package/renderers.js +1 -1
  177. package/rest/featureService/FeatureService.js +1 -1
  178. package/rest/networks/circuits/queryCircuits.js +1 -1
  179. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  180. package/rest/networks/support/CircuitTraceResult.js +5 -0
  181. package/rest/networks/support/TraceResult.js +1 -1
  182. package/rest/networks/unitIdentifiers/support/{QueryUnitIdentifiersParamters.js → QueryUnitIdentifiersParameters.js} +1 -1
  183. package/support/revision.js +1 -1
  184. package/symbols/cim/animationUtils.js +1 -1
  185. package/symbols/cim/cimAnalyzer.js +1 -1
  186. package/symbols/cim/defaultCIMValues.js +1 -1
  187. package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
  188. package/symbols/cim/utils.js +1 -1
  189. package/symbols/support/ElevationInfo.d.ts +4 -0
  190. package/symbols/support/ElevationInfo.js +1 -1
  191. package/symbols/support/FeatureExpressionInfo.d.ts +4 -0
  192. package/symbols/support/FeatureExpressionInfo.js +1 -1
  193. package/symbols/support/cimSymbolUtils.js +1 -1
  194. package/symbols/support/previewCIMSymbol.js +1 -1
  195. package/symbols.js +1 -1
  196. package/views/2d/engine/webgl/animations/infos.js +1 -1
  197. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  198. package/views/2d/engine/webgl/animations/utils.js +1 -1
  199. package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
  200. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
  201. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +1 -1
  202. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +5 -0
  203. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +5 -0
  204. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +5 -0
  205. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +5 -0
  206. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +5 -0
  209. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechniques.js +5 -0
  211. package/views/2d/engine/webgl/shaderGraph/techniques/animated/ComputedAnimatedParams.js +5 -0
  212. package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +5 -0
  213. package/views/2d/engine/webgl/shaderGraph/techniques/animated/enums.js +1 -1
  214. package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
  215. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  216. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  217. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
  218. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  219. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  220. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  221. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  222. package/views/2d/layers/MediaLayerView2D.js +1 -1
  223. package/views/2d/layers/TileLayerView2D.js +1 -1
  224. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  225. package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
  226. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  227. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  228. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  229. package/views/3d/layers/I3SMeshView3D.js +1 -1
  230. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  231. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  232. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  233. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  234. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  235. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  236. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  237. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  238. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  239. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  240. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  241. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  242. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  243. package/views/3d/terrain/OverlayRenderer.js +1 -1
  244. package/views/3d/terrain/TerrainRenderer.js +1 -1
  245. package/views/3d/terrain/TerrainSurface.js +1 -1
  246. package/views/3d/terrain/TileRenderer.js +1 -1
  247. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  248. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  249. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  250. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  251. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  252. package/views/SelectionManager.js +1 -1
  253. package/views/VideoView.js +1 -1
  254. package/views/draw/support/GraphicMover.js +1 -1
  255. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  256. package/views/layers/FeatureLayerView.js +1 -1
  257. package/views/layers/ImageryLayerView.js +1 -1
  258. package/views/layers/ImageryTileLayerView.js +1 -1
  259. package/views/layers/PointCloudLayerView.js +1 -1
  260. package/views/support/TextureCompressionTracker.js +5 -0
  261. package/views/webgl/Texture.js +1 -1
  262. package/webdoc/support/writeUtils.js +1 -1
  263. package/webmap/utils.js +1 -1
  264. package/widgets/Attachments.js +1 -1
  265. package/widgets/BatchAttributeForm.js +1 -1
  266. package/widgets/Directions/DirectionsVisibleElements.js +1 -1
  267. package/widgets/Directions.js +1 -1
  268. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  269. package/widgets/Editor/EditorViewModel.js +1 -1
  270. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  271. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  272. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  273. package/widgets/Editor/workflowUtils.js +1 -1
  274. package/widgets/Feature/support/featureUtils.js +1 -1
  275. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  276. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  277. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  278. package/widgets/FeatureForm.js +1 -1
  279. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  280. package/widgets/Features/FeaturesViewModel.js +1 -1
  281. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  282. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  283. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  284. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  285. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  286. package/widgets/OrientedImageryViewer/videoViewerUtils.js +5 -0
  287. package/widgets/OrientedImageryViewer.js +1 -1
  288. package/widgets/Sketch.js +1 -1
  289. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  290. package/widgets/support/SelectionToolbar.js +1 -1
  291. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  292. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  293. package/assets/esri/core/workers/chunks/003ddb190a5cc56f7925.js +0 -1
  294. package/assets/esri/core/workers/chunks/03db109e9b695528c35d.js +0 -1
  295. package/assets/esri/core/workers/chunks/09da6b3085fc84cd69d5.js +0 -1
  296. package/assets/esri/core/workers/chunks/09f76ca9b47b465c934f.js +0 -1
  297. package/assets/esri/core/workers/chunks/0a770f283eb77c8dc97a.js +0 -1
  298. package/assets/esri/core/workers/chunks/0b70b2ee62904318a12c.js +0 -1
  299. package/assets/esri/core/workers/chunks/0c2dccec20c0994366fe.js +0 -1
  300. package/assets/esri/core/workers/chunks/0d78fc2c2bc1152f84db.js +0 -1
  301. package/assets/esri/core/workers/chunks/0fb5de3f8a4d69b2d514.js +0 -1
  302. package/assets/esri/core/workers/chunks/17e43a050fbf8dc87588.js +0 -1
  303. package/assets/esri/core/workers/chunks/1d7f2abfccc54659d6f2.js +0 -1
  304. package/assets/esri/core/workers/chunks/1f9c6fbcd4d0eae1e574.js +0 -1
  305. package/assets/esri/core/workers/chunks/22e53cb1c8c575fa4d46.js +0 -1
  306. package/assets/esri/core/workers/chunks/2cf82d3645c75d311e99.js +0 -1
  307. package/assets/esri/core/workers/chunks/2d90806faa4269828948.js +0 -1
  308. package/assets/esri/core/workers/chunks/306e262f148b3057b11b.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/51c31e6d014005107d42.js +0 -1
  321. package/assets/esri/core/workers/chunks/5200be8bce60fa831026.js +0 -1
  322. package/assets/esri/core/workers/chunks/52a57106a41b8c9483d7.js +0 -1
  323. package/assets/esri/core/workers/chunks/536d7986ebb710a8a452.js +0 -1
  324. package/assets/esri/core/workers/chunks/5617532299f73d186968.js +0 -1
  325. package/assets/esri/core/workers/chunks/56d2a20c1b143697aa19.js +0 -1
  326. package/assets/esri/core/workers/chunks/5890740d5a761b038560.js +0 -1
  327. package/assets/esri/core/workers/chunks/5dbd8d81d94cfda5bb32.js +0 -1
  328. package/assets/esri/core/workers/chunks/5e1f7fe6bbc5754efee1.js +0 -1
  329. package/assets/esri/core/workers/chunks/61f9747c960d959b571b.js +0 -346
  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/c9ab067b07d1eab974d1.js +0 -1
  348. package/assets/esri/core/workers/chunks/d3c0d7799c92c6f0e7d3.js +0 -1
  349. package/assets/esri/core/workers/chunks/d52f5214a0330ed2e05e.js +0 -1
  350. package/assets/esri/core/workers/chunks/dbe10c20df7e0e563a0b.js +0 -1
  351. package/assets/esri/core/workers/chunks/df7ca2fe12e22ccfde17.js +0 -1
  352. package/assets/esri/core/workers/chunks/df933eac03dc63064723.js +0 -1
  353. package/assets/esri/core/workers/chunks/e89345c7af9d3d4d8452.js +0 -1
  354. package/assets/esri/core/workers/chunks/ee6240636d04d7d37b7b.js +0 -1
  355. package/assets/esri/core/workers/chunks/ef7955a2509be0f03ca2.js +0 -1
  356. package/assets/esri/core/workers/chunks/f00f8609bf0d14b488b8.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
- 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};
@@ -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{parse as t}from"../../layers/support/arcgisLayerUrl.js";import{fetchFeatureService as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as a}from"../../layers/support/LayerLoadContext.js";import o from"../Portal.js";import{createForItemRead as n}from"./jsonContext.js";import{instanceTypeToLayerTypes as s,getSublayersByLayerType as l,getFirstLayerOrTable as i,preprocessFSItemData as u,populateSceneServiceItemData as p,getNumLayersAndTables as c,layerTypeToLayerModuleType as y,createSublayerData as m}from"./loadUtils.js";import{hasTypeKeyword as d}from"./portalItemUtils.js";import{loadStyleRenderer as f}from"../../renderers/support/styleUtils.js";import{fetchArcGISServiceJSON as w}from"../../support/requestPresets.js";async function h(e,t){const r=e.instance.portalItem;if(r?.id)return await r.load(t),g(e),e.validateItem&&e.validateItem(r),I(e,t)}function g(t){const r=t.instance.portalItem;if(!r?.type||!t.supportedTypes.includes(r.type))throw new e("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:r?.type,expectedType:t.supportedTypes.join(", ")})}async function I(e,t){const r=e.instance,o=r.portalItem;if(!o)return;const{url:s,title:l}=o,i=n(o,"portal-item");if("group"===r.type)return b(r,i,e);s&&"media"!==r.type&&r.read({url:s},i);const u=new a,p=await F(e,u,t);return p&&r.read(p,i),r.resourceReferences={portalItem:o,paths:i.readResourcePaths??[]},"subtype-group"!==r.type&&r.read({title:l},i),f(r,i)}async function b(t,r,a){const o=t.portalItem;if(!t.sourceIsPortalItem)return;const{title:n,type:s}=o;if("Group Layer"===s){if(!d(o,"Map"))throw new e("portal:invalid-layer-item-typekeyword","'Group Layer' item without 'Map' type keyword is not supported");return L(t,a)}return t.read({title:n},r),S(t,a)}async function L(t,r){const a=t.portalItem,o=await a.fetchData("json");if(!o)return;if(!r.populateGroupLayer)throw new e("portal:missing-populate-group-layer","Missing populate group layer");const s=n(a,"web-map");t.read(o,s),await r.populateGroupLayer(t,o,{context:s}),t.resourceReferences={portalItem:a,paths:s.readResourcePaths??[]}}async function S(t,r){let o;const{portalItem:n}=t;if(!n)return;const s=n.type,l=r.layerModuleTypeMap;if(!l)throw new e("portal:missing-layer-module-type-map","Layer module type map is required to construct sub layers");switch(s){case"Feature Service":case"Feature Collection":o=l.FeatureLayer;break;case"Stream Service":o=l.StreamLayer;break;case"Scene Service":o=l.SceneLayer;break;default:throw new e("portal:unsupported-item-type-as-group",`The item type '${s}' is not supported as a 'IGroupLayer'`)}const y=new a;let[m,d]=await Promise.all([o(),F(r,y)]),f=()=>m;if("Feature Service"===s){const e=i(d)?.customParameters;d=n.url?await u(d,n.url,y):{},f=await D(d,l)||f;const r=await C(n.url,{customParameters:e,loadContext:y});return await v(t,f,f,d,l,r)}return"Scene Service"===s&&n.url&&(d=await p(n,d,y)),c(d)>0?await v(t,f,null,d,l):await T(t,f,l)}async function T(e,t,r){const{portalItem:a}=e;if(!a?.url)return;const o=await w(a.url);o&&v(e,t,null,{layers:o.layers?.map(m),tables:o.tables?.map(m)},r)}async function v(e,t,r,a,o,n){let s=a.layers||[];const l=a.tables||[];if("Feature Collection"===e.portalItem?.type?(s.forEach(((e,t)=>{e.id=t,"Table"===e?.layerDefinition?.type&&l.push(e)})),s=s.filter((e=>"Table"!==e?.layerDefinition?.type))):(s.reverse(),l.reverse()),s.forEach((r=>{const o=n?.(r);if(o||!n){const n=j(e,t(r),a,r,o);e.add(n)}})),l.length){const t=r?null:await o.FeatureLayer();l.forEach((o=>{const s=n?.(o);if(s||!n){const n=j(e,r?r(o):t,a,o,s);e.tables.add(n)}}))}}function j(e,t,r,a,n){const s=e.portalItem,l={portalItem:s.clone(),layerId:a.id};null!=a.url&&(l.url=a.url);const i=new t(l);if("sourceJSON"in i&&(i.sourceJSON=n),"subtype-group"!==i.type&&"catalog"!==i.type&&(i.sublayerTitleMode="service-name"),"Feature Collection"===s.type){const e={origin:"portal-item",portal:s.portal||o.getDefault()};i.read(a,e);const t=r.showLegend;null!=t&&i.read({showLegend:t},e)}return i}async function F(e,t,r){if(!1===e.supportsData)return;const a=e.instance,o=a.portalItem;if(!o)return;let n=null;try{n=await o.fetchData("json",r)}catch(u){}if(x(a)){let e=null;const r=await M(o,n,t);if((n?.layers||n?.tables)&&r>0){if(null==a.layerId){const e=s(a.type),t=e?.length?l(n,e)[0]:i(n);t&&(a.layerId=t.id)}e=P(n,a),"OrientedImageryLayer"===e?.layerType&&"oriented-imagery"===a.type&&a.supportedSourceTypes.add("Feature Layer"),e&&null!=n.showLegend&&(e.showLegend=n.showLegend)}return r>1&&"sublayerTitleMode"in a&&"service-name"!==a.sublayerTitleMode&&(a.sublayerTitleMode="item-title-and-service-name"),e}return n}async function M(e,r,a){if(r?.layers&&r?.tables)return c(r);const o=t(e.url);if(!o)return 1;const n=await a.fetchServiceMetadata(o.url.path,{customParameters:i(r)?.customParameters}).catch((()=>null));return(r?.layers?.length??n?.layers?.length??0)+(r?.tables?.length??n?.tables?.length??0)}function P(e,t){const{layerId:r}=t,a=e.layers?.find((e=>e.id===r))||e.tables?.find((e=>e.id===r));return a&&G(a,t)?a:null}function x(e){return"stream"!==e.type&&"layerId"in e}function G(e,t){const r="layerType"in e&&e.layerType,{type:a}=t;return!("feature"===a&&r&&"ArcGISFeatureLayer"!==e.layerType||"catalog"===a&&!r||"oriented-imagery"===a&&!r||"subtype-group"===a&&!r)}async function C(e,t){const{layersJSON:a}=await r(e,t);if(!a)return null;const o=[...a.layers,...a.tables];return e=>o.find((t=>t.id===e.id))}async function D(e,t){const{layers:r,tables:a}=e,o=[...r??[],...a??[]];if(!o.length)return;const n=new Set,s=[];for(const{layerType:u}of o){const e=u??"ArcGISFeatureLayer";if(n.has(e))continue;n.add(e);const r=t[y(e)];s.push(r())}const l=await Promise.all(s),i=new Map;return Array.from(n).forEach(((e,t)=>{i.set(e,l[t])})),({layerType:e})=>{const t=e??"ArcGISFeatureLayer";return i.get(t)}}export{h as load};
5
+ import e from"../../core/Error.js";import{parse as t}from"../../layers/support/arcgisLayerUrl.js";import{fetchFeatureService as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as a}from"../../layers/support/LayerLoadContext.js";import n from"../Portal.js";import{createForItemRead as o}from"./jsonContext.js";import{instanceTypeToLayerTypes as s,getSublayersByLayerType as l,getFirstLayerOrTable as i,preprocessFSItemData as u,populateSceneServiceItemData as c,getNumLayersAndTables as p,layerTypeToLayerModuleType as y,createSublayerData as d}from"./loadUtils.js";import{hasTypeKeyword as m}from"./portalItemUtils.js";import{loadStyleRenderer as f}from"../../renderers/support/styleUtils.js";import{fetchArcGISServiceJSON as w}from"../../support/requestPresets.js";async function h(e,t){const r=e.instance.portalItem;if(r?.id)return await r.load(t),g(e),e.validateItem&&e.validateItem(r),I(e,t)}function g(t){const r=t.instance.portalItem;if(!r?.type||!t.supportedTypes.includes(r.type))throw new e("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:r?.type,expectedType:t.supportedTypes.join(", ")})}async function I(e,t){const r=e.instance,n=r.portalItem;if(!n)return;const{url:s,title:l}=n,i=o(n,"portal-item");if("group"===r.type)return b(r,i,e);s&&"media"!==r.type&&r.read({url:s},i);const u=new a,c=await M(e,u,t);return c&&r.read(c,i),r.resourceReferences={portalItem:n,paths:i.readResourcePaths??[]},"subtype-group"!==r.type&&r.read({title:l},i),f(r,i)}async function b(t,r,a){const n=t.portalItem;if(!t.sourceIsPortalItem)return;const{title:o,type:s}=n;if("Group Layer"===s){if(!m(n,"Map"))throw new e("portal:invalid-layer-item-typekeyword","'Group Layer' item without 'Map' type keyword is not supported");return L(t,a)}return t.read({title:o},r),S(t,a)}async function L(t,r){const a=t.portalItem,n=await a.fetchData("json");if(!n)return;if(!r.populateGroupLayer)throw new e("portal:missing-populate-group-layer","Missing populate group layer");const s=o(a,"web-map");t.read(n,s),await r.populateGroupLayer(t,n,{context:s}),t.resourceReferences={portalItem:a,paths:s.readResourcePaths??[]}}async function S(t,r){let n;const{portalItem:o}=t;if(!o)return;const s=o.type,l=r.layerModuleTypeMap;if(!l)throw new e("portal:missing-layer-module-type-map","Layer module type map is required to construct sub layers");switch(s){case"Feature Service":case"Feature Collection":n=l.FeatureLayer;break;case"Stream Service":n=l.StreamLayer;break;case"Scene Service":n=l.SceneLayer;break;case"Video Service":n=l.VideoLayer;break;default:throw new e("portal:unsupported-item-type-as-group",`The item type '${s}' is not supported as a 'IGroupLayer'`)}const y="Video Service"===s,d=new a;let[m,f]=await Promise.all([n(),y?null:M(r,d)]),w=()=>m;if(y)return T(t,w,l);if("Feature Service"===s){const e=i(f)?.customParameters;f=o.url?await u(f,o.url,d):{},w=await D(f,l)||w;const r=await C(o.url,{customParameters:e,loadContext:d});return await j(t,w,w,f,l,r)}return"Scene Service"===s&&o.url&&(f=await c(o,f,d)),p(f)>0?await j(t,w,null,f,l):await v(t,w,l)}async function v(e,t,r){const{portalItem:a}=e;if(!a?.url)return;const n=await w(a.url);n&&j(e,t,null,{layers:n.layers?.map(d),tables:n.tables?.map(d)},r)}async function T(e,t,r){const{portalItem:a}=e;if(!a?.url)return;const n=await w(a.url);n&&j(e,t,null,{layers:n.layers?.map((({id:e,name:t})=>({id:e,name:t})))},r)}async function j(e,t,r,a,n,o){let s=a.layers||[];const l=a.tables||[];if("Feature Collection"===e.portalItem?.type?(s.forEach(((e,t)=>{e.id=t,"Table"===e?.layerDefinition?.type&&l.push(e)})),s=s.filter((e=>"Table"!==e?.layerDefinition?.type))):(s.reverse(),l.reverse()),s.forEach((r=>{const n=o?.(r);if(n||!o){const o=F(e,t(r),a,r,n);e.add(o)}})),l.length){const t=r?null:await n.FeatureLayer();l.forEach((n=>{const s=o?.(n);if(s||!o){const o=F(e,r?r(n):t,a,n,s);e.tables.add(o)}}))}}function F(e,t,r,a,o){const s=e.portalItem,l={portalItem:s.clone(),layerId:a.id};null!=a.url&&(l.url=a.url);const i=new t(l);if("sourceJSON"in i&&(i.sourceJSON=o),"subtype-group"!==i.type&&"catalog"!==i.type&&(i.sublayerTitleMode="service-name"),"Feature Collection"===s.type){const e={origin:"portal-item",portal:s.portal||n.getDefault()};i.read(a,e);const t=r.showLegend;null!=t&&i.read({showLegend:t},e)}return i}async function M(e,t,r){if(!1===e.supportsData)return;const a=e.instance,n=a.portalItem;if(!n)return;let o=null;try{o=await n.fetchData("json",r)}catch(u){}if(G(a)){let e=null;const r=await P(n,o,t);if((o?.layers||o?.tables)&&r>0){if(null==a.layerId){const e=s(a.type),t=e?.length?l(o,e)[0]:i(o);t&&(a.layerId=t.id)}e=x(o,a),"OrientedImageryLayer"===e?.layerType&&"oriented-imagery"===a.type&&a.supportedSourceTypes.add("Feature Layer"),e&&null!=o.showLegend&&(e.showLegend=o.showLegend)}return r>1&&"sublayerTitleMode"in a&&"service-name"!==a.sublayerTitleMode&&(a.sublayerTitleMode="item-title-and-service-name"),e}return o}async function P(e,r,a){if(r?.layers&&r?.tables)return p(r);const n=t(e.url);if(!n)return 1;const o=await a.fetchServiceMetadata(n.url.path,{customParameters:i(r)?.customParameters}).catch((()=>null));return(r?.layers?.length??o?.layers?.length??0)+(r?.tables?.length??o?.tables?.length??0)}function x(e,t){const{layerId:r}=t,a=e.layers?.find((e=>e.id===r))||e.tables?.find((e=>e.id===r));return a&&k(a,t)?a:null}function G(e){return"stream"!==e.type&&"layerId"in e}function k(e,t){const r="layerType"in e&&e.layerType,{type:a}=t;return!("feature"===a&&r&&"ArcGISFeatureLayer"!==e.layerType||"catalog"===a&&!r||"oriented-imagery"===a&&!r||"subtype-group"===a&&!r)}async function C(e,t){const{layersJSON:a}=await r(e,t);if(!a)return null;const n=[...a.layers,...a.tables];return e=>n.find((t=>t.id===e.id))}async function D(e,t){const{layers:r,tables:a}=e,n=[...r??[],...a??[]];if(!n.length)return;const o=new Set,s=[];for(const{layerType:u}of n){const e=u??"ArcGISFeatureLayer";if(o.has(e))continue;o.add(e);const r=t[y(e)];s.push(r())}const l=await Promise.all(s),i=new Map;return Array.from(o).forEach(((e,t)=>{i.set(e,l[t])})),({layerType:e})=>{const t=e??"ArcGISFeatureLayer";return i.get(t)}}export{h as load};
@@ -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{findAssociatedFeatureService as a}from"../../layers/support/associatedFeatureServiceUtils.js";import{getLayerModuleType as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as t}from"../../layers/support/LayerLoadContext.js";import{sceneServiceLayerTypeToClassName as s}from"../../layers/support/layerUtils.js";import{layerLookupMap as n}from"../../layers/support/lazyLayerLoader.js";import c from"../PortalItem.js";import{getFirstLayerOrTable as o,getNumLayersAndTables as i,preprocessFSItemData as u,getLayerOrTable as l,layerTypeToLayerModuleType as m,populateSceneServiceItemData as y}from"./loadUtils.js";import{hasTypeKeyword as f}from"./portalItemUtils.js";async function p(e){let{portalItem:a}=e;!a||a instanceof c||(a=new c(a));const r=await d(a);return new(0,r.constructor)({portalItem:a,...r.properties})}async function d(e){await e.load();const a=new t;return w(await L(e,a))}async function L(a,r){switch(a.type){case"3DTiles Service":return a.typeKeywords.includes("3DObject")?C():T();case"CSV":return G();case"Feature Collection":return v(a);case"Feature Service":return S(a,r);case"Feed":return D();case"GeoJson":return j();case"Group Layer":return O();case"Image Service":return I(a,r);case"KML":return P();case"Knowledge Graph Layer":return F();case"Map Service":return N(a,r);case"Media Layer":return V();case"Scene Service":return h(a,r);case"Stream Service":return M();case"Vector Tile Service":return g();case"WCS":return b();case"WFS":return K();case"WMS":return W();case"WMTS":return U();default:throw new e("portal:unknown-item-type","Unknown item type '${type}'",{type:a.type})}}async function w(e){const a=e.className,r=n[a];return{constructor:await r(),properties:e.properties}}async function N(e,a){return await x(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}async function S(e,a){const r=await J(e,a);if("object"==typeof r){const{sourceJSON:e,className:a}=r,t={sourceJSON:e};return null!=r.id&&(t.layerId=r.id),{className:a||"FeatureLayer",properties:t}}return{className:"GroupLayer"}}async function h(e,r){const t=await J(e,r,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await a(e.url,{sceneLayerItem:e}),s=await r.fetchServiceMetadata(t);return s?.tables??[]}catch{return[]}}));if("object"==typeof t){const a={};let n;if(null!=t.id?(a.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const r of Object.keys(s))if(e.typeKeywords.includes(r))return{className:s[r]};const c=await r.fetchServiceMetadata(n,{customParameters:await r.fetchCustomParameters(e,(e=>o(e)?.customParameters))});return{className:s[c?.layerType]||"SceneLayer",properties:a}}if(!1===t){const a=await r.fetchServiceMetadata(e.url);if("Voxel"===a?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}async function v(e){await e.load();const a=f(e,"Map Notes"),r=f(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if(f(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===i(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}async function I(e,a){await e.load();const r=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await a.fetchItemData(e),s=t?.layerType;if("ArcGISTiledImageServiceLayer"===s)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===s)return{className:"ImageryLayer"};const n=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),c=n.cacheType?.toLowerCase(),o=n.capabilities?.toLowerCase().includes("tilesonly"),i=n.tileInfo?.format?.toLowerCase()??"",u=null==c&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(i);return"map"===c||u||o?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}function M(){return{className:"StreamLayer"}}function g(){return{className:"VectorTileLayer"}}function j(){return{className:"GeoJSONLayer"}}function T(){return{className:"IntegratedMesh3DTilesLayer"}}function C(){return{className:"UnsupportedLayer"}}function G(){return{className:"CSVLayer"}}function P(){return{className:"KMLLayer"}}function F(){return{className:"KnowledgeGraphLayer"}}function b(){return{className:"WCSLayer"}}function K(){return{className:"WFSLayer"}}function W(){return{className:"WMSLayer"}}function U(){return{className:"WMTSLayer"}}function D(){return{className:"StreamLayer"}}function O(){return{className:"GroupLayer"}}function V(){return{className:"MediaLayer"}}async function x(e,a){const{tileInfo:r}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return r}async function J(e,a,t){const{url:s,type:n}=e,c="Feature Service"===n;if(!s)return{};if(/\/\d+$/.test(s)){if(c){const t=await a.fetchServiceMetadata(s,{customParameters:await a.fetchCustomParameters(e,(e=>o(e)?.customParameters))});return{id:t.id,className:r(t.type),sourceJSON:t}}return{}}await e.load();let f=await a.fetchItemData(e);if(c){const e=await u(f,s,a),r=k(e);if("object"==typeof r){const a=l(e,r.id);r.className=m(a?.layerType)}return r}"Scene Service"===n&&(f=await y(e,f,a));if(i(f)>0)return k(f);const p=await a.fetchServiceMetadata(s);return t&&(p.tables=await t()),k(p)}function k(e){return 1===i(e)&&{id:o(e)?.id}}export{p as fromItem,L as selectLayerClassPath};
5
+ import e from"../../core/Error.js";import{findAssociatedFeatureService as a}from"../../layers/support/associatedFeatureServiceUtils.js";import{getLayerModuleType as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as t}from"../../layers/support/LayerLoadContext.js";import{sceneServiceLayerTypeToClassName as s}from"../../layers/support/layerUtils.js";import{layerLookupMap as c}from"../../layers/support/lazyLayerLoader.js";import n from"../PortalItem.js";import{getFirstLayerOrTable as o,getNumLayersAndTables as i,preprocessFSItemData as u,getLayerOrTable as l,layerTypeToLayerModuleType as y,populateSceneServiceItemData as m}from"./loadUtils.js";import{hasTypeKeyword as f}from"./portalItemUtils.js";async function p(e){let{portalItem:a}=e;!a||a instanceof n||(a=new n(a));const r=await d(a);return new(0,r.constructor)({portalItem:a,...r.properties})}async function d(e){await e.load();const a=new t;return w(await L(e,a))}async function L(a,r){switch(a.type){case"3DTiles Service":return a.typeKeywords.includes("3DObject")?G():C();case"CSV":return P();case"Feature Collection":return h(a);case"Feature Service":return S(a,r);case"Feed":return D();case"GeoJson":return T();case"Group Layer":return O();case"Image Service":return I(a,r);case"KML":return b();case"Knowledge Graph Layer":return F();case"Map Service":return N(a,r);case"Media Layer":return x();case"Scene Service":return v(a,r);case"Stream Service":return M();case"Video Service":return g(a,r);case"Vector Tile Service":return j();case"WCS":return V();case"WFS":return K();case"WMS":return W();case"WMTS":return U();default:throw new e("portal:unknown-item-type","Unknown item type '${type}'",{type:a.type})}}async function w(e){const a=e.className,r=c[a];return{constructor:await r(),properties:e.properties}}async function N(e,a){return await J(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}async function S(e,a){const r=await k(e,a);if("object"==typeof r){const{sourceJSON:e,className:a}=r,t={sourceJSON:e};return null!=r.id&&(t.layerId=r.id),{className:a||"FeatureLayer",properties:t}}return{className:"GroupLayer"}}async function v(e,r){const t=await k(e,r,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await a(e.url,{sceneLayerItem:e}),s=await r.fetchServiceMetadata(t);return s?.tables??[]}catch{return[]}}));if("object"==typeof t){const a={};let c;if(null!=t.id?(a.layerId=t.id,c=`${e.url}/layers/${t.id}`):c=e.url,e.typeKeywords?.length)for(const r of Object.keys(s))if(e.typeKeywords.includes(r))return{className:s[r]};const n=await r.fetchServiceMetadata(c,{customParameters:await r.fetchCustomParameters(e,(e=>o(e)?.customParameters))});return{className:s[n?.layerType]||"SceneLayer",properties:a}}if(!1===t){const a=await r.fetchServiceMetadata(e.url);if("Voxel"===a?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}async function h(e){await e.load();const a=f(e,"Map Notes"),r=f(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if(f(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===i(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}async function I(e,a){await e.load();const r=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await a.fetchItemData(e),s=t?.layerType;if("ArcGISTiledImageServiceLayer"===s)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===s)return{className:"ImageryLayer"};const c=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),n=c.cacheType?.toLowerCase(),o=c.capabilities?.toLowerCase().includes("tilesonly"),i=c.tileInfo?.format?.toLowerCase()??"",u=null==n&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(i);return"map"===n||u||o?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}function M(){return{className:"StreamLayer"}}async function g(e,a){return"object"==typeof await k(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}function j(){return{className:"VectorTileLayer"}}function T(){return{className:"GeoJSONLayer"}}function C(){return{className:"IntegratedMesh3DTilesLayer"}}function G(){return{className:"UnsupportedLayer"}}function P(){return{className:"CSVLayer"}}function b(){return{className:"KMLLayer"}}function F(){return{className:"KnowledgeGraphLayer"}}function V(){return{className:"WCSLayer"}}function K(){return{className:"WFSLayer"}}function W(){return{className:"WMSLayer"}}function U(){return{className:"WMTSLayer"}}function D(){return{className:"StreamLayer"}}function O(){return{className:"GroupLayer"}}function x(){return{className:"MediaLayer"}}async function J(e,a){const{tileInfo:r}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return r}async function k(e,a,t){const{url:s,type:c}=e,n="Feature Service"===c;if(!s)return{};if(/\/\d+$/.test(s)){if(n){const t=await a.fetchServiceMetadata(s,{customParameters:await a.fetchCustomParameters(e,(e=>o(e)?.customParameters))});return{id:t.id,className:r(t.type),sourceJSON:t}}return{}}if("Video Service"===c){const e=await a.fetchServiceMetadata(s);return!((e.layers?.length??0)>1)&&{}}await e.load();let f=await a.fetchItemData(e);if(n){const e=await u(f,s,a),r=$(e);if("object"==typeof r){const a=l(e,r.id);r.className=y(a?.layerType)}return r}"Scene Service"===c&&(f=await m(e,f,a));if(i(f)>0)return $(f);const p=await a.fetchServiceMetadata(s);return t&&(p.tables=await t()),$(p)}function $(e){return 1===i(e)&&{id:o(e)?.id}}export{p as fromItem,L as selectLayerClassPath};
@@ -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{deprecatedModule as r}from"./core/deprecate.js";import e from"./core/Logger.js";import o from"./renderers/ClassBreaksRenderer.js";import s from"./renderers/FlowRenderer.js";import n from"./renderers/RasterColormapRenderer.js";import t from"./renderers/RasterShadedReliefRenderer.js";import d from"./renderers/RasterStretchRenderer.js";import m from"./renderers/UniqueValueRenderer.js";import i from"./renderers/VectorFieldRenderer.js";const a=o,p=d,R=s,f=n,c=t,j=m,l=i;function g(){}r(e.getLogger("esri.rasterRenderers"),"esri.rasterRenderers",{replacement:"Individual raster renderer module imports",version:"4.32",warnOnce:!0});export{a as ClassBreaksRenderer,R as FlowRenderer,f as RasterColormapRenderer,c as RasterShadedReliefRenderer,p as RasterStretchRenderer,j as UniqueValueRenderer,l as VectorFieldRenderer,g as __exported__};
5
+ import{deprecatedModule as r}from"./core/deprecate.js";import e from"./core/Logger.js";import o from"./renderers/ClassBreaksRenderer.js";import s from"./renderers/FlowRenderer.js";import n from"./renderers/RasterColormapRenderer.js";import t from"./renderers/RasterShadedReliefRenderer.js";import d from"./renderers/RasterStretchRenderer.js";import m from"./renderers/UniqueValueRenderer.js";import i from"./renderers/VectorFieldRenderer.js";const a=s,p=o,R=m,f=n,c=d,j=i,l=t;function g(){}r(e.getLogger("esri.rasterRenderers"),"esri.rasterRenderers",{replacement:"Individual raster renderer module imports",version:"4.32",warnOnce:!0});export{p as ClassBreaksRenderer,a as FlowRenderer,f as RasterColormapRenderer,l as RasterShadedReliefRenderer,c as RasterStretchRenderer,R as UniqueValueRenderer,j as VectorFieldRenderer,g as __exported__};
@@ -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 o from"../../Color.js";import{toHSV as r,toLAB as t,toLCH as l,toRGB as e}from"../../core/colorUtils.js";import{JSONMap as i}from"../../core/jsonMap.js";import{isSerializable as n}from"../../core/support/jsonUtils.js";const C=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],m=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],a=new i({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function g(o,r){if(!o||!r||o.length!==r.length)return!1;for(let t=0;t<o.length;t++)if(o[t]>r[t]+2||o[t]<r[t]-2)return!1;return!0}function p(o){const r=o.clone();return r.fromColor=o.toColor,r.toColor=o.fromColor,r.algorithm=o.algorithm,r}function u(o){if("multipart"===o.type){const r=o.clone();return r.colorRamps?.length?(r.colorRamps=r.colorRamps.reverse().map((o=>p(o))),r):r}return p(o)}function f(r,t){if(!r)return;const l=t??m;let e=null;return"algorithmic"===r.type?l.some((o=>{if(g(r.fromColor.toRgb(),o.fromColor)&&g(r.toColor.toRgb(),o.toColor))return e=o.id,!0})):"multipart"===r.type&&l.some((t=>{const l=r.colorRamps,i=t.colorRamps;if(l&&i&&l.length===i.length&&!i.some(((r,t)=>{if(!g(l[t].fromColor.toRgb(),new o(r.fromColor).toRgb())||!g(l[t].toColor.toRgb(),new o(r.toColor).toRgb()))return!0}))){if(e)return!0;e=t.id}})),e}function s(o,r,t=!1){if(!o)return;let l=!1,e=f(o,r);return null!=e||t||(l=!0,e=f(o=u(o),r)),e?{id:e,inverted:l}:void 0}function c(o,r=!1){const t="string"==typeof o?o:s(o,void 0,r)?.id;return t?a.toJSON(t):null}function d(o,r="esriCIELabAlgorithm"){const t=m.find((({id:r})=>r===o));return t?t.colorRamps?{type:"multipart",colorRamps:t.colorRamps.map((o=>({type:"algorithmic",algorithm:r,fromColor:[...o.fromColor],toColor:[...o.toColor]})))}:{type:"algorithmic",algorithm:r,fromColor:[...t.fromColor],toColor:[...t.toColor]}:null}function h(o){const r=(o=o||{}).numColors||256,t=o.distanceOffset||0,l=null!=o.isCustomInterval?o.isCustomInterval:null!==o.distanceInterval&&o.distanceInterval!==1/(r-1),e=o.distanceInterval||1/(r-1);return{...o,numColors:r,distanceOffset:t,interpolateAlpha:!!o.interpolateAlpha,distanceInterval:e,isCustomInterval:l,weights:o.weights}}function b(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=0===o.s,m=0===r.s;let a=o.h,g=r.h;C&&!m?a=g:m&&!C&&(r={...r,h:a},g=a);let p,u=Math.abs(g-a);const f=360;u<f/2?p=(g-a)*i:(u=f-u,p=a>g?u*i:-u*i);const s=(r.s-o.s)*i,c=(r.v-o.v)*i;let{s:d,v:h}=o,b=a;if(e){const o=e/i;b=(b+o*p+f)%f,d+=o*s,h+=o*c}const v=[];for(let k=0;k<l-1;k++)v.push({h:b,s:d,v:h}),b=(b+p+f)%f,d+=s,h+=c;return v.push(n?{h:b,s:d,v:h}:r),v}function v(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t;let{l:C,a:m,b:a}=o;const g=(r.l-C)*i,p=(r.a-m)*i,u=(r.b-a)*i,f=[];if(e){const o=e/i;C+=o*g,m+=o*p,a+=o*u}for(let s=0;s<l-1;s++)f.push({l:C,a:m,b:a}),C+=g,m+=p,a+=u;return f.push(n?{l:C,a:m,b:a}:r),f}function k(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=o.h,m=r.h,a=2*Math.PI;let g;if(C<=m){const o=m-C,r=m-C-a;g=Math.abs(r)<Math.abs(o)?r:o}else{const o=m+a-C,r=m-C;g=Math.abs(r)<Math.abs(o)?r:o}const p=g*i,u=(r.l-o.l)*i,f=(r.c-o.c)*i;let{l:s,c,h:d}=o;if(e){const o=e/i;s+=o*u,c+=o*f,d=(d+o*p+a)%a}const h=[];for(let b=0;b<l-1;b++)h.push({l:s,c,h:d}),s+=u,c+=f,d=(d+p+a)%a;return h.push(n?{l:s,c,h:d}:r),h}function y(o,i){let{fromColor:n,toColor:C}=o;n=[...n],C=[...C],3===n.length&&(n=n.concat([255])),3===C.length&&(C=C.concat([255]));const m=o.algorithm||"esriCIELabAlgorithm",a=h(i),{numColors:g,distanceOffset:p,isCustomInterval:u,interpolateAlpha:f}=a;if(1===g&&0===p)return[n];if(2===g&&0===p&&!u)return[n,C];const s={r:n[0],g:n[1],b:n[2]},c={r:C[0],g:C[1],b:C[2]},d="esriCIELabAlgorithm"===m?v(t(s),t(c),a):"esriHSVAlgorithm"===m?b(r(s),r(c),a):k(l(s),l(c),a),y=[],R=n[3]??255,w=((C[3]??255)-R)/(g-1);for(let r=0;r<g;r++){const{r:o,g:t,b:l}=e(d[r]),i=f?Math.round(R+w*r):255;y.push([o,t,l,i])}return y}function R(o,r){const{numColors:t,interpolateAlpha:l}=h(r);let e=r?.weights;const{colorRamps:i}=o;if(e){const o=e.reduce(((o,r)=>o+r));e=e.map((r=>r/o))}else{e=[];for(let o=0;o<i.length;o++)e[o]=1/i.length}const n=[],C=1/(t-1);let m=0,a=!1;for(let p=0;p<i.length;p++){const o=n.length,r=a?0:o*C-m;m+=e[p];let g=p===i.length-1?t-1-o:(e[p]-r)/C;if(a=Math.ceil(g)===g,g=Math.ceil(g),0===g)continue;const u=y(i[p],{numColors:g,interpolateAlpha:l,distanceOffset:r/e[p],distanceInterval:C/e[p]});n.push(...u)}const g=[...i[i.length-1].toColor];return 3===g.length&&g.push(255),n.push(g),n}function w(o,r){const t=n(o)?o.toJSON():o;return"multipart"===t.type?R(t,r):y(t,r)}function B(o,r){const t=w(o,r),l=r?.interpolateAlpha;return t.forEach(((o,r)=>{o.unshift(r),l||o.pop()})),t}function D(o){const t=[];for(let l=0;l<o.length;l+=4){const e=r({r:o[l],g:o[l+1],b:o[l+2]});t.push([e.h/60,e.s/100,255*e.v/100])}return t}function I(o){const t=r(o);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function G(o){const r=o.toJSON();return{Algorithm:r?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:I(o.fromColor),ToColor:I(o.toColor)}}function A(o){const r=c(o);if(!r)return null;if("algorithmic"===o.type)return{...G(o),Name:r};if(o.colorRamps){const t=o.colorRamps.map(G);return{type:"MultiPartColorRamp",NumColorRamps:t.length,ArrayOfColorRamp:t,Name:r}}return null}function P(o){const r=o.reverse().map((o=>{const r=o.toString(16);return r.length<2?"0"+r:r}));return 4294967295&Number.parseInt(r.join(""),16)}export{a as colorRampDict,B as convertColorRampToColormap,w as convertColorRampToColors,P as convertRGBATo32Bit,D as createHsvMap,s as getColorRampId,d as getColorRampJSON,c as getColorRampName,A as getRFxArgColorRampValue,m as predefinedJsonColorRamps,C as rasterColormapNames};
5
+ import{toHSV as o,toLAB as r,toLCH as t,toRGB as l}from"../../core/colorUtils.js";import{JSONMap as e}from"../../core/jsonMap.js";import{isSerializable as i}from"../../core/support/jsonUtils.js";const n=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],C=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],m=new e({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function a(o,r){if(!o||!r||o.length!==r.length)return!1;for(let t=0;t<o.length;t++)if(o[t]>r[t]+2||o[t]<r[t]-2)return!1;return!0}function g(o){const r=o.clone();return r.fromColor=o.toColor,r.toColor=o.fromColor,r}function p(o){if("multipart"===o.type){const r=o.clone();return r.colorRamps?.length?(r.colorRamps=r.colorRamps.reverse().map((o=>g(o))),r):r}return g(o)}function u(o,r){const t=r??C;if("algorithmic"===o.type){const r=o.fromColor.toRgb(),l=o.toColor.toRgb();return t.find((o=>a(r,o.fromColor)&&a(l,o.toColor)))?.id}const l=o.colorRamps?.map((o=>({fromColor:o.fromColor.toRgb(),toColor:o.toColor.toRgb()})));return t.find((o=>{const r=o.colorRamps;return!(!l||!r||l.length!==r.length)&&r.every(((o,r)=>a(l[r].fromColor,o.fromColor)&&a(l[r].toColor,o.toColor)))}))?.id}function f(o,r,t=!1){if(!o)return;let l=!1,e=u(o,r);return null!=e||t||(l=!0,e=u(o=p(o),r)),e?{id:e,inverted:l}:void 0}function s(o,r=!1){const t="string"==typeof o?o:f(o,void 0,r)?.id;return t?m.toJSON(t):null}function d(o,r="esriCIELabAlgorithm"){const t=C.find((({id:r})=>r===o));return t?t.colorRamps?{type:"multipart",colorRamps:t.colorRamps.map((o=>({type:"algorithmic",algorithm:r,fromColor:[...o.fromColor],toColor:[...o.toColor]})))}:{type:"algorithmic",algorithm:r,fromColor:[...t.fromColor],toColor:[...t.toColor]}:null}function c(o){o??={};const r=o.numColors||256,t=o.distanceOffset||0,l=null!=o.isCustomInterval?o.isCustomInterval:null!==o.distanceInterval&&o.distanceInterval!==1/(r-1),e=o.distanceInterval||1/(r-1);return{...o,numColors:r,distanceOffset:t,interpolateAlpha:!!o.interpolateAlpha,distanceInterval:e,isCustomInterval:l,weights:o.weights}}function h(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=0===o.s,m=0===r.s;let a=o.h,g=r.h;C&&!m?a=g:m&&!C&&(r={...r,h:a},g=a);let p=Math.abs(g-a),u=0;const f=360;p<f/2?u=(g-a)*i:(p=f-p,u=a>g?p*i:-p*i);const s=(r.s-o.s)*i,d=(r.v-o.v)*i;let{s:c,v:h}=o,b=a;if(e){const o=e/i;b=(b+o*u+f)%f,c+=o*s,h+=o*d}const v=[];for(let y=0;y<l-1;y++)v.push({h:b,s:c,v:h}),b=(b+u+f)%f,c+=s,h+=d;return v.push(n?{h:b,s:c,v:h}:r),v}function b(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t;let{l:C,a:m,b:a}=o;const g=(r.l-C)*i,p=(r.a-m)*i,u=(r.b-a)*i,f=[];if(e){const o=e/i;C+=o*g,m+=o*p,a+=o*u}for(let s=0;s<l-1;s++)f.push({l:C,a:m,b:a}),C+=g,m+=p,a+=u;return f.push(n?{l:C,a:m,b:a}:r),f}function v(o,r,t){const{numColors:l,distanceOffset:e,distanceInterval:i,isCustomInterval:n}=t,C=o.h,m=r.h,a=2*Math.PI;let g=0;if(C<=m){const o=m-C,r=m-C-a;g=Math.abs(r)<Math.abs(o)?r:o}else{const o=m+a-C,r=m-C;g=Math.abs(r)<Math.abs(o)?r:o}const p=g*i,u=(r.l-o.l)*i,f=(r.c-o.c)*i;let{l:s,c:d,h:c}=o;if(e){const o=e/i;s+=o*u,d+=o*f,c=(c+o*p+a)%a}const h=[];for(let b=0;b<l-1;b++)h.push({l:s,c:d,h:c}),s+=u,d+=f,c=(c+p+a)%a;return h.push(n?{l:s,c:d,h:c}:r),h}function y(e,i){const{fromColor:n,toColor:C}=e,m=3===n.length?[...n,255]:[...n],a=3===C.length?[...C,255]:[...C],g=e.algorithm||"esriCIELabAlgorithm",p=c(i),{numColors:u,distanceOffset:f,isCustomInterval:s,interpolateAlpha:d}=p;if(1===u&&0===f)return[m];if(2===u&&0===f&&!s)return[m,a];const y={r:m[0],g:m[1],b:m[2]},k={r:a[0],g:a[1],b:a[2]},R="esriCIELabAlgorithm"===g?b(r(y),r(k),p):"esriHSVAlgorithm"===g?h(o(y),o(k),p):v(t(y),t(k),p),w=[],B=m[3]??255,D=((a[3]??255)-B)/(u-1);for(let o=0;o<u;o++){const{r,g:t,b:e}=l(R[o]),i=d?Math.round(B+D*o):255;w.push([r,t,e,i])}return w}function k(o,r){const{colorRamps:t}=o;if(!r?.length)return Array.from({length:t.length},(()=>1/t.length));const l=r.reduce(((o,r)=>o+r));return r.map((o=>o/l))}function R(o,r){const{numColors:t,interpolateAlpha:l}=c(r),e=k(o,r?.weights),{colorRamps:i}=o,n=[],C=1/(t-1);let m=0,a=!1;for(let p=0;p<i.length;p++){const o=n.length,r=a?0:o*C-m;m+=e[p];let g=p===i.length-1?t-1-o:(e[p]-r)/C;if(a=Math.ceil(g)===g,g=Math.ceil(g),0===g)continue;const u=y(i[p],{numColors:g,interpolateAlpha:l,distanceOffset:r/e[p],distanceInterval:C/e[p]});n.push(...u)}const g=[...i[i.length-1].toColor];return 3===g.length&&g.push(255),n.push(g),n}function w(o,r){const t=i(o)?o.toJSON():o;return"multipart"===t.type?R(t,r):y(t,r)}function B(o,r){const t=w(o,r),l=r?.interpolateAlpha;return t.forEach(((o,r)=>{o.unshift(r),l||o.pop()})),t}function D(r){const t=[];for(let l=0;l<r.length;l+=4){const e=o({r:r[l],g:r[l+1],b:r[l+2]});t.push([e.h/60,e.s/100,255*e.v/100])}return t}function I(r){const t=o(r);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function A(o){const r=o.toJSON();return{Algorithm:r?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:I(o.fromColor),ToColor:I(o.toColor)}}function G(o){const r=s(o);if(!r)return null;if("algorithmic"===o.type)return{...A(o),Name:r};if(o.colorRamps){const t=o.colorRamps.map(A);return{type:"MultiPartColorRamp",NumColorRamps:t.length,ArrayOfColorRamp:t,Name:r}}return null}function P(o){const r=[...o].reverse().map((o=>{const r=o.toString(16);return r.length<2?"0"+r:r}));return 4294967295&Number.parseInt(r.join(""),16)}export{m as colorRampDict,B as convertColorRampToColormap,w as convertColorRampToColors,P as convertRGBATo32Bit,D as createHsvMap,f as getColorRampId,d as getColorRampJSON,s as getColorRampName,G as getRFxArgColorRampValue,C as predefinedJsonColorRamps,n as rasterColormapNames};
package/renderers.js CHANGED
@@ -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{deprecatedModule as r}from"./core/deprecate.js";import e from"./core/Logger.js";import o from"./renderers/ClassBreaksRenderer.js";import n from"./renderers/DictionaryRenderer.js";import s from"./renderers/DotDensityRenderer.js";import m from"./renderers/HeatmapRenderer.js";import i from"./renderers/PieChartRenderer.js";import d from"./renderers/SimpleRenderer.js";import t from"./renderers/UniqueValueRenderer.js";const p=o,a=n,f=s,j=m,c=i,R=d,l=t;function g(){}r(e.getLogger("esri.renderers"),"esri.renderers",{replacement:"Individual renderer module imports",version:"4.32",warnOnce:!0});export{p as ClassBreaksRenderer,a as DictionaryRenderer,f as DotDensityRenderer,j as HeatmapRenderer,c as PieChartRenderer,R as SimpleRenderer,l as UniqueValueRenderer,g as __exported__};
5
+ import{deprecatedModule as r}from"./core/deprecate.js";import e from"./core/Logger.js";import o from"./renderers/ClassBreaksRenderer.js";import n from"./renderers/DictionaryRenderer.js";import s from"./renderers/DotDensityRenderer.js";import m from"./renderers/HeatmapRenderer.js";import i from"./renderers/PieChartRenderer.js";import d from"./renderers/SimpleRenderer.js";import t from"./renderers/UniqueValueRenderer.js";const p=n,a=d,f=o,j=t,c=s,R=i,l=m;function g(){}r(e.getLogger("esri.renderers"),"esri.renderers",{replacement:"Individual renderer module imports",version:"4.32",warnOnce:!0});export{f as ClassBreaksRenderer,p as DictionaryRenderer,c as DotDensityRenderer,l as HeatmapRenderer,R as PieChartRenderer,a as SimpleRenderer,j as UniqueValueRenderer,g as __exported__};
@@ -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"../../config.js";import{id as s}from"../../kernel.js";import r from"../../request.js";import{isSome as i}from"../../core/arrayUtils.js";import a from"../../core/Error.js";import o from"../../core/Identifiable.js";import n from"../../core/JSONSupport.js";import{clone as l}from"../../core/lang.js";import u from"../../core/Loadable.js";import{throwIfAborted as p,throwIfAbortError as d}from"../../core/promiseUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{reader as m}from"../../core/accessorSupport/decorators/reader.js";import{subclass as y}from"../../core/accessorSupport/decorators/subclass.js";import h from"../../editing/sharedTemplates/SharedTemplateMetadata.js";import f from"../../geometry/SpatialReference.js";import{getFeatureJSON as b,getFeatureIds as g,getAttachmentEditsJSON as v,isProtectedOrPrivateVersionError as j,unpackEditResultData as S,createEditedFeatures as O}from"../../layers/graphics/applyEditsUtils.js";import{checkEditingCapabilities as E,normalizeEdits as R,normalizeGeometries as w}from"../../layers/graphics/editingSupport.js";import{emitApplyEditsEvent as I}from"../../layers/mixins/EditBusLayer.js";import{ensureCredentialIfSignedIn as A}from"../../layers/support/featureLayerUtils.js";import{getOwningPortalUrl as F}from"../../layers/support/layerUtils.js";import{getFeatureLayerCapabilities as T}from"../../layers/support/serviceCapabilitiesUtils.js";import U from"../../portal/PortalItem.js";import{getUserPrivileges as C}from"../../portal/support/portalItemUtils.js";import{isSecureProxyService as D}from"../../portal/support/urlUtils.js";import{parseUrl as P,asValidOptions as V,encode as k}from"../utils.js";import{unapplyEditsZUnitScaling as G}from"../query/operations/editsZScale.js";import{querySharedTemplates as M}from"../sharedTemplates/querySharedTemplates.js";import{readBoolean as N,readNumber as q}from"../support/jsonUtils.js";import{isSafeToEditVersion as L,isVersionInEditSession as _,currentSessionId as x}from"../../versionManagement/support/versionManagementUtils.js";function J(e,t){const s=t.id;return{id:s,name:t.name,url:`${e}/${s}`,type:t.type||"Table"}}function Q(e){return{data:W(e),sync:z(e),operations:H(e.capabilities,e),query:B(e),editing:$(e)}}function W(e){return{isDataVersioned:N(e,"hasVersionedData",!1),isDataBranchVersioned:N(e,"hasBranchVersionedData",!1)}}function H(e,t){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],r=s.includes("query"),i=s.includes("editing")&&!t.datesInUnknownTimezone;let a=i&&s.includes("create"),o=i&&s.includes("delete"),n=i&&s.includes("update");return i&&!(a||o||n)&&(a=o=n=!0),{supportsAdd:a,supportsDelete:o,supportsEditing:i,supportsChangeTracking:s.includes("changetracking"),supportsQuery:r,supportsQueryDataElements:N(t,"supportsQueryDataElements",!1),supportsQueryDomains:N(t,"supportsQueryDomains",!1),supportsQueryContingentValues:N(t,"supportsQueryContingentValues",!1),supportsSync:s.includes("sync"),supportsUpdate:n}}function B(e){return{maxRecordCountFactor:q(e,"maxRecordCountFactor",void 0),maxRecordCount:q(e,"maxRecordCount",void 0)}}function $(e){const t=e?.advancedEditingCapabilities;return{supportsAsyncApplyEdits:N(t,"supportsAsyncApplyEdits",!1),supportsGlobalId:N(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:N(t,"supportsReturnServiceEditsInSourceSR",!1),supportsSharedTemplates:N(e,"supportsSharedTemplates",!1)||N(e,"hasSharedTemplates",!1),supportsSplit:N(t,"supportsSplit",!1)}}function z(e){const t=e?.syncCapabilities,s=t?.supportedSyncDataOptions;return{supportsAsync:N(t,"supportsAsync",!1),supportedSyncDataOptions:{annotations:!(1&~s),dimensions:!(2&~s),contingentValues:!(4&~s),attributeRules:!(8&~s),utilityNetworkSystem:!(16&~s),annotationFullModel:!(32&~s),include3DObjects:!(64&~s),utilityNetworkMissingLayers:!(128&~s),preserveTrueCurves:!(256&~s)}}}let Z=class extends(n.JSONSupportMixin(o.IdentifiableMixin(u))){constructor(e){super(e),this.url=null,this.sourceJSON=null,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1,this.userTypeExtensions=[],this.layerInfos=null,this.tableInfos=null,this.capabilities=null}read(e,t){this.sourceJSON=e,super.read(e,t)}get utilityNetworkUrl(){if(this.sourceJSON)for(const e of this.sourceJSON.layers)if("Utility Network Layer"===e.type)return`${this.url}/${e.id}`;return null}get versionManagementServiceUrl(){return this.sourceJSON?.hasBranchVersionedData&&!D(this.url)?this.url.replace(/\/FeatureServer/i,"/VersionManagementServer"):null}readLayerInfos(e,t){return(t.layers||[]).map((e=>{const{type:t,geometryType:s}=e;return{...J(this.url,e),type:t||"Feature Layer",geometryType:s}}))}readTableInfos(e,t){return(t.tables||[]).map((e=>J(this.url,e)))}readCapabilities(e,t){return Q(t)}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=l(e),{operations:s}=t;return this.userHasUpdateItemPrivileges?(s.supportsAdd=s.supportsDelete=s.supportsEditing=s.supportsQuery=s.supportsUpdate=!0,t):(this.userHasFullEditingPrivileges&&s.supportsEditing&&(s.supportsAdd=s.supportsDelete=s.supportsUpdate=!0),t)}load(e){return this.addResolvingPromise(this._fetchService(this.url,e).then((()=>this._setUserPrivileges(e)))),Promise.resolve(this)}async fetchAllLayersAndTables(e){return await this.load(e),this._fetchLayersAndTablesPromise||=this._fetchLayersAndTables(this.url),p(e),this._fetchLayersAndTablesPromise}async applyEdits(e,t){let s=null;try{const{results:r,edits:i,editedFeatures:a}=await this._internalApplyEdits(e,t),o=e=>e.filter((e=>!e.error)).map(l);let n=0;return r.map((e=>{s=I(this.url,e.id,t?.gdbVersion,!0);const r={edits:i[n],addedFeatures:o(e.addFeatureResults),updatedFeatures:o(e.updateFeatureResults),deletedFeatures:o(e.deleteFeatureResults),addedAttachments:o(e.addAttachmentResults),updatedAttachments:o(e.updateAttachmentResults),deletedAttachments:o(e.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:e.editMoment?new Date(e.editMoment):null};n+=1,a.length>0&&(r.editedFeatures=a),s.resolve(r),s=null})),r}catch(r){throw s&&s.reject(r),r}}async querySharedTemplates(e){const t={...e?.query};null==t.layers&&null==t.templateIds&&(t.layers=this.layerInfos.map((e=>e.id)));return(await M({serviceUrl:this.url,query:t,requestOptions:e?.requestOptions})).map((e=>{const t=h.fromJSON(e);return t.featureService=this,t}))}async _setUserPrivileges(e){if(t.userPrivilegesApplied)try{const{features:{fullEdit:t},content:{updateItem:s}}=await this._fetchUserPrivileges(this.sourceJSON.serviceItemId,e);this._set("userHasFullEditingPrivileges",t),this._set("userHasUpdateItemPrivileges",s)}catch(s){d(s)}}async _fetchUserPrivileges(e,t){const r=!0,i=!1,a=!1;if(!e)return{features:{edit:r,fullEdit:i},content:{updateItem:a}};let o,n,l;try{o=await F(this.url,t)}catch(u){d(u)}try{const e=null!=t?t.signal:null;n=await(s?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(u){d(u)}if(!n)return{features:{edit:r,fullEdit:i},content:{updateItem:a}};try{if(l=new U({id:e,portal:{url:o}}),await l.load(t),l.portal.user)return C(l)}catch(u){d(u)}return{features:{edit:r,fullEdit:i},content:{updateItem:a}}}async _internalApplyEdits(e,t){await A(this.url);const s=t?.globalIdUsed??!1,a=f.fromJSON(this.sourceJSON.spatialReference),{edits:o,options:n}=await this._processApplyEditsParams(e,t),l=await Promise.all(o.map((async e=>{const t=e.addFeatures?.map((e=>b({spatialReference:a},e,null)))??[],r=(await Promise.all(t)).filter(i),o=r.length>0?r:null,n=e.updateFeatures?.map((e=>b({spatialReference:a},e,null)))??[],l=(await Promise.all(n)).filter(i),u=l.length>0?l:null,p=g(e.identifierFields,e.deleteFeatures,s),d=p.length>0?p:null;G(o,u,a);const c=await v(e.identifierFields,e);let m=null;if(c){m={adds:c.adds.length>0?c.adds:void 0,updates:c.updates.length>0?c.updates:void 0,deletes:c.deletes.length>0?c.deletes:void 0}}const y={};return e.deleteAssociations&&(y.deleteAssociations=e.deleteAssociations),e.combineGroupedObjects&&(y.combineGroupedObjects=e.combineGroupedObjects),e.divideGroupedObjects&&(y.divideGroupedObjects=e.divideGroupedObjects),{id:e.id,adds:o,updates:u,deletes:d,attachments:m,...y}}))),u={gdbVersion:n?.gdbVersion,rollbackOnFailure:!0,useGlobalIds:s,returnEditMoment:!0,honorSequenceOfEdits:n?.honorSequenceOfEdits,usePreviousEditMoment:n?.usePreviousEditMoment,returnServiceEditsInSourceSR:!1,returnServiceEditsOption:"originalAndCurrentFeatures",async:!1};await L(this.url,t?.gdbVersion,!0);const p=_(this.url,t?.gdbVersion||null);u.edits=JSON.stringify(l);const d=P(this.url),c=V(d.query,{query:k({...u,f:"json"}),method:"post"});let m;p&&(c.authMode="immediate",c.query.sessionId=x);try{m=await r(this.url+"/applyEdits",c)}catch(y){if(!j(y))throw y;c.authMode="immediate",m=await r(this.url+"/applyEdits",c)}return{...K(m),edits:o}}async _processApplyEditsParams(e,t){const s={...t,usingFeatureServiceEndpoint:!0};return{edits:await Promise.all(e.map((async e=>{const t=this.effectiveCapabilities,r=e&&(e.addFeatures||e.updateFeatures||e.deleteFeatures),i=e&&(e.addAttachments||e.updateAttachments||e.deleteAttachments);if(E(e,t,s,!!r,!!i,"feature-service"),!t.data.isDataVersioned&&s?.gdbVersion)throw new a("feature-service:invalid-parameter","'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isDataVersioned'");const o=R(e,t,"feature-service"),n={};e.deleteAssociations&&(n.deleteAssociations=e.deleteAssociations),e.combineGroupedObjects&&(n.combineGroupedObjects=e.combineGroupedObjects),e.divideGroupedObjects&&(n.divideGroupedObjects=e.divideGroupedObjects);const l=await w(o);return{id:e.id,...l,...n,identifierFields:e.identifierFields}}))),options:s}}async _fetchService(e,t){if(this.sourceJSON)return void this.read(this.sourceJSON,{url:P(e)});const s=await r(e,{responseType:"json",query:{f:"json"},...t});this.read(s.data,{url:P(e)})}async _fetchLayersAndTables(e){const t=`${e}/layers`,s=await r(t,{responseType:"json",query:{f:"json"}});return{layers:s.data.layers.map((e=>{const{type:t,geometryType:s}=e,r=J(this.url,e),i=T(e,r.url);return{...r,type:t||"Feature Layer",geometryType:s,capabilities:i}})),tables:s.data.tables.map((e=>{const t=J(this.url,e),s=T(e,t.url);return{...t,capabilities:s}}))}}};function K(e){const t=e.data,s=[];return{results:t.map((e=>{const t={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment},r=S(t),i=e.editedFeatures,a=i?.spatialReference?new f({wkid:i?.spatialReference.wkid,wkt:i?.spatialReference.wkt,latestWkid:i?.spatialReference.latestWkid,latestVcsWkid:i?.spatialReference.latestVcsWkid,vcsWkid:i?.spatialReference.vcsWkid}):null,o=i?O(i,a):null;o&&s.push({layerId:e.id,editedFeatures:o});const n={};return e.divideGroupedObjectResults&&(n.divideGroupedObjectResults=e.divideGroupedObjectResults),e.combineGroupedObjectResults&&(n.combineGroupedObjectResults=e.combineGroupedObjectResults),{id:e.id,editedFeatures:o,...r,...n}})),editedFeatures:s}}e([c()],Z.prototype,"url",void 0),e([c()],Z.prototype,"sourceJSON",void 0),e([c()],Z.prototype,"userHasFullEditingPrivileges",void 0),e([c()],Z.prototype,"userHasUpdateItemPrivileges",void 0),e([c({readOnly:!0})],Z.prototype,"utilityNetworkUrl",null),e([c({readOnly:!0})],Z.prototype,"versionManagementServiceUrl",null),e([c()],Z.prototype,"userTypeExtensions",void 0),e([c({json:{read:{source:["layers"]}}})],Z.prototype,"layerInfos",void 0),e([m("layerInfos",["layers"])],Z.prototype,"readLayerInfos",null),e([c({json:{read:{source:["tables"]}}})],Z.prototype,"tableInfos",void 0),e([m("tableInfos",["tables"])],Z.prototype,"readTableInfos",null),e([c({readOnly:!0,json:{read:{source:["hasVersionedData","hasSharedTemplates","hasBranchVersionedData","capabilities","supportsQueryDataElements","supportsQueryDomains","supportsQueryContingentValues","maxRecordCountFactor","maxRecordCount","advancedEditingCapabilities","supportsApplyEditsWithGlobalIds","syncCapabilities","datesInUnknownTimezone"]}}})],Z.prototype,"capabilities",void 0),e([m("capabilities",["hasVersionedData","hasSharedTemplates","hasBranchVersionedData","capabilities","supportsQueryDataElements","supportsQueryDomains","supportsQueryContingentValues","maxRecordCountFactor","maxRecordCount","advancedEditingCapabilities","supportsApplyEditsWithGlobalIds","syncCapabilities","datesInUnknownTimezone"])],Z.prototype,"readCapabilities",null),e([c({readOnly:!0})],Z.prototype,"effectiveCapabilities",null),Z=e([y("esri.rest.featureService.FeatureService")],Z);const X=Z;export{X as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../config.js";import{id as s}from"../../kernel.js";import r from"../../request.js";import{isSome as i}from"../../core/arrayUtils.js";import a from"../../core/Error.js";import o from"../../core/Identifiable.js";import n from"../../core/JSONSupport.js";import{clone as l}from"../../core/lang.js";import u from"../../core/Loadable.js";import{throwIfAborted as p,throwIfAbortError as d}from"../../core/promiseUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{reader as m}from"../../core/accessorSupport/decorators/reader.js";import{subclass as y}from"../../core/accessorSupport/decorators/subclass.js";import h from"../../editing/sharedTemplates/SharedTemplateMetadata.js";import f from"../../geometry/SpatialReference.js";import{getFeatureJSON as b,getFeatureIds as g,getAttachmentEditsJSON as v,isProtectedOrPrivateVersionError as j,unpackEditResultData as S,createEditedFeatures as O}from"../../layers/graphics/applyEditsUtils.js";import{checkEditingCapabilities as E,normalizeEdits as R,normalizeGeometries as w}from"../../layers/graphics/editingSupport.js";import{emitApplyEditsEvent as A}from"../../layers/mixins/EditBusLayer.js";import{ensureCredentialIfSignedIn as I}from"../../layers/support/featureLayerUtils.js";import{getOwningPortalUrl as F}from"../../layers/support/layerUtils.js";import{getFeatureLayerCapabilities as T}from"../../layers/support/serviceCapabilitiesUtils.js";import U from"../../portal/PortalItem.js";import{getUserPrivileges as C}from"../../portal/support/portalItemUtils.js";import{isSecureProxyService as D}from"../../portal/support/urlUtils.js";import{parseUrl as P,asValidOptions as V,encode as G}from"../utils.js";import{unapplyEditsZUnitScaling as k}from"../query/operations/editsZScale.js";import{querySharedTemplates as M}from"../sharedTemplates/querySharedTemplates.js";import{readBoolean as N,readNumber as q}from"../support/jsonUtils.js";import{isSafeToEditVersion as L,isVersionInEditSession as _,currentSessionId as x}from"../../versionManagement/support/versionManagementUtils.js";function J(e,t){const s=t.id;return{id:s,name:t.name,url:`${e}/${s}`,type:t.type||"Table"}}function Q(e){return{data:W(e),sync:z(e),operations:H(e.capabilities,e),query:B(e),editing:$(e)}}function W(e){return{isDataVersioned:N(e,"hasVersionedData",!1),isDataBranchVersioned:N(e,"hasBranchVersionedData",!1)}}function H(e,t){const s=e?e.toLowerCase().split(",").map((e=>e.trim())):[],r=s.includes("query"),i=s.includes("editing")&&!t.datesInUnknownTimezone;let a=i&&s.includes("create"),o=i&&s.includes("delete"),n=i&&s.includes("update");return i&&!(a||o||n)&&(a=o=n=!0),{supportsAdd:a,supportsDelete:o,supportsEditing:i,supportsChangeTracking:s.includes("changetracking"),supportsQuery:r,supportsQueryDataElements:N(t,"supportsQueryDataElements",!1),supportsQueryDomains:N(t,"supportsQueryDomains",!1),supportsQueryContingentValues:N(t,"supportsQueryContingentValues",!1),supportsSync:s.includes("sync"),supportsUpdate:n}}function B(e){return{maxRecordCountFactor:q(e,"maxRecordCountFactor",void 0),maxRecordCount:q(e,"maxRecordCount",void 0)}}function $(e){const t=e?.advancedEditingCapabilities;return{supportsAsyncApplyEdits:N(t,"supportsAsyncApplyEdits",!1),supportsGlobalId:N(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:N(t,"supportsReturnServiceEditsInSourceSR",!1),supportsSharedTemplates:N(e,"supportsSharedTemplates",!1)||N(e,"hasSharedTemplates",!1),supportsSplit:N(t,"supportsSplit",!1)}}function z(e){const t=e?.syncCapabilities,s=t?.supportedSyncDataOptions;return{supportsAsync:N(t,"supportsAsync",!1),supportedSyncDataOptions:{annotations:!(1&~s),dimensions:!(2&~s),contingentValues:!(4&~s),attributeRules:!(8&~s),utilityNetworkSystem:!(16&~s),annotationFullModel:!(32&~s),include3DObjects:!(64&~s),utilityNetworkMissingLayers:!(128&~s),preserveTrueCurves:!(256&~s)}}}let Z=class extends(n.JSONSupportMixin(o.IdentifiableMixin(u))){constructor(e){super(e),this.url=null,this.sourceJSON=null,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1,this.userTypeExtensions=[],this.layerInfos=null,this.tableInfos=null,this.capabilities=null}read(e,t){this.sourceJSON=e,super.read(e,t)}get utilityNetworkUrl(){if(this.sourceJSON)for(const e of this.sourceJSON.layers)if("Utility Network Layer"===e.type)return`${this.url}/${e.id}`;return null}get versionManagementServiceUrl(){return this.sourceJSON?.hasBranchVersionedData&&!D(this.url)?this.url.replace(/\/FeatureServer/i,"/VersionManagementServer"):null}readLayerInfos(e,t){return(t.layers||[]).map((e=>{const{type:t,geometryType:s}=e;return{...J(this.url,e),type:t||"Feature Layer",geometryType:s}}))}readTableInfos(e,t){return(t.tables||[]).map((e=>J(this.url,e)))}readCapabilities(e,t){return Q(t)}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=l(e),{operations:s}=t;return this.userHasUpdateItemPrivileges?(s.supportsAdd=s.supportsDelete=s.supportsEditing=s.supportsQuery=s.supportsUpdate=!0,t):(this.userHasFullEditingPrivileges&&s.supportsEditing&&(s.supportsAdd=s.supportsDelete=s.supportsUpdate=!0),t)}load(e){return this.addResolvingPromise(this._fetchService(this.url,e).then((()=>this._setUserPrivileges(e)))),Promise.resolve(this)}async fetchAllLayersAndTables(e){return await this.load(e),this._fetchLayersAndTablesPromise||=this._fetchLayersAndTables(this.url),p(e),this._fetchLayersAndTablesPromise}async applyEdits(e,t){let s=null;try{const{results:r,edits:i,editedFeatures:a}=await this._internalApplyEdits(e,t),o=e=>e.filter((e=>!e.error)).map(l);let n=0;return r.map((e=>{s=A(this.url,e.id,t?.gdbVersion,!0);const r={edits:i[n],addedFeatures:o(e.addFeatureResults),updatedFeatures:o(e.updateFeatureResults),deletedFeatures:o(e.deleteFeatureResults),addedAttachments:o(e.addAttachmentResults),updatedAttachments:o(e.updateAttachmentResults),deletedAttachments:o(e.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:e.editMoment?new Date(e.editMoment):null};n+=1,a.length>0&&(r.editedFeatures=a),s.resolve(r),s=null})),r}catch(r){throw s&&s.reject(r),r}}async querySharedTemplates(e){const t={...e?.query};null==t.layers&&null==t.templateIds&&(t.layers=this.layerInfos.map((e=>e.id)));return(await M({serviceUrl:this.url,query:t,requestOptions:e?.requestOptions})).map((e=>{const t=h.fromJSON(e);return t.featureService=this,t}))}async _setUserPrivileges(e){if(t.userPrivilegesApplied)try{const{features:{fullEdit:t},content:{updateItem:s}}=await this._fetchUserPrivileges(this.sourceJSON.serviceItemId,e);this._set("userHasFullEditingPrivileges",t),this._set("userHasUpdateItemPrivileges",s)}catch(s){d(s)}}async _fetchUserPrivileges(e,t){const r=!0,i=!1,a=!1;if(!e)return{features:{edit:r,fullEdit:i},content:{updateItem:a}};let o,n,l;try{o=await F(this.url,t)}catch(u){d(u)}try{const e=null!=t?t.signal:null;n=await(s?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(u){d(u)}if(!n)return{features:{edit:r,fullEdit:i},content:{updateItem:a}};try{if(l=new U({id:e,portal:{url:o}}),await l.load(t),l.portal.user)return C(l)}catch(u){d(u)}return{features:{edit:r,fullEdit:i},content:{updateItem:a}}}async _internalApplyEdits(e,t){await I(this.url);const s=t?.globalIdUsed??!1,a=f.fromJSON(this.sourceJSON.spatialReference),{edits:o,options:n}=await this._processApplyEditsParams(e,t),l=await Promise.all(o.map((async e=>{const t=e.addFeatures?.map((e=>b({spatialReference:a},e,null)))??[],r=(await Promise.all(t)).filter(i),o=r.length>0?r:null,n=e.updateFeatures?.map((e=>b({spatialReference:a},e,null)))??[],l=(await Promise.all(n)).filter(i),u=l.length>0?l:null,p=g(e.identifierFields,e.deleteFeatures,s),d=p.length>0?p:null;k(o,u,a);const c=await v(e.identifierFields,e);let m=null;if(c){m={adds:c.adds.length>0?c.adds:void 0,updates:c.updates.length>0?c.updates:void 0,deletes:c.deletes.length>0?c.deletes:void 0}}const y={};return e.deleteAssociations&&(y.deleteAssociations=e.deleteAssociations),e.combineGroupedObjects&&(y.combineGroupedObjects=e.combineGroupedObjects),e.divideGroupedObjects&&(y.divideGroupedObjects=e.divideGroupedObjects),{id:e.id,adds:o,updates:u,deletes:d,attachments:m,...y}}))),u={gdbVersion:n?.gdbVersion,rollbackOnFailure:!0,useGlobalIds:s,returnEditMoment:!0,honorSequenceOfEdits:n?.honorSequenceOfEdits,usePreviousEditMoment:n?.usePreviousEditMoment,returnServiceEditsInSourceSR:!1,returnServiceEditsOption:"originalAndCurrentFeatures",async:!1};await L(this.url,t?.gdbVersion,!0);const p=_(this.url,t?.gdbVersion||null);u.edits=JSON.stringify(l);const d=P(this.url),c=V(d.query,{query:G({...u,f:"json"}),method:"post"});let m;p&&(c.authMode="immediate",c.query.sessionId=x);try{m=await r(this.url+"/applyEdits",c)}catch(y){if(!j(y))throw y;c.authMode="immediate",m=await r(this.url+"/applyEdits",c)}return{...K(m),edits:o}}async _processApplyEditsParams(e,t){const s={...t,usingFeatureServiceEndpoint:!0,usingTelecomOperations:e.some((e=>e.deleteAssociations||e.combineGroupedObjects||e.divideGroupedObjects))};return{edits:await Promise.all(e.map((async e=>{const t=this.effectiveCapabilities,r=e&&(e.addFeatures||e.updateFeatures||e.deleteFeatures),i=e&&(e.addAttachments||e.updateAttachments||e.deleteAttachments);if(E(e,t,s,!!r,!!i,"feature-service"),!t.data.isDataVersioned&&s?.gdbVersion)throw new a("feature-service:invalid-parameter","'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isDataVersioned'");const o=R(e,t,"feature-service"),n={};e.deleteAssociations&&(n.deleteAssociations=e.deleteAssociations),e.combineGroupedObjects&&(n.combineGroupedObjects=e.combineGroupedObjects),e.divideGroupedObjects&&(n.divideGroupedObjects=e.divideGroupedObjects);const l=await w(o);return{id:e.id,...l,...n,identifierFields:e.identifierFields}}))),options:s}}async _fetchService(e,t){if(this.sourceJSON)return void this.read(this.sourceJSON,{url:P(e)});const s=await r(e,{responseType:"json",query:{f:"json"},...t});this.read(s.data,{url:P(e)})}async _fetchLayersAndTables(e){const t=`${e}/layers`,s=await r(t,{responseType:"json",query:{f:"json"}});return{layers:s.data.layers.map((e=>{const{type:t,geometryType:s}=e,r=J(this.url,e),i=T(e,r.url);return{...r,type:t||"Feature Layer",geometryType:s,capabilities:i}})),tables:s.data.tables.map((e=>{const t=J(this.url,e),s=T(e,t.url);return{...t,capabilities:s}}))}}};function K(e){const t=e.data,s=[];return{results:t.map((e=>{const t={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment},r=S(t),i=e.editedFeatures,a=i?.spatialReference?new f({wkid:i?.spatialReference.wkid,wkt:i?.spatialReference.wkt,latestWkid:i?.spatialReference.latestWkid,latestVcsWkid:i?.spatialReference.latestVcsWkid,vcsWkid:i?.spatialReference.vcsWkid}):null,o=i?O(i,a):null;o&&s.push({layerId:e.id,editedFeatures:o});const n={};return e.divideGroupedObjectResults&&(n.divideGroupedObjectResults=e.divideGroupedObjectResults),e.combineGroupedObjectResults&&(n.combineGroupedObjectResults=e.combineGroupedObjectResults),{id:e.id,editedFeatures:o,...r,...n}})),editedFeatures:s}}e([c()],Z.prototype,"url",void 0),e([c()],Z.prototype,"sourceJSON",void 0),e([c()],Z.prototype,"userHasFullEditingPrivileges",void 0),e([c()],Z.prototype,"userHasUpdateItemPrivileges",void 0),e([c({readOnly:!0})],Z.prototype,"utilityNetworkUrl",null),e([c({readOnly:!0})],Z.prototype,"versionManagementServiceUrl",null),e([c()],Z.prototype,"userTypeExtensions",void 0),e([c({json:{read:{source:["layers"]}}})],Z.prototype,"layerInfos",void 0),e([m("layerInfos",["layers"])],Z.prototype,"readLayerInfos",null),e([c({json:{read:{source:["tables"]}}})],Z.prototype,"tableInfos",void 0),e([m("tableInfos",["tables"])],Z.prototype,"readTableInfos",null),e([c({readOnly:!0,json:{read:{source:["hasVersionedData","hasSharedTemplates","hasBranchVersionedData","capabilities","supportsQueryDataElements","supportsQueryDomains","supportsQueryContingentValues","maxRecordCountFactor","maxRecordCount","advancedEditingCapabilities","supportsApplyEditsWithGlobalIds","syncCapabilities","datesInUnknownTimezone"]}}})],Z.prototype,"capabilities",void 0),e([m("capabilities",["hasVersionedData","hasSharedTemplates","hasBranchVersionedData","capabilities","supportsQueryDataElements","supportsQueryDomains","supportsQueryContingentValues","maxRecordCountFactor","maxRecordCount","advancedEditingCapabilities","supportsApplyEditsWithGlobalIds","syncCapabilities","datesInUnknownTimezone"])],Z.prototype,"readCapabilities",null),e([c({readOnly:!0})],Z.prototype,"effectiveCapabilities",null),Z=e([y("esri.rest.featureService.FeatureService")],Z);const X=Z;export{X 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 t from"../../../request.js";import{parseUrl as r,encode as s,asValidOptions as i}from"../../utils.js";import u from"./support/QueryCircuitsResult.js";async function o(o,e,c){const p=r(o),n=e.toJSON();e.circuits&&(n.circuits=JSON.stringify(e.circuits)),e.resultType&&(n.resultType=JSON.stringify(e.resultType));const y={...n,f:"json"},f=s({...p.query,...y}),m=i(f,{...c,method:"post"}),a=`${p.path}/circuits/query`,{data:l}=await t(a,m);return u.fromJSON(l)}export{o as queryCircuits};
5
+ import t from"../../../request.js";import{parseUrl as r,encode as s,asValidOptions as i}from"../../utils.js";import u from"./support/QueryCircuitsResult.js";async function o(o,e,c){const p=r(o),n=e.toJSON();e.circuits&&(n.circuits=JSON.stringify(e.circuits)),e.resultTypes&&(n.resultTypes=JSON.stringify(e.resultTypes));const y={...n,f:"json"},f=s({...p.query,...y}),m=i(f,{...c,method:"post"}),a=`${p.path}/circuits/query`,{data:l}=await t(a,m);return u.fromJSON(l)}export{o as queryCircuits};
@@ -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 o from"../../../../core/JSONSupport.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import{ensureClass as e}from"../../../../core/accessorSupport/ensureType.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{writer as s}from"../../../../core/accessorSupport/decorators/writer.js";var n;let p=n=class extends o{static from(t){return e(n,t)}constructor(t){super(t),this.gdbVersion=null,this.sessionId=null,this.moment=null,this.domainNetworkName=null,this.circuits=null,this.location=null,this.terminalId=1,this.locationType=null,this.returnConsumerCircuits=!1,this.resultType=null}writeLocation(t,o){null!=t&&(o.sourceId=t.sourceId,o.globalId=t.globalId,o.firstUnit=t.firstUnit,o.numUnits=t.numUnits)}};t([r({type:String,json:{write:!0}})],p.prototype,"gdbVersion",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"sessionId",void 0),t([r({type:Date,json:{type:Number,write:{writer:(t,o)=>{o.moment=t?t.getTime():null}}}})],p.prototype,"moment",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"domainNetworkName",void 0),t([r({type:[String],json:{write:!0}})],p.prototype,"circuits",void 0),t([r({type:Object,json:{write:!0}})],p.prototype,"location",void 0),t([s("location")],p.prototype,"writeLocation",null),t([r({type:Number,json:{write:!0}})],p.prototype,"terminalId",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"locationType",void 0),t([r({type:Boolean,json:{write:!0}})],p.prototype,"returnConsumerCircuits",void 0),t([r({type:[String],json:{write:!0}})],p.prototype,"resultType",void 0),p=n=t([i("esri.rest.networks.circuits.support.QueryCircuitsParameters")],p);const c=p;export{c as default};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import o from"../../../../core/JSONSupport.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import{ensureClass as e}from"../../../../core/accessorSupport/ensureType.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../../../core/accessorSupport/decorators/writer.js";var n;let p=n=class extends o{static from(t){return e(n,t)}constructor(t){super(t),this.gdbVersion=null,this.sessionId=null,this.moment=null,this.domainNetworkName=null,this.circuits=null,this.location=null,this.terminalId=1,this.locationType=null,this.returnConsumerCircuits=!1,this.resultTypes=null}writeLocation(t,o){null!=t&&(o.sourceId=t.sourceId,o.globalId=t.globalId,o.firstUnit=t.firstUnit,o.numUnits=t.numUnits)}};t([r({type:String,json:{write:!0}})],p.prototype,"gdbVersion",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"sessionId",void 0),t([r({type:Date,json:{type:Number,write:{writer:(t,o)=>{o.moment=t?t.getTime():null}}}})],p.prototype,"moment",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"domainNetworkName",void 0),t([r({type:[String],json:{write:!0}})],p.prototype,"circuits",void 0),t([r({type:Object,json:{write:!0}})],p.prototype,"location",void 0),t([i("location")],p.prototype,"writeLocation",null),t([r({type:Number,json:{write:!0}})],p.prototype,"terminalId",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"locationType",void 0),t([r({type:Boolean,json:{write:!0}})],p.prototype,"returnConsumerCircuits",void 0),t([r({type:[String],json:{write:!0}})],p.prototype,"resultTypes",void 0),p=n=t([s("esri.rest.networks.circuits.support.QueryCircuitsParameters")],p);const c=p;export{c as default};
@@ -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{_ as t}from"../../../chunks/tslib.es6.js";import o 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{reader as e}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../../geometry/Polyline.js";import c from"./CircuitPath.js";let a=class extends o{constructor(t){super(t),this.circuit=null,this.geometry=null,this.path=null}readCircuit(t,o){const r=o.sections?.map((t=>({...t,path:c.fromJSON(t.path)})));return{name:o.name,globalId:o.globalId,isSectioned:o.isSectioned,sectionOrder:o.sectionOrder,startLocation:o.startLocation,stopLocation:o.stopLocation,sections:r,subcircuits:o.subcircuits,lastVerifiedTime:o.lastVerifiedTime?new Date(o.lastVerifiedTime):null,lastExportedTime:o.lastExportedTime?new Date(o.lastExportedTime):null,circuitType:o.circuitType,status:o.status}}};t([r({type:Object,json:{write:!0,read:{source:["name","globalId","isSectioned","sectionOrder","startLocation","stopLocation","sections","subcircuits","lastVerifiedTime","lastExportedTime","circuitType","status"]}}})],a.prototype,"circuit",void 0),t([e("circuit")],a.prototype,"readCircuit",null),t([r({type:i,json:{write:!0}})],a.prototype,"geometry",void 0),t([r({type:c,json:{write:!0}})],a.prototype,"path",void 0),a=t([s("esri.rest.networks.support.CircuitTraceResult")],a);const p=a;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/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{reader as o}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../../core/accessorSupport/decorators/writer.js";import p from"./AggregatedGeometry.js";import i from"./CircuitPath.js";import l from"./FunctionResult.js";import a from"./NetworkElement.js";import m from"./TelecomNetworkElement.js";let u=class extends t{constructor(e){super(e),this.aggregatedGeometry=null,this.elements=null,this.globalFunctionResults=null,this.kFeaturesForKNNFound=!1,this.paths=null,this.startingPointsIgnored=!1,this.warnings=null}readNetworkElements(e,t){return null!=t.elements?t.elements.map((e=>"firstUnit"in e&&"numUnits"in e?new m({...e}):new a({...e}))):[]}writeNetworkElements(e,t){t.elements=e.map((e=>e.toJSON()))}};e([r({type:p,json:{write:!0},readOnly:!0})],u.prototype,"aggregatedGeometry",void 0),e([r({type:[a],json:{write:!0},readOnly:!0})],u.prototype,"elements",void 0),e([o("elements")],u.prototype,"readNetworkElements",null),e([n("elements")],u.prototype,"writeNetworkElements",null),e([r({type:[l],json:{write:!0},readOnly:!0})],u.prototype,"globalFunctionResults",void 0),e([r({type:Boolean,json:{write:!0},readOnly:!0})],u.prototype,"kFeaturesForKNNFound",void 0),e([r({type:[i],json:{write:!0},readOnly:!0})],u.prototype,"paths",void 0),e([r({type:Boolean,json:{write:!0},readOnly:!0})],u.prototype,"startingPointsIgnored",void 0),e([r({type:[String],json:{write:!0},readOnly:!0})],u.prototype,"warnings",void 0),u=e([s("esri.rest.networks.support.TraceResult")],u);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{reader as o}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../../core/accessorSupport/decorators/writer.js";import i from"./AggregatedGeometry.js";import p from"./CircuitPath.js";import l from"./CircuitTraceResult.js";import a from"./FunctionResult.js";import m from"./NetworkElement.js";import u from"./TelecomNetworkElement.js";let c=class extends t{constructor(e){super(e),this.aggregatedGeometry=null,this.circuits=null,this.elements=null,this.globalFunctionResults=null,this.kFeaturesForKNNFound=!1,this.paths=null,this.startingPointsIgnored=!1,this.warnings=null}readNetworkElements(e,t){return null!=t.elements?t.elements.map((e=>"firstUnit"in e&&"numUnits"in e?new u({...e}):new m({...e}))):[]}writeNetworkElements(e,t){t.elements=e.map((e=>e.toJSON()))}};e([r({type:i,json:{write:!0},readOnly:!0})],c.prototype,"aggregatedGeometry",void 0),e([r({type:[l],json:{write:!0},readOnly:!0})],c.prototype,"circuits",void 0),e([r({type:[m],json:{write:!0},readOnly:!0})],c.prototype,"elements",void 0),e([o("elements")],c.prototype,"readNetworkElements",null),e([n("elements")],c.prototype,"writeNetworkElements",null),e([r({type:[a],json:{write:!0},readOnly:!0})],c.prototype,"globalFunctionResults",void 0),e([r({type:Boolean,json:{write:!0},readOnly:!0})],c.prototype,"kFeaturesForKNNFound",void 0),e([r({type:[p],json:{write:!0},readOnly:!0})],c.prototype,"paths",void 0),e([r({type:Boolean,json:{write:!0},readOnly:!0})],c.prototype,"startingPointsIgnored",void 0),e([r({type:[String],json:{write:!0},readOnly:!0})],c.prototype,"warnings",void 0),c=e([s("esri.rest.networks.support.TraceResult")],c);export{c 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 r from"../../../../core/JSONSupport.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import{ensureClass as e}from"../../../../core/accessorSupport/ensureType.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";var i;let p=i=class extends r{static from(t){return e(i,t)}constructor(t){super(t),this.objects=null,this.moment=null,this.gdbVersion=null,this.sessionId=null}};t([o({json:{type:[Object],write:!0}})],p.prototype,"objects",void 0),t([o({type:Date,json:{type:Number,write:{writer:(t,r)=>{r.moment=t?t.getTime():null}}}})],p.prototype,"moment",void 0),t([o({type:String,json:{write:!0}})],p.prototype,"gdbVersion",void 0),t([o({type:String,json:{write:!0}})],p.prototype,"sessionId",void 0),p=i=t([s("esri.rest.networks.unitIdentifiers.support.QueryUnitIdentifiersParamters")],p);const n=p;export{n as default};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/JSONSupport.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import{ensureClass as e}from"../../../../core/accessorSupport/ensureType.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";var i;let p=i=class extends r{static from(t){return e(i,t)}constructor(t){super(t),this.objects=null,this.moment=null,this.gdbVersion=null,this.sessionId=null}};t([o({json:{type:[Object],write:!0}})],p.prototype,"objects",void 0),t([o({type:Date,json:{type:Number,write:{writer:(t,r)=>{r.moment=t?t.getTime():null}}}})],p.prototype,"moment",void 0),t([o({type:String,json:{write:!0}})],p.prototype,"gdbVersion",void 0),t([o({type:String,json:{write:!0}})],p.prototype,"sessionId",void 0),p=i=t([s("esri.rest.networks.unitIdentifiers.support.QueryUnitIdentifiersParameters")],p);const n=p;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
- const b="20250530",c="b4b741c7b9d8e6c37e44b9c9494b3dfe46c77b69";export{b as buildDate,c as commitHash};
5
+ const a="20250603",d="03653fd50fd62f9a2a779776ad07109703da088b";export{a as buildDate,d as commitHash};
@@ -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 t from"../../core/Logger.js";import{animationDebugFlags as e}from"./animationDebugFlags.js";import{defaultCIMValues as r}from"./defaultCIMValues.js";import{AnimatedSymbolEasingType as o,AnimatedSymbolRepeatType as n}from"./enums.js";import{getExtent as i}from"./SDFHelper.js";import{getProcessParam as a,getSize as s,getValue as c}from"./utils.js";import{TimeOrigin as m}from"../../views/2d/engine/webgl/animations/instructions.js";function l(t,e,r){return{transform:g(t,e,r.transform),fromColor:b(t,e,r.fromColor),toColor:I(t,e,r.toColor),colorMix:T(t,e,r.colorMix),toOpacity:h(t,e,r.toOpacity),opacityMix:k(t,e,r.opacityMix),hasAnimations:r.hasAnimations||!!e.animations&&e.animations.length>0}}function p(t){return!e.forceStaticPath&&(e.forceAnimatedPath||t.hasAnimations)}function f(e,r,o){if("CIMCharacterMarker"===r.type)return t.getLogger("animationUtils").error("#handleMarker()","CIM character markers do not support animations"),o;const n=a(e,r,"OffsetX"),i=a(e,r,"OffsetY");if("CIMPictureMarker"===r.type)return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!0,translation:R([n,i]),rotation:R(0),scale:R(a(e,r,"Size")),parent:o.transform}};const s=r.frame,c=s.ymax-s.ymin;return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:R([n,i]),rotation:R(0),scale:R({type:"Process",op:"Divide",left:a(e,r,"Size"),right:c}),parent:o.transform}}}function u(t,e){let r=0,o=0;const n="Absolute"!==t.anchorPointUnits;return t.anchorPoint&&(r=-t.anchorPoint.x,o=-t.anchorPoint.y),{...e,transform:{type:"AnimatedTransform",relativeTranslation:n,absoluteScale:!1,translation:R([r,o]),rotation:R(0),scale:R(1),parent:e.transform}}}function y(t,e){return"Absolute"===t.anchorPointUnits?e:u(t,e)}function C(t,e){return"Absolute"!==t.anchorPointUnits?e:u(t,e)}function M(t,e,r){return{...t,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:R([e,r]),rotation:R(0),scale:R(1),parent:t.transform}}}function d(t,e){const r=e?.5*-(e.xmin+e.xmax):0,o=e?.5*-(e.ymin+e.ymax):0;let n=0,a=0;if("x"in t&&"y"in t)n=t.x+r,a=t.y+o;else{const e=i(t);if(e){n=(e[0]+e[2])/2+r,a=(e[1]+e[3])/2+o}}return[n,a]}function S(t,e){switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":return a(t,e,"Rotation")}return 0}function A(t,e){switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":return a(t,e,"RotateClockwise")}return 0}function P(t,e){switch(e.type){case"CIMPointSymbol":case"CIMVectorMarker":return[1,1,1,1];case"CIMSolidStroke":case"CIMSolidFill":return a(t,e,"Color");case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":return a(t,e,"TintColor")}return[1,1,1,1]}function g(t,e,r){return{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:O(t,e),rotation:D(t,e),scale:x(t,e),parent:r}}function b(t,e,r){return{type:"AnimatedColor",color:R(P(t,e)),opacity:R(1),parent:r}}function I(t,e,r){const{animations:o}=e;let n=P(t,e);const i=o?.filter((t=>"CIMSymbolAnimationColor"===t.type))[0];return i&&(n=a(t,i,"ToColor")),{type:"AnimatedColor",color:R(n),opacity:R(1),parent:r}}function T(t,e,r){const{animations:o}=e,n=o?.filter((t=>"CIMSymbolAnimationColor"===t.type))[0];return n?{type:"AnimatedColor",color:R([1,1,1,1]),opacity:{from:0,to:1,timing:v(t,n?.animatedSymbolProperties)},parent:[1,1,1,1]}:r}function h(t,e,r){const{animations:o}=e;let n=R(1);const i=o?.filter((t=>"CIMSymbolAnimationTransparency"===t.type))[0];if(i){n=R({type:"Process",op:"Transparency",value:a(t,i,"ToTransparency")})}return{type:"AnimatedColor",color:R([1,1,1,1]),opacity:n,parent:r}}function k(t,e,r){const{animations:o}=e,n=o?.filter((t=>"CIMSymbolAnimationTransparency"===t.type))[0];return n?{type:"AnimatedColor",color:R([1,1,1,1]),opacity:{from:0,to:1,timing:v(t,n?.animatedSymbolProperties)},parent:[1,1,1,1]}:r}function v(t,e){if(!e)return{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:m.Local,repeatType:n.Loop,easing:o.Linear,playAnimation:1,reverseAnimation:0};const i=a(t,e,"Duration");let s;if(a(t,e,"RandomizeStartTime")){s={type:"Process",op:"Random",min:0,max:i,seed:a(t,e,"RandomizeStartSeed")}}else s=a(t,e,"StartTimeOffset");const l=a(t,e,"RepeatDelay"),p=a(t,e,"PlayAnimation"),f=a(t,e,"ReverseAnimation"),u=c(e.repeatType,r.CIMAnimatedSymbolProperties.repeattype);return{duration:i,startTimeOffset:s,repeatDelay:l,timeOriginSelector:u===n.None?m.Local:m.Global,repeatType:u,easing:c(e.easing,r.CIMAnimatedSymbolProperties.easing),playAnimation:p,reverseAnimation:f}}function x(t,e){const{animations:r}=e;if("CIMPictureMarker"!==e.type&&"CIMVectorMarker"!==e.type&&"CIMPointSymbol"!==e.type)return R(1);let o;o="CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type?a(t,e,"Size"):s(e)||10;const n=r?.filter((t=>"CIMSymbolAnimationScale"===t.type))[0];if(!n){const e=r?.filter((t=>"CIMSymbolAnimationSize"===t.type))[0];if(!e)return R(1);return{from:1,to:{type:"Process",op:"Divide",left:a(t,e,"ToSize"),right:o},timing:v(t,e.animatedSymbolProperties)}}return{from:1,to:a(t,n,"ScaleFactor"),timing:v(t,n.animatedSymbolProperties)}}function O(t,e){const{animations:r}=e,o=r?.filter((t=>"CIMSymbolAnimationOffset"===t.type))[0];if(!o)return R([0,0]);return{from:[0,0],to:[a(t,o,"OffsetX"),a(t,o,"OffsetY")],timing:v(t,o.animatedSymbolProperties)}}function D(t,e){const{animations:r}=e,o=A(t,e),n={type:"Process",op:"Divide",left:S(t,e),right:{type:"Process",op:"Cond",condition:o,ifTrue:-1,ifFalse:1}},i=r?.filter((t=>"CIMSymbolAnimationRotation"===t.type))[0];if(!i)return R(n);const s={type:"Process",op:"Add",left:a(t,i,"ToRotation"),right:{type:"Process",op:"Divide",left:n,right:-1}};return{from:n,to:{type:"Process",op:"Add",left:n,right:{type:"Process",op:"Cond",condition:a(t,i,"RotateClockwise"),ifTrue:{type:"Process",op:"MatchWinding",sign:-1,angle:s},ifFalse:{type:"Process",op:"MatchWinding",sign:1,angle:s}}},timing:v(t,i.animatedSymbolProperties)}}function R(t){return{from:t,to:t,timing:{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:m.Local,repeatType:n.Loop,easing:o.Linear,playAnimation:1,reverseAnimation:0}}}function L(t){if(null==t)return!1;if("object"!=typeof t)return!1;if(t.animations&&Array.isArray(t.animations)&&t.animations.length>0)return!0;for(const e in t)if(L(t[e]))return!0;return!1}export{L as checkForAnimations,l as getAnimationParams,d as getFrameTranslation,R as getStaticParam,C as handleAbsoluteAnchor,u as handleAnchor,f as handleMarker,y as handleRelativeAnchor,p as shouldUseAnimatedPath,M as translate};
5
+ import t from"../../core/Logger.js";import{animationDebugFlags as e}from"./animationDebugFlags.js";import{defaultCIMValues as n}from"./defaultCIMValues.js";import{AnimatedSymbolEasingType as o,AnimatedSymbolRepeatType as r}from"./enums.js";import{getExtent as i}from"./SDFHelper.js";import{getProcessParam as a,hasProcessParam as s,getSize as l,getValue as m}from"./utils.js";import{TimeOrigin as c}from"../../views/2d/engine/webgl/animations/instructions.js";function f(t,e,n){return{transform:I(t,e,n.transform),fromColor:T(t,e,n.fromColor),toColor:k(t,e,n.toColor),colorMix:v(t,e,n.colorMix),toOpacity:x(t,e,n.toOpacity),opacityMix:D(t,e,n.opacityMix),shift:O(t,e,n.shift),hasAnimations:n.hasAnimations||p(e),hasShiftAnimation:n.hasShiftAnimation||u(e)}}function p(t){return!!t.animations&&t.animations.length>0}function u(t){return!!t.animations&&t.animations.some((t=>"CIMSymbolAnimationMoveAlongLine"===t.type))}function y(t){return!e.forceStaticPath&&(e.forceAnimatedPath||t.hasAnimations)}function d(e,n,o){if("CIMCharacterMarker"===n.type)return t.getLogger("animationUtils").error("#handleMarker()","CIM character markers do not support animations"),o;const r=a(e,n,"OffsetX"),i=a(e,n,"OffsetY");if("CIMPictureMarker"===n.type)return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!0,translation:z([r,i]),rotation:z(0),scale:z(a(e,n,"Size")),parent:o.transform}};const s=n.frame,l=s.ymax-s.ymin;return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:z([r,i]),rotation:z(0),scale:z({type:"Process",op:"Divide",left:a(e,n,"Size"),right:l}),parent:o.transform}}}function S(t,e){let n=0,o=0;const r="Absolute"!==t.anchorPointUnits;return t.anchorPoint&&(n=-t.anchorPoint.x,o=-t.anchorPoint.y),{...e,transform:{type:"AnimatedTransform",relativeTranslation:r,absoluteScale:!1,translation:z([n,o]),rotation:z(0),scale:z(1),parent:e.transform}}}function M(t,e){return"Absolute"===t.anchorPointUnits?e:S(t,e)}function C(t,e){return"Absolute"!==t.anchorPointUnits?e:S(t,e)}function A(t,e,n){return{...t,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:z([e,n]),rotation:z(0),scale:z(1),parent:t.transform}}}function g(t,e){const n=e?.5*-(e.xmin+e.xmax):0,o=e?.5*-(e.ymin+e.ymax):0;let r=0,a=0;if("x"in t&&"y"in t)r=t.x+n,a=t.y+o;else{const e=i(t);if(e){r=(e[0]+e[2])/2+n,a=(e[1]+e[3])/2+o}}return[r,a]}function h(t,e){switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":return a(t,e,"Rotation")}return 0}function P(t,e){switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":return a(t,e,"RotateClockwise")}return 0}function b(t,e){switch(e.type){case"CIMPointSymbol":case"CIMVectorMarker":return[1,1,1,1];case"CIMSolidStroke":case"CIMSolidFill":return a(t,e,"Color");case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":return a(t,e,"TintColor")}return[1,1,1,1]}function I(t,e,n){return{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:w(t,e),rotation:j(t,e),scale:R(t,e),parent:n}}function T(t,e,n){return{type:"AnimatedColor",color:z(b(t,e)),opacity:z(1),parent:n}}function k(t,e,n){const{animations:o}=e;let r=b(t,e);const i=o?.filter((t=>"CIMSymbolAnimationColor"===t.type))[0];return i&&(r=a(t,i,"ToColor")),{type:"AnimatedColor",color:z(r),opacity:z(1),parent:n}}function v(t,e,n){const{animations:o}=e,r=o?.filter((t=>"CIMSymbolAnimationColor"===t.type))[0];return r?{type:"AnimatedColor",color:z([1,1,1,1]),opacity:{from:0,to:1,timing:L(t,r?.animatedSymbolProperties)},parent:[1,1,1,1]}:n}function x(t,e,n){const{animations:o}=e;let r=z(1);const i=o?.filter((t=>"CIMSymbolAnimationTransparency"===t.type))[0];if(i){r=z({type:"Process",op:"Transparency",value:a(t,i,"ToTransparency")})}return{type:"AnimatedColor",color:z([1,1,1,1]),opacity:r,parent:n}}function D(t,e,n){const{animations:o}=e,r=o?.filter((t=>"CIMSymbolAnimationTransparency"===t.type))[0];return r?{type:"AnimatedColor",color:z([1,1,1,1]),opacity:{from:0,to:1,timing:L(t,r?.animatedSymbolProperties)},parent:[1,1,1,1]}:n}function O(t,e,n){const{animations:o}=e,r=o?.filter((t=>"CIMSymbolAnimationMoveAlongLine"===t.type))[0];if(!r)return n;let i,l;const m=L(t,r.animatedSymbolProperties),c=s(t,r,"DistanceAlong"),f=s(t,r,"Speed"),p=c&&a(t,r,"DistanceAlong"),u=f&&a(t,r,"Speed"),y=!0===r.continuous;if(!1!==p)i={type:"Process",op:"Divide",left:p,right:100},l=!0;else if(!1!==u)i={type:"Process",op:"Multiply",left:u,right:m.duration},l=!1;else{if(!y)throw new Error("Either distanceAlong, speed or continuous must be specified.");i=1,l=!0}return{type:"AnimatedShift",multiplyByLineLength:l,shift:{from:0,to:i,timing:m},parent:n}}function L(t,e){if(!e)return{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:c.Local,repeatType:r.Loop,easing:o.Linear,playAnimation:1,reverseAnimation:0};const i=a(t,e,"Duration");let s;if(a(t,e,"RandomizeStartTime")){s={type:"Process",op:"Random",min:0,max:i,seed:a(t,e,"RandomizeStartSeed")}}else s=a(t,e,"StartTimeOffset");const l=a(t,e,"RepeatDelay"),f=a(t,e,"PlayAnimation"),p=a(t,e,"ReverseAnimation"),u=m(e.repeatType,n.CIMAnimatedSymbolProperties.repeattype);return{duration:i,startTimeOffset:s,repeatDelay:l,timeOriginSelector:u===r.None?c.Local:c.Global,repeatType:u,easing:m(e.easing,n.CIMAnimatedSymbolProperties.easing),playAnimation:f,reverseAnimation:p}}function R(t,e){const{animations:n}=e;let o;o="CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type?a(t,e,"Size"):"CIMSolidStroke"===e.type||"CIMPictureStroke"===e.type?a(t,e,"Width"):l(e)||10;const r=n?.filter((t=>"CIMSymbolAnimationScale"===t.type))[0];if(!r){const e=n?.filter((t=>"CIMSymbolAnimationSize"===t.type))[0];if(!e)return z(1);return{from:1,to:{type:"Process",op:"Divide",left:a(t,e,"ToSize"),right:o},timing:L(t,e.animatedSymbolProperties)}}return{from:1,to:a(t,r,"ScaleFactor"),timing:L(t,r.animatedSymbolProperties)}}function w(t,e){const{animations:n}=e,o=n?.filter((t=>"CIMSymbolAnimationOffset"===t.type))[0];if(!o)return z([0,0]);return{from:[0,0],to:[a(t,o,"OffsetX"),a(t,o,"OffsetY")],timing:L(t,o.animatedSymbolProperties)}}function j(t,e){const{animations:n}=e,o=P(t,e),r={type:"Process",op:"Divide",left:h(t,e),right:{type:"Process",op:"Cond",condition:o,ifTrue:-1,ifFalse:1}},i=n?.filter((t=>"CIMSymbolAnimationRotation"===t.type))[0];if(!i)return z(r);const s={type:"Process",op:"Add",left:a(t,i,"ToRotation"),right:{type:"Process",op:"Divide",left:r,right:-1}};return{from:r,to:{type:"Process",op:"Add",left:r,right:{type:"Process",op:"Cond",condition:a(t,i,"RotateClockwise"),ifTrue:{type:"Process",op:"MatchWinding",sign:-1,angle:s},ifFalse:{type:"Process",op:"MatchWinding",sign:1,angle:s}}},timing:L(t,i.animatedSymbolProperties)}}function z(t){return{from:t,to:t,timing:{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:c.Local,repeatType:r.Loop,easing:o.Linear,playAnimation:1,reverseAnimation:0}}}function F(t){if(null==t)return!1;if("object"!=typeof t)return!1;if(t.animations&&Array.isArray(t.animations)&&t.animations.length>0)return!0;for(const e in t)if(F(t[e]))return!0;return!1}export{F as checkForAnimations,f as getAnimationParams,g as getFrameTranslation,z as getStaticParam,C as handleAbsoluteAnchor,S as handleAnchor,d as handleMarker,M as handleRelativeAnchor,y as shouldUseAnimatedPath,A as translate};