@arcgis/core 4.34.0-next.49 → 4.34.0-next.50

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 (196) hide show
  1. package/Basemap.js +1 -1
  2. package/Map.js +1 -1
  3. package/WebScene.js +1 -1
  4. package/analysis/ElevationProfileAnalysis.js +1 -1
  5. package/analysis/ElevationProfileLineInput.js +1 -1
  6. package/analysis/ElevationProfileViewOptions.d.ts +4 -0
  7. package/analysis/ElevationProfileViewOptions.js +5 -0
  8. package/assets/esri/core/workers/RemoteClient.js +1 -1
  9. package/assets/esri/core/workers/chunks/02902303e5585a16ebea.js +1 -0
  10. package/assets/esri/core/workers/chunks/037bc400257bc13b3ec8.js +1 -0
  11. package/assets/esri/core/workers/chunks/0f9813e7d4e2b47b2c39.js +1 -0
  12. package/assets/esri/core/workers/chunks/171ce8c64f322cd5d6d1.js +1 -0
  13. package/assets/esri/core/workers/chunks/{476a6e5ca558db2adaa1.js → 1ae15163af8875148fb8.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{e962e6b47cb7e5a71c24.js → 1e01aaebdeffdfc0c6bd.js} +1 -1
  15. package/assets/esri/core/workers/chunks/21a90083f29e44ccd735.js +1 -0
  16. package/assets/esri/core/workers/chunks/{fc6408208c850eec4019.js → 237c96d946efa5ed0386.js} +1 -1
  17. package/assets/esri/core/workers/chunks/2c0241a5958aef9cda61.js +1 -0
  18. package/assets/esri/core/workers/chunks/3167230555c63f943485.js +1 -0
  19. package/assets/esri/core/workers/chunks/32789077e37d5c8191e7.js +1 -0
  20. package/assets/esri/core/workers/chunks/{bd1c2afaf491d1c79a9e.js → 3e3886a51c0f8c86df75.js} +1 -1
  21. package/assets/esri/core/workers/chunks/4fc267552939583a81a0.js +1 -0
  22. package/assets/esri/core/workers/chunks/5691d504ffe5592bc40f.js +1 -0
  23. package/assets/esri/core/workers/chunks/6775d2ab5faf1fa161db.js +1 -0
  24. package/assets/esri/core/workers/chunks/6fff219dfaa86167c326.js +1 -0
  25. package/assets/esri/core/workers/chunks/{c660b6e67d5d13583f19.js → 854bfda25bb406814929.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{e177d0ab454dfa024b39.js → 8c8c8f1058a4b58a3181.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{379a4f664e77ad1fffe9.js → 96a34b240d17147902f4.js} +1 -1
  28. package/assets/esri/core/workers/chunks/998c38974372720b1c52.js +1 -0
  29. package/assets/esri/core/workers/chunks/a3dce23ca98c9b0f945f.js +1 -0
  30. package/assets/esri/core/workers/chunks/a7530dcb08b43e37bbb2.js +1 -0
  31. package/assets/esri/core/workers/chunks/{d4766c97d97554b3b408.js → b29f0b32787edb4e75cf.js} +1 -1
  32. package/assets/esri/core/workers/chunks/b6a201e86f9caef45ff0.js +1 -0
  33. package/assets/esri/core/workers/chunks/{f42938e1602306cfa7a8.js → b8158c681456d4cf2395.js} +1 -1
  34. package/assets/esri/core/workers/chunks/bc931865a77fc48871d3.js +1 -0
  35. package/assets/esri/core/workers/chunks/c4651243525026e6ddde.js +1 -0
  36. package/assets/esri/core/workers/chunks/{50d526a16bc86a481055.js → cfc3f202e7313ca56823.js} +1 -1
  37. package/assets/esri/core/workers/chunks/e10c5405f956b2cc59e4.js +1 -0
  38. package/assets/esri/core/workers/chunks/e4069352d5d1104749ae.js +1 -0
  39. package/assets/esri/core/workers/chunks/{b287624909578d307e07.js → e5522c85ca4f0efab8ea.js} +1 -1
  40. package/assets/esri/core/workers/chunks/fb669a2e50ca7aacac25.js +1 -0
  41. package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
  42. package/config.js +1 -1
  43. package/core/throttle.js +1 -1
  44. package/interfaces.d.ts +53 -52
  45. package/kernel.js +1 -1
  46. package/layers/ImageryLayer.js +1 -1
  47. package/layers/ImageryTileLayer.js +1 -1
  48. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  49. package/layers/Layer.js +1 -1
  50. package/layers/ParquetLayer.js +1 -1
  51. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  52. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  53. package/layers/mixins/ArcGISImageService.js +1 -1
  54. package/layers/mixins/ImageryTileMixin.js +1 -1
  55. package/layers/support/capabilities.js +1 -1
  56. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  57. package/package.json +1 -1
  58. package/portal/PortalItem.js +1 -1
  59. package/portal/schemas/definitions.js +1 -1
  60. package/renderers/FlowRenderer.js +1 -1
  61. package/renderers/support/AuthoringInfo.js +1 -1
  62. package/renderers/support/RasterPresetRenderer.js +1 -1
  63. package/renderers/support/rasterTypeUtils.js +1 -1
  64. package/support/revision.js +1 -1
  65. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  66. package/views/2d/engine/webgl/Painter.js +1 -1
  67. package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
  68. package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
  69. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  70. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  71. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  72. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  73. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  74. package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
  75. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  76. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  77. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  78. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  79. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  80. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  81. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  82. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  83. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  84. package/views/3d/analysis/ElevationProfile/HoveredPointVisualization.js +5 -0
  85. package/views/3d/analysis/ElevationProfile/HoveredPointsVisualization.js +5 -0
  86. package/views/3d/analysis/ElevationProfile/InputVisualization.js +5 -0
  87. package/views/3d/analysis/ElevationProfile/ProfileLinesVisualization.js +5 -0
  88. package/views/3d/analysis/ElevationProfile/Visualization.js +5 -0
  89. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  90. package/views/BasemapView.js +1 -1
  91. package/views/GroundView.js +1 -1
  92. package/views/View.js +1 -1
  93. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  94. package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
  95. package/views/analysis/ElevationProfile/ProfileGenerationError.js +1 -1
  96. package/views/analysis/ElevationProfile/geometryUtils.js +1 -1
  97. package/views/analysis/ElevationProfile/profileUtils.js +1 -1
  98. package/views/analysis/ElevationProfile/visualizationUtils.js +5 -0
  99. package/views/analysis/ElevationProfileResult.js +1 -1
  100. package/views/support/DefaultsFromMap.js +1 -1
  101. package/views/support/LayerViewManager.js +1 -1
  102. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  103. package/arcade/validation/types.js +0 -4
  104. package/assets/esri/core/workers/chunks/04cbd3aa9965b2eb71ea.js +0 -1
  105. package/assets/esri/core/workers/chunks/08840c4d3df711065571.js +0 -1
  106. package/assets/esri/core/workers/chunks/0ebf666564d323d82259.js +0 -1
  107. package/assets/esri/core/workers/chunks/20ffac42ff5095af00fe.js +0 -1
  108. package/assets/esri/core/workers/chunks/2ae50b02cdf126a8b562.js +0 -1
  109. package/assets/esri/core/workers/chunks/6cd828cfe41e0cab2068.js +0 -1
  110. package/assets/esri/core/workers/chunks/892623d938583cd0f006.js +0 -1
  111. package/assets/esri/core/workers/chunks/8aa77a5e82c033512b45.js +0 -1
  112. package/assets/esri/core/workers/chunks/99daf4b144838fa9ca67.js +0 -1
  113. package/assets/esri/core/workers/chunks/9cbec2ffa445a72d4c33.js +0 -1
  114. package/assets/esri/core/workers/chunks/a34d98abcf958a632b0f.js +0 -1
  115. package/assets/esri/core/workers/chunks/a69258f34a5eb5a1954f.js +0 -1
  116. package/assets/esri/core/workers/chunks/b79aa5ba0424641f878b.js +0 -1
  117. package/assets/esri/core/workers/chunks/bb56defb6dfb9b2c1f27.js +0 -1
  118. package/assets/esri/core/workers/chunks/cf6330f721c6910d25ff.js +0 -1
  119. package/assets/esri/core/workers/chunks/cff15600d0ec7b19dffb.js +0 -1
  120. package/assets/esri/core/workers/chunks/d552b22219ec795aff89.js +0 -1
  121. package/assets/esri/core/workers/chunks/d62d41091f7ac5f77f16.js +0 -1
  122. package/assets/esri/core/workers/chunks/dbc9bb3011f16ce33f71.js +0 -1
  123. package/assets/esri/core/workers/chunks/e505a101621de39de280.js +0 -1
  124. package/assets/esri/core/workers/chunks/f2a2d3cda4a3dc0a8caf.js +0 -1
  125. package/core/ByteSizeUnit.js +0 -4
  126. package/core/ObservableChangesType.js +0 -4
  127. package/geometry/support/Axis.js +0 -4
  128. package/geometry/support/SupportedGCSWkids.js +0 -4
  129. package/geometry/support/meshUtils/exporters/gltf/gltftypes.js +0 -4
  130. package/geometry/support/meshUtils/exporters/gltf/types.js +0 -4
  131. package/layers/graphics/sources/interfaces.js +0 -4
  132. package/layers/orientedImagery/enums/CameraOrientationType.js +0 -4
  133. package/libs/basisu/TextureFormat.js +0 -4
  134. package/libs/i3s/enums.js +0 -4
  135. package/libs/lyr3d/enums.js +0 -4
  136. package/libs/vxl/enums.js +0 -4
  137. package/rest/knowledgeGraph/wasmInterface/KnowledgeWasmInterface.js +0 -4
  138. package/rest/knowledgeGraph/wasmInterface/WasmClientDataInterfaces.js +0 -4
  139. package/symbols/cim/enums.js +0 -4
  140. package/undoredo/OperationStatus.js +0 -4
  141. package/views/2d/engine/imagery/enums.js +0 -4
  142. package/views/2d/engine/vectorTiles/enums.js +0 -4
  143. package/views/2d/engine/vectorTiles/shaders/enums.js +0 -4
  144. package/views/2d/engine/webgl/enums.js +0 -4
  145. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +0 -4
  146. package/views/2d/engine/webgl/shaderGraph/techniques/animated/enums.js +0 -4
  147. package/views/2d/tiling/enums.js +0 -4
  148. package/views/3d/analysis/DirectLineMeasurement/interfaces.js +0 -4
  149. package/views/3d/analysis/interfaces.js +0 -4
  150. package/views/3d/camera/constraintUtils/ConstraintTypes.js +0 -4
  151. package/views/3d/camera/constraintUtils/InteractionType.js +0 -4
  152. package/views/3d/camera/constraintUtils/TiltMode.js +0 -4
  153. package/views/3d/glTF/internal/enums.js +0 -4
  154. package/views/3d/interactive/editingTools/GrabbingState.js +0 -4
  155. package/views/3d/interactive/editingTools/ManipulatorType.js +0 -4
  156. package/views/3d/layers/II3SMeshView3D.js +0 -4
  157. package/views/3d/layers/graphics/enums.js +0 -4
  158. package/views/3d/layers/graphics/interfaces.js +0 -4
  159. package/views/3d/layers/interfaces.js +0 -4
  160. package/views/3d/layers/support/I3SLayerView.js +0 -4
  161. package/views/3d/support/enums.js +0 -4
  162. package/views/3d/terrain/NeighborIndex.js +0 -4
  163. package/views/3d/terrain/OverlayContent.js +0 -4
  164. package/views/3d/terrain/TileFrustumVisibility.js +0 -4
  165. package/views/3d/terrain/TileUpdate.js +0 -4
  166. package/views/3d/terrain/TransparencyMode.js +0 -4
  167. package/views/3d/terrain/interfaces.js +0 -4
  168. package/views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardMode.js +0 -4
  169. package/views/3d/webgl-engine/core/renderPasses/RenderPassIdentifier.js +0 -4
  170. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDRenderStyle.js +0 -4
  171. package/views/3d/webgl-engine/core/shaderLibrary/terrain/BaseOpacityMode.js +0 -4
  172. package/views/3d/webgl-engine/core/shaderLibrary/terrain/BlendLayersOutput.js +0 -4
  173. package/views/3d/webgl-engine/core/shaderLibrary/terrain/PremultipliedAlphaSource.js +0 -4
  174. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBlendInput.js +0 -4
  175. package/views/3d/webgl-engine/effects/focusArea/FocusAreaEffect.js +0 -4
  176. package/views/3d/webgl-engine/lib/IntersectableGeometry.js +0 -4
  177. package/views/3d/webgl-engine/lib/IntersectorType.js +0 -4
  178. package/views/3d/webgl-engine/lib/ModelDirtyTypes.js +0 -4
  179. package/views/3d/webgl-engine/lib/OITPass.js +0 -4
  180. package/views/3d/webgl-engine/lib/RenderSlot.js +0 -4
  181. package/views/3d/webgl-engine/lib/Update.js +0 -4
  182. package/views/3d/webgl-engine/lib/UpdatePolicy.js +0 -4
  183. package/views/3d/webgl-engine/lib/basicInterfaces.js +0 -4
  184. package/views/3d/webgl-engine/lib/edgeRendering/interfaces.js +0 -4
  185. package/views/3d/webgl-engine/materials/PatternStyle.js +0 -4
  186. package/views/input/IViewEvents.js +0 -4
  187. package/views/interactive/editGeometry/interfaces.js +0 -4
  188. package/views/interactive/interfaces.js +0 -4
  189. package/views/interactive/snapping/SnappingDomain.js +0 -4
  190. package/views/support/RenderState.js +0 -4
  191. package/views/webgl/BindType.js +0 -4
  192. package/views/webgl/FBOAttachmentType.js +0 -4
  193. package/webdoc/interfaces.js +0 -4
  194. package/widgets/ShadowCast/DurationMode.js +0 -4
  195. package/widgets/ShadowCast/ShadowCastState.js +0 -4
  196. package/widgets/Weather/enums.js +0 -4
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[812],{80812:(e,t,i)=>{i.r(t),i.d(t,{default:()=>x});var r=i(31635),o=i(2741),a=i(49186),s=i(25482),n=i(4718),l=i(92474),p=i(84952),c=i(10107),d=i(56507),u=i(36005),h=i(40608),g=i(5443),m=i(20655),y=i(65008),w=i(53966),v=i(79901);i(44208),i(87811);let b=class extends y.A{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e?.portalItem&&e.path?{...e,path:f(e.path,e.portalItem)}:e}set path(e){null!=e&&(0,p.oP)(e)?w.A.getLogger(this).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return f(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get cdnUrl(){return this.portalItem&&this.path?`${this.portalItem.itemCdnUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const i=this.cdnUrl;if(null==i)throw new a.A("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal.request(i,{responseType:e,query:{token:this.portalItem.apiKey,_ts:t?.cacheBust?Date.now():null},signal:t?.signal})}async update(e,t){const{addOrUpdateResources:r}=await i.e(5804).then(i.bind(i,15804));return await r(this.portalItem,[{resource:this,content:e,compress:t?.compress,access:t?.access}],"update",t),this}hasPath(){return null!=this.path}};function f(e,t){return null==e?e:(e=e.replace(/^\/+/,""),null!=t&&(0,p.oP)(e)&&(e=(0,p.V1)(e,t.itemUrl)),e?.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}(0,r.Cg)([(0,c.MZ)()],b.prototype,"portalItem",void 0),(0,r.Cg)([(0,c.MZ)({type:String,value:null})],b.prototype,"path",null),(0,r.Cg)([(0,v.w)("path")],b.prototype,"_castPath",null),(0,r.Cg)([(0,c.MZ)({type:String,readOnly:!0})],b.prototype,"url",null),(0,r.Cg)([(0,c.MZ)({type:String,readOnly:!0})],b.prototype,"cdnUrl",null),(0,r.Cg)([(0,c.MZ)({type:String,readOnly:!0})],b.prototype,"itemRelativeUrl",null),b=(0,r.Cg)([(0,h.$)("esri.portal.PortalItemResource")],b);let k=class extends y.A{constructor(e){super(e),this.created=null,this.rating=null}};(0,r.Cg)([(0,c.MZ)({type:Date})],k.prototype,"created",void 0),(0,r.Cg)([(0,c.MZ)()],k.prototype,"rating",void 0),k=(0,r.Cg)([(0,h.$)("esri.portal.PortalRating")],k);var C,S=i(97159);const M=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Knowledge Graph Layer","Map Service","Media Layer","Scene Service","Stream Service","Video Service","Vector Tile Service","WCS","WFS","WMS","WMTS"]),I=new Set(["KML","GeoJson","CSV"]);let x=C=class extends((0,s.T)(l.x_)){static from(e){return(0,d.PZ)(C,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.classification=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Geocoding Service"===e?i="Locator":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e?.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"Raster function template"===e?i="Raster Function Template":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e?i="Insights Report":"Excalibur Imagery Project"===e?i="Excalibur Project":"3DTiles Service"===e?i="3D tiles layer":"3DTiles Package"===e&&(i="3D tiles package"),i}readExtent(e){return e&&e.length?new g.A(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",t=this.typeKeywords||[];let i,r=!1,a=!1,s=!1,n=!1,l=!1,p=!1,c=!1,d=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(r=t.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(a=t.includes("Table"),s=t.includes("Route Layer"),n=t.includes("Markup"),l=t.includes("Spatiotemporal"),p=t.includes("UtilityNetwork"),i=l&&a?"spatiotemporaltable":a?"table":s?"routelayer":n?"markup":l?"spatiotemporal":p?"utilitynetwork":r?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(l=t.includes("Spatiotemporal"),c=t.includes("Relational"),i=l||c?"mapimages":r||t.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):i="scene service"===e?t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?t.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?t.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?t.includes("3DObject")?"3dobjecttileslayer":t.includes("IntegratedMesh")?"integratedmeshtileslayer":t.includes("GaussianSplat")?"gaussiansplatlayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?i="maps":"web scene"===e?i=t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&t.includes("configurableApp")?i="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?i="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.includes("ArcGIS Pro")||"explorer map"===e&&t.indexOf("Explorer Document")?i="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?i="datafiles":"360 vr experience"===e?i="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?i="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?i="addindesktop":"pdf"===e?i="pdf":"microsoft word"===e?i="word":"microsoft excel"===e?i="excel":"microsoft powerpoint"===e?i="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&t.includes("Explorer Mapping Application")||t.includes("Document")?i="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?i="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?i="layersgray":"analysis model"===e?i="analysismodel":"scene package"===e?i="scenepackage":"3dtiles package"===e?i="3dtileslayerpackage":"3dtiles service"===e?i="3dtileslayer":"mobile scene package"===e?i="mobilescenepackage":"tile package"===e||"compact tile package"===e?i="tilepackage":"task file"===e?i="taskfile":"report template"===e?i="report-template":"statistical data collection"===e?i="statisticaldatacollection":"insights workbook"===e?i="workbook":"insights model"===e?i="insightsmodel":"insights page"===e?i="insightspage":"insights theme"===e?i="insightstheme":"hub initiative"===e?i="hubinitiative":"hub page"===e?i="hubpage":"hub site application"===e?i="hubsite":"hub event"===e?i="hubevent":"hub project"===e?i="hubproject":"relational database connection"===e?i="relationaldatabaseconnection":"big data file share"===e?i="datastorecollection":"image collection"===e?i="imagecollection":"desktop style"===e?i="desktopstyle":"style"===e?i=t.includes("Dictionary")?"dictionarystyle":"style":"dashboard"===e?i="dashboard":"raster function template"===e?i="rasterprocessingtemplate":"vector tile package"===e?i="vectortilepackage":"ortho mapping project"===e?i="orthomappingproject":"ortho mapping template"===e?i="orthomappingtemplate":"solution"===e?i="solutions":"geopackage"===e?i="geopackage":"deep learning package"===e?i="deeplearningpackage":"real time analytic"===e?i="realtimeanalytics":"reality mapping project"===e?i="realitymappingproject":"big data analytic"===e?i="bigdataanalytics":"feed"===e?i="feed":"excalibur imagery project"===e?i="excaliburimageryproject":"notebook"===e?i="notebook":"storymap"===e?i="storymap":"survey123 add in"===e?i="survey123addin":"mission"===e?i="mission":"mission report"===e?i="missionreport":"mission template"===e?i="missiontemplate":"quickcapture project"===e?i="quickcaptureproject":"pro report"===e?i="proreport":"pro report template"===e?i="proreporttemplate":"urban model"===e?i="urbanmodel":"urban project"===e?i="urbanproject":"web experience"===e?i="experiencebuilder":"web experience template"===e?i="webexperiencetemplate":"experience builder widget"===e?i="experiencebuilderwidget":"experience builder widget package"===e?i="experiencebuilderwidgetpackage":"workflow"===e?i="workflow":"kernel gateway connection"===e?i="kernelgatewayconnection":"insights script"===e?i="insightsscript":"hub initiative template"===e?i="hubinitiativetemplate":"storymap theme"===e?i="storymaptheme":"knowledge graph"===e?i="knowledgegraph":"knowledge graph layer"===e?i="knowledgegraphlayer":"knowledge studio project"===e?i="knowledgestudio":"native application"===e?i="nativeapp":"native application installer"===e?i="nativeappinstaller":"web link chart"===e?i="linkchart":"knowledge graph web investigation"===e?i="investigation":"ogcfeatureserver"===e?i="features":"pro presentation"===e?i="propresentation":"pro project"===e?i="proproject":"insights workbook package"===e?i="insightsworkbookpackage":"apache parquet"===e?i="apacheparquet":"notebook code snippet library"===e?i="notebookcodesnippets":"suitability model"===e?i="suitabilitymodel":"esri classifier definition"===e?i="classifierdefinition":"esri classification schema"===e?i="classificationschema":"insights data engineering workbook"===e?i="dataengineeringworkbook":"insights data engineering model"===e?i="dataengineeringmodel":"deep learning studio project"===e?i="deeplearningproject":"discussion"===e?i="discussion":"allsource project"===e?i="allsourceproject":"api key"===e?i="apikey":"data pipeline"===e?i="datapipelines":"group layer"===e?(d=t.includes("Map"),i=d?"layergroup2d":"layergroup"):i="media layer"===e?"onlinemedialayer":"form"===e?t.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"maps",i?(0,o.s)("esri/images/portal/"+i+"16.png"):null}get isLayer(){return null!=this.type&&M.has(this.type)}get itemCdnUrl(){return(0,S.a)(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get loaded(){return super.loaded}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.id;return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){const t=this.portal??(this.portal=m.A.getDefault()),i=t.load(e).then(()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{}).then(e=>{this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}},i=e instanceof k?e.rating:e;return null==i||isNaN(i)||"number"!=typeof e||(t.query.rating=i),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new k({rating:i,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,n.o8)(this.applicationProxies),avgRating:this.avgRating,categories:(0,n.o8)(this.categories),classification:(0,n.o8)(this.classification),created:(0,n.o8)(this.created),culture:this.culture,description:this.description,extent:(0,n.o8)(this.extent),groupCategories:(0,n.o8)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,n.o8)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,n.o8)(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,n.o8)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,n.o8)(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new C({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");for(const t of["extent","classification"]){const i=e[t];i&&(e[t]=JSON.stringify(i))}return e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new k(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},C)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then(e=>(this.applicationProxies&&!Object.hasOwn(e,"appProxies")&&(this.applicationProxies=null),this.sourceJSON=e,this.read(e),this))}update(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e?.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then(()=>this.reload())}):Promise.reject(new a.A("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new a.A("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:i}=this;await t.signIn();const{copyResources:r,folder:o,tags:s,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===r,folder:"string"==typeof o?o:o?.id,includeResources:!!r,tags:s?.join(","),title:n}},{itemId:p}=await t.request(`${i}/copy`,l);return new C({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)(0,p.DB)(t)?r.query={data:t}:r.query={url:(0,p.s2)(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then(()=>this.reload())}):Promise.reject(new a.A("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:r}=await i.e(5804).then(i.bind(i,15804));return r(this,e,t)}async addResource(e,t,r){const{addOrUpdateResources:o}=await i.e(5804).then(i.bind(i,15804));return e.portalItem=this,await o(this,[{resource:e,content:t,compress:r?.compress,access:r?.access}],"add",r),e}async removeResource(e,t){const{removeResource:r}=await i.e(5804).then(i.bind(i,15804));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new a.A("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await i.e(5804).then(i.bind(i,15804));return t(this,e)}resourceFromPath(e){return new b({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:(0,n.o8)(this.categories),classification:(0,n.o8)(this.classification),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,n.o8)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,n.o8)(this.typeKeywords),url:this.url};return(0,n.oy)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new C({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,r.Cg)([(0,c.MZ)({type:["private","shared","org","public"]})],x.prototype,"access",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"accessInformation",void 0),(0,r.Cg)([(0,c.MZ)({type:String})],x.prototype,"apiKey",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:{source:"appProxies"}}})],x.prototype,"applicationProxies",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"avgRating",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"categories",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"classification",void 0),(0,r.Cg)([(0,c.MZ)({type:Date})],x.prototype,"created",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"culture",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"description",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],x.prototype,"displayName",null),(0,r.Cg)([(0,c.MZ)({type:g.A})],x.prototype,"extent",void 0),(0,r.Cg)([(0,u.w)("extent")],x.prototype,"readExtent",null),(0,r.Cg)([(0,c.MZ)()],x.prototype,"groupCategories",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],x.prototype,"iconUrl",null),(0,r.Cg)([(0,c.MZ)()],x.prototype,"id",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],x.prototype,"isLayer",null),(0,r.Cg)([(0,c.MZ)({type:Boolean,readOnly:!0})],x.prototype,"isOrgItem",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"itemControl",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],x.prototype,"itemPageUrl",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],x.prototype,"itemUrl",null),(0,r.Cg)([(0,c.MZ)()],x.prototype,"licenseInfo",void 0),(0,r.Cg)([(0,c.MZ)({type:Date})],x.prototype,"modified",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"name",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"numComments",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"numRatings",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"numViews",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"owner",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"ownerFolder",void 0),(0,r.Cg)([(0,c.MZ)({type:m.A})],x.prototype,"portal",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"screenshots",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"size",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"snippet",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,c.MZ)({type:String})],x.prototype,"sourceUrl",void 0),(0,r.Cg)([(0,c.MZ)({type:String})],x.prototype,"spatialReference",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"tags",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"thumbnail",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],x.prototype,"thumbnailUrl",null),(0,r.Cg)([(0,c.MZ)()],x.prototype,"title",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"type",void 0),(0,r.Cg)([(0,c.MZ)()],x.prototype,"typeKeywords",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{read(e,t){if(I.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],x.prototype,"url",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],x.prototype,"userItemUrl",null),x=C=(0,r.Cg)([(0,h.$)("esri.portal.PortalItem")],x)}}]);
package/config.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.34.0-next.49";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
5
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.34.0-next.50";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
package/core/throttle.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- function e(e,t,l,n){let o=null,p=1e3;"number"==typeof t?(p=t,n=l):(o=t??null,p=l);let r,u=0;const a=()=>{u=0,e.apply(n,r)},c=(...e)=>{o&&o.apply(n,e),r=e,p?u||(u=setTimeout(a,p)):a()};return c.remove=()=>{u&&(clearTimeout(u),u=0)},c.forceUpdate=()=>{u&&(clearTimeout(u),a())},c.hasPendingUpdates=()=>!!u,c}export{e as throttle};
5
+ import{signal as e}from"./signal.js";function l(l,a,u,t){let o=null,n=1e3;"number"==typeof a?(n=a,t=u):(o=a??null,n=u);const r=e(0);let v;const p=()=>{r.value=0,l.apply(t,v)},i=(...e)=>{o&&o.apply(t,e),v=e,n?r.value||(r.value=setTimeout(p,n)):p()};return i.remove=()=>{r.value&&(clearTimeout(r.value),r.value=0)},i.forceUpdate=()=>{r.value&&(clearTimeout(r.value),p())},i.hasPendingUpdates=()=>!!r.value,i}export{l as throttle};
package/interfaces.d.ts CHANGED
@@ -703,6 +703,13 @@ declare namespace __esri {
703
703
  */
704
704
  get units(): ElevationProfileUnits;
705
705
  set units(value: ElevationProfileUnitsProperties);
706
+ /**
707
+ * Configuration options for visualizing an elevation profile within a view.
708
+ *
709
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#viewOptions Read more...}
710
+ */
711
+ get viewOptions(): ElevationProfileViewOptions;
712
+ set viewOptions(value: ElevationProfileViewOptionsProperties);
706
713
  }
707
714
 
708
715
  interface ElevationProfileAnalysisProperties extends AnalysisProperties {
@@ -729,6 +736,12 @@ declare namespace __esri {
729
736
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#units Read more...}
730
737
  */
731
738
  units?: ElevationProfileUnitsProperties;
739
+ /**
740
+ * Configuration options for visualizing an elevation profile within a view.
741
+ *
742
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#viewOptions Read more...}
743
+ */
744
+ viewOptions?: ElevationProfileViewOptionsProperties;
732
745
  }
733
746
 
734
747
  export interface ElevationProfileLine extends Accessor, Clonable {
@@ -1099,6 +1112,41 @@ declare namespace __esri {
1099
1112
  elevation?: SystemOrLengthUnit | nullish;
1100
1113
  }
1101
1114
 
1115
+ export interface ElevationProfileViewOptions extends Accessor, Clonable {
1116
+ }
1117
+
1118
+ export class ElevationProfileViewOptions {
1119
+ /**
1120
+ * Whether the graphic used as input should be highlighted.
1121
+ *
1122
+ * @default true
1123
+ *
1124
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileViewOptions.html#highlightEnabled Read more...}
1125
+ */
1126
+ highlightEnabled: boolean;
1127
+ /**
1128
+ * Provides configuration options for visualizing an elevation profile within a view.
1129
+ *
1130
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileViewOptions.html Read more...}
1131
+ */
1132
+ constructor(properties?: ElevationProfileViewOptionsProperties);
1133
+ /**
1134
+ * Creates a deep clone of this object.
1135
+ *
1136
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileViewOptions.html#clone Read more...}
1137
+ */
1138
+ clone(): this;
1139
+ }
1140
+
1141
+ interface ElevationProfileViewOptionsProperties {
1142
+ /**
1143
+ * Whether the graphic used as input should be highlighted.
1144
+ *
1145
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileViewOptions.html#highlightEnabled Read more...}
1146
+ */
1147
+ highlightEnabled?: boolean;
1148
+ }
1149
+
1102
1150
  export interface LengthDimension extends Accessor, Clonable {
1103
1151
  }
1104
1152
 
@@ -95010,7 +95058,7 @@ declare namespace __esri {
95010
95058
  *
95011
95059
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#hoveredPosition Read more...}
95012
95060
  */
95013
- readonly hoveredPosition: number | nullish;
95061
+ hoveredPosition: number | nullish;
95014
95062
  /**
95015
95063
  * Enables interactivity for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#analysis analysis}.
95016
95064
  *
@@ -95990,44 +96038,28 @@ declare namespace __esri {
95990
96038
  /**
95991
96039
  * Indicates whether the line is available.
95992
96040
  *
95993
- * @default false
95994
- *
95995
96041
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfileResult.html#available Read more...}
95996
96042
  */
95997
- available: boolean;
95998
- /**
95999
- * Describes any error that occurred while generating the elevation profile.
96000
- *
96001
- * @default null
96002
- *
96003
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfileResult.html#error Read more...}
96004
- */
96005
- error: any;
96043
+ readonly available: boolean;
96006
96044
  /**
96007
96045
  * Represents the progress of the elevation profile generation, ranging from 0 to 1.
96008
96046
  *
96009
- * @default 0
96010
- *
96011
96047
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfileResult.html#progress Read more...}
96012
96048
  */
96013
- progress: number;
96049
+ readonly progress: number;
96014
96050
  /**
96015
96051
  * Contains the samples that make up the elevation profile.
96016
96052
  *
96017
- * @default []
96018
- *
96019
96053
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfileResult.html#samples Read more...}
96020
96054
  */
96021
- samples: ElevationProfileSample[] | nullish;
96055
+ readonly samples: ElevationProfileSample[] | nullish;
96022
96056
  /**
96023
96057
  * Provides statistics about the elevation profile, including minimum, maximum, and average elevation values,
96024
96058
  * elevation gain and loss, and slope information.
96025
96059
  *
96026
- * @default null
96027
- *
96028
96060
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfileResult.html#statistics Read more...}
96029
96061
  */
96030
- statistics: ElevationProfileStatistics | nullish;
96062
+ readonly statistics: ElevationProfileStatistics | nullish;
96031
96063
  /**
96032
96064
  * Represents the result for a single {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileLine.html profile line} of an
96033
96065
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html ElevationProfileAnalysis}.
@@ -96044,37 +96076,6 @@ declare namespace __esri {
96044
96076
  }
96045
96077
 
96046
96078
  interface ElevationProfileResultProperties {
96047
- /**
96048
- * Indicates whether the line is available.
96049
- *
96050
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfileResult.html#available Read more...}
96051
- */
96052
- available?: boolean;
96053
- /**
96054
- * Describes any error that occurred while generating the elevation profile.
96055
- *
96056
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfileResult.html#error Read more...}
96057
- */
96058
- error?: any;
96059
- /**
96060
- * Represents the progress of the elevation profile generation, ranging from 0 to 1.
96061
- *
96062
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfileResult.html#progress Read more...}
96063
- */
96064
- progress?: number;
96065
- /**
96066
- * Contains the samples that make up the elevation profile.
96067
- *
96068
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfileResult.html#samples Read more...}
96069
- */
96070
- samples?: ElevationProfileSample[] | nullish;
96071
- /**
96072
- * Provides statistics about the elevation profile, including minimum, maximum, and average elevation values,
96073
- * elevation gain and loss, and slope information.
96074
- *
96075
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfileResult.html#statistics Read more...}
96076
- */
96077
- statistics?: ElevationProfileStatistics | nullish;
96078
96079
  }
96079
96080
 
96080
96081
  /**
package/kernel.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.49",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
5
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.50",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import o from"../core/Error.js";import s from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{debounce as a,throwIfAbortError as p}from"../core/promiseUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../core/accessorSupport/decorators/writer.js";import u from"./Layer.js";import{ArcGISImageService as y}from"./mixins/ArcGISImageService.js";import{ArcGISService as c}from"./mixins/ArcGISService.js";import{BlendLayer as d}from"./mixins/BlendLayer.js";import{CustomParametersMixin as f}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as h}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as g}from"./mixins/RasterJobHandlerMixin.js";import{RasterPresetRendererMixin as j}from"./mixins/RasterPresetRendererMixin.js";import{RefreshableLayer as L}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as S}from"./mixins/TemporalLayer.js";import{legendEnabled as w,popupEnabled as b}from"./support/commonProperties.js";import{commonRasterFieldNames as P,rasterDimensionFieldPrefix as x,setDefaultRasterFieldFormats as T}from"./support/rasterFieldUtils.js";import{serviceSupportsSpatialReference as _}from"./support/versionUtils.js";import{logInvalidElevationInfoWarning as C,elevationModeUnsupportedMessage as O,featureExpressionUnsupportedMessage as R}from"../support/elevationInfoUtils.js";import{createPopupTemplate as A}from"../support/popupUtils.js";import E from"../symbols/support/ElevationInfo.js";let G=class extends(d(S(I(h(v(j(y(g(L(f(c(i(t(u)))))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=a(async(e,r,t)=>{const{save:o,saveAs:s}=await import("./save/imageryUtils.js");switch(e){case 0:return o(this,r);case 1:return s(this,t,r)}})}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(p).then(()=>this._fetchService(r))),Promise.resolve(this)}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,r,t){const o="vector-field"===this.renderer?.type;r[t]=o?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:r}=this,t=new Set,o=P.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,i=x.toLowerCase(),a=`${P.servicePixelValue.toLowerCase()}.`;for(const l of r){const e=l.name.toLowerCase();e===o||e.startsWith(a)||s&&e.startsWith(i)||t.add(l.name)}const p=A({fields:r,title:this.title},{...e,visibleFieldNames:t}),{rasterInfo:n}=this;return p?.fieldInfos&&n&&T(p.fieldInfos,n),p}queryFeatures(e,r){return this.queryRasters(e,r).then(e=>{if(e?.features)for(const r of e.features)r.layer=r.sourceLayer=this;return e})}queryFeatureCount(e,r){return this.queryRasterCount(e,r)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,r){return this._debouncedSaveOperations(1,r,e)}serviceSupportsSpatialReference(e){return _(this,e)}write(e,r){if(!this._isPreviewLayer)return super.write(e,r);if(r?.messages){const e=`${r.origin}/${r.layerContainerType||"operational-layers"}`;r.messages.push(new o("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}_validateElevationInfo(){const e=this.elevationInfo;C(s.getLogger(this),O("Imagery layers","relative-to-scene",e)),C(s.getLogger(this),R("Imagery layers",e))}};e([n({type:E,value:null,json:{read:!1}})],G.prototype,"elevationInfo",null),e([n(w)],G.prototype,"legendEnabled",null),e([n({type:["show","hide"]})],G.prototype,"listMode",null),e([n({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],G.prototype,"isReference",void 0),e([n({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],G.prototype,"operationalLayerType",void 0),e([m("web-map","operationalLayerType")],G.prototype,"writeOperationalLayerType",null),e([n(b)],G.prototype,"popupEnabled",void 0),e([n({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],G.prototype,"popupTemplate",void 0),e([n({readOnly:!0})],G.prototype,"defaultPopupTemplate",null),e([n({readOnly:!0,json:{read:!1}})],G.prototype,"type",void 0),e([n({readOnly:!0})],G.prototype,"_isPreviewLayer",null),G=e([l("esri.layers.ImageryLayer")],G);const M=G;export{M as default};
5
+ import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import o from"../core/Error.js";import s from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{debounce as a,throwIfAbortError as p}from"../core/promiseUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../core/accessorSupport/decorators/writer.js";import u from"./Layer.js";import{ArcGISImageService as y}from"./mixins/ArcGISImageService.js";import{ArcGISService as c}from"./mixins/ArcGISService.js";import{BlendLayer as d}from"./mixins/BlendLayer.js";import{CustomParametersMixin as f}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as h}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as g}from"./mixins/RasterJobHandlerMixin.js";import{RasterPresetRendererMixin as j}from"./mixins/RasterPresetRendererMixin.js";import{RefreshableLayer as I}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as L}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as w}from"./mixins/TemporalLayer.js";import{legendEnabled as S,popupEnabled as b}from"./support/commonProperties.js";import{commonRasterFieldNames as P,rasterDimensionFieldPrefix as x,setDefaultRasterFieldFormats as T}from"./support/rasterFieldUtils.js";import{serviceSupportsSpatialReference as _}from"./support/versionUtils.js";import{logInvalidElevationInfoWarning as C,elevationModeUnsupportedMessage as O,featureExpressionUnsupportedMessage as R}from"../support/elevationInfoUtils.js";import{createPopupTemplate as A}from"../support/popupUtils.js";import E from"../symbols/support/ElevationInfo.js";let G=class extends(d(w(L(h(v(j(y(g(I(f(c(i(t(u)))))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=a(async(e,r,t)=>{const{save:o,saveAs:s}=await import("./save/imageryUtils.js");switch(e){case 0:return o(this,r);case 1:return s(this,t,r)}})}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(p).then(()=>this._fetchService(r))),Promise.resolve(this)}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,r,t){const o="vector-field"===this.renderer?.type;r[t]=o?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:r}=this,t=new Set,o=P.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,i=x.toLowerCase(),a=`${P.servicePixelValue.toLowerCase()}.`;for(const l of r){const e=l.name.toLowerCase();e===o||e.startsWith(a)||s&&e.startsWith(i)||t.add(l.name)}const p=A({fields:r,title:this.title},{...e,visibleFieldNames:t}),{rasterInfo:n}=this;return p?.fieldInfos&&n&&T(p.fieldInfos,n),p}queryFeatures(e,r){return this.queryRasters(e,r).then(e=>{if(e?.features)for(const r of e.features)r.layer=r.sourceLayer=this;return e})}queryFeatureCount(e,r){return this.queryRasterCount(e,r)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,r){return this._debouncedSaveOperations(1,r,e)}serviceSupportsSpatialReference(e){return _(this,e)}write(e,r){if(!this._isPreviewLayer)return super.write(e,r);if(r?.messages){const e=`${r.origin}/${r.layerContainerType||"operational-layers"}`;r.messages.push(new o("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}_validateElevationInfo(){const e=this.elevationInfo;C(s.getLogger(this),O("Imagery layers","relative-to-scene",e)),C(s.getLogger(this),R("Imagery layers",e))}};e([n({type:E,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],G.prototype,"elevationInfo",null),e([n(S)],G.prototype,"legendEnabled",null),e([n({type:["show","hide"]})],G.prototype,"listMode",null),e([n({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],G.prototype,"isReference",void 0),e([n({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],G.prototype,"operationalLayerType",void 0),e([m("web-map","operationalLayerType")],G.prototype,"writeOperationalLayerType",null),e([n(b)],G.prototype,"popupEnabled",void 0),e([n({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],G.prototype,"popupTemplate",void 0),e([n({readOnly:!0})],G.prototype,"defaultPopupTemplate",null),e([n({readOnly:!0,json:{read:!1}})],G.prototype,"type",void 0),e([n({readOnly:!0})],G.prototype,"_isPreviewLayer",null),G=e([l("esri.layers.ImageryLayer")],G);const M=G;export{M as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import s from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as a,throwIfAbortError as n}from"../core/promiseUtils.js";import{watch as p}from"../core/reactiveUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import{ensureClass as c}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import u from"./Layer.js";import{ArcGISService as h}from"./mixins/ArcGISService.js";import{BlendLayer as d}from"./mixins/BlendLayer.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{ImageryTileMixin as f}from"./mixins/ImageryTileMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as R}from"./mixins/RasterJobHandlerMixin.js";import{RasterPresetRendererMixin as w}from"./mixins/RasterPresetRendererMixin.js";import{RefreshableLayer as j}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as F}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as S}from"./mixins/TemporalLayer.js";import{legendEnabled as _}from"./support/commonProperties.js";import I from"./support/Field.js";import{getServicePixelValueField as O,getRawServicePixelValueField as P,getRasterAttributeTableFields as b,getMagnitudeField as x,getDirectionField as T,getMultidimensionalFields as N,commonRasterFieldNames as L,setDefaultRasterFieldFormats as J}from"./support/rasterFieldUtils.js";import C from"./support/RasterFunction.js";import{isFunctionRaster as M,getPrimaryRasters as E}from"./support/rasterDatasets/datasetUtils.js";import U from"./support/rasterDatasets/FunctionRaster.js";import $ from"./support/rasterDatasets/RasterFactory.js";import{getPrimaryRasterUrls as B,create as D}from"./support/rasterFunctions/rasterFunctionHelper.js";import{logInvalidElevationInfoWarning as A,elevationModeUnsupportedMessage as W,featureExpressionUnsupportedMessage as z}from"../support/elevationInfoUtils.js";import{createPopupTemplate as k}from"../support/popupUtils.js";import G from"../symbols/support/ElevationInfo.js";let V=class extends(d(F(g(v(w(y(f(R(S(h(j(o(r(u)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=a(async(e,t,r)=>{const{save:s,saveAs:i}=await import("./save/imageryUtils.js");switch(e){case 0:return s(this,t);case 1:return i(this,r,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(n).then(()=>this._openRaster(t))),Promise.resolve(this)}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[O("Pixel Value"),P("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,r=t?.attributeTable;if(r){const t=b(r);e.push(...t)}const s=t?.dataType,i=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=i){const t=i.variables[0].unit?.trim(),r=x(t),s=T();e.push(r,s)}if(i){const t=N(i);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:t}=this,r=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==L.rawServicePixelValue)),s=k({fields:t,title:this.title},{...e,visibleFieldNames:r}),{rasterInfo:i}=this.raster;return s?.fieldInfos&&i&&J(s.fieldInfos,i),s}async generateRasterInfo(e,t){if(e=c(C,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:r}=await this._openFunctionRaster(e,t);return r}catch(r){if(r instanceof s)throw r;throw new s("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}write(e,t){const r=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===r.datasetFormat&&("Raster"===r.tileType||"Map"===r.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new s("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=M(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:r,source:i}=this;if(!t&&!i)throw new s("imagery-tile-layer:open","missing url or source parameter");i?await this._openFromSource(i,e):r?await this._openFromUrlWithRasterFunction(t,r,e):await this._openFromUrl(t,e)}const r=this.raster.rasterInfo;if(!r)throw new s("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?r:this._primaryRasters[0].rasterInfo),this._set("spatialReference",r.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(p(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=E(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,r){const i=[e];t&&B(t.toJSON(),i);const o=await Promise.all(i.map(e=>$.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:r}))),a=o.findIndex(e=>null==e);if(a>-1)throw new s("imagery-tile-layer:open",`cannot open raster: ${i[a]}`);return this._primaryRasters=o,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const r=await $.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new s("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[r],this.raster=r}async _openFromSource(e,t){const r="the tiled imagery data source is not supported",i="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!i)throw new s("imagery-tile-layer:open",r);"MEMORY"===i&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const o=await $.open({url:"",source:e,datasetFormat:i,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==o)throw new s("imagery-tile-layer:open",r);this._primaryRasters=[o],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=o}async _openFunctionRaster(e,t){const r={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>r[e.url]=e);const s=D(e.functionDefinition?.toJSON()??e.toJSON(),r),i=new U({rasterFunction:s});return await i.open(t),i}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(r){r instanceof s&&i.getLogger(this).error("imagery-tile-layer:open",r.message),i.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(){const e=this.elevationInfo;A(i.getLogger(this),W("ImageryTile layers","relative-to-scene",e)),A(i.getLogger(this),z("ImageryTile layers",e))}};e([l({clonable:!1})],V.prototype,"_primaryRasters",void 0),e([l({type:G,value:null,json:{read:!1}})],V.prototype,"elevationInfo",null),e([l(_)],V.prototype,"legendEnabled",void 0),e([l({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],V.prototype,"isReference",void 0),e([l({type:["show","hide"]})],V.prototype,"listMode",void 0),e([l({json:{read:!0,write:!0}})],V.prototype,"blendMode",void 0),e([l({type:C,json:{name:"renderingRule",write:!0}})],V.prototype,"rasterFunction",void 0),e([l()],V.prototype,"sourceJSON",void 0),e([l({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],V.prototype,"version",void 0),e([l({readOnly:!0,json:{read:!1}})],V.prototype,"type",void 0),e([l({type:["ArcGISTiledImageServiceLayer"]})],V.prototype,"operationalLayerType",void 0),e([l({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,r){t[r]=!e}}}})],V.prototype,"popupEnabled",void 0),e([l({type:t,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],V.prototype,"popupTemplate",void 0),e([l({readOnly:!0})],V.prototype,"defaultPopupTemplate",null),e([l({readOnly:!0,type:[I]})],V.prototype,"fields",void 0),e([l({readOnly:!0,type:[I]})],V.prototype,"rasterFields",null),e([l({constructOnly:!0})],V.prototype,"source",void 0),V=e([m("esri.layers.ImageryTileLayer")],V);const H=V;export{H as default};
5
+ import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import s from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as a,throwIfAbortError as n}from"../core/promiseUtils.js";import{watch as p}from"../core/reactiveUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import{ensureClass as m}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import u from"./Layer.js";import{ArcGISService as h}from"./mixins/ArcGISService.js";import{BlendLayer as d}from"./mixins/BlendLayer.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{ImageryTileMixin as f}from"./mixins/ImageryTileMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as R}from"./mixins/RasterJobHandlerMixin.js";import{RasterPresetRendererMixin as w}from"./mixins/RasterPresetRendererMixin.js";import{RefreshableLayer as j}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as F}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as S}from"./mixins/TemporalLayer.js";import{legendEnabled as _}from"./support/commonProperties.js";import I from"./support/Field.js";import{getServicePixelValueField as O,getRawServicePixelValueField as b,getRasterAttributeTableFields as P,getMagnitudeField as x,getDirectionField as T,getMultidimensionalFields as N,commonRasterFieldNames as L,setDefaultRasterFieldFormats as J}from"./support/rasterFieldUtils.js";import C from"./support/RasterFunction.js";import{isFunctionRaster as M,getPrimaryRasters as E}from"./support/rasterDatasets/datasetUtils.js";import U from"./support/rasterDatasets/FunctionRaster.js";import $ from"./support/rasterDatasets/RasterFactory.js";import{getPrimaryRasterUrls as D,create as B}from"./support/rasterFunctions/rasterFunctionHelper.js";import{logInvalidElevationInfoWarning as A,elevationModeUnsupportedMessage as W,featureExpressionUnsupportedMessage as z}from"../support/elevationInfoUtils.js";import{createPopupTemplate as k}from"../support/popupUtils.js";import G from"../symbols/support/ElevationInfo.js";let V=class extends(d(F(g(v(w(y(f(R(S(h(j(o(r(u)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=a(async(e,t,r)=>{const{save:s,saveAs:i}=await import("./save/imageryUtils.js");switch(e){case 0:return s(this,t);case 1:return i(this,r,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(n).then(()=>this._openRaster(t))),Promise.resolve(this)}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[O("Pixel Value"),b("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,r=t?.attributeTable;if(r){const t=P(r);e.push(...t)}const s=t?.dataType,i=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=i){const t=i.variables[0].unit?.trim(),r=x(t),s=T();e.push(r,s)}if(i){const t=N(i);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:t}=this,r=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==L.rawServicePixelValue)),s=k({fields:t,title:this.title},{...e,visibleFieldNames:r}),{rasterInfo:i}=this.raster;return s?.fieldInfos&&i&&J(s.fieldInfos,i),s}async generateRasterInfo(e,t){if(e=m(C,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:r}=await this._openFunctionRaster(e,t);return r}catch(r){if(r instanceof s)throw r;throw new s("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}write(e,t){const r=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===r.datasetFormat&&("Raster"===r.tileType||"Map"===r.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new s("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=M(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:r,source:i}=this;if(!t&&!i)throw new s("imagery-tile-layer:open","missing url or source parameter");i?await this._openFromSource(i,e):r?await this._openFromUrlWithRasterFunction(t,r,e):await this._openFromUrl(t,e)}const r=this.raster.rasterInfo;if(!r)throw new s("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?r:this._primaryRasters[0].rasterInfo),this._set("spatialReference",r.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(p(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=E(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,r){const i=[e];t&&D(t.toJSON(),i);const o=await Promise.all(i.map(e=>$.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:r}))),a=o.findIndex(e=>null==e);if(a>-1)throw new s("imagery-tile-layer:open",`cannot open raster: ${i[a]}`);return this._primaryRasters=o,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const r=await $.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new s("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[r],this.raster=r}async _openFromSource(e,t){const r="the tiled imagery data source is not supported",i="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!i)throw new s("imagery-tile-layer:open",r);"MEMORY"===i&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const o=await $.open({url:"",source:e,datasetFormat:i,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==o)throw new s("imagery-tile-layer:open",r);this._primaryRasters=[o],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=o}async _openFunctionRaster(e,t){const r={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>r[e.url]=e);const s=B(e.functionDefinition?.toJSON()??e.toJSON(),r),i=new U({rasterFunction:s});return await i.open(t),i}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(r){r instanceof s&&i.getLogger(this).error("imagery-tile-layer:open",r.message),i.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(){const e=this.elevationInfo;A(i.getLogger(this),W("ImageryTile layers","relative-to-scene",e)),A(i.getLogger(this),z("ImageryTile layers",e))}};e([l({clonable:!1})],V.prototype,"_primaryRasters",void 0),e([l({type:G,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],V.prototype,"elevationInfo",null),e([l(_)],V.prototype,"legendEnabled",void 0),e([l({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],V.prototype,"isReference",void 0),e([l({type:["show","hide"]})],V.prototype,"listMode",void 0),e([l({json:{read:!0,write:!0}})],V.prototype,"blendMode",void 0),e([l({type:C,json:{name:"renderingRule",write:!0}})],V.prototype,"rasterFunction",void 0),e([l()],V.prototype,"sourceJSON",void 0),e([l({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],V.prototype,"version",void 0),e([l({readOnly:!0,json:{read:!1}})],V.prototype,"type",void 0),e([l({type:["ArcGISTiledImageServiceLayer"]})],V.prototype,"operationalLayerType",void 0),e([l({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,r){t[r]=!e}}}})],V.prototype,"popupEnabled",void 0),e([l({type:t,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],V.prototype,"popupTemplate",void 0),e([l({readOnly:!0})],V.prototype,"defaultPopupTemplate",null),e([l({readOnly:!0,type:[I]})],V.prototype,"fields",void 0),e([l({readOnly:!0,type:[I]})],V.prototype,"rasterFields",null),e([l({constructOnly:!0})],V.prototype,"source",void 0),V=e([c("esri.layers.ImageryTileLayer")],V);const H=V;export{H as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Error.js";import o from"../core/Logger.js";import{rad2deg as r}from"../core/mathUtils.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{on as n,sync as l}from"../core/reactiveUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{persistable as f}from"../core/accessorSupport/decorators/persistable.js";import{d,f as h,t as u,c as y,A as x,z as g,a as v}from"../chunks/vec32.js";import{fromValues as j,create as S}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReferenceLike as b}from"../geometry/ellipsoidUtils.js";import _ from"../geometry/Extent.js";import A from"../geometry/SpatialReference.js";import{projectBuffer as w}from"../geometry/projection/projectBuffer.js";import L from"./Layer.js";import{APIKeyMixin as M}from"./mixins/APIKeyMixin.js";import{ArcGISService as E}from"./mixins/ArcGISService.js";import{CustomParametersMixin as I}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as U}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as N}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as R,url as z}from"./support/commonProperties.js";import O from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as D,elevationModeRequiredMessage as P,featureExpressionUnsupportedMessage as V}from"../support/elevationInfoUtils.js";import{f as X}from"../chunks/persistableUrlUtils.js";var k;let F=class extends(E(T(U(N(s(I(M(L)))))))){static{k=this}readModifications(e,t,i){this._modificationsSource={url:X(e,i),context:i}}initialize(){this.addHandles(n(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,l))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=new A({wkid:4326,vcsWkid:115700}),this.fullExtent=new _(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this.rootTilesetJSON=null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}_verifyArray(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const i of e)if("number"!=typeof i)return!1;return!0}static{this.googleIMFullExtent={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850}}_initFullExtent(){const e=this.rootTilesetJSON?.root?.boundingVolume;if(!e)return;const{spatialReference:t}=this;if(e.box){const i=e?.box;if(i[3]>J&&i[7]>J&&i[11]>J)return void(this.fullExtent=new _({...k.googleIMFullExtent,spatialReference:t}))}const i=this.rootTilesetJSON?.root?.transform,o=S();if(e.region&&this._verifyArray(e.region,6)){const i=e.region,o=r(i[0]),s=r(i[1]),a=i[4],n=r(i[2]),l=r(i[3]),m=i[5];this.fullExtent=new _({xmin:o,ymin:s,zmin:a,xmax:n,ymax:l,zmax:m,spatialReference:t})}else if(e.sphere&&this._verifyArray(e.sphere,4)){const r=e.sphere,s=j(r[0],r[1],r[2]),a=r[3]/Math.sqrt(3),n=S();d(n,s,j(a,a,a));const l=S();if(h(l,s,j(a,a,a)),i&&this._verifyArray(i,16)){const e=i;u(o,n,e),y(n,o),u(o,l,e),y(l,o)}w(n,b,0,n,A.WGS84,0),w(l,b,0,l,A.WGS84,0);const m=S(),p=S();x(m,n,l),g(p,n,l),this.fullExtent=new _({xmin:m[0],ymin:m[1],zmin:m[2],xmax:p[0],ymax:p[1],zmax:p[2],spatialReference:t})}else if(e.box&&this._verifyArray(e.box,12)){const o=e.box,r=j(o[0],o[1],o[2]),s=j(o[3],o[4],o[5]),a=j(o[6],o[7],o[8]),n=j(o[9],o[10],o[11]),l=[];for(let e=0;e<8;++e)l.push(S());if(h(l[0],r,s),h(l[0],l[0],a),h(l[0],l[0],n),v(l[1],r,s),h(l[1],l[1],a),h(l[1],l[1],n),h(l[2],r,s),v(l[2],l[2],a),h(l[2],l[2],n),v(l[3],r,s),v(l[3],l[3],a),h(l[3],l[3],n),h(l[4],r,s),h(l[4],l[4],a),v(l[4],l[4],n),v(l[5],r,s),h(l[5],l[5],a),v(l[5],l[5],n),h(l[6],r,s),v(l[6],l[6],a),v(l[6],l[6],n),v(l[7],r,s),v(l[7],l[7],a),v(l[7],l[7],n),i&&this._verifyArray(i,16)){const e=i;for(let t=0;t<8;++t)u(l[t],l[t],e)}const m=j(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),p=j(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let e=0;e<8;++e)w(l[e],b,0,l[e],A.WGS84,0),x(p,p,l[e]),g(m,m,l[e]);this.fullExtent=new _({xmin:p[0],ymin:p[1],zmin:p[2],xmax:m[0],ymax:m[1],zmax:m[2],spatialReference:t})}}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const o=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new i("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(r){a(r)}if(null!=this._modificationsSource){const t=await O.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}if(this.url){const e=t(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:o}).then(e=>{this.rootTilesetJSON=e.data,this._initFullExtent()},e=>{a(e)});await e}}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async fetchAttributionData(){return this.load().then(()=>({}))}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";D(o.getLogger(this),P(t,"absolute-height",e)),D(o.getLogger(this),V(t,e))}};e([m({type:["IntegratedMesh3DTilesLayer"]})],F.prototype,"operationalLayerType",void 0),e([m({type:O,clonable:e=>e.clone()}),f({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],F.prototype,"modifications",void 0),e([p(["web-scene","portal-item"],"modifications")],F.prototype,"readModifications",null),e([m({type:A})],F.prototype,"spatialReference",void 0),e([m({type:_})],F.prototype,"fullExtent",void 0),e([m(R)],F.prototype,"elevationInfo",null),e([m({type:["show","hide"]})],F.prototype,"listMode",void 0),e([m(z)],F.prototype,"url",void 0),e([m({readOnly:!0})],F.prototype,"type",void 0),e([m({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],F.prototype,"path",void 0),e([m({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],F.prototype,"minScale",void 0),e([m({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],F.prototype,"maxScale",void 0),F=k=e([c("esri.layers.IntegratedMesh3DTilesLayer")],F);const G=F,J=7645211;export{G as default};
5
+ import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Error.js";import r from"../core/Logger.js";import{rad2deg as o}from"../core/mathUtils.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{on as n,sync as l}from"../core/reactiveUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{persistable as f}from"../core/accessorSupport/decorators/persistable.js";import{d,f as h,t as y,c as u,A as g,z as x,a as v}from"../chunks/vec32.js";import{fromValues as j,create as S}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReferenceLike as b}from"../geometry/ellipsoidUtils.js";import L from"../geometry/Extent.js";import _ from"../geometry/SpatialReference.js";import{projectBuffer as A}from"../geometry/projection/projectBuffer.js";import w from"./Layer.js";import{APIKeyMixin as M}from"./mixins/APIKeyMixin.js";import{ArcGISService as E}from"./mixins/ArcGISService.js";import{CustomParametersMixin as I}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as R}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as U}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as N,url as z}from"./support/commonProperties.js";import D from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as O,elevationModeRequiredMessage as P,featureExpressionUnsupportedMessage as V}from"../support/elevationInfoUtils.js";import{f as G}from"../chunks/persistableUrlUtils.js";var X;let k=class extends(E(T(R(U(s(I(M(w)))))))){static{X=this}readModifications(e,t,i){this._modificationsSource={url:G(e,i),context:i}}initialize(){this.addHandles(n(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,l))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=new _({wkid:4326,vcsWkid:115700}),this.fullExtent=new L(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this.rootTilesetJSON=null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}_verifyArray(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const i of e)if("number"!=typeof i)return!1;return!0}static{this.googleIMFullExtent={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850}}_initFullExtent(){const e=this.rootTilesetJSON?.root?.boundingVolume;if(!e)return;const{spatialReference:t}=this;if(e.box){const i=e?.box;if(i[3]>J&&i[7]>J&&i[11]>J)return void(this.fullExtent=new L({...X.googleIMFullExtent,spatialReference:t}))}const i=this.rootTilesetJSON?.root?.transform,r=S();if(e.region&&this._verifyArray(e.region,6)){const i=e.region,r=o(i[0]),s=o(i[1]),a=i[4],n=o(i[2]),l=o(i[3]),m=i[5];this.fullExtent=new L({xmin:r,ymin:s,zmin:a,xmax:n,ymax:l,zmax:m,spatialReference:t})}else if(e.sphere&&this._verifyArray(e.sphere,4)){const o=e.sphere,s=j(o[0],o[1],o[2]),a=o[3]/Math.sqrt(3),n=S();d(n,s,j(a,a,a));const l=S();if(h(l,s,j(a,a,a)),i&&this._verifyArray(i,16)){const e=i;y(r,n,e),u(n,r),y(r,l,e),u(l,r)}A(n,b,0,n,_.WGS84,0),A(l,b,0,l,_.WGS84,0);const m=S(),p=S();g(m,n,l),x(p,n,l),this.fullExtent=new L({xmin:m[0],ymin:m[1],zmin:m[2],xmax:p[0],ymax:p[1],zmax:p[2],spatialReference:t})}else if(e.box&&this._verifyArray(e.box,12)){const r=e.box,o=j(r[0],r[1],r[2]),s=j(r[3],r[4],r[5]),a=j(r[6],r[7],r[8]),n=j(r[9],r[10],r[11]),l=[];for(let e=0;e<8;++e)l.push(S());if(h(l[0],o,s),h(l[0],l[0],a),h(l[0],l[0],n),v(l[1],o,s),h(l[1],l[1],a),h(l[1],l[1],n),h(l[2],o,s),v(l[2],l[2],a),h(l[2],l[2],n),v(l[3],o,s),v(l[3],l[3],a),h(l[3],l[3],n),h(l[4],o,s),h(l[4],l[4],a),v(l[4],l[4],n),v(l[5],o,s),h(l[5],l[5],a),v(l[5],l[5],n),h(l[6],o,s),v(l[6],l[6],a),v(l[6],l[6],n),v(l[7],o,s),v(l[7],l[7],a),v(l[7],l[7],n),i&&this._verifyArray(i,16)){const e=i;for(let t=0;t<8;++t)y(l[t],l[t],e)}const m=j(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),p=j(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let e=0;e<8;++e)A(l[e],b,0,l[e],_.WGS84,0),g(p,p,l[e]),x(m,m,l[e]);this.fullExtent=new L({xmin:p[0],ymin:p[1],zmin:p[2],xmax:m[0],ymax:m[1],zmax:m[2],spatialReference:t})}}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const o=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new i("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(s){a(s)}if(null!=this._modificationsSource){const t=await D.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}if(this.url){const e=t(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:o}).then(e=>{this.rootTilesetJSON=e.data,this._initFullExtent()},e=>{a(e),r.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)});await e}}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},e=>{r.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})}async fetchAttributionData(){return this.load().then(()=>({}))}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";O(r.getLogger(this),P(t,"absolute-height",e)),O(r.getLogger(this),V(t,e))}get isGroundReplacement(){return!!this.url?.match(/.+\.googleapis.com/)}};e([m({type:["IntegratedMesh3DTilesLayer"]})],k.prototype,"operationalLayerType",void 0),e([m({type:D,clonable:e=>e.clone()}),f({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],k.prototype,"modifications",void 0),e([p(["web-scene","portal-item"],"modifications")],k.prototype,"readModifications",null),e([m({type:_})],k.prototype,"spatialReference",void 0),e([m({type:L})],k.prototype,"fullExtent",void 0),e([m(N)],k.prototype,"elevationInfo",null),e([m({type:["show","hide"]})],k.prototype,"listMode",void 0),e([m(z)],k.prototype,"url",void 0),e([m({readOnly:!0})],k.prototype,"type",void 0),e([m({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],k.prototype,"path",void 0),e([m({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],k.prototype,"minScale",void 0),e([m({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],k.prototype,"maxScale",void 0),k=X=e([c("esri.layers.IntegratedMesh3DTilesLayer")],k);const F=k,J=7645211;export{F as default};
package/layers/Layer.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import{EventedMixin as o}from"../core/Evented.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import{Loadable as s}from"../core/Loadable.js";import a from"../core/Logger.js";import{isAbortError as l}from"../core/promiseUtils.js";import{urlToObject as n}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import d from"../geometry/Extent.js";import c from"../geometry/SpatialReference.js";import{fromPortalItem as u}from"./support/fromPortalItem.js";import{T as m}from"../chunks/TimeExtent.js";let b=0,h=class extends(o(i(s))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new d(-180,-90,180,90,c.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=c.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await import("./support/arcgisLayers.js")).fromUrl(t)}static fromPortalItem(e){return u(e)}initialize(){this.when().catch(e=>{l(e)||a.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}get parsedUrl(){return n(this.url)}createLayerView(e,t){return Promise.reject(new r("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e){return(await t(e,{query:{f:"json"},responseType:"json"})).data}throw new r("layer:no-attribution-data","Layer does not have attribution data")}};e([p({type:String})],h.prototype,"attributionDataUrl",void 0),e([p({readOnly:!0})],h.prototype,"effectiveVisible",null),e([p({type:d})],h.prototype,"fullExtent",void 0),e([p({readOnly:!0})],h.prototype,"hasAttributionData",null),e([p({type:String,clonable:!1})],h.prototype,"id",void 0),e([p({type:Boolean,nonNullable:!0})],h.prototype,"legendEnabled",void 0),e([p({type:["show","hide","hide-children"]})],h.prototype,"listMode",void 0),e([p({type:Number,range:{min:0,max:1},nonNullable:!0})],h.prototype,"opacity",void 0),e([p({clonable:!1})],h.prototype,"parent",void 0),e([p({readOnly:!0})],h.prototype,"parsedUrl",null),e([p({type:Boolean,readOnly:!0})],h.prototype,"persistenceEnabled",void 0),e([p({type:Boolean})],h.prototype,"popupEnabled",void 0),e([p({type:Boolean})],h.prototype,"attributionVisible",void 0),e([p({type:c})],h.prototype,"spatialReference",void 0),e([p({type:String})],h.prototype,"title",void 0),e([p({readOnly:!0,json:{read:!1}})],h.prototype,"type",void 0),e([p()],h.prototype,"url",void 0),e([p({type:m})],h.prototype,"visibilityTimeExtent",void 0),e([p({type:Boolean,nonNullable:!0})],h.prototype,"visible",void 0),h=e([y("esri.layers.Layer")],h);export{h as default};
5
+ import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import{EventedMixin as o}from"../core/Evented.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import{Loadable as s}from"../core/Loadable.js";import a from"../core/Logger.js";import{isAbortError as l}from"../core/promiseUtils.js";import{urlToObject as n}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import d from"../geometry/Extent.js";import u from"../geometry/SpatialReference.js";import{fromPortalItem as c}from"./support/fromPortalItem.js";import{T as m}from"../chunks/TimeExtent.js";let b=0,h=class extends(o(i(s))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new d(-180,-90,180,90,u.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=u.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await import("./support/arcgisLayers.js")).fromUrl(t)}static fromPortalItem(e){return c(e)}initialize(){this.when().catch(e=>{l(e)||a.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"groundLayers"in e&&e.groundLayers.includes(t)?e.groundLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}get parsedUrl(){return n(this.url)}createLayerView(e,t){return Promise.reject(new r("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e){return(await t(e,{query:{f:"json"},responseType:"json"})).data}throw new r("layer:no-attribution-data","Layer does not have attribution data")}};e([p({type:String})],h.prototype,"attributionDataUrl",void 0),e([p({readOnly:!0})],h.prototype,"effectiveVisible",null),e([p({type:d})],h.prototype,"fullExtent",void 0),e([p({readOnly:!0})],h.prototype,"hasAttributionData",null),e([p({type:String,clonable:!1})],h.prototype,"id",void 0),e([p({type:Boolean,nonNullable:!0})],h.prototype,"legendEnabled",void 0),e([p({type:["show","hide","hide-children"]})],h.prototype,"listMode",void 0),e([p({type:Number,range:{min:0,max:1},nonNullable:!0})],h.prototype,"opacity",void 0),e([p({clonable:!1})],h.prototype,"parent",void 0),e([p({readOnly:!0})],h.prototype,"parsedUrl",null),e([p({type:Boolean,readOnly:!0})],h.prototype,"persistenceEnabled",void 0),e([p({type:Boolean})],h.prototype,"popupEnabled",void 0),e([p({type:Boolean})],h.prototype,"attributionVisible",void 0),e([p({type:u})],h.prototype,"spatialReference",void 0),e([p({type:String})],h.prototype,"title",void 0),e([p({readOnly:!0,json:{read:!1}})],h.prototype,"type",void 0),e([p()],h.prototype,"url",void 0),e([p({type:m})],h.prototype,"visibilityTimeExtent",void 0),e([p({type:Boolean,nonNullable:!0})],h.prototype,"visible",void 0),h=e([y("esri.layers.Layer")],h);export{h as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{watch as a}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import l from"../geometry/SpatialReference.js";import d from"../graphic/ParquetGraphicOrigin.js";import m from"./Layer.js";import{ParquetSource as c}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as f}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as h}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as g}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as j}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{OrderedLayer as x}from"./mixins/OrderedLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as b}from"./mixins/TemporalLayer.js";import{labelsVisible as I}from"./support/commonProperties.js";import O from"./support/FeatureTemplate.js";import R from"./support/Field.js";import{defineFieldProperties as q}from"./support/fieldProperties.js";import{fixRendererFields as P,fixTimeInfoFields as T}from"./support/fieldUtils.js";import w from"./support/LabelClass.js";import{reader as C}from"./support/labelingInfo.js";import{ParquetEncodingBase as Q}from"./support/ParquetEncodingBase.js";import D from"./support/ParquetEncodingLocation.js";import B from"./support/ParquetEncodingWkb.js";import{completeParquetLayerInfo as E,parquetGeometryTypeKebabDict as z}from"./support/parquetUtils.js";import{rendererTypes as A}from"../renderers/support/typeUtils.js";import L from"../rest/support/Query.js";import{createPopupTemplate as U}from"../support/popupUtils.js";const G=q(),M="__OBJECTID",W={types:{key:"type",base:Q,typeMap:{wkb:B,location:D}}};let _=class extends(h(j(g(y(x(b(S(v(F(p(f(r(m))))))))))))){constructor(e){super(e),this.capabilities=k(),this.copyright=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.encoding=null,this.geometryType=null,this.graphicOrigin=new d(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=M,this.outFields=null,this.popupTemplate=null,this.source=null,this.spatialReference=l.WGS84,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new s}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([a(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return null==this.geometryType}set renderer(e){P(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return U(this,e)}createQuery(){const e=new L;return e.returnGeometry=!0,e.outFields=["*"],e}async createSource(e){const t=await E({urls:this.urls,fields:this.fields,encoding:this.encoding,geometryType:this.geometryType,spatialReference:this.spatialReference,file:this.file},{customParameters:this.customParameters});let{fields:r,geometryType:s,encoding:p,spatialReference:a,urls:n,file:u,displayOptimization:d}=t;if(null==r)throw new o("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",t);if(a){if(!a.isGeographic&&!a.isWebMercator)throw new o("parquet-layer:unsupported","Unable to create parquet source: currently only geographic and Web Mercator supported",t);a.isGeographic&&!a.isWGS84&&(i.getLogger("parquet-layer").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:t.spatialReference}),a=l.WGS84)}r.push(new R({name:M,type:"oid",alias:M}));const m=new c({urls:n.items,fields:r,objectIdField:M,spatialReference:a,encoding:p,geometryType:s,file:u,customParameters:this.customParameters??void 0,displayOptimization:d});return await m.load(e),m}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t);if(r?.features)for(const s of r.features)s.layer=s.sourceLayer=this;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return L.from(e)??this.createQuery()}async _load(e){const t=await this.createSource(e);this._set("source",t),this.fields=t.fields,this.objectIdField=t.objectIdField,this.encoding=t.encoding,this.file=t.file,this.geometryType=t.geometryType,t.spatialReference&&(this.spatialReference=t.spatialReference),this.displayOptimization=t.displayOptimization,t.fullExtent&&(this.fullExtent=t.fullExtent),P(this.renderer,this.fieldsIndex),T(this.timeInfo,this.fieldsIndex)}};e([n({readOnly:!0,json:{read:!1,write:!1}})],_.prototype,"capabilities",void 0),e([n({type:String})],_.prototype,"copyright",void 0),e([n({readOnly:!0})],_.prototype,"defaultPopupTemplate",null),e([n()],_.prototype,"displayOptimization",void 0),e([n({type:[R],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],_.prototype,"fields",void 0),e([n(G.fieldsIndex)],_.prototype,"fieldsIndex",void 0),e([n(W)],_.prototype,"encoding",void 0),e([n({json:{read:{reader:z.read}}})],_.prototype,"geometryType",void 0),e([n({readOnly:!0,clonable:!1})],_.prototype,"graphicOrigin",void 0),e([n(I)],_.prototype,"labelsVisible",void 0),e([n({type:[w],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:C},write:!0}})],_.prototype,"labelingInfo",void 0),e([n()],_.prototype,"file",void 0),e([n({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],_.prototype,"objectIdField",void 0),e([n(G.outFields)],_.prototype,"outFields",void 0),e([n({type:t,json:{name:"popupInfo",write:!0}})],_.prototype,"popupTemplate",void 0),e([n({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"}}}})],_.prototype,"renderer",null),e([n({json:{read:!1},cast:null,type:c,readOnly:!0})],_.prototype,"source",void 0),e([n({type:l})],_.prototype,"spatialReference",void 0),e([n({type:[O]})],_.prototype,"templates",void 0),e([n()],_.prototype,"title",void 0),e([n({json:{read:!1},readOnly:!0})],_.prototype,"type",void 0),e([n({type:s.ofType(String)})],_.prototype,"urls",void 0),_=e([u("esri.layers.ParquetLayer")],_);const H=_;function k(){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCurrentUser:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}export{H as default};
5
+ import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{watch as a}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import l from"../geometry/SpatialReference.js";import d from"../graphic/ParquetGraphicOrigin.js";import m from"./Layer.js";import{ParquetSource as c}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as f}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as h}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as g}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as j}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{OrderedLayer as x}from"./mixins/OrderedLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as b}from"./mixins/TemporalLayer.js";import{labelsVisible as I}from"./support/commonProperties.js";import O from"./support/FeatureTemplate.js";import R from"./support/Field.js";import{defineFieldProperties as q}from"./support/fieldProperties.js";import{fixRendererFields as P,fixTimeInfoFields as T}from"./support/fieldUtils.js";import w from"./support/LabelClass.js";import{reader as C}from"./support/labelingInfo.js";import{ParquetEncodingBase as Q}from"./support/ParquetEncodingBase.js";import D from"./support/ParquetEncodingLocation.js";import z from"./support/ParquetEncodingWkb.js";import{completeParquetLayerInfo as B,parquetGeometryTypeKebabDict as E}from"./support/parquetUtils.js";import{rendererTypes as A}from"../renderers/support/typeUtils.js";import L from"../rest/support/Query.js";import{createPopupTemplate as G}from"../support/popupUtils.js";const U=q(),M="__OBJECTID",W={types:{key:"type",base:Q,typeMap:{wkb:z,location:D}}};let _=class extends(h(j(g(y(x(b(S(v(F(p(f(r(m))))))))))))){constructor(e){super(e),this.capabilities=k(),this.copyright=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.encoding=null,this.geometryType=null,this.graphicOrigin=new d(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=M,this.outFields=null,this.popupTemplate=null,this.source=null,this.spatialReference=l.WGS84,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new s}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([a(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return null==this.geometryType}set renderer(e){P(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return G(this,e)}createQuery(){const e=new L;return e.returnGeometry=!0,e.outFields=["*"],e}async createSource(e){const t=await B({urls:this.urls,fields:this.fields,encoding:this.encoding,geometryType:this.geometryType,spatialReference:this.spatialReference,file:this.file},{customParameters:this.customParameters});let{fields:r,geometryType:s,encoding:p,spatialReference:a,urls:n,file:u,displayOptimization:d}=t;if(null==r)throw new o("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",t);if(a){if(!a.isGeographic&&!a.isWebMercator)throw new o("parquet-layer:unsupported","Unable to create parquet source: currently only geographic and Web Mercator supported",t);a.isGeographic&&!a.isWGS84&&(i.getLogger("parquet-layer").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:t.spatialReference}),a=l.WGS84)}r.push(new R({name:M,type:"oid",alias:M}));const m=new c({urls:n.items,fields:r,objectIdField:M,spatialReference:a,encoding:p,geometryType:s,file:u,customParameters:this.customParameters??void 0,displayOptimization:d});return await m.load(e),m}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t);if(r?.features)for(const s of r.features)s.layer=s.sourceLayer=this;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return L.from(e)??this.createQuery()}async _load(e){const t=await this.createSource(e);this._set("source",t),this.fields=t.fields,this.objectIdField=t.objectIdField,this.encoding=t.encoding,this.file=t.file,this.geometryType=t.geometryType,t.spatialReference&&(this.spatialReference=t.spatialReference),this.displayOptimization=t.displayOptimization,t.fullExtent&&(this.fullExtent=t.fullExtent),P(this.renderer,this.fieldsIndex),T(this.timeInfo,this.fieldsIndex)}};e([n({readOnly:!0,json:{read:!1,write:!1}})],_.prototype,"capabilities",void 0),e([n({type:String})],_.prototype,"copyright",void 0),e([n({readOnly:!0})],_.prototype,"defaultPopupTemplate",null),e([n()],_.prototype,"displayOptimization",void 0),e([n({type:[R],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],_.prototype,"fields",void 0),e([n(U.fieldsIndex)],_.prototype,"fieldsIndex",void 0),e([n(W)],_.prototype,"encoding",void 0),e([n({json:{read:{reader:E.read}}})],_.prototype,"geometryType",void 0),e([n({readOnly:!0,clonable:!1})],_.prototype,"graphicOrigin",void 0),e([n(I)],_.prototype,"labelsVisible",void 0),e([n({type:[w],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:C},write:!0}})],_.prototype,"labelingInfo",void 0),e([n()],_.prototype,"file",void 0),e([n({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],_.prototype,"objectIdField",void 0),e([n(U.outFields)],_.prototype,"outFields",void 0),e([n({type:t,json:{name:"popupInfo",write:!0}})],_.prototype,"popupTemplate",void 0),e([n({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"}}}})],_.prototype,"renderer",null),e([n({json:{read:!1},cast:null,type:c,readOnly:!0})],_.prototype,"source",void 0),e([n({type:l})],_.prototype,"spatialReference",void 0),e([n({type:[O]})],_.prototype,"templates",void 0),e([n()],_.prototype,"title",void 0),e([n({json:{read:!1},readOnly:!0})],_.prototype,"type",void 0),e([n({type:s.ofType(String)})],_.prototype,"urls",void 0),_=e([u("esri.layers.ParquetLayer")],_);const H=_;function k(){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}export{H as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const t={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},s={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}};export{s as queryBinsCapabilities,t as queryCapabilities};
5
+ const t={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},s={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}};export{s as queryBinsCapabilities,t as queryCapabilities};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{Loadable as s}from"../../../core/Loadable.js";import{escapeRegExpString as r}from"../../../core/string.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../../geometry/SpatialReference.js";import{typeKebabDictionary as a}from"../../../geometry/support/typeUtils.js";import{queryFeatureSetJSON as u,crsDefault as n,getSpatialReferenceWkid as c,getServerLandingPage as l,getServerConformance as d,getServerCollections as m,getServerOpenApi as y,getCollectionDefinition as f,crsPrefix as g}from"../../ogc/ogcFeatureUtils.js";import{zeroQueryBins as h}from"../../support/capabilities.js";import S from"../../../rest/support/FeatureSet.js";let C=class extends s{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(t){return this.addResolvingPromise(this._loadOGCServices(this.layer,t)),this.when()}getSource(){const{featureDefinition:{collection:t,layerDefinition:e,spatialReference:s,supportedCrs:r},layer:{apiKey:o,customParameters:p,effectiveMaxRecordCount:i}}=this;return{type:"ogc-source",collection:t,layerDefinition:e,maxRecordCount:i,queryParameters:{apiKey:o,customParameters:p},spatialReference:s,supportedCrs:r}}queryExtent(t,e={}){return null}queryFeatureCount(t,e={}){return null}queryFeatures(t,e={}){return this.queryFeaturesJSON(t,e).then(t=>S.fromJSON(t))}queryFeaturesJSON(t,e={}){const s=this.getSource();return this.load(e).then(()=>u(s,t,e))}queryObjectIds(t,e={}){return null}serviceSupportsSpatialReference(t){return!(!t.isWGS84&&!t.isWebMercator)||!!this.featureDefinition.supportedCrs[t.wkid]}_conformsToType(t,e){const s=new RegExp(`^${r(e)}$`,"i");return t.conformsTo.some(t=>s.test(t))??!1}_getCapabilities(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:e,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCurrentUser:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:h,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(t){const e=t?.components?.parameters;return e?.limit?.schema?.maximum??e?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(t){const e=t.storageCrs??n,s=c(e);return null==s?i.WGS84:new i({wkid:s})}_getSupportedSpatialReferences(t,e){const s="#/crs",r=t.crs??[n],o=r.includes(s)?r.filter(t=>t!==s).concat(e.crs??[]):r,p=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return o.filter(t=>!p.test(t))}async _loadOGCServices(t,s){const o=null!=s?s.signal:null,{apiKey:p,collectionId:i,customParameters:u,fields:n,geometryType:h,hasZ:S,objectIdField:C,timeInfo:R,url:w}=t,v={fields:n?.map(t=>t.toJSON()),geometryType:a.toJSON(h),hasZ:S??!1,objectIdField:C,timeInfo:R?.toJSON()},x={apiKey:p,customParameters:u,signal:o},j=await l(w,x),[F,O]=await Promise.all([d(j,x),m(j,x)]);if(!this._conformsToType(F,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new e("ogc-feature-layer:no-geojson-support","Server does not support geojson");const D=O.collections.find(({id:t})=>t===i);if(!D)throw new e("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const T=this._conformsToType(F,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await y(j,x):null,A=await f(D,v,x),b=this._getMaxRecordCount(T),q=this._getCapabilities(A.hasZ,b),P=this._getStorageSpatialReference(D).toJSON(),Q=this._getSupportedSpatialReferences(D,O),_=new RegExp(`^${r(g)}`,"i"),B={};for(const e of Q){const t=c(e);null!=t&&(B[t]||(B[t]=e.replace(_,"")))}this.featureDefinition={capabilities:q,collection:D,layerDefinition:A,spatialReference:P,supportedCrs:B}}};t([o()],C.prototype,"featureDefinition",void 0),t([o({constructOnly:!0})],C.prototype,"layer",void 0),t([o()],C.prototype,"type",void 0),C=t([p("esri.layers.graphics.sources.OGCFeatureSource")],C);export{C as OGCFeatureSource};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{Loadable as s}from"../../../core/Loadable.js";import{escapeRegExpString as r}from"../../../core/string.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../../geometry/SpatialReference.js";import{typeKebabDictionary as a}from"../../../geometry/support/typeUtils.js";import{queryFeatureSetJSON as u,crsDefault as n,getSpatialReferenceWkid as c,getServerLandingPage as l,getServerConformance as d,getServerCollections as m,getServerOpenApi as y,getCollectionDefinition as f,crsPrefix as g}from"../../ogc/ogcFeatureUtils.js";import{zeroQueryBins as h}from"../../support/capabilities.js";import S from"../../../rest/support/FeatureSet.js";let C=class extends s{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:s,supportedCrs:r},layer:{apiKey:o,customParameters:p,effectiveMaxRecordCount:i}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:i,queryParameters:{apiKey:o,customParameters:p},spatialReference:s,supportedCrs:r}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then(e=>S.fromJSON(e))}queryFeaturesJSON(e,t={}){const s=this.getSource();return this.load(t).then(()=>u(s,e,t))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator)||!!this.featureDefinition.supportedCrs[e.wkid]}_conformsToType(e,t){const s=new RegExp(`^${r(t)}$`,"i");return e.conformsTo.some(e=>s.test(e))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:h,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??n,s=c(t);return null==s?i.WGS84:new i({wkid:s})}_getSupportedSpatialReferences(e,t){const s="#/crs",r=e.crs??[n],o=r.includes(s)?r.filter(e=>e!==s).concat(t.crs??[]):r,p=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return o.filter(e=>!p.test(e))}async _loadOGCServices(e,s){const o=null!=s?s.signal:null,{apiKey:p,collectionId:i,customParameters:u,fields:n,geometryType:h,hasZ:S,objectIdField:C,timeInfo:R,url:w}=e,v={fields:n?.map(e=>e.toJSON()),geometryType:a.toJSON(h),hasZ:S??!1,objectIdField:C,timeInfo:R?.toJSON()},x={apiKey:p,customParameters:u,signal:o},O=await l(w,x),[j,D]=await Promise.all([d(O,x),m(O,x)]);if(!this._conformsToType(j,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new t("ogc-feature-layer:no-geojson-support","Server does not support geojson");const F=D.collections.find(({id:e})=>e===i);if(!F)throw new t("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const T=this._conformsToType(j,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await y(O,x):null,A=await f(F,v,x),Q=this._getMaxRecordCount(T),b=this._getCapabilities(A.hasZ,Q),q=this._getStorageSpatialReference(F).toJSON(),P=this._getSupportedSpatialReferences(F,D),G=new RegExp(`^${r(g)}`,"i"),_={};for(const t of P){const e=c(t);null!=e&&(_[e]||(_[e]=t.replace(G,"")))}this.featureDefinition={capabilities:b,collection:F,layerDefinition:A,spatialReference:q,supportedCrs:_}}};e([o()],C.prototype,"featureDefinition",void 0),e([o({constructOnly:!0})],C.prototype,"layer",void 0),e([o()],C.prototype,"type",void 0),C=e([p("esri.layers.graphics.sources.OGCFeatureSource")],C);export{C as OGCFeatureSource};