@arcgis/core 5.2.0-next.164 → 5.2.0-next.166

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 (168) hide show
  1. package/Graphic.d.ts +47 -14
  2. package/PopupTemplate.js +1 -1
  3. package/WebScene.d.ts +3 -0
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{97d6ef9e34a43ad2e556.js → 02e10f44edf911832c2a.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{97b5f4302fb867c829f4.js → 07f7177bfaf9de73bc25.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{612345f17f5eeb99ea8f.js → 0d9c4c6c571ce26d356b.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{12a7997a40c77f5c9160.js → 151e5799ede763a03ee2.js} +1 -1
  9. package/assets/esri/core/workers/chunks/196979cc6a765be3c5cd.js +1 -0
  10. package/assets/esri/core/workers/chunks/1ab59a97ffa49e9e1659.js +1 -0
  11. package/assets/esri/core/workers/chunks/{8715661a838361d4211a.js → 1b24a40c0fa197014873.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{83f29a159b8b5197e76a.js → 266c90d8d56a2da42fcf.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{b1d989b72203113a06fe.js → 2a36fe3f3f257a779a1b.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{fcaf9450642fcef83286.js → 3048e74e6246324ce6fc.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{95b82cbbe355266c65d7.js → 30af63b3b750142faadb.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{74137ffec5265628c33b.js → 36c780a9527c75b36725.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{6a0ec102962d2c7b4368.js → 40d803584eeade4df433.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{a546ec82ba149e12f7bf.js → 41773d858e212468db88.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{129e04d24ced77c9bb6d.js → 49b967d89d2841cea675.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{b59aaf30c7fe2c8d1aaa.js → 4b99b4cf729881e616bc.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{a09d2e1e2540921e4717.js → 4d3d7ec407ee5cd5f036.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{2c626f525f3483c03477.js → 548b8f74a6883e364931.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{25a3bd8bede2d07d3a54.js → 5af8fb4ec2c72697e35b.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{340256866f524cb069f6.js → 5d2f043ebe1051326c56.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{3f46acfda693c70abbdd.js → 61552b4b8111a8624d84.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{e653c81ffb3d818645dd.js → 632fdf1d95ad69109427.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{434a8ba841a59e0deab9.js → 67e533748435253aaba6.js} +1 -1
  28. package/assets/esri/core/workers/chunks/69d5f8ef78b9b8b3d33d.js +1 -0
  29. package/assets/esri/core/workers/chunks/{feb41abc03d677df6f73.js → 6b9961261241fdce0e94.js} +1 -1
  30. package/assets/esri/core/workers/chunks/6f897b4e7ddd1dd1672b.js +1 -0
  31. package/assets/esri/core/workers/chunks/{e251921bc5367258c4d2.js → 710b8251a59884aee31e.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{af349c7bc8ef41a0e1bd.js → 7748c2886d0122b40eeb.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{8a7b02037151767542f1.js → 7dbf4c7480bf9c72820d.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{1bca39e0e651426bdbb5.js → 7dfbc31f3b56728485a4.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{c19f238b55ff2893f7c2.js → 82a022cc21364c9a8539.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{5cb26bbaa08114aec5ce.js → 89cc1a5539b82fb46216.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{8ab57cb1bfd3dc8d3c2a.js → 8b8118ab56cc808b5a71.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{542e5640ea1b80ef801a.js → 9189dfe19a2a2ccd5173.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{f74ae0eff3f08978e607.js → 9f358c7b052cdc0ac06f.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{ee08ae5b73439a1ff666.js → a163c6005aba3378edaa.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{ec9a2425b4a498054a19.js → a17673e691ced46a90d3.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{72bd866df89b8d92e247.js → a43b33955aa78a2a8deb.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{46c5371c7a627537098c.js → a88f346786b04bd194dc.js} +6 -6
  44. package/assets/esri/core/workers/chunks/{092e311cb7aea92a6a26.js → acb265a22be5e12f38e5.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{9e8f012a56237fc8285f.js → aea44253c80493ef5755.js} +1 -1
  46. package/assets/esri/core/workers/chunks/b5b9d42e1f84ee82429c.js +1 -0
  47. package/assets/esri/core/workers/chunks/c046c4fc934bc6f54c69.js +1 -0
  48. package/assets/esri/core/workers/chunks/{c72a904e01dc8c17d992.js → c47d095434d09b5f10c6.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{226f862bbeb33fc7c597.js → c4b7111dcedd9d6e1c2a.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{81cad8d2f62a5f671c55.js → cb4db5489388559d6bd9.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{bbd44ac63d2a317d8ed9.js → cc794bb94ebc1cb66024.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{be308db5b61a7246edfe.js → cc94bf05b235e65291fc.js} +1 -1
  53. package/assets/esri/core/workers/chunks/d4af9faa5d901274fad2.js +1 -0
  54. package/assets/esri/core/workers/chunks/{fc5a36e54929e03efa86.js → dba5f44c4e4a3f075df2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{1f43e06dcfe56229bb0f.js → debe45e792212682b304.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{8414ffd937c1099e0bbc.js → e6d10136bc08aef255ff.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{45fd2b456a6997584ca1.js → f8379cd45f750f28a3d8.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{709e019885822b1f6f3e.js → f905f1a1aa4c123cbe83.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{a2fcbc494333376192aa.js → f9c80e9fc349db4873e8.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{c070d2ddf290b4f92916.js → feb4f8c807bb0dca488f.js} +1 -1
  61. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  62. package/chunks/GlobalIllumination.glsl.js +15 -30
  63. package/config.js +1 -1
  64. package/core/workers/WorkerFallback.js +4 -2
  65. package/core/workers/workerFactory.js +1 -1
  66. package/core/workers/workers.js +4 -2
  67. package/form/elements/inputs.d.ts +126 -25
  68. package/form/elements/inputs.js +1 -1
  69. package/form/elements.d.ts +1 -0
  70. package/graphic/AnnotationFeatureGraphicOrigin.d.ts +49 -9
  71. package/graphic/BuildingGraphicOrigin.d.ts +49 -0
  72. package/graphic/CSVGraphicOrigin.d.ts +42 -9
  73. package/graphic/CatalogGraphicOrigin.d.ts +42 -9
  74. package/graphic/DimensionFeatureGraphicOrigin.d.ts +42 -9
  75. package/graphic/FeatureGraphicOrigin.d.ts +42 -9
  76. package/graphic/GeoJSONGraphicOrigin.d.ts +42 -9
  77. package/graphic/GeoRSSGraphicOrigin.d.ts +42 -9
  78. package/graphic/GraphicOrigin.d.ts +52 -12
  79. package/graphic/ImageryGraphicOrigin.d.ts +42 -9
  80. package/graphic/ImageryTileGraphicOrigin.d.ts +42 -9
  81. package/graphic/KMLGraphicOrigin.d.ts +47 -10
  82. package/graphic/KnowledgeGraphGraphicOrigin.d.ts +49 -1
  83. package/graphic/LinkChartGraphicOrigin.d.ts +49 -1
  84. package/graphic/MapImageGraphicOrigin.d.ts +49 -1
  85. package/graphic/MapNotesGraphicOrigin.d.ts +48 -1
  86. package/graphic/OGCFeatureGraphicOrigin.d.ts +42 -9
  87. package/graphic/OrientedImageryGraphicOrigin.d.ts +42 -9
  88. package/graphic/ParquetGraphicOrigin.d.ts +42 -9
  89. package/graphic/PointCloudGraphicOrigin.d.ts +43 -0
  90. package/graphic/SceneGraphicOrigin.d.ts +43 -0
  91. package/graphic/SketchGraphicOrigin.d.ts +43 -0
  92. package/graphic/StreamGraphicOrigin.d.ts +43 -0
  93. package/graphic/SubtypeGroupGraphicOrigin.d.ts +49 -1
  94. package/graphic/TileGraphicOrigin.d.ts +49 -1
  95. package/graphic/VectorTileGraphicOrigin.d.ts +43 -14
  96. package/graphic/VoxelGraphicOrigin.d.ts +43 -0
  97. package/graphic/WCSGraphicOrigin.d.ts +43 -0
  98. package/graphic/WFSGraphicOrigin.d.ts +42 -9
  99. package/graphic/getGraphicOriginTitle.d.ts +21 -3
  100. package/kernel.js +1 -1
  101. package/layers/GaussianSplatLayer.d.ts +2 -1
  102. package/layers/GeospatialPDFLayer.js +1 -1
  103. package/layers/ParquetLayer.d.ts +24 -1
  104. package/layers/ParquetLayer.js +1 -1
  105. package/layers/geospatialPDF/CIM2DLayerview.js +2 -0
  106. package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
  107. package/layers/mixins/ReloadableLayer.js +1 -1
  108. package/layers/mixins/SublayersOwner.js +1 -1
  109. package/layers/orientedImagery/transformations/utils.js +1 -1
  110. package/layers/save/featureLayerUtils.js +1 -1
  111. package/layers/save/imageryUtils.js +1 -1
  112. package/layers/save/mapImageLayerUtils.js +1 -1
  113. package/layers/save/mediaLayerUtils.js +1 -1
  114. package/layers/save/parquetLayerUtils.js +2 -0
  115. package/layers/save/streamLayerUtils.js +1 -1
  116. package/layers/support/LabelClass.d.ts +8 -2
  117. package/layers/support/Sublayer.js +1 -1
  118. package/layers/support/SubtypeSublayer.js +1 -1
  119. package/layers/support/layerUtils.js +1 -1
  120. package/layers/support/layersMapping.js +1 -1
  121. package/package.json +2 -2
  122. package/popup/content.js +1 -1
  123. package/portal/schemas/definitions.js +1 -1
  124. package/portal/schemas/webScene.js +1 -1
  125. package/tables/elements.d.ts +1 -0
  126. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  127. package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
  128. package/views/3d/layers/GeospatialPDFLayerView3D.js +1 -1
  129. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  130. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  131. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +5 -5
  132. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  133. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  134. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  135. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  136. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  137. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  138. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  139. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  140. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  141. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  142. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  143. package/views/3d/webgl-engine/materials/internal/worldSizedRibbonLineIntersectionUtils.js +1 -1
  144. package/views/selection/SelectionOperation.js +1 -1
  145. package/views/selection/types.d.ts +43 -3
  146. package/views/support/layerViewUtils.js +1 -1
  147. package/views/support/selectionUtils.js +1 -1
  148. package/views/webgl/Texture.js +1 -1
  149. package/webdoc/support/webdocSaveUtils.js +1 -1
  150. package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
  151. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  152. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  153. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  154. package/widgets/Sketch/SketchViewModel.js +1 -1
  155. package/widgets/support/SelectionList/GroupLayerItem.d.ts +6 -0
  156. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  157. package/widgets/support/SelectionList/ItemBase.js +1 -1
  158. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +6 -1
  159. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  160. package/widgets/support/SelectionToolbar.d.ts +8 -1
  161. package/widgets/support/SelectionToolbar.js +1 -1
  162. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  163. package/assets/esri/core/workers/chunks/1fe24ffcd88280d84fbe.js +0 -1
  164. package/assets/esri/core/workers/chunks/72071ea5de89720fbe42.js +0 -1
  165. package/assets/esri/core/workers/chunks/9de5ad77bc37ec142218.js +0 -1
  166. package/assets/esri/core/workers/chunks/b736046c6b4ede73ea46.js +0 -1
  167. package/assets/esri/core/workers/chunks/c19cd5a03b6d480fe53b.js +0 -1
  168. package/assets/esri/core/workers/chunks/d1f98c5249c487eb96f1.js +0 -1
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"../../core/has.js";const e={ArcGISImageServiceLayer:`ImageryLayer`,ArcGISImageServiceVectorLayer:`ImageryLayer`,ArcGISMapServiceLayer:`MapImageLayer`,ArcGISTiledImageServiceLayer:`ImageryTileLayer`,ArcGISTiledMapServiceLayer:`TileLayer`,BingMapsAerial:`BingMapsLayer`,BingMapsHybrid:`BingMapsLayer`,BingMapsRoad:`BingMapsLayer`,OpenStreetMap:`OpenStreetMapLayer`,VectorTileLayer:`VectorTileLayer`,WCS:`WCSLayer`,WMS:`WMSLayer`,WebTiledLayer:`WebTileLayer`},t={ArcGISAnnotationLayer:`AnnotationFeatureLayer`,ArcGISDimensionLayer:`DimensionFeatureLayer`,ArcGISFeatureLayer:`FeatureLayer`,ArcGISImageServiceLayer:`ImageryLayer`,ArcGISImageServiceVectorLayer:`ImageryLayer`,ArcGISMapServiceLayer:`MapImageLayer`,ArcGISStreamLayer:`StreamLayer`,ArcGISTiledImageServiceLayer:`ImageryTileLayer`,ArcGISTiledMapServiceLayer:`TileLayer`,ArcGISVideoLayer:`VideoLayer`,BingMapsAerial:`BingMapsLayer`,BingMapsHybrid:`BingMapsLayer`,BingMapsRoad:`BingMapsLayer`,CatalogLayer:`CatalogLayer`,CSV:`CSVLayer`,GeoJSON:`GeoJSONLayer`,GeoRSS:`GeoRSSLayer`,GroupLayer:`GroupLayer`,KML:`KMLLayer`,KnowledgeGraphLayer:`KnowledgeGraphLayer`,MediaLayer:`MediaLayer`,OGCFeatureLayer:`OGCFeatureLayer`,OrientedImageryLayer:`OrientedImageryLayer`,get ParquetLayer(){return has(`parquetlayer-persistence-enabled`)?`ParquetLayer`:`UnsupportedLayer`},SubtypeGroupLayer:`SubtypeGroupLayer`,VectorTileLayer:`VectorTileLayer`,WCS:`WCSLayer`,WFS:`WFSLayer`,WMS:`WMSLayer`,WebTiledLayer:`WebTileLayer`},n={ArcGISFeatureLayer:`FeatureLayer`,SubtypeGroupTable:`SubtypeGroupLayer`},r={ArcGISImageServiceLayer:`UnsupportedLayer`,ArcGISMapServiceLayer:`UnsupportedLayer`,ArcGISSceneServiceLayer:`SceneLayer`,ArcGISTiledImageServiceLayer:`ImageryTileLayer`,ArcGISTiledMapServiceLayer:`TileLayer`,OpenStreetMap:`OpenStreetMapLayer`,VectorTileLayer:`VectorTileLayer`,WCS:`UnsupportedLayer`,WMS:`UnsupportedLayer`,WebTiledLayer:`WebTileLayer`},i={IntegratedMesh3DTilesLayer:`IntegratedMesh3DTilesLayer`},a={ArcGISTiledElevationServiceLayer:`ElevationLayer`,RasterDataElevationLayer:`UnsupportedLayer`},o={ArcGISDimensionLayer:`DimensionLayer`,ArcGISFeatureLayer:`FeatureLayer`,ArcGISImageServiceLayer:`ImageryLayer`,ArcGISMapServiceLayer:`MapImageLayer`,ArcGISSceneServiceLayer:`SceneLayer`,ArcGISTiledElevationServiceLayer:`ElevationLayer`,ArcGISTiledImageServiceLayer:`ImageryTileLayer`,ArcGISTiledMapServiceLayer:`TileLayer`,BuildingSceneLayer:`BuildingSceneLayer`,CSV:`CSVLayer`,CatalogLayer:`CatalogLayer`,GaussianSplatLayer:`GaussianSplatLayer`,GeoJSON:`GeoJSONLayer`,GroupLayer:`GroupLayer`,IntegratedMesh3DTilesLayer:`IntegratedMesh3DTilesLayer`,IntegratedMeshLayer:`IntegratedMeshLayer`,KML:`KMLLayer`,LineOfSightLayer:`LineOfSightLayer`,MediaLayer:`MediaLayer`,OGCFeatureLayer:`OGCFeatureLayer`,Object3DTilesLayer:`UnsupportedLayer`,OrientedImageryLayer:`OrientedImageryLayer`,PointCloudLayer:`PointCloudLayer`,RasterDataLayer:`UnsupportedLayer`,VectorTileLayer:`VectorTileLayer`,ViewshedLayer:`ViewshedLayer`,Voxel:`VoxelLayer`,WCS:`WCSLayer`,WFS:`WFSLayer`,WMS:`WMSLayer`,WebTiledLayer:`WebTileLayer`},s={ArcGISFeatureLayer:`FeatureLayer`},c={...t,LinkChartLayer:`LinkChartLayer`},l=e,u=n,d={ArcGISAnnotationLayer:`AnnotationFeatureLayer`,ArcGISDimensionLayer:`DimensionFeatureLayer`,ArcGISFeatureLayer:`FeatureLayer`,ArcGISImageServiceLayer:`ImageryLayer`,ArcGISMapServiceLayer:`MapImageLayer`,ArcGISSceneServiceLayer:`SceneLayer`,ArcGISStreamLayer:`StreamLayer`,ArcGISTiledImageServiceLayer:`ImageryTileLayer`,BuildingSceneLayer:`BuildingSceneLayer`,IntegratedMesh3DTilesLayer:`IntegratedMesh3DTilesLayer`,IntegratedMeshLayer:`IntegratedMeshLayer`,MediaLayer:`MediaLayer`,OrientedImageryLayer:`OrientedImageryLayer`,PointCloudLayer:`PointCloudLayer`,SubtypeGroupLayer:`SubtypeGroupLayer`,WCS:`WCSLayer`},f=n;function p(d){switch(d.origin){case`web-scene`:switch(d.layerContainerType){case`basemap-base-layers`:return r;case`basemap-ground-layers`:return i;case`ground`:return a;case`tables`:return s;default:return o}case`link-chart`:switch(d.layerContainerType){case`basemap-base-layers`:return l;case`tables`:return u;default:return c}default:switch(d.layerContainerType){case`basemap-base-layers`:return e;case`tables`:return n;case`ground`:case`basemap-ground-layers`:return;default:return t}}}function m(e,t){if(!t)return`UnknownLayer`;if(t===`DefaultTileLayer`){let t=`UnknownLayer`;switch(e.origin){case`web-scene`:switch(e.layerContainerType){case`operational-layers`:case`basemap-base-layers`:t=`TileLayer`;break;case`ground`:t=`ElevationLayer`}break;default:switch(e.layerContainerType){case`basemap-base-layers`:case`operational-layers`:t=`TileLayer`}}return t}return p(e)?.[t]??`UnknownLayer`}function h(e){switch(e.origin){case`portal-item`:switch(e.layerContainerType){case`basemap-base-layers`:case`ground`:case`basemap-ground-layers`:return;case`tables`:return f;default:return d}default:return p(e)}}function g(e,t,n){if(!e?.origin)return!1;switch(e.origin){case`web-map`:case`link-chart`:if(e.layerContainerType===`operational-layers`&&t===`ArcGISDimensionLayer`&&n!==`dimension-feature`)return!1;break;case`web-scene`:if(e.layerContainerType===`operational-layers`)switch(t){case`ArcGISDimensionLayer`:if(n!==`dimension`)return!1;break;case`ArcGISTiledElevationServiceLayer`:return!1}break;case`portal-item`:if(t===`ArcGISDimensionLayer`&&n!==`dimension-feature`)return!1}let r=h(e)?.[t];return r!=null&&r!==`UnknownLayer`&&r!==`UnsupportedLayer`}export{m as getLayerModuleForContextAndType,g as isLayerSupportedForWriteContext,p as layerTypeMapForReadContext};
2
+ import has from"../../core/has.js";const e={ArcGISImageServiceLayer:`ImageryLayer`,ArcGISImageServiceVectorLayer:`ImageryLayer`,ArcGISMapServiceLayer:`MapImageLayer`,ArcGISTiledImageServiceLayer:`ImageryTileLayer`,ArcGISTiledMapServiceLayer:`TileLayer`,BingMapsAerial:`BingMapsLayer`,BingMapsHybrid:`BingMapsLayer`,BingMapsRoad:`BingMapsLayer`,OpenStreetMap:`OpenStreetMapLayer`,VectorTileLayer:`VectorTileLayer`,WCS:`WCSLayer`,WMS:`WMSLayer`,WebTiledLayer:`WebTileLayer`},t={ArcGISAnnotationLayer:`AnnotationFeatureLayer`,ArcGISDimensionLayer:`DimensionFeatureLayer`,ArcGISFeatureLayer:`FeatureLayer`,ArcGISImageServiceLayer:`ImageryLayer`,ArcGISImageServiceVectorLayer:`ImageryLayer`,ArcGISMapServiceLayer:`MapImageLayer`,ArcGISStreamLayer:`StreamLayer`,ArcGISTiledImageServiceLayer:`ImageryTileLayer`,ArcGISTiledMapServiceLayer:`TileLayer`,ArcGISVideoLayer:`VideoLayer`,BingMapsAerial:`BingMapsLayer`,BingMapsHybrid:`BingMapsLayer`,BingMapsRoad:`BingMapsLayer`,CatalogLayer:`CatalogLayer`,CSV:`CSVLayer`,GeoJSON:`GeoJSONLayer`,GeoRSS:`GeoRSSLayer`,GroupLayer:`GroupLayer`,KML:`KMLLayer`,KnowledgeGraphLayer:`KnowledgeGraphLayer`,MediaLayer:`MediaLayer`,OGCFeatureLayer:`OGCFeatureLayer`,OrientedImageryLayer:`OrientedImageryLayer`,get ParquetLayer(){return has(`parquetlayer-persistence-enabled`)?`ParquetLayer`:`UnsupportedLayer`},SubtypeGroupLayer:`SubtypeGroupLayer`,VectorTileLayer:`VectorTileLayer`,WCS:`WCSLayer`,WFS:`WFSLayer`,WMS:`WMSLayer`,WebTiledLayer:`WebTileLayer`},n={ArcGISFeatureLayer:`FeatureLayer`,SubtypeGroupTable:`SubtypeGroupLayer`},r={ArcGISImageServiceLayer:`UnsupportedLayer`,ArcGISMapServiceLayer:`UnsupportedLayer`,ArcGISSceneServiceLayer:`SceneLayer`,ArcGISTiledImageServiceLayer:`ImageryTileLayer`,ArcGISTiledMapServiceLayer:`TileLayer`,OpenStreetMap:`OpenStreetMapLayer`,VectorTileLayer:`VectorTileLayer`,WCS:`UnsupportedLayer`,WMS:`UnsupportedLayer`,WebTiledLayer:`WebTileLayer`},i={IntegratedMesh3DTilesLayer:`IntegratedMesh3DTilesLayer`},a={ArcGISTiledElevationServiceLayer:`ElevationLayer`,RasterDataElevationLayer:`UnsupportedLayer`},o={ArcGISDimensionLayer:`DimensionLayer`,ArcGISFeatureLayer:`FeatureLayer`,ArcGISImageServiceLayer:`ImageryLayer`,ArcGISMapServiceLayer:`MapImageLayer`,ArcGISSceneServiceLayer:`SceneLayer`,ArcGISTiledElevationServiceLayer:`ElevationLayer`,ArcGISTiledImageServiceLayer:`ImageryTileLayer`,ArcGISTiledMapServiceLayer:`TileLayer`,BuildingSceneLayer:`BuildingSceneLayer`,CSV:`CSVLayer`,CatalogLayer:`CatalogLayer`,GaussianSplatLayer:`GaussianSplatLayer`,GeoJSON:`GeoJSONLayer`,GroupLayer:`GroupLayer`,IntegratedMesh3DTilesLayer:`IntegratedMesh3DTilesLayer`,IntegratedMeshLayer:`IntegratedMeshLayer`,KML:`KMLLayer`,LineOfSightLayer:`LineOfSightLayer`,MediaLayer:`MediaLayer`,OGCFeatureLayer:`OGCFeatureLayer`,Object3DTilesLayer:`UnsupportedLayer`,OrientedImageryLayer:`OrientedImageryLayer`,PointCloudLayer:`PointCloudLayer`,RasterDataLayer:`UnsupportedLayer`,VectorTileLayer:`VectorTileLayer`,ViewshedLayer:`ViewshedLayer`,Voxel:`VoxelLayer`,WCS:`WCSLayer`,WFS:`WFSLayer`,WMS:`WMSLayer`,WebTiledLayer:`WebTileLayer`},s={ArcGISFeatureLayer:`FeatureLayer`},c={...t,LinkChartLayer:`LinkChartLayer`},l=e,u=n,d={ArcGISAnnotationLayer:`AnnotationFeatureLayer`,ArcGISDimensionLayer:`DimensionFeatureLayer`,ArcGISFeatureLayer:`FeatureLayer`,ArcGISImageServiceLayer:`ImageryLayer`,ArcGISMapServiceLayer:`MapImageLayer`,ArcGISSceneServiceLayer:`SceneLayer`,ArcGISStreamLayer:`StreamLayer`,ArcGISTiledImageServiceLayer:`ImageryTileLayer`,BuildingSceneLayer:`BuildingSceneLayer`,IntegratedMesh3DTilesLayer:`IntegratedMesh3DTilesLayer`,IntegratedMeshLayer:`IntegratedMeshLayer`,MediaLayer:`MediaLayer`,OrientedImageryLayer:`OrientedImageryLayer`,ParquetLayer:`ParquetLayer`,PointCloudLayer:`PointCloudLayer`,SubtypeGroupLayer:`SubtypeGroupLayer`,WCS:`WCSLayer`},f=n;function p(d){switch(d.origin){case`web-scene`:switch(d.layerContainerType){case`basemap-base-layers`:return r;case`basemap-ground-layers`:return i;case`ground`:return a;case`tables`:return s;default:return o}case`link-chart`:switch(d.layerContainerType){case`basemap-base-layers`:return l;case`tables`:return u;default:return c}default:switch(d.layerContainerType){case`basemap-base-layers`:return e;case`tables`:return n;case`ground`:case`basemap-ground-layers`:return;default:return t}}}function m(e,t){if(!t)return`UnknownLayer`;if(t===`DefaultTileLayer`){let t=`UnknownLayer`;switch(e.origin){case`web-scene`:switch(e.layerContainerType){case`operational-layers`:case`basemap-base-layers`:t=`TileLayer`;break;case`ground`:t=`ElevationLayer`}break;default:switch(e.layerContainerType){case`basemap-base-layers`:case`operational-layers`:t=`TileLayer`}}return t}return p(e)?.[t]??`UnknownLayer`}function h(e){switch(e.origin){case`portal-item`:switch(e.layerContainerType){case`basemap-base-layers`:case`ground`:case`basemap-ground-layers`:return;case`tables`:return f;default:return d}default:return p(e)}}function g(e,t,n){if(!e?.origin)return!1;switch(e.origin){case`web-map`:case`link-chart`:if(e.layerContainerType===`operational-layers`&&t===`ArcGISDimensionLayer`&&n!==`dimension-feature`)return!1;break;case`web-scene`:if(e.layerContainerType===`operational-layers`)switch(t){case`ArcGISDimensionLayer`:if(n!==`dimension`)return!1;break;case`ArcGISTiledElevationServiceLayer`:return!1}break;case`portal-item`:if(t===`ArcGISDimensionLayer`&&n!==`dimension-feature`)return!1}let r=h(e)?.[t];return r!=null&&r!==`UnknownLayer`&&r!==`UnsupportedLayer`}export{m as getLayerModuleForContextAndType,g as isLayerSupportedForWriteContext,p as layerTypeMapForReadContext};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.164",
3
+ "version": "5.2.0-next.166",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -20,7 +20,7 @@
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
22
  "@amcharts/amcharts5": "~5.20.8",
23
- "@arcgis/toolkit": "5.2.0-next.164",
23
+ "@arcgis/toolkit": "5.2.0-next.166",
24
24
  "@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
25
25
  "@esri/calcite-components": "^5.2.0",
26
26
  "@vaadin/grid": "~25.3.2",
package/popup/content.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{deprecatedModule as e}from"../core/deprecate.js";import t from"../core/Logger.js";import n from"./content/AttachmentsContent.js";import r from"./content/Content.js";import i from"./content/CustomContent.js";import a from"./content/ExpressionContent.js";import o from"./content/FieldsContent.js";import s from"./content/MediaContent.js";import c from"./content/RelationshipContent.js";import l from"./content/TextContent.js";import u from"./content/UtilityNetworkAssociationsContent.js";e(t.getLogger(`esri.popup.content`),`esri.popup.content`,{replacement:`Individual content module imports`,version:`5.2`,warnOnce:!0});const d=n,f=r,p=i,m=a,h=o,g=s,_=c,v=l,y=u;function b(e){return e instanceof f}const x={base:null,key:`type`,typeMap:{attachment:d,media:g,text:v,expression:m,field:h,relationship:_,utilityNetworkAssociations:y}},S={base:null,key:`type`,typeMap:{attachment:d,media:g,text:v,expression:m,field:h,relationship:_}};export{d as AttachmentsContent,f as BaseContent,p as CustomContent,m as ExpressionContent,h as FieldsContent,g as MediaContent,_ as RelationshipContent,v as TextContent,y as UtilityNetworkAssociationsContent,b as isContent,x as persistableTypes,S as persistableWebSceneTypes};
2
+ import{deprecatedModule as e}from"../core/deprecate.js";import t from"../core/Logger.js";import n from"./content/AttachmentsContent.js";import r from"./content/Content.js";import i from"./content/CustomContent.js";import a from"./content/ExpressionContent.js";import o from"./content/FieldsContent.js";import s from"./content/MediaContent.js";import c from"./content/RelationshipContent.js";import l from"./content/TextContent.js";import u from"./content/UtilityNetworkAssociationsContent.js";e(t.getLogger(`esri.popup.content`),`esri.popup.content`,{replacement:`Individual content module imports`,version:`5.2`,warnOnce:!0});const d=n,f=r,p=i,m=a,h=o,g=s,_=c,v=l,y=u;function b(e){return e instanceof f}export{d as AttachmentsContent,f as BaseContent,p as CustomContent,m as ExpressionContent,h as FieldsContent,g as MediaContent,_ as RelationshipContent,v as TextContent,y as UtilityNetworkAssociationsContent,b as isContent};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const e={"applicationProperties_schema.json":{title:`applicationProperties`,type:`object`,description:`Configuration of application and UI elements.`,properties:{viewing:{type:`object`,$ref:`#/definitions/viewing_schema.json`}},additionalProperties:!1},"baseMap_schema.json":{title:`baseMap`,type:`object`,description:`The basemap provides geographic context to the map and scene.`,properties:{baseMapLayers:{type:`array`,description:`An array of baseMapLayer objects defining the basemaps used in the web scene.`,items:{$ref:`#/definitions/baseMapLayer_schema.json`},uniqueItems:!0},elevationLayers:{type:`array`,description:"<em>Deprecated, use `baseMap.groundLayers` or `ground.layers` instead.<sup>[1](./baseMap.md#additional-information)</sup></em> An array of elevationLayer objects defining the basemaps used in the web scene.",items:{$ref:`#/definitions/elevationLayers_schema.json`},uniqueItems:!0},groundLayers:{type:`array`,description:`A Collection of integrated mesh layers which constitute the ground of the basemap used in the web scene.<sup>[2](./baseMap.md#additional-information)</sup>`,items:{$ref:`#/definitions/integratedMesh3DTilesLayer_schema.json`},uniqueItems:!0},id:{type:`string`,description:`A unique identifying string for the basemap.`},title:{type:`string`,description:`Required string title for the basemap that can be used in a table of contents.`}},required:[`baseMapLayers`,`title`],additionalProperties:!1},"clippingArea_schema.json":{title:`clippingArea`,type:`object`,description:`Defines area to be clipped for display.`,properties:{clip:{type:`boolean`,description:`enable / disable clipping`},geometry:{description:`envelope of clip area`,$ref:`#/definitions/extent_schema.json`}}},"focusAreas_schema.json":{title:`Focus Areas`,type:`object`,description:`Container holding the scene's focus areas.`,properties:{areas:{type:`array`,description:`Array of focus area objects.`,items:{$ref:`#/definitions/focusArea_schema.json`}},style:{description:`The global visual effect applied to all focus areas.`,enum:[`bright`,`dark`]}},required:[`areas`],additionalProperties:!1},"ground_schema.json":{title:`Ground`,type:`object`,description:`Ground defines the main surface of the web scene, based on elevation layers.`,properties:{layers:{type:`array`,description:`An array of elevationLayer objects defining the elevation of the ground in the web scene.`,items:{$ref:`#/definitions/elevationLayers_schema.json`},uniqueItems:!0},navigationConstraint:{description:`Object determining whether the camera is constrained to navigate only above, or also under the ground surface. If not specified, navigation is constrained to above ground.`,$ref:`#/definitions/navigationConstraint_schema.json`},surfaceColor:{description:`Defines the color of the ground surface, displayed underneath the basemap. If no color, the default grid is shown.`,$ref:`#/definitions/color_schema.json`},transparency:{type:`integer`,description:"The transparency of the ground surface. It is used for seeing through the ground, therefore this property also changes the transparency of the basemap. Draped operational layers are not affected by this property. The value has to lie between `100` (full transparency) and `0` (full opacity).",minimum:0,maximum:100}},required:[`layers`],additionalProperties:!1},"heightModelInfo_schema.json":{title:`heightModelInfo`,type:`object`,description:`An object that defines the characteristics of the vertical coordinate system used by the web scene.`,properties:{heightModel:{type:`string`,description:`The surface type or height model of the vertical coordinate system.`,enum:[`ellipsoidal`,`gravity_related_height`],default:`ellipsoidal`},heightUnit:{type:`string`,description:`The unit of the vertical coordinate system.<a href="#heightUnit"><sup>1</sup></a>`,enum:[`150-kilometers`,`50-kilometers`,`benoit-1895-b-chain`,`clarke-foot`,`clarke-link`,`clarke-yard`,`foot`,`gold-coast-foot`,`indian-1937-yard`,`indian-yard`,`meter`,`sears-1922-truncated-chain`,`sears-chain`,`sears-foot`,`sears-yard`,`us-foot`]},vertCRS:{type:`string`,description:`(Optional) The datum realization of the vertical coordinate system.`}},required:[`heightModel`,`heightUnit`],additionalProperties:!1},"initialState_schema.json":{title:`initialState`,type:`object`,description:`An object that provides information about the initial environment settings and viewpoint of the web scene.`,properties:{analyses:{type:`array`,description:`List of analyses which are part of the view.`,items:{$ref:`#/definitions/analyses_schema.json`}},environment:{type:`object`,$ref:`#/definitions/environment_schema.json`},timeExtent:{description:`Represents the time extent for the data displayed on the scene.`,$ref:`#/definitions/timeExtent_schema.json`},viewpoint:{description:`Describes a point of view for a 2D or 3D view. In a 3D view, it is determined using a camera position.`,$ref:`#/definitions/viewpoint_schema.json`}},required:[`environment`,`viewpoint`],additionalProperties:!1},"mapFloorInfo_schema.json":{title:`mapFloorInfo`,type:`object`,description:`Contains floor-awareness information for the web scene. Defines the layers and required fields for each layer that are used for floor filtering.`,properties:{facilityLayer:{description:`Defines the layer and field properties for the Facility layer used for floor filtering.`,$ref:`#/definitions/facilityLayerInfo_schema.json`},levelLayer:{description:`Defines the layer and field properties for the Level layer used for floor filtering.`,$ref:`#/definitions/levelLayerInfo_schema.json`},siteLayer:{description:`Defines the layer and field properties for the Site layer used for floor filtering. This property is optional.`,$ref:`#/definitions/siteLayerInfo_schema.json`}},required:[`facilityLayer`,`levelLayer`],additionalProperties:!1},"mapRangeInfo_schema.json":{title:`Map Range Information`,description:`Map range information`,properties:{activeRangeName:{type:`string`,description:`Active range ID that slider/picker acts upon.`},currentRangeExtent:{type:`array`,description:`Current range for the active range.`,items:{type:`number`},minItems:2,maxItems:2},fullRangeExtent:{type:`array`,description:`Full range extent for the active range to be presented in the UI.`,items:{type:`number`},minItems:2,maxItems:2}},required:[`activeRangeName`],additionalProperties:!1},"operationalLayers_schema.json":{title:`operationalLayers`,type:`object`,description:`Operational layers contain your data. Usually, a basemap sits beneath your operational layers to give them geographic context.`,oneOf:[{$ref:`#/definitions/buildingSceneLayer_schema.json`},{$ref:`#/definitions/catalogLayer_schema.json`},{$ref:`#/definitions/csvLayer_schema.json`},{$ref:`#/definitions/dimensionLayer_schema.json`},{$ref:`#/definitions/featureLayer_schema.json`},{$ref:`#/definitions/gaussianSplatLayer_schema.json`},{$ref:`#/definitions/geojsonLayer_schema.json`},{$ref:`#/definitions/groupLayer_schema.json`},{$ref:`#/definitions/imageServiceLayer_schema.json`},{$ref:`#/definitions/integratedMesh3DTilesLayer_schema.json`},{$ref:`#/definitions/integratedMeshLayer_schema.json`},{$ref:`#/definitions/kmlLayer_schema.json`},{$ref:`#/definitions/lineOfSightLayer_schema.json`},{$ref:`#/definitions/mapServiceLayer_schema.json`},{$ref:`#/definitions/mediaLayer_schema.json`},{$ref:`#/definitions/object3DTilesLayer_schema.json`},{$ref:`#/definitions/ogcFeatureLayer_schema.json`},{$ref:`#/definitions/orientedImageryLayer_schema.json`},{$ref:`#/definitions/pointCloudLayer_schema.json`},{$ref:`#/definitions/rasterDataLayer_schema.json`},{$ref:`#/definitions/sceneLayer_schema.json`},{$ref:`#/definitions/tiledImageServiceLayer_schema.json`},{$ref:`#/definitions/tiledMapServiceLayer_schema.json`},{$ref:`#/definitions/vectorTileLayer_schema.json`},{$ref:`#/definitions/viewshedLayer_schema.json`},{$ref:`#/definitions/voxelLayer_schema.json`},{$ref:`#/definitions/wcsLayer_schema.json`},{$ref:`#/definitions/webTiledLayer_schema.json`},{$ref:`#/definitions/wfsLayer_schema.json`},{$ref:`#/definitions/wmsLayer_schema.json`}]},"presentation_schema.json":{title:`presentation`,type:`object`,description:`A presentation consists of multiple slides, where each slide is a specific view into the web scene.`,properties:{slides:{type:`array`,description:`Array of slide objects.`,items:{$ref:`#/definitions/slide_schema.json`}}},additionalProperties:!1},"spatialReference_schema.json":{title:`spatialReference`,type:`object`,description:`The spatialReference object is located at the top level of the JSON hierarchy. In addition to this, it is also available within the operationalLayer and basemap objects.
2
+ const e={"applicationProperties_schema.json":{title:`applicationProperties`,type:`object`,description:`Configuration of application and UI elements.`,properties:{viewing:{type:`object`,$ref:`#/definitions/viewing_schema.json`}},additionalProperties:!1},"baseMap_schema.json":{title:`baseMap`,type:`object`,description:`The basemap provides geographic context to the map and scene.`,properties:{baseMapLayers:{type:`array`,description:`An array of baseMapLayer objects defining the basemaps used in the web scene.`,items:{$ref:`#/definitions/baseMapLayer_schema.json`},uniqueItems:!0},elevationLayers:{type:`array`,description:"<em>Deprecated, use `baseMap.groundLayers` or `ground.layers` instead.<sup>[1](./baseMap.md#additional-information)</sup></em> An array of elevationLayer objects defining the basemaps used in the web scene.",items:{$ref:`#/definitions/elevationLayers_schema.json`},uniqueItems:!0},groundLayers:{type:`array`,description:`A Collection of integrated mesh layers which constitute the ground of the basemap used in the web scene.<sup>[2](./baseMap.md#additional-information)</sup>`,items:{$ref:`#/definitions/integratedMesh3DTilesLayer_schema.json`},uniqueItems:!0},id:{type:`string`,description:`A unique identifying string for the basemap.`},title:{type:`string`,description:`Required string title for the basemap that can be used in a table of contents.`}},required:[`baseMapLayers`,`title`],additionalProperties:!1},"clippingArea_schema.json":{title:`clippingArea`,type:`object`,description:`Defines area to be clipped for display.`,properties:{clip:{type:`boolean`,description:`enable / disable clipping`},geometry:{description:`envelope of clip area`,$ref:`#/definitions/extent_schema.json`}}},"focusAreas_schema.json":{title:`Focus Areas`,type:`object`,description:`Container holding the scene's focus areas.`,properties:{areas:{type:`array`,description:`Array of focus area objects.`,items:{$ref:`#/definitions/focusArea_schema.json`}},style:{description:`The global visual effect applied to all focus areas.`,enum:[`bright`,`dark`]}},required:[`areas`],additionalProperties:!1},"ground_schema.json":{title:`Ground`,type:`object`,description:`Ground defines the main surface of the web scene, based on elevation layers.`,properties:{layers:{type:`array`,description:`An array of elevationLayer objects defining the elevation of the ground in the web scene.`,items:{$ref:`#/definitions/elevationLayers_schema.json`},uniqueItems:!0},navigationConstraint:{description:`Object determining whether the camera is constrained to navigate only above, or also under the ground surface. If not specified, navigation is constrained to above ground.`,$ref:`#/definitions/navigationConstraint_schema.json`},surfaceColor:{description:`Defines the color of the ground surface, displayed underneath the basemap. If no color, the default grid is shown.`,$ref:`#/definitions/color_schema.json`},transparency:{type:`integer`,description:"The transparency of the ground surface. It is used for seeing through the ground, therefore this property also changes the transparency of the basemap. Draped operational layers are not affected by this property. The value has to lie between `100` (full transparency) and `0` (full opacity).",minimum:0,maximum:100}},required:[`layers`],additionalProperties:!1},"heightModelInfo_schema.json":{title:`heightModelInfo`,type:`object`,description:"<em>Deprecated. Use `spatialReference` instead to determine the scene's vertical coordinate system.</em><br> An object that defines the characteristics of the vertical coordinate system used by the web scene.",properties:{heightModel:{type:`string`,description:`The surface type or height model of the vertical coordinate system.`,enum:[`ellipsoidal`,`gravity_related_height`],default:`ellipsoidal`},heightUnit:{type:`string`,description:`The unit of the vertical coordinate system.<a href="#heightUnit"><sup>1</sup></a>`,enum:[`150-kilometers`,`50-kilometers`,`benoit-1895-b-chain`,`clarke-foot`,`clarke-link`,`clarke-yard`,`foot`,`gold-coast-foot`,`indian-1937-yard`,`indian-yard`,`meter`,`sears-1922-truncated-chain`,`sears-chain`,`sears-foot`,`sears-yard`,`us-foot`]},vertCRS:{type:`string`,description:`(Optional) The datum realization of the vertical coordinate system.`}},required:[`heightModel`,`heightUnit`],additionalProperties:!1},"initialState_schema.json":{title:`initialState`,type:`object`,description:`An object that provides information about the initial environment settings and viewpoint of the web scene.`,properties:{analyses:{type:`array`,description:`List of analyses which are part of the view.`,items:{$ref:`#/definitions/analyses_schema.json`}},environment:{type:`object`,$ref:`#/definitions/environment_schema.json`},timeExtent:{description:`Represents the time extent for the data displayed on the scene.`,$ref:`#/definitions/timeExtent_schema.json`},viewpoint:{description:`Describes a point of view for a 2D or 3D view. In a 3D view, it is determined using a camera position.`,$ref:`#/definitions/viewpoint_schema.json`}},required:[`environment`,`viewpoint`],additionalProperties:!1},"mapFloorInfo_schema.json":{title:`mapFloorInfo`,type:`object`,description:`Contains floor-awareness information for the web scene. Defines the layers and required fields for each layer that are used for floor filtering.`,properties:{facilityLayer:{description:`Defines the layer and field properties for the Facility layer used for floor filtering.`,$ref:`#/definitions/facilityLayerInfo_schema.json`},levelLayer:{description:`Defines the layer and field properties for the Level layer used for floor filtering.`,$ref:`#/definitions/levelLayerInfo_schema.json`},siteLayer:{description:`Defines the layer and field properties for the Site layer used for floor filtering. This property is optional.`,$ref:`#/definitions/siteLayerInfo_schema.json`}},required:[`facilityLayer`,`levelLayer`],additionalProperties:!1},"mapRangeInfo_schema.json":{title:`Map Range Information`,description:`Map range information`,properties:{activeRangeName:{type:`string`,description:`Active range ID that slider/picker acts upon.`},currentRangeExtent:{type:`array`,description:`Current range for the active range.`,items:{type:`number`},minItems:2,maxItems:2},fullRangeExtent:{type:`array`,description:`Full range extent for the active range to be presented in the UI.`,items:{type:`number`},minItems:2,maxItems:2}},required:[`activeRangeName`],additionalProperties:!1},"operationalLayers_schema.json":{title:`operationalLayers`,type:`object`,description:`Operational layers contain your data. Usually, a basemap sits beneath your operational layers to give them geographic context.`,oneOf:[{$ref:`#/definitions/buildingSceneLayer_schema.json`},{$ref:`#/definitions/catalogLayer_schema.json`},{$ref:`#/definitions/csvLayer_schema.json`},{$ref:`#/definitions/dimensionLayer_schema.json`},{$ref:`#/definitions/featureLayer_schema.json`},{$ref:`#/definitions/gaussianSplatLayer_schema.json`},{$ref:`#/definitions/geojsonLayer_schema.json`},{$ref:`#/definitions/groupLayer_schema.json`},{$ref:`#/definitions/imageServiceLayer_schema.json`},{$ref:`#/definitions/integratedMesh3DTilesLayer_schema.json`},{$ref:`#/definitions/integratedMeshLayer_schema.json`},{$ref:`#/definitions/kmlLayer_schema.json`},{$ref:`#/definitions/lineOfSightLayer_schema.json`},{$ref:`#/definitions/mapServiceLayer_schema.json`},{$ref:`#/definitions/mediaLayer_schema.json`},{$ref:`#/definitions/object3DTilesLayer_schema.json`},{$ref:`#/definitions/ogcFeatureLayer_schema.json`},{$ref:`#/definitions/orientedImageryLayer_schema.json`},{$ref:`#/definitions/pointCloudLayer_schema.json`},{$ref:`#/definitions/rasterDataLayer_schema.json`},{$ref:`#/definitions/sceneLayer_schema.json`},{$ref:`#/definitions/tiledImageServiceLayer_schema.json`},{$ref:`#/definitions/tiledMapServiceLayer_schema.json`},{$ref:`#/definitions/vectorTileLayer_schema.json`},{$ref:`#/definitions/viewshedLayer_schema.json`},{$ref:`#/definitions/voxelLayer_schema.json`},{$ref:`#/definitions/wcsLayer_schema.json`},{$ref:`#/definitions/webTiledLayer_schema.json`},{$ref:`#/definitions/wfsLayer_schema.json`},{$ref:`#/definitions/wmsLayer_schema.json`}]},"presentation_schema.json":{title:`presentation`,type:`object`,description:`A presentation consists of multiple slides, where each slide is a specific view into the web scene.`,properties:{slides:{type:`array`,description:`Array of slide objects.`,items:{$ref:`#/definitions/slide_schema.json`}}},additionalProperties:!1},"spatialReference_schema.json":{title:`spatialReference`,type:`object`,description:`The spatialReference object is located at the top level of the JSON hierarchy. In addition to this, it is also available within the operationalLayer and basemap objects.
3
3
 
4
4
  Many predefined spatial references have already been defined and are available for use. A spatial reference can be defined using a well-known ID (WKID) or well-known text (WKT). The default tolerance and resolution values for the associated coordinate system are used.
5
5
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{schema_definitions as e}from"./definitions.js";const t={title:`Webscene`,type:`object`,description:`The web scene data lists the basemap, operational layers, and presentation slides to be used in the web scene. It also contains information about pop-up windows and layer styling overrides to be used in the web scene. A version property allows you to supply the version of the web scene JSON format being used.`,properties:{applicationProperties:{$ref:`#/definitions/applicationProperties_schema.json`},authoringApp:{type:`string`,description:`String value indicating the application which authored the webmap`},authoringAppVersion:{type:`string`,description:`String value indicating the authoring App's version number.`},baseMap:{description:`Basemaps give the web scene a geographic context.`,$ref:`#/definitions/baseMap_schema.json`},clippingArea:{$ref:`#/definitions/clippingArea_schema.json`},focusAreas:{$ref:`#/definitions/focusAreas_schema.json`},ground:{$ref:`#/definitions/ground_schema.json`},heightModelInfo:{$ref:`#/definitions/heightModelInfo_schema.json`},initialState:{$ref:`#/definitions/initialState_schema.json`},mapFloorInfo:{$ref:`#/definitions/mapFloorInfo_schema.json`},mapRangeInfo:{description:`Map Range Information`,$ref:`#/definitions/mapRangeInfo_schema.json`},operationalLayers:{type:`array`,description:`Operational layers contain business data which are used to make thematic scenes.`,items:{$ref:`#/definitions/operationalLayers_schema.json`},uniqueItems:!0},presentation:{$ref:`#/definitions/presentation_schema.json`},spatialReference:{description:`An object used to specify the spatial reference of the given geometry.`,$ref:`#/definitions/spatialReference_schema.json`},tables:{type:`array`,description:`An array of table objects.`,items:{$ref:`#/definitions/table_schema.json`}},timeZone:{$ref:`#/definitions/timeZone_schema.json`},transportationNetworks:{type:`array`,description:`Used to specify the transportation networks of the scene.`,items:{$ref:`#/definitions/transportationNetwork_schema.json`}},version:{$ref:`#/definitions/version_schema.json`},viewingMode:{type:`string`,enum:[`global`,`local`]},widgets:{description:`the widgets object contains widgets that should be exposed to the user.`,$ref:`#/definitions/widgets_schema.json`}},required:[`ground`,`operationalLayers`,`spatialReference`,`version`,`viewingMode`],additionalProperties:!1,$schema:`http://json-schema.org/draft-07/schema`,definitions:e};export{t as json};
2
+ import{schema_definitions as e}from"./definitions.js";const t={title:`Webscene`,type:`object`,description:`The web scene data lists the basemap, operational layers, and presentation slides to be used in the web scene. It also contains information about pop-up windows and layer styling overrides to be used in the web scene. A version property allows you to supply the version of the web scene JSON format being used.`,properties:{applicationProperties:{$ref:`#/definitions/applicationProperties_schema.json`},authoringApp:{type:`string`,description:`String value indicating the application which authored the webmap`},authoringAppVersion:{type:`string`,description:`String value indicating the authoring App's version number.`},baseMap:{description:`Basemaps give the web scene a geographic context.`,$ref:`#/definitions/baseMap_schema.json`},clippingArea:{$ref:`#/definitions/clippingArea_schema.json`},focusAreas:{$ref:`#/definitions/focusAreas_schema.json`},ground:{$ref:`#/definitions/ground_schema.json`},heightModelInfo:{description:"<em>Deprecated. Use `spatialReference` instead to determine the scene's vertical coordinate system.</em><br> An object that defines the characteristics of the vertical coordinate system used by the web scene.",$ref:`#/definitions/heightModelInfo_schema.json`},initialState:{$ref:`#/definitions/initialState_schema.json`},mapFloorInfo:{$ref:`#/definitions/mapFloorInfo_schema.json`},mapRangeInfo:{description:`Map Range Information`,$ref:`#/definitions/mapRangeInfo_schema.json`},operationalLayers:{type:`array`,description:`Operational layers contain business data which are used to make thematic scenes.`,items:{$ref:`#/definitions/operationalLayers_schema.json`},uniqueItems:!0},presentation:{$ref:`#/definitions/presentation_schema.json`},spatialReference:{description:`An object used to specify the spatial reference of the given geometry.`,$ref:`#/definitions/spatialReference_schema.json`},tables:{type:`array`,description:`An array of table objects.`,items:{$ref:`#/definitions/table_schema.json`}},timeZone:{$ref:`#/definitions/timeZone_schema.json`},transportationNetworks:{type:`array`,description:`Used to specify the transportation networks of the scene.`,items:{$ref:`#/definitions/transportationNetwork_schema.json`}},version:{$ref:`#/definitions/version_schema.json`},viewingMode:{type:`string`,enum:[`global`,`local`]},widgets:{description:`the widgets object contains widgets that should be exposed to the user.`,$ref:`#/definitions/widgets_schema.json`}},required:[`ground`,`operationalLayers`,`spatialReference`,`version`,`viewingMode`],additionalProperties:!1,$schema:`http://json-schema.org/draft-07/schema`,definitions:e};export{t as json};
@@ -32,6 +32,7 @@
32
32
  * }
33
33
  * ```
34
34
  *
35
+ * @deprecated since version 4.34. Import individual element modules directly instead.
35
36
  * @since 4.31
36
37
  * @see [AttributeTableTemplate](https://developers.arcgis.com/javascript/latest/references/core/tables/AttributeTableTemplate/)
37
38
  * @see [AttributeTableAttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableAttachmentElement/)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../core/Error.js";import has from"../../../../core/has.js";import{spritePadding as t}from"./definitions.js";import{log2 as n}from"./GeometryUtils.js";import r from"./Rect.js";import i from"./RectangleBinPack.js";import a from"../../../webgl/Texture.js";import{TextureDescriptor as o}from"../../../webgl/TextureDescriptor.js";function s(e){return e&&e.type===`static`}class c{constructor(e,t,n=0){this._mosaicPages=[],this._maxItemSize=0,this._currentPage=0,this._pageWidth=0,this._pageHeight=0,this._mosaicRects=new Map,this._pageWidth=e,this._pageHeight=t,n>0&&(this._maxItemSize=n),this._binPack=new i(this._pageWidth,this._pageHeight);let r=Math.floor(this._pageWidth),a=Math.floor(this._pageHeight);this._mosaicPages.push({mosaicsData:{type:`static`,data:new Uint32Array(r*a)},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:void 0})}getSize(e){return e>=this._mosaicPages.length?[0,0]:this._mosaicPages[e].size}has(e){return this._mosaicRects.has(e)}getSpriteItem(e){return this._mosaicRects.get(e)}addSpriteItem(e,n,i,a,o,c,l=1,u=`Linear`,d=.5,f=1){if(this._mosaicRects.has(e))return this._mosaicRects.get(e);let p,m,h;if(s(i)?[p,m,h]=this._allocateImage(n[0],n[1]):(p=new r(0,0,n[0],n[1]),m=this._mosaicPages.length,this._mosaicPages.push({mosaicsData:i,size:[n[0]+2*t,n[1]+2*t],dirty:!0,texture:void 0})),p.width<=0||p.height<=0)return null;let g={type:`sprite`,rect:p,width:n[0],height:n[1],sdf:o,simplePattern:c,rasterizationScale:l,samplingMode:u,sdfPaddingRatio:d,sdfDecodeCoeff:f,page:m};return this._mosaicRects.set(e,g),s(i)&&(has(`esri-mosaic-debug`)&&this._showDebugSprite(n,i.data),this._copy({rect:p,spriteSize:n,spriteData:i.data,page:m,pageSize:h,repeat:a,sdf:o})),g}getTexture(e,t=0){let{context:n}=e,r=this._mosaicPages[t],i=r.mosaicsData,a=r.texture;if(a||(a=u(n,r.size),r.texture=a),s(i))r.dirty&&(a.setData(new Uint8Array(i.data.buffer)),a.generateMipmap(),has(`esri-mosaic-debug`)&&this._showDebugPage(t));else{let t=i.data;t.update(e),t.hasFrameData&&(t.loadFrame(a),a.generateMipmap())}return r.dirty=!1,a}dispose(){this._binPack=null;for(let e of this._mosaicPages){let t=e.texture;t&&t.dispose();let n=e.mosaicsData;s(n)||n.data.destroy()}this._mosaicPages=null,this._mosaicRects.clear()}static _copyBits(e,t,n,r,i,a,o,s,c,l,u){let d=r*t+n,f=s*a+o;if(u){f-=a;for(let o=-1;o<=l;o++,d=((o+l)%l+r)*t+n,f+=a)for(let t=-1;t<=c;t++)i[f+t]=e[d+(t+c)%c]}else for(let n=0;n<l;n++){for(let t=0;t<c;t++)i[f+t]=e[d+t];d+=t,f+=a}}_copy(n){if(n.page>=this._mosaicPages.length)return;let r=this._mosaicPages[n.page],i=r.mosaicsData;if(!s(r.mosaicsData))throw new e(`mapview-invalid-resource`,`unsuitable data type!`);let a=n.spriteData,o=i.data;c._copyBits(a,n.spriteSize[0],0,0,o,n.pageSize[0],n.rect.x+t,n.rect.y+t,n.spriteSize[0],n.spriteSize[1],n.repeat),r.dirty=!0}_allocateImage(e,a){e+=2*t,a+=2*t;let o=Math.max(e,a);if(this._maxItemSize&&this._maxItemSize<o){let t=2**Math.ceil(n(e)),i=2**Math.ceil(n(a)),o=new r(0,0,e,a);return this._mosaicPages.push({mosaicsData:{type:`static`,data:new Uint32Array(t*i)},size:[t,i],dirty:!0,texture:void 0}),[o,this._mosaicPages.length-1,[t,i]]}let c=this._binPack.allocate(e,a);if(c.width<=0){let t=this._mosaicPages[this._currentPage];return!t.dirty&&s(t.mosaicsData)&&(t.mosaicsData.data=null),this._currentPage=this._mosaicPages.length,this._mosaicPages.push({mosaicsData:{type:`static`,data:new Uint32Array(this._pageWidth*this._pageHeight)},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:void 0}),this._binPack=new i(this._pageWidth,this._pageHeight),this._allocateImage(e,a)}return[c,this._currentPage,[this._pageWidth,this._pageHeight]]}_showDebugSprite([e,t],n){let r=document.createElement(`canvas`);r.width=e,r.height=t,r.setAttribute(`style`,`position: absolute; top: ${4+204*l++}px; right: 208px; width: 200px; height: 200px; border: 1px solid black;`);let i=r.getContext(`2d`),a=new ImageData(e,t);a.data.set(new Uint8Array(n.buffer)),i.putImageData(a,0,0),document.body.appendChild(r)}_showDebugPage(e){let{size:[t,n],mosaicsData:r}=this._mosaicPages[e];if(!s(r))return;let i=`mosaicDebugPage${e}`,a=document.getElementById(i)??document.createElement(`canvas`);a.id=i,a.width=t,a.height=n,a.setAttribute(`style`,`position: absolute; top: ${4+204*e}px; right: 4px; width: 200px; height: 200px; border: 1px solid black;`);let o=a.getContext(`2d`),c=new ImageData(t,n);c.data.set(new Uint8Array(r.data.buffer)),o.putImageData(c,0,0),document.body.appendChild(a)}}let l=0;function u(e,t){let n=new o(t[0],t[1]);return n.wrapMode=33071,new a(e,n,null)}export{c as default};
2
+ import e from"../../../../core/Error.js";import has from"../../../../core/has.js";import{spritePadding as t}from"./definitions.js";import{log2 as n}from"./GeometryUtils.js";import r from"./Rect.js";import i from"./RectangleBinPack.js";import a from"../../../webgl/Texture.js";import{TextureDescriptor as o}from"../../../webgl/TextureDescriptor.js";function s(e){return e&&e.type===`static`}class c{constructor(e,t,n=0){this._mosaicPages=[],this._maxItemSize=0,this._currentPage=0,this._pageWidth=0,this._pageHeight=0,this._mosaicRects=new Map,this._pageWidth=e,this._pageHeight=t,n>0&&(this._maxItemSize=n),this._binPack=new i(this._pageWidth,this._pageHeight);let r=Math.floor(this._pageWidth),a=Math.floor(this._pageHeight);this._mosaicPages.push({mosaicsData:{type:`static`,data:new Uint32Array(r*a)},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:void 0})}getSize(e){return e>=this._mosaicPages.length?[0,0]:this._mosaicPages[e].size}has(e){return this._mosaicRects.has(e)}getSpriteItem(e){return this._mosaicRects.get(e)}addSpriteItem(e,n,i,a,o,c,l=1,u=`Linear`,d=.5,f=1){if(this._mosaicRects.has(e))return this._mosaicRects.get(e);let p,m,h;if(s(i)?[p,m,h]=this._allocateImage(n[0],n[1]):(p=new r(0,0,n[0],n[1]),m=this._mosaicPages.length,this._mosaicPages.push({mosaicsData:i,size:[n[0]+2*t,n[1]+2*t],dirty:!0,texture:void 0})),p.width<=0||p.height<=0)return null;let g={type:`sprite`,rect:p,width:n[0],height:n[1],sdf:o,simplePattern:c,rasterizationScale:l,samplingMode:u,sdfPaddingRatio:d,sdfDecodeCoeff:f,page:m};return this._mosaicRects.set(e,g),s(i)&&(has(`esri-mosaic-debug`)&&this._showDebugSprite(n,i.data),this._copy({rect:p,spriteSize:n,spriteData:i.data,page:m,pageSize:h,repeat:a,sdf:o})),g}getTexture(e,t=0){let{context:n}=e,r=this._mosaicPages[t],i=r.mosaicsData,a=r.texture;if(a||(a=u(n,r.size),r.texture=a),s(i))r.dirty&&(a.setData(new Uint8Array(i.data.buffer)),a.generateMipmap(),has(`esri-mosaic-debug`)&&this._showDebugPage(t));else{let t=i.data;t.update(e),t.hasFrameData&&(t.loadFrame(a),a.generateMipmap())}return r.dirty=!1,a}dispose(){this._binPack=null;for(let e of this._mosaicPages){let t=e.texture;t&&t.dispose();let n=e.mosaicsData;s(n)||n.data.destroy()}this._mosaicPages=null,this._mosaicRects.clear()}static _copyBits(e,t,n,r,i,a,o,s,c,l,u){let d=r*t+n,f=s*a+o;if(u){f-=a;for(let o=-1;o<=l;o++,d=((o+l)%l+r)*t+n,f+=a)for(let t=-1;t<=c;t++)i[f+t]=e[d+(t+c)%c]}else for(let n=0;n<l;n++){for(let t=0;t<c;t++)i[f+t]=e[d+t];d+=t,f+=a}}_copy(n){if(n.page>=this._mosaicPages.length)return;let r=this._mosaicPages[n.page],i=r.mosaicsData;if(!s(r.mosaicsData))throw new e(`mapview-invalid-resource`,`unsuitable data type!`);let a=n.spriteData,o=i.data;c._copyBits(a,n.spriteSize[0],0,0,o,n.pageSize[0],n.rect.x+t,n.rect.y+t,n.spriteSize[0],n.spriteSize[1],n.repeat),r.dirty=!0}_allocateImage(e,a){e+=2*t,a+=2*t;let o=Math.max(e,a);if(this._maxItemSize&&this._maxItemSize<o){let t=2**Math.ceil(n(e)),i=2**Math.ceil(n(a)),o=new r(0,0,e,a);return this._mosaicPages.push({mosaicsData:{type:`static`,data:new Uint32Array(t*i)},size:[t,i],dirty:!0,texture:void 0}),[o,this._mosaicPages.length-1,[t,i]]}let c=this._binPack.allocate(e,a);if(c.width<=0){let t=this._mosaicPages[this._currentPage];return!t.dirty&&s(t.mosaicsData)&&(t.mosaicsData.data=null),this._currentPage=this._mosaicPages.length,this._mosaicPages.push({mosaicsData:{type:`static`,data:new Uint32Array(this._pageWidth*this._pageHeight)},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:void 0}),this._binPack=new i(this._pageWidth,this._pageHeight),this._allocateImage(e,a)}return[c,this._currentPage,[this._pageWidth,this._pageHeight]]}_showDebugSprite([e,t],n){let r=document.createElement(`canvas`);r.width=e,r.height=t,r.setAttribute(`style`,`position: absolute; top: ${4+204*l++}px; right: 208px; width: 200px; height: 200px; border: 1px solid black;`);let i=r.getContext(`2d`),a=new ImageData(e,t);a.data.set(new Uint8Array(n.buffer)),i.putImageData(a,0,0),document.body.appendChild(r)}_showDebugPage(e){let{size:[t,n],mosaicsData:r}=this._mosaicPages[e];if(!s(r))return;let i=`mosaicDebugPage${e}`,a=document.getElementById(i)??document.createElement(`canvas`);a.id=i,a.width=t,a.height=n,a.setAttribute(`style`,`position: absolute; top: ${4+204*e}px; right: 4px; width: 200px; height: 200px; border: 1px solid black;`);let o=a.getContext(`2d`),c=new ImageData(t,n);c.data.set(new Uint8Array(r.data.buffer)),o.putImageData(c,0,0),document.body.appendChild(a)}}let l=0;function u(e,n){let r=new o(n[0],n[1]);return r.wrapMode=33071,r.maxMipLevel=Math.floor(Math.log2(t/2)),new a(e,r,null)}export{c as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Logger.js";import{isAbortError as n}from"../../../core/promiseUtils.js";import{watch as r}from"../../../core/reactiveUtils.js";import{property as i,subclass as a}from"../../../core/accessorSupport/decorators.js";import{LayerView2D as o}from"./LayerView2D.js";import s from"./imagery/ImageryTileView2D.js";import c from"../../layers/ImageryTileLayerView.js";import{RefreshableLayerView as l}from"../../layers/RefreshableLayerView.js";let u=class extends l(o(c)){constructor(){super(...arguments),this.subview=null}get displayParameters(){let{layer:e}=this,t=this._get(`displayParameters`);return e.visible?{clipToNeatline:e.clippedToNeatline}:t}update(e){this.subview?.update(e),this.notifyChange(`updating`)}isUpdating(){return!this.subview||this.subview.updating}attach(){this.layer.increaseRasterJobHandlerUsage();let e=new s({layer:this.layer,layerView:this,scheduler:this.scheduler});e.useWebGLForProcessing=!0,e.useProgressiveUpdate=!0,this._attachSubview(e),this.subview=e,this.requestUpdate(),this.addAttachHandles([r(()=>this.layer.clippedToNeatline,()=>{let e=this.subview.redrawOrRefetch({refetch:!0,reprocess:!1}).catch(e=>{n(e)||t.getLogger(this).error(e)});this._updatingHandles.addPromise(e)})])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null}viewChange(){this.requestUpdate()}moveEnd(){this.subview.moveEnd()}doRefresh(){return this.subview?this.subview.doRefresh():Promise.resolve()}_attachSubview(e){e&&!e.attached&&(e.attach(),e.attached=!0,this.container.addChildAt(e.container,0))}_detachSubview(e){e?.attached&&(this.container.removeChild(e.container),e.detach(),e.attached=!1)}};e([i()],u.prototype,`subview`,void 0),e([i({readOnly:!0})],u.prototype,`displayParameters`,null),u=e([a(`esri.views.2d.layers.GeospatialPDFLayerView2D`)],u);const d=u;export{d as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import n from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import i from"../../../core/Logger.js";import{destroyMaybe as a}from"../../../core/maybe.js";import{isAbortError as o}from"../../../core/promiseUtils.js";import{watch as s,whenOnce as c}from"../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{LAYERVIEW_2D_SYMBOL as d}from"../../../layers/geospatialPDF/CIM2DLayerview.js";import"../engine/Stage.js";import"../../../Color.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../../geometry/Point.js";import"../../../chunks/pe.js";import"../../../core/has.js";import"../../../core/units.js";import"../../../geometry/ellipsoidUtils.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../core/RandomLCG.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/Program.js";import"../../webgl/Renderbuffer.js";import"../../webgl/Texture.js";import"../../webgl/enums.js";import"../../webgl/Util.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import f from"./graphics/GraphicsView2D.js";import p from"./graphics/GraphicContainer.js";import"../navigation/MapViewNavigation.js";import"../../../request.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../../../core/mathUtils.js";import"../../../core/urlUtils.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/spatialReferenceEllipsoidUtils.js";import"../../../geometry/operators/support/GeographicTransformation.js";import"../../../geometry/projection/projectors.js";import"../../../geometry/support/normalizeUtils.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import{LayerView2D as m}from"./LayerView2D.js";import h from"./imagery/ImageryTileView2D.js";import g from"../../layers/ImageryTileLayerView.js";import{RefreshableLayerView as _}from"../../layers/RefreshableLayerView.js";let v=class extends _(m(g)){constructor(){super(...arguments),this._graphics=new n,this._graphicsView=null,this.subview=null}get displayParameters(){let{layer:e}=this,t=this._get(`displayParameters`);return e.visible?{clipToNeatline:e.clippedToNeatline}:t}update(e){this.subview?.update(e),this._graphicsView?.processUpdate(e),this.notifyChange(`updating`)}isUpdating(){return!this.subview||this.subview.updating}attach(){this.layer.increaseRasterJobHandlerUsage();let e=new h({layer:this.layer,layerView:this,scheduler:this.scheduler});e.useWebGLForProcessing=!0,e.useProgressiveUpdate=!0,this.subview=e;let t=new n,a=new p(this.view.featuresTilingScheme),l=new f({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:t,container:a});this._graphicsView=l;let u=new AbortController;y(this.layer,t,this.view.spatialReference);let d=r(()=>{u.abort(),this.container.removeChild(l.container),this._graphicsView===l&&(this._graphicsView=null),l.destroy(),a.destroy(),t.destroy()});this.addAttachHandles([d,s(()=>this.layer.clippedToNeatline,()=>{let t=e.redrawOrRefetch({refetch:!0,reprocess:!1}).catch(e=>{o(e)||i.getLogger(this).error(e)});this._updatingHandles.addPromise(t)})]),this._attachSubview(e),this.container.addChild(a),c(()=>!e.updating&&e.container.children.some(e=>e.bitmap?.rawPixelData?.pixelBlock!=null),u.signal).then(()=>d.remove()).catch(e=>{o(e)||i.getLogger(this).error(e)}),this.requestUpdate()}detach(){this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null,this._graphicsView&&=(this.container.removeChild(this._graphicsView.container),a(this._graphicsView)??null),this._graphics.removeAll(),this.layer.decreaseRasterJobHandlerUsage()}viewChange(){this._graphicsView?.viewChange(),this.requestUpdate()}moveEnd(){this.subview.moveEnd()}doRefresh(){return this.subview?this.subview.doRefresh():Promise.resolve()}_attachSubview(e){e&&!e.attached&&(e.attach(),e.attached=!0,this.container.addChildAt(e.container,0))}_detachSubview(e){e?.attached&&(this.container.removeChild(e.container),e.detach(),e.attached=!1)}};e([l()],v.prototype,`subview`,void 0),e([l({readOnly:!0})],v.prototype,`displayParameters`,null),v=e([u(`esri.views.2d.layers.GeospatialPDFLayerView2D`)],v);function y(e,n,r){let i=e.createNeatline(r),a=new t({geometry:i,symbol:d});n.add(a)}const b=v;export{b as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{whenOnce as n,watch as r,sync as i}from"../../../core/reactiveUtils.js";import{property as a,subclass as o}from"../../../core/accessorSupport/decorators.js";import{computeSrcResolutions as s,projectDatasetExtent as c}from"../../../layers/raster/functions/rasterProjectionHelper.js";import{LayerView3D as l}from"./LayerView3D.js";import{TiledLayerView3D as u}from"./TiledLayerView3D.js";import{RasterTile as d}from"../terrain/RasterTile.js";import{emptyTile as f}from"../terrain/TerrainData.js";import p from"../../layers/ImageryTileLayerView.js";import{RefreshableLayerView as m}from"../../layers/RefreshableLayerView.js";let h=class extends m(u(l(p))){constructor(){super(...arguments),this._srcResolutions=[],this.type=`imagery-tile-3d`,this.ignoresMemoryFactor=!1,this.unloadedMemory=0}initialize(){this.layer.increaseRasterJobHandlerUsage(),this.fullExtent??this.addResolvingPromise(Promise.reject(new t(`layerview:spatial-reference-incompatible`,`The layer extent cannot be projected to the view's spatial reference`,{layer:this.layer})));let e=n(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>{let e=this.view.basemapTerrain.tilingScheme;this.tileInfo=e.toTileInfo(),this._srcResolutions=s(this.layer.serviceRasterInfo,this.tileInfo),this.addHandles([r(()=>[this.layer.clippedToNeatline],()=>this._updatingHandles.addPromise(this.doRefresh()),i)])});this.addResolvingPromise(e)}destroy(){this.layer.decreaseRasterJobHandlerUsage()}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get imageFormatIsOpaque(){return!1}get hasMixedImageFormats(){return!1}get dataLevelRange(){let e=this.layer.tileInfo,t=this.tileInfo.lodAt(0)?.scale,n=e.lodAt(e.lods.length-1)?.scale;return this.levelRangeFromScaleRange(t,n)}get visibleAtCurrentScale(){return this.tilesVisibleAtCurrentScale()}_getFullExtent(){return c(this.layer.serviceRasterInfo,this.view.groundView?.spatialReference??this.view.spatialReference)}async fetchTile(e,n){let r=this.tileInfo,i={tileInfo:r,requestRawData:this._canSymbolizeInWebGL(),signal:n.signal,srcResolution:this._srcResolutions[e[0]],noClip:!1},{layer:a}=this,[o,s,c]=e,l=await a.fetchTile(o,s,c,i);if(l instanceof HTMLImageElement||l instanceof ImageBitmap)throw new t(`layerview:unexpected-tile-data`,`Expected fetchTile to return raster data, but received an image element. This may indicate a problem with the layer's fetchTile implementation.`);let u=l?.pixelBlock;if(u==null)return f;let p=new d([o,s,c],u,r.size[0],r.size[1]);return p.transformGrid=l.transformGrid,p.interpolation=`bilinear`,p}async doRefresh(){this.suspended||this.emit(`data-changed`)}isUpdating(){return!1}_canSymbolizeInWebGL(){return!0}get usedMemory(){return 0}};e([a()],h.prototype,`fullExtent`,null),e([a({readOnly:!0})],h.prototype,`imageFormatIsOpaque`,null),e([a({readOnly:!0})],h.prototype,`hasMixedImageFormats`,null),e([a({readOnly:!0})],h.prototype,`dataLevelRange`,null),e([a({readOnly:!0})],h.prototype,`visibleAtCurrentScale`,null),h=e([o(`esri.views.3d.layers.GeospatialPDFLayerView3D`)],h);const g=h;export{g as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{destroyHandle as n}from"../../../core/handleUtils.js";import r from"../../../core/Logger.js";import{whenOnce as i,watch as a,sync as o}from"../../../core/reactiveUtils.js";import{property as s,subclass as c}from"../../../core/accessorSupport/decorators.js";import{computeSrcResolutions as l,projectDatasetExtent as u}from"../../../layers/raster/functions/rasterProjectionHelper.js";import{OutlineVisualElement as d}from"../interactive/visualElements/OutlineVisualElement.js";import{LayerView3D as f}from"./LayerView3D.js";import{TiledLayerView3D as p}from"./TiledLayerView3D.js";import{RasterTile as m}from"../terrain/RasterTile.js";import{emptyTile as h}from"../terrain/TerrainData.js";import g from"../../layers/ImageryTileLayerView.js";import{RefreshableLayerView as _}from"../../layers/RefreshableLayerView.js";let v=class extends _(p(f(g))){constructor(){super(...arguments),this._srcResolutions=[],this._hasRenderedFirstTile=!1,this.type=`imagery-tile-3d`,this.ignoresMemoryFactor=!1,this.unloadedMemory=0}initialize(){try{this._neatlineVisualElement=new d({view:this.view,geometry:this.layer.createNeatline(this.view.spatialReference),attached:!0,isDecoration:!0,isDraped:!0,visible:!0,color:[105/255,165/255,185/255,.8],width:4,innerWidth:2,innerColor:[105/255,170/255,190/255,.85],falloff:0})}catch(e){r.getLogger(this).error(e)}this.layer.increaseRasterJobHandlerUsage(),this.fullExtent??this.addResolvingPromise(Promise.reject(new t(`layerview:spatial-reference-incompatible`,`The layer extent cannot be projected to the view's spatial reference`,{layer:this.layer})));let e=i(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>{let e=this.view.basemapTerrain.tilingScheme;this.tileInfo=e.toTileInfo(),this._srcResolutions=l(this.layer.serviceRasterInfo,this.tileInfo),this.addHandles([n(this._neatlineVisualElement),a(()=>[this.layer.clippedToNeatline],()=>this._updatingHandles.addPromise(this.doRefresh()),o)])});this.addResolvingPromise(e)}destroy(){this.layer.decreaseRasterJobHandlerUsage()}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get imageFormatIsOpaque(){return!1}get hasMixedImageFormats(){return!1}get dataLevelRange(){let e=this.layer.tileInfo,t=this.tileInfo.lodAt(0)?.scale,n=e.lodAt(e.lods.length-1)?.scale;return this.levelRangeFromScaleRange(t,n)}get visibleAtCurrentScale(){return this.tilesVisibleAtCurrentScale()}_getFullExtent(){return u(this.layer.serviceRasterInfo,this.view.groundView?.spatialReference??this.view.spatialReference)}async fetchTile(e,n){let r=this.tileInfo,i={tileInfo:r,requestRawData:this._canSymbolizeInWebGL(),signal:n.signal,srcResolution:this._srcResolutions[e[0]],noClip:!1},{layer:a}=this,[o,s,c]=e,l=await a.fetchTile(o,s,c,i);if(l instanceof HTMLImageElement||l instanceof ImageBitmap)throw new t(`layerview:unexpected-tile-data`,`Expected fetchTile to return raster data, but received an image element. This may indicate a problem with the layer's fetchTile implementation.`);let u=l?.pixelBlock;if(u==null)return h;let d=new m([o,s,c],u,r.size[0],r.size[1]);return d.transformGrid=l.transformGrid,d.interpolation=`bilinear`,this._hasRenderedFirstTile||(this._hasRenderedFirstTile=!0,this._updateNeatlineVisualElement()),d}async doRefresh(){this.suspended||this.emit(`data-changed`)}isUpdating(){return!1}_canSymbolizeInWebGL(){return!0}_updateNeatlineVisualElement(){this._neatlineVisualElement.visible=!this._hasRenderedFirstTile}get usedMemory(){return 0}};e([s()],v.prototype,`fullExtent`,null),e([s({readOnly:!0})],v.prototype,`imageFormatIsOpaque`,null),e([s({readOnly:!0})],v.prototype,`hasMixedImageFormats`,null),e([s({readOnly:!0})],v.prototype,`dataLevelRange`,null),e([s({readOnly:!0})],v.prototype,`visibleAtCurrentScale`,null),v=e([c(`esri.views.3d.layers.GeospatialPDFLayerView3D`)],v);const y=v;export{y as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import n from"../../../../core/Error.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{throwIfAborted as i,createAbortError as a}from"../../../../core/promiseUtils.js";import{difference as o}from"../../../../core/SetUtils.js";import{parseWhereClause as s}from"../../../../core/sql.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{fromFeatureSetJSON as u}from"../../../../layers/graphics/dehydratedFeatures.js";import{canConvertSqlRelativeTime as d,sqlRelativeTimeToAbsolute as f}from"../../../../layers/support/relativeTimeQueryUtils.js";import{queueAutoPriority as p}from"../../../../request/queue.js";import{runQuery as m,executeQuery as h,executeQueryForCount as g}from"../../../../rest/query/operations/query.js";import{PBFDecoder as _}from"../../support/PBFDecoder.js";let v=class extends t{constructor(e){super(e)}get implicitFields(){if(!this.layer.outFields?.includes(`*`))return new Set;let e=new Set(this.layerView.requiredFields),t=new Set(this.layerView.availableFields);return o(t,e)}async queryFeaturesDehydrated(e,t){let{layer:n}=this,r=n.capabilities,o=r?.query?.supportsFormatPBF,c=n.parsedUrl,l=d(e.where)?await f(n.fieldsIndex,e.where,r.query.relativeTimeBinWindow):e.where,p=e.where;l!==e.where&&(e=e.clone(),e.where=l);let g;if(o){this._decoder??=new _(this.controller);let r={sourceSpatialReference:n.spatialReference?.toJSON()??null,applyTransform:!0,maxStringAttributeFields:this.implicitFields,maxStringAttributeLength:S};g=await m(c,e,`pbf`,this._createRequestOptions(t)).then(e=>(i(t),this._decoder==null?Promise.reject(a()):this._decoder.invoke({buffer:e,options:r},t.completeFeatureFromTransfer,t.signal)))}else g=await h(c,e,n.spatialReference,this._createRequestOptions(t)).then(e=>u(e,{maxStringAttributeFields:this.implicitFields,maxStringAttributeLength:S}));if(p&&e.where!==p){let e=await this.controller.schedule(()=>s(p,this.layer.fieldsIndex),t.signal);g.features=await this.controller.schedule(()=>g.features.filter(t=>e.testFeatureCompiled(t)),t.signal)}return g}queryFeatureCount(e,t){return g(this.layer.parsedUrl,e,this._createRequestOptions(t))}destroy(){this._decoder=r(this._decoder)}_createRequestOptions(e){return{...p,...e,query:{...this.layer.customParameters,token:this.layer.apiKey,...e?.query}}}};e([c({constructOnly:!0})],v.prototype,`layer`,void 0),e([c({constructOnly:!0})],v.prototype,`layerView`,void 0),e([c({constructOnly:!0})],v.prototype,`controller`,void 0),e([c({readOnly:!0})],v.prototype,`implicitFields`,null),v=e([l(`esri.views.3d.layers.support.featureTileQuery3D.FeatureTileServiceQuery3D`)],v);let y=class extends t{constructor(e){super(e)}queryFeaturesDehydrated(e,t){return this.layer.queryFeatures(e,t)}};e([c({constructOnly:!0})],y.prototype,`layer`,void 0),y=e([l(`esri.views.3d.layers.support.featureTileQuery3D.FeatureTileOGCServiceQuery3D`)],y);let b=class extends t{constructor(e){super(e)}queryFeaturesDehydrated(e,t){return this.layer.source.queryFeaturesJSON(e,t).then(u,n=>{if(n&&n.name===`query-features-json:unsupported`)return this.layer.queryFeatures(e,t);throw n})}queryFeatureCount(e,t){return this.layer.queryFeatureCount(e,t)}};e([c({constructOnly:!0})],b.prototype,`layer`,void 0),b=e([l(`esri.views.3d.layers.support.featureTileQuery3D.FeatureTileClientQuery3D`)],b);function x(e,t){let{layer:r}=e;switch(r.type){case`feature`:switch(r.source.type){case`feature-layer`:return new v({layer:r,layerView:e,controller:t});case`memory`:return new b({layer:r});case`csv`:case`geojson`:case`oriented-imagery`:case`wfs`:case`ogc-feature`:case`parquet`:break;default:r.source.type}break;case`catalog-footprint`:return new v({layer:r,layerView:e,controller:t});case`csv`:case`geojson`:case`oriented-imagery`:case`wfs`:return new b({layer:r});case`ogc-feature`:return new y({layer:r})}throw new n(`feature-layer:unsupported`,`Unsupported Feature layer type ${e.layer.type}:${e.layer.source.type}`)}const S=1024;export{x as createFeatureTileQuery3D};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import n from"../../../../core/Error.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{throwIfAborted as i,createAbortError as a}from"../../../../core/promiseUtils.js";import{difference as o}from"../../../../core/SetUtils.js";import{parseWhereClause as s}from"../../../../core/sql.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{fromFeatureSetJSON as u}from"../../../../layers/graphics/dehydratedFeatures.js";import{canConvertSqlRelativeTime as d,sqlRelativeTimeToAbsolute as f}from"../../../../layers/support/relativeTimeQueryUtils.js";import p from"../../../../layers/support/TimeInformation.js";import{queueAutoPriority as m}from"../../../../request/queue.js";import{runQuery as h,executeQuery as g,executeQueryForCount as _}from"../../../../rest/query/operations/query.js";import{PBFDecoder as v}from"../../support/PBFDecoder.js";let y=class extends t{constructor(e){super(e)}get implicitFields(){if(!this.layer.outFields?.includes(`*`))return new Set;let e=new Set(this.layerView.requiredFields),t=new Set(this.layerView.availableFields);return o(t,e)}async queryFeaturesDehydrated(e,t){let{layer:n}=this,r=n.capabilities,o=r?.query?.supportsFormatPBF,c=n.parsedUrl,l=d(e.where)?await f(n.fieldsIndex,e.where,r.query.relativeTimeBinWindow):e.where,p=e.where;l!==e.where&&(e=e.clone(),e.where=l);let m;if(o){this._decoder??=new v(this.controller);let r={sourceSpatialReference:n.spatialReference?.toJSON()??null,applyTransform:!0,maxStringAttributeFields:this.implicitFields,maxStringAttributeLength:C};m=await h(c,e,`pbf`,this._createRequestOptions(t),void 0,this._createLayerMetadata()).then(e=>(i(t),this._decoder==null?Promise.reject(a()):this._decoder.invoke({buffer:e,options:r},t.completeFeatureFromTransfer,t.signal)))}else m=await g(c,e,n.spatialReference,this._createRequestOptions(t),this._createLayerMetadata()).then(e=>u(e,{maxStringAttributeFields:this.implicitFields,maxStringAttributeLength:C}));if(p&&e.where!==p){let e=await this.controller.schedule(()=>s(p,this.layer.fieldsIndex),t.signal);m.features=await this.controller.schedule(()=>m.features.filter(t=>e.testFeatureCompiled(t)),t.signal)}return m}queryFeatureCount(e,t){return _(this.layer.parsedUrl,e,this._createRequestOptions(t),this._createLayerMetadata())}destroy(){this._decoder=r(this._decoder)}_createLayerMetadata(){let{layer:e}=this,{fieldsIndex:t}=e,n=`uniqueIdFields`in e?e.uniqueIdFields:void 0;return{timeInformation:new p({fieldsIndex:t,layer:e}),uniqueIdFields:n}}_createRequestOptions(e){return{...m,...e,query:{...this.layer.customParameters,token:this.layer.apiKey,...e?.query}}}};e([c({constructOnly:!0})],y.prototype,`layer`,void 0),e([c({constructOnly:!0})],y.prototype,`layerView`,void 0),e([c({constructOnly:!0})],y.prototype,`controller`,void 0),e([c({readOnly:!0})],y.prototype,`implicitFields`,null),y=e([l(`esri.views.3d.layers.support.featureTileQuery3D.FeatureTileServiceQuery3D`)],y);let b=class extends t{constructor(e){super(e)}queryFeaturesDehydrated(e,t){return this.layer.queryFeatures(e,t)}};e([c({constructOnly:!0})],b.prototype,`layer`,void 0),b=e([l(`esri.views.3d.layers.support.featureTileQuery3D.FeatureTileOGCServiceQuery3D`)],b);let x=class extends t{constructor(e){super(e)}queryFeaturesDehydrated(e,t){return this.layer.source.queryFeaturesJSON(e,t).then(u,n=>{if(n&&n.name===`query-features-json:unsupported`)return this.layer.queryFeatures(e,t);throw n})}queryFeatureCount(e,t){return this.layer.queryFeatureCount(e,t)}};e([c({constructOnly:!0})],x.prototype,`layer`,void 0),x=e([l(`esri.views.3d.layers.support.featureTileQuery3D.FeatureTileClientQuery3D`)],x);function S(e,t){let{layer:r}=e;switch(r.type){case`feature`:switch(r.source.type){case`feature-layer`:return new y({layer:r,layerView:e,controller:t});case`memory`:return new x({layer:r});case`csv`:case`geojson`:case`oriented-imagery`:case`wfs`:case`ogc-feature`:case`parquet`:break;default:r.source.type}break;case`catalog-footprint`:return new y({layer:r,layerView:e,controller:t});case`csv`:case`geojson`:case`oriented-imagery`:case`wfs`:return new x({layer:r});case`ogc-feature`:return new b({layer:r})}throw new n(`feature-layer:unsupported`,`Unsupported Feature layer type ${e.layer.type}:${e.layer.source.type}`)}const C=1024;export{S as createFeatureTileQuery3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{lerp as e}from"../../../../core/mathUtils.js";import t from"../../../../core/PooledArray.js";import{castRenderScreenPointArray3 as n,createRenderScreenPointArray3 as r,createScreenPointArray as i}from"../../../../core/screenUtils.js";import{getMetersPerVerticalUnitForSR as a}from"../../../../core/units.js";import{set as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as s}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{add as c,normalize as l,dot as u,distance as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as f,clone as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as m,copy as h,negativeInfinity as g,expandWithNestedArray as _}from"../../../../geometry/support/aaBoundingRect.js";import{createSpatialReferenceCyclical as v}from"../../../../geometry/support/normalizeUtils.js";import{create as y}from"../../../../geometry/support/ray.js";import{sv3d as b}from"../../../../geometry/support/vectorStacks.js";import{getElevationOffsetInMeters as x}from"../../../../support/elevationInfoUtils.js";import{g as S}from"../../../../chunks/cameraUtilsSpherical.js";import{computeMapPointFromVec3d as C}from"../../support/hitTest.js";import{fromRenderAtEye as w,fromScreen as T}from"../../support/geometryUtils/ray.js";import{defaultTolerance as E,Intersector as D,defaultScreenPolygonPrimitiveProcessor as O}from"../../webgl-engine/lib/Intersector.js";import{RayIntersectionQuery as k,DrapedScreenPolygonIntersectionQuery as A}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as j}from"../../webgl-engine/lib/IntersectorResult.js";import{SliceScreenPolygonPrimitiveProcessor as M,createSliceExtrusionHalfspacePlanes as N,clipPolygonAgainstSlicedAwayHalfspaces as P,sliceFilterPredicate as F}from"../../webgl-engine/lib/intersectorUtils.js";import{prepareScreenPolygonIntersectionQuery as I}from"../../webgl-engine/lib/screenPolygonIntersectionUtils.js";import{TaskPriority as L}from"../../../support/Scheduler.js";class R{constructor(e,n,r){this.viewingMode=e,this._forEachLayer=n,this._view=r,this._externalIntersectionHandlers=new t,this._tolerance=E,this._tmpRay=y(),this._tmpRegion=m(),this._validateHUDIntersector=new D(this.viewingMode),this._validateHUDIntersector.options.hud=!1,this._screenPolygonIntersectionTask=this._view.resourceController.scheduler.registerTask(L.SCREEN_POLYGON_INTERSECTION)}destroy(){this._screenPolygonIntersectionTask.remove(),this._externalIntersectionHandlers.prune()}get screenPolygonIntersectionTask(){return this._screenPolygonIntersectionTask}intersectScreen(e,t,n){return this.intersectRay(this._getPickRay(e,this._tmpRay),H(this.viewingMode),t,n)}intersectScreenFreePointFallback(e,t,n){return this.intersectRayFreePointFallback(this._getPickRay(e,this._tmpRay),t,n)}intersectRayFreePointFallback(e,t,n){return this.intersectRay(e,H(this.viewingMode),t,n)||this._intersectRayFreePointLocal(e,t)}intersectRay(e,t,n,r){return t.options.selectionMode=!1,t.options.store=0,this.computeIntersection(e,t,!1,r),t.results.min?t.results.min.getIntersectionPoint(n):!1}getCenterRayWithSubpixelOffset(e,t,n=.5,r=.5){return e.getRenderCenter(Z,n,r),Z[0]+=.0466,Z[1]-=.0123,w(e,Z,t)}intersectIntersectorScreen(e,t,n){this.computeIntersection(this._getPickRay(e,this._tmpRay),t,!1,n)}async intersectIntersectorScreenPolygon(e,t,n){t.polygonResults.init();let r=this._view.state.camera,i=await I(r,e);i!=null&&await this._screenPolygonIntersectionTask.scheduleGenerator(e=>this._intersectIntersectorScreenPolygon(r,t,i,n,e))}*_intersectIntersectorScreenPolygon(e,t,n,r,i){let a=new U(r,this._forEachLayer);t.options.selectOpaqueTerrainOnly=!r||!(`include`in r||`exclude`in r),t.camera=e,t.point=null,t.screenPolygonPrimitiveProcessor=O,yield*t.intersectScreenPolygon(a.layers,n);let o=this._view.slice.plane,s=o?new M(o):null;t.screenPolygonPrimitiveProcessor=s??O,yield*t.intersectScreenPolygon(a.sliceableLayers,n),t.screenPolygonPrimitiveProcessor=O,yield*this._intersectPolygonHandlersGenerator(t,a,n,null,s,void 0,!0,i),yield*this._intersectDrapedScreenPolygon(t,a,n,r),yield*t.intersectHUDScreenPolygon(a.layers,n),t.screenPolygonPrimitiveProcessor=s??O,yield*t.intersectHUDScreenPolygon(a.sliceableLayers,n),t.polygonResults.sortResults()}intersectToolIntersectorScreen(e,t,n){let r=this._getPickRay(e,this._tmpRay);this.intersectToolIntersectorRay(r,t,n)}intersectToolIntersectorRay(e,t,n){t.options.selectionMode=!0,this.computeIntersection(e,t,!1,n);let r=t.results.min;!this._view.groundView.opaque&&(!j(r)||r.intersector===7)&&(t.options.selectionMode=!1,this.computeIntersection(e,t,!1,n))}setTolerance(e=E){this._tolerance=e}addIntersectionHandler(e){this._externalIntersectionHandlers.push(e),this._externalIntersectionHandlers.sort((e,t)=>e.type===7?1:t.type===7?-1:0)}removeIntersectionHandler(e){this._externalIntersectionHandlers.removeUnordered(e)!=null&&this._externalIntersectionHandlers.sort((e,t)=>e.type===7?1:t.type===7?-1:0)}_getPickRay(e,t){let n=this._view.state.camera;return T(n,e,t)}_intersectRayFreePointLocal(e,t){return this.viewingMode!==2||e==null||c(t,e.origin,l(b.get(),e.direction)),!1}intersectElevationFromScreen(e,t,n=0,r=null){return this._intersectElevation(this._getPickRay(e,this._tmpRay),t,n,r)}_intersectElevation(e,t,r=0,i=null){if(e==null)return null;let o=this._view,{renderCoordsHelper:s}=o,c=a(o.spatialReference),d=t==null?`absolute-height`:t.mode,f=x(t)/c,p=(d===`on-the-ground`?0:f+r)*c/s.unitInMeters,{camera:m}=o.state;if(d===`absolute-height`){let t=s?.getAltitude(m.eye),n=u(l(K,e.direction),s.worldUpAtPosition(m.eye,q));if(t<p&&n<0||t>=p&&n>0)return null;if(s.intersectInfiniteManifold(e,p,K)){let e=C(o,K);return e.z??=0,e.z-=f,e}return null}let h=m.projectToRenderScreen(e.origin,n(b.get())),g=new U(null,this._forEachLayer),_=o.slice.plane,v=_?F(_):null,y=new D(this.viewingMode);y.options.store=0,y.options.verticalOffset=p,y.options.normalRequired=!1;let S=this._createRayIntersectionQuery(e,h,!1);y.metersPerRenderUnit=this._view.renderCoordsHelper.unitInMeters,y.reset(S.beginPoint,S.endPoint,m),y.point=h;let w=null;if(i&&`type`in i&&i.type===`graphics`){let e=o.allLayerViews.find(e=>e.layer===i)?.uid;w=e?t=>t.layerViewUid===e:null}else i&&(w=e=>e.graphicUid!==i.uid);switch(d){case`relative-to-scene`:y.intersect(g.layers,S.screenPoint,this._tolerance,null,e=>(!w||w(e))&&!!e.lastValidElevationBB),this._intersectRayHandlers(y,g,S,v,!1,e=>e.type===2||e.type===7||e.type===8,!1);break;case`on-the-ground`:case`relative-to-ground`:this._intersectRayHandlers(y,g,S,v,!1,e=>e.isGround,!1)}if(y.results.min.getIntersectionPoint(K)){let e=C(o,K);return e.z=r,e}return null}computeIntersection(e,t,r,i){if(e==null)return;let a=this._view.state.camera,o=a.projectToRenderScreen(e.origin,n(b.get())),s=new U(i,this._forEachLayer);t.options.selectOpaqueTerrainOnly=!i||!(`include`in i||`exclude`in i);let c=this._createRayIntersectionQuery(e,o,r);t.metersPerRenderUnit=this._view.renderCoordsHelper.unitInMeters,t.reset(c.beginPoint,c.endPoint,a),t.intersect(s.layers,c.screenPoint,this._tolerance,null,s.objectFilter);let l=this._view.slice.plane,u=l?F(l):null;t.intersect(s.sliceableLayers,c.screenPoint,this._tolerance,u,s.objectFilter);let d=i&&(i.requiresGroundFeedback||i.enableDraped);this._intersectRayHandlers(t,s,c,u,!!d,e=>s.allowedIntersectorTypes==null||s.allowedIntersectorTypes.has(e.type));let f=b.get(),p=this._view,m=p.groundView.spatialReference;if(i&&i.enableDraped&&m!=null&&t.results.ground.getIntersectionPoint(f)){let e=p.overlayManager.renderer,n=p.renderCoordsHelper.spatialReference,r=b.get();p.renderCoordsHelper.fromRenderCoords(f,r,m),r[2]=p.elevationProvider?.getElevation(f[0],f[1],f[2],n,`ground`)??0,e.intersectRay(t,r,t.results.ground,e=>s.filterRenderGeometry(e))}t.sortResults(),this._processHUDResults(t)}_processHUDResults(e){let t=e.results.hud;h(this._tmpRegion,g);let n=[],r=this._tmpRegion,i=e=>{n.push(new z(e))};e.sortResults(t.all),t.min.distance!=null&&i(t.min);for(let e of t.all)t.min.target.object!==e.target.object&&t.max.target.object!==e.target.object&&i(e);if(t.max.distance!=null&&t.max.target.object!==t.min.target.object&&i(t.max),!n.length)return;r[0]===r[2]&&(r[2]+=1),r[1]===r[3]&&(r[3]+=1);let a=!0,o=e.results.max.distance==null,s=0;for(let t of n)a&&=(e.results.min.copy(t.result),!1),o&&e.results.max.copy(t.result),e.options.store===2&&e.results.all.splice(s++,0,t.result)}_createRayIntersectionQuery(e,t,n){return new k(e.origin,c(f(),e.origin,e.direction),t,n)}_intersectRayHandlers(e,t,n,r,i,a=()=>!0,o=!0){let{options:s}=e,c=s.isFiltered,l=s.filteredLayerViewUids;for(let{handler:c,filterPredicate:l,isFiltered:u,filteredLayerViewUids:d}of this._getFilteredIntersectionHandlers(t,r,null,a,o))(!u||c.isGround&&i)&&(s.isFiltered=u,s.filteredLayerViewUids=d,c.intersectRay(e,l,e.rayBegin,e.rayEnd,n.screenPoint,n.isVerticalRay));s.isFiltered=c,s.filteredLayerViewUids=l}*_intersectPolygonHandlersGenerator(e,t,n,r,i,a=()=>!0,o=!0,s){let{options:c}=e,l=c.isFiltered,u=c.filteredLayerViewUids,d=e.screenPolygonPrimitiveProcessor;for(let{handler:l,screenPolygonPrimitiveProcessor:u,isFiltered:d,filteredLayerViewUids:f}of this._getFilteredIntersectionHandlers(t,r,i,a,o))d||l.intersectScreenPolygon==null||(c.isFiltered=d,c.filteredLayerViewUids=f,e.screenPolygonPrimitiveProcessor=u??O,yield*l.intersectScreenPolygon(e,n,s));c.isFiltered=l,c.filteredLayerViewUids=u,e.screenPolygonPrimitiveProcessor=d}*_intersectDrapedScreenPolygon(e,t,n,r){let{basemapTerrain:i,overlayManager:a}=this._view,o=this._view.groundView.spatialReference!=null&&!a.renderer.isEmpty;if(!e.options.selectionMode||!r?.enableDraped||!o)return;let s=yield*this._createDrapedPolygonIntersectionQueries(n,i.slicePlaneEnabled?this._view.slice.plane:null);s!=null&&(yield*this._view.overlayManager.renderer.intersectScreenPolygon(e,s,e=>t.filterRenderGeometry(e)))}*_createDrapedPolygonIntersectionQueries(t,n){let{state:{camera:{eye:r}},pointsOfInterest:i}=this._view,a=this._view.groundView.spatialReference,c=[],l=n?[]:null,u=S(this._view,i.focus.renderLocation),f=v(a),m=1/0,h=null,g=K,_=q,y=e=>{if(!this._intersectDrapedScreenPolygonPoint(g,_,e))return!1;let t=h!=null&&f?h+f.shortestSignedDiff(h,g[0]):g[0];return h=t,c.push(s(t,g[1])),l&&l.push(p(_)),m=Math.min(m,d(r,_)),!0},{points:b}=t,{length:x}=b;for(let t=0;t<x;t++){let n=b[t],r=b[(t+1)%x];for(let t=0;t<u;t++){let i=t/u;if(!y(t===0?n:o(Y,e(n[0],r[0],i),e(n[1],r[1],i))))return null;yield}}if(!Number.isFinite(m))return null;if(n==null||!l)return[G(c,m)];let C=this._clipDrapedScreenPolygonIntersectionQueries(l,n,f,r);return C.length>0?C:null}_clipDrapedScreenPolygonIntersectionQueries(e,t,n,r){let i=[],a=N(t);for(let t of P(a,e)){let e=this._createDrapedQueryFromRenderPolygon(t,n,r);e!=null&&i.push(e)}return i.sort((e,t)=>e.distance-t.distance),i}_createDrapedQueryFromRenderPolygon(e,t,n){let{renderCoordsHelper:r}=this._view,i=this._view.groundView.spatialReference,a=[],o=1/0,c=null;for(let l of e){if(!r.fromRenderCoords(l,X,i))return null;let e=c!=null&&t?c+t.shortestSignedDiff(c,X[0]):X[0];c=e,a.push(s(e,X[1])),o=Math.min(o,d(n,l))}return a.length>=3&&Number.isFinite(o)?G(a,o):null}_intersectDrapedScreenPolygonPoint(e,t,n){let r=this._getPickRay(n,this._tmpRay);if(r==null)return!1;let{renderCoordsHelper:i}=this._view;this._intersectGroundPoint(t,r,n)||i.intersectManifoldClosestSilhouette(r,0,t);let a=this._view.groundView.spatialReference;return!!i.fromRenderCoords(t,e,a)}_intersectGroundPoint(e,t,n){let r=this._view.state.camera,i=new U(null,this._forEachLayer),a=new D(this.viewingMode);J[0]=n[0],J[1]=n[1],J[2]=0;let o=this._createRayIntersectionQuery(t,J,!1);return a.options.selectionMode=!0,a.options.store=0,a.options.normalRequired=!1,a.options.selectOpaqueTerrainOnly=!1,a.reset(o.beginPoint,o.endPoint,r),this._intersectRayHandlers(a,i,o,null,!0,e=>e.isGround,!1),a.results.ground.getIntersectionPoint(e)}*_getFilteredIntersectionHandlers(e,t,n,r=()=>!0,i=!0){for(let a of this._externalIntersectionHandlers){if(!r(a))continue;let o=!1,s=[];if(i){let t=a.layerViewUid,n=a.sublayerId,r=Array.isArray(t),i=r?t:[t],c=!1;for(let t of i)e.filterLayerViewUid(t,n)?c=!0:r&&s.push(t);o=!c}yield new B(a,a.slicePlaneEnabled?t:null,a.slicePlaneEnabled?n:null,o,s)}}}class z{constructor(e){this.result=e,this.screenPoint=r()}}class B{constructor(e,t,n,r,i){this.handler=e,this.filterPredicate=t,this.screenPolygonPrimitiveProcessor=n,this.isFiltered=r,this.filteredLayerViewUids=i}}let V;function H(e){return(!V||V.viewingMode!==e)&&(V=new D(e)),V}class U{constructor(e,t){this.layers=[],this.sliceableLayers=[],this.include=e?.include,this.exclude=e?.exclude,this.objectFilter=e?.objectFilter,this.allowedIntersectorTypes=e?.allowedIntersectorTypes,t(e=>{e.pickable&&this.filterLayerViewUid(e.apiLayerViewUid)&&(e.sliceable?this.sliceableLayers:this.layers).push(e)})}filterLayerViewUid(e,t){let{include:n,exclude:r}=this;if(e==null)return n==null&&r==null;let i=n instanceof Map?n.get(e)??!1:n?.has(e),a=r instanceof Map?r.get(e)??!1:r?.has(e);return(i==null||(typeof i==`boolean`?i:t!=null&&i.has(t)))&&(a==null||!(typeof a==`boolean`?a:t!=null&&a.has(t)))}filterRenderGeometry(e){return this.filterLayerViewUid(e.layerViewUid)}}function W(e){return typeof e==`object`&&!!e&&`intersectRay`in e}function G(e,t){return new A(e,_(m(g),e),t)}const K=f(),q=f(),J=r(),Y=i(),X=f(),Z=r();export{R as SceneIntersectionHelper,W as isIntersectionHandler};
2
+ import{lerp as e}from"../../../../core/mathUtils.js";import t from"../../../../core/PooledArray.js";import{castRenderScreenPointArray3 as n,createRenderScreenPointArray3 as r,createScreenPointArray as i}from"../../../../core/screenUtils.js";import{getMetersPerVerticalUnitForSR as a}from"../../../../core/units.js";import{set as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as s}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{add as c,normalize as l,dot as u,distance as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as f,clone as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as m,copy as h,negativeInfinity as g,expandWithNestedArray as _}from"../../../../geometry/support/aaBoundingRect.js";import{createSpatialReferenceCyclical as v}from"../../../../geometry/support/normalizeUtils.js";import{create as y}from"../../../../geometry/support/ray.js";import{sv3d as b}from"../../../../geometry/support/vectorStacks.js";import{getElevationOffsetInMeters as x}from"../../../../support/elevationInfoUtils.js";import{g as S}from"../../../../chunks/cameraUtilsSpherical.js";import{computeMapPointFromVec3d as C}from"../../support/hitTest.js";import{fromRenderAtEye as w,fromScreen as T}from"../../support/geometryUtils/ray.js";import{defaultTolerance as E,Intersector as D,defaultScreenPolygonPrimitiveProcessor as O}from"../../webgl-engine/lib/Intersector.js";import{RayIntersectionQuery as k,DrapedScreenPolygonIntersectionQuery as A}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as j}from"../../webgl-engine/lib/IntersectorResult.js";import{SliceScreenPolygonPrimitiveProcessor as M,createSliceExtrusionHalfspacePlanes as N,clipPolygonAgainstSlicedAwayHalfspaces as P,sliceFilterPredicate as F}from"../../webgl-engine/lib/intersectorUtils.js";import{prepareScreenPolygonIntersectionQuery as I}from"../../webgl-engine/lib/screenPolygonIntersectionUtils.js";import{TaskPriority as L}from"../../../support/Scheduler.js";class R{constructor(e,n,r){this.viewingMode=e,this._forEachLayer=n,this._view=r,this._externalIntersectionHandlers=new t,this._tolerance=E,this._tmpRay=y(),this._tmpRegion=m(),this._validateHUDIntersector=new D(this.viewingMode),this._validateHUDIntersector.options.hud=!1,this._screenPolygonIntersectionTask=this._view.resourceController.scheduler.registerTask(L.SCREEN_POLYGON_INTERSECTION)}destroy(){this._screenPolygonIntersectionTask.remove(),this._externalIntersectionHandlers.prune()}get screenPolygonIntersectionTask(){return this._screenPolygonIntersectionTask}intersectScreen(e,t,n){return this.intersectRay(this._getPickRay(e,this._tmpRay),H(this.viewingMode),t,n)}intersectScreenFreePointFallback(e,t,n){return this.intersectRayFreePointFallback(this._getPickRay(e,this._tmpRay),t,n)}intersectRayFreePointFallback(e,t,n){return this.intersectRay(e,H(this.viewingMode),t,n)||this._intersectRayFreePointLocal(e,t)}intersectRay(e,t,n,r){return t.options.selectionMode=!1,t.options.store=0,this.computeIntersection(e,t,!1,r),t.results.min?t.results.min.getIntersectionPoint(n):!1}getCenterRayWithSubpixelOffset(e,t,n=.5,r=.5){return e.getRenderCenter(Z,n,r),Z[0]+=.0466,Z[1]-=.0123,w(e,Z,t)}intersectIntersectorScreen(e,t,n){this.computeIntersection(this._getPickRay(e,this._tmpRay),t,!1,n)}async intersectIntersectorScreenPolygon(e,t,n){t.polygonResults.init();let r=this._view.state.camera,i=await I(r,e);i!=null&&await this._screenPolygonIntersectionTask.scheduleGenerator(e=>this._intersectIntersectorScreenPolygon(r,t,i,n,e))}*_intersectIntersectorScreenPolygon(e,t,n,r,i){let a=new U(r,this._forEachLayer);t.options.selectOpaqueTerrainOnly=!r||!(`include`in r||`exclude`in r),t.camera=e,t.metersPerRenderUnit=this._view.renderCoordsHelper.unitInMeters,t.point=null,t.screenPolygonPrimitiveProcessor=O,yield*t.intersectScreenPolygon(a.layers,n);let o=this._view.slice.plane,s=o?new M(o):null;t.screenPolygonPrimitiveProcessor=s??O,yield*t.intersectScreenPolygon(a.sliceableLayers,n),t.screenPolygonPrimitiveProcessor=O,yield*this._intersectPolygonHandlersGenerator(t,a,n,null,s,void 0,!0,i),yield*this._intersectDrapedScreenPolygon(t,a,n,r),yield*t.intersectHUDScreenPolygon(a.layers,n),t.screenPolygonPrimitiveProcessor=s??O,yield*t.intersectHUDScreenPolygon(a.sliceableLayers,n),t.polygonResults.sortResults()}intersectToolIntersectorScreen(e,t,n){let r=this._getPickRay(e,this._tmpRay);this.intersectToolIntersectorRay(r,t,n)}intersectToolIntersectorRay(e,t,n){t.options.selectionMode=!0,this.computeIntersection(e,t,!1,n);let r=t.results.min;!this._view.groundView.opaque&&(!j(r)||r.intersector===7)&&(t.options.selectionMode=!1,this.computeIntersection(e,t,!1,n))}setTolerance(e=E){this._tolerance=e}addIntersectionHandler(e){this._externalIntersectionHandlers.push(e),this._externalIntersectionHandlers.sort((e,t)=>e.type===7?1:t.type===7?-1:0)}removeIntersectionHandler(e){this._externalIntersectionHandlers.removeUnordered(e)!=null&&this._externalIntersectionHandlers.sort((e,t)=>e.type===7?1:t.type===7?-1:0)}_getPickRay(e,t){let n=this._view.state.camera;return T(n,e,t)}_intersectRayFreePointLocal(e,t){return this.viewingMode!==2||e==null||c(t,e.origin,l(b.get(),e.direction)),!1}intersectElevationFromScreen(e,t,n=0,r=null){return this._intersectElevation(this._getPickRay(e,this._tmpRay),t,n,r)}_intersectElevation(e,t,r=0,i=null){if(e==null)return null;let o=this._view,{renderCoordsHelper:s}=o,c=a(o.spatialReference),d=t==null?`absolute-height`:t.mode,f=x(t)/c,p=(d===`on-the-ground`?0:f+r)*c/s.unitInMeters,{camera:m}=o.state;if(d===`absolute-height`){let t=s?.getAltitude(m.eye),n=u(l(K,e.direction),s.worldUpAtPosition(m.eye,q));if(t<p&&n<0||t>=p&&n>0)return null;if(s.intersectInfiniteManifold(e,p,K)){let e=C(o,K);return e.z??=0,e.z-=f,e}return null}let h=m.projectToRenderScreen(e.origin,n(b.get())),g=new U(null,this._forEachLayer),_=o.slice.plane,v=_?F(_):null,y=new D(this.viewingMode);y.options.store=0,y.options.verticalOffset=p,y.options.normalRequired=!1;let S=this._createRayIntersectionQuery(e,h,!1);y.metersPerRenderUnit=this._view.renderCoordsHelper.unitInMeters,y.reset(S.beginPoint,S.endPoint,m),y.point=h;let w=null;if(i&&`type`in i&&i.type===`graphics`){let e=o.allLayerViews.find(e=>e.layer===i)?.uid;w=e?t=>t.layerViewUid===e:null}else i&&(w=e=>e.graphicUid!==i.uid);switch(d){case`relative-to-scene`:y.intersect(g.layers,S.screenPoint,this._tolerance,null,e=>(!w||w(e))&&!!e.lastValidElevationBB),this._intersectRayHandlers(y,g,S,v,!1,e=>e.type===2||e.type===7||e.type===8,!1);break;case`on-the-ground`:case`relative-to-ground`:this._intersectRayHandlers(y,g,S,v,!1,e=>e.isGround,!1)}if(y.results.min.getIntersectionPoint(K)){let e=C(o,K);return e.z=r,e}return null}computeIntersection(e,t,r,i){if(e==null)return;let a=this._view.state.camera,o=a.projectToRenderScreen(e.origin,n(b.get())),s=new U(i,this._forEachLayer);t.options.selectOpaqueTerrainOnly=!i||!(`include`in i||`exclude`in i);let c=this._createRayIntersectionQuery(e,o,r);t.metersPerRenderUnit=this._view.renderCoordsHelper.unitInMeters,t.reset(c.beginPoint,c.endPoint,a),t.intersect(s.layers,c.screenPoint,this._tolerance,null,s.objectFilter);let l=this._view.slice.plane,u=l?F(l):null;t.intersect(s.sliceableLayers,c.screenPoint,this._tolerance,u,s.objectFilter);let d=i&&(i.requiresGroundFeedback||i.enableDraped);this._intersectRayHandlers(t,s,c,u,!!d,e=>s.allowedIntersectorTypes==null||s.allowedIntersectorTypes.has(e.type));let f=b.get(),p=this._view,m=p.groundView.spatialReference;if(i&&i.enableDraped&&m!=null&&t.results.ground.getIntersectionPoint(f)){let e=p.overlayManager.renderer,n=p.renderCoordsHelper.spatialReference,r=b.get();p.renderCoordsHelper.fromRenderCoords(f,r,m),r[2]=p.elevationProvider?.getElevation(f[0],f[1],f[2],n,`ground`)??0,e.intersectRay(t,r,t.results.ground,e=>s.filterRenderGeometry(e))}t.sortResults(),this._processHUDResults(t)}_processHUDResults(e){let t=e.results.hud;h(this._tmpRegion,g);let n=[],r=this._tmpRegion,i=e=>{n.push(new z(e))};e.sortResults(t.all),t.min.distance!=null&&i(t.min);for(let e of t.all)t.min.target.object!==e.target.object&&t.max.target.object!==e.target.object&&i(e);if(t.max.distance!=null&&t.max.target.object!==t.min.target.object&&i(t.max),!n.length)return;r[0]===r[2]&&(r[2]+=1),r[1]===r[3]&&(r[3]+=1);let a=!0,o=e.results.max.distance==null,s=0;for(let t of n)a&&=(e.results.min.copy(t.result),!1),o&&e.results.max.copy(t.result),e.options.store===2&&e.results.all.splice(s++,0,t.result)}_createRayIntersectionQuery(e,t,n){return new k(e.origin,c(f(),e.origin,e.direction),t,n)}_intersectRayHandlers(e,t,n,r,i,a=()=>!0,o=!0){let{options:s}=e,c=s.isFiltered,l=s.filteredLayerViewUids;for(let{handler:c,filterPredicate:l,isFiltered:u,filteredLayerViewUids:d}of this._getFilteredIntersectionHandlers(t,r,null,a,o))(!u||c.isGround&&i)&&(s.isFiltered=u,s.filteredLayerViewUids=d,c.intersectRay(e,l,e.rayBegin,e.rayEnd,n.screenPoint,n.isVerticalRay));s.isFiltered=c,s.filteredLayerViewUids=l}*_intersectPolygonHandlersGenerator(e,t,n,r,i,a=()=>!0,o=!0,s){let{options:c}=e,l=c.isFiltered,u=c.filteredLayerViewUids,d=e.screenPolygonPrimitiveProcessor;for(let{handler:l,screenPolygonPrimitiveProcessor:u,isFiltered:d,filteredLayerViewUids:f}of this._getFilteredIntersectionHandlers(t,r,i,a,o))d||l.intersectScreenPolygon==null||(c.isFiltered=d,c.filteredLayerViewUids=f,e.screenPolygonPrimitiveProcessor=u??O,yield*l.intersectScreenPolygon(e,n,s));c.isFiltered=l,c.filteredLayerViewUids=u,e.screenPolygonPrimitiveProcessor=d}*_intersectDrapedScreenPolygon(e,t,n,r){let{basemapTerrain:i,overlayManager:a}=this._view,o=this._view.groundView.spatialReference!=null&&!a.renderer.isEmpty;if(!e.options.selectionMode||!r?.enableDraped||!o)return;let s=yield*this._createDrapedPolygonIntersectionQueries(n,i.slicePlaneEnabled?this._view.slice.plane:null);s!=null&&(yield*this._view.overlayManager.renderer.intersectScreenPolygon(e,s,e=>t.filterRenderGeometry(e)))}*_createDrapedPolygonIntersectionQueries(t,n){let{state:{camera:{eye:r}},pointsOfInterest:i}=this._view,a=this._view.groundView.spatialReference,c=[],l=n?[]:null,u=S(this._view,i.focus.renderLocation),f=v(a),m=1/0,h=null,g=K,_=q,y=e=>{if(!this._intersectDrapedScreenPolygonPoint(g,_,e))return!1;let t=h!=null&&f?h+f.shortestSignedDiff(h,g[0]):g[0];return h=t,c.push(s(t,g[1])),l&&l.push(p(_)),m=Math.min(m,d(r,_)),!0},{points:b}=t,{length:x}=b;for(let t=0;t<x;t++){let n=b[t],r=b[(t+1)%x];for(let t=0;t<u;t++){let i=t/u;if(!y(t===0?n:o(Y,e(n[0],r[0],i),e(n[1],r[1],i))))return null;yield}}if(!Number.isFinite(m))return null;if(n==null||!l)return[G(c,m)];let C=this._clipDrapedScreenPolygonIntersectionQueries(l,n,f,r);return C.length>0?C:null}_clipDrapedScreenPolygonIntersectionQueries(e,t,n,r){let i=[],a=N(t);for(let t of P(a,e)){let e=this._createDrapedQueryFromRenderPolygon(t,n,r);e!=null&&i.push(e)}return i.sort((e,t)=>e.distance-t.distance),i}_createDrapedQueryFromRenderPolygon(e,t,n){let{renderCoordsHelper:r}=this._view,i=this._view.groundView.spatialReference,a=[],o=1/0,c=null;for(let l of e){if(!r.fromRenderCoords(l,X,i))return null;let e=c!=null&&t?c+t.shortestSignedDiff(c,X[0]):X[0];c=e,a.push(s(e,X[1])),o=Math.min(o,d(n,l))}return a.length>=3&&Number.isFinite(o)?G(a,o):null}_intersectDrapedScreenPolygonPoint(e,t,n){let r=this._getPickRay(n,this._tmpRay);if(r==null)return!1;let{renderCoordsHelper:i}=this._view;this._intersectGroundPoint(t,r,n)||i.intersectManifoldClosestSilhouette(r,0,t);let a=this._view.groundView.spatialReference;return!!i.fromRenderCoords(t,e,a)}_intersectGroundPoint(e,t,n){let r=this._view.state.camera,i=new U(null,this._forEachLayer),a=new D(this.viewingMode);J[0]=n[0],J[1]=n[1],J[2]=0;let o=this._createRayIntersectionQuery(t,J,!1);return a.options.selectionMode=!0,a.options.store=0,a.options.normalRequired=!1,a.options.selectOpaqueTerrainOnly=!1,a.reset(o.beginPoint,o.endPoint,r),this._intersectRayHandlers(a,i,o,null,!0,e=>e.isGround,!1),a.results.ground.getIntersectionPoint(e)}*_getFilteredIntersectionHandlers(e,t,n,r=()=>!0,i=!0){for(let a of this._externalIntersectionHandlers){if(!r(a))continue;let o=!1,s=[];if(i){let t=a.layerViewUid,n=a.sublayerId,r=Array.isArray(t),i=r?t:[t],c=!1;for(let t of i)e.filterLayerViewUid(t,n)?c=!0:r&&s.push(t);o=!c}yield new B(a,a.slicePlaneEnabled?t:null,a.slicePlaneEnabled?n:null,o,s)}}}class z{constructor(e){this.result=e,this.screenPoint=r()}}class B{constructor(e,t,n,r,i){this.handler=e,this.filterPredicate=t,this.screenPolygonPrimitiveProcessor=n,this.isFiltered=r,this.filteredLayerViewUids=i}}let V;function H(e){return(!V||V.viewingMode!==e)&&(V=new D(e)),V}class U{constructor(e,t){this.layers=[],this.sliceableLayers=[],this.include=e?.include,this.exclude=e?.exclude,this.objectFilter=e?.objectFilter,this.allowedIntersectorTypes=e?.allowedIntersectorTypes,t(e=>{e.pickable&&this.filterLayerViewUid(e.apiLayerViewUid)&&(e.sliceable?this.sliceableLayers:this.layers).push(e)})}filterLayerViewUid(e,t){let{include:n,exclude:r}=this;if(e==null)return n==null&&r==null;let i=n instanceof Map?n.get(e)??!1:n?.has(e),a=r instanceof Map?r.get(e)??!1:r?.has(e);return(i==null||(typeof i==`boolean`?i:t!=null&&i.has(t)))&&(a==null||!(typeof a==`boolean`?a:t!=null&&a.has(t)))}filterRenderGeometry(e){return this.filterLayerViewUid(e.layerViewUid)}}function W(e){return typeof e==`object`&&!!e&&`intersectRay`in e}function G(e,t){return new A(e,_(m(g),e),t)}const K=f(),q=f(),J=r(),Y=i(),X=f(),Z=r();export{R as SceneIntersectionHelper,W as isIntersectionHandler};
@@ -11,7 +11,7 @@ import{EvaluateAmbientLighting as e}from"./EvaluateAmbientLighting.glsl.js";impo
11
11
  `),p.uniforms.add(i).code.add(d`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
12
12
  float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld);
13
13
  return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * mainLightIntensity;
14
- }`);let w=S?`globalIlluminationOcclusion`:`ssao`,T=S?`factorDirect`:`0.0`,E=S?`factorAmbient`:`1.0`;switch(p.constants.add(`mainLightIrradianceScale`,`float`,S?.75:1),p.constants.add(`ambientIrradianceScale`,`float`,S?1.5:1),S&&(p.uniforms.add(new u(`factorDirect`,e=>e.globalIlluminationDirectFactor),new u(`factorAmbient`,e=>e.globalIlluminationAmbientFactor)),p.constants.add(`globalIlluminationOcclusionBoost`,`float`,1.2),p.constants.add(`globalIlluminationEmissionBoost`,`float`,2.25),p.constants.add(`globalIlluminationEmissionCompressionWeight`,`float`,.75),p.code.add(d`vec3 evaluateGlobalIlluminationOcclusion() {
14
+ }`);let w=S?`globalIlluminationOcclusion`:`ssao`;switch(p.constants.add(`globalIlluminationDirectFactor`,`float`,S?.55:0),p.constants.add(`globalIlluminationAmbientFactor`,`float`,S?.85:1),p.constants.add(`mainLightIrradianceScale`,`float`,S?.75:1),p.constants.add(`ambientIrradianceScale`,`float`,S?1.5:1),S&&(p.constants.add(`globalIlluminationOcclusionBoost`,`float`,1.2),p.constants.add(`globalIlluminationEmissionBoost`,`float`,2.25),p.constants.add(`globalIlluminationEmissionCompressionWeight`,`float`,.75),p.code.add(d`vec3 evaluateGlobalIlluminationOcclusion() {
15
15
  return min(globalIlluminationOcclusionBoost * readGlobalIlluminationOcclusion(), 1.0);
16
16
  }
17
17
  vec3 evaluateGlobalIlluminationEmission(vec3 albedoLinear) {
@@ -51,8 +51,8 @@ return mix(emission, compressedEmission, globalIlluminationEmissionCompressionWe
51
51
  // Calculate the irradiance components: sun, fill lights and the sky.
52
52
  // Applying AO to both direct and ambient lighting enhances depth perception.
53
53
  // This is an artistic choice; physically, AO should only attenuate ambient lighting.
54
- vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), ${T});
55
- vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), ${E});
54
+ vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), globalIlluminationDirectFactor);
55
+ vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), globalIlluminationAmbientFactor);
56
56
  vec3 mainLightIrradianceComponent = mainLightIrradianceScale * inputs.NdotL * (1.0 - shadow) * mainLightIntensity * directOcclusionFactor;
57
57
  vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * mainLightIntensity * fillLightIntensity * directOcclusionFactor;
58
58
  // calculate ambient irradiance for localView and additionalLight for globalView
@@ -106,8 +106,8 @@ return mix(emission, compressedEmission, globalIlluminationEmissionCompressionWe
106
106
 
107
107
  // Applying AO to both direct and ambient lighting enhances depth perception.
108
108
  // This is an artistic choice; physically, AO should only attenuate ambient lighting.
109
- vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), ${T});
110
- vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), ${E});
109
+ vec3 directOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), globalIlluminationDirectFactor);
110
+ vec3 ambientOcclusionFactor = mix(vec3(1.0), vec3(1.0 - ${w}), globalIlluminationAmbientFactor);
111
111
  vec3 mainLightIrradianceComponent = mainLightIrradianceScale * (1.0 - shadow) * inputs.NdotL * mainLightIntensity * directOcclusionFactor;
112
112
  vec3 ambientLightIrradianceComponent = ambientIrradianceScale * calculateAmbientIrradiance(normal) * ambientOcclusionFactor + additionalLight;
113
113
  vec3 ambientSky = ambientLightIrradianceComponent + mainLightIrradianceComponent;
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderLibrary/util/cameraUniforms.js";import"../../core/shaderModules/FloatBindUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./GlobalIlluminationColorQuantization.glsl.js";import"../../shaders/floatBlendScale.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/enums.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{G as GlobalIlluminationPassParameters,c as build,e as defaultColorBleedWeight,f as defaultEmissionBoostFactor,g as defaultFactorDaylightDirectional,d as defaultRayMarchMaxReach,h as defaultRayMarchMaxReachEmissionWeight,b as defaultRayMarchMaxSteps,i as defaultRayMarchMinReach,j as defaultRayMarchMinReachEmissionWeight,k as defaultRayMarchWorldReach}from"../../../../../chunks/GlobalIllumination.glsl.js";
2
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderLibrary/util/cameraUniforms.js";import"../../core/shaderModules/FloatBindUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./GlobalIlluminationColorQuantization.glsl.js";import"../../shaders/floatBlendScale.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/enums.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{G as GlobalIlluminationPassParameters,b as build}from"../../../../../chunks/GlobalIllumination.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as n,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{waitRender as i}from"../../../../../core/scheduling.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as o}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_W as s,ZEROS as c}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as l}from"../../../webgl.js";import{AmbientIllumination as u}from"../AmbientIllumination.js";import{G as d}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as f}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as p}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as m}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as h}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as g}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as _}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as v,ColorAttachment1 as y}from"../../../../webgl/enums.js";let b=class extends u{constructor(e){super(e),this._passParameters=new d,this._drawParameters=new f,this._drawParametersUpscale=new g,this._configuration=new h,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._lowQualityResolutionScale=.35,this._maxFrames=256}initialize(){this.addHandles(n(()=>this._mode,e=>{e===0?this._disable():this._enable()},r))}destroy(){this._lastOutput=t(this._lastOutput)}_disable(){super._disable(),this._resetAccumulation(),this._passParameters.temporalSampleFrame=0}get hasHighQuality(){return this._mode===2}resetAccumulation(){!this._isGlobalIlluminationUpdate&&(this._passParameters.accumulatedFrames>100||!this._configuration.hasEmission)&&this._resetAccumulation()}_resetAccumulation(){this._passParameters.accumulatedFrames=0,this._lastOutput=t(this._lastOutput)}get isAccumulating(){return this.enabled&&this._passParameters.accumulatedFrames<this._maxFrames}precompile(){this.techniques.getCompiled(_)}render(e){if(this.bindParameters.frameRendererTarget===3)return null;let t=this.bindParameters.frameRendererTarget!==0;if(this._passParameters.accumulatedFrames>=this._maxFrames&&!t)return this._lastOutput?.retain(),this._lastOutput;let n=e.find(({name:e})=>e===`normals`),r=n?.getTexture(),i=n?.getTexture(v);return!r||!i||this._mode===0?this._emptyOutput:(this._configuration.hasEmission=!!this.bindParameters.reprojection.lastFrameEmission,t?this._renderOffscreen(r,i):this._renderInteractive(r,i))}_renderOffscreen(e,t){let n=this._emptyOutput,r=this._passParameters.accumulatedFrames,i=this._passParameters.temporalSampleFrame;this._passParameters.accumulatedFrames=0,this._passParameters.temporalSampleFrame=0;let a=this.techniques.get(m,this._configuration),o=this.techniques.get(p);for(;this._passParameters.accumulatedFrames<this._maxFrames;){this._passParameters.globalIllumination=n.getTexture(),this._passParameters.globalIlluminationWeights=n.getTexture(y);let r=this._renderAccumulationFrame(e,t,a,o);++this._passParameters.accumulatedFrames,n.release(),n=r}return this._passParameters.globalIllumination=null,this._passParameters.globalIlluminationWeights=null,this._passParameters.accumulatedFrames=r,this._passParameters.temporalSampleFrame=i,n}_renderInteractive(e,t){if(!this._canRender)return this._requestRender(),this._emptyOutput;let n=this._mode===1?this._lowQualityResolutionScale*this.bindParameters.camera.pixelScale:1,r=n>=.99?1:n,i=this.techniques.getCompiled(m,this._configuration),a=this.techniques.getCompiled(p),o=r<1,s=o?this.techniques.getCompiled(_):null;if(!i||!a||o&&!s)return this._requestRender(),this._emptyOutput;let c=this._renderAccumulationFrame(e,t,i,a,s,r);return++this._passParameters.accumulatedFrames,this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),this._storeOutput(c),c}_renderAccumulationFrame(e,t,n,r,i,a=1){let s=this.bindParameters,c=this.renderingContext,{camera:u}=s;this._passParameters.normalTexture=e,this._passParameters.depthTexture=t,this._passParameters.projScale=1/u.computeScreenPixelSizeAtDistance(1),this._passParameters.resolutionScale=a,this._passParameters.glowBoost=this._glowBoost;let{fullWidth:d,fullHeight:f}=u,p=Math.max(1,Math.floor(d*a)),m=Math.max(1,Math.floor(f*a)),h=this.fboCache.acquire(p,m,`global illumination input`).acquireColor(y,2);c.bindFramebuffer(h.fbo),c.setViewport(0,0,p,m),c.bindTechnique(n,s,this._passParameters,this._drawParameters),c.screen.draw();let g=Math.max(1,Math.round(p)),_=Math.max(1,Math.round(m)),v=this.fboCache.acquire(g,_,`global illumination blur horizontal`);c.bindFramebuffer(v.fbo);let b=h.obtainAttachment(y);this._drawParameters.texture=h.getTexture(),this._drawParameters.weightTexture=b.attachment,o(this._drawParameters.blurSize,0,1/m),c.bindTechnique(r,s,this._passParameters,this._drawParameters),c.setViewport(0,0,g,_),c.screen.draw(),h.release();let x=this.fboCache.acquire(g,_,i?`global illumination blur vertical`:l.AMBIENT_ILLUMINATION);c.bindFramebuffer(x.fbo),c.setViewport(0,0,g,_),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParameters.texture=v.getTexture(),this._drawParameters.weightTexture=b.attachment,o(this._drawParameters.blurSize,1/g,0),c.bindTechnique(r,s,this._passParameters,this._drawParameters),c.setViewport(0,0,g,_),c.screen.draw(),v.release(),x.attachColor(b,y),b.release();let S=x;return i&&(S=this.fboCache.acquire(d,f,l.AMBIENT_ILLUMINATION).acquireColor(y,2),c.bindFramebuffer(S.fbo),c.setViewport(0,0,d,f),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParametersUpscale.colorTexture=x.getTexture(),this._drawParametersUpscale.weightTexture=x.getTexture(y),c.bindTechnique(i,s,this._passParameters,this._drawParametersUpscale),c.screen.draw(),x.release()),c.setViewport4fv(u.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,S}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(e){this._lastOutput!==e&&(this._lastOutput=t(this._lastOutput),this._lastOutput=e,this._lastOutput.retain())}get _emptyOutput(){let e=this.renderingContext,{fullWidth:t,fullHeight:n}=this.bindParameters.camera,r=this.fboCache.acquire(t,n,l.AMBIENT_ILLUMINATION).acquireColor(y,2);return e.bindFramebuffer(r.fbo),e.setViewport(0,0,t,n),e.clearBuffer(0,s),e.clearBuffer(1,c),r}get _canRender(){let{reprojection:e,hasEmission:t,globalIllumination:n}=this.bindParameters;return!!e.lastFrameColor&&(!t||!!e.lastFrameEmission)&&!!e.lastFrameDepth&&!!n}get _glowBoost(){let e=this.view.environment.lighting.glow;return e==null?0:2+3*e.intensity}get _mode(){return this._useGlobalIllumination?this.view.stage.renderer.isFeatureEnabled(10)?2:1:0}get test(){let e=this;return{get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},passParameters:this._passParameters,configuration:this._configuration,get mode(){return e._mode},async restartAccumulation(){e.produces!==`disabled`&&(e._disable(),await i(),e._enable())}}}};b=e([a(`esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination`)],b);export{b as GlobalIllumination};
2
+ import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as n,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{waitRender as i}from"../../../../../core/scheduling.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as o}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_W as s,ZEROS as c}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as l}from"../../../webgl.js";import{AmbientIllumination as u}from"../AmbientIllumination.js";import{G as d}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as f}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as p}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as m}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as h}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as g}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as _}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as v,ColorAttachment1 as y}from"../../../../webgl/enums.js";let b=class extends u{constructor(e){super(e),this._passParameters=new d,this._drawParameters=new f,this._drawParametersUpscale=new g,this._configuration=new h,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._lowQualityResolutionScale=.35,this._maxFrames=256}initialize(){this.addHandles(n(()=>this._mode,e=>{e===0?this._disable():this._enable()},r))}destroy(){this._lastOutput=t(this._lastOutput)}_disable(){super._disable(),this._resetAccumulation(),this._passParameters.temporalSampleFrame=0}get hasHighQuality(){return this._mode===2}resetAccumulation(){!this._isGlobalIlluminationUpdate&&(this._passParameters.accumulatedFrames>100||!this._configuration.hasEmission)&&this._resetAccumulation()}_resetAccumulation(){this._passParameters.accumulatedFrames=0,this._lastOutput=t(this._lastOutput)}get isAccumulating(){return this.enabled&&this._passParameters.accumulatedFrames<this._maxFrames}precompile(){this.techniques.getCompiled(_)}render(e){if(this.bindParameters.frameRendererTarget===3)return null;let t=this.bindParameters.frameRendererTarget!==0;if(this._passParameters.accumulatedFrames>=this._maxFrames&&!t)return this._lastOutput?.retain(),this._lastOutput;let n=e.find(({name:e})=>e===`normals`),r=n?.getTexture(),i=n?.getTexture(v);return!r||!i||this._mode===0?this._emptyOutput:(this._configuration.hasEmission=!!this.bindParameters.reprojection.lastFrameEmission,t?this._renderOffscreen(r,i):this._renderInteractive(r,i))}_renderOffscreen(e,t){let n=this._emptyOutput,r=this._passParameters.accumulatedFrames,i=this._passParameters.temporalSampleFrame;this._passParameters.accumulatedFrames=0,this._passParameters.temporalSampleFrame=0;let a=this.techniques.get(m,this._configuration),o=this.techniques.get(p);for(;this._passParameters.accumulatedFrames<this._maxFrames;){this._passParameters.globalIllumination=n.getTexture(),this._passParameters.globalIlluminationWeights=n.getTexture(y);let r=this._renderAccumulationFrame(e,t,a,o);++this._passParameters.accumulatedFrames,n.release(),n=r}return this._passParameters.globalIllumination=null,this._passParameters.globalIlluminationWeights=null,this._passParameters.accumulatedFrames=r,this._passParameters.temporalSampleFrame=i,n}_renderInteractive(e,t){if(!this._canRender)return this._requestRender(),this._emptyOutput;let n=this._mode===1?this._lowQualityResolutionScale*this.bindParameters.camera.pixelScale:1,r=n>=.99?1:n,i=this.techniques.getCompiled(m,this._configuration),a=this.techniques.getCompiled(p),o=r<1,s=o?this.techniques.getCompiled(_):null;if(!i||!a||o&&!s)return this._requestRender(),this._emptyOutput;let c=this._renderAccumulationFrame(e,t,i,a,s,r);return++this._passParameters.accumulatedFrames,this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),this._storeOutput(c),c}_renderAccumulationFrame(e,t,n,r,i,a=1){let s=this.bindParameters,c=this.renderingContext,{camera:u}=s;this._passParameters.normalTexture=e,this._passParameters.depthTexture=t,this._passParameters.projScale=1/u.computeScreenPixelSizeAtDistance(1),this._passParameters.resolutionScale=a,this._passParameters.glowBoost=this._glowBoost;let{fullWidth:d,fullHeight:f}=u,p=Math.max(1,Math.floor(d*a)),m=Math.max(1,Math.floor(f*a)),h=this.fboCache.acquire(p,m,`global illumination input`).acquireColor(y,2);c.bindFramebuffer(h.fbo),c.setViewport(0,0,p,m),c.bindTechnique(n,s,this._passParameters,this._drawParameters),c.screen.draw();let g=Math.max(1,Math.round(p)),_=Math.max(1,Math.round(m)),v=this.fboCache.acquire(g,_,`global illumination blur horizontal`);c.bindFramebuffer(v.fbo);let b=h.obtainAttachment(y);this._drawParameters.texture=h.getTexture(),this._drawParameters.weightTexture=b.attachment,o(this._drawParameters.blurSize,0,1/m),c.bindTechnique(r,s,this._passParameters,this._drawParameters),c.setViewport(0,0,g,_),c.screen.draw(),h.release();let x=this.fboCache.acquire(g,_,i?`global illumination blur vertical`:l.AMBIENT_ILLUMINATION);c.bindFramebuffer(x.fbo),c.setViewport(0,0,g,_),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParameters.texture=v.getTexture(),this._drawParameters.weightTexture=b.attachment,o(this._drawParameters.blurSize,1/g,0),c.bindTechnique(r,s,this._passParameters,this._drawParameters),c.setViewport(0,0,g,_),c.screen.draw(),v.release(),x.attachColor(b,y),b.release();let S=x;return i&&(S=this.fboCache.acquire(d,f,l.AMBIENT_ILLUMINATION).acquireColor(y,2),c.bindFramebuffer(S.fbo),c.setViewport(0,0,d,f),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParametersUpscale.colorTexture=x.getTexture(),this._drawParametersUpscale.weightTexture=x.getTexture(y),c.bindTechnique(i,s,this._passParameters,this._drawParametersUpscale),c.screen.draw(),x.release()),c.setViewport4fv(u.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,S}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(e){this._lastOutput!==e&&(this._lastOutput=t(this._lastOutput),this._lastOutput=e,this._lastOutput.retain())}get _emptyOutput(){let e=this.renderingContext,{fullWidth:t,fullHeight:n}=this.bindParameters.camera,r=this.fboCache.acquire(t,n,l.AMBIENT_ILLUMINATION).acquireColor(y,2);return e.bindFramebuffer(r.fbo),e.setViewport(0,0,t,n),e.clearBuffer(0,s),e.clearBuffer(1,c),r}get _canRender(){let{reprojection:e,hasEmission:t,globalIllumination:n}=this.bindParameters;return(!t||!!e.lastFrameEmission)&&!!e.lastFrameDepth&&!!n}get _glowBoost(){let e=this.view.environment.lighting.glow;return e==null?0:2+3*e.intensity}get _mode(){return this._useGlobalIllumination?this.view.stage.renderer.isFeatureEnabled(10)?2:1:0}get test(){let e=this;return{get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},passParameters:this._passParameters,configuration:this._configuration,get mode(){return e._mode},async restartAccumulation(){e.produces!==`disabled`&&(e._disable(),await i(),e._enable())}}}};b=e([a(`esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination`)],b);export{b as GlobalIllumination};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t,ShaderTechniqueConfiguration as n}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{d as r,b as i}from"../../../../../chunks/GlobalIllumination.glsl.js";class a extends n{constructor(){super(...arguments),this.hasColor=!0,this.hasEmission=!1,this.rayMarchMaxReach=r,this.rayMarchMaxSteps=i,this.useProjectedRayLength=!0,this.clampRayToScreen=!1}}e([t()],a.prototype,`hasColor`,void 0),e([t()],a.prototype,`hasEmission`,void 0);export{a as GlobalIlluminationTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t,ShaderTechniqueConfiguration as n}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends n{constructor(){super(...arguments),this.hasColor=!0,this.hasEmission=!1,this.rayMarchMaxReach=.5,this.rayMarchMaxSteps=16,this.useProjectedRayLength=!0,this.clampRayToScreen=!1}}e([t()],r.prototype,`hasColor`,void 0),e([t()],r.prototype,`hasEmission`,void 0);export{r as GlobalIlluminationTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{releaseMaybe as e}from"../../../../core/maybe.js";import{signal as t}from"../../../../core/signal.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import r from"../../webgl/RenderCamera.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as a}from"../effects/clouds/CloudsParameters.js";import{ReprojectionUniforms as o}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as s}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as c}from"../lighting/SceneLighting.js";class l{constructor(e,t){this.width=e,this.height=t}}class u{constructor(e){this.shadowMap=e,this.output=0,this.slot=2,this.slicePlane=null,this.planarDistanceToGroundRatio=1,this.metersPerRenderUnit=1,this.hasOccludees=!1,this._emissions=t(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=t(!0),this.globalIlluminationDirectFactor=.55,this.globalIlluminationAmbientFactor=.85,this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.frameRendererTarget=0,this.overlayStretch=1,this.viewshedEnabled=!1,this.laserlinesEnabled=!1,this.shadowAnalysisEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this._camera=t(new r),this._inverseViewport=n(),this._oldLighting=new c,this._newLighting=new c,this._fadedLighting=new c,this._lighting=this._newLighting,this.screenSpaceReflections=new s,this.reprojection=new o,this.highlights=[],this.highlightMixOrigin=n(),this.highlightMixTexture=null,this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new a,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=e(this.depth),this.shadowMap?.dispose()}get emissions(){return this._emissions.value}set emissions(e){this._emissions.value=e}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return this.emissions===1||this.emissions===3}get hasTransparentEmission(){return this.emissions===2||this.emissions===3}get hasEmissions(){return this.emissions!==0}get camera(){return this._camera.value}set camera(e){this._camera.value=e,this._inverseViewport[0]=1/e.fullViewport[2],this._inverseViewport[1]=1/e.fullViewport[3]}get enableOITOffset(){return this.camera.relativeElevation<5e5}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(e,t,n,r){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=t,this._newLighting.globalFactor=n,this._newLighting.set(e),this._oldLighting.updateLegacy(),r===1&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return this.frameRendererTarget!==3&&i(this.output)&&this.screenSpaceReflections.enabled&&this.reprojection.lastFrameColor!=null}get highlight(){return this.highlightLevel==null?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(e){e&&(e.name=`geometry depth`),this._depth=e}get occluder(){return this.slot===10||this.slot===11?this.slot:null}}export{u as BindParameters,l as ViewportSize};
2
+ import{releaseMaybe as e}from"../../../../core/maybe.js";import{signal as t}from"../../../../core/signal.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import r from"../../webgl/RenderCamera.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as a}from"../effects/clouds/CloudsParameters.js";import{ReprojectionUniforms as o}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as s}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as c}from"../lighting/SceneLighting.js";class l{constructor(e,t){this.width=e,this.height=t}}class u{constructor(e){this.shadowMap=e,this.output=0,this.slot=2,this.slicePlane=null,this.planarDistanceToGroundRatio=1,this.metersPerRenderUnit=1,this.hasOccludees=!1,this._emissions=t(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=t(!0),this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.frameRendererTarget=0,this.overlayStretch=1,this.viewshedEnabled=!1,this.laserlinesEnabled=!1,this.shadowAnalysisEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this._camera=t(new r),this._inverseViewport=n(),this._oldLighting=new c,this._newLighting=new c,this._fadedLighting=new c,this._lighting=this._newLighting,this.screenSpaceReflections=new s,this.reprojection=new o,this.highlights=[],this.highlightMixOrigin=n(),this.highlightMixTexture=null,this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new a,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=e(this.depth),this.shadowMap?.dispose()}get emissions(){return this._emissions.value}set emissions(e){this._emissions.value=e}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return this.emissions===1||this.emissions===3}get hasTransparentEmission(){return this.emissions===2||this.emissions===3}get hasEmissions(){return this.emissions!==0}get camera(){return this._camera.value}set camera(e){this._camera.value=e,this._inverseViewport[0]=1/e.fullViewport[2],this._inverseViewport[1]=1/e.fullViewport[3]}get enableOITOffset(){return this.camera.relativeElevation<5e5}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(e,t,n,r){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=t,this._newLighting.globalFactor=n,this._newLighting.set(e),this._oldLighting.updateLegacy(),r===1&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return this.frameRendererTarget!==3&&i(this.output)&&this.screenSpaceReflections.enabled&&this.reprojection.lastFrameColor!=null}get highlight(){return this.highlightLevel==null?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(e){e&&(e.name=`geometry depth`),this._depth=e}get occluder(){return this.slot===10||this.slot===11?this.slot:null}}export{u as BindParameters,l as ViewportSize};