@arcgis/core 5.1.0-next.66 → 5.1.0-next.68

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 (180) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{97e15e66e55d9149fd48.js → 0e2e4cb34ac6aac88ebf.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{38816f95e801f1c5bbad.js → 1c742bfe3b0aa51823d1.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{27262083d37fe623ca9c.js → 210629f3c28d4339c655.js} +1 -1
  5. package/assets/esri/core/workers/chunks/27643750dce502fedef3.js +1 -0
  6. package/assets/esri/core/workers/chunks/29878b52aa12b3815230.js +1 -0
  7. package/assets/esri/core/workers/chunks/{7fb9a5bc22d7581f1d20.js → 29b1a4ce7646b403008e.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{eb7392799a01c2a8497a.js → 2da62687ff678b690839.js} +1 -1
  9. package/assets/esri/core/workers/chunks/2fd4220131bfc3f5e2dd.js +1 -0
  10. package/assets/esri/core/workers/chunks/{a118de5a163ae42bee60.js → 333a0038d782d8a34d58.js} +1 -1
  11. package/assets/esri/core/workers/chunks/38328a785365c4783b1e.js +1 -0
  12. package/assets/esri/core/workers/chunks/3d9032217347dadcbe41.js +1 -0
  13. package/assets/esri/core/workers/chunks/{62a2da0ffc67f98445c1.js → 3eef3c2e94aa2a00d76a.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{a5b395e518e4c5fc95d0.js → 40d6ad030614099155cd.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{427183ea93e759943a78.js → 43678e08a3d9d51c2a6d.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{eab1b45ab5a802e29f8c.js → 453280ea87a696a4df81.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{921c30b7f4dfc3e018d9.js → 4605a68e40c5c3ac6e3e.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{deddf6ae4498a3d0d0e5.js → 478879ba965798f61bf3.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{aa69cbaa38b49677ddff.js → 499b899bf88aaf29230d.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{8a0f254d45d00b293479.js → 49fb9c47070641bce9a9.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{f8eb14170f927aecfbc8.js → 4f9d027055f3a616173c.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{4e7b084f7104deea1ddb.js → 53b797e384be9628fc94.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{ff0cb1eec14d34214f12.js → 5fe97253f80c797fad7f.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{224461c1d9755966d0b6.js → 678c9f15712cf3d3bb9e.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{4005d37d03c834da7629.js → 68a313155ddc29bd024d.js} +1 -1
  26. package/assets/esri/core/workers/chunks/6a21c9a4aeebe806ea39.js +1 -0
  27. package/assets/esri/core/workers/chunks/{0f196ec93925dfefc69a.js → 6bb090f3e5c18604cb39.js} +1 -1
  28. package/assets/esri/core/workers/chunks/6ef3b8d67b498d655a99.js +1 -0
  29. package/assets/esri/core/workers/chunks/73e000cc3c4da10e9937.js +1 -0
  30. package/assets/esri/core/workers/chunks/{79df97e3f5975b42dc4d.js → 75669912cddcb5db52c8.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{749c368f5cc2366716f1.js → 7bd1d624f4f4a11a31e8.js} +1 -1
  32. package/assets/esri/core/workers/chunks/7cadfd7444a2a05cf2fb.js +1 -0
  33. package/assets/esri/core/workers/chunks/{1515824f11ef5ab95378.js → 7d0350f459844162d3a7.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{4d069a0ebadb9c53b550.js → 7e39e9d4d68843b60e4c.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{8d5bc17557a31ed79ed8.js → 81750c5177d8d52a3e05.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{3464a38e758c687a28d4.js → 81b2985b83be8f8f1090.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{4141a3a93732996601e8.js → 823127b23bec07e1f9d0.js} +2 -2
  38. package/assets/esri/core/workers/chunks/{b8bf3e8b8b870f69f231.js → 8969788c57bcc11bf77b.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{4e7bb224bde9e5039263.js → 8b8f391f27774aec6db9.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{0e90e9ea1ad587eb3495.js → 8ea4584e07ccc85caabd.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{e0df7554b1679168663d.js → 8fb336c2066113300d0d.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{bcb8a25438c66815e37a.js → 915a5e8aecf25f3bc72b.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{7ffcd308087c35adda04.js → 9bd713d96502ddc2ce25.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{9622a83b29acb768fcb5.js → a25acccda8febac71a3d.js} +1 -1
  45. package/assets/esri/core/workers/chunks/a30815a0155a3b8790b4.js +1 -0
  46. package/assets/esri/core/workers/chunks/{90cef6f96df7dc27db39.js → a43decc8ede8b4910553.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{dd26e3a29161ea411e41.js → a94bd20551c1179c7ec5.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{fa7ae035472540999721.js → b2120c4c56656be941ae.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{a59db907ec1e31002100.js → b85c9ceeece1bae67a16.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{c4e936879c6cb25cf586.js → b8a11d32a4847513619b.js} +1 -1
  51. package/assets/esri/core/workers/chunks/bbaf1d9835671c0165ca.js +1 -0
  52. package/assets/esri/core/workers/chunks/{cb9185ed31109781fe59.js → bc887bd62579dba81e2b.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{7e9b790fe01b89acdf6d.js → bcefdf9753d9d2f6f1be.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{927773ed23b1fc245bf7.js → be61ea8e1883b915bbb1.js} +1 -1
  55. package/assets/esri/core/workers/chunks/c02ba921c0a32d2021e3.js +1 -0
  56. package/assets/esri/core/workers/chunks/{9a95c28d4a3b3b4b2c50.js → c49c078be08c38a6088d.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{d94dfb2ce31e59b3306b.js → c79827f879d1d58d3f1b.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{56036327e721f9c42b33.js → c7ca47f5d4b2f3885239.js} +1 -1
  59. package/assets/esri/core/workers/chunks/c9461568e1002ebac534.js +1 -0
  60. package/assets/esri/core/workers/chunks/{d83ac66478a419e08af6.js → d3d9d40556c847bba1a7.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{789357e0f79823f145dd.js → d4e55eb75fa4d3ac1e84.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{fee31d9297648219375d.js → d8d7331600d93bbca2b4.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{e907acaec4c62adac2f2.js → e0fe23019410dea8236b.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{4f847a426973bd350c11.js → e5801b0f3893d4d4f5b0.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{6ab8ed12d162d79a8c55.js → e62d08f5488a74cbda82.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{b4fb4484fa39eede1f62.js → e66b9d00d02fc08cbb2d.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{69520cad347947b09f21.js → ecb7ede6a8e6c05e4c6c.js} +1 -1
  68. package/assets/esri/core/workers/chunks/ef9d74f8d5a502fda809.js +1 -0
  69. package/assets/esri/core/workers/chunks/f0bc5e8e44d53b73d431.js +1 -0
  70. package/assets/esri/core/workers/chunks/f11ea0d3de93ec0392af.js +1 -0
  71. package/assets/esri/core/workers/chunks/{cc8e6d1eb90221103023.js → f1e5626a0cc1631a1efb.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{468c70e5fdb61dfaad80.js → fc64ae69581e4c38fa8a.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{3f8e8f83ebda07d29ca8.js → fd6bbe47773bbd9f7dd9.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{8418ad9ad7b6481ebe82.js → ffb70e9358c0b171a315.js} +1 -1
  75. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  76. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  77. package/chunks/GaussianSplat.glsl.js +8 -10
  78. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  79. package/chunks/arcgis-knowledge-client-core.js +1 -1
  80. package/config.js +1 -1
  81. package/core/string.js +1 -1
  82. package/geometry/support/lineSegment.js +1 -1
  83. package/interfaces.d.ts +0 -7
  84. package/kernel.js +1 -1
  85. package/layers/GroupLayer.js +1 -1
  86. package/layers/OrientedImageryLayer.js +1 -1
  87. package/layers/SceneLayer.js +1 -1
  88. package/layers/VoxelWasmPerSceneView.js +1 -1
  89. package/layers/mixins/ArcGISImageService.js +1 -1
  90. package/layers/mixins/OperationalLayer.js +1 -1
  91. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  92. package/layers/orientedImagery/core/utils.js +1 -1
  93. package/layers/raster/datasets/MRFRaster.js +1 -1
  94. package/layers/raster/functions/changeDetectionUtils.js +1 -1
  95. package/layers/support/ExportImageServiceParameters.js +1 -1
  96. package/layers/support/arcgisLayers.js +1 -1
  97. package/layers/support/layersCreator.js +1 -1
  98. package/layers/support/{lazyLayerLoader.js → layersLoader.js} +1 -1
  99. package/layers/support/layersMapping.js +2 -0
  100. package/networks/UnitIdentifierManager.d.ts +61 -0
  101. package/networks/UnitIdentifierManager.js +1 -1
  102. package/networks/UtilityNetwork.d.ts +0 -60
  103. package/networks/UtilityNetwork.js +1 -1
  104. package/package.json +2 -2
  105. package/popup/Feature.d.ts +3 -3
  106. package/popup/Features.d.ts +1 -33
  107. package/popup/Features.js +1 -1
  108. package/popup/actionUtils.js +2 -0
  109. package/popup/actions.js +2 -0
  110. package/popup/types.d.ts +11 -0
  111. package/portal/support/portalLayers.js +1 -1
  112. package/rest/featureService/types.d.ts +1 -1
  113. package/rest/knowledgeGraph/GraphQueryResultHeader.js +1 -1
  114. package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
  115. package/support/revision.js +1 -1
  116. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  117. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  118. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  119. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  120. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  121. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  122. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  123. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  124. package/views/3d/layers/graphics/QueryEngineContext.js +1 -1
  125. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  126. package/views/3d/layers/support/SceneLayerViewRequiredFields.js +1 -1
  127. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  128. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  129. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  130. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  131. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  132. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  133. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  134. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  135. package/views/3d/webgl.js +1 -1
  136. package/views/SelectionManager.d.ts +1 -1
  137. package/views/VideoView.js +1 -1
  138. package/views/analysis/ExclusiveOperationManager.js +1 -1
  139. package/views/draw/DrawManipulator.js +1 -1
  140. package/views/draw/DrawManipulator3D.js +2 -0
  141. package/views/draw/DrawTool.js +1 -1
  142. package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
  143. package/views/interactive/sketch/SketchOptions.d.ts +34 -0
  144. package/webscene/spec-certification/api.js +1 -1
  145. package/widgets/Compass/CompassViewModel.d.ts +1 -0
  146. package/widgets/Compass/CompassViewModel.js +1 -1
  147. package/widgets/Compass.js +1 -1
  148. package/widgets/Editor.js +1 -1
  149. package/widgets/FeatureTable/ColumnVisibilityMenuVisibleElements.d.ts +8 -1
  150. package/widgets/FeatureTable/ColumnVisibilityMenuVisibleElements.js +1 -1
  151. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  152. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  153. package/widgets/FeatureTable.d.ts +13 -0
  154. package/widgets/FeatureTable.js +1 -1
  155. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  156. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  157. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  158. package/widgets/OrientedImageryViewer.js +1 -1
  159. package/widgets/Popup/actionUtils.js +1 -1
  160. package/widgets/Sketch/VisibleElements.js +1 -1
  161. package/widgets/Sketch.js +1 -1
  162. package/assets/esri/core/workers/chunks/0d650b0d090a425c9c18.js +0 -1
  163. package/assets/esri/core/workers/chunks/12294f8c32c34788b6de.js +0 -1
  164. package/assets/esri/core/workers/chunks/151c2766a4cacc6adbd6.js +0 -1
  165. package/assets/esri/core/workers/chunks/1984c0f037065acd21d3.js +0 -1
  166. package/assets/esri/core/workers/chunks/61794a861a9209b72622.js +0 -1
  167. package/assets/esri/core/workers/chunks/62d96b012c2d6f601863.js +0 -1
  168. package/assets/esri/core/workers/chunks/644dd906bee3ef465ec0.js +0 -1
  169. package/assets/esri/core/workers/chunks/66692d6edc1bd96645e2.js +0 -1
  170. package/assets/esri/core/workers/chunks/6f079f1fd6d00d2d174c.js +0 -1
  171. package/assets/esri/core/workers/chunks/751f3cfb000045ac78bb.js +0 -1
  172. package/assets/esri/core/workers/chunks/a80eb704e75d13732878.js +0 -1
  173. package/assets/esri/core/workers/chunks/a971e61336f455b953d5.js +0 -1
  174. package/assets/esri/core/workers/chunks/c72e90a952543d06d84b.js +0 -1
  175. package/assets/esri/core/workers/chunks/e9f2b573f482718306e6.js +0 -1
  176. package/assets/esri/core/workers/chunks/ed60b5eaa5765bfcb99c.js +0 -1
  177. package/assets/esri/core/workers/chunks/f62e42659b406435573d.js +0 -1
  178. package/layers/mixins/operationalLayerModuleMap.js +0 -2
  179. package/layers/mixins/operationalLayers.js +0 -2
  180. /package/assets/esri/core/workers/chunks/{4141a3a93732996601e8.js.LICENSE.txt → 823127b23bec07e1f9d0.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{JSONMap as e}from"../../../core/jsonMap.js";import{isIntegerPixelType as t}from"../formats/pixelRangeUtils.js";import a from"../../support/PixelBlock.js";const n=new e({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),s=new e({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});function i(e,n,s,i){const[f,h]=e,p=t(s)&&!t(f.pixelType)&&!t(h.pixelType),u=[f.mask,h.mask].filter(e=>e),m=a.combineBandMasks(u),g=e.map(e=>e.pixels[0]),{width:k,height:x}=f,b=a.createEmptyBand(s,k*x);switch(n){case"difference":case"relative-difference":o({bands:g,mask:m,outBand:b,isRoundingNeeded:p,isRelative:"relative-difference"===n});break;case"categorical":l({bands:g,mask:m,outBand:b,...i});break;case"euclidean-distance":c({pixels:e.map(e=>e.pixels),mask:m,outBand:b});break;case"angle-difference":d({pixels:e.map(e=>e.pixels),mask:m,outBand:b});break;case"band-with-most-change":r({pixels:e.map(e=>e.pixels),mask:m,outBand:b})}const B=new a({width:k,height:x,pixels:[b],pixelType:s,mask:m});return B.updateStatistics(),B}function o(e){const{bands:[t,a],mask:n,isRelative:s,isRoundingNeeded:i,outBand:o}=e,l=t.length;for(let c=0;c<l;c++)if(!n||n[c]){let e=t[c]-a[c];if(s){const n=Math.max(Math.abs(t[c])-Math.abs(a[c]));e=n>0?e/n:0}o[c]=i?Math.round(e):e}}function l(e){const{bands:[t,a],categoryIndexLookups:[n,s],classNames:[i,o],mask:l,keepMethod:c,outBand:d}=e,r=t.length,f=i.length,h=o.length,p=f*h,u=p+1,m=p+2;for(let g=0;g<r;g++)if(!l||l[g]){const e=t[g],l=a[g],r=n[e],f=s[l],k=i[r],x=o[f];d[g]=null==r||null==f?p:"changed"===c&&k===x?u:"unchanged"===c&&k!==x?m:r*h+f}}function c(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let l=0;l<i;l++)if(!n||n[l]){let e=0;for(let n=0;n<o;n++){const s=t[n][l]-a[n][l];e+=s*s}s[l]=Math.sqrt(e)}}function d(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let l=0;l<i;l++)if(!n||n[l]){let e=0,n=0,i=0;for(let s=0;s<o;s++){const o=t[s][l],c=a[s][l];e+=o*c,n+=o*o,i+=c*c}const c=Math.sqrt(n*i);s[l]=c?Math.acos(e/c):1.5707963267948966}}function r(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let l=0;l<i;l++)if(!n||n[l]){let e=0,n=0;for(let s=0;s<o;s++){const i=Math.abs(t[s][l]-a[s][l]);i>e&&(e=i,n=s)}s[l]=n}}export{n as changeMethodMap,i as computeChange,s as keepMethodMap};
2
+ import{JSONMap as e}from"../../../core/jsonMap.js";import{isIntegerPixelType as t}from"../formats/pixelRangeUtils.js";import a from"../../support/PixelBlock.js";const n=new e({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),s=new e({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});function i(e,n,s,i){const[f,h]=e,p=t(s)&&!t(f.pixelType)&&!t(h.pixelType),u=[f.mask,h.mask].filter(e=>e),m=a.combineBandMasks(u),g=e.map(e=>e.pixels[0]),{width:k,height:x}=f,b=a.createEmptyBand(s,k*x);switch(n){case"difference":case"relative-difference":o({bands:g,mask:m,outBand:b,isRoundingNeeded:p,isRelative:"relative-difference"===n});break;case"categorical":l({bands:g,mask:m,outBand:b,...i});break;case"euclidean-distance":c({pixels:e.map(e=>e.pixels),mask:m,outBand:b});break;case"angle-difference":d({pixels:e.map(e=>e.pixels),mask:m,outBand:b});break;case"band-with-most-change":r({pixels:e.map(e=>e.pixels),mask:m,outBand:b})}const B=new a({width:k,height:x,pixels:[b],pixelType:s,mask:m});return B.updateStatistics(),B}function o(e){const{bands:[t,a],mask:n,isRelative:s,isRoundingNeeded:i,outBand:o}=e,l=t.length;for(let c=0;c<l;c++)if(!n||n[c]){let e=t[c]-a[c];if(s){const n=Math.max(Math.abs(t[c]),Math.abs(a[c]));e=0===n?0:e/n}o[c]=i?Math.round(e):e}}function l(e){const{bands:[t,a],categoryIndexLookups:[n,s],classNames:[i,o],mask:l,keepMethod:c,outBand:d}=e,r=t.length,f=i.length,h=o.length,p=f*h,u=p+1,m=p+2;for(let g=0;g<r;g++)if(!l||l[g]){const e=t[g],l=a[g],r=n[e],f=s[l],k=i[r],x=o[f];d[g]=null==r||null==f?p:"changed"===c&&k===x?u:"unchanged"===c&&k!==x?m:r*h+f}}function c(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let l=0;l<i;l++)if(!n||n[l]){let e=0;for(let n=0;n<o;n++){const s=t[n][l]-a[n][l];e+=s*s}s[l]=Math.sqrt(e)}}function d(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let l=0;l<i;l++)if(!n||n[l]){let e=0,n=0,i=0;for(let s=0;s<o;s++){const o=t[s][l],c=a[s][l];e+=o*c,n+=o*o,i+=c*c}const c=Math.sqrt(n*i);s[l]=c?Math.acos(e/c):1.5707963267948966}}function r(e){const{pixels:[t,a],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let l=0;l<i;l++)if(!n||n[l]){let e=0,n=0;for(let s=0;s<o;s++){const i=Math.abs(t[s][l]-a[s][l]);i>e&&(e=i,n=s)}s[l]=n}}export{n as changeMethodMap,i as computeChange,s as keepMethodMap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as r,subclass as o}from"../../core/accessorSupport/decorators.js";import{isSupportedRendererType as i,combineRenderingRules as n,convertRendererToRenderingRule as s,convertRenderingRuleToRFT as a}from"./imageryRendererUtils.js";import p from"./MosaicRule.js";import{interpolationKebab as l,noDataInterpretationKebab as c,pixelTypeKebabDict as m}from"./rasterEnums.js";import u from"./RasterFunction.js";import{writer as y}from"../../core/accessorSupport/decorators/writer.js";let d=class extends t{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return this.requestRawData||"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new p({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.pixelFilter,o=!e.format||e.format.includes("jpg")||e.format.includes("png");this.requestRawData||(t=this._addResampleRasterFunction(t));const i=e.multidimensionalSubset?.areaOfInterest;return i&&(t=f(t,i)),this.requestRawData||!o||r||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:o}=t;if(e=e||t.rasterFunction,!o||!i(o))return e;return n(s(o,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map(({name:e})=>e),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e)}_addResampleRasterFunction(e){if(!("vector-field"===this.layer.renderer?.type)||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,r=this.layer.serviceRasterInfo.pixelSize;let o=new u({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:r}});return o=e?.rasterFunctionDefinition?new u({rasterFunctionDefinition:a(o)}):o,n(o,e)}};function f(e,t){const r=new u({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}});return n(r,e)}e([r()],d.prototype,"layer",void 0),e([r()],d.prototype,"requestRawData",void 0),e([r({json:{write:!0}})],d.prototype,"adjustAspectRatio",null),e([y("adjustAspectRatio")],d.prototype,"writeAdjustAspectRatio",null),e([r({json:{write:!0}})],d.prototype,"bandIds",null),e([r({json:{write:!0}})],d.prototype,"compression",void 0),e([r({json:{write:!0}})],d.prototype,"compressionQuality",null),e([y("compressionQuality")],d.prototype,"writeCompressionQuality",null),e([r({json:{write:!0}})],d.prototype,"compressionTolerance",null),e([y("compressionTolerance")],d.prototype,"writeCompressionTolerance",null),e([r({json:{write:!0}})],d.prototype,"format",null),e([r({type:String,json:{read:{reader:l.read},write:{writer:l.write}}})],d.prototype,"interpolation",null),e([r({json:{write:!0}})],d.prototype,"noData",null),e([r({type:String,json:{read:{reader:c.read},write:{writer:c.write}}})],d.prototype,"noDataInterpretation",null),e([r({type:m.apiValues,json:{read:m.read,write:m.write}})],d.prototype,"pixelType",null),e([r({json:{write:!0}})],d.prototype,"lercVersion",void 0),e([y("lercVersion")],d.prototype,"writeLercVersion",null),e([r({type:Number})],d.prototype,"version",null),e([r({json:{write:!0}})],d.prototype,"mosaicRule",null),e([r({json:{write:!0,name:"renderingRule"}})],d.prototype,"rasterFunction",null),d=e([o("esri.layers.support.ExportImageServiceParameters")],d);export{d as ExportImageServiceParameters};
2
+ import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as r,subclass as o}from"../../core/accessorSupport/decorators.js";import{isSupportedRendererType as i,combineRenderingRules as n,convertRendererToRenderingRule as s}from"./imageryRendererUtils.js";import a from"./MosaicRule.js";import{interpolationKebab as p,noDataInterpretationKebab as l,pixelTypeKebabDict as c}from"./rasterEnums.js";import m from"./RasterFunction.js";import{writer as u}from"../../core/accessorSupport/decorators/writer.js";let y=class extends t{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return this.requestRawData||"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new a({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.multidimensionalSubset?.areaOfInterest;return r&&(t=d(t,r)),this.requestRawData||!e.isRenderedFormat||e.pixelFilter||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:o}=t;if(e=e||t.rasterFunction,!o||!i(o))return e;return n(s(o,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map(({name:e})=>e),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e)}};function d(e,t){const r=new m({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}});return n(r,e)}e([r()],y.prototype,"layer",void 0),e([r()],y.prototype,"requestRawData",void 0),e([r({json:{write:!0}})],y.prototype,"adjustAspectRatio",null),e([u("adjustAspectRatio")],y.prototype,"writeAdjustAspectRatio",null),e([r({json:{write:!0}})],y.prototype,"bandIds",null),e([r({json:{write:!0}})],y.prototype,"compression",void 0),e([r({json:{write:!0}})],y.prototype,"compressionQuality",null),e([u("compressionQuality")],y.prototype,"writeCompressionQuality",null),e([r({json:{write:!0}})],y.prototype,"compressionTolerance",null),e([u("compressionTolerance")],y.prototype,"writeCompressionTolerance",null),e([r({json:{write:!0}})],y.prototype,"format",null),e([r({type:String,json:{read:{reader:p.read},write:{writer:p.write}}})],y.prototype,"interpolation",null),e([r({json:{write:!0}})],y.prototype,"noData",null),e([r({type:String,json:{read:{reader:l.read},write:{writer:l.write}}})],y.prototype,"noDataInterpretation",null),e([r({type:c.apiValues,json:{read:c.read,write:c.write}})],y.prototype,"pixelType",null),e([r({json:{write:!0}})],y.prototype,"lercVersion",void 0),e([u("lercVersion")],y.prototype,"writeLercVersion",null),e([r({type:Number})],y.prototype,"version",null),e([r({json:{write:!0}})],y.prototype,"mosaicRule",null),e([r({json:{write:!0,name:"renderingRule"}})],y.prototype,"rasterFunction",null),y=e([o("esri.layers.support.ExportImageServiceParameters")],y);export{y as ExportImageServiceParameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../core/Error.js";import{urlToObject as r,getFilename as a}from"../../core/urlUtils.js";import{parse as t,parseNonStandardSublayerUrl as s}from"./arcgisLayerUrl.js";import{findAssociatedFeatureService as n}from"./associatedFeatureServiceUtils.js";import{getLayerModuleType as l,fetchFeatureService as o}from"./fetchService.js";import{getPreferredUrl as i,sceneServiceLayerTypeToClassName as c}from"./layerUtils.js";import{layerLookupMap as u}from"./lazyLayerLoader.js";import{requestServiceJSON as y}from"../../request/serviceJSON.js";const f="KHR_gaussian_splatting",p={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function m(e){const{properties:r,url:a}=e,t={...r,url:a},s=await S(a,r?.customParameters),{Constructor:n,layerId:l,sourceJSON:o,parsedUrl:i,layers:c,tables:u}=s;if(c.length+u.length===0)return null!=l&&(t.layerId=l),null!=o&&(t.sourceJSON=o),new n(t);const y=new(0,(await import("../GroupLayer.js")).default)({title:i.title});return await w(y,s,t),y}function d(e,r){return e?e.find(({id:e})=>e===r):null}function v(e,r,a,t,s){const n={...s,layerId:r};return null!=e&&(n.url=e),null!=a&&(n.sourceJSON=a),"sublayerTitleMode"in t.prototype&&(n.sublayerTitleMode="service-name"),new t(n)}async function w(e,r,a){const t=r.sublayerConstructorProvider;for(const{id:s,serverUrl:n}of r.layers){const l=d(r.sublayerInfos,s),o=v(n,s,l,(l&&t?.(l))??r.Constructor,a);e.add(o)}if(r.tables.length){const t=await g("FeatureLayer");r.tables.forEach(({id:s,serverUrl:n})=>{const l=v(n,s,d(r.tableInfos,s),t,a);e.tables.add(l)})}}async function S(r,a){let s=t(r);if(null==s&&(s=await b(r,a)),null==s)throw new e("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:r});const{serverType:n,sublayer:o}=s;let u;const f={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},m="FeatureServer"===n,d="SceneServer"===n,v={parsedUrl:s,Constructor:null,layerId:m||d?o??void 0:void 0,layers:[],tables:[]};switch(n){case"MapServer":if(null!=o){const{type:t}=await y(r,{customParameters:a});switch(u="FeatureLayer",t){case"Catalog Layer":u="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new e("arcgis-layers:unsupported",`fromUrl() not supported for "${t}" layers`)}}else{u=await P(r,a)?"TileLayer":"MapImageLayer"}break;case"ImageServer":{const e=await y(r,{customParameters:a}),{tileInfo:t,cacheType:s}=e;u=t?"LERC"!==t?.format?.toUpperCase()||s&&"elevation"!==s.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await y(s.url.path,{customParameters:a});if(u="SceneLayer",e){const r=e?.layers;if("Voxel"===e?.layerType)u="VoxelLayer";else if(r?.length){const e=r[0]?.layerType;null!=e&&null!=c[e]&&(u=c[e])}}break}case"3DTilesServer":u=await U(r,a)?"GaussianSplatLayer":"IntegratedMesh3DTilesLayer";break;case"FeatureServer":if(u="FeatureLayer",null!=o){const e=await y(r,{customParameters:a});v.sourceJSON=e,v.preferredUrl=i(),u=l(e.type)}break;default:u=f[n]}if(p[u]&&null==o){const e=await L(r,n,a);m&&(v.preferredUrl=e.preferredUrl,v.sublayerInfos=e.layerInfos,v.tableInfos=e.tableInfos);if(1!==e.layers.length+e.tables.length)v.layers=e.layers,v.tables=e.tables,m&&e.layerInfos?.length&&(v.sublayerConstructorProvider=await O(e.layerInfos));else if(m||d){const r=e.layerInfos?.[0]??e.tableInfos?.[0];if(v.layerId=e.layers[0]?.id??e.tables[0]?.id,v.sourceJSON=r,m){const e=r?.type;u=l(e)}}}return v.Constructor=await g(u),v}async function b(e,t){const n=await y(e,{customParameters:t});let l=null,o=null;const i=n.type;if("Feature Layer"===i||"Table"===i?(l="FeatureServer",o=n.id??null):"indexedVector"===i?l="VectorTileServer":n.hasOwnProperty("mapName")?l="MapServer":n.hasOwnProperty("bandCount")&&n.hasOwnProperty("pixelSizeX")?l="ImageServer":n.hasOwnProperty("maxRecordCount")&&n.hasOwnProperty("allowGeometryUpdates")?l="FeatureServer":n.hasOwnProperty("streamUrls")?l="StreamServer":h(n)?(l="SceneServer",o=n.id):n.hasOwnProperty("layers")&&h(n.layers?.[0])&&(l="SceneServer"),!l)return null;const c=null!=o?s(e):null;return{title:null!=c&&n.name||a(e),serverType:l,sublayer:o,url:{path:null!=c?c.serviceUrl:r(e).path}}}function h(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function L(e,r,a){let t,s,n,l=!1;switch(r){case"FeatureServer":{const r=await o(e,{customParameters:a});n=i(e,{preferredHost:r.preferredHost}),l=!!r.layersJSON,t=r.layersJSON||r.serviceJSON;break}case"SceneServer":{const r=await I(e,a);t=r.serviceInfo,s=r.tableServerUrl;break}default:t=await y(e,{customParameters:a})}const c=t?.layers,u=t?.tables;return{preferredUrl:n,layers:c?.map(e=>({id:e.id})).reverse()||[],tables:u?.map(e=>({serverUrl:s,id:e.id})).reverse()||[],layerInfos:l?c:[],tableInfos:l?u:[]}}async function I(e,r){const a=await y(e,{customParameters:r}),t=a.layers?.[0];if(!t)return{serviceInfo:a};try{const{serverUrl:t}=await n(e),s=await y(t,{customParameters:r}).catch(()=>null);return s&&(a.tables=s.tables),{serviceInfo:a,tableServerUrl:t}}catch{return{serviceInfo:a}}}async function g(e){return(0,u[e])()}async function P(e,r){return(await y(e,{customParameters:r})).tileInfo}async function U(e,r){const a=await y(e,{customParameters:r}),t=a.extensions?.["3DTILES_content_gltf"];return!0===t?.extensionsRequired?.includes(f)}async function O(e){if(!e.length)return;const r=new Set,a=[];for(const{type:n}of e)r.has(n)||(r.add(n),a.push(g(l(n))));const t=await Promise.all(a),s=new Map;return Array.from(r).forEach((e,r)=>{s.set(e,t[r])}),e=>s.get(e.type)}export{m as fromUrl};
2
+ import e from"../../core/Error.js";import{urlToObject as r,getFilename as a}from"../../core/urlUtils.js";import{parse as t,parseNonStandardSublayerUrl as s}from"./arcgisLayerUrl.js";import{findAssociatedFeatureService as n}from"./associatedFeatureServiceUtils.js";import{getLayerModuleType as l,fetchFeatureService as o}from"./fetchService.js";import{layersLoaderMap as i}from"./layersLoader.js";import{getPreferredUrl as c,sceneServiceLayerTypeToClassName as u}from"./layerUtils.js";import{requestServiceJSON as y}from"../../request/serviceJSON.js";const f="KHR_gaussian_splatting",p={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function m(e){const{properties:r,url:a}=e,t={...r,url:a},s=await S(a,r?.customParameters),{Constructor:n,layerId:l,sourceJSON:o,parsedUrl:i,layers:c,tables:u}=s;if(c.length+u.length===0)return null!=l&&(t.layerId=l),null!=o&&(t.sourceJSON=o),new n(t);const y=new(0,(await import("../GroupLayer.js")).default)({title:i.title});return await w(y,s,t),y}function d(e,r){return e?e.find(({id:e})=>e===r):null}function v(e,r,a,t,s){const n={...s,layerId:r};return null!=e&&(n.url=e),null!=a&&(n.sourceJSON=a),"sublayerTitleMode"in t.prototype&&(n.sublayerTitleMode="service-name"),new t(n)}async function w(e,r,a){const t=r.sublayerConstructorProvider;for(const{id:s,serverUrl:n}of r.layers){const l=d(r.sublayerInfos,s),o=v(n,s,l,(l&&t?.(l))??r.Constructor,a);e.add(o)}if(r.tables.length){const t=await g("FeatureLayer");r.tables.forEach(({id:s,serverUrl:n})=>{const l=v(n,s,d(r.tableInfos,s),t,a);e.tables.add(l)})}}async function S(r,a){let s=t(r);if(null==s&&(s=await b(r,a)),null==s)throw new e("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:r});const{serverType:n,sublayer:o}=s;let i;const f={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},m="FeatureServer"===n,d="SceneServer"===n,v={parsedUrl:s,Constructor:null,layerId:m||d?o??void 0:void 0,layers:[],tables:[]};switch(n){case"MapServer":if(null!=o){const{type:t}=await y(r,{customParameters:a});switch(i="FeatureLayer",t){case"Catalog Layer":i="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new e("arcgis-layers:unsupported",`fromUrl() not supported for "${t}" layers`)}}else{i=await P(r,a)?"TileLayer":"MapImageLayer"}break;case"ImageServer":{const e=await y(r,{customParameters:a}),{tileInfo:t,cacheType:s}=e;i=t?"LERC"!==t?.format?.toUpperCase()||s&&"elevation"!==s.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await y(s.url.path,{customParameters:a});if(i="SceneLayer",e){const r=e?.layers;if("Voxel"===e?.layerType)i="VoxelLayer";else if(r?.length){const e=r[0]?.layerType;null!=e&&null!=u[e]&&(i=u[e])}}break}case"3DTilesServer":i=await U(r,a)?"GaussianSplatLayer":"IntegratedMesh3DTilesLayer";break;case"FeatureServer":if(i="FeatureLayer",null!=o){const e=await y(r,{customParameters:a});v.sourceJSON=e,v.preferredUrl=c(),i=l(e.type)}break;default:i=f[n]}if(p[i]&&null==o){const e=await I(r,n,a);m&&(v.preferredUrl=e.preferredUrl,v.sublayerInfos=e.layerInfos,v.tableInfos=e.tableInfos);if(1!==e.layers.length+e.tables.length)v.layers=e.layers,v.tables=e.tables,m&&e.layerInfos?.length&&(v.sublayerConstructorProvider=await O(e.layerInfos));else if(m||d){const r=e.layerInfos?.[0]??e.tableInfos?.[0];if(v.layerId=e.layers[0]?.id??e.tables[0]?.id,v.sourceJSON=r,m){const e=r?.type;i=l(e)}}}return v.Constructor=await g(i),v}async function b(e,t){const n=await y(e,{customParameters:t});let l=null,o=null;const i=n.type;if("Feature Layer"===i||"Table"===i?(l="FeatureServer",o=n.id??null):"indexedVector"===i?l="VectorTileServer":n.hasOwnProperty("mapName")?l="MapServer":n.hasOwnProperty("bandCount")&&n.hasOwnProperty("pixelSizeX")?l="ImageServer":n.hasOwnProperty("maxRecordCount")&&n.hasOwnProperty("allowGeometryUpdates")?l="FeatureServer":n.hasOwnProperty("streamUrls")?l="StreamServer":h(n)?(l="SceneServer",o=n.id):n.hasOwnProperty("layers")&&h(n.layers?.[0])&&(l="SceneServer"),!l)return null;const c=null!=o?s(e):null;return{title:null!=c&&n.name||a(e),serverType:l,sublayer:o,url:{path:null!=c?c.serviceUrl:r(e).path}}}function h(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function I(e,r,a){let t,s,n,l=!1;switch(r){case"FeatureServer":{const r=await o(e,{customParameters:a});n=c(e,{preferredHost:r.preferredHost}),l=!!r.layersJSON,t=r.layersJSON||r.serviceJSON;break}case"SceneServer":{const r=await L(e,a);t=r.serviceInfo,s=r.tableServerUrl;break}default:t=await y(e,{customParameters:a})}const i=t?.layers,u=t?.tables;return{preferredUrl:n,layers:i?.map(e=>({id:e.id})).reverse()||[],tables:u?.map(e=>({serverUrl:s,id:e.id})).reverse()||[],layerInfos:l?i:[],tableInfos:l?u:[]}}async function L(e,r){const a=await y(e,{customParameters:r}),t=a.layers?.[0];if(!t)return{serviceInfo:a};try{const{serverUrl:t}=await n(e),s=await y(t,{customParameters:r}).catch(()=>null);return s&&(a.tables=s.tables),{serviceInfo:a,tableServerUrl:t}}catch{return{serviceInfo:a}}}async function g(e){return(0,i[e])()}async function P(e,r){return(await y(e,{customParameters:r})).tileInfo}async function U(e,r){const a=await y(e,{customParameters:r}),t=a.extensions?.["3DTILES_content_gltf"];return!0===t?.extensionsRequired?.includes(f)}async function O(e){if(!e.length)return;const r=new Set,a=[];for(const{type:n}of e)r.has(n)||(r.add(n),a.push(g(l(n))));const t=await Promise.all(a),s=new Map;return Array.from(r).forEach((e,r)=>{s.set(e,t[r])}),e=>s.get(e.type)}export{m as fromUrl};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../core/Collection.js";import has from"../../core/has.js";import{LayerLoadContext as r}from"./LayerLoadContext.js";import{layerLookupMap as a}from"./lazyLayerLoader.js";import y from"../../portal/PortalItem.js";import{isMapNotesLayer as t,isMarkupLayer as i,isRouteLayer as L}from"../../portal/support/featureCollectionUtils.js";import{selectLayerClassPath as n}from"../../portal/support/portalLayers.js";import{loadStyleRenderer as o}from"../../renderers/support/styleUtils.js";async function l(e,r,a){if(!r)return;const y=r.map(e=>f(e,a)),t=await Promise.allSettled(y);for(const i of t)"rejected"===i.status||i.value&&e.add(i.value)}const s={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GaussianSplatLayer:"GaussianSplatLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},c={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},p={ArcGISFeatureLayer:"FeatureLayer"},S={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},u={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},d={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",get ParquetLayer(){return has("parquetlayer-persistence-enabled")?"ParquetLayer":"UnsupportedLayer"},SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},I={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},g={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},m={...d,LinkChartLayer:"LinkChartLayer"},T={...I},G={...g};async function f(e,r){return M(await b(e,r),e,r)}async function M(e,r,a){const y=new e;return y.read(r,a.context),"group"===y.type&&("GroupLayer"===r.layerType?await C(y,r,a):w(r)?h(y,r,a.context):A(r)&&await W(y,r,a.context)),await o(y,a.context),y}async function b(e,o){const l=o.context,s=v(l);let c=e.layerType||e.type;!c&&o?.defaultLayerType&&(c=o.defaultLayerType);const p=s[c];let S=p?a[p]:a.UnknownLayer;if(w(e)){const t=l?.portal;if(e.itemId){const i=new y({id:e.itemId,portal:t});await i.load();const L=(await n(i,new r)).className||"UnknownLayer";S=a[L]}}else"ArcGISFeatureLayer"===c?t(e)||i(e)?S=a.MapNotesLayer:L(e)?S=a.RouteLayer:A(e)&&(S=a.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?S=a.WMTSLayer:"WFS"===c&&"2.0.0"!==e.wfsInfo?.version&&(S=a.UnsupportedLayer);return S()}function A(e){if("ArcGISFeatureLayer"!==e.layerType||w(e))return!1;return(e.featureCollection?.layers?.length??0)>1}function w(e){return"Feature Collection"===e.type}function v(e){let r;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap-base-layers":r=S;break;case"basemap-ground-layers":r=u;break;case"ground":r=c;break;case"tables":r=p;break;default:r=s}break;case"link-chart":switch(e.layerContainerType){case"basemap-base-layers":r=G;break;case"tables":r=T;break;default:r=m}break;default:switch(e.layerContainerType){case"basemap-base-layers":r=g;break;case"tables":r=I;break;default:r=d}}return r}async function C(r,a,y){const t=new e,i=l(t,Array.isArray(a.layers)?a.layers:[],y);try{try{if(await i,"group"===r.type)return r.layers.addMany(t),r}catch(L){r.destroy();for(const e of t)e.destroy();throw L}}catch(L){throw L}}function h(e,r,a){r.itemId&&(e.portalItem=new y({id:r.itemId,portal:a?.portal}),e.when(()=>{const y=y=>{const t=y.layerId;F(y,e,r,t,a);const i=r.featureCollection?.layers?.[t];i&&y.read(i,a)};e.layers?.forEach(y),e.tables?.forEach(y)}))}async function W(e,r,y){const t=a.FeatureLayer,i=await t(),L=r.featureCollection,n=L?.showLegend,o=L?.layers?.map((a,t)=>{const L=new i;L.read(a,y);const o={...y,ignoreDefaults:!0};return F(L,e,r,t,o),null!=n&&L.read({showLegend:n},o),L});e.layers.addMany(o??[])}function F(e,r,a,y,t){e.read({id:`${r.id}-sublayer-${y}`,visibility:a.visibleLayers?.includes(y)??!0},t)}export{C as populateGroupLayer,l as populateOperationalLayers};
2
+ import e from"../../core/Collection.js";import"../../core/has.js";import{LayerLoadContext as r}from"./LayerLoadContext.js";import{layersLoaderMap as t}from"./layersLoader.js";import{getLayerModuleForContextAndType as a}from"./layersMapping.js";import o from"../../portal/PortalItem.js";import{isMapNotesLayer as n,isMarkupLayer as s,isRouteLayer as i}from"../../portal/support/featureCollectionUtils.js";import{selectLayerClassPath as l}from"../../portal/support/portalLayers.js";import{loadStyleRenderer as c}from"../../renderers/support/styleUtils.js";async function y(e,r,t){if(!r)return;const a=r.map(e=>u(e,t)),o=await Promise.allSettled(a);for(const n of o)"rejected"===n.status||n.value&&e.add(n.value)}async function u(e,r){return p(await f(e,r),e,r)}async function p(e,r,t){const a=new e;return a.read(r,t.context),"group"===a.type&&("GroupLayer"===r.layerType?await w(a,r,t):m(r)?L(a,r,t.context):d(r)&&await I(a,r,t.context)),await c(a,t.context),a}async function f(e,c){const y=c.context,u=(e.layerType||e.type)??c.defaultLayerType;switch(u){case"Feature Collection":case"ArcGISFeatureLayer":if(n(e)||s(e))return t.MapNotesLayer();if(i(e))return t.RouteLayer();if(m(e)){const a=y?.portal;if(e.itemId){const n=new o({id:e.itemId,portal:a});await n.load();const s=(await l(n,new r)).className||"UnknownLayer";return t[s]()}return t.UnknownLayer()}return d(e)?t.GroupLayer():t.FeatureLayer();case"WebTiledLayer":return e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?t.WMTSLayer():t.WebTileLayer();case"WFS":return"2.0.0"!==e.wfsInfo?.version?t.UnsupportedLayer():t.WFSLayer();default:{const e=a(y,u);return(0,t[e])()}}}function d(e){if("ArcGISFeatureLayer"!==e.layerType||m(e))return!1;return(e.featureCollection?.layers?.length??0)>1}function m(e){return"Feature Collection"===e.type}async function w(r,t,a){const o=new e,n=y(o,Array.isArray(t.layers)?t.layers:[],a);try{try{if(await n,"group"===r.type)return r.layers.addMany(o),r}catch(s){r.destroy();for(const e of o)e.destroy();throw s}}catch(s){throw s}}function L(e,r,t){r.itemId&&(e.portalItem=new o({id:r.itemId,portal:t?.portal}),e.when(()=>{const a=a=>{const o=a.layerId;h(a,e,r,o,t);const n=r.featureCollection?.layers?.[o];n&&a.read(n,t)};e.layers?.forEach(a),e.tables?.forEach(a)}))}async function I(e,r,a){const o=t.FeatureLayer,n=await o(),s=r.featureCollection,i=s?.showLegend,l=s?.layers?.map((t,o)=>{const s=new n;s.read(t,a);const l={...a,ignoreDefaults:!0};return h(s,e,r,o,l),null!=i&&s.read({showLegend:i},l),s});e.layers.addMany(l??[])}function h(e,r,t,a,o){e.read({id:`${r.id}-sublayer-${a}`,visibility:t.visibleLayers?.includes(a)??!0},o)}export{w as populateGroupLayer,y as populateOperationalLayers};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- const a={BingMapsLayer:async()=>(await import("../BingMapsLayer.js")).default,BuildingSceneLayer:async()=>(await import("../BuildingSceneLayer.js")).default,CSVLayer:async()=>(await import("../CSVLayer.js")).default,CatalogLayer:async()=>(await import("../CatalogLayer.js")).default,DimensionLayer:async()=>(await import("../DimensionLayer.js")).default,ElevationLayer:async()=>(await import("../ElevationLayer.js")).default,FeatureLayer:async()=>(await import("../FeatureLayer.js")).default,GaussianSplatLayer:async()=>(await import("../GaussianSplatLayer.js")).default,GeoJSONLayer:async()=>(await import("../GeoJSONLayer.js")).default,GeoRSSLayer:async()=>(await import("../GeoRSSLayer.js")).default,GroupLayer:async()=>(await import("../GroupLayer.js")).default,ImageryLayer:async()=>(await import("../ImageryLayer.js")).default,ImageryTileLayer:async()=>(await import("../ImageryTileLayer.js")).default,IntegratedMesh3DTilesLayer:async()=>(await import("../IntegratedMesh3DTilesLayer.js")).default,IntegratedMeshLayer:async()=>(await import("../IntegratedMeshLayer.js")).default,KMLLayer:async()=>(await import("../KMLLayer.js")).default,KnowledgeGraphLayer:async()=>(await import("../KnowledgeGraphLayer.js")).default,LineOfSightLayer:async()=>(await import("../LineOfSightLayer.js")).default,LinkChartLayer:async()=>(await import("../LinkChartLayer.js")).default,MapImageLayer:async()=>(await import("../MapImageLayer.js")).default,MapNotesLayer:async()=>(await import("../MapNotesLayer.js")).default,MediaLayer:async()=>(await import("../MediaLayer.js")).default,OGCFeatureLayer:async()=>(await import("../OGCFeatureLayer.js")).default,OpenStreetMapLayer:async()=>(await import("../OpenStreetMapLayer.js")).default,OrientedImageryLayer:async()=>(await import("../OrientedImageryLayer.js")).default,ParquetLayer:async()=>(await import("../ParquetLayer.js")).default,PointCloudLayer:async()=>(await import("../PointCloudLayer.js")).default,RouteLayer:async()=>(await import("../RouteLayer.js")).default,SceneLayer:async()=>(await import("../SceneLayer.js")).default,StreamLayer:async()=>(await import("../StreamLayer.js")).default,SubtypeGroupLayer:async()=>(await import("../SubtypeGroupLayer.js")).default,TileLayer:async()=>(await import("../TileLayer.js")).default,UnknownLayer:async()=>(await import("../UnknownLayer.js")).default,UnsupportedLayer:async()=>(await import("../UnsupportedLayer.js")).default,VectorTileLayer:async()=>(await import("../VectorTileLayer.js")).default,VideoLayer:async()=>(await import("../VideoLayer.js")).default,ViewshedLayer:async()=>(await import("../ViewshedLayer.js")).default,VoxelLayer:async()=>(await import("../VoxelLayer.js")).default,WCSLayer:async()=>(await import("../WCSLayer.js")).default,WFSLayer:async()=>(await import("../WFSLayer.js")).default,WMSLayer:async()=>(await import("../WMSLayer.js")).default,WMTSLayer:async()=>(await import("../WMTSLayer.js")).default,WebTileLayer:async()=>(await import("../WebTileLayer.js")).default};export{a as layerLookupMap};
2
+ const a={BingMapsLayer:async()=>(await import("../BingMapsLayer.js")).default,BuildingSceneLayer:async()=>(await import("../BuildingSceneLayer.js")).default,CSVLayer:async()=>(await import("../CSVLayer.js")).default,CatalogLayer:async()=>(await import("../CatalogLayer.js")).default,DimensionLayer:async()=>(await import("../DimensionLayer.js")).default,ElevationLayer:async()=>(await import("../ElevationLayer.js")).default,FeatureLayer:async()=>(await import("../FeatureLayer.js")).default,GaussianSplatLayer:async()=>(await import("../GaussianSplatLayer.js")).default,GeoJSONLayer:async()=>(await import("../GeoJSONLayer.js")).default,GeoRSSLayer:async()=>(await import("../GeoRSSLayer.js")).default,GroupLayer:async()=>(await import("../GroupLayer.js")).default,ImageryLayer:async()=>(await import("../ImageryLayer.js")).default,ImageryTileLayer:async()=>(await import("../ImageryTileLayer.js")).default,IntegratedMesh3DTilesLayer:async()=>(await import("../IntegratedMesh3DTilesLayer.js")).default,IntegratedMeshLayer:async()=>(await import("../IntegratedMeshLayer.js")).default,KMLLayer:async()=>(await import("../KMLLayer.js")).default,KnowledgeGraphLayer:async()=>(await import("../KnowledgeGraphLayer.js")).default,LineOfSightLayer:async()=>(await import("../LineOfSightLayer.js")).default,LinkChartLayer:async()=>(await import("../LinkChartLayer.js")).default,MapImageLayer:async()=>(await import("../MapImageLayer.js")).default,MapNotesLayer:async()=>(await import("../MapNotesLayer.js")).default,MediaLayer:async()=>(await import("../MediaLayer.js")).default,OGCFeatureLayer:async()=>(await import("../OGCFeatureLayer.js")).default,OpenStreetMapLayer:async()=>(await import("../OpenStreetMapLayer.js")).default,OrientedImageryLayer:async()=>(await import("../OrientedImageryLayer.js")).default,ParquetLayer:async()=>(await import("../ParquetLayer.js")).default,PointCloudLayer:async()=>(await import("../PointCloudLayer.js")).default,RouteLayer:async()=>(await import("../RouteLayer.js")).default,SceneLayer:async()=>(await import("../SceneLayer.js")).default,StreamLayer:async()=>(await import("../StreamLayer.js")).default,SubtypeGroupLayer:async()=>(await import("../SubtypeGroupLayer.js")).default,TileLayer:async()=>(await import("../TileLayer.js")).default,UnknownLayer:async()=>(await import("../UnknownLayer.js")).default,UnsupportedLayer:async()=>(await import("../UnsupportedLayer.js")).default,VectorTileLayer:async()=>(await import("../VectorTileLayer.js")).default,VideoLayer:async()=>(await import("../VideoLayer.js")).default,ViewshedLayer:async()=>(await import("../ViewshedLayer.js")).default,VoxelLayer:async()=>(await import("../VoxelLayer.js")).default,WCSLayer:async()=>(await import("../WCSLayer.js")).default,WFSLayer:async()=>(await import("../WFSLayer.js")).default,WMSLayer:async()=>(await import("../WMSLayer.js")).default,WMTSLayer:async()=>(await import("../WMTSLayer.js")).default,WebTileLayer:async()=>(await import("../WebTileLayer.js")).default};export{a as layersLoaderMap};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import has from"../../core/has.js";const e={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},r={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",get ParquetLayer(){return has("parquetlayer-persistence-enabled")?"ParquetLayer":"UnsupportedLayer"},SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},a={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},y={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},L={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},i={ArcGISTiledElevationServiceLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},t={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",GaussianSplatLayer:"GaussianSplatLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},n={ArcGISFeatureLayer:"FeatureLayer"},c={...r,LinkChartLayer:"LinkChartLayer"},s=e,S=a,l={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",BuildingSceneLayer:"BuildingSceneLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",MediaLayer:"MediaLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",SubtypeGroupLayer:"SubtypeGroupLayer",WCS:"WCSLayer"},o=a;function p(l){switch(l.origin){case"web-scene":switch(l.layerContainerType){case"basemap-base-layers":return y;case"basemap-ground-layers":return L;case"ground":return i;case"tables":return n;default:return t}case"link-chart":switch(l.layerContainerType){case"basemap-base-layers":return s;case"tables":return S;default:return c}default:switch(l.layerContainerType){case"basemap-base-layers":return e;case"tables":return a;case"ground":case"basemap-ground-layers":return;default:return r}}}function u(e,r){if(!r)return"UnknownLayer";if("DefaultTileLayer"===r){let r="UnknownLayer";if("web-scene"===e.origin)switch(e.layerContainerType){case"operational-layers":case"basemap-base-layers":r="TileLayer";break;case"ground":r="ElevationLayer"}else switch(e.layerContainerType){case"basemap-base-layers":case"operational-layers":r="TileLayer"}return r}return p(e)?.[r]??"UnknownLayer"}function I(e){if("portal-item"===e.origin)switch(e.layerContainerType){case"basemap-base-layers":case"ground":case"basemap-ground-layers":return;case"tables":return o;default:return l}return p(e)}function d(e,r){if(!e?.origin)return!1;switch(e.origin){case"web-map":case"link-chart":if("operational-layers"===e.layerContainerType)if("ArcGISDimensionLayer"===r)return!1;break;case"web-scene":if("operational-layers"===e.layerContainerType)if("ArcGISTiledElevationServiceLayer"===r)return!1}const a=I(e)?.[r];return null!=a&&"UnknownLayer"!==a&&"UnsupportedLayer"!==a}export{u as getLayerModuleForContextAndType,d as isLayerSupportedForWriteContext,p as layerTypeMapForReadContext};
@@ -1,7 +1,9 @@
1
1
  import type UtilityNetwork from "./UtilityNetwork.js";
2
+ import type NetworkElement from "../rest/networks/support/NetworkElement.js";
2
3
  import type UnitQueryResult from "../rest/networks/unitIdentifiers/support/UnitQueryResult.js";
3
4
  import type { JSONSupport } from "../core/JSONSupport.js";
4
5
  import type { UnitIdentifier } from "./support/jsonTypes.js";
6
+ import type { ServiceEdits } from "../rest/featureService/types.js";
5
7
  import type { UtilityNetworkProperties } from "./UtilityNetwork.js";
6
8
 
7
9
  export interface UnitIdentifierManagerProperties {
@@ -60,6 +62,65 @@ export default class UnitIdentifierManager extends JSONSupport {
60
62
  * domain network being managed.
61
63
  */
62
64
  get utilityNetwork(): UtilityNetwork;
65
+ /**
66
+ * Returns [ServiceEdits](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/types/#ServiceEdits) to combine [network elements](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/NetworkElement/)
67
+ * in a telecom domain network via the `applyEdits` method on the [FeatureService](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/FeatureService/) class.
68
+ *
69
+ * The objects being combined must have consecutive unit IDs, exist in the same table and unit container,
70
+ * and have the same attribute values.
71
+ *
72
+ * @param networkElements - The network elements to combine in a telecom domain network.
73
+ * @returns `ServiceEdits` for combining network elements in a telecom domain network.
74
+ * @beta
75
+ * @since 5.1
76
+ * @example
77
+ * const networkElementA = new NetworkElement({
78
+ * globalId: "{6CE34136-EC3A-40D7-80BF-E1D9BE33812A}",
79
+ * networkSourceId: 20,
80
+ * });
81
+ *
82
+ * const networkElementB = new NetworkElement({
83
+ * globalId: "{74100804-E229-49b8-8CDC-9B5D3EF03EDA}",
84
+ * networkSourceId: 20,
85
+ * });
86
+ *
87
+ * const networkElementC = new NetworkElement({
88
+ * globalId: "{39B856DC-AFE4-4c02-B433-A9361ACD91CF}",
89
+ * networkSourceId: 20,
90
+ * });
91
+ *
92
+ * const serviceEdits = unitIdentifierManager.generateCombineNetworkElements([
93
+ * networkElementA,
94
+ * networkElementB,
95
+ * networkElementC,
96
+ * ]);
97
+ *
98
+ * await featureService.applyEdits([serviceEdits]);
99
+ */
100
+ generateCombineNetworkElements(networkElements: NetworkElement[]): ServiceEdits;
101
+ /**
102
+ * Returns [ServiceEdits](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/types/#ServiceEdits) to divide a grouped [network element](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/NetworkElement/)
103
+ * in a telecom domain network into two or more grouped elements via the `applyEdits` method on the [FeatureService](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/FeatureService/) class.
104
+ *
105
+ * @param networkElement - The grouped network element in a telecom
106
+ * domain network to divide into two or more grouped elements.
107
+ * @param numUnits - Describes how the unit identifiers of the grouped object should be divided.
108
+ * Each number in this array describes the number of units to assign an object resulting from the division.
109
+ * E.g., to divide one object with 6 units into an object with 5 units and another object with 1 unit, specify [5, 1].
110
+ * @returns `ServiceEdits` for dividing a network element in a telecom domain network.
111
+ * @beta
112
+ * @since 5.1
113
+ * @example
114
+ * const networkElement = new NetworkElement({
115
+ * globalId: "{6CE34136-EC3A-40D7-80BF-E1D9BE33812A}",
116
+ * networkSourceId: 20,
117
+ * });
118
+ *
119
+ * const serviceEdits = unitIdentifierManager.generateDivideNetworkElements(networkElement, [2, 3, 4]);
120
+ *
121
+ * await featureService.applyEdits([serviceEdits]);
122
+ */
123
+ generateDivideNetworkElements(networkElement: NetworkElement, numUnits: number[]): ServiceEdits;
63
124
  /**
64
125
  * Shifts existing records in the containment hierarchy of a unit container's NextUnitID sequence
65
126
  * to reserve a range of unit IDs in a telecom domain network.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{JSONSupport as t}from"../core/JSONSupport.js";import{property as r,subclass as s}from"../core/accessorSupport/decorators.js";import{emitApplyEditsEvent as i}from"../layers/mixins/EditBusLayer.js";import n from"./UtilityNetwork.js";import{isVersionInEditSession as o,currentSessionId as d,isSafeToEditVersion as a}from"../versionManagement/support/versionManagementUtils.js";let l=class extends t{constructor(e){super(e),this.utilityNetwork=null}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}async insertGap(e,t,r){const[{insertGap:s},{default:n}]=await Promise.all([import("../rest/networks/unitIdentifiers/insertGap.js"),import("../rest/networks/unitIdentifiers/support/InsertGapParameters.js")]),l=new n({object:e,firstUnit:t,numUnits:r});o(this.featureServiceUrl,this.gdbVersion||null)?(l.sessionId=d,await a(this.featureServiceUrl,this.gdbVersion,!0)):l.sessionId=null,l.gdbVersion=this.gdbVersion;const u=i(this.featureServiceUrl,null,this.gdbVersion,!1),c=await s(this.networkServiceUrl,l);u.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:c.exceededTransferLimit,historicMoment:c.moment,editedFeatures:c.serviceEdits||void 0})}async reset(e){const[{reset:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/reset.js"),import("../rest/networks/unitIdentifiers/support/ResetParameters.js")]),s=new r({objects:e});o(this.featureServiceUrl,this.gdbVersion||null)?(s.sessionId=d,await a(this.featureServiceUrl,this.gdbVersion,!0)):s.sessionId=null,s.gdbVersion=this.gdbVersion;const n=i(this.featureServiceUrl,null,this.gdbVersion,!1),l=await t(this.networkServiceUrl,s);n.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:l.exceededTransferLimit,historicMoment:l.moment,editedFeatures:l.serviceEdits||void 0})}async resize(e,t){const[{resize:r},{default:s}]=await Promise.all([import("../rest/networks/unitIdentifiers/resize.js"),import("../rest/networks/unitIdentifiers/support/ResizeParameters.js")]),n=new s({object:e,numUnits:t});o(this.featureServiceUrl,this.gdbVersion||null)?(n.sessionId=d,await a(this.featureServiceUrl,this.gdbVersion,!0)):n.sessionId=null,n.gdbVersion=this.gdbVersion;const l=i(this.featureServiceUrl,null,this.gdbVersion,!1),u=await r(this.networkServiceUrl,n);l.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:u.exceededTransferLimit,historicMoment:u.moment,editedFeatures:u.serviceEdits||void 0})}async query(e){const[{queryUnitIdentifiers:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/queryUnitIdentifiers.js"),import("../rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js")]),s=new r({objects:e});o(this.featureServiceUrl,this.gdbVersion||null)?s.sessionId=d:s.sessionId=null,s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;return await t(this.networkServiceUrl,s)}};e([r({type:n,constructOnly:!0})],l.prototype,"utilityNetwork",void 0),e([r()],l.prototype,"networkServiceUrl",null),e([r()],l.prototype,"featureServiceUrl",null),e([r()],l.prototype,"gdbVersion",null),e([r()],l.prototype,"historicMoment",null),l=e([s("esri.networks.UnitIdentifierManager")],l);const u=l;export{u as default};
2
+ import{__decorate as e}from"tslib";import{unique as t}from"../core/arrayUtils.js";import r from"../core/Error.js";import{JSONSupport as i}from"../core/JSONSupport.js";import{property as s,subclass as n}from"../core/accessorSupport/decorators.js";import{emitApplyEditsEvent as o}from"../layers/mixins/EditBusLayer.js";import d from"./UtilityNetwork.js";import{isVersionInEditSession as a,currentSessionId as l,isSafeToEditVersion as u}from"../versionManagement/support/versionManagementUtils.js";let c=class extends i{constructor(e){super(e),this.utilityNetwork=null}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}async insertGap(e,t,r){const[{insertGap:i},{default:s}]=await Promise.all([import("../rest/networks/unitIdentifiers/insertGap.js"),import("../rest/networks/unitIdentifiers/support/InsertGapParameters.js")]),n=new s({object:e,firstUnit:t,numUnits:r});a(this.featureServiceUrl,this.gdbVersion||null)?(n.sessionId=l,await u(this.featureServiceUrl,this.gdbVersion,!0)):n.sessionId=null,n.gdbVersion=this.gdbVersion;const d=o(this.featureServiceUrl,null,this.gdbVersion,!1),c=await i(this.networkServiceUrl,n);d.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:c.exceededTransferLimit,historicMoment:c.moment,editedFeatures:c.serviceEdits||void 0})}async reset(e){const[{reset:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/reset.js"),import("../rest/networks/unitIdentifiers/support/ResetParameters.js")]),i=new r({objects:e});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=l,await u(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const s=o(this.featureServiceUrl,null,this.gdbVersion,!1),n=await t(this.networkServiceUrl,i);s.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:n.exceededTransferLimit,historicMoment:n.moment,editedFeatures:n.serviceEdits||void 0})}async resize(e,t){const[{resize:r},{default:i}]=await Promise.all([import("../rest/networks/unitIdentifiers/resize.js"),import("../rest/networks/unitIdentifiers/support/ResizeParameters.js")]),s=new i({object:e,numUnits:t});a(this.featureServiceUrl,this.gdbVersion||null)?(s.sessionId=l,await u(this.featureServiceUrl,this.gdbVersion,!0)):s.sessionId=null,s.gdbVersion=this.gdbVersion;const n=o(this.featureServiceUrl,null,this.gdbVersion,!1),d=await r(this.networkServiceUrl,s);n.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:d.exceededTransferLimit,historicMoment:d.moment,editedFeatures:d.serviceEdits||void 0})}async query(e){const[{queryUnitIdentifiers:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/queryUnitIdentifiers.js"),import("../rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js")]),i=new r({objects:e});a(this.featureServiceUrl,this.gdbVersion||null)?i.sessionId=l:i.sessionId=null,i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;return await t(this.networkServiceUrl,i)}generateCombineNetworkElements(e){return{id:this._ensureSingleSourceIdAsValidLayerId(e),combineGroupedObjects:[{globalIds:e.map(e=>e.globalId)}]}}generateDivideNetworkElements(e,t){return{id:this._ensureSingleSourceIdAsValidLayerId([e]),divideGroupedObjects:[{globalId:e.globalId,numUnits:t}]}}_ensureSingleSourceIdAsValidLayerId(e){const i=t(e.map(e=>e.networkSourceId));if(i.length>1)throw new r("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");const s=i[0],n=this.utilityNetwork.getLayerIdBySourceId(s);if(null==n)throw new r("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");return n}};e([s({type:d,constructOnly:!0})],c.prototype,"utilityNetwork",void 0),e([s()],c.prototype,"networkServiceUrl",null),e([s()],c.prototype,"featureServiceUrl",null),e([s()],c.prototype,"gdbVersion",null),e([s()],c.prototype,"historicMoment",null),c=e([n("esri.networks.UnitIdentifierManager")],c);const m=c;export{m as default};
@@ -12,7 +12,6 @@ import type TerminalConfiguration from "./support/TerminalConfiguration.js";
12
12
  import type TraceJobInfo from "./support/TraceJobInfo.js";
13
13
  import type Association from "../rest/networks/support/Association.js";
14
14
  import type AssociationGeometriesResult from "../rest/networks/support/AssociationGeometriesResult.js";
15
- import type NetworkElement from "../rest/networks/support/NetworkElement.js";
16
15
  import type TraceResult from "../rest/networks/support/TraceResult.js";
17
16
  import type { AbortOptions } from "../core/promiseUtils.js";
18
17
  import type { RequestOptions } from "../request/types.js";
@@ -240,42 +239,6 @@ export default class UtilityNetwork extends Network {
240
239
  * })
241
240
  */
242
241
  generateAddAssociations(associations: Association[]): ServiceEdits;
243
- /**
244
- * Returns [ServiceEdits](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/types/#ServiceEdits) to combine [network elements](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/NetworkElement/)
245
- * in a telecom domain network via the `applyEdits` method on the [FeatureService](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/FeatureService/) class.
246
- *
247
- * The objects being combined must have consecutive unit IDs, exist in the same table and unit container,
248
- * and have the same attribute values.
249
- *
250
- * @param networkElements - The network elements to combine in a telecom domain network.
251
- * @returns `ServiceEdits` for combining network elements in a telecom domain network.
252
- * @beta
253
- * @since 4.34
254
- * @example
255
- * const networkElementA = new NetworkElement({
256
- * globalId: "{6CE34136-EC3A-40D7-80BF-E1D9BE33812A}",
257
- * networkSourceId: 20,
258
- * });
259
- *
260
- * const networkElementB = new NetworkElement({
261
- * globalId: "{74100804-E229-49b8-8CDC-9B5D3EF03EDA}",
262
- * networkSourceId: 20,
263
- * });
264
- *
265
- * const networkElementC = new NetworkElement({
266
- * globalId: "{39B856DC-AFE4-4c02-B433-A9361ACD91CF}",
267
- * networkSourceId: 20,
268
- * });
269
- *
270
- * const serviceEdits = utilityNetwork.generateCombineNetworkElements([
271
- * networkElementA,
272
- * networkElementB,
273
- * networkElementC,
274
- * ]);
275
- *
276
- * await featureService.applyEdits([serviceEdits]);
277
- */
278
- generateCombineNetworkElements(networkElements: NetworkElement[]): ServiceEdits;
279
242
  /**
280
243
  * Returns [ServiceEdits](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/types/#ServiceEdits) which are used to delete an [Association](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) via the `applyEdits` method on the [FeatureService](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/FeatureService/) class.
281
244
  *
@@ -299,29 +262,6 @@ export default class UtilityNetwork extends Network {
299
262
  * })
300
263
  */
301
264
  generateDeleteAssociations(associations: Association[]): ServiceEdits;
302
- /**
303
- * Returns [ServiceEdits](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/types/#ServiceEdits) to divide a grouped [network element](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/NetworkElement/)
304
- * in a telecom domain network into two or more grouped elements via the `applyEdits` method on the [FeatureService](https://developers.arcgis.com/javascript/latest/references/core/rest/featureService/FeatureService/) class.
305
- *
306
- * @param networkElement - The grouped network element in a telecom
307
- * domain network to divide into two or more grouped elements.
308
- * @param numUnits - Describes how the unit identifiers of the grouped object should be divided.
309
- * Each number in this array describes the number of units to assign an object resulting from the division.
310
- * E.g., to divide one object with 6 units into an object with 5 units and another object with 1 unit, specify [5, 1].
311
- * @returns `ServiceEdits` for dividing a network element in a telecom domain network.
312
- * @beta
313
- * @since 4.34
314
- * @example
315
- * const networkElement = new NetworkElement({
316
- * globalId: "{6CE34136-EC3A-40D7-80BF-E1D9BE33812A}",
317
- * networkSourceId: 20,
318
- * });
319
- *
320
- * const serviceEdits = utilityNetwork.generateDivideNetworkElements(networkElement, [2, 3, 4]);
321
- *
322
- * await featureService.applyEdits([serviceEdits]);
323
- */
324
- generateDivideNetworkElements(networkElement: NetworkElement, numUnits: number[]): ServiceEdits;
325
265
  /**
326
266
  * Returns a [CircuitManager](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/) for the utility network's telecom domain network, if one exists.
327
267
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import{unique as r}from"../core/arrayUtils.js";import s from"../core/Error.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{watch as i}from"../core/reactiveUtils.js";import{property as a,subclass as n}from"../core/accessorSupport/decorators.js";import l from"../layers/FeatureLayer.js";import{queryAllJSON as u}from"../layers/support/featureQueryAll.js";import d from"./Network.js";import m from"./RulesTable.js";import c from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as y}from"./support/networkFieldUtils.js";import h from"./support/NetworkSystemLayers.js";import p from"./support/TerminalConfiguration.js";import f from"./support/TraceJobInfo.js";import{AssociationTypeEnum as w,nullGuid as I,associationTypeKebabDict as b}from"./support/typeUtils.js";import{doesRuleAllowAssociation as g}from"./support/utils.js";import T from"../rest/networks/support/TelecomNetworkElement.js";import k from"../rest/support/Query.js";let S=class extends d{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility",this._circuitManagerMap=new Map,this._terminalById=new Map,this._unitIdentifierManager=null}initialize(){this.addHandles(i(()=>[this.gdbVersion,this.historicMoment],()=>{this.networkSystemLayers.associationsTable&&(this.networkSystemLayers.associationsTable.gdbVersion!==this.gdbVersion&&(this.networkSystemLayers.associationsTable.gdbVersion=this.gdbVersion),this.networkSystemLayers.associationsTable.historicMoment!==this.historicMoment&&(this.networkSystemLayers.associationsTable.historicMoment=this.historicMoment))}))}get _rulesLayer(){const{gdbVersion:e,historicMoment:t}=this,r=this.networkSystemLayers.rulesTableUrl;return new l({url:r,gdbVersion:e,historicMoment:t})}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map(t=>{t?.edgeSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)}),t?.junctionSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)})}),e}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new h({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map(e=>p.fromJSON(e))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map(e=>e.domainNetworkName)||[]}get hasTelecomNetwork(){return this.dataElement?.domainNetworks.some(e=>e.isTelecomNetwork)??!1}get associationsTable(){return this.networkSystemLayers.associationsTable}async load(e){return this.addResolvingPromise(this._load(e)),this}async _load(e){await super._load(e),await Promise.all([this._loadNamedTraceConfigurationsFromNetwork(e),this.networkSystemLayers.loadAssociationsTable(e)])}getTerminalConfiguration(e){let t=null,r=null;const s=e.sourceLayer??e.origin??e.layer??null;let o=null;if("feature"===s?.type){if(o=s.layerId,null===o)return null}else{if("subtype-sublayer"!==s?.type)return null;if(o=s?.parent?.layerId??null,null===o)return null}const i=e.attributes;if(null==i)return null;for(const l of Object.keys(i))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let a=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find(e=>e.layerId===o);if(e){const s=e.assetGroups?.find(e=>e.assetGroupCode===t);if(s){const e=s.assetTypes?.find(e=>e.assetTypeCode===r);if(e?.isTerminalConfigurationSupported){a=e.terminalConfigurationId;break}}}}if(null!=a){const e=this.dataElement.terminalConfigurations,t=e?.find(e=>e.terminalConfigurationId===a);return t?p.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e);return t?.tiers?.map(e=>e.name)||[]}async getRulesTable(){const e=this._rulesLayer;e.loaded||await e.load();const t=this.dataElement?.domainNetworks;if(!t)return null;const r=t.flatMap(e=>[...e.edgeSources||[],...e.junctionSources||[]]),s=(await this._queryRulesTable(e)).map(t=>this._hydrateRuleInfo(e,r,t));return new m({rulesLayer:e,rules:s})}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e&&t.isTelecomNetwork);if(!t)return null;const{default:r}=await import("./CircuitManager.js");return o(this._circuitManagerMap,e,()=>new r({utilityNetwork:this,telecomDomainNetwork:t}))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;const{default:e}=await import("./UnitIdentifierManager.js");return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){if(!this.dataElement||null==e)return null;const t=this._terminalById.get(e);return null!=t?t:(this.terminalConfigurations.forEach(e=>{e.terminals.forEach(e=>{this._terminalById.set(e.id,e)})}),this._terminalById.get(e))}isUtilityLayer(e){return"layerId"in e?null!=e.layerId&&this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):!("subtype-sublayer"!==e.type||!e.parent)&&(this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1))}async queryAssociations(e,t){const[{queryAssociations:r},{default:s}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),o=s.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;return(await r(this.networkServiceUrl,o,t)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const o=await t(this.networkServiceUrl,s);return new f({statusUrl:o})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;const{fromNetworkElement:r,toNetworkElement:s}=e;if(!r||!s)return!1;await t.load();let o=null;switch(e.associationType){case"containment":o=t.rulesCategorized.containment;break;case"attachment":o=t.rulesCategorized.attachment;break;default:o=t.rulesCategorized.connectivity}return o.some(e=>g(e,r,s))}generateAddAssociations(e){const{associationsTable:r}=this.networkSystemLayers,{fromNetworkSourceId:s,fromGlobalId:o,fromTerminalId:i,fromFirstUnit:a,fromLastUnit:n,toNetworkSourceId:l,toGlobalId:u,toTerminalId:d,toFirstUnit:m,toLastUnit:c,associationType:h,isContentVisible:p,percentAlong:f,globalId:I}=y(r);return{addFeatures:e.map(e=>{const r=new t({attributes:{[s]:e.fromNetworkElement?.networkSourceId,[o]:e.fromNetworkElement?.globalId,[i]:e.fromNetworkElement?.terminalId,[l]:e.toNetworkElement?.networkSourceId,[u]:e.toNetworkElement?.globalId,[d]:e.toNetworkElement?.terminalId,[h]:w[e.associationType],[p]:null==e.isContentVisible?void 0:e.isContentVisible?1:0,[f]:e.percentAlong,[I]:e.globalId}}),y=e.associationType.includes("connectivity");return e.fromNetworkElement instanceof T&&(r.attributes[a]=e.fromNetworkElement?.firstUnit,r.attributes[n]=e.fromNetworkElement?.lastUnit,y&&(r.attributes[i]=1)),e.toNetworkElement instanceof T&&(r.attributes[m]=e.toNetworkElement?.firstUnit,r.attributes[c]=e.toNetworkElement?.lastUnit,y&&(r.attributes[d]=1)),r}),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:r?.globalIdField??"globalid",objectIdField:r?.objectIdField??"objectid"}}}generateDeleteAssociations(e){const{associationsTable:t,associationsTableId:r}=this.networkSystemLayers,s={id:r,identifierFields:{globalIdField:t?.globalIdField??"globalid",objectIdField:t?.objectIdField??"objectid"}};if(-8===this.dataElement?.schemaGeneration){const t=this._generateDeleteTelecomAssociationPayload(e);return{...s,deleteAssociations:t}}const o=e.map(e=>({globalId:e.globalId}));return{...s,deleteFeatures:o}}generateCombineNetworkElements(e){return{id:this._ensureSingleSourceIdAsValidLayerId(e),combineGroupedObjects:[{globalIds:e.map(e=>e.globalId)}]}}generateDivideNetworkElements(e,t){return{id:this._ensureSingleSourceIdAsValidLayerId([e]),divideGroupedObjects:[{globalId:e.globalId,numUnits:t}]}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async loadSubnetworksTable(){return this.networkSystemLayers.loadSubnetworksTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map(e=>e.globalId),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find(e=>e.globalId===s.globalId);if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,o=s.get("RULETYPE"),i=s.get("CREATIONDATE"),a=s.get("FROMNETWORKSOURCEID"),n=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),u=s.get("FROMTERMINALID"),d=s.get("TONETWORKSOURCEID"),m=s.get("TOASSETGROUP"),c=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),h=s.get("VIANETWORKSOURCEID"),p=s.get("VIAASSETGROUP"),f=s.get("VIAASSETTYPE"),w=s.get("VIATERMINALID"),I=r.attributes[o.name],b=new Date(r.attributes[i.name]),g=[{networkSourceId:r.attributes[a.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[d.name],assetGroupId:r.attributes[m.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[h.name],assetGroupId:r.attributes[p.name],assetTypeId:r.attributes[f.name],terminalId:r.attributes[w.name]}],T={ruleType:I,creationDate:b};for(const k of[0,1,2]){if(5!==I&&2===k)continue;const e=g[k],r=t.find(t=>t.sourceId===e.networkSourceId),s=r?.assetGroups.find(t=>t.assetGroupCode===e.assetGroupId),o=s?.assetTypes.find(t=>t.assetTypeCode===e.assetTypeId),i=this._getTerminal(o,e);let a="";switch(k){case 0:a="from";break;case 1:a="to";break;case 2:a="via"}T[`${a}NetworkSource`]=r,T[`${a}AssetGroup`]=s,T[`${a}AssetType`]=o,T[`${a}Terminal`]=i?.toJSON()}return T}_getTerminal(e,t){const r=e?.terminalConfigurationId,s=this.terminalConfigurations?.find(e=>e.id===r);return s?.terminals?.find(e=>e.id===t.terminalId)??null}async _queryRulesTable(e){const{gdbVersion:t,historicMoment:r}=this,s=new k({where:"1=1",outFields:["*"],gdbVersion:t,historicMoment:r});return(await u(e,s)).features}_generateDeleteTelecomAssociationPayload(e){return e.map(e=>({globalId:e.globalId??I,associationType:b.toJSON(e.associationType),fromSourceId:e.fromNetworkElement.networkSourceId,fromGlobalId:e.fromNetworkElement.globalId,fromTerminalId:e.fromNetworkElement.terminalId,toSourceId:e.toNetworkElement.networkSourceId,toGlobalId:e.toNetworkElement.globalId,toTerminalId:e.toNetworkElement.terminalId}))}_ensureSingleSourceIdAsValidLayerId(e){const t=r(e.map(e=>e.networkSourceId));if(t.length>1)throw new s("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");const o=t[0],i=this.getLayerIdBySourceId(o);if(null==i)throw new s("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");return i}};e([a({readOnly:!0})],S.prototype,"_rulesLayer",null),e([a({type:[c],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],S.prototype,"sharedNamedTraceConfigurations",void 0),e([a({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],S.prototype,"type",void 0),e([a({readOnly:!0})],S.prototype,"serviceTerritoryFeatureLayerId",null),e([a({readOnly:!0})],S.prototype,"networkSystemLayers",null),e([a({readOnly:!0})],S.prototype,"terminalConfigurations",null),e([a({readOnly:!0})],S.prototype,"domainNetworkNames",null),e([a({readOnly:!0})],S.prototype,"hasTelecomNetwork",null),e([a({readOnly:!0,json:{read:!1}})],S.prototype,"associationsTable",null),S=e([n("esri.networks.UtilityNetwork")],S);const N=S;export{N as default};
2
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{watch as s}from"../core/reactiveUtils.js";import{property as o,subclass as i}from"../core/accessorSupport/decorators.js";import a from"../layers/FeatureLayer.js";import{queryAllJSON as n}from"../layers/support/featureQueryAll.js";import l from"./Network.js";import u from"./RulesTable.js";import d from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as m}from"./support/networkFieldUtils.js";import c from"./support/NetworkSystemLayers.js";import y from"./support/TerminalConfiguration.js";import f from"./support/TraceJobInfo.js";import{AssociationTypeEnum as h,nullGuid as p,associationTypeKebabDict as b}from"./support/typeUtils.js";import{doesRuleAllowAssociation as w}from"./support/utils.js";import I from"../rest/networks/support/TelecomNetworkElement.js";import g from"../rest/support/Query.js";let T=class extends l{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility",this._circuitManagerMap=new Map,this._terminalById=new Map,this._unitIdentifierManager=null}initialize(){this.addHandles(s(()=>[this.gdbVersion,this.historicMoment],()=>{this.networkSystemLayers.associationsTable&&(this.networkSystemLayers.associationsTable.gdbVersion!==this.gdbVersion&&(this.networkSystemLayers.associationsTable.gdbVersion=this.gdbVersion),this.networkSystemLayers.associationsTable.historicMoment!==this.historicMoment&&(this.networkSystemLayers.associationsTable.historicMoment=this.historicMoment))}))}get _rulesLayer(){const{gdbVersion:e,historicMoment:t}=this,r=this.networkSystemLayers.rulesTableUrl;return new a({url:r,gdbVersion:e,historicMoment:t})}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map(t=>{t?.edgeSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)}),t?.junctionSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)})}),e}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new c({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map(e=>y.fromJSON(e))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map(e=>e.domainNetworkName)||[]}get hasTelecomNetwork(){return this.dataElement?.domainNetworks.some(e=>e.isTelecomNetwork)??!1}get associationsTable(){return this.networkSystemLayers.associationsTable}async load(e){return this.addResolvingPromise(this._load(e)),this}async _load(e){await super._load(e),await Promise.all([this._loadNamedTraceConfigurationsFromNetwork(e),this.networkSystemLayers.loadAssociationsTable(e)])}getTerminalConfiguration(e){let t=null,r=null;const s=e.sourceLayer??e.origin??e.layer??null;let o=null;if("feature"===s?.type){if(o=s.layerId,null===o)return null}else{if("subtype-sublayer"!==s?.type)return null;if(o=s?.parent?.layerId??null,null===o)return null}const i=e.attributes;if(null==i)return null;for(const l of Object.keys(i))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let a=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find(e=>e.layerId===o);if(e){const s=e.assetGroups?.find(e=>e.assetGroupCode===t);if(s){const e=s.assetTypes?.find(e=>e.assetTypeCode===r);if(e?.isTerminalConfigurationSupported){a=e.terminalConfigurationId;break}}}}if(null!=a){const e=this.dataElement.terminalConfigurations,t=e?.find(e=>e.terminalConfigurationId===a);return t?y.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e);return t?.tiers?.map(e=>e.name)||[]}async getRulesTable(){const e=this._rulesLayer;e.loaded||await e.load();const t=this.dataElement?.domainNetworks;if(!t)return null;const r=t.flatMap(e=>[...e.edgeSources||[],...e.junctionSources||[]]),s=(await this._queryRulesTable(e)).map(t=>this._hydrateRuleInfo(e,r,t));return new u({rulesLayer:e,rules:s})}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e&&t.isTelecomNetwork);if(!t)return null;const{default:s}=await import("./CircuitManager.js");return r(this._circuitManagerMap,e,()=>new s({utilityNetwork:this,telecomDomainNetwork:t}))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;const{default:e}=await import("./UnitIdentifierManager.js");return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){if(!this.dataElement||null==e)return null;const t=this._terminalById.get(e);return null!=t?t:(this.terminalConfigurations.forEach(e=>{e.terminals.forEach(e=>{this._terminalById.set(e.id,e)})}),this._terminalById.get(e))}isUtilityLayer(e){return"layerId"in e?null!=e.layerId&&this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):!("subtype-sublayer"!==e.type||!e.parent)&&(this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1))}async queryAssociations(e,t){const[{queryAssociations:r},{default:s}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),o=s.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;return(await r(this.networkServiceUrl,o,t)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const o=await t(this.networkServiceUrl,s);return new f({statusUrl:o})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;const{fromNetworkElement:r,toNetworkElement:s}=e;if(!r||!s)return!1;await t.load();let o=null;switch(e.associationType){case"containment":o=t.rulesCategorized.containment;break;case"attachment":o=t.rulesCategorized.attachment;break;default:o=t.rulesCategorized.connectivity}return o.some(e=>w(e,r,s))}generateAddAssociations(e){const{associationsTable:r}=this.networkSystemLayers,{fromNetworkSourceId:s,fromGlobalId:o,fromTerminalId:i,fromFirstUnit:a,fromLastUnit:n,toNetworkSourceId:l,toGlobalId:u,toTerminalId:d,toFirstUnit:c,toLastUnit:y,associationType:f,isContentVisible:p,percentAlong:b,globalId:w}=m(r);return{addFeatures:e.map(e=>{const r=new t({attributes:{[s]:e.fromNetworkElement?.networkSourceId,[o]:e.fromNetworkElement?.globalId,[i]:e.fromNetworkElement?.terminalId,[l]:e.toNetworkElement?.networkSourceId,[u]:e.toNetworkElement?.globalId,[d]:e.toNetworkElement?.terminalId,[f]:h[e.associationType],[p]:null==e.isContentVisible?void 0:e.isContentVisible?1:0,[b]:e.percentAlong,[w]:e.globalId}}),m=e.associationType.includes("connectivity");return e.fromNetworkElement instanceof I&&(r.attributes[a]=e.fromNetworkElement?.firstUnit,r.attributes[n]=e.fromNetworkElement?.lastUnit,m&&(r.attributes[i]=1)),e.toNetworkElement instanceof I&&(r.attributes[c]=e.toNetworkElement?.firstUnit,r.attributes[y]=e.toNetworkElement?.lastUnit,m&&(r.attributes[d]=1)),r}),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:r?.globalIdField??"globalid",objectIdField:r?.objectIdField??"objectid"}}}generateDeleteAssociations(e){const{associationsTable:t,associationsTableId:r}=this.networkSystemLayers,s={id:r,identifierFields:{globalIdField:t?.globalIdField??"globalid",objectIdField:t?.objectIdField??"objectid"}};if(-8===this.dataElement?.schemaGeneration){const t=this._generateDeleteTelecomAssociationPayload(e);return{...s,deleteAssociations:t}}const o=e.map(e=>({globalId:e.globalId}));return{...s,deleteFeatures:o}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async loadSubnetworksTable(){return this.networkSystemLayers.loadSubnetworksTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map(e=>e.globalId),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find(e=>e.globalId===s.globalId);if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,o=s.get("RULETYPE"),i=s.get("CREATIONDATE"),a=s.get("FROMNETWORKSOURCEID"),n=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),u=s.get("FROMTERMINALID"),d=s.get("TONETWORKSOURCEID"),m=s.get("TOASSETGROUP"),c=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),f=s.get("VIANETWORKSOURCEID"),h=s.get("VIAASSETGROUP"),p=s.get("VIAASSETTYPE"),b=s.get("VIATERMINALID"),w=r.attributes[o.name],I=new Date(r.attributes[i.name]),g=[{networkSourceId:r.attributes[a.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[d.name],assetGroupId:r.attributes[m.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[f.name],assetGroupId:r.attributes[h.name],assetTypeId:r.attributes[p.name],terminalId:r.attributes[b.name]}],T={ruleType:w,creationDate:I};for(const k of[0,1,2]){if(5!==w&&2===k)continue;const e=g[k],r=t.find(t=>t.sourceId===e.networkSourceId),s=r?.assetGroups.find(t=>t.assetGroupCode===e.assetGroupId),o=s?.assetTypes.find(t=>t.assetTypeCode===e.assetTypeId),i=this._getTerminal(o,e);let a="";switch(k){case 0:a="from";break;case 1:a="to";break;case 2:a="via"}T[`${a}NetworkSource`]=r,T[`${a}AssetGroup`]=s,T[`${a}AssetType`]=o,T[`${a}Terminal`]=i?.toJSON()}return T}_getTerminal(e,t){const r=e?.terminalConfigurationId,s=this.terminalConfigurations?.find(e=>e.id===r);return s?.terminals?.find(e=>e.id===t.terminalId)??null}async _queryRulesTable(e){const{gdbVersion:t,historicMoment:r}=this,s=new g({where:"1=1",outFields:["*"],gdbVersion:t,historicMoment:r});return(await n(e,s)).features}_generateDeleteTelecomAssociationPayload(e){return e.map(e=>({globalId:e.globalId??p,associationType:b.toJSON(e.associationType),fromSourceId:e.fromNetworkElement.networkSourceId,fromGlobalId:e.fromNetworkElement.globalId,fromTerminalId:e.fromNetworkElement.terminalId,toSourceId:e.toNetworkElement.networkSourceId,toGlobalId:e.toNetworkElement.globalId,toTerminalId:e.toNetworkElement.terminalId}))}};e([o({readOnly:!0})],T.prototype,"_rulesLayer",null),e([o({type:[d],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],T.prototype,"sharedNamedTraceConfigurations",void 0),e([o({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],T.prototype,"type",void 0),e([o({readOnly:!0})],T.prototype,"serviceTerritoryFeatureLayerId",null),e([o({readOnly:!0})],T.prototype,"networkSystemLayers",null),e([o({readOnly:!0})],T.prototype,"terminalConfigurations",null),e([o({readOnly:!0})],T.prototype,"domainNetworkNames",null),e([o({readOnly:!0})],T.prototype,"hasTelecomNetwork",null),e([o({readOnly:!0,json:{read:!1}})],T.prototype,"associationsTable",null),T=e([i("esri.networks.UtilityNetwork")],T);const k=T;export{k as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.1.0-next.66",
3
+ "version": "5.1.0-next.68",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -19,7 +19,7 @@
19
19
  "license": "SEE LICENSE IN LICENSE.md",
20
20
  "dependencies": {
21
21
  "@amcharts/amcharts5": "~5.17.1",
22
- "@arcgis/toolkit": "^5.1.0-next.68",
22
+ "@arcgis/toolkit": "^5.1.0-next.70",
23
23
  "@esri/arcgis-html-sanitizer": "~4.1.0",
24
24
  "@esri/calcite-components": "^5.0.2",
25
25
  "@vaadin/grid": "~25.1.0",
@@ -14,7 +14,7 @@ import type { GraphicProperties } from "../Graphic.js";
14
14
  import type { PointProperties } from "../geometry/Point.js";
15
15
 
16
16
  export interface FeatureProperties extends IdentifiableMixinProperties, Partial<Pick<Feature, "defaultPopupTemplateEnabled" | "map" | "view">> {
17
- /** Defines the specific [Abilities](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/types/#Abilities) that the [Feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component should use when querying and displaying its content. */
17
+ /** Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that the [Feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component should use when querying and displaying its content. */
18
18
  abilities?: FeatureAbilitiesProperties;
19
19
  /**
20
20
  * The [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) used to represent the feature.
@@ -92,7 +92,7 @@ export type PopupViewModelContent = PopupTemplateContentResolved;
92
92
  */
93
93
  export default class Feature extends FeatureSuperclass {
94
94
  constructor(properties?: FeatureProperties);
95
- /** Defines the specific [Abilities](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/types/#Abilities) that the [Feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component should use when querying and displaying its content. */
95
+ /** Defines the specific [FeatureAbilities](https://developers.arcgis.com/javascript/latest/references/core/popup/support/FeatureAbilities/) that the [Feature](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature/) component should use when querying and displaying its content. */
96
96
  get abilities(): FeatureAbilities;
97
97
  set abilities(value: FeatureAbilitiesProperties);
98
98
  /** The [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) of the feature. */
@@ -200,7 +200,7 @@ export default class Feature extends FeatureSuperclass {
200
200
  accessor map: EsriMap | null | undefined;
201
201
  /**
202
202
  * A read-only map containing information about related features for the current feature.
203
- * The keys are related layer IDs as strings, and the values are [RelatedInfo](https://developers.arcgis.com/javascript/latest/references/core/widgets/Feature/types/#RelatedInfo) objects.
203
+ * The keys are related layer IDs as strings, and the values are [RelatedInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/types/#RelatedInfo) objects.
204
204
  * This property is populated when the feature has related fields and is used to manage and display related feature information.
205
205
  */
206
206
  get relatedInfos(): Map<string, RelatedInfo>;
@@ -8,11 +8,10 @@ import type FeatureAbilities from "./support/FeatureAbilities.js";
8
8
  import type { EventedAccessor } from "../core/Evented.js";
9
9
  import type { ScreenPoint } from "../core/types.js";
10
10
  import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
11
- import type { State, FetchFeaturesOptions } from "./types.js";
11
+ import type { FetchFeaturesOptions, InitialDisplayOptions, PopupAction, State } from "./types.js";
12
12
  import type { TimeZone } from "../time/types.js";
13
13
  import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
14
14
  import type { FetchPopupFeaturesResult } from "../views/types.js";
15
- import type { ActionEvent, InitialDisplayOptions, PopupAction } from "../widgets/Popup/types.js";
16
15
  import type { GoTo, GoToProperties } from "../widgets/support/GoTo.js";
17
16
  import type { GoToParameters } from "../widgets/support/types.js";
18
17
  import type { ActionToggleProperties } from "../support/actions/ActionToggle.js";
@@ -32,9 +31,6 @@ export interface FeaturesProperties extends GoToProperties, Partial<Pick<Feature
32
31
  * [PopupTemplate.overwriteActions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#overwriteActions) property to `true` in a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/).
33
32
  * The order of each action is the order in which they appear in the actions [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/).
34
33
  *
35
- * The [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#event-trigger-action) event fires each time an action is clicked.
36
- *
37
- * @see [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#event-trigger-action)
38
34
  * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/)
39
35
  * @example
40
36
  * ```js
@@ -96,19 +92,6 @@ export interface FeaturesProperties extends GoToProperties, Partial<Pick<Feature
96
92
  timeZone?: TimeZone | null;
97
93
  }
98
94
 
99
- export interface FeaturesEvents {
100
- /**
101
- * Fires after the user clicks on an [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) in the action bar. This
102
- * event may be used to define a custom function to execute when particular
103
- * actions are clicked. See the example below for details of how this works.
104
- *
105
- * @see [actions](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#actions)
106
- * @see [PopupTemplate.actions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#actions)
107
- * @see [open](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#open)
108
- */
109
- "trigger-action": ActionEvent;
110
- }
111
-
112
95
  /**
113
96
  * Provides reactive state and behavior for the [Features](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features/) component, including fetching and paging popup features, tracking selection, and coordinating highlighting and actions.
114
97
  *
@@ -118,12 +101,6 @@ export interface FeaturesEvents {
118
101
  * @see [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/)
119
102
  */
120
103
  export default class Features extends FeaturesSuperclass {
121
- /**
122
- * @deprecated
123
- * Do not directly reference this property.
124
- * Use EventNames and EventTypes helpers from \@arcgis/core/Evented
125
- */
126
- "@eventTypes": FeaturesEvents;
127
104
  constructor(properties?: FeaturesProperties);
128
105
  /**
129
106
  * [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) objects.
@@ -135,9 +112,6 @@ export default class Features extends FeaturesSuperclass {
135
112
  * [PopupTemplate.overwriteActions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#overwriteActions) property to `true` in a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/).
136
113
  * The order of each action is the order in which they appear in the actions [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/).
137
114
  *
138
- * The [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#event-trigger-action) event fires each time an action is clicked.
139
- *
140
- * @see [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#event-trigger-action)
141
115
  * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/)
142
116
  * @example
143
117
  * ```js
@@ -385,12 +359,6 @@ export default class Features extends FeaturesSuperclass {
385
359
  * are pushed into the [features](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#features) array.
386
360
  */
387
361
  accessor promises: Promise<Graphic[]>[];
388
- /**
389
- * The graphic used to represent the cluster extent when the `Browse features` action
390
- * is active. Only applies when a PopupTemplate is set on
391
- * a [FeatureReductionCluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) instance.
392
- */
393
- get selectedClusterBoundaryFeature(): Graphic;
394
362
  /**
395
363
  * The selected feature accessed. The [content](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#content) is
396
364
  * determined based on the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) assigned to